diff --git a/disabled-packages/libffi-updated/build.sh b/disabled-packages/libffi-updated/build.sh new file mode 100755 index 000000000..fcf1520d8 --- /dev/null +++ b/disabled-packages/libffi-updated/build.sh @@ -0,0 +1,16 @@ +TERMUX_PKG_HOMEPAGE=https://sourceware.org/libffi/ +TERMUX_PKG_DESCRIPTION="Library providing a portable, high level programming interface to various calling conventions" +_COMMIT=60e4250a77eb3fde500bfd68ec40519fe34b21bd +_DATE=20160904 +TERMUX_PKG_VERSION=3.2.1.$_DATE +TERMUX_PKG_SRCURL=https://github.com/libffi/libffi/archive/${_COMMIT}.zip +TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-multi-os-directory" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --enable-symvers=no" +TERMUX_PKG_RM_AFTER_INSTALL="lib/libffi-${TERMUX_PKG_VERSION}/include" +TERMUX_PKG_FOLDERNAME=libffi-$_COMMIT +TERMUX_PKG_CLANG=yes + +termux_step_pre_configure () { + cd $TERMUX_PKG_SRCDIR + ./autogen.sh +} diff --git a/disabled-packages/libffi-updated/configure.ac.patch b/disabled-packages/libffi-updated/configure.ac.patch new file mode 100644 index 000000000..3ff250f6a --- /dev/null +++ b/disabled-packages/libffi-updated/configure.ac.patch @@ -0,0 +1,14 @@ +See https://github.com/libffi/libffi/pull/265 + +diff -u -r ../libffi-60e4250a77eb3fde500bfd68ec40519fe34b21bd/configure.ac ./configure.ac +--- ../libffi-60e4250a77eb3fde500bfd68ec40519fe34b21bd/configure.ac 2016-09-04 09:34:18.000000000 -0400 ++++ ./configure.ac 2016-09-14 06:43:08.916379800 -0400 +@@ -197,7 +197,7 @@ + [Cannot use PROT_EXEC on this target, so, we revert to + alternative means]) + ;; +- *-apple-darwin* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*) ++ *-apple-darwin* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris* | *-linux-android*) + AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1, + [Cannot use malloc on this target, so, we revert to + alternative means]) diff --git a/disabled-packages/libffi-updated/include-Makefile.am.patch b/disabled-packages/libffi-updated/include-Makefile.am.patch new file mode 100644 index 000000000..b828f8aa7 --- /dev/null +++ b/disabled-packages/libffi-updated/include-Makefile.am.patch @@ -0,0 +1,10 @@ +diff -u -r ../libffi-60e4250a77eb3fde500bfd68ec40519fe34b21bd/include/Makefile.am ./include/Makefile.am +--- ../libffi-60e4250a77eb3fde500bfd68ec40519fe34b21bd/include/Makefile.am 2016-09-04 09:34:18.000000000 -0400 ++++ ./include/Makefile.am 2016-09-13 10:44:07.832744478 -0400 +@@ -6,5 +6,5 @@ + noinst_HEADERS=ffi_common.h ffi_cfi.h + EXTRA_DIST=ffi.h.in + +-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include ++includesdir = $(includedir) + nodist_includes_HEADERS = ffi.h ffitarget.h diff --git a/disabled-packages/libffi-updated/libffi.pc.in.patch b/disabled-packages/libffi-updated/libffi.pc.in.patch new file mode 100644 index 000000000..128a4d88c --- /dev/null +++ b/disabled-packages/libffi-updated/libffi.pc.in.patch @@ -0,0 +1,12 @@ +diff -u -r ../libffi-3.1/libffi.pc.in ./libffi.pc.in +--- ../libffi-3.1/libffi.pc.in 2014-04-25 19:45:13.000000000 +0200 ++++ ./libffi.pc.in 2014-07-13 22:37:09.818674529 +0200 +@@ -2,7 +2,7 @@ + exec_prefix=@exec_prefix@ + libdir=@libdir@ + toolexeclibdir=@toolexeclibdir@ +-includedir=${libdir}/@PACKAGE_NAME@-@PACKAGE_VERSION@/include ++includedir=@includedir@ + + Name: @PACKAGE_NAME@ + Description: Library supporting Foreign Function Interfaces diff --git a/disabled-packages/libffi-updated/src-closures.c.patch b/disabled-packages/libffi-updated/src-closures.c.patch new file mode 100644 index 000000000..899a92853 --- /dev/null +++ b/disabled-packages/libffi-updated/src-closures.c.patch @@ -0,0 +1,14 @@ +See https://github.com/libffi/libffi/pull/265 + +diff -u -r ../libffi-60e4250a77eb3fde500bfd68ec40519fe34b21bd/src/closures.c ./src/closures.c +--- ../libffi-60e4250a77eb3fde500bfd68ec40519fe34b21bd/src/closures.c 2016-09-04 09:34:18.000000000 -0400 ++++ ./src/closures.c 2016-09-14 16:51:05.956548790 -0400 +@@ -55,7 +55,7 @@ + #endif + + #if FFI_MMAP_EXEC_WRIT && !defined FFI_MMAP_EXEC_SELINUX +-# ifdef __linux__ ++# if defined(__linux__) && !defined(__ANDROID__) + /* When defined to 1 check for SELinux and if SELinux is active, + don't attempt PROT_EXEC|PROT_WRITE mapping at all, as that + might cause audit messages. */