[59152] trunk/dports/devel/apr
nox at macports.org
nox at macports.org
Sat Oct 10 07:41:20 PDT 2009
Revision: 59152
http://trac.macports.org/changeset/59152
Author: nox at macports.org
Date: 2009-10-10 07:41:17 -0700 (Sat, 10 Oct 2009)
Log Message:
-----------
apr: Fix universal support (closes #17090).
Modified Paths:
--------------
trunk/dports/devel/apr/Portfile
Added Paths:
-----------
trunk/dports/devel/apr/files/
trunk/dports/devel/apr/files/patch-universal.diff
Modified: trunk/dports/devel/apr/Portfile
===================================================================
--- trunk/dports/devel/apr/Portfile 2009-10-10 14:14:18 UTC (rev 59151)
+++ trunk/dports/devel/apr/Portfile 2009-10-10 14:41:17 UTC (rev 59152)
@@ -24,7 +24,9 @@
use_parallel_build yes
configure.env ac_cv_prog_AWK=awk lt_cv_path_SED=sed
-configure.args --with-installbuilddir=${prefix}/share/apr-1/build
+configure.args --with-installbuilddir=${prefix}/share/apr-1/build \
+ --enable-nonportable-atomics \
+ ac_cv_func_setpgrp_void=no
test.run yes
test.target check
@@ -33,6 +35,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.type regex
livecheck.url http://apache.org/dist/apr/
livecheck.regex {<a href="#apr">APR (\d+(?:\.\d+)*) is the latest available version</a>}
Added: trunk/dports/devel/apr/files/patch-universal.diff
===================================================================
--- trunk/dports/devel/apr/files/patch-universal.diff (rev 0)
+++ trunk/dports/devel/apr/files/patch-universal.diff 2009-10-10 14:41:17 UTC (rev 59152)
@@ -0,0 +1,181 @@
+--- include/apr.h.in.orig 2009-10-10 16:23:37.000000000 +0200
++++ include/apr.h.in 2009-10-10 16:26:17.000000000 +0200
+@@ -239,7 +239,11 @@
+ #define APR_HAS_UNICODE_FS @have_unicode_fs@
+ #define APR_HAS_PROC_INVOKED @have_proc_invoked@
+ #define APR_HAS_USER 1
+-#define APR_HAS_LARGE_FILES @aprlfs@
++#ifdef __LP64__
++#define APR_HAS_LARGE_FILES 0
++#else
++#define APR_HAS_LARGE_FILES 1
++#endif
+ #define APR_HAS_XTHREAD_FILES 0
+ #define APR_HAS_OS_UUID @osuuid@
+
+@@ -277,8 +281,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 +295,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 +308,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 */
+- at int64_literal@
+- at 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 +470,31 @@
+ @size_t_fmt@
+
+ /* And APR_OFF_T_FMT */
+- at 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 */
+- at int64_t_fmt@
++#ifdef __LP64__
++#define APR_INT64_T_FMT "ld"
++#else
++#define APR_INT64_T_FMT "lld"
++#endif
+
+ /* And APR_UINT64_T_FMT */
+- at 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 */
+- at 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-10-10 16:24:54.000000000 +0200
++++ include/arch/unix/apr_private.h.in 2009-10-10 16:25:26.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.
+@@ -747,7 +751,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
+@@ -759,7 +767,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
+@@ -774,16 +786,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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091010/856a8fff/attachment.html>
More information about the macports-changes
mailing list