forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media-libs/assimp: 4.0.1 version bump
Bug: https://bugs.gentoo.org/631744 Closes: https://bugs.gentoo.org/645862 Package-Manager: Portage-2.3.36, Repoman-2.3.9
- Loading branch information
Showing
3 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Copyright 1999-2018 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=6 | ||
|
||
inherit cmake-utils | ||
|
||
DESCRIPTION="Importer library to import assets from 3D files" | ||
HOMEPAGE="https://github.com/assimp/assimp" | ||
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" | ||
|
||
LICENSE="BSD" | ||
KEYWORDS="~amd64 ~arm ~x86" | ||
IUSE="samples static test tools" | ||
SLOT="0" | ||
|
||
RDEPEND=" | ||
dev-libs/boost:= | ||
sys-libs/zlib:=[minizip] | ||
samples? ( | ||
media-libs/freeglut | ||
virtual/opengl | ||
x11-libs/libX11 | ||
) | ||
tools? ( | ||
dev-qt/qtcore:5 | ||
dev-qt/qtgui:5 | ||
dev-qt/qtopengl:5 | ||
dev-qt/qtwidgets:5 | ||
media-libs/devil | ||
virtual/opengl | ||
) | ||
" | ||
DEPEND="${RDEPEND} | ||
test? ( dev-cpp/gtest ) | ||
" | ||
|
||
PATCHES=( | ||
"${FILESDIR}/findassimp-3.3.1.patch" | ||
"${FILESDIR}/${P}-qt-5.11.0.patch" | ||
) | ||
|
||
src_configure() { | ||
local mycmakeargs=( | ||
-DASSIMP_BUILD_SAMPLES=$(usex samples) | ||
-DASSIMP_BUILD_STATIC_LIB=$(usex static) | ||
-DASSIMP_BUILD_TESTS=$(usex test) | ||
-DASSIMP_BUILD_ASSIMP_TOOLS=$(usex tools) | ||
-DCMAKE_DEBUG_POSTFIX="" | ||
-DASSIMP_LIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)/" | ||
) | ||
|
||
cmake-utils_src_configure | ||
} | ||
|
||
src_install() { | ||
cmake-utils_src_install | ||
|
||
insinto /usr/share/cmake/Modules | ||
doins cmake-modules/Findassimp.cmake | ||
} | ||
|
||
src_test() { | ||
"${BUILD_DIR}/test/unit" || die | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
From 7251c3c51a774c2828f62787e3aa6ad743ca5628 Mon Sep 17 00:00:00 2001 | ||
From: Andreas Sturmlechner <[email protected]> | ||
Date: Wed, 16 May 2018 13:45:25 +0200 | ||
Subject: [PATCH 1/2] Fix build with Qt 5.11.0_beta3 (qt5_use_modules is gone) | ||
|
||
--- | ||
tools/assimp_qt_viewer/CMakeLists.txt | 5 ++--- | ||
1 file changed, 2 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/tools/assimp_qt_viewer/CMakeLists.txt b/tools/assimp_qt_viewer/CMakeLists.txt | ||
index 42ef0fb3..9f1b68ca 100644 | ||
--- a/tools/assimp_qt_viewer/CMakeLists.txt | ||
+++ b/tools/assimp_qt_viewer/CMakeLists.txt | ||
@@ -3,7 +3,7 @@ project(assimp_qt_viewer) | ||
|
||
cmake_minimum_required(VERSION 2.6) | ||
|
||
-find_package(Qt5Widgets REQUIRED) | ||
+find_package(Qt5 COMPONENTS Gui Widgets OpenGL REQUIRED) | ||
find_package(DevIL REQUIRED) | ||
find_package(OpenGL REQUIRED) | ||
|
||
@@ -25,9 +25,8 @@ qt5_wrap_ui(UISrcs mainwindow.ui) | ||
qt5_wrap_cpp(MOCrcs mainwindow.hpp glview.hpp) | ||
|
||
add_executable(${PROJECT_NAME} ${assimp_qt_viewer_SRCS} ${UISrcs} ${MOCrcs}) | ||
-target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${IL_LIBRARIES} ${OPENGL_LIBRARIES} assimp) | ||
+target_link_libraries(${PROJECT_NAME} Qt5::Gui Qt5::Widgets Qt5::OpenGL ${IL_LIBRARIES} ${OPENGL_LIBRARIES} assimp) | ||
|
||
-qt5_use_modules(${PROJECT_NAME} Widgets OpenGL) | ||
if(WIN32) # Check if we are on Windows | ||
if(MSVC) # Check if we are using the Visual Studio compiler | ||
#set_target_properties(TestProject PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS") | ||
-- | ||
2.17.0 | ||
|
||
|
||
From 5bbf0a8afa5a3cbaa9281e47cc327b0d9560b03f Mon Sep 17 00:00:00 2001 | ||
From: Andreas Sturmlechner <[email protected]> | ||
Date: Wed, 16 May 2018 13:58:30 +0200 | ||
Subject: [PATCH 2/2] Add missing assimp_qt_viewer install target | ||
|
||
--- | ||
tools/assimp_qt_viewer/CMakeLists.txt | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git a/tools/assimp_qt_viewer/CMakeLists.txt b/tools/assimp_qt_viewer/CMakeLists.txt | ||
index 9f1b68ca..b41291e3 100644 | ||
--- a/tools/assimp_qt_viewer/CMakeLists.txt | ||
+++ b/tools/assimp_qt_viewer/CMakeLists.txt | ||
@@ -42,3 +42,5 @@ else() | ||
endif() | ||
|
||
set_property(TARGET ${PROJECT_NAME} PROPERTY DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) | ||
+ | ||
+install(TARGETS assimp_qt_viewer DESTINATION "${ASSIMP_BIN_INSTALL_DIR}") | ||
-- | ||
2.17.0 | ||
|