Index: files/patch-universal.diff
===================================================================
--- files/patch-universal.diff	(révision 0)
+++ files/patch-universal.diff	(révision 0)
@@ -0,0 +1,251 @@
+--- include/apr.h.in.orig	2009-09-06 15:41:03.000000000 +0200
++++ include/apr.h.in	2009-09-06 15:44:35.000000000 +0200
+@@ -277,8 +277,13 @@
+ typedef  @int_value@             apr_int32_t;
+ typedef  unsigned @int_value@    apr_uint32_t;
+ 
+-typedef  @long_value@            apr_int64_t;
+-typedef  unsigned @long_value@   apr_uint64_t;
++#ifdef __LP64__
++typedef  long            apr_int64_t;
++typedef  unsigned long   apr_uint64_t;
++#else
++typedef  long long            apr_int64_t;
++typedef  unsigned long long   apr_uint64_t;
++#endif
+ 
+ typedef  @size_t_value@          apr_size_t;
+ typedef  @ssize_t_value@         apr_ssize_t;
+@@ -286,7 +291,11 @@
+ typedef  @socklen_t_value@       apr_socklen_t;
+ typedef  @ino_t_value@           apr_ino_t;
+ 
+-#define APR_SIZEOF_VOIDP @voidp_size@
++#ifdef __LP64__
++#define APR_SIZEOF_VOIDP 8
++#else
++#define APR_SIZEOF_VOIDP 4
++#endif
+ 
+ #if APR_SIZEOF_VOIDP == 8
+ typedef  apr_uint64_t            apr_uintptr_t;
+@@ -295,11 +304,20 @@
+ #endif
+ 
+ /* Are we big endian? */
+-#define APR_IS_BIGENDIAN	@bigendian@
++#ifdef __BIG_ENDIAN__
++#define APR_IS_BIGENDIAN	1
++#else
++#define APR_IS_BIGENDIAN	0
++#endif
+ 
+ /* Mechanisms to properly type numeric literals */
+-@int64_literal@
+-@uint64_literal@
++#ifdef __LP64__
++#define APR_INT64_C(val) (val##L)
++#define APR_UINT64_C(val) (val##UL)
++#else
++#define APR_INT64_C(val) (val##LL)
++#define APR_UINT64_C(val) (val##ULL)
++#endif
+ 
+ #ifdef INT16_MIN
+ #define APR_INT16_MIN   INT16_MIN
+@@ -448,19 +466,31 @@
+ @size_t_fmt@
+ 
+ /* And APR_OFF_T_FMT */
+-@off_t_fmt@
++#define APR_OFF_T_FMT APR_INT64_T_FMT
+ 
+ /* And APR_PID_T_FMT */
+ @pid_t_fmt@
+ 
+ /* And APR_INT64_T_FMT */
+-@int64_t_fmt@
++#ifdef __LP64__
++#define APR_INT64_T_FMT "ld"
++#else
++#define APR_INT64_T_FMT "lld"
++#endif
+ 
+ /* And APR_UINT64_T_FMT */
+-@uint64_t_fmt@
++#ifdef __LP64__
++#define APR_UINT64_T_FMT "lu"
++#else
++#define APR_UINT64_T_FMT "llu"
++#endif
+ 
+ /* And APR_UINT64_T_HEX_FMT */
+-@uint64_t_hex_fmt@
++#ifdef __LP64__
++#define APR_UINT64_T_HEX_FMT "lx"
++#else
++#define APR_UINT64_T_HEX_FMT "llx"
++#endif
+ 
+ /* Does the proc mutex lock threads too */
+ #define APR_PROC_MUTEX_IS_GLOBAL      @proc_mutex_is_global@
+--- include/arch/unix/apr_private.h.in.orig	2009-09-06 15:45:07.000000000 +0200
++++ include/arch/unix/apr_private.h.in	2009-09-06 15:48:21.000000000 +0200
+@@ -5,10 +5,14 @@
+ 
+ /* Define as function which can be used for conversion of strings to
+    apr_int64_t */
+-#undef APR_INT64_STRFN
++#ifdef __LP64__
++#define APR_INT64_STRFN strtol
++#else
++#define APR_INT64_STRFN strtoll
++#endif
+ 
+ /* Define as function used for conversion of strings to apr_off_t */
+-#undef APR_OFF_T_STRFN
++#define APR_OFF_T_STRFN APR_INT64_STRFN
+ 
+ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+    systems. This function is required for `alloca.c' support on those systems.
+@@ -744,7 +748,11 @@
+ #undef READDIR_IS_THREAD_SAFE
+ 
+ /* Define to 1 if the `setpgrp' function takes no argument. */
+-#undef SETPGRP_VOID
++#ifdef __DARWIN_UNIX03
++#define SETPGRP_VOID 1
++#else
++/* #undef SETPGRP_VOID */
++#endif
+ 
+ /* */
+ #undef SIGWAIT_TAKES_ONE_ARG
+@@ -756,7 +764,11 @@
+ #undef SIZEOF_INT
+ 
+ /* The size of `long', as computed by sizeof. */
+-#undef SIZEOF_LONG
++#ifdef __LP64__
++#define SIZEOF_LONG 8
++#else
++#define SIZEOF_LONG 4
++#endif
+ 
+ /* The size of `long long', as computed by sizeof. */
+ #undef SIZEOF_LONG_LONG
+@@ -771,16 +783,28 @@
+ #undef SIZEOF_SHORT
+ 
+ /* The size of size_t */
+-#undef SIZEOF_SIZE_T
++#ifdef __LP64__
++#define SIZEOF_SIZE_T 8
++#else
++#define SIZEOF_SIZE_T 4
++#endif
+ 
+ /* The size of ssize_t */
+-#undef SIZEOF_SSIZE_T
++#ifdef __LP64__
++#define SIZEOF_SSIZE_T 8
++#else
++#define SIZEOF_SSIZE_T 4
++#endif
+ 
+ /* The size of struct iovec */
+ #undef SIZEOF_STRUCT_IOVEC
+ 
+ /* The size of `void*', as computed by sizeof. */
+-#undef SIZEOF_VOIDP
++#ifdef __LP64__
++#define SIZEOF_VOIDP 8
++#else
++#define SIZEOF_VOIDP 4
++#endif
+ 
+ /* If using the C implementation of alloca, define if you know the
+    direction of stack growth for your system; otherwise it will be
+@@ -800,7 +824,7 @@
+ #undef SYSVSEM_IS_GLOBAL
+ 
+ /* Define if use of generic atomics is requested */
+-#undef USE_ATOMICS_GENERIC
++/* #undef USE_ATOMICS_GENERIC */
+ 
+ /* Define if BeOS Semaphores will be used */
+ #undef USE_BEOSSEM
+--- configure.orig	2009-09-06 15:49:06.000000000 +0200
++++ configure	2009-09-06 15:50:44.000000000 +0200
+@@ -25775,7 +25775,6 @@
+ if test $force_generic_atomics = yes; then
+ 
+ cat >>confdefs.h <<\_ACEOF
+-#define USE_ATOMICS_GENERIC 1
+ _ACEOF
+ 
+ fi
+@@ -32905,7 +32904,6 @@
+ 
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
+ _ACEOF
+ 
+ 
+@@ -35524,7 +35522,6 @@
+ if test $ac_cv_func_setpgrp_void = yes; then
+ 
+ cat >>confdefs.h <<\_ACEOF
+-#define SETPGRP_VOID 1
+ _ACEOF
+ 
+ fi
+@@ -35961,7 +35958,6 @@
+ 
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
+ _ACEOF
+ 
+ 
+@@ -37047,7 +37043,6 @@
+ 
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define SIZEOF_LONG $ac_cv_sizeof_long
+ _ACEOF
+ 
+ 
+@@ -38332,7 +38327,6 @@
+ $as_echo "$ac_cv_sizeof_ssize_t" >&6; }
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define SIZEOF_SSIZE_T $ac_cv_sizeof_ssize_t
+ _ACEOF
+ 
+ 
+@@ -38423,7 +38417,6 @@
+ $as_echo "$ac_cv_sizeof_size_t" >&6; }
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
+ _ACEOF
+ 
+ 
+@@ -40180,7 +40173,6 @@
+ if test "$have_int64_strfn" = "1"; then
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define APR_INT64_STRFN $int64_strfn
+ _ACEOF
+ 
+ fi
+@@ -40198,7 +40190,6 @@
+ fi
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define APR_OFF_T_STRFN $off_t_strfn
+ _ACEOF
+ 
+ 
Index: Portfile
===================================================================
--- Portfile	(révision 57086)
+++ Portfile	(copie de travail)
@@ -33,6 +33,14 @@
 	use_parallel_build	no
 }
 
+if {[variant_isset universal]} {
+	patchfiles-append	patch-universal.diff
+
+	post-destroot {
+		reinplace {s/-arch .*//} ${destroot}${prefix}/share/apr-1/build/apr_rules.mk
+	}
+}
+
 livecheck.check regex
 livecheck.url   http://apache.org/dist/apr/
 livecheck.regex {<a href="#apr">APR (\d+(?:\.\d+)*) is the latest available version</a>}
