mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
alembic, cleanup, build fixes, correct install paths (#8232)
This commit is contained in:
@@ -22,7 +22,7 @@ COPYRIGHT="2009-2016 Sony Pictures Imageworks
|
||||
2016-2018 Blizzard Entertainment, Inc.
|
||||
2018 J Cube, Inc."
|
||||
LICENSE="ALEMBIC"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/alembic/alembic/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="b0bc74833bff118a869e81e6acb810a58797e77ef63143954b2f8e817c7f65cb"
|
||||
SOURCE_FILENAME="alembic-$portVersion.tar.gz"
|
||||
@@ -31,11 +31,6 @@ PATCHES="alembic-$portVersion.patchset"
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
commandBinDir=$binDir
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
@@ -70,7 +65,7 @@ REQUIRES_devel="
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libboost_program_options$secondaryArchSuffix
|
||||
devel:libboost_program_options$secondaryArchSuffix >= 1.70.0
|
||||
devel:libhdf5$secondaryArchSuffix
|
||||
devel:libIlmThread_3_0$secondaryArchSuffix
|
||||
devel:libImath_3_0$secondaryArchSuffix
|
||||
@@ -85,57 +80,38 @@ BUILD_PREREQUIRES="
|
||||
|
||||
defineDebugInfoPackage alembic$secondaryArchSuffix \
|
||||
$libDir/libAlembic.so.$portVersion \
|
||||
$commandBinDir/abcconvert \
|
||||
$commandBinDir/abcdiff \
|
||||
$commandBinDir/abcecho \
|
||||
$commandBinDir/abcechobounds \
|
||||
$commandBinDir/abcls \
|
||||
$commandBinDir/abcstitcher \
|
||||
$commandBinDir/abctree
|
||||
$prefix/bin/abcconvert \
|
||||
$prefix/bin/abcdiff \
|
||||
$prefix/bin/abcecho \
|
||||
$prefix/bin/abcechobounds \
|
||||
$prefix/bin/abcls \
|
||||
$prefix/bin/abcstitcher \
|
||||
$prefix/bin/abctree
|
||||
|
||||
PATCH()
|
||||
{
|
||||
if [ -n "$secondaryArchSuffix" ]; then
|
||||
sed -i \
|
||||
-e "s|\(DESTINATION\) lib|\1 $relativeLibDir|;" \
|
||||
-e "s|\(ConfigPackageLocation\) lib/cmake/|\1 $relativeLibDir/cmake/|;" \
|
||||
lib/Alembic/CMakeLists.txt
|
||||
fi
|
||||
sed -i -e "s|\(DESTINATION\) include|\1 $relativeIncludeDir|;" \
|
||||
lib/Alembic/{Abc*,Ogawa,Util}/CMakeLists.txt
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
export ILMBASE_INC_DIR="`finddir B_SYSTEM_DIRECTORY`/$relativeIncludeDir/OpenEXR"
|
||||
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DUSE_HDF5=ON \
|
||||
-DALEMBIC_LIB_USES_BOOST=ON \
|
||||
$cmakeDirArgs
|
||||
|
||||
make $jobArgs
|
||||
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=$prefix \
|
||||
-DALEMBIC_LIB_INSTALL_DIR=$libDir \
|
||||
-DConfigPackageLocation=$libDir/cmake/Alembic \
|
||||
-DUSE_HDF5=ON
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
|
||||
mkdir -p $includeDir
|
||||
mv $prefix/include/* $includeDir/
|
||||
rm -rf $prefix/include
|
||||
mv $prefix/lib $prefix/lib2
|
||||
mkdir -p $libDir/cmake
|
||||
mv $prefix/lib2/* $libDir
|
||||
rm -rf $prefix/lib2
|
||||
make -C build install
|
||||
|
||||
prepareInstalledDevelLib libAlembic
|
||||
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
|
||||
Reference in New Issue
Block a user