Skip to content
Snippets Groups Projects
Commit 4b364c46 authored by Natanael Copa's avatar Natanael Copa
Browse files

main/brotli: build with cmake

the libtool does not work with cross-compile anymore
parent 7a0bcc47
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment