Sat May 30 21:02:35 2009 UTC ()
Pullup ticket #2781 - requested by he
libffi: portability fix

Revisions pulled up:
- devel/libffi/Makefile			1.11 via patch
- devel/libffi/distinfo			1.12
- devel/libffi/patches/patch-aa		1.8
- devel/libffi/patches/patch-ae		1.1
- devel/libffi/patches/patch-af		1.1
- devel/libffi/patches/patch-ag		1.1
---
Module Name:	pkgsrc
Committed By:	he
Date:		Tue May 26 12:27:12 UTC 2009

Modified Files:
	pkgsrc/devel/libffi: Makefile distinfo
	pkgsrc/devel/libffi/patches: patch-aa
Added Files:
	pkgsrc/devel/libffi/patches: patch-ae patch-af patch-ag

Log Message:
Update from version 3.0.8nb1 to 3.0.8nb2.

Pkgsrc changes:
 o Add portability to the various mips-based NetBSD ports.
   The self-tests even complete without any unexpected failures.


(tron)
diff -r1.9.2.1 -r1.9.2.2 pkgsrc/devel/libffi/Makefile
diff -r1.10.2.1 -r1.10.2.2 pkgsrc/devel/libffi/distinfo
diff -r1.7.2.2 -r1.7.2.3 pkgsrc/devel/libffi/patches/patch-aa
diff -r0 -r1.1.2.2 pkgsrc/devel/libffi/patches/patch-ae
diff -r0 -r1.1.2.2 pkgsrc/devel/libffi/patches/patch-af
diff -r0 -r1.1.2.2 pkgsrc/devel/libffi/patches/patch-ag

cvs diff -r1.9.2.1 -r1.9.2.2 pkgsrc/devel/libffi/Makefile (expand / switch to unified diff)

--- pkgsrc/devel/libffi/Makefile 2009/05/22 11:55:35 1.9.2.1
+++ pkgsrc/devel/libffi/Makefile 2009/05/30 21:02:34 1.9.2.2
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1# $NetBSD: Makefile,v 1.9.2.1 2009/05/22 11:55:35 tron Exp $ 1# $NetBSD: Makefile,v 1.9.2.2 2009/05/30 21:02:34 tron Exp $
2# 2#
3 3
4DISTNAME= libffi-3.0.8 4DISTNAME= libffi-3.0.8
5PKGREVISION= 1 5PKGREVISION= 2
6CATEGORIES= devel 6CATEGORIES= devel
7MASTER_SITES= ftp://sourceware.org/pub/libffi/ 7MASTER_SITES= ftp://sourceware.org/pub/libffi/
8 8
9MAINTAINER= asau@inbox.ru 9MAINTAINER= asau@inbox.ru
10HOMEPAGE= http://sources.redhat.com/libffi/ 10HOMEPAGE= http://sources.redhat.com/libffi/
11COMMENT= Foreign function interface 11COMMENT= Foreign function interface
12 12
13PKG_DESTDIR_SUPPORT= user-destdir 13PKG_DESTDIR_SUPPORT= user-destdir
14 14
15GNU_CONFIGURE= yes 15GNU_CONFIGURE= yes
16CONFIGURE_ARGS= --includedir=${PREFIX}/include 16CONFIGURE_ARGS= --includedir=${PREFIX}/include
17USE_LIBTOOL= yes 17USE_LIBTOOL= yes
18USE_TOOLS+= pkg-config 18USE_TOOLS+= pkg-config

cvs diff -r1.10.2.1 -r1.10.2.2 pkgsrc/devel/libffi/distinfo (expand / switch to unified diff)

--- pkgsrc/devel/libffi/distinfo 2009/05/22 11:55:35 1.10.2.1
+++ pkgsrc/devel/libffi/distinfo 2009/05/30 21:02:34 1.10.2.2
@@ -1,8 +1,11 @@ @@ -1,8 +1,11 @@
1$NetBSD: distinfo,v 1.10.2.1 2009/05/22 11:55:35 tron Exp $ 1$NetBSD: distinfo,v 1.10.2.2 2009/05/30 21:02:34 tron Exp $
2 2
3SHA1 (libffi-3.0.8.tar.gz) = ce44d10c39d9a37479c8777e206cac0f36c48712 3SHA1 (libffi-3.0.8.tar.gz) = ce44d10c39d9a37479c8777e206cac0f36c48712
4RMD160 (libffi-3.0.8.tar.gz) = 4144f64e79ebf95161a6afd58ceaeef8372b5e57 4RMD160 (libffi-3.0.8.tar.gz) = 4144f64e79ebf95161a6afd58ceaeef8372b5e57
5Size (libffi-3.0.8.tar.gz) = 722834 bytes 5Size (libffi-3.0.8.tar.gz) = 722834 bytes
6SHA1 (patch-aa) = c15f4b7838ff7f4838de2981a5f3681a43a99503 6SHA1 (patch-aa) = 6020adaf5c9ab0f6de94f930214fa1d726fe8717
7SHA1 (patch-ac) = 307c08e8e3df5f079c0b2f63da58bb59fc089d30 7SHA1 (patch-ac) = 307c08e8e3df5f079c0b2f63da58bb59fc089d30
8SHA1 (patch-ad) = 8901a00abe25422e3e35f321a5fb89311185fc0b 8SHA1 (patch-ad) = 8901a00abe25422e3e35f321a5fb89311185fc0b
 9SHA1 (patch-ae) = d3cbb4e3e00e0b7ced9cd50198da0772f6c73111
 10SHA1 (patch-af) = daa640516b837ffeb925b2b3b97a5d75d5156165
 11SHA1 (patch-ag) = 6333317170f6e92f89db966315276dcd8e3484f2

cvs diff -r1.7.2.2 -r1.7.2.3 pkgsrc/devel/libffi/patches/Attic/patch-aa (expand / switch to unified diff)

--- pkgsrc/devel/libffi/patches/Attic/patch-aa 2009/05/22 11:55:35 1.7.2.2
+++ pkgsrc/devel/libffi/patches/Attic/patch-aa 2009/05/30 21:02:35 1.7.2.3
@@ -1,13 +1,24 @@ @@ -1,13 +1,24 @@
1$NetBSD: patch-aa,v 1.7.2.2 2009/05/22 11:55:35 tron Exp $ 1$NetBSD: patch-aa,v 1.7.2.3 2009/05/30 21:02:35 tron Exp $
2 2
3--- configure.orig 2008-12-20 02:12:45.000000000 +1000 3Extend which ports we accept to deal with.
 4
 5--- configure.orig 2008-12-19 17:12:45.000000000 +0100
4+++ configure 6+++ configure
 7@@ -21017,7 +21017,7 @@ case "$host" in
 8 mips-sgi-irix5.* | mips-sgi-irix6.*)
 9 TARGET=MIPS; TARGETDIR=mips
 10 ;;
 11- mips*-*-linux*)
 12+ mips*-*-linux* | mips*-*-netbsd*)
 13 TARGET=MIPS; TARGETDIR=mips
 14 ;;
 15
5@@ -21033,7 +21033,7 @@ case "$host" in 16@@ -21033,7 +21033,7 @@ case "$host" in
6 powerpc-*-aix* | rs6000-*-aix*) 17 powerpc-*-aix* | rs6000-*-aix*)
7 TARGET=POWERPC_AIX; TARGETDIR=powerpc 18 TARGET=POWERPC_AIX; TARGETDIR=powerpc
8 ;; 19 ;;
9- powerpc-*-freebsd*) 20- powerpc-*-freebsd*)
10+ powerpc-*-freebsd* | powerpc-*-netbsd*) 21+ powerpc-*-freebsd* | powerpc-*-netbsd*)
11 TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc 22 TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
12 ;; 23 ;;
13 powerpc*-*-rtems*) 24 powerpc*-*-rtems*)

File Added: pkgsrc/devel/libffi/patches/Attic/patch-ae
$NetBSD: patch-ae,v 1.1.2.2 2009/05/30 21:02:35 tron Exp $

Make a minimal adjustment to support the various NetBSD mips ports.

--- src/mips/ffitarget.h.orig	2008-02-15 19:43:40.000000000 +0100
+++ src/mips/ffitarget.h
@@ -39,6 +39,11 @@
 #    define _ABIO32 _MIPS_SIM_ABI32
 #  endif
 #endif
+#ifdef __NetBSD__
+/* Let's cheat a bit... */   
+#  define _ABIO32 1     
+#  define _MIPS_SIM _ABIO32
+#endif
 
 #if !defined(_MIPS_SIM)
 -- something is very wrong --

File Added: pkgsrc/devel/libffi/patches/Attic/patch-af
$NetBSD: patch-af,v 1.1.2.2 2009/05/30 21:02:35 tron Exp $

Fixes to support the various NetBSD mips ports.

--- src/mips/ffi.c.orig	2008-02-26 18:34:36.000000000 +0100
+++ src/mips/ffi.c
@@ -32,12 +32,19 @@
 
 #ifdef __GNUC__
 #  if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))
-#    define USE__BUILTIN___CLEAR_CACHE 1
+#    if !defined(__NetBSD__)
+#      define USE__BUILTIN___CLEAR_CACHE 1
+#    endif
 #  endif
 #endif
 
 #ifndef USE__BUILTIN___CLEAR_CACHE
-#include <sys/cachectl.h>
+#  if !defined(__NetBSD__)
+#    include <sys/cachectl.h>
+#  else
+#    include <mips/cachectl.h>
+#    define cacheflush _cacheflush
+#  endif
 #endif
 
 #ifdef FFI_DEBUG

File Added: pkgsrc/devel/libffi/patches/Attic/patch-ag
$NetBSD: patch-ag,v 1.1.2.2 2009/05/30 21:02:35 tron Exp $

The %Lf printf format expects "long double", so cast args accordingly.

--- testsuite/libffi.call/float2.c.orig	2008-01-29 16:15:20.000000000 +0100
+++ testsuite/libffi.call/float2.c
@@ -44,7 +44,7 @@ int main (void)
   /* This is ifdef'd out for now. long double support under SunOS/gcc
      is pretty much non-existent.  You'll get the odd bus error in library
      routines like printf().  */
-  printf ("%Lf, %Lf, %Lf, %Lf\n", ld, ldblit(f), ld - ldblit(f), LDBL_EPSILON);
+  printf ("%Lf, %Lf, %Lf, %Lf\n", (long double)ld, (long double)ldblit(f), (long double)(ld - ldblit(f)), (long double)LDBL_EPSILON);
 #endif
 
   /* These are not always the same!! Check for a reasonable delta */