Skip to content

Commit

Permalink
media-libs/assimp: 4.0.1 version bump
Browse files Browse the repository at this point in the history
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
a17r committed May 16, 2018
1 parent 02d2520 commit 052be5a
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 0 deletions.
1 change: 1 addition & 0 deletions media-libs/assimp/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ DIST assimp-3.1.1.zip 32869052 BLAKE2B 877b1a00a8e35eafb85c0f1b1c364c025a98c629d
DIST assimp-3.2.tar.gz 33756081 BLAKE2B 76de8f74b7b2eae04ebd3d71b69709d601d249a4ed7e6102fffce376f67dfb2d433536556e7683bc79d092465940cd5d7750f7fecb54edd33b9e8bfa974f8de0 SHA512 d9c4b1efc319990726605664ef38fda49d23a8f169261dda007d912015f404737b2c2a8306bffb837827e4a62d5fb362dae384b85b865450a5622325fe13ad7a
DIST assimp-3.3.1.tar.gz 36428380 BLAKE2B 5239648ea99e23a1f5f568fb22e6f9607b3f2e642fcdb480737c8813456fee699a4a07937c248ded01c27edd503f1a30ae8bde30ff49d8bac61e6363f12d1cc5 SHA512 660a720f1698e12e6505a554638b15108dfe94f081eb61c675bba9ae979fd80fe8552f6c4c366ff391be6cb34e799c5cf000f621f064105a161caedc82dd934a
DIST assimp-4.0.0.tar.gz 44618473 BLAKE2B 12bf7e09bc80de33ec250e19ca4a5dd34fd1b1a25ca05b85fa3c3253b3b9fba103389f34b874652b393d014bb7da863a3487b1a9cb5e806028c2d060286edaca SHA512 ab2b376c6323fc8579fe3a4b3dbe92c44d753747464a14d6e2be70d2a855c208df882ad84487a7b96f364afb175938b5f6a1111d767450b01e0b8b7f0f36ba62
DIST assimp-4.0.1.tar.gz 44625148 BLAKE2B 50cbb6096e89fa311a67cf4f526be57a19f41fe48d59bcdd8d6fd309a988cb19c0f1a4c175301e4c299cb644882a6e8042b0d9281319424faf7504688764e97e SHA512 260b4c7e738f857d8364c4878ea4e789ca676180821943f6d9bff8f56e5f9377ea29660dca4e130c681a8aa12fc32f155adb1d78ca260ba242e68b8afa6cc1bb
65 changes: 65 additions & 0 deletions media-libs/assimp/assimp-4.0.1.ebuild
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
}
59 changes: 59 additions & 0 deletions media-libs/assimp/files/assimp-4.0.1-qt-5.11.0.patch
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

0 comments on commit 052be5a

Please sign in to comment.