diff --git a/media-gfx/basisu/basisu-2.10.recipe b/media-gfx/basisu/basisu-2.10.recipe new file mode 100644 index 000000000..e37e9bd02 --- /dev/null +++ b/media-gfx/basisu/basisu-2.10.recipe @@ -0,0 +1,50 @@ +SUMMARY="Basis Universal GPU Texture Codec" +DESCRIPTION="Basis Universal is an open source supercompressed LDR/HDR GPU compressed texture interchange system from Binomial LLC that supports \ +two intermediate file formats: the .KTX2 open standard from the Khronos Group, and our own ".basis" file format. +These file formats support rapid transcoding to virtually any compressed GPU texture format released in the past ~25 years." +HOMEPAGE="https://github.com/BinomialLLC/basis_universal" +COPYRIGHT="2019-2026 Binomial LLC" +LICENSE="Apache v2" +REVISION="1" +SOURCE_URI="https://github.com/BinomialLLC/basis_universal/archive/refs/tags/v2_1_0.tar.gz" +CHECKSUM_SHA256="ee1dbeb4c16699b577a0c78dce337bbede268e04bd2d463946971f8cb1e9c8df" +PATCHES="basisu-$portVersion.patchset" +SOURCE_DIR="basis_universal-2_1_0" + +ARCHITECTURES="all ?x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + basisu$secondaryArchSuffix = $portVersion + cmd:basisu = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + #lib:libopencl$secondaryArchSuffix # Optional, OpenCL support + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + #devel:libopencl$secondaryArchSuffix # Optional, OpenCL support + #devel:libopencl_headers$secondaryArchSuffix # Optional, OpenCL support + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:make + " + +BUILD() +{ + cmake . -DCMAKE_BUILD_TYPE=Release -DEXAMPLES=OFF #-DOPENCL=ON + + make $jobArgs +} + +INSTALL() +{ + mkdir -p $prefix/bin && cp -t $prefix/bin bin/basisu + + # Pack docs + mkdir -p $docDir && cp -t $docDir README.md +} diff --git a/media-gfx/basisu/patches/basisu-2.10.patchset b/media-gfx/basisu/patches/basisu-2.10.patchset new file mode 100644 index 000000000..31f93b6b3 --- /dev/null +++ b/media-gfx/basisu/patches/basisu-2.10.patchset @@ -0,0 +1,22 @@ +From d4033d8b2c14bc17d0ee9a04f86cc6b64726356d Mon Sep 17 00:00:00 2001 +From: Peppersawce +Date: Sat, 17 Jan 2026 14:47:11 +0100 +Subject: Haiku fix + + +diff --git a/encoder/basisu_enc.cpp b/encoder/basisu_enc.cpp +index cccf66c..b5e3cdf 100644 +--- a/encoder/basisu_enc.cpp ++++ b/encoder/basisu_enc.cpp +@@ -289,7 +289,7 @@ namespace basisu + { + QueryPerformanceFrequency(reinterpret_cast(pTicks)); + } +-#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__EMSCRIPTEN__) ++#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__EMSCRIPTEN__) || defined(__HAIKU__) + #include + inline void query_counter(timer_ticks* pTicks) + { +-- +2.52.0 +