1
0
forked from ports/opt
opt/flac/Pkgfile

38 lines
934 B
Plaintext
Raw Normal View History

2012-06-21 05:58:16 +10:00
# Description: Free Lossless Audio Codec.
# URL: https://xiph.org/flac/
2014-11-10 23:25:50 +11:00
# Maintainer: Danny Rawlins, crux at romster dot me
2006-02-23 15:26:10 +00:00
# Depends on: libogg
name=flac
2022-09-25 12:45:13 +02:00
version=1.4.1
2022-03-05 17:22:09 +01:00
release=1
source=(https://downloads.xiph.org/releases/flac/$name-$version.tar.xz)
2006-02-23 15:26:10 +00:00
2022-09-11 17:06:14 +02:00
unpack_source() {
mkdir $SRC/tarballs
for file in ${source[@]}; do
case ${file##*/} in
$name-$version.tar.xz)
echo "Unpacking $(get_filename $file)"
bsdtar -p -o -C $SRC -xf $(get_filename $file) ;;
*)
cp $(get_filename $file) $SRC ;;
esac
done
}
2006-02-23 15:26:10 +00:00
build() {
2022-03-05 18:12:16 +01:00
cmake -S $name-$version -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
2022-03-08 11:50:27 +01:00
-D BUILD_SHARED_LIBS=ON \
2022-03-05 18:12:16 +01:00
-D BUILD_EXAMPLES=OFF \
-D BUILD_TESTING=OFF \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
2006-02-23 15:26:10 +00:00
}