Sun Sep 20 13:10:30 2009 UTC ()
Fix build on Tru64.


(tnn)
diff -r1.11 -r1.12 pkgsrc/devel/libffi/Makefile
diff -r1.12 -r1.13 pkgsrc/devel/libffi/distinfo
diff -r0 -r1.1 pkgsrc/devel/libffi/patches/patch-ah
diff -r0 -r1.1 pkgsrc/devel/libffi/patches/patch-ai
diff -r0 -r1.1 pkgsrc/devel/libffi/patches/patch-aj

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

--- pkgsrc/devel/libffi/Makefile 2009/05/26 12:27:12 1.11
+++ pkgsrc/devel/libffi/Makefile 2009/09/20 13:10:30 1.12
@@ -1,33 +1,40 @@ @@ -1,33 +1,40 @@
1# $NetBSD: Makefile,v 1.11 2009/05/26 12:27:12 he Exp $ 1# $NetBSD: Makefile,v 1.12 2009/09/20 13:10:30 tnn Exp $
2# 2#
3 3
4DISTNAME= libffi-3.0.8 4DISTNAME= libffi-3.0.8
5PKGREVISION= 2 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
12LICENSE= mit 12LICENSE= mit
13 13
14PKG_DESTDIR_SUPPORT= user-destdir 14PKG_DESTDIR_SUPPORT= user-destdir
15 15
16GNU_CONFIGURE= yes 16GNU_CONFIGURE= yes
17CONFIGURE_ARGS= --includedir=${PREFIX}/include 17CONFIGURE_ARGS= --includedir=${PREFIX}/include
18USE_LIBTOOL= yes 18USE_LIBTOOL= yes
19USE_TOOLS+= pkg-config 19USE_TOOLS+= pkg-config
20USE_LANGUAGES= c c++ 20USE_LANGUAGES= c c++
21INFO_FILES= yes 21INFO_FILES= yes
22 22
23PKGCONFIG_OVERRIDE+= libffi.pc.in 23PKGCONFIG_OVERRIDE+= libffi.pc.in
24 24
 25.include "../../mk/compiler.mk"
 26# The Compaq C frontend groks .s, but not .S. Assemble osf.S directly w/ as(1).
 27pre-build:
 28.if !empty(PKGSRC_COMPILER:Mccc)
 29 cd ${WRKSRC} && ./libtool --mode=compile --tag=CC as -I. -Iinclude -o src/alpha/osf.o -c src/alpha/osf.S
 30.endif
 31
25# Since we don't have "TEST_DEPENDS", we implement it as a hack: 32# Since we don't have "TEST_DEPENDS", we implement it as a hack:
26.include "../../mk/bsd.prefs.mk" 33.include "../../mk/bsd.prefs.mk"
27 34
28.if !empty(PKGSRC_RUN_TEST:M[Yy][Ee][Ss]) 35.if !empty(PKGSRC_RUN_TEST:M[Yy][Ee][Ss])
29TEST_TARGET= check 36TEST_TARGET= check
30BUILD_DEPENDS+= dejagnu-[0-9]*:../../devel/dejagnu 37BUILD_DEPENDS+= dejagnu-[0-9]*:../../devel/dejagnu
31.endif 38.endif
32 39
33.include "../../mk/bsd.pkg.mk" 40.include "../../mk/bsd.pkg.mk"

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

--- pkgsrc/devel/libffi/distinfo 2009/05/26 12:27:12 1.12
+++ pkgsrc/devel/libffi/distinfo 2009/09/20 13:10:30 1.13
@@ -1,11 +1,14 @@ @@ -1,11 +1,14 @@
1$NetBSD: distinfo,v 1.12 2009/05/26 12:27:12 he Exp $ 1$NetBSD: distinfo,v 1.13 2009/09/20 13:10:30 tnn 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) = 6020adaf5c9ab0f6de94f930214fa1d726fe8717 6SHA1 (patch-aa) = 6020adaf5c9ab0f6de94f930214fa1d726fe8717
7SHA1 (patch-ac) = 307c08e8e3df5f079c0b2f63da58bb59fc089d30 7SHA1 (patch-ac) = 307c08e8e3df5f079c0b2f63da58bb59fc089d30
8SHA1 (patch-ad) = 8901a00abe25422e3e35f321a5fb89311185fc0b 8SHA1 (patch-ad) = 8901a00abe25422e3e35f321a5fb89311185fc0b
9SHA1 (patch-ae) = d3cbb4e3e00e0b7ced9cd50198da0772f6c73111 9SHA1 (patch-ae) = d3cbb4e3e00e0b7ced9cd50198da0772f6c73111
10SHA1 (patch-af) = daa640516b837ffeb925b2b3b97a5d75d5156165 10SHA1 (patch-af) = daa640516b837ffeb925b2b3b97a5d75d5156165
11SHA1 (patch-ag) = 6333317170f6e92f89db966315276dcd8e3484f2 11SHA1 (patch-ag) = 6333317170f6e92f89db966315276dcd8e3484f2
 12SHA1 (patch-ah) = e9580069ede90cd616da7bc230b28acbf5d204a6
 13SHA1 (patch-ai) = f9a81054764fd15bcd2e4743c90e425e844b0825
 14SHA1 (patch-aj) = 6fa0cff1b0e764fe0311d87365b85d2318814a2d

File Added: pkgsrc/devel/libffi/patches/Attic/patch-ah
$NetBSD: patch-ah,v 1.1 2009/09/20 13:10:30 tnn Exp $

--- src/alpha/ffi.c.orig	2008-02-26 18:34:36.000000000 +0100
+++ src/alpha/ffi.c
@@ -27,6 +27,9 @@
 #include <ffi.h>
 #include <ffi_common.h>
 #include <stdlib.h>
+#ifndef __GNUC__
+#include <c_asm.h>
+#endif
 
 /* Force FFI_TYPE_LONGDOUBLE to be different than FFI_TYPE_DOUBLE;
    all further uses in this file will refer to the 128-bit type.  */
@@ -195,7 +198,11 @@ ffi_prep_closure_loc (ffi_closure* closu
      instead, since both Compaq as and gas can handle it.
 
      0x86 is PAL_imb in Tru64 UNIX <alpha/pal.h>.  */
+#ifdef __GNUC__
   asm volatile ("call_pal 0x86" : : : "memory");
+#else /* Compaq C compiler */
+  asm ("call_pal 0x86");
+#endif
 
   return FFI_OK;
 }

File Added: pkgsrc/devel/libffi/patches/Attic/patch-ai
$NetBSD: patch-ai,v 1.1 2009/09/20 13:10:30 tnn Exp $

--- include/ffi_common.h.orig	2008-07-12 07:43:00.000000000 +0200
+++ include/ffi_common.h
@@ -77,6 +77,16 @@ typedef struct
 } extended_cif;
 
 /* Terse sized type definitions.  */
+#if defined(__digital__) && !defined(__GNUC__) /* XXX tnn: check sunpro */
+typedef unsigned int UINT8;
+typedef signed int   SINT8;
+typedef unsigned int UINT16;
+typedef signed int   SINT16;
+typedef unsigned int UINT32;
+typedef signed int   SINT32;
+typedef unsigned int UINT64;
+typedef signed int   SINT64;
+#else
 typedef unsigned int UINT8  __attribute__((__mode__(__QI__)));
 typedef signed int   SINT8  __attribute__((__mode__(__QI__)));
 typedef unsigned int UINT16 __attribute__((__mode__(__HI__)));
@@ -85,6 +95,7 @@ typedef unsigned int UINT32 __attribute_
 typedef signed int   SINT32 __attribute__((__mode__(__SI__)));
 typedef unsigned int UINT64 __attribute__((__mode__(__DI__)));
 typedef signed int   SINT64 __attribute__((__mode__(__DI__)));
+#endif
 
 typedef float FLOAT32;
 

File Added: pkgsrc/devel/libffi/patches/Attic/patch-aj
$NetBSD: patch-aj,v 1.1 2009/09/20 13:10:30 tnn Exp $

--- include/ffi.h.in.orig	2008-04-03 20:57:34.000000000 +0200
+++ include/ffi.h.in
@@ -254,7 +254,11 @@ typedef struct {
   ffi_cif   *cif;
   void     (*fun)(ffi_cif*,void*,void**,void*);
   void      *user_data;
+#if defined(__digital__) && !defined(__GNUC__)
+} ffi_closure;
+#else
 } ffi_closure __attribute__((aligned (8)));
+#endif
 
 void *ffi_closure_alloc (size_t size, void **code);
 void ffi_closure_free (void *);