media-libs/assimp: version bump to 4.1.0
authorSlawomir Lis <slis@gentoo.org>
Thu, 22 Aug 2019 03:36:22 +0000 (05:36 +0200)
committerSlawomir Lis <slis@gentoo.org>
Thu, 22 Aug 2019 03:36:42 +0000 (05:36 +0200)
Closes: https://bugs.gentoo.org/653992
Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: Slawek Lis <slis@gentoo.org>
media-libs/assimp/Manifest
media-libs/assimp/assimp-4.1.0.ebuild [new file with mode: 0644]
media-libs/assimp/files/assimp-4.1.0-disabletest.patch [new file with mode: 0644]
media-libs/assimp/files/assimp-4.1.0-unzip-of.patch [new file with mode: 0644]

index 6e8afcaf3dc1572856290bd283e2cd9d6600b839..76d568f91e9c06f6477aa727f6a35512db62e65a 100644 (file)
@@ -1 +1,2 @@
 DIST assimp-4.0.1.tar.gz 44625148 BLAKE2B 50cbb6096e89fa311a67cf4f526be57a19f41fe48d59bcdd8d6fd309a988cb19c0f1a4c175301e4c299cb644882a6e8042b0d9281319424faf7504688764e97e SHA512 260b4c7e738f857d8364c4878ea4e789ca676180821943f6d9bff8f56e5f9377ea29660dca4e130c681a8aa12fc32f155adb1d78ca260ba242e68b8afa6cc1bb
+DIST assimp-4.1.0.tar.gz 45417293 BLAKE2B 74170ab48b64ab357ddd9da58f1218d0c3c0a4039345dcd7ae396aca3bb47c2f5ea2ee8b61b7d81c68c2e1237cd3ba516b816038400e9960b6c0cfe031a41e54 SHA512 5f1292de873ae16c9921d1d44f2871474d74c0ddfd76cc928a7d9b3e03aa6eca4cc72af0513da20a86d09c55d48646e610fd4a4f2b05364f08ad09cf27cbc67a
diff --git a/media-libs/assimp/assimp-4.1.0.ebuild b/media-libs/assimp/assimp-4.1.0.ebuild
new file mode 100644 (file)
index 0000000..0502003
--- /dev/null
@@ -0,0 +1,65 @@
+# Copyright 1999-2019 Gentoo Authors
+# 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 ~arm64 ~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}/${P}-disabletest.patch" # bug 659122
+       "${FILESDIR}/${P}-unzip-of.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
+}
diff --git a/media-libs/assimp/files/assimp-4.1.0-disabletest.patch b/media-libs/assimp/files/assimp-4.1.0-disabletest.patch
new file mode 100644 (file)
index 0000000..4afe5bb
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/test/unit/utVersion.cpp  2017-07-28 22:33:41.000000000 +0200
++++ b/test/unit/utVersion.cpp  2018-08-26 01:48:54.935116440 +0200
+@@ -65,7 +65,3 @@
+     EXPECT_NE( aiGetCompileFlags(), 0U );
+ }
+-TEST_F( utVersion, aiGetVersionRevisionTest ) {
+-    EXPECT_NE( aiGetVersionRevision(), 0U );
+-}
+-
diff --git a/media-libs/assimp/files/assimp-4.1.0-unzip-of.patch b/media-libs/assimp/files/assimp-4.1.0-unzip-of.patch
new file mode 100644 (file)
index 0000000..e75b47a
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/contrib/unzip/unzip.h    2019-08-21 21:38:10.991542891 +0200
++++ b/contrib/unzip/unzip.h    2019-08-21 21:38:24.507543226 +0200
+@@ -45,6 +45,8 @@
+ #ifndef _unz_H
+ #define _unz_H
++#define OF _Z_OF
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif