aboutsummaryrefslogtreecommitdiffstats
path: root/main/brotli
diff options
context:
space:
mode:
authorTBK <tbk@jjtc.eu>2020-04-29 21:34:01 +0200
committerAriadne Conill <ariadne@dereferenced.org>2020-04-30 17:11:53 +0000
commita75ccd8a5b69915e3b7590a7f6523e3bc67d709e (patch)
treebf73dbb6333eca46c87e573e6ec8ab5a79e6f0cf /main/brotli
parent9d421dcc1017d7e024403ec6cfa5d6a0ffd0bc8f (diff)
downloadaports-a75ccd8a5b69915e3b7590a7f6523e3bc67d709e.tar.bz2
aports-a75ccd8a5b69915e3b7590a7f6523e3bc67d709e.tar.xz
main/brotli: modernize
- Add "$pkgname-libs" to avoid installing "/usr/bin/brotli" - Patch to build tool against shared lib.
Diffstat (limited to 'main/brotli')
-rw-r--r--main/brotli/APKBUILD24
-rw-r--r--main/brotli/build-tool-against-shared-lib.patch16
2 files changed, 27 insertions, 13 deletions
diff --git a/main/brotli/APKBUILD b/main/brotli/APKBUILD
index 04da4600c2..e7944f2b24 100644
--- a/main/brotli/APKBUILD
+++ b/main/brotli/APKBUILD
@@ -2,17 +2,17 @@
# Maintainer: prspkt <prspkt@protonmail.com>
pkgname=brotli
pkgver=1.0.7
-pkgrel=4
+pkgrel=5
pkgdesc="Generic lossless compressor"
url="https://github.com/google/brotli"
arch="all"
license="MIT"
makedepends="cmake python3-dev"
-subpackages="$pkgname-doc $pkgname-static $pkgname-dev py3-$pkgname:py3"
+subpackages="$pkgname-doc $pkgname-static $pkgname-dev $pkgname-libs py3-$pkgname:py3"
source="$pkgname-$pkgver.tar.gz::https://github.com/google/brotli/archive/v$pkgver.tar.gz
optimize-mips-s390x.patch
+ build-tool-against-shared-lib.patch
"
-builddir="$srcdir/$pkgname-$pkgver"
prepare() {
default_prepare
@@ -20,28 +20,25 @@ prepare() {
}
build() {
- cd "$builddir"
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
- cmake \
+ cmake -B build \
+ -DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=True \
- -DCMAKE_BUILD_TYPE=None \
-DCMAKE_C_FLAGS="$CFLAGS" \
- ${CMAKE_CROSSOPTS}
- make
+ $CMAKE_CROSSOPTS
+ make -C build
}
check() {
- cd "$builddir"
- make test
+ make -C build test
}
package() {
- cd "$builddir"
- make DESTDIR="$pkgdir" install
+ make -C build DESTDIR="$pkgdir" install
local man; for man in docs/*.?; do
install -D -m644 $man "$pkgdir"/usr/share/man/man${man##*.}/${man##*/}
@@ -54,4 +51,5 @@ py3() {
}
sha512sums="a82362aa36d2f2094bca0b2808d9de0d57291fb3a4c29d7c0ca0a37e73087ec5ac4df299c8c363e61106fccf2fe7f58b5cf76eb97729e2696058ef43b1d3930a brotli-1.0.7.tar.gz
-59e934578ce23b703f8f25f56578f8e9fd1466a9844b6f67b542acd6496df352548e3762697dc3851cfd0f8e1bad170bfdaa3e8a87c901fe81e2f3042e3aee84 optimize-mips-s390x.patch"
+59e934578ce23b703f8f25f56578f8e9fd1466a9844b6f67b542acd6496df352548e3762697dc3851cfd0f8e1bad170bfdaa3e8a87c901fe81e2f3042e3aee84 optimize-mips-s390x.patch
+f4a7653a0f7ef69f059d7f744a48c7731c8e66f977ce2e66cd106f697e82aa1f005923898d216a3d8be143b2dc8db1927c09daedb981818e752640a333d75fbc build-tool-against-shared-lib.patch"
diff --git a/main/brotli/build-tool-against-shared-lib.patch b/main/brotli/build-tool-against-shared-lib.patch
new file mode 100644
index 0000000000..af7f2b3eeb
--- /dev/null
+++ b/main/brotli/build-tool-against-shared-lib.patch
@@ -0,0 +1,16 @@
+Upstream: no.
+Reason: Without it the tool is linked staticlly.
+ GH has an issue requesting an option to build against the shared lib.
+URL: https://github.com/google/brotli/issues/803
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -183,7 +183,7 @@
+
+ # Build the brotli executable
+ add_executable(brotli ${BROTLI_CLI_C})
+-target_link_libraries(brotli ${BROTLI_LIBRARIES_STATIC})
++target_link_libraries(brotli ${BROTLI_LIBRARIES})
+
+ # Installation
+ if(NOT BROTLI_BUNDLED_MODE)