[87538] trunk/dports/devel/glib2-devel

ryandesign at macports.org ryandesign at macports.org
Thu Nov 24 12:07:59 PST 2011


Revision: 87538
          http://trac.macports.org/changeset/87538
Author:   ryandesign at macports.org
Date:     2011-11-24 12:07:59 -0800 (Thu, 24 Nov 2011)
Log Message:
-----------
glib2-devel: patch configure not configure.ac; no longer need to autoconf; fixes build when pkgconfig is not installed; see #32185

Modified Paths:
--------------
    trunk/dports/devel/glib2-devel/Portfile

Added Paths:
-----------
    trunk/dports/devel/glib2-devel/files/patch-configure.diff

Removed Paths:
-------------
    trunk/dports/devel/glib2-devel/files/patch-configure.ac.diff

Modified: trunk/dports/devel/glib2-devel/Portfile
===================================================================
--- trunk/dports/devel/glib2-devel/Portfile	2011-11-24 19:20:29 UTC (rev 87537)
+++ trunk/dports/devel/glib2-devel/Portfile	2011-11-24 20:07:59 UTC (rev 87538)
@@ -33,7 +33,7 @@
 
 # ${prefix}/include/glib-2.0/glib/gi18n.h requires -I${prefix}/include to find libintl.h
 # See http://trac.macports.org/changeset/27148
-patchfiles                  patch-configure.ac.diff \
+patchfiles                  patch-configure.diff \
                             patch-glib-2.0.pc.in.diff \
                             patch-glib_gunicollate.c.diff \
                             patch-gi18n.h.diff \
@@ -51,8 +51,6 @@
                             lib/libz.dylib \
                             lib/libffi.dylib
 
-use_autoconf                yes
-
 # -lresolv is needed at least on Tiger PPC.
 configure.ldflags-append    -lresolv \
                             -bind_at_load

Deleted: trunk/dports/devel/glib2-devel/files/patch-configure.ac.diff
===================================================================
--- trunk/dports/devel/glib2-devel/files/patch-configure.ac.diff	2011-11-24 19:20:29 UTC (rev 87537)
+++ trunk/dports/devel/glib2-devel/files/patch-configure.ac.diff	2011-11-24 20:07:59 UTC (rev 87538)
@@ -1,239 +0,0 @@
---- configure.ac.orig	2011-09-06 09:07:24.000000000 -0500
-+++ configure.ac	2011-09-07 04:46:28.000000000 -0500
-@@ -3128,18 +3128,32 @@
- 	cat >>$outfile <<_______EOF
- #define G_HAVE_GINT64 1          /* deprecated, always true */
- 
--${glib_extension}typedef signed $gint64 gint64;
--${glib_extension}typedef unsigned $gint64 guint64;
-+#ifdef __LP64__
-+${glib_extension}typedef signed long gint64;
-+${glib_extension}typedef unsigned long guint64;
- 
--#define G_GINT64_CONSTANT(val)	$gint64_constant
--#define G_GUINT64_CONSTANT(val)	$guint64_constant
-+#define G_GINT64_CONSTANT(val)	(val##L)
-+#define G_GUINT64_CONSTANT(val)	(val##UL)
-+#else
-+${glib_extension}typedef signed long long gint64;
-+${glib_extension}typedef unsigned long long guint64;
-+
-+#define G_GINT64_CONSTANT(val)	(G_GNUC_EXTENSION (val##LL))
-+#define G_GUINT64_CONSTANT(val)	(G_GNUC_EXTENSION (val##ULL))
-+#endif
- _______EOF
- 
- 	if test x$gint64_format != x ; then
- 	  cat >>$outfile <<_______EOF
--#define G_GINT64_MODIFIER $gint64_modifier
--#define G_GINT64_FORMAT $gint64_format
--#define G_GUINT64_FORMAT $guint64_format
-+#ifdef __LP64__
-+#define G_GINT64_MODIFIER "l"
-+#define G_GINT64_FORMAT "li"
-+#define G_GUINT64_FORMAT "lu"
-+#else
-+#define G_GINT64_MODIFIER "ll"
-+#define G_GINT64_FORMAT "lli"
-+#define G_GUINT64_FORMAT "llu"
-+#endif
- _______EOF
-         else
- 	  cat >>$outfile <<_______EOF
-@@ -3151,9 +3165,15 @@
- 
-         cat >>$outfile <<_______EOF
- 
--#define GLIB_SIZEOF_VOID_P $glib_void_p
--#define GLIB_SIZEOF_LONG   $glib_long
--#define GLIB_SIZEOF_SIZE_T $glib_size_t
-+#ifdef __LP64__
-+#define GLIB_SIZEOF_VOID_P 8
-+#define GLIB_SIZEOF_LONG   8
-+#define GLIB_SIZEOF_SIZE_T 8
-+#else
-+#define GLIB_SIZEOF_VOID_P 4
-+#define GLIB_SIZEOF_LONG   4
-+#define GLIB_SIZEOF_SIZE_T 4
-+#endif
- 
- _______EOF
- 
-@@ -3181,18 +3201,33 @@
- 	if test -z "$glib_unknown_void_p"; then
- 	  cat >>$outfile <<_______EOF
- 
--#define GPOINTER_TO_INT(p)	((gint)  ${glib_gpi_cast} (p))
--#define GPOINTER_TO_UINT(p)	((guint) ${glib_gpui_cast} (p))
-+#ifdef __LP64__
-+#define GPOINTER_TO_INT(p)	((gint)  (glong) (p))
-+#define GPOINTER_TO_UINT(p)	((guint) (gulong) (p))
-+
-+#define GINT_TO_POINTER(i)	((gpointer) (glong) (i))
-+#define GUINT_TO_POINTER(u)	((gpointer) (gulong) (u))
-+
-+typedef signed long gintptr;
-+typedef unsigned long guintptr;
-+
-+#define G_GINTPTR_MODIFIER      "l"
-+#define G_GINTPTR_FORMAT        "li"
-+#define G_GUINTPTR_FORMAT       "lu"
-+#else
-+#define GPOINTER_TO_INT(p)	((gint)   (p))
-+#define GPOINTER_TO_UINT(p)	((guint)  (p))
- 
--#define GINT_TO_POINTER(i)	((gpointer) ${glib_gpi_cast} (i))
--#define GUINT_TO_POINTER(u)	((gpointer) ${glib_gpui_cast} (u))
-+#define GINT_TO_POINTER(i)	((gpointer)  (i))
-+#define GUINT_TO_POINTER(u)	((gpointer)  (u))
- 
--typedef signed $glib_intptr_type_define gintptr;
--typedef unsigned $glib_intptr_type_define guintptr;
-+typedef signed int gintptr;
-+typedef unsigned int guintptr;
- 
--#define G_GINTPTR_MODIFIER      $gintptr_modifier
--#define G_GINTPTR_FORMAT        $gintptr_format
--#define G_GUINTPTR_FORMAT       $guintptr_format
-+#define G_GINTPTR_MODIFIER      ""
-+#define G_GINTPTR_FORMAT        "i"
-+#define G_GUINTPTR_FORMAT       "u"
-+#endif
- _______EOF
- 	else
- 	  echo '#error SIZEOF_VOID_P unknown - This should never happen' >>$outfile
-@@ -3308,13 +3343,29 @@
- {
-   struct _GMutex *runtime_mutex;
-   union {
--    char   pad[[$g_mutex_sizeof]];
-+#ifdef __LP64__
-+    char   pad[[64]];
-+#else
-+    char   pad[[44]];
-+#endif
-     double dummy_double;
-     void  *dummy_pointer;
-     long   dummy_long;
-   } static_mutex;
- };
--#define	G_STATIC_MUTEX_INIT	{ NULL, { { $g_mutex_contents} } }
-+#ifdef __LP64__
-+#ifdef __BIG_ENDIAN__
-+#define	G_STATIC_MUTEX_INIT	{ NULL, { { 50,-86,-85,-89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } }
-+#else
-+#define	G_STATIC_MUTEX_INIT	{ NULL, { { -89,-85,-86,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } }
-+#endif
-+#else
-+#ifdef __BIG_ENDIAN__
-+#define	G_STATIC_MUTEX_INIT	{ NULL, { { 50,-86,-85,-89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } }
-+#else
-+#define	G_STATIC_MUTEX_INIT	{ NULL, { { -89,-85,-86,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } }
-+#endif
-+#endif
- #define	g_static_mutex_get_mutex(mutex) \\
-   (g_thread_use_default_impl ? ((GMutex*)(gpointer) ((mutex)->static_mutex.pad)) : \\
-    g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex)))
-@@ -3338,7 +3389,11 @@
- typedef union _GSystemThread GSystemThread;
- union _GSystemThread
- {
--  char   data[[$g_system_thread_sizeof]];
-+#ifdef __LP64__
-+  char   data[[8]];
-+#else
-+  char   data[[4]];
-+#endif
-   double dummy_double;
-   void  *dummy_pointer;
-   long   dummy_long;
-@@ -3346,7 +3401,9 @@
- _______EOF
- 	if test x"$g_memory_barrier_needed" != xno; then
- 	  echo >>$outfile
-+	  echo "#ifdef __BIG_ENDIAN__" >>$outfile
- 	  echo "#define G_ATOMIC_OP_MEMORY_BARRIER_NEEDED 1" >>$outfile
-+	  echo "#endif" >>$outfile
- 	fi
- 	if test x"$g_gcc_atomic_ops" != xno; then
-           echo >>$outfile
-@@ -3356,27 +3413,52 @@
- 	g_bit_sizes="16 32 64"
- 	for bits in $g_bit_sizes; do
- 	  cat >>$outfile <<_______EOF
--#define GINT${bits}_TO_${g_bs_native}(val)	((gint${bits}) (val))
--#define GUINT${bits}_TO_${g_bs_native}(val)	((guint${bits}) (val))
--#define GINT${bits}_TO_${g_bs_alien}(val)	((gint${bits}) GUINT${bits}_SWAP_LE_BE (val))
--#define GUINT${bits}_TO_${g_bs_alien}(val)	(GUINT${bits}_SWAP_LE_BE (val))
-+#ifdef __BIG_ENDIAN__
-+#define GINT${bits}_TO_BE(val)	((gint${bits}) (val))
-+#define GUINT${bits}_TO_BE(val)	((guint${bits}) (val))
-+#define GINT${bits}_TO_LE(val)	((gint${bits}) GUINT${bits}_SWAP_LE_BE (val))
-+#define GUINT${bits}_TO_LE(val)	(GUINT${bits}_SWAP_LE_BE (val))
-+#else
-+#define GINT${bits}_TO_LE(val)	((gint${bits}) (val))
-+#define GUINT${bits}_TO_LE(val)	((guint${bits}) (val))
-+#define GINT${bits}_TO_BE(val)	((gint${bits}) GUINT${bits}_SWAP_LE_BE (val))
-+#define GUINT${bits}_TO_BE(val)	(GUINT${bits}_SWAP_LE_BE (val))
-+#endif
- _______EOF
- 	done
- 
- 	cat >>$outfile <<_______EOF
--#define GLONG_TO_LE(val)	((glong) GINT${glongbits}_TO_LE (val))
--#define GULONG_TO_LE(val)	((gulong) GUINT${glongbits}_TO_LE (val))
--#define GLONG_TO_BE(val)	((glong) GINT${glongbits}_TO_BE (val))
--#define GULONG_TO_BE(val)	((gulong) GUINT${glongbits}_TO_BE (val))
-+#ifdef __LP64__
-+#define GLONG_TO_LE(val)	((glong) GINT64_TO_LE (val))
-+#define GULONG_TO_LE(val)	((gulong) GUINT64_TO_LE (val))
-+#define GLONG_TO_BE(val)	((glong) GINT64_TO_BE (val))
-+#define GULONG_TO_BE(val)	((gulong) GUINT64_TO_BE (val))
-+#else
-+#define GLONG_TO_LE(val)	((glong) GINT32_TO_LE (val))
-+#define GULONG_TO_LE(val)	((gulong) GUINT32_TO_LE (val))
-+#define GLONG_TO_BE(val)	((glong) GINT32_TO_BE (val))
-+#define GULONG_TO_BE(val)	((gulong) GUINT32_TO_BE (val))
-+#endif
- #define GINT_TO_LE(val)		((gint) GINT${gintbits}_TO_LE (val))
- #define GUINT_TO_LE(val)	((guint) GUINT${gintbits}_TO_LE (val))
- #define GINT_TO_BE(val)		((gint) GINT${gintbits}_TO_BE (val))
- #define GUINT_TO_BE(val)	((guint) GUINT${gintbits}_TO_BE (val))
--#define GSIZE_TO_LE(val)	((gsize) GUINT${gsizebits}_TO_LE (val))
--#define GSSIZE_TO_LE(val)	((gssize) GINT${gsizebits}_TO_LE (val))
--#define GSIZE_TO_BE(val)	((gsize) GUINT${gsizebits}_TO_BE (val))
--#define GSSIZE_TO_BE(val)	((gssize) GINT${gsizebits}_TO_BE (val))
--#define G_BYTE_ORDER $g_byte_order
-+#ifdef __LP64__
-+#define GSIZE_TO_LE(val)	((gsize) GUINT64_TO_LE (val))
-+#define GSSIZE_TO_LE(val)	((gssize) GINT64_TO_LE (val))
-+#define GSIZE_TO_BE(val)	((gsize) GUINT64_TO_BE (val))
-+#define GSSIZE_TO_BE(val)	((gssize) GINT64_TO_BE (val))
-+#else
-+#define GSIZE_TO_LE(val)	((gsize) GUINT32_TO_LE (val))
-+#define GSSIZE_TO_LE(val)	((gssize) GINT32_TO_LE (val))
-+#define GSIZE_TO_BE(val)	((gsize) GUINT32_TO_BE (val))
-+#define GSSIZE_TO_BE(val)	((gssize) GINT32_TO_BE (val))
-+#endif
-+#ifdef __BIG_ENDIAN__
-+#define G_BYTE_ORDER G_BIG_ENDIAN
-+#else
-+#define G_BYTE_ORDER G_LITTLE_ENDIAN
-+#endif
- 
- #define GLIB_SYSDEF_POLLIN =$g_pollin
- #define GLIB_SYSDEF_POLLOUT =$g_pollout
-@@ -3661,10 +3743,10 @@
- *)			glib_vacopy=''
- esac
- 
--if test x$glib_cv_va_val_copy = xno; then
-   glib_vacopy="\$glib_vacopy
--#define G_VA_COPY_AS_ARRAY 1"
--fi
-+#ifdef __LP64__
-+#define G_VA_COPY_AS_ARRAY 1
-+#endif"
- 
- if test x$glib_cv_hasinline = xyes; then
-     glib_inline='#define G_HAVE_INLINE 1'

Copied: trunk/dports/devel/glib2-devel/files/patch-configure.diff (from rev 87537, trunk/dports/devel/glib2-devel/files/patch-configure.ac.diff)
===================================================================
--- trunk/dports/devel/glib2-devel/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/devel/glib2-devel/files/patch-configure.diff	2011-11-24 20:07:59 UTC (rev 87538)
@@ -0,0 +1,239 @@
+--- configure.orig	2011-11-11 16:11:52.000000000 -0600
++++ configure	2011-11-24 01:26:58.000000000 -0600
+@@ -30485,10 +30485,10 @@
+ *)			glib_vacopy=''
+ esac
+ 
+-if test x$glib_cv_va_val_copy = xno; then
+   glib_vacopy="\$glib_vacopy
+-#define G_VA_COPY_AS_ARRAY 1"
+-fi
++#ifdef __LP64__
++#define G_VA_COPY_AS_ARRAY 1
++#endif"
+ 
+ if test x$glib_cv_hasinline = xyes; then
+     glib_inline='#define G_HAVE_INLINE 1'
+@@ -32262,18 +32262,32 @@
+ 	cat >>$outfile <<_______EOF
+ #define G_HAVE_GINT64 1          /* deprecated, always true */
+ 
+-${glib_extension}typedef signed $gint64 gint64;
+-${glib_extension}typedef unsigned $gint64 guint64;
++#ifdef __LP64__
++${glib_extension}typedef signed long gint64;
++${glib_extension}typedef unsigned long guint64;
++
++#define G_GINT64_CONSTANT(val)	(val##L)
++#define G_GUINT64_CONSTANT(val)	(val##UL)
++#else
++${glib_extension}typedef signed long long gint64;
++${glib_extension}typedef unsigned long long guint64;
+ 
+-#define G_GINT64_CONSTANT(val)	$gint64_constant
+-#define G_GUINT64_CONSTANT(val)	$guint64_constant
++#define G_GINT64_CONSTANT(val)	(G_GNUC_EXTENSION (val##LL))
++#define G_GUINT64_CONSTANT(val)	(G_GNUC_EXTENSION (val##ULL))
++#endif
+ _______EOF
+ 
+ 	if test x$gint64_format != x ; then
+ 	  cat >>$outfile <<_______EOF
+-#define G_GINT64_MODIFIER $gint64_modifier
+-#define G_GINT64_FORMAT $gint64_format
+-#define G_GUINT64_FORMAT $guint64_format
++#ifdef __LP64__
++#define G_GINT64_MODIFIER "l"
++#define G_GINT64_FORMAT "li"
++#define G_GUINT64_FORMAT "lu"
++#else
++#define G_GINT64_MODIFIER "ll"
++#define G_GINT64_FORMAT "lli"
++#define G_GUINT64_FORMAT "llu"
++#endif
+ _______EOF
+         else
+ 	  cat >>$outfile <<_______EOF
+@@ -32285,9 +32299,15 @@
+ 
+         cat >>$outfile <<_______EOF
+ 
+-#define GLIB_SIZEOF_VOID_P $glib_void_p
+-#define GLIB_SIZEOF_LONG   $glib_long
+-#define GLIB_SIZEOF_SIZE_T $glib_size_t
++#ifdef __LP64__
++#define GLIB_SIZEOF_VOID_P 8
++#define GLIB_SIZEOF_LONG   8
++#define GLIB_SIZEOF_SIZE_T 8
++#else
++#define GLIB_SIZEOF_VOID_P 4
++#define GLIB_SIZEOF_LONG   4
++#define GLIB_SIZEOF_SIZE_T 4
++#endif
+ 
+ _______EOF
+ 
+@@ -32315,18 +32335,33 @@
+ 	if test -z "$glib_unknown_void_p"; then
+ 	  cat >>$outfile <<_______EOF
+ 
+-#define GPOINTER_TO_INT(p)	((gint)  ${glib_gpi_cast} (p))
+-#define GPOINTER_TO_UINT(p)	((guint) ${glib_gpui_cast} (p))
++#ifdef __LP64__
++#define GPOINTER_TO_INT(p)	((gint)  (glong) (p))
++#define GPOINTER_TO_UINT(p)	((guint) (gulong) (p))
++
++#define GINT_TO_POINTER(i)	((gpointer) (glong) (i))
++#define GUINT_TO_POINTER(u)	((gpointer) (gulong) (u))
++
++typedef signed long gintptr;
++typedef unsigned long guintptr;
++
++#define G_GINTPTR_MODIFIER      "l"
++#define G_GINTPTR_FORMAT        "li"
++#define G_GUINTPTR_FORMAT       "lu"
++#else
++#define GPOINTER_TO_INT(p)	((gint)   (p))
++#define GPOINTER_TO_UINT(p)	((guint)  (p))
+ 
+-#define GINT_TO_POINTER(i)	((gpointer) ${glib_gpi_cast} (i))
+-#define GUINT_TO_POINTER(u)	((gpointer) ${glib_gpui_cast} (u))
++#define GINT_TO_POINTER(i)	((gpointer)  (i))
++#define GUINT_TO_POINTER(u)	((gpointer)  (u))
+ 
+-typedef signed $glib_intptr_type_define gintptr;
+-typedef unsigned $glib_intptr_type_define guintptr;
++typedef signed int gintptr;
++typedef unsigned int guintptr;
+ 
+-#define G_GINTPTR_MODIFIER      $gintptr_modifier
+-#define G_GINTPTR_FORMAT        $gintptr_format
+-#define G_GUINTPTR_FORMAT       $guintptr_format
++#define G_GINTPTR_MODIFIER      ""
++#define G_GINTPTR_FORMAT        "i"
++#define G_GUINTPTR_FORMAT       "u"
++#endif
+ _______EOF
+ 	else
+ 	  echo '#error SIZEOF_VOID_P unknown - This should never happen' >>$outfile
+@@ -32442,13 +32477,29 @@
+ {
+   struct _GMutex *runtime_mutex;
+   union {
+-    char   pad[$g_mutex_sizeof];
++#ifdef __LP64__
++    char   pad[64];
++#else
++    char   pad[44];
++#endif
+     double dummy_double;
+     void  *dummy_pointer;
+     long   dummy_long;
+   } static_mutex;
+ };
+-#define	G_STATIC_MUTEX_INIT	{ NULL, { { $g_mutex_contents} } }
++#ifdef __LP64__
++#ifdef __BIG_ENDIAN__
++#define	G_STATIC_MUTEX_INIT	{ NULL, { { 50,-86,-85,-89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } }
++#else
++#define	G_STATIC_MUTEX_INIT	{ NULL, { { -89,-85,-86,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } }
++#endif
++#else
++#ifdef __BIG_ENDIAN__
++#define	G_STATIC_MUTEX_INIT	{ NULL, { { 50,-86,-85,-89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } }
++#else
++#define	G_STATIC_MUTEX_INIT	{ NULL, { { -89,-85,-86,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } }
++#endif
++#endif
+ #define	g_static_mutex_get_mutex(mutex) \\
+   (g_thread_use_default_impl ? ((GMutex*)(gpointer) ((mutex)->static_mutex.pad)) : \\
+    g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex)))
+@@ -32472,7 +32523,11 @@
+ typedef union _GSystemThread GSystemThread;
+ union _GSystemThread
+ {
+-  char   data[$g_system_thread_sizeof];
++#ifdef __LP64__
++  char   data[8];
++#else
++  char   data[4];
++#endif
+   double dummy_double;
+   void  *dummy_pointer;
+   long   dummy_long;
+@@ -32480,7 +32535,9 @@
+ _______EOF
+ 	if test x"$g_memory_barrier_needed" != xno; then
+ 	  echo >>$outfile
++	  echo "#ifdef __BIG_ENDIAN__" >>$outfile
+ 	  echo "#define G_ATOMIC_OP_MEMORY_BARRIER_NEEDED 1" >>$outfile
++	  echo "#endif" >>$outfile
+ 	fi
+ 	if test x"$g_gcc_atomic_ops" != xno; then
+           echo >>$outfile
+@@ -32490,27 +32547,52 @@
+ 	g_bit_sizes="16 32 64"
+ 	for bits in $g_bit_sizes; do
+ 	  cat >>$outfile <<_______EOF
+-#define GINT${bits}_TO_${g_bs_native}(val)	((gint${bits}) (val))
+-#define GUINT${bits}_TO_${g_bs_native}(val)	((guint${bits}) (val))
+-#define GINT${bits}_TO_${g_bs_alien}(val)	((gint${bits}) GUINT${bits}_SWAP_LE_BE (val))
+-#define GUINT${bits}_TO_${g_bs_alien}(val)	(GUINT${bits}_SWAP_LE_BE (val))
++#ifdef __BIG_ENDIAN__
++#define GINT${bits}_TO_BE(val)	((gint${bits}) (val))
++#define GUINT${bits}_TO_BE(val)	((guint${bits}) (val))
++#define GINT${bits}_TO_LE(val)	((gint${bits}) GUINT${bits}_SWAP_LE_BE (val))
++#define GUINT${bits}_TO_LE(val)	(GUINT${bits}_SWAP_LE_BE (val))
++#else
++#define GINT${bits}_TO_LE(val)	((gint${bits}) (val))
++#define GUINT${bits}_TO_LE(val)	((guint${bits}) (val))
++#define GINT${bits}_TO_BE(val)	((gint${bits}) GUINT${bits}_SWAP_LE_BE (val))
++#define GUINT${bits}_TO_BE(val)	(GUINT${bits}_SWAP_LE_BE (val))
++#endif
+ _______EOF
+ 	done
+ 
+ 	cat >>$outfile <<_______EOF
+-#define GLONG_TO_LE(val)	((glong) GINT${glongbits}_TO_LE (val))
+-#define GULONG_TO_LE(val)	((gulong) GUINT${glongbits}_TO_LE (val))
+-#define GLONG_TO_BE(val)	((glong) GINT${glongbits}_TO_BE (val))
+-#define GULONG_TO_BE(val)	((gulong) GUINT${glongbits}_TO_BE (val))
++#ifdef __LP64__
++#define GLONG_TO_LE(val)	((glong) GINT64_TO_LE (val))
++#define GULONG_TO_LE(val)	((gulong) GUINT64_TO_LE (val))
++#define GLONG_TO_BE(val)	((glong) GINT64_TO_BE (val))
++#define GULONG_TO_BE(val)	((gulong) GUINT64_TO_BE (val))
++#else
++#define GLONG_TO_LE(val)	((glong) GINT32_TO_LE (val))
++#define GULONG_TO_LE(val)	((gulong) GUINT32_TO_LE (val))
++#define GLONG_TO_BE(val)	((glong) GINT32_TO_BE (val))
++#define GULONG_TO_BE(val)	((gulong) GUINT32_TO_BE (val))
++#endif
+ #define GINT_TO_LE(val)		((gint) GINT${gintbits}_TO_LE (val))
+ #define GUINT_TO_LE(val)	((guint) GUINT${gintbits}_TO_LE (val))
+ #define GINT_TO_BE(val)		((gint) GINT${gintbits}_TO_BE (val))
+ #define GUINT_TO_BE(val)	((guint) GUINT${gintbits}_TO_BE (val))
+-#define GSIZE_TO_LE(val)	((gsize) GUINT${gsizebits}_TO_LE (val))
+-#define GSSIZE_TO_LE(val)	((gssize) GINT${gsizebits}_TO_LE (val))
+-#define GSIZE_TO_BE(val)	((gsize) GUINT${gsizebits}_TO_BE (val))
+-#define GSSIZE_TO_BE(val)	((gssize) GINT${gsizebits}_TO_BE (val))
+-#define G_BYTE_ORDER $g_byte_order
++#ifdef __LP64__
++#define GSIZE_TO_LE(val)	((gsize) GUINT64_TO_LE (val))
++#define GSSIZE_TO_LE(val)	((gssize) GINT64_TO_LE (val))
++#define GSIZE_TO_BE(val)	((gsize) GUINT64_TO_BE (val))
++#define GSSIZE_TO_BE(val)	((gssize) GINT64_TO_BE (val))
++#else
++#define GSIZE_TO_LE(val)	((gsize) GUINT32_TO_LE (val))
++#define GSSIZE_TO_LE(val)	((gssize) GINT32_TO_LE (val))
++#define GSIZE_TO_BE(val)	((gsize) GUINT32_TO_BE (val))
++#define GSSIZE_TO_BE(val)	((gssize) GINT32_TO_BE (val))
++#endif
++#ifdef __BIG_ENDIAN__
++#define G_BYTE_ORDER G_BIG_ENDIAN
++#else
++#define G_BYTE_ORDER G_LITTLE_ENDIAN
++#endif
+ 
+ #define GLIB_SYSDEF_POLLIN =$g_pollin
+ #define GLIB_SYSDEF_POLLOUT =$g_pollout
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111124/23c4855b/attachment-0001.html>


More information about the macports-changes mailing list