mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 23:18:58 +02:00
103 lines
2.7 KiB
Bash
103 lines
2.7 KiB
Bash
SUMMARY="The free lossless audio codec"
|
|
DESCRIPTION="FLAC stands for Free Lossless Audio Codec, an audio format \
|
|
similar to MP3, but lossless, meaning that audio is compressed in FLAC \
|
|
without any loss in quality. This is similar to how Zip works, except with \
|
|
FLAC you will get much better compression because it is designed specifically \
|
|
for audio, and you can play back compressed FLAC files in your favorite player \
|
|
(or your car or home stereo) just like you would an MP3 file."
|
|
HOMEPAGE="http://flac.sourceforge.net/"
|
|
COPYRIGHT="2000-2007 Josh Coalson"
|
|
LICENSE="GNU LGPL v2.1
|
|
GNU GPL v2
|
|
BSD (3-clause)"
|
|
REVISION="1"
|
|
SOURCE_URI="http://downloads.xiph.org/releases/flac/flac-$portVersion.tar.xz"
|
|
CHECKSUM_SHA256="6c58e69cd22348f441b861092b825e591d0b822e106de6eb0ee4d05d27205b70"
|
|
PATCHES="flac-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="all"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
flac$secondaryArchSuffix = $portVersion compat >= 1
|
|
lib:libFLAC$secondaryArchSuffix = 12.1.0 compat >= 12
|
|
lib:libFLAC++$secondaryArchSuffix = 10.0.1 compat >= 10
|
|
"
|
|
if [ -z "$secondaryArchSuffix" ]; then
|
|
PROVIDES="$PROVIDES
|
|
cmd:flac$secondaryArchSuffix
|
|
cmd:metaflac$secondaryArchSuffix
|
|
"
|
|
fi
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libogg$secondaryArchSuffix
|
|
lib:libstdc++$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
flac${secondaryArchSuffix}_devel = $portVersion compat >= 1
|
|
devel:libFLAC$secondaryArchSuffix = 12.1.0 compat >= 12
|
|
devel:libFLAC++$secondaryArchSuffix = 10.0.1 compat >= 10
|
|
"
|
|
REQUIRES_devel="
|
|
flac$secondaryArchSuffix == $portVersion base
|
|
devel:libogg$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libogg$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:ninja
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
TEST_REQUIRES="
|
|
cmd:cmp
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
|
|
mkdir -p builddir
|
|
cp /boot/system/develop/headers/c++/2.95.3/iostream.h builddir/
|
|
sed -i 's/_G_HAVE_BOOL/0/g' builddir/iostream.h
|
|
export CPPFLAGS="-include iostream.h"
|
|
additionalArgs="-DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF"
|
|
fi
|
|
cmake -S. -Bbuilddir -GNinja \
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DWITH_STACK_PROTECTOR=OFF \
|
|
$cmakeDirArgs $additionalArgs
|
|
ninja -C builddir $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
ninja -C builddir install
|
|
|
|
install -Dm 644 src/*/*.m4 -t $dataDir/aclocal
|
|
|
|
if [ -n "$secondaryArchSuffix" ]; then
|
|
rm -rf $binDir $documentationDir
|
|
fi
|
|
prepareInstalledDevelLibs libFLAC libFLAC++
|
|
fixPkgconfig
|
|
|
|
# devel package
|
|
packageEntries devel \
|
|
$dataDir \
|
|
$developDir \
|
|
$libDir/cmake
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
FLAC__TEST_LEVEL=0 ninja -C builddir test
|
|
}
|