Hello,

I fixed the issues with building apr-util on Fedora x86 host for
powerpc. Since I'm not sure that it is a correct way to fix the
issues, any comments are welcomed!

1. The "installbuilddir" path in the "apr-1-config" script was
hardcoded. As a result "apr-1-config --installbuilddir" returned
"/usr/share/build-1" which is not correct since apr-utils expected to
find a relevant "apr-rules.mk" file in this directory. I changed the
"apr-config.in" file to return the path relative to the directory from
which the script was called (apr_cross.patch).

2. The second issue was in the "apr_rules.mk" file. The local copy of
this file is created during the apr-utils build and is used to locate
some files. Again, due to hardcoded paths, these files were searched
in the "/usr/share/build-1" directory. I changed the apr-utils
"configure" script to fix these paths (apr-utils_cross.patch).

With these fixes, apr-utils successfully builds.

-- 
Dmitry S. Vasilchenko
Index: package/develop/apr/apr-config.patch.cross
===================================================================
--- package/develop/apr/apr-config.patch.cross	(revision 37038)
+++ package/develop/apr/apr-config.patch.cross	(working copy)
@@ -34,6 +34,15 @@
      elif test "$location" = "source"; then
          flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
      else
+@@ -166,7 +166,7 @@
+     ;;
+     --installbuilddir)
+     if test "$location" = "installed"; then
+-        echo "${installbuilddir}"
++        echo "`dirname $0`/../../${installbuilddir}"
+     elif test "$location" = "source"; then
+         echo "$APR_SOURCE_DIR/build"
+     else
 @@ -182,7 +182,7 @@
      --link-ld)
      if test "$location" = "installed"; then
@@ -52,3 +61,12 @@
      else
          flags="$flags $LA_FILE"
      fi
+@@ -223,7 +223,7 @@
+     ;;
+     --apr-libtool)
+     if test "$location" = "installed"; then
+-        echo "${installbuilddir}/libtool"
++        echo "`dirname $0`/../../${installbuilddir}/libtool"
+     else
+         echo "$APR_BUILD_DIR/libtool"
+     fi
I
Index: package/develop/apr-util/cross-bdb.patch
===================================================================
--- package/develop/apr-util/cross-bdb.patch	(revision 37038)
+++ package/develop/apr-util/cross-bdb.patch	(working copy)
@@ -71,3 +71,12 @@
  
  
    apu_have_db=0
+@@ -41395,6 +41395,8 @@
+    $mkdir_p build
+ fi
+ cp $APR_BUILD_DIR/apr_rules.mk $abs_builddir/build/rules.mk
++sed -e "s,\$(apr_builders),$APR_BUILD_DIR,g" -i $abs_builddir/build/rules.mk
++sed -e "s,\$(apr_builddir),$APR_BUILD_DIR,g" -i $abs_builddir/build/rules.mk
+ 
+ case "$host_alias" in
+ *bsdi* | BSD/OS)

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[email protected] with a subject of: unsubscribe t2

Reply via email to