mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-13 03:09:51 +03:00
main/flac: Added static library
I made the shared build overwrite the installed files so people using cmake to find dependencies would default to the shared libraries. For people using direct linking or pkg-config, this doesn't effect them. Signed-off-by: Charadon <dev@iotib.net>
This commit is contained in:
parent
af41143c97
commit
253ee9b07f
1 changed files with 15 additions and 2 deletions
|
@ -1,13 +1,13 @@
|
||||||
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||||
pkgname=flac
|
pkgname=flac
|
||||||
pkgver=1.4.3
|
pkgver=1.4.3
|
||||||
pkgrel=1
|
pkgrel=2
|
||||||
pkgdesc="Free Lossless Audio Codec"
|
pkgdesc="Free Lossless Audio Codec"
|
||||||
url="https://xiph.org/flac/"
|
url="https://xiph.org/flac/"
|
||||||
arch="all"
|
arch="all"
|
||||||
license="BSD-3-Clause AND GPL-2.0-or-later"
|
license="BSD-3-Clause AND GPL-2.0-or-later"
|
||||||
options="!check" # Tests are infinite
|
options="!check" # Tests are infinite
|
||||||
subpackages="$pkgname-dev $pkgname-libs libflac libflac++:libpp $pkgname-doc"
|
subpackages="$pkgname-static $pkgname-dev $pkgname-libs libflac libflac++:libpp $pkgname-doc"
|
||||||
makedepends="cmake libogg-dev !libiconv samurai"
|
makedepends="cmake libogg-dev !libiconv samurai"
|
||||||
source="https://downloads.xiph.org/releases/flac/flac-$pkgver.tar.xz"
|
source="https://downloads.xiph.org/releases/flac/flac-$pkgver.tar.xz"
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ build() {
|
||||||
export CFLAGS="$CFLAGS -O3 -flto=auto"
|
export CFLAGS="$CFLAGS -O3 -flto=auto"
|
||||||
export CXXFLAGS="$CXXFLAGS -O3 -flto=auto"
|
export CXXFLAGS="$CXXFLAGS -O3 -flto=auto"
|
||||||
|
|
||||||
|
# Shared
|
||||||
cmake -B build -G Ninja \
|
cmake -B build -G Ninja \
|
||||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
-DCMAKE_BUILD_TYPE=None \
|
-DCMAKE_BUILD_TYPE=None \
|
||||||
|
@ -29,15 +30,27 @@ build() {
|
||||||
-DBUILD_EXAMPLES=OFF \
|
-DBUILD_EXAMPLES=OFF \
|
||||||
-DBUILD_SHARED_LIBS=ON \
|
-DBUILD_SHARED_LIBS=ON \
|
||||||
-DNDEBUG=ON
|
-DNDEBUG=ON
|
||||||
|
# Static
|
||||||
|
cmake -B build-static -G Ninja \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
|
-DCMAKE_BUILD_TYPE=None \
|
||||||
|
-DBUILD_TESTING=OFF \
|
||||||
|
-DBUILD_EXAMPLES=OFF \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
|
-DNDEBUG=ON
|
||||||
|
|
||||||
cmake --build build
|
cmake --build build
|
||||||
|
cmake --build build-static
|
||||||
}
|
}
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
ctest --test-dir build
|
ctest --test-dir build
|
||||||
|
ctest --test-dir build-static
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
|
# Static goes first, so it won't overwrite the shared version of files.
|
||||||
|
DESTDIR="$pkgdir" cmake --install build-static
|
||||||
DESTDIR="$pkgdir" cmake --install build
|
DESTDIR="$pkgdir" cmake --install build
|
||||||
|
|
||||||
install -Dm0644 COPYING.Xiph \
|
install -Dm0644 COPYING.Xiph \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue