diff options
author | Gonzalo Exequiel Pedone | 2024-02-08 18:39:15 -0300 |
---|---|---|
committer | Gonzalo Exequiel Pedone | 2024-02-08 18:39:15 -0300 |
commit | 75585af4bc2753d21b28fe76da0457db35fd5d49 (patch) | |
tree | de8e2b86ecec01f4d064ea717c002d62115bc713 | |
download | aur-75585af4bc2753d21b28fe76da0457db35fd5d49.tar.gz |
New package.
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | 0001-Fix-missing-declaration.patch | 11 | ||||
-rw-r--r-- | 0002-Force-x86-compile.patch | 11 | ||||
-rw-r--r-- | PKGBUILD | 54 |
5 files changed, 101 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..042253dec3b6 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = android-armv7a-eabi-libffi + pkgdesc = Portable foreign function interface library (android) + pkgver = 3.4.4 + pkgrel = 1 + url = http://sourceware.org/libffi + arch = any + license = MIT + makedepends = android-configure + depends = android-ndk + options = !strip + options = !buildflags + options = staticlibs + options = !emptydirs + source = https://github.com/libffi/libffi/releases/download/v3.4.4/libffi-3.4.4.tar.gz + source = 0001-Fix-missing-declaration.patch + source = 0002-Force-x86-compile.patch + sha256sums = d66c56ad259a82cf2a9dfc408b32bf5da52371500b84745f7fb8b645712df676 + sha256sums = eb63525f454b0563f28fcd26a887f6e27fb7773dce706658d5a25500e0c10615 + sha256sums = 40c34ca6e147b571bce4c6d3523992543086ca2c48cc0fdf17a19a8ed5373e95 + +pkgname = android-armv7a-eabi-libffi diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..f356947551cf --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +pkg/ +src/ +*.gz +*.tar diff --git a/0001-Fix-missing-declaration.patch b/0001-Fix-missing-declaration.patch new file mode 100644 index 000000000000..fdff50eff9ad --- /dev/null +++ b/0001-Fix-missing-declaration.patch @@ -0,0 +1,11 @@ +--- a/src/tramp.c 2022-10-23 12:23:27.000000000 -0300 ++++ b/src/tramp.c 2024-02-08 15:41:18.325870464 -0300 +@@ -194,7 +194,7 @@ + * trampoline file. + */ + static int tramp_table_alloc (void); +- ++int open_temp_exec_file (void); + #if defined (__linux__) || defined (__CYGWIN__) + + static int diff --git a/0002-Force-x86-compile.patch b/0002-Force-x86-compile.patch new file mode 100644 index 000000000000..18885ecfcbe2 --- /dev/null +++ b/0002-Force-x86-compile.patch @@ -0,0 +1,11 @@ +--- a/configure.host 2022-10-23 12:23:27.000000000 -0300 ++++ b/configure.host 2024-02-08 18:15:41.716503280 -0300 +@@ -114,7 +118,7 @@ + fi + ;; + +- i?86-*-* | x86_64-*-* | amd64-*) ++ i?86-*-* | x86-*-* | x86_64-*-* | amd64-*) + TARGETDIR=x86 + if test $ac_cv_sizeof_size_t = 4; then + echo 'int foo (void) { return __x86_64__; }' > conftest.c diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1a748bc14fcf --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com> +# Contributor: drakkan <nicola.murino at gmail dot com> + +_android_arch=armv7a-eabi + +pkgname=android-${_android_arch}-libffi +pkgver=3.4.4 +pkgrel=1 +arch=('any') +pkgdesc="Portable foreign function interface library (android)" +depends=('android-ndk') +makedepends=('android-configure') +options=(!strip !buildflags staticlibs !emptydirs) +license=('MIT') +url="http://sourceware.org/libffi" +source=("https://github.com/libffi/libffi/releases/download/v$pkgver/libffi-$pkgver.tar.gz" + '0001-Fix-missing-declaration.patch' + '0002-Force-x86-compile.patch') +sha256sums=('d66c56ad259a82cf2a9dfc408b32bf5da52371500b84745f7fb8b645712df676' + 'eb63525f454b0563f28fcd26a887f6e27fb7773dce706658d5a25500e0c10615' + '40c34ca6e147b571bce4c6d3523992543086ca2c48cc0fdf17a19a8ed5373e95') + +prepare () { + cd "${srcdir}/libffi-${pkgver}" + patch -Np1 -i "../0001-Fix-missing-declaration.patch" + patch -Np1 -i "../0002-Force-x86-compile.patch" +} + +build() { + cd "${srcdir}/libffi-${pkgver}" + source android-env ${_android_arch} + + # Platform specific patches + case "$_android_arch" in + armv7a-eabi | x86) + export LDFLAGS="-Wl,--undefined-version ${LDFLAGS}" + ;; + esac + + android-${_android_arch}-configure \ + --disable-docs \ + --enable-pax_emutramp + make $MAKEFLAGS +} + +package() { + cd "${srcdir}/libffi-${pkgver}" + source android-env ${_android_arch} + + make DESTDIR="$pkgdir" install + rm -rf "${pkgdir}"/${ANDROID_PREFIX_SHARE} + ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so + ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a +} |