SF.net SVN: gar:[26783] csw/mgar/pkg/apr/trunk
dmichelsen at users.sourceforge.net
dmichelsen at users.sourceforge.net
Thu Sep 9 12:19:04 CEST 2021
Revision: 26783
http://sourceforge.net/p/gar/code/26783
Author: dmichelsen
Date: 2021-09-09 10:19:04 +0000 (Thu, 09 Sep 2021)
Log Message:
-----------
apr/trunk: Apply 64 bit patch from Franz Sirl
Modified Paths:
--------------
csw/mgar/pkg/apr/trunk/Makefile
Added Paths:
-----------
csw/mgar/pkg/apr/trunk/files/0001-Define-__EXTENSIONS__-so-that-also-all-apr.h-users-g.patch
csw/mgar/pkg/apr/trunk/files/0002-Define-_FILE_OFFSET_BITS-64-so-that-subversion-can-a.patch
csw/mgar/pkg/apr/trunk/files/apr.h
Modified: csw/mgar/pkg/apr/trunk/Makefile
===================================================================
--- csw/mgar/pkg/apr/trunk/Makefile 2021-09-08 10:49:21 UTC (rev 26782)
+++ csw/mgar/pkg/apr/trunk/Makefile 2021-09-09 10:19:04 UTC (rev 26783)
@@ -11,10 +11,29 @@
MASTER_SITES = http://mirrors.ae-online.de/apache/apr/
DISTFILES = $(NAME)-$(VERSION).tar.gz
+# apr.h needs PATH_MAX from limits.h defined, otherwise it will #error.
+# So define __EXTENSIONS__ in build/apr_hints.m4 to make sure
+# it is propagated to all users via 'apr-1-config --cppflags'.
+# Acutually 'configure' checks for and enables __EXTENSIONS__, but it
+# doesn't end up in 'apr-1-config --cppflags' without this patch.
+PATCHFILES += 0001-Define-__EXTENSIONS__-so-that-also-all-apr.h-users-g.patch
+# apr usually uses -D_LARGEFILE64_SOURCE to get support for large files
+# on 32-bit OSes.
+# Unfortunately this still doesn't support filesystems (eg. NFS) with
+# 64-bit directory "cookies". For this to work we need
+# to define _FILE_OFFSET_BITS=64 for apr and it's users via build/apr_hints.m4.
+# (!!!) If you enable this patch, you need to also rebuild the whole
+# dependency tree that depends on apr.
+#PATCHFILES-32 += 0002-Define-_FILE_OFFSET_BITS-64-so-that-subversion-can-a.patch
+PATCHFILES += $(PATCHFILES-$(MEMORYMODEL))
LICENSE = LICENSE
VENDOR_URL = https://apr.apache.org/
+BUILD_DEP_PKGS += CSWautoconf
+BUILD_DEP_PKGS += CSWautomake
+BUILD_DEP_PKGS += CSWlibtool
+
PACKAGES += CSWlibapr1-0
SPKG_DESC_CSWlibapr1-0 = Apache portable runtime, libapr-1.so.0
PKGFILES_CSWlibapr1-0 += $(call pkgfiles_lib,libapr-1.so.0)
@@ -48,8 +67,21 @@
EXTRA_MERGE_DIRS_isa-extra = $(libexecdir)
+EXTRA_PAX_ARGS-32 = -s ",^\.$(includedir)/apr.h$$,.$(includedir)/apr-32.h,p"
+EXTRA_PAX_ARGS-64 = -s ",^\.$(includedir)/apr.h$$,.$(includedir)/apr-64.h,p"
+EXTRA_PAX_ARGS = $(EXTRA_PAX_ARGS-$(MEMORYMODEL))
+
include gar/category.mk
+# trigger re-configuration because of the build/apr_hints.m4 changes
+pre-configure-modulated:
+ @(cd $(WORKSRC); ./buildconf )
+ @$(MAKECOOKIE)
+
+post-merge:
+ ginstall $(FILEDIR)/apr.h $(PKGROOT)$(includedir)/apr.h
+ @$(MAKECOOKIE)
+
post-install-modulated:
perl -pi -e 's,/usr/local/lib,$(libdir),g;' \
-e 's,#! /bin/bash,#!$(bindir_install)/bash,g;' \
Added: csw/mgar/pkg/apr/trunk/files/0001-Define-__EXTENSIONS__-so-that-also-all-apr.h-users-g.patch
===================================================================
--- csw/mgar/pkg/apr/trunk/files/0001-Define-__EXTENSIONS__-so-that-also-all-apr.h-users-g.patch (rev 0)
+++ csw/mgar/pkg/apr/trunk/files/0001-Define-__EXTENSIONS__-so-that-also-all-apr.h-users-g.patch 2021-09-09 10:19:04 UTC (rev 26783)
@@ -0,0 +1,26 @@
+From 5990f4150c662657a508ef3715378ab825707b3d Mon Sep 17 00:00:00 2001
+From: Franz Sirl <franz.sirl at lauterbach.com>
+Date: Fri, 23 Apr 2021 12:42:57 +0200
+Subject: [PATCH 1/2] Define __EXTENSIONS__ so that also all apr.h users get
+ PATH_MAX from limits.h.
+
+---
+ build/apr_hints.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/apr_hints.m4 b/build/apr_hints.m4
+index fd3d33d..ba53663 100644
+--- a/build/apr_hints.m4
++++ b/build/apr_hints.m4
+@@ -236,7 +236,7 @@ dnl # Not a problem in 10.20. Otherwise, who knows?
+ ;;
+ *-solaris2*)
+ PLATOSVERS=`echo $host | sed 's/^.*solaris2.//'`
+- APR_ADDTO(CPPFLAGS, [-DSOLARIS2=$PLATOSVERS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT])
++ APR_ADDTO(CPPFLAGS, [-DSOLARIS2=$PLATOSVERS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D__EXTENSIONS__])
+ if test $PLATOSVERS -eq 10; then
+ # pthread_mutex_timedlock is broken on Solaris 10.
+ # It can block without timeout in case of EDEADLK.
+--
+2.3.1
+
Added: csw/mgar/pkg/apr/trunk/files/0002-Define-_FILE_OFFSET_BITS-64-so-that-subversion-can-a.patch
===================================================================
--- csw/mgar/pkg/apr/trunk/files/0002-Define-_FILE_OFFSET_BITS-64-so-that-subversion-can-a.patch (rev 0)
+++ csw/mgar/pkg/apr/trunk/files/0002-Define-_FILE_OFFSET_BITS-64-so-that-subversion-can-a.patch 2021-09-09 10:19:04 UTC (rev 26783)
@@ -0,0 +1,26 @@
+From 840c0a96376c8028490e4cf04cc7046703b55a50 Mon Sep 17 00:00:00 2001
+From: Franz Sirl <franz.sirl at lauterbach.com>
+Date: Fri, 23 Apr 2021 12:45:51 +0200
+Subject: [PATCH 2/2] Define _FILE_OFFSET_BITS=64 so that subversion can also
+ work against newer NFS servers.
+
+---
+ build/apr_hints.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/apr_hints.m4 b/build/apr_hints.m4
+index ba53663..0c3437f 100644
+--- a/build/apr_hints.m4
++++ b/build/apr_hints.m4
+@@ -236,7 +236,7 @@ dnl # Not a problem in 10.20. Otherwise, who knows?
+ ;;
+ *-solaris2*)
+ PLATOSVERS=`echo $host | sed 's/^.*solaris2.//'`
+- APR_ADDTO(CPPFLAGS, [-DSOLARIS2=$PLATOSVERS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D__EXTENSIONS__])
++ APR_ADDTO(CPPFLAGS, [-DSOLARIS2=$PLATOSVERS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D__EXTENSIONS__ -D_FILE_OFFSET_BITS=64])
+ if test $PLATOSVERS -eq 10; then
+ # pthread_mutex_timedlock is broken on Solaris 10.
+ # It can block without timeout in case of EDEADLK.
+--
+2.3.1
+
Added: csw/mgar/pkg/apr/trunk/files/apr.h
===================================================================
--- csw/mgar/pkg/apr/trunk/files/apr.h (rev 0)
+++ csw/mgar/pkg/apr/trunk/files/apr.h 2021-09-09 10:19:04 UTC (rev 26783)
@@ -0,0 +1,6 @@
+/* Allow 32 and 64 bit headers to coexist */
+#if defined __amd64 || defined __x86_64 || defined __sparcv9
+# include <apr-64.h>
+#else
+# include <apr-32.h>
+#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list