Browse Source

Merge pull request #2002 from hauke/libffi2

libffi: fix host build
Hauke Mehrtens 9 years ago
parent
commit
b4ef45b48c
2 changed files with 28 additions and 3 deletions
  1. 1
    1
      libs/libffi/Makefile
  2. 27
    2
      libs/libffi/patches/001-fix-includedir-pkg.patch

+ 1
- 1
libs/libffi/Makefile View File

@@ -66,7 +66,7 @@ define Build/InstallDev
66 66
 
67 67
 	$(INSTALL_DIR) $(1)/usr/include
68 68
 	$(CP) \
69
-		$(PKG_INSTALL_DIR)/usr/lib/libffi-$(PKG_VERSION)/include/*.h \
69
+		$(PKG_INSTALL_DIR)/usr/include/*.h \
70 70
 		$(1)/usr/include/
71 71
 endef
72 72
 

+ 27
- 2
libs/libffi/patches/001-fix-includedir-pkg.patch View File

@@ -1,11 +1,36 @@
1 1
 --- a/libffi.pc.in
2 2
 +++ b/libffi.pc.in
3
-@@ -1,7 +1,7 @@
3
+@@ -1,10 +1,10 @@
4 4
  prefix=@prefix@
5 5
  exec_prefix=@exec_prefix@
6 6
  libdir=@libdir@
7 7
 -includedir=${libdir}/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
8
-+includedir=${prefix}/include
8
++includedir=@includedir@
9 9
  
10 10
  Name: @PACKAGE_NAME@
11 11
  Description: Library supporting Foreign Function Interfaces
12
+ Version: @PACKAGE_VERSION@
13
+-Libs: -L${libdir} -lffi
14
+-Cflags: -I${includedir}
15
++Libs: -lffi
16
++Cflags:
17
+--- a/include/Makefile.am
18
++++ b/include/Makefile.am
19
+@@ -5,5 +5,5 @@ AUTOMAKE_OPTIONS=foreign
20
+ DISTCLEANFILES=ffitarget.h
21
+ EXTRA_DIST=ffi.h.in ffi_common.h
22
+ 
23
+-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
24
++includesdir = $(includedir)
25
+ nodist_includes_HEADERS = ffi.h ffitarget.h
26
+--- a/include/Makefile.in
27
++++ b/include/Makefile.in
28
+@@ -250,7 +250,7 @@ top_srcdir = @top_srcdir@
29
+ AUTOMAKE_OPTIONS = foreign
30
+ DISTCLEANFILES = ffitarget.h
31
+ EXTRA_DIST = ffi.h.in ffi_common.h
32
+-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
33
++includesdir = $(includedir)
34
+ nodist_includes_HEADERS = ffi.h ffitarget.h
35
+ all: all-am
36
+