38 lines
934 B
Plaintext
38 lines
934 B
Plaintext
# Description: Free Lossless Audio Codec.
|
|
# URL: https://xiph.org/flac/
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
# Depends on: libogg
|
|
|
|
name=flac
|
|
version=1.4.1
|
|
release=1
|
|
source=(https://downloads.xiph.org/releases/flac/$name-$version.tar.xz)
|
|
|
|
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
|
|
}
|
|
|
|
build() {
|
|
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" \
|
|
-D BUILD_SHARED_LIBS=ON \
|
|
-D BUILD_EXAMPLES=OFF \
|
|
-D BUILD_TESTING=OFF \
|
|
-Wno-dev
|
|
cmake --build build
|
|
DESTDIR=$PKG cmake --install build
|
|
}
|