Skip to content

Commit

Permalink
media-gfx/alembic: bump to version 1.7.9
Browse files Browse the repository at this point in the history
	add experimental support for arnold, maya and renderman plugins

Bug: https://bugs.gentoo.org/667230
Signed-off-by: Bernd Waibel <waebbl@gmail.com>
Package-Manager: Portage-2.3.49, Repoman-2.3.10
  • Loading branch information
waebbl committed Sep 30, 2018
1 parent 9cdda20 commit dad8a85
Show file tree
Hide file tree
Showing 6 changed files with 380 additions and 1 deletion.
1 change: 1 addition & 0 deletions media-gfx/alembic/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST alembic-1.7.4.tar.gz 805503 BLAKE2B b8a8b986d0323dbe3748e1dde5436d66e08620a28852c3331ee612d43a414e381a1cdbbb63200b8f146ce94ebb0e3d0ae6f70f33575bd9ff25e9121f2cd73d1a SHA512 8e752d6d85bea3b6a53582d35a589fc40824456098d950974effe0a6a0e359fec1e056af1ea1379f7e23b7ffed2c05c7f5269fa4b64757631b7d57fb60ee98b0
DIST alembic-1.7.9.tar.gz 813379 BLAKE2B 599edeb5ad805656755b3e150fba56182d1d60673951b0c1702b3e3e82d9499ec4fcb938303103c27f84458f61ab8de4b872eaa322380ae7713e3b4cd3831af7 SHA512 8025c20525ffbd5bdc9dd5a33ad8238e49f063d244ab9d112e7d1ddb7ee7cf9b36ceb74cb45d658ce22d3033552c89bddf6b818cf466ea46aa1a70a41fdeddb2
113 changes: 113 additions & 0 deletions media-gfx/alembic/alembic-1.7.9.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6
PYTHON_COMPAT=( python2_7 )

inherit cmake-utils python-single-r1

DESCRIPTION="Alembic is an open framework for storing and sharing scene data"
HOMEPAGE="http://alembic.io/"
SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="BSD"

SLOT="0"
KEYWORDS="~amd64"
IUSE="arnold +boost doc examples hdf5 maya prman python test zlib"

# pyalembic python bindings need boost
REQUIRED_USE="${PYTHON_REQUIRED_USE}
hdf5? ( zlib )
python? ( boost )
"

CDEPEND="${PYTHON_DEPS}
>=media-libs/openexr-2.2.0-r2
boost? ( >=dev-libs/boost-1.65.0[python,${PYTHON_USEDEP}] )
hdf5? ( >=sci-libs/hdf5-1.8.18[zlib(+)] )
python? ( >=dev-python/pyilmbase-2.2.0[${PYTHON_USEDEP}] )
zlib? ( >=sys-libs/zlib-1.2.11-r1 )
"
DEPEND="${CDEPEND}
>=dev-util/cmake-3.9.6
doc? ( >=app-doc/doxygen-1.8.13-r1 )
"
RDEPEND="${CDEPEND}"

DOCS=( "ACKNOWLEDGEMENTS.txt" "FEEDBACK.txt" "NEWS.txt" "README.txt" )

PATCHES=(
"${FILESDIR}/${PN}-FindIlmBase-pkgconfig.patch"
"${FILESDIR}/${P}-CMakeLists-fix_lib.patch"
"${FILESDIR}/${P}-prman.patch"
"${FILESDIR}/${P}-fix-python-import.patch"
)

src_prepare() {
cmake-utils_src_prepare
}

src_configure() {
local mycmakeargs=(
-DALEMBIC_SHARED_LIBS=ON
# The CMakeLists.txt file needs C++11 or C++-0x if none of them
# is defined
-DALEMBIC_LIB_USES_BOOST=$(usex boost)
-DALEMBIC_LIB_USES_TR1=$(usex !boost)
-DPYILMBASE_ROOT="/usr"
-DUSE_ARNOLD=$(usex arnold)
-DUSE_BINARIES=ON
-DUSE_EXAMPLES=$(usex examples)
-DUSE_HDF5=$(usex hdf5)
-DUSE_MAYA=$(usex maya)
-DUSE_PRMAN=$(usex prman)
-DUSE_PYALEMBIC=$(usex python)
-DUSE_TESTS=$(usex test)
)
cmake-utils_src_configure
}

src_compile() {
cmake-utils_src_compile
if use doc; then
doxygen -u Doxyfile || die
doxygen Doxyfile || die
fi
}

src_test() {
if use test; then
cmake-utils_src_test
fi
}

src_install() {
DESTDIR="${D}" cmake-utils_src_install
if use doc; then
dodoc -r "doc/html"
fi
}

pkg_postinst() {
if use arnold; then
einfo "NOTE: The arnold plugin is highly experimental and hasn't been"
einfo "tested, due to missing license. If you have trouble compiling"
einfo "or running it, please file a bug report for the package at"
einfo "gentoo's bugzilla."
fi
if use maya; then
einfo "NOTE: The maya plugin is highly experimental and hasn't been"
einfo "tested, due to missing license. If you have trouble compiling"
einfo "or running it, please file a bug report for the package at"
einfo "gentoo's bugzilla."
fi
if use prman; then
einfo "NOTE: The renderman plugin is still experimental and has not"
einfo "been tested much. If you have trouble running it, please file"
einfo "a bug report for the package at gentoo's bugzilla."
einfo "If you're looking for an ebuild for renderman, you may want to"
einfo "to try the waebbl overlay: 'eselect repository enable waebbl'"
einfo "followed by 'emerge renderman'"
fi
}
189 changes: 189 additions & 0 deletions media-gfx/alembic/files/alembic-1.7.9-CMakeLists-fix_lib.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 298f4be..18b3ff5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,12 +80,12 @@ OPTION(ALEMBIC_LIB_USES_TR1

# Set static/dynamic build options
SET(LIB_TYPE STATIC)
-SET(RUNTIME_INSTALL_DIR lib)
-SET(LIBRARY_INSTALL_DIR lib)
-SET(ARCHIVE_INSTALL_DIR lib)
+SET(RUNTIME_INSTALL_DIR lib64)
+SET(LIBRARY_INSTALL_DIR lib64)
+SET(ARCHIVE_INSTALL_DIR lib64)
IF (ALEMBIC_SHARED_LIBS)
SET(LIB_TYPE SHARED)
- SET(ARCHIVE_INSTALL_DIR lib)
+ SET(ARCHIVE_INSTALL_DIR lib64)
IF (WIN32)
ADD_DEFINITIONS(-DALEMBIC_DLL)
ENDIF()
diff --git a/arnold/Procedural/CMakeLists.txt b/arnold/Procedural/CMakeLists.txt
index 69e00da..47ccf66 100644
--- a/arnold/Procedural/CMakeLists.txt
+++ b/arnold/Procedural/CMakeLists.txt
@@ -60,7 +60,7 @@ TARGET_LINK_LIBRARIES( AlembicArnoldProcedural Alembic::Alembic)

set_target_properties(AlembicArnoldProcedural PROPERTIES
INSTALL_RPATH_USE_LINK_PATH TRUE
- INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+ INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib64)

INSTALL ( TARGETS
AlembicArnoldProcedural
diff --git a/bin/AbcConvert/CMakeLists.txt b/bin/AbcConvert/CMakeLists.txt
index 451409c..c882971 100644
--- a/bin/AbcConvert/CMakeLists.txt
+++ b/bin/AbcConvert/CMakeLists.txt
@@ -38,6 +38,6 @@ TARGET_LINK_LIBRARIES(abcconvert Alembic::Alembic)

set_target_properties(abcconvert PROPERTIES
INSTALL_RPATH_USE_LINK_PATH TRUE
- INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+ INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib64)

INSTALL(TARGETS abcconvert DESTINATION bin)
diff --git a/bin/AbcDiff/CMakeLists.txt b/bin/AbcDiff/CMakeLists.txt
index 511864a..bed92b2 100644
--- a/bin/AbcDiff/CMakeLists.txt
+++ b/bin/AbcDiff/CMakeLists.txt
@@ -38,6 +38,6 @@ TARGET_LINK_LIBRARIES(abcdiff Alembic::Alembic)

set_target_properties(abcdiff PROPERTIES
INSTALL_RPATH_USE_LINK_PATH TRUE
- INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+ INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib64)

INSTALL(TARGETS abcdiff DESTINATION bin)
diff --git a/bin/AbcEcho/CMakeLists.txt b/bin/AbcEcho/CMakeLists.txt
index be5f5c1..eca449a 100644
--- a/bin/AbcEcho/CMakeLists.txt
+++ b/bin/AbcEcho/CMakeLists.txt
@@ -41,6 +41,6 @@ TARGET_LINK_LIBRARIES(abcechobounds Alembic::Alembic)

set_target_properties(abcecho abcechobounds PROPERTIES
INSTALL_RPATH_USE_LINK_PATH TRUE
- INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+ INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib64)

INSTALL(TARGETS abcecho abcechobounds DESTINATION bin)
diff --git a/bin/AbcLs/CMakeLists.txt b/bin/AbcLs/CMakeLists.txt
index 815f84f..92f83c4 100644
--- a/bin/AbcLs/CMakeLists.txt
+++ b/bin/AbcLs/CMakeLists.txt
@@ -39,6 +39,6 @@ TARGET_LINK_LIBRARIES(abcls Alembic::Alembic)

set_target_properties(abcls PROPERTIES
INSTALL_RPATH_USE_LINK_PATH TRUE
- INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+ INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib64)

INSTALL(TARGETS abcls DESTINATION bin)
diff --git a/bin/AbcStitcher/CMakeLists.txt b/bin/AbcStitcher/CMakeLists.txt
index a963420..a84e00b 100644
--- a/bin/AbcStitcher/CMakeLists.txt
+++ b/bin/AbcStitcher/CMakeLists.txt
@@ -38,6 +38,6 @@ TARGET_LINK_LIBRARIES(abcstitcher Alembic::Alembic)

set_target_properties(abcstitcher PROPERTIES
INSTALL_RPATH_USE_LINK_PATH TRUE
- INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+ INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib64)

INSTALL(TARGETS abcstitcher DESTINATION bin)
diff --git a/bin/AbcTree/CMakeLists.txt b/bin/AbcTree/CMakeLists.txt
index b4f65f1..74225ac 100644
--- a/bin/AbcTree/CMakeLists.txt
+++ b/bin/AbcTree/CMakeLists.txt
@@ -38,6 +38,6 @@ TARGET_LINK_LIBRARIES(abctree Alembic::Alembic)

set_target_properties(abctree PROPERTIES
INSTALL_RPATH_USE_LINK_PATH TRUE
- INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+ INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib64)

INSTALL(TARGETS abctree DESTINATION bin)
diff --git a/lib/Alembic/CMakeLists.txt b/lib/Alembic/CMakeLists.txt
index fb3def8..d5bbcec 100644
--- a/lib/Alembic/CMakeLists.txt
+++ b/lib/Alembic/CMakeLists.txt
@@ -84,7 +84,7 @@ IF ( ${ALEMBIC_LIB_USES_TR1} AND CMAKE_COMPILER_IS_GNUCXX AND
TARGET_LINK_LIBRARIES( Alembic atomic )
ENDIF()

-SET( ALEMBIC_LIB_INSTALL_DIR lib CACHE PATH "Where to install the Alembic libs")
+SET( ALEMBIC_LIB_INSTALL_DIR lib64 CACHE PATH "Where to install the Alembic libs")
INSTALL(TARGETS Alembic
EXPORT AlembicTargets
LIBRARY DESTINATION ${ALEMBIC_LIB_INSTALL_DIR}
@@ -117,7 +117,7 @@ EXPORT(TARGETS
Alembic::
)

-SET(ConfigPackageLocation lib/cmake/Alembic CACHE PATH
+SET(ConfigPackageLocation lib64/cmake/Alembic CACHE PATH
"Where to install the Alembic's cmake files")

INSTALL(FILES
diff --git a/maya/AbcExport/CMakeLists.txt b/maya/AbcExport/CMakeLists.txt
index 50d2fd2..f8bc850 100644
--- a/maya/AbcExport/CMakeLists.txt
+++ b/maya/AbcExport/CMakeLists.txt
@@ -77,7 +77,7 @@ TARGET_LINK_LIBRARIES(AbcExport

set_target_properties(AbcExport PROPERTIES
INSTALL_RPATH_USE_LINK_PATH TRUE
- INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+ INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib64)

INSTALL(TARGETS AbcExport
DESTINATION ${ALEMBIC_MAYA_PLUGINS_INSTALL_DIR})
diff --git a/maya/AbcImport/CMakeLists.txt b/maya/AbcImport/CMakeLists.txt
index 6826183..e71e612 100644
--- a/maya/AbcImport/CMakeLists.txt
+++ b/maya/AbcImport/CMakeLists.txt
@@ -81,7 +81,7 @@ TARGET_LINK_LIBRARIES(AbcImport

set_target_properties(AbcImport PROPERTIES
INSTALL_RPATH_USE_LINK_PATH TRUE
- INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+ INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib64)

INSTALL(TARGETS AbcImport
DESTINATION ${ALEMBIC_MAYA_PLUGINS_INSTALL_DIR})
diff --git a/prman/Procedural/CMakeLists.txt b/prman/Procedural/CMakeLists.txt
index 6b46e91..3635bcc 100644
--- a/prman/Procedural/CMakeLists.txt
+++ b/prman/Procedural/CMakeLists.txt
@@ -60,7 +60,7 @@ TARGET_LINK_LIBRARIES(AlembicRiProcedural Alembic::Alembic)

set_target_properties(AlembicRiProcedural PROPERTIES
INSTALL_RPATH_USE_LINK_PATH TRUE
- INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+ INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib64)

INSTALL(TARGETS
AlembicRiProcedural
diff --git a/python/PyAlembic/CMakeLists.txt b/python/PyAlembic/CMakeLists.txt
index 91c45c4..c87eec6 100644
--- a/python/PyAlembic/CMakeLists.txt
+++ b/python/PyAlembic/CMakeLists.txt
@@ -128,7 +128,7 @@ IF (Boost_PYTHON_LIBRARY AND ALEMBIC_PYTHON_LIBRARY)
)

SET( ALEMBIC_PYTHON_INSTALL_DIR
- lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages
+ lib64/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages
CACHE PATH
"Alembic's python bindings install directory"
)
@@ -143,7 +143,7 @@ IF (Boost_PYTHON_LIBRARY AND ALEMBIC_PYTHON_LIBRARY)

set_target_properties(alembic PROPERTIES
INSTALL_RPATH_USE_LINK_PATH TRUE
- INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+ INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib64)
ELSE()
MESSAGE(FATAL_ERROR "Unable to find Python libs")
ENDIF()
34 changes: 34 additions & 0 deletions media-gfx/alembic/files/alembic-1.7.9-fix-python-import.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/cmake/Modules/FindPyIlmBase.cmake b/cmake/Modules/FindPyIlmBase.cmake
index c677549..6a2a319 100644
--- a/cmake/Modules/FindPyIlmBase.cmake
+++ b/cmake/Modules/FindPyIlmBase.cmake
@@ -60,11 +60,11 @@ ELSE()

SET(LIBRARY_PATHS
${ALEMBIC_PYILMBASE_ROOT}/lib
- ${ALEMBIC_PYILMBASE_MODULE_DIRECTORY}
+# ${ALEMBIC_PYILMBASE_MODULE_DIRECTORY}
~/Library/Frameworks
/Library/Frameworks
- /usr/local/lib
- /usr/lib
+ /usr/local/lib${LIB_SUFFIX}
+ /usr/lib${LIB_SUFFIX}
/sw/lib
/opt/local/lib
/opt/csw/lib
diff --git a/python/PyAlembic/CMakeLists.txt b/python/PyAlembic/CMakeLists.txt
index 264b7ac..adbbc45 100644
--- a/python/PyAlembic/CMakeLists.txt
+++ b/python/PyAlembic/CMakeLists.txt
@@ -45,6 +45,10 @@ IF (Boost_PYTHON_LIBRARY AND ALEMBIC_PYTHON_LIBRARY)
ADD_DEFINITIONS(-Wno-unused-local-typedefs)
ENDIF()

+ IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default")
+ ENDIF()
+
SET(CPP_FILES
PyAbcCoreLayer.cpp
PyAbcGeomTypes.cpp
26 changes: 26 additions & 0 deletions media-gfx/alembic/files/alembic-1.7.9-prman.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/cmake/AlembicPRMan.cmake b/cmake/AlembicPRMan.cmake
index e02b237..fdbf26c 100644
--- a/cmake/AlembicPRMan.cmake
+++ b/cmake/AlembicPRMan.cmake
@@ -66,8 +66,8 @@ ELSE()
ENDIF()

# Prefer PRMAN_ROOT set from the environment over the CMakeCache'd variable
-IF(NOT $ENV{PRMAN_ROOT}x STREQUAL "x")
- SET( ALEMBIC_PRMAN_ROOT $ENV{PRMAN_ROOT})
+IF(NOT $ENV{RMANTREE}x STREQUAL "x")
+ SET( ALEMBIC_PRMAN_ROOT $ENV{RMANTREE})
ENDIF()


diff --git a/prman/Procedural/CMakeLists.txt b/prman/Procedural/CMakeLists.txt
index 6b46e91..0cb2aa6 100644
--- a/prman/Procedural/CMakeLists.txt
+++ b/prman/Procedural/CMakeLists.txt
@@ -65,5 +65,5 @@ set_target_properties(AlembicRiProcedural PROPERTIES
INSTALL(TARGETS
AlembicRiProcedural
DESTINATION
- prman/procedurals
+ $ENV{RMANTREE}/lib/plugins
)
18 changes: 17 additions & 1 deletion media-gfx/alembic/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,25 @@
developed by Sony Pictures Imageworks Inc. and Lucasfilm Ltd.
</longdescription>
<use>
<flag name="arnold" restrict="&gt;=media-gfx/alembic-1.7.9">
Add support for arnold renderer (experimental)
</flag>
<flag name="boost">Use <pkg>dev-libs/boost</pkg> library</flag>
<flag name="examples">Install alembic examples</flag>
<flag name="hdf5">Add support <pkg>sci-libs/hdf5</pkg></flag>
<flag name="pyalembic">Build pyalembic python bindings (needs <pkg>dev-python/pyilmbase</pkg>)</flag>
<flag name="maya" restrict="&gt;=media-gfx/alembic-1.7.9">
Compile Alembic plugin for Maya (experimental)
</flag>
<flag name="prman" restrict="&gt;=media-gfx/alembic-1.7.9">
Compile Alembic plugin for Renderman (experimental)
</flag>
<flag name="pyalembic" restrict="&lt;media-gfx/alembic-1.7.9">
<!-- renamed to python in 1.7.9 -->
Build pyalembic python bindings (needs <pkg>dev-python/pyilmbase</pkg>)
</flag>
<flag name="python" restrict="&gt;=media-gfx/alembic-1.7.9">
Build pyalembic python bindings (needs <pkg>dev-python/pyilmbase</pkg>)
</flag>
<flag name="test">Build and run the test-suite</flag>
<flag name="zlib">Use <pkg>sys-libs/zlib</pkg> for compressions</flag>
</use>
Expand Down

0 comments on commit dad8a85

Please sign in to comment.