aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2019-05-31 19:44:50 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2019-06-05 07:49:45 +0000
commit7dab0ff3a5399a14593df477754e67bd9e4a7a1a (patch)
treed5de240f17e9a32d6539906792361579e594a662
parent10eae1348ae2afb7b1f97e4902e4c82f0213a0ce (diff)
downloadaports-7dab0ff3a5399a14593df477754e67bd9e4a7a1a.tar.gz
aports-7dab0ff3a5399a14593df477754e67bd9e4a7a1a.tar.bz2
aports-7dab0ff3a5399a14593df477754e67bd9e4a7a1a.tar.xz
main/soxr: add -static subpackages
fixes #10531
-rw-r--r--main/soxr/APKBUILD33
1 files changed, 24 insertions, 9 deletions
diff --git a/main/soxr/APKBUILD b/main/soxr/APKBUILD
index 8d3026ac7e..347a6833a3 100644
--- a/main/soxr/APKBUILD
+++ b/main/soxr/APKBUILD
@@ -2,34 +2,49 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=soxr
pkgver=0.1.3
-pkgrel=0
+pkgrel=1
pkgdesc="High quality, one-dimensional sample-rate conversion library"
url="https://sourceforge.net/projects/soxr"
arch="all"
license="LGPL-2.1-or-later"
-depends=""
depends_dev="cmake"
makedepends="$depends_dev"
-install=""
-subpackages="$pkgname-doc $pkgname-dev"
+subpackages="$pkgname-doc $pkgname-static $pkgname-dev"
source="$pkgname-$pkgver.tar.xz::https://sourceforge.net/projects/$pkgname/files/$pkgname-$pkgver-Source.tar.xz/download"
builddir="$srcdir/$pkgname-$pkgver-Source"
build() {
- cd "$builddir"
- cmake . \
+ mkdir -p "$builddir"/static "$builddir"/shared
+
+ # We can't build the static and shared libs in one go, so build them one by one...
+ cd "$builddir"/static
+ cmake \
+ -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+ -DBUILD_SHARED_LIBS=False \
+ -DBUILD_TESTS=ON \
+ ..
+ make
+
+ cd "$builddir"/shared
+ cmake \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
- -DBUILD_TESTS=ON
+ -DBUILD_SHARED_LIBS=True \
+ -DBUILD_TESTS=ON \
+ ..
make
}
check() {
- cd "$builddir"
+ cd "$builddir"/static
+ make test
+ cd "$builddir"/shared
make test
}
package() {
- cd "$builddir"
+ cd "$builddir"/static
+ make DESTDIR="$pkgdir" install
+ cd "$builddir"/shared
make DESTDIR="$pkgdir" install
}