[45447] trunk/dports/textproc/libiconv

ryandesign at macports.org ryandesign at macports.org
Fri Jan 16 01:56:04 PST 2009


Revision: 45447
          http://trac.macports.org/changeset/45447
Author:   ryandesign at macports.org
Date:     2009-01-16 01:56:00 -0800 (Fri, 16 Jan 2009)
Log Message:
-----------
libiconv: fix 64-bit issues; see #17982

Modified Paths:
--------------
    trunk/dports/textproc/libiconv/Portfile

Added Paths:
-----------
    trunk/dports/textproc/libiconv/files/patch-64-bit.diff

Modified: trunk/dports/textproc/libiconv/Portfile
===================================================================
--- trunk/dports/textproc/libiconv/Portfile	2009-01-16 08:52:18 UTC (rev 45446)
+++ trunk/dports/textproc/libiconv/Portfile	2009-01-16 09:56:00 UTC (rev 45447)
@@ -4,6 +4,7 @@
 
 name                    libiconv
 version                 1.12
+revision                1
 categories              textproc
 maintainers             ryandesign
 platforms               darwin freebsd linux
@@ -52,6 +53,12 @@
     --disable-nls \
     --enable-extra-encodings
 
+platform darwin {
+    post-configure {
+        system "cd ${worksrcpath} && patch -b -p0 < ${filespath}/patch-64-bit.diff && touch stamp-h1"
+    }
+}
+
 pre-build {
     if {![variant_isset disable_utf8mac] || [variant_isset enable_cp932fix]} {
         system "cd ${worksrcpath} && make -f Makefile.devel"

Added: trunk/dports/textproc/libiconv/files/patch-64-bit.diff
===================================================================
--- trunk/dports/textproc/libiconv/files/patch-64-bit.diff	                        (rev 0)
+++ trunk/dports/textproc/libiconv/files/patch-64-bit.diff	2009-01-16 09:56:00 UTC (rev 45447)
@@ -0,0 +1,69 @@
+--- config.h.orig 2009-01-16 01:31:52.000000000 -0600
++++ config.h 2009-01-16 01:43:25.000000000 -0600
+@@ -2,13 +2,21 @@
+ /* config.h.in.  Generated from configure.ac by autoheader.  */
+ 
+ /* Define to the number of bits in type 'ptrdiff_t'. */
++#ifdef __LP64__
+ #define BITSIZEOF_PTRDIFF_T 64
++#else
++#define BITSIZEOF_PTRDIFF_T 32
++#endif
+ 
+ /* Define to the number of bits in type 'sig_atomic_t'. */
+ #define BITSIZEOF_SIG_ATOMIC_T 32
+ 
+ /* Define to the number of bits in type 'size_t'. */
++#ifdef __LP64__
+ #define BITSIZEOF_SIZE_T 64
++#else
++#define BITSIZEOF_SIZE_T 32
++#endif
+ 
+ /* Define to the number of bits in type 'wchar_t'. */
+ #define BITSIZEOF_WCHAR_T 32
+@@ -288,7 +296,11 @@
+ 
+ /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+    'ptrdiff_t'. */
++#ifdef __LP64__
+ #define PTRDIFF_T_SUFFIX 
++#else
++#define PTRDIFF_T_SUFFIX l
++#endif
+ 
+ /* Define this to 1 if strerror is broken. */
+ /* #undef REPLACE_STRERROR */
+--- srclib/stdint.in.h.orig 2007-11-11 10:00:02.000000000 -0600
++++ srclib/stdint.in.h 2009-01-16 01:49:06.000000000 -0600
+@@ -410,10 +410,13 @@
+ /* ptrdiff_t limits */
+ #undef PTRDIFF_MIN
+ #undef PTRDIFF_MAX
+-#define PTRDIFF_MIN  \
+-   _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0 at PTRDIFF_T_SUFFIX@)
+-#define PTRDIFF_MAX  \
+-   _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0 at PTRDIFF_T_SUFFIX@)
++#ifdef __LP64__
++#define PTRDIFF_MIN  _STDINT_MIN (1, 64, 0l)
++#define PTRDIFF_MAX  _STDINT_MAX (1, 64, 0l)
++#else
++#define PTRDIFF_MIN  _STDINT_MIN (1, 32, 0)
++#define PTRDIFF_MAX  _STDINT_MAX (1, 32, 0)
++#endif
+ 
+ /* sig_atomic_t limits */
+ #undef SIG_ATOMIC_MIN
+@@ -428,7 +431,11 @@
+ 
+ /* size_t limit */
+ #undef SIZE_MAX
+-#define SIZE_MAX  _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0 at SIZE_T_SUFFIX@)
++#ifdef __LP64__
++#define SIZE_MAX  _STDINT_MIN (0, 64, 0 at SIZE_T_SUFFIX@)
++#else
++#define SIZE_MAX  _STDINT_MIN (0, 32, 0 at SIZE_T_SUFFIX@)
++#endif
+ 
+ /* wchar_t limits */
+ #undef WCHAR_MIN
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090116/fcde3137/attachment.html>


More information about the macports-changes mailing list