From d837bc6664dfb9836c1ba5334532739e0b39c49d Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 11 Jan 2025 21:06:43 +0100 Subject: [PATCH] Import android-*-jbigkit from AUR and fix linker flags --- jbigkit/android-aarch64/PKGBUILD | 39 ++++++++++++++++++++++++++++ jbigkit/android-armv7a-eabi/PKGBUILD | 39 ++++++++++++++++++++++++++++ jbigkit/android-x86-64/PKGBUILD | 39 ++++++++++++++++++++++++++++ jbigkit/android-x86/PKGBUILD | 39 ++++++++++++++++++++++++++++ 4 files changed, 156 insertions(+) create mode 100644 jbigkit/android-aarch64/PKGBUILD create mode 100644 jbigkit/android-armv7a-eabi/PKGBUILD create mode 100644 jbigkit/android-x86-64/PKGBUILD create mode 100644 jbigkit/android-x86/PKGBUILD diff --git a/jbigkit/android-aarch64/PKGBUILD b/jbigkit/android-aarch64/PKGBUILD new file mode 100644 index 00000000..c3e40399 --- /dev/null +++ b/jbigkit/android-aarch64/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Gonzalo Exequiel Pedone +# Contributor: Sergej Pupykin +# Contributor: Angel 'angvp' Velasquez +# Contributor: Frank Ickstadt (frank dot ickstadt at gmail dot com) + +_android_arch=aarch64 + +pkgname=android-${_android_arch}-jbigkit +pkgver=2.1 +pkgrel=1 +arch=('any') +pkgdesc="Data compression library/utilities for bi-level high-resolution images (Android ${_android_arch})" +url="https://www.cl.cam.ac.uk/~mgk25/jbigkit/" +license=('GPL-2.0-or-later') +depends=('android-ndk') +makedepends=('android-environment') +options=(!strip !buildflags staticlibs !emptydirs) +source=("https://www.cl.cam.ac.uk/~mgk25/download/jbigkit-$pkgver.tar.gz") +md5sums=('ebcf09bed9f14d7fa188d3bd57349522') + +build() { + cd "${srcdir}/jbigkit-$pkgver" + source android-env ${_android_arch} + + make -C libjbig $MAKEFLAGS CC=${ANDROID_CC} CFLAGS="${ANDROID_CFLAGS} -fPIC" libjbig.a libjbig85.a + ${ANDROID_CC} -shared -o libjbig/libjbig.so libjbig/jbig.o libjbig/jbig_ar.o ${ANDROID_LDFLAGS} + ${ANDROID_CC} -shared -o libjbig/libjbig85.so libjbig/jbig85.o libjbig/jbig_ar.o ${ANDROID_LDFLAGS} +} + +package() { + cd "${srcdir}/jbigkit-$pkgver" + source android-env ${_android_arch} + + install -vDm 644 libjbig/*.h -t "$pkgdir/${ANDROID_PREFIX_INCLUDE}/" + install -vDm 755 libjbig/*.so -t "$pkgdir/${ANDROID_PREFIX_LIB}/" + install -vDm 755 libjbig/*.a -t "$pkgdir/${ANDROID_PREFIX_LIB}/" + ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so + ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a +} diff --git a/jbigkit/android-armv7a-eabi/PKGBUILD b/jbigkit/android-armv7a-eabi/PKGBUILD new file mode 100644 index 00000000..2225dc14 --- /dev/null +++ b/jbigkit/android-armv7a-eabi/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Gonzalo Exequiel Pedone +# Contributor: Sergej Pupykin +# Contributor: Angel 'angvp' Velasquez +# Contributor: Frank Ickstadt (frank dot ickstadt at gmail dot com) + +_android_arch=armv7a-eabi + +pkgname=android-${_android_arch}-jbigkit +pkgver=2.1 +pkgrel=1 +arch=('any') +pkgdesc="Data compression library/utilities for bi-level high-resolution images (Android ${_android_arch})" +url="https://www.cl.cam.ac.uk/~mgk25/jbigkit/" +license=('GPL-2.0-or-later') +depends=('android-ndk') +makedepends=('android-environment') +options=(!strip !buildflags staticlibs !emptydirs) +source=("https://www.cl.cam.ac.uk/~mgk25/download/jbigkit-$pkgver.tar.gz") +md5sums=('ebcf09bed9f14d7fa188d3bd57349522') + +build() { + cd "${srcdir}/jbigkit-$pkgver" + source android-env ${_android_arch} + + make -C libjbig $MAKEFLAGS CC=${ANDROID_CC} CFLAGS="${ANDROID_CFLAGS} -fPIC" libjbig.a libjbig85.a + ${ANDROID_CC} -shared -o libjbig/libjbig.so libjbig/jbig.o libjbig/jbig_ar.o ${ANDROID_LDFLAGS} + ${ANDROID_CC} -shared -o libjbig/libjbig85.so libjbig/jbig85.o libjbig/jbig_ar.o ${ANDROID_LDFLAGS} +} + +package() { + cd "${srcdir}/jbigkit-$pkgver" + source android-env ${_android_arch} + + install -vDm 644 libjbig/*.h -t "$pkgdir/${ANDROID_PREFIX_INCLUDE}/" + install -vDm 755 libjbig/*.so -t "$pkgdir/${ANDROID_PREFIX_LIB}/" + install -vDm 755 libjbig/*.a -t "$pkgdir/${ANDROID_PREFIX_LIB}/" + ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so + ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a +} diff --git a/jbigkit/android-x86-64/PKGBUILD b/jbigkit/android-x86-64/PKGBUILD new file mode 100644 index 00000000..4a5d01e0 --- /dev/null +++ b/jbigkit/android-x86-64/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Gonzalo Exequiel Pedone +# Contributor: Sergej Pupykin +# Contributor: Angel 'angvp' Velasquez +# Contributor: Frank Ickstadt (frank dot ickstadt at gmail dot com) + +_android_arch=x86-64 + +pkgname=android-${_android_arch}-jbigkit +pkgver=2.1 +pkgrel=1 +arch=('any') +pkgdesc="Data compression library/utilities for bi-level high-resolution images (Android ${_android_arch})" +url="https://www.cl.cam.ac.uk/~mgk25/jbigkit/" +license=('GPL-2.0-or-later') +depends=('android-ndk') +makedepends=('android-environment') +options=(!strip !buildflags staticlibs !emptydirs) +source=("https://www.cl.cam.ac.uk/~mgk25/download/jbigkit-$pkgver.tar.gz") +md5sums=('ebcf09bed9f14d7fa188d3bd57349522') + +build() { + cd "${srcdir}/jbigkit-$pkgver" + source android-env ${_android_arch} + + make -C libjbig $MAKEFLAGS CC=${ANDROID_CC} CFLAGS="${ANDROID_CFLAGS} -fPIC" libjbig.a libjbig85.a + ${ANDROID_CC} -shared -o libjbig/libjbig.so libjbig/jbig.o libjbig/jbig_ar.o ${ANDROID_LDFLAGS} + ${ANDROID_CC} -shared -o libjbig/libjbig85.so libjbig/jbig85.o libjbig/jbig_ar.o ${ANDROID_LDFLAGS} +} + +package() { + cd "${srcdir}/jbigkit-$pkgver" + source android-env ${_android_arch} + + install -vDm 644 libjbig/*.h -t "$pkgdir/${ANDROID_PREFIX_INCLUDE}/" + install -vDm 755 libjbig/*.so -t "$pkgdir/${ANDROID_PREFIX_LIB}/" + install -vDm 755 libjbig/*.a -t "$pkgdir/${ANDROID_PREFIX_LIB}/" + ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so + ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a +} diff --git a/jbigkit/android-x86/PKGBUILD b/jbigkit/android-x86/PKGBUILD new file mode 100644 index 00000000..c8aa7303 --- /dev/null +++ b/jbigkit/android-x86/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Gonzalo Exequiel Pedone +# Contributor: Sergej Pupykin +# Contributor: Angel 'angvp' Velasquez +# Contributor: Frank Ickstadt (frank dot ickstadt at gmail dot com) + +_android_arch=x86 + +pkgname=android-${_android_arch}-jbigkit +pkgver=2.1 +pkgrel=1 +arch=('any') +pkgdesc="Data compression library/utilities for bi-level high-resolution images (Android ${_android_arch})" +url="https://www.cl.cam.ac.uk/~mgk25/jbigkit/" +license=('GPL-2.0-or-later') +depends=('android-ndk') +makedepends=('android-environment') +options=(!strip !buildflags staticlibs !emptydirs) +source=("https://www.cl.cam.ac.uk/~mgk25/download/jbigkit-$pkgver.tar.gz") +md5sums=('ebcf09bed9f14d7fa188d3bd57349522') + +build() { + cd "${srcdir}/jbigkit-$pkgver" + source android-env ${_android_arch} + + make -C libjbig $MAKEFLAGS CC=${ANDROID_CC} CFLAGS="${ANDROID_CFLAGS} -fPIC" libjbig.a libjbig85.a + ${ANDROID_CC} -shared -o libjbig/libjbig.so libjbig/jbig.o libjbig/jbig_ar.o ${ANDROID_LDFLAGS} + ${ANDROID_CC} -shared -o libjbig/libjbig85.so libjbig/jbig85.o libjbig/jbig_ar.o ${ANDROID_LDFLAGS} +} + +package() { + cd "${srcdir}/jbigkit-$pkgver" + source android-env ${_android_arch} + + install -vDm 644 libjbig/*.h -t "$pkgdir/${ANDROID_PREFIX_INCLUDE}/" + install -vDm 755 libjbig/*.so -t "$pkgdir/${ANDROID_PREFIX_LIB}/" + install -vDm 755 libjbig/*.a -t "$pkgdir/${ANDROID_PREFIX_LIB}/" + ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so + ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a +}