media-gfx/alembic: fix boost not found error
authorBernd Waibel <waebbl@gmail.com>
Sun, 11 Nov 2018 20:55:57 +0000 (21:55 +0100)
committerAndreas Sturmlechner <asturm@gentoo.org>
Wed, 8 May 2019 16:59:31 +0000 (18:59 +0200)
Fixes an error with >=cmake-3.11* where boost is not found due to
changes in cmake syntax.

See also: https://github.com/gentoo/gentoo/pull/10394
Closes: https://bugs.gentoo.org/667728
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Bernd Waibel <waebbl@gmail.com>
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
media-gfx/alembic/alembic-1.7.9.ebuild
media-gfx/alembic/files/alembic-1.7.9-find-boost-python-for-cmake-ge-3.11.patch [new file with mode: 0644]
media-gfx/alembic/files/alembic-1.7.9-fix-boost-python-naming.patch [new file with mode: 0644]

index 638b12a639b9422d910bee67795f60adb1723c48..a6eebf37327a44cf1f8b0e99f407860879d62d89 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -14,10 +14,7 @@ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
 LICENSE="BSD"
 
 SLOT="0"
-# TODO: ~x86 currently depends on new =dev-python/pyilmbase-2.3.0 which has
-# ~x86 keyword. As soon as it's updated in the tree, the keyword can be
-# added here.
-KEYWORDS="~amd64"
+KEYWORDS="~amd64 ~x86"
 IUSE="arnold +boost doc examples hdf5 maya prman python test zlib"
 
 # pyalembic python bindings need boost
@@ -49,6 +46,8 @@ PATCHES=(
        "${FILESDIR}/${P}-prman.patch"
        "${FILESDIR}/${P}-fix-python-import.patch"
        "${FILESDIR}/${P}-find-pyilmbase-python-module.patch"
+       "${FILESDIR}/${P}-find-boost-python-for-cmake-ge-3.11.patch"
+       "${FILESDIR}/${P}-fix-boost-python-naming.patch"
 )
 
 src_configure() {
diff --git a/media-gfx/alembic/files/alembic-1.7.9-find-boost-python-for-cmake-ge-3.11.patch b/media-gfx/alembic/files/alembic-1.7.9-find-boost-python-for-cmake-ge-3.11.patch
new file mode 100644 (file)
index 0000000..d8abfce
--- /dev/null
@@ -0,0 +1,20 @@
+diff --git a/cmake/AlembicBoost.cmake b/cmake/AlembicBoost.cmake
+index 21b3515..ba6f396 100644
+--- a/cmake/AlembicBoost.cmake
++++ b/cmake/AlembicBoost.cmake
+@@ -79,7 +79,14 @@ IF (USE_PYALEMBIC AND APPLE)
+ ENDIF()
+ IF (USE_PYALEMBIC)
+-    FIND_PACKAGE(Boost 1.42.0 COMPONENTS program_options python)
++    # At least cmake-3.11 has introduced a new syntax while looking for
++    # boost python libraries. It might apply to version 10 too, but I
++    # couldn't check due to cmake-3.10 compile error.
++    IF (CMAKE_MINOR_VERSION VERSION_GREATER 10)
++        FIND_PACKAGE(Boost 1.42.0 COMPONENTS program_options python2.7)
++    ELSE()
++        FIND_PACKAGE(Boost 1.42.0 COMPONENTS program_options python)
++    ENDIF()
+ ELSE()
+     FIND_PACKAGE(Boost 1.42.0 COMPONENTS program_options)
+ ENDIF()
diff --git a/media-gfx/alembic/files/alembic-1.7.9-fix-boost-python-naming.patch b/media-gfx/alembic/files/alembic-1.7.9-fix-boost-python-naming.patch
new file mode 100644 (file)
index 0000000..c14d7ad
--- /dev/null
@@ -0,0 +1,17 @@
+diff --git a/python/PyAlembic/CMakeLists.txt b/python/PyAlembic/CMakeLists.txt
+index 5a75e63..492be6a 100644
+--- a/python/PyAlembic/CMakeLists.txt
++++ b/python/PyAlembic/CMakeLists.txt
+@@ -33,10 +33,10 @@
+ ##
+ ##-*****************************************************************************
+-MESSAGE(STATUS "Boost_PYTHON_LIBRARY: ${Boost_PYTHON_LIBRARY}")
++MESSAGE(STATUS "Boost_PYTHON2.7_LIBRARY_RELEASE: ${Boost_PYTHON2.7_LIBRARY_RELEASE}")
+ # set core libs
+-IF (Boost_PYTHON_LIBRARY AND ALEMBIC_PYTHON_LIBRARY)
++IF (Boost_PYTHON2.7_LIBRARY_RELEASE AND ALEMBIC_PYTHON_LIBRARY)
+     MESSAGE(STATUS "Found libboost_python: ${Boost_PYTHON_LIBRARY}")
+     SET(PLIBS ${ALEMBIC_PYTHON_LIBRARY} ${Boost_PYTHON_LIBRARY})