Hi All,

I'm packaging APR, APU, and apr-iconv, for our distro, SourceMage. I thought I'll post the fixes we have to do to APR so that we could build APU and Apache 2 having no APR source. First of all, the patch attached (build.diff) installs more files that are needed by APU (most of them) and apr-iconv (mkdir.sh). Then, the following triage fixes the paths that point an non-existent (by the time APU is built) source, and the problem of libtool being called from the wrong dir:

  ln /usr/share/apache2/build/libtool /usr/share/apache2/
  FIX_PATH_REGEX='s|/usr/src/apr-[^/"]*|/usr/share/apache2|' &&
  sedit $FIX_PATH_REGEX /usr/bin/apr-config  &&
  sedit $FIX_PATH_REGEX /usr/share/apache2/build/apr_rules.mk

The libtool problem is as follows: apr_rules.mk uses LIBTOOL macro that expands with $(top_builddir) from original libtool.m4, which is replaced with $(apr_builddir) by the APR installation scripts. The apr_builddir points at /usr/share/apache2, while libtool is installed at /usr/share/apache2/build. I think the libtool installation directory must be /usr/share/apache2 because the general assumption is that whereever libtool is, build macros like apr_rules.mk, are in <libtool location>/build.
or I hope this makes sense. It may be related to bugs 14547 or 14548 for config.status.


Another patch attached (Makefile.diff) is for apr-iconv. apr-iconv uses two different wayt to invoke linker in different Makefile-s, and the one used in lib/ subdirectory doesn't work unless libdir variable is initialized properly. I don't know why it doesn't propagate from the root Makefile.

Thank you!

Sergey,
SourceMage GNU/Linux.
diff -purN apr-0.9.4/Makefile.in apr/Makefile.in
--- apr-0.9.4/Makefile.in       2003-07-04 18:45:37.000000000 -0400
+++ apr/Makefile.in     2003-07-05 01:08:44.000000000 -0400
@@ -83,9 +83,11 @@ install: $(TARGET_LIB)
        if [ -f shlibtool ]; then \
                $(LIBTOOL) --mode=install cp shlibtool 
$(DESTDIR)$(installbuilddir); \
        fi;
-       if [ -f build/apr_rules.mk ]; then \
-               cp build/apr_rules.mk $(DESTDIR)$(installbuilddir); \
-       fi;
+       for f in apr_common.m4 apr_rules.mk config.guess config.sub find_apr.m4 
install.sh make_exports.awk make_var_export.awk mkdir.sh; do \
+               if [ -f build/$$f ]; then \
+                       cp build/$$f $(DESTDIR)$(installbuilddir); \
+               fi \
+       done;
 
        if [ ! -d $(DESTDIR)$(bindir) ]; then \
            $(top_srcdir)/build/mkdir.sh $(DESTDIR)$(bindir); \
diff -purN apr-iconv-0.9.4/lib/Makefile.in apr-iconv/lib/Makefile.in
--- apr-iconv-0.9.4/lib/Makefile.in     2003-04-24 04:08:32.000000000 -0400
+++ apr-iconv/lib/Makefile.in   2003-07-05 02:33:15.000000000 -0400
@@ -12,6 +12,9 @@ TARGETS = iconv_module.lo iconv.lo iconv
 
 #OBJECTS=
 
+# For $(LINK) macro to work
[EMAIL PROTECTED]@
+
 # bring in rules.mk for standard functionality
 @INCLUDE_RULES@
 
diff -purN apr-iconv-0.9.4/Makefile.in apr-iconv/Makefile.in
--- apr-iconv-0.9.4/Makefile.in 2003-04-24 04:08:31.000000000 -0400
+++ apr-iconv/Makefile.in       2003-07-05 02:57:00.000000000 -0400
@@ -8,8 +8,8 @@ VPATH = @srcdir@
 # bring in rules.mk for standard functionality
 @INCLUDE_RULES@
 
-SUBDIRS = lib ccs ces
-CLEAN_SUBDIRS = . lib ccs ces
+SUBDIRS = lib ccs ces util
+CLEAN_SUBDIRS = . lib ccs ces util
 
 TARGET_LIB = lib/libapriconv.la
 
diff -purN apr-iconv-0.9.4/util/Makefile.in apr-iconv/util/Makefile.in
--- apr-iconv-0.9.4/util/Makefile.in    2003-04-24 04:08:32.000000000 -0400
+++ apr-iconv/util/Makefile.in  2003-07-05 03:15:41.000000000 -0400
@@ -4,6 +4,9 @@ INCLUDES = @API_INCLUDES@ @APR_INCLUDES@
 PROGRAMS = iconv
 TARGETS  = $(PROGRAMS)
 
+# For $(LINK) macro to work
[EMAIL PROTECTED]@
+
 # bring in rules.mk for standard functionality
 @INCLUDE_RULES@
 

Reply via email to