From mjl@luckie.org.nz  Sat May 17 10:54:31 2008
Return-Path: <mjl@luckie.org.nz>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5170C106566B
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 17 May 2008 10:54:31 +0000 (UTC)
	(envelope-from mjl@luckie.org.nz)
Received: from mailfilter10.ihug.co.nz (mailfilter10.ihug.co.nz [203.109.136.10])
	by mx1.freebsd.org (Postfix) with ESMTP id E59F78FC15
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 17 May 2008 10:54:30 +0000 (UTC)
	(envelope-from mjl@luckie.org.nz)
Received: from 203-109-186-4.dsl.dyn.ihug.co.nz (HELO spandex.luckie.org.nz) ([203.109.186.4])
  by smtp.mailfilter2.ihug.co.nz with ESMTP/TLS/DHE-RSA-AES256-SHA; 17 May 2008 22:24:40 +1200
Received: from mjl by spandex.luckie.org.nz with local (Exim 4.69 (FreeBSD))
	(envelope-from <mjl@luckie.org.nz>)
	id 1JxJal-000Bgf-35
	for FreeBSD-gnats-submit@freebsd.org; Sat, 17 May 2008 22:24:43 +1200
Message-Id: <E1JxJal-000Bgf-35@spandex.luckie.org.nz>
Date: Sat, 17 May 2008 22:24:43 +1200
From: Matthew Luckie <mjl@luckie.org.nz>
Reply-To: Matthew Luckie <mjl@luckie.org.nz>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] put devel/libffi includes in sane place
X-Send-Pr-Version: 3.113
X-GNATS-Notify: bkoenig@alpha-tierchen.de

>Number:         123756
>Category:       ports
>Synopsis:       [patch] put devel/libffi includes in sane place
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    stefan
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 17 11:00:05 UTC 2008
>Closed-Date:    Wed Oct 22 07:34:24 UTC 2008
>Last-Modified:  Wed Oct 22 07:34:24 UTC 2008
>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:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sat May 17 11:00:12 UTC 2008 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123756 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: bkoenig@alpha-tierchen.de
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/123756: [patch] put devel/libffi includes in sane place
Date: Sat, 17 May 2008 11:00:11 UT

 Maintainer of devel/libffi,
 
 Please note that PR ports/123756 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/123756
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: "Bjoern Koenig" <bkoenig@alpha-tierchen.de>
To: bug-followup@FreeBSD.org
Cc: mjl@luckie.org.nz
Subject: Re: ports/123756: [patch] put devel/libffi includes in sane place
Date: Sat, 17 May 2008 16:51:21 +0200 (CEST)

 Hello Matthew,
 
 when I started with creating the ports libffi-devel and later libffi 3 I
 used /usr/local/include, as you suggest now. So I have the same feeling as
 you that this location would be a better place.
 
 With 3.0.4 I deceided to use /usr/local/lib/libffi-%%PORTVERSION%%/include
 because this location is designated by the authors of libffi and basically
 I do not like the idea that every distribution make idiosyncratic
 adjustments.
 
 I asked Anthony Green (the initial author of libffi) about the reason for
 this location and he answered that some distributions can potentially
 install different versions of libffi in lib/ and lib64/ for example. I
 know that this does not apply to FreeBSD, but I think that the current
 location does not hurt since software developers always have to use
 pkg-config in case their software relies on libffi. Ports like lang/squeak
 should do it in the same manner as I did it with java/jamvm and
 java/sablevm.
 
 Do you still have another reason except sanity? ;-)
 
 I'm thinking about it. I tend to move the headers to /usr/local/include
 and update the port to 3.0.5 briefly.
 
 Bjrn
 
 

From: "Bjoern Koenig" <bkoenig@alpha-tierchen.de>
To: bug-followup@freebsd.org
Cc: mjl@luckie.org.nz
Subject: Re: ports/123756: [patch] put devel/libffi includes in sane place
Date: Sat, 17 May 2008 17:22:16 +0200 (CEST)

 ------=_20080517172216_20420
 Content-Type: text/plain; charset="iso-8859-1"
 Content-Transfer-Encoding: 8bit
 
 Ok, I created a new patch, that updates the port to 3.0.5 and avoids extra
 files in ${FILESDIR}.
 
 Bjrn
 
 ------=_20080517172216_20420
 Content-Type: application/octet-stream; name="ports-devel-libffi.diff"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename="ports-devel-libffi.diff"
 
 ZGlmZiAtLWdpdCBwb3J0cy9kZXZlbC9saWJmZmkvTWFrZWZpbGUgcG9ydHMvZGV2ZWwvbGliZmZp
 L01ha2VmaWxlCmluZGV4IDY4MmFmMzEuLjhmYWI2MTcgMTAwNjQ0Ci0tLSBwb3J0cy9kZXZlbC9s
 aWJmZmkvTWFrZW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org.nz>
To: Bjoern Koenig <bkoenig@alpha-tierchen.de>
Cc: bug-followup@freebsd.org
Subject: Re: ports/123756: [patch] put devel/libffi includes in sane place
Date: Sun, 18 May 2008 07:25:28 +1200

 > Ok, I created a new patch, that updates the port to 3.0.5 and avoids extra
 > files in ${FILESDIR}.
 
 That looks fine (though I haven't tested it).  Are conflicts required 
 for libffi-devel ??
 
 Also, my motivation for headers in a sane place:
 
 http://lists.freebsd.org/pipermail/freebsd-python/2008-May/001519.html

From: "Bjoern Koenig" <bkoenig@alpha-tierchen.de>
To: "Matthew Luckie" <mjl@luckie.org.nz>
Cc: bug-followup@freebsd.org
Subject: Re: ports/123756: [patch] put devel/libffi includes in sane place
Date: Sun, 18 May 2008 09:07:52 +0200 (CEST)

 Matthew Luckie wrote:
 
 > That looks fine (though I haven't tested it).  Are conflicts required
 > for libffi-devel ??
 
 I think devel/libffi-devel should be removed. I created the port before
 the libffi 3.x release because of its amd64 support. Now it's obsolete.
 
 > Also, my motivation for headers in a sane place:
 >
 > http://lists.freebsd.org/pipermail/freebsd-python/2008-May/001519.html
 
 Thanks for doing that. I also had this problem on FreeBSD/arm, but I
 haven't had the time to deal with it.
 
 Bjrn
 
 

From: Matthew Luckie <mjl@luckie.org.nz>
To: Bjoern Koenig <bkoenig@alpha-tierchen.de>
Cc: bug-followup@freebsd.org
Subject: Re: ports/123756: [patch] put devel/libffi includes in sane place
Date: Sun, 18 May 2008 22:50:03 +1200

 >> That looks fine (though I haven't tested it).  Are conflicts required
 >> for libffi-devel ??
 > 
 > I think devel/libffi-devel should be removed. I created the port before
 > the libffi 3.x release because of its amd64 support. Now it's obsolete.
 
 OK.  can you send in a maintainer-approved patch so I can then send in a 
 patch to python?
 
Responsible-Changed-From-To: freebsd-ports-bugs->stefan 
Responsible-Changed-By: stefan 
Responsible-Changed-When: Sat Oct 11 09:07:17 UTC 2008 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123756 

From: Stefan Walter <stefan@freebsd.org>
To: bkoenig@alpha-tierchen.de
Cc: Matthew Luckie <mjl@luckie.org.nz>,
	GNATS <FreeBSD-gnats-submit@FreeBSD.org>
Subject: Re: ports/123756: [patch] put devel/libffi includes in sane place
Date: Sat, 11 Oct 2008 11:06:32 +0200

 Hi Bjoern,
 
 the PR ports/123756 [1] is still around. Can you let me know what the
 state of this is? Should the patch you sent in a followup be committed to
 devel/libffi?
 
 Best regards,
 Stefan
 
 [1]: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/123756
 
State-Changed-From-To: feedback->closed 
State-Changed-By: stefan 
State-Changed-When: Wed Oct 22 07:33:11 UTC 2008 
State-Changed-Why:  
A patch from ports/127552 has been committed that updates the port to a new 
version and adds symlinks for the header files. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123756 
>Unformatted:
