aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2021-01-05 19:50:03 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2021-01-05 21:21:08 +0100
commit4b364c46ad4faeafc35350e758cd14fb751cfe23 (patch)
treec7adbb84e99c6ef93b31794c9a4cb5711a87eefe
parent7a0bcc477d642993aef3c583ff05ce27cc191edf (diff)
downloadaports-4b364c46ad4faeafc35350e758cd14fb751cfe23.tar.gz
aports-4b364c46ad4faeafc35350e758cd14fb751cfe23.tar.bz2
aports-4b364c46ad4faeafc35350e758cd14fb751cfe23.tar.xz
main/brotli: build with cmake
the libtool does not work with cross-compile anymore
-rw-r--r--main/brotli/APKBUILD33
1 files changed, 22 insertions, 11 deletions
diff --git a/main/brotli/APKBUILD b/main/brotli/APKBUILD
index ad1171fc67..21624e5b9c 100644
--- a/main/brotli/APKBUILD
+++ b/main/brotli/APKBUILD
@@ -2,12 +2,12 @@
# Maintainer: prspkt <prspkt@protonmail.com>
pkgname=brotli
pkgver=1.0.9
-pkgrel=2
+pkgrel=3
pkgdesc="Generic lossless compressor"
url="https://github.com/google/brotli"
arch="all"
license="MIT"
-makedepends_build="automake autoconf libtool"
+makedepends_build="cmake"
if [ -z "$BOOTSTRAP" ]; then
makedepends_host="python3-dev"
python="py3-$pkgname:py3"
@@ -26,23 +26,34 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/google/brotli/archive/v$pkgv
prepare() {
default_prepare
sed -i 's,/usr/bin/env bash,/bin/sh,' tests/*.sh
- ./bootstrap
}
build() {
- ./configure \
- --build=$CBUILD \
- --host=$CHOST \
- --prefix=/usr \
- make
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake -B build \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DBUILD_STATIC_LIBS=False \
+ -DCMAKE_BUILD_TYPE=None \
+ $CMAKE_CROSSOPTS .
+ make -C build
+ if [ -z "$BOOTSTRAP" ]; then
+ python3 setup.py build
+ fi
}
check() {
- make check
+ make -C build test
+ if [ -z "$BOOTSTRAP" ]; then
+ python3 setup.py check
+ fi
}
package() {
- 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##*/}
@@ -51,7 +62,7 @@ package() {
py3() {
cd "$builddir"
- python3 setup.py install --prefix=/usr --root="$subpkgdir"
+ python3 setup.py install --prefix=/usr --root="$subpkgdir" --skip-build
}
sha512sums="b8e2df955e8796ac1f022eb4ebad29532cb7e3aa6a4b6aee91dbd2c7d637eee84d9a144d3e878895bb5e62800875c2c01c8f737a1261020c54feacf9f676b5f5 brotli-1.0.9.tar.gz