mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
80 lines
2.1 KiB
Bash
80 lines
2.1 KiB
Bash
SUMMARY="Samplerate converter for audio"
|
|
DESCRIPTION="Secret Rabbit Code (aka libsamplerate) is a samplerate \
|
|
converter for audio. One example of where such a thing would be useful is \
|
|
converting audio from the CD sample rate of 44.1kHz to the 48kHz sample rate \
|
|
used by DAT players.
|
|
|
|
SRC is capable of arbitrary and time varying conversions, from downsampling \
|
|
by a factor of 256 to upsampling by the same factor. Arbitrary in this case \
|
|
means that the ratio of input and output sample rates can be an irrational \
|
|
number. The conversion ratio can also vary with time for speeding up and \
|
|
slowing down effects."
|
|
HOMEPAGE="http://libsndfile.github.io/libsamplerate/"
|
|
COPYRIGHT="2002-2021 Erik de Castro Lopo"
|
|
LICENSE="BSD (2-clause)"
|
|
REVISION="2"
|
|
SOURCE_URI="https://github.com/libsndfile/libsamplerate/releases/download/$portVersion/libsamplerate-$portVersion.tar.xz"
|
|
CHECKSUM_SHA256="3258da280511d24b49d6b08615bbe824d0cacc9842b0e4caf11c52cf2b043893"
|
|
PATCHES="libsamplerate-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libVersion="$portVersion"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
libsamplerate$secondaryArchSuffix = $portVersion compat >= 0
|
|
cmd:sndfile_resample$secondaryArchSuffix
|
|
lib:libsamplerate$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
libsamplerate${secondaryArchSuffix}_devel = $portVersion compat >= 0
|
|
devel:libsamplerate$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
libsamplerate$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
cmake -Bbuild -S. $cmakeDirArgs \
|
|
-DCMAKE_BUILD_TYPE='Release' \
|
|
-DBUILD_SHARED_LIBS=TRUE
|
|
make -C build $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make -C build install
|
|
|
|
prepareInstalledDevelLib libsamplerate
|
|
fixPkgconfig
|
|
|
|
# devel package
|
|
packageEntries devel \
|
|
$developDir \
|
|
$documentationDir \
|
|
$libDir/cmake
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
make test
|
|
}
|