diff --git a/media-libs/rubberband/patches/rubberband-4.0.0.patchset b/media-libs/rubberband/patches/rubberband-4.0.0.patchset new file mode 100644 index 000000000..09b40dd50 --- /dev/null +++ b/media-libs/rubberband/patches/rubberband-4.0.0.patchset @@ -0,0 +1,22 @@ +From e0e931b80e73cc6e05b8d09c574bae79f69cb633 Mon Sep 17 00:00:00 2001 +From: Luc Schrijvers +Date: Fri, 18 Jul 2025 10:53:44 +0200 +Subject: sincos and sincosf are not defined in Haiku + + +diff --git a/src/common/VectorOpsComplex.h b/src/common/VectorOpsComplex.h +index 3be1baa..7ebbf73 100644 +--- a/src/common/VectorOpsComplex.h ++++ b/src/common/VectorOpsComplex.h +@@ -48,7 +48,7 @@ inline void c_phasor(T *real, T *imag, T phase) + *real = cos(phase); + *imag = sin(phase); + } +-#elif defined __GNUC__ ++#elif defined __GNUC__ && !defined __HAIKU__ + if (sizeof(T) == sizeof(float)) { + sincosf(phase, (float *)imag, (float *)real); + } else { +-- +2.48.1 + diff --git a/media-libs/rubberband/rubberband4-4.0.0.recipe b/media-libs/rubberband/rubberband4-4.0.0.recipe new file mode 100644 index 000000000..dd801c891 --- /dev/null +++ b/media-libs/rubberband/rubberband4-4.0.0.recipe @@ -0,0 +1,107 @@ +SUMMARY="An audio time-stretching and pitch-shifting library" +DESCRIPTION="Rubber Band is a library and utility program that permits \ +changing the tempo and pitch of an audio recording independently of one \ +another." +HOMEPAGE="https://www.breakfastquay.com/rubberband/" +COPYRIGHT="2007-2024 Particular Programs Ltd" +LICENSE="GNU GPL v2" +REVISION="1" +SOURCE_URI="https://breakfastquay.com/files/releases/rubberband-$portVersion.tar.bz2" +CHECKSUM_SHA256="af050313ee63bc18b35b2e064e5dce05b276aaf6d1aa2b8a82ced1fe2f8028e9" +SOURCE_DIR="rubberband-$portVersion" +PATCHES="rubberband-$portVersion.patchset" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +commandSuffix=$secondaryArchSuffix +commandBinDir=$binDir +relativeCommandBinDir=$relativeBinDir +if [ "$targetArchitecture" = x86_gcc2 ]; then + commandSuffix= + commandBinDir=$prefix/bin + relativeCommandBinDir=bin +fi + +libVersion="3.0.0" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" + +PROVIDES=" + rubberband4$secondaryArchSuffix = $portVersion + cmd:rubberband$commandSuffix = $portVersion + cmd:rubberband_r3$commandSuffix = $portVersion + lib:librubberband$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libfftw3$secondaryArchSuffix + lib:libsamplerate$secondaryArchSuffix + lib:libsndfile$secondaryArchSuffix + lib:libvamp_sdk$secondaryArchSuffix + " + +PROVIDES_devel=" + rubberband4${secondaryArchSuffix}_devel = $portVersion + devel:librubberband$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + rubberband4$secondaryArchSuffix == $portVersion base + " +CONFLICTS_devel=" + rubberband${secondaryArchSuffix}_devel + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libboost_system$secondaryArchSuffix >= 1.88.0 + devel:libfftw3$secondaryArchSuffix + devel:libsamplerate$secondaryArchSuffix + devel:libsndfile$secondaryArchSuffix + devel:libvamp_sdk$secondaryArchSuffix + ladspa_sdk${secondaryArchSuffix}_devel + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:meson + cmd:ninja + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + meson Build \ + --buildtype=release \ + --prefix="$prefix" \ + --bindir="$binDir" \ + --libdir="$libDir" \ + --includedir="$includeDir" \ + --datadir="$dataDir" \ + --mandir="$manDir" \ + -D default_library=shared \ + -D fft=fftw \ + -D resampler=libsamplerate \ + -D jni=disabled + + ninja -C Build +} + +INSTALL() +{ + ninja -C Build install + + # remove static library + rm -f $libDir/librubberband.a + + prepareInstalledDevelLibs librubberband + fixPkgconfig + + # devel package + packageEntries devel \ + $developDir +} + +TEST() +{ + ninja -C Build test +}