diff --git a/media-libs/draco/draco-1.5.6.recipe b/media-libs/draco/draco-1.5.6.recipe new file mode 100644 index 000000000..30f439b2a --- /dev/null +++ b/media-libs/draco/draco-1.5.6.recipe @@ -0,0 +1,96 @@ +SUMMARY="A library for compressing and decompressing 3D geometric meshes and point clouds" +DESCRIPTION="Draco is a library for compressing and decompressing 3D geometric meshes and \ +point clouds. It is intended to improve the storage and transmission of 3D \ +graphics." +HOMEPAGE="https://github.com/google/draco/" +COPYRIGHT="1997-2022 Sam Lantinga" +LICENSE="Apache v2" +REVISION="1" +SOURCE_URI="$HOMEPAGE/archive/refs/tags/$portVersion.tar.gz" +CHECKSUM_SHA256="0280888e5b8e4c4fb93bf40e65e4e8a1ba316a0456f308164fb5c2b2b0c282d6" +SOURCE_FILENAME="draco-$portVersion.tar.gz" +SOURCE_DIR="draco-$portVersion" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +commandBinDir=$binDir +commandSuffix=$secondaryArchSuffix +if [ "$targetArchitecture" = x86_gcc2 ]; then + commandSuffix= + commandBinDir=$prefix/bin +fi + +PROVIDES=" + draco$secondaryArchSuffix = $portVersion + lib:libdraco$secondaryArchSuffix = 8.0.0 compat >= 8 + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libstdc++$secondaryArchSuffix + " + +PROVIDES_devel=" + draco${secondaryArchSuffix}_devel = $portVersion + devel:libdraco$secondaryArchSuffix = 8.0.0 compat >= 8 + " +REQUIRES_devel=" + draco$secondaryArchSuffix == $portVersion base + " + +PROVIDES_tools=" + draco${secondaryArchSuffix}_tools + cmd:draco_decoder$commandSuffix + cmd:draco_decoder_$portVersion$commandSuffix + cmd:draco_encoder$commandSuffix + cmd:draco_encoder_$portVersion$commandSuffix + " +REQUIRES_tools=" + draco$secondaryArchSuffix == $portVersion base + haiku$secondaryArchSuffix + lib:libstdc++$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:ninja + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + cmake -S. -Bbuild -GNinja $cmakeDirArgs \ + -DCMAKE_INSTALL_BINDIR=$commandBinDir \ + -DCMAKE_UNITY_BUILD=ON \ + -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=ON + ninja -C build +} + +INSTALL() +{ + ninja -C build install + + mv $libDir/libdraco.a . + + # devel package + prepareInstalledDevelLibs \ + libdraco + + mv libdraco.a $developLibDir + + fixPkgconfig + + packageEntries devel \ + $developDir \ + $dataDir/cmake + packageEntries tools \ + $commandBinDir + +}