Skip to content

Commit

Permalink
Import android-*-jbigkit from AUR and fix linker flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Martchus committed Jan 11, 2025
1 parent 29198ee commit d837bc6
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 0 deletions.
39 changes: 39 additions & 0 deletions jbigkit/android-aarch64/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: Sergej Pupykin <[email protected]>
# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
# 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
}
39 changes: 39 additions & 0 deletions jbigkit/android-armv7a-eabi/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: Sergej Pupykin <[email protected]>
# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
# 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
}
39 changes: 39 additions & 0 deletions jbigkit/android-x86-64/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: Sergej Pupykin <[email protected]>
# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
# 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
}
39 changes: 39 additions & 0 deletions jbigkit/android-x86/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: Sergej Pupykin <[email protected]>
# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
# 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
}

0 comments on commit d837bc6

Please sign in to comment.