From 7d8b588847495cf001633794df481399851061ab Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sat, 5 Jul 2014 16:27:33 +0200 Subject: [PATCH] libffi: update to libffi-3.1 Signed-off-by: Stephan Raue --- packages/devel/libffi/package.mk | 2 +- .../patches/libffi-3.0.11-includedir.patch | 22 -------- ...-Fix-installation-location-of-libffi.patch | 50 +++++++++++++++++++ .../libffi/patches/libffi-includedir.patch | 23 +++++++++ 4 files changed, 74 insertions(+), 23 deletions(-) delete mode 100644 packages/devel/libffi/patches/libffi-3.0.11-includedir.patch create mode 100644 packages/devel/libffi/patches/libffi-Fix-installation-location-of-libffi.patch create mode 100644 packages/devel/libffi/patches/libffi-includedir.patch diff --git a/packages/devel/libffi/package.mk b/packages/devel/libffi/package.mk index ac6eed293d..37a45e1bdf 100644 --- a/packages/devel/libffi/package.mk +++ b/packages/devel/libffi/package.mk @@ -17,7 +17,7 @@ ################################################################################ PKG_NAME="libffi" -PKG_VERSION="3.0.11" +PKG_VERSION="3.1" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/devel/libffi/patches/libffi-3.0.11-includedir.patch b/packages/devel/libffi/patches/libffi-3.0.11-includedir.patch deleted file mode 100644 index bb709a368c..0000000000 --- a/packages/devel/libffi/patches/libffi-3.0.11-includedir.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -Naur libffi-3.0.10/include/Makefile.am libffi-3.0.10.patch/include/Makefile.am ---- libffi-3.0.10/include/Makefile.am 2011-08-22 20:38:12.000000000 +0200 -+++ libffi-3.0.10.patch/include/Makefile.am 2011-11-04 09:26:38.587669344 +0100 -@@ -5,5 +5,5 @@ - DISTCLEANFILES=ffitarget.h - EXTRA_DIST=ffi.h.in ffi_common.h - --includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include -+includesdir = $(includedir)/@PACKAGE_NAME@ - nodist_includes_HEADERS = ffi.h ffitarget.h -diff -Naur libffi-3.0.10/libffi.pc.in libffi-3.0.10.patch/libffi.pc.in ---- libffi-3.0.10/libffi.pc.in 2011-08-22 20:38:12.000000000 +0200 -+++ libffi-3.0.10.patch/libffi.pc.in 2011-11-04 09:25:20.218682315 +0100 -@@ -1,7 +1,7 @@ - prefix=@prefix@ - exec_prefix=@exec_prefix@ - libdir=@libdir@ --includedir=${libdir}/@PACKAGE_NAME@-@PACKAGE_VERSION@/include -+includedir=@includedir@/@PACKAGE_NAME@ - - Name: @PACKAGE_NAME@ - Description: Library supporting Foreign Function Interfaces diff --git a/packages/devel/libffi/patches/libffi-Fix-installation-location-of-libffi.patch b/packages/devel/libffi/patches/libffi-Fix-installation-location-of-libffi.patch new file mode 100644 index 0000000000..56e08f7363 --- /dev/null +++ b/packages/devel/libffi/patches/libffi-Fix-installation-location-of-libffi.patch @@ -0,0 +1,50 @@ +From 102c02de867bfe831b5366c89d66bcf170db962e Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 7 Feb 2013 22:26:56 +0100 +Subject: [PATCH] Fix installation location of libffi + +The libffi is currently declared as toolexeclib_LTLIBRARIES. In many +cases, toolexeclib libraries will be installed in /usr/lib, so it +doesn't make any difference. + +However, with multilib toolchains, they get installed in a +subdirectory of /usr/lib/. For example, with a Sourcery CodeBench +PowerPC toolchain, if the e500mc multilib variant is used, the libffi +library gets installed in /usr/lib/te500mc/. This is due to the +following code in the configure script: + + multi_os_directory=`$CC -print-multi-os-directory` + case $multi_os_directory in + .) ;; # Avoid trailing /. + *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; + esac + +Once the library is installed in /usr/lib/te500mc/, nothing works +because this installation location is inconsistent with the +installation location declared in libffi.pc. + +So, instead of using this bizarre toolexeclib_LTLIBRARIES, simply use +the more standard lib_LTLIBRARIES, which ensures that the libffi +library is always installed in /usr/lib. + +Signed-off-by: Thomas Petazzoni +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 6f669ca..b60bcc1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -93,7 +93,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) + + MAKEOVERRIDES= + +-toolexeclib_LTLIBRARIES = libffi.la ++lib_LTLIBRARIES = libffi.la + noinst_LTLIBRARIES = libffi_convenience.la + + libffi_la_SOURCES = src/prep_cif.c src/types.c \ +-- +1.7.9.5 + diff --git a/packages/devel/libffi/patches/libffi-includedir.patch b/packages/devel/libffi/patches/libffi-includedir.patch new file mode 100644 index 0000000000..4bf7580c70 --- /dev/null +++ b/packages/devel/libffi/patches/libffi-includedir.patch @@ -0,0 +1,23 @@ +diff -Naur libffi-3.1/include/Makefile.am libffi-3.1.patch/include/Makefile.am +--- libffi-3.1/include/Makefile.am 2014-04-25 19:45:13.000000000 +0200 ++++ libffi-3.1.patch/include/Makefile.am 2014-07-03 14:30:29.019161705 +0200 +@@ -5,5 +5,6 @@ + DISTCLEANFILES=ffitarget.h + EXTRA_DIST=ffi.h.in ffi_common.h + +-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include ++includesdir = $(includedir)/@PACKAGE_NAME@ ++ + nodist_includes_HEADERS = ffi.h ffitarget.h +diff -Naur libffi-3.1/libffi.pc.in libffi-3.1.patch/libffi.pc.in +--- libffi-3.1/libffi.pc.in 2014-04-25 19:45:13.000000000 +0200 ++++ libffi-3.1.patch/libffi.pc.in 2014-07-03 14:30:56.047220839 +0200 +@@ -2,7 +2,7 @@ + exec_prefix=@exec_prefix@ + libdir=@libdir@ + toolexeclibdir=@toolexeclibdir@ +-includedir=${libdir}/@PACKAGE_NAME@-@PACKAGE_VERSION@/include ++includedir=@includedir@/@PACKAGE_NAME@ + + Name: @PACKAGE_NAME@ + Description: Library supporting Foreign Function Interfaces