Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 May 2008 22:24:43 +1200
From:      Matthew Luckie <mjl@luckie.org.nz>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/123756: [patch] put devel/libffi includes in sane place
Message-ID:  <E1JxJal-000Bgf-35@spandex.luckie.org.nz>
Resent-Message-ID: <200805171100.m4HB06eP091961@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         123756
>Category:       ports
>Synopsis:       [patch] put devel/libffi includes in sane place
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 17 11:00:05 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Matthew Luckie
>Release:        FreeBSD 6.2-RELEASE-p8 i386
>Organization:
>Environment:
System: FreeBSD spandex.luckie.org.nz 6.2-RELEASE-p8 FreeBSD 6.2-RELEASE-p8 #0: Thu Oct 18 11:31:13 NZDT 2007 root@spandex.luckie.org.nz:/usr/obj/usr/src/sys/spandex i386


	
>Description:
libffi includes are put under /usr/local/lib/libffi-3.0.4/include/ by
default.  this is fine when whatever is using it uses pkgconfig, but i
wonder if it would be better to put them in /usr/local/include where you
might expect to find them.

only a few ports use libffi.

 java/jamvm uses pkg-config to get path to includes so should be fine 
 lang/squeak does not, has an ffi option off by default, but i don't think
 it currently works.

please consider adding a CONFLICTS for libffi-devel, libffi-devel has one
to libffi but not vice versa.

a bunch of other ports (like python, for example) come with their own out
of date libffi build in.  i'm in the process of sorting out python on
arm which uses the system ffi.
>How-To-Repeat:
N/A
>Fix:
--- patch-libffi begins here ---
diff -uNr libffi.orig/files/patch-include-Makefile.in libffi/files/patch-include-Makefile.in
--- libffi.orig/files/patch-include-Makefile.in	Thu Jan  1 12:00:00 1970
+++ libffi/files/patch-include-Makefile.in	Sat May 17 21:02:36 2008
@@ -0,0 +1,11 @@
+--- include/Makefile.in.orig	2008-05-17 21:00:01.000000000 +1200
++++ include/Makefile.in	2008-05-17 21:01:39.000000000 +1200
+@@ -182,7 +182,7 @@
+ AUTOMAKE_OPTIONS = foreign
+ DISTCLEANFILES = ffitarget.h
+ EXTRA_DIST = ffi.h.in ffi_common.h
+-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
++includesdir = @includedir@
+ nodist_includes_HEADERS = ffi.h ffitarget.h 
+ all: all-am
+ 
diff -uNr libffi.orig/files/patch-libffi.pc.in libffi/files/patch-libffi.pc.in
--- libffi.orig/files/patch-libffi.pc.in	Thu Jan  1 12:00:00 1970
+++ libffi/files/patch-libffi.pc.in	Sat May 17 20:58:36 2008
@@ -0,0 +1,11 @@
+--- libffi.pc.in.orig	2008-05-17 20:56:19.000000000 +1200
++++ libffi.pc.in	2008-05-17 20:58:09.000000000 +1200
+@@ -1,7 +1,7 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ libdir=@libdir@
+-includedir=${libdir}/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
++includedir=@includedir@
+ 
+ Name: @PACKAGE_NAME@
+ Description: Library supporting Foreign Function Interfaces
diff -uNr libffi.orig/pkg-plist libffi/pkg-plist
--- libffi.orig/pkg-plist	Sat Apr  5 07:00:51 2008
+++ libffi/pkg-plist	Sat May 17 21:04:53 2008
@@ -1,9 +1,7 @@
-lib/libffi-%%PORTVERSION%%/include/ffi.h
-lib/libffi-%%PORTVERSION%%/include/ffitarget.h
+include/ffi.h
+include/ffitarget.h
 lib/libffi.a
 lib/libffi.la
 lib/libffi.so
 lib/libffi.so.5
 libdata/pkgconfig/libffi.pc
-@dirrm lib/libffi-%%PORTVERSION%%/include
-@dirrm lib/libffi-%%PORTVERSION%%
--- patch-libffi ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1JxJal-000Bgf-35>