Author: jfrederic.clere(a)jboss.com
Date: 2007-12-21 06:23:29 -0500 (Fri, 21 Dec 2007)
New Revision: 1268
Modified:
trunk/build/unix/build.sh
trunk/build/unix/buildbin.rhel-httpd.sh
Log:
Add iconv (gnu iconv) because the Solaris package requires libgcc
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2007-12-20 23:03:59 UTC (rev 1267)
+++ trunk/build/unix/build.sh 2007-12-21 11:23:29 UTC (rev 1268)
@@ -48,9 +48,13 @@
has_openssl=true
has_zlib=true
has_jk=true
+has_iconv=true
build_api=false
build_zlib=false
+build_iconv=false
+export build_iconv
+
has_cache=false
has_version=false
has_package=false
@@ -155,6 +159,7 @@
ssl_version=`echo "${parg}" | ${awk} -F'|' '{print $7}'`
zlib_version=`echo "${parg}" | ${awk} -F'|' '{print $8}'`
jk_version=`echo "${parg}" | ${awk} -F'|' '{print $9}'`
+iconv_version=`echo "${parg}" | ${awk} -F'|' '{print $10}'`
if [ "x" = "x${zlib_version}" ]; then
has_zlib=false
@@ -174,6 +179,9 @@
if [ "x" = "x${jk_version}" ]; then
has_jk=false
fi
+if [ "x" = "x${iconv_version}" ]; then
+ has_iconv=false
+fi
# Get plaform information
so_extension=so
@@ -220,6 +228,13 @@
# we need makedepend for make depend (openssl)
PATH=/opt/SUNWspro/bin:/usr/X/bin:/usr/local/bin:$PATH
export PATH
+ CC=cc
+ export CC
+ CPP="cc -E"
+ export CPP
+ if $has_iconv; then
+ build_iconv=true
+ fi
;;
HP-UX*)
BUILD_SYS="hpux"
@@ -265,6 +280,9 @@
if $has_jk; then
echo "using mod_jk: ${jk_version}"
fi
+if $has_iconv; then
+echo "using iconv: ${iconv_version}"
+fi
export so_extension
export NATIVEEOL
@@ -640,6 +658,48 @@
}
#
+# Build any package (standard).
+# $1 directory of the sources directory
+# $2 static or shared
+buildany()
+{
+ any_srcdir=$1
+ any_static=$2
+
+ if $any_static ; then
+ any_common_dir=${build_common_dir}-static
+ else
+ any_common_dir=${build_common_dir}
+ fi
+
+ echo "Configuring ${any_srcdir} with --prefix=${any_common_dir}"
+ if $BUILD_WIN ; then
+ (cd ${any_srcdir}
+ echo "Building in ${any_srcdir} ..."
+ cygwinpath true PREFIX=${any_common_dir} SRCDIR=`pwd`
+ if $any_static ; then
+ # XXX: That won't work probably.
+ nmake -f NMAKEmakefile $wrapped_args ANY_DECLARE_STATIC=true install
+ else
+ nmake -f NMAKEmakefile $wrapped_args install
+ fi
+ )
+ else
+ (cd ${any_srcdir}
+ echo "Building in ${any_srcdir} ..."
+ if $any_static ; then
+ add_static=--enable-static
+ else
+ add_static=""
+ fi
+ ./configure ${add_conf} --prefix=${any_common_dir} ${add_static}
+ make
+ make install
+ )
+ fi
+}
+
+#
# Build zlib
# $1 directory of the sources directory
# $2 static or shared
@@ -696,6 +756,11 @@
fi
fi
+ # build a static libconv.
+ if $build_iconv; then
+ buildany srclib/libiconv-${iconv_version} true || return 1
+ fi
+
if $has_apr; then
buildapr srclib/apr-${apr_version} false || return 1
if $has_static ; then
@@ -797,6 +862,7 @@
fi
SSLURL=http://www.openssl.org/source/openssl-${ssl_version}.tar.gz
ZLIBURL=http://www.zlib.net/zlib-${zlib_version}.tar.gz
+ICONVURL=http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${iconv_version}.tar.gz
rm -rf ${package_src_dir}
mkdir -p ${package_src_dir}/srclib
@@ -816,6 +882,9 @@
if $has_api; then
ckeckdownload apr-iconv-${api_version} $APIURL $APIURLBACK
fi
+if $has_iconv; then
+ ckeckdownload libiconv-${iconv_version} $ICONVURL ""
+fi
#
# Get the repository of what we build.
Modified: trunk/build/unix/buildbin.rhel-httpd.sh
===================================================================
--- trunk/build/unix/buildbin.rhel-httpd.sh 2007-12-20 23:03:59 UTC (rev 1267)
+++ trunk/build/unix/buildbin.rhel-httpd.sh 2007-12-21 11:23:29 UTC (rev 1268)
@@ -102,6 +102,11 @@
add_conf="--with-ssl=no"
add_conf=""
fi
+if $build_iconv; then
+ # Use the static iconv we built before.
+ LDFLAGS="$LDFLAGS -L${build_common_dir}/lib -liconv"
+ export LDFLAGS
+fi
case ${BUILD_SYS} in
linux*)
add_conf="$add_conf --enable-pie"