Restore the wx buildbot for Mac by automatically installing dependencies not provided...
authorkevino@webkit.org <kevino@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Nov 2007 03:01:59 +0000 (03:01 +0000)
committerkevino@webkit.org <kevino@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Nov 2007 03:01:59 +0000 (03:01 +0000)
Reviewed by Mark Rowe

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27946 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/wx/build-wxwebkit
WebKitTools/wx/install-unix-extras [moved from WebKitTools/Scripts/install-unix-extras with 55% similarity]

index 2f1d5b92831359cb73188bec27be160278281824..9108e507796dc7e805fc483ec493f4dfc0f5a0bc 100644 (file)
@@ -1,3 +1,17 @@
+2007-11-21  Kevin Ollivier  <kevino@theolliviers.com>
+
+        Move install-unix-extras to wx directory as it seems only to be used by that 
+        port now. It now supports universal binaries on Mac and adds libpng and libjpeg. 
+        Also, have build-wxwebkit run it in order to fix the Mac buildbot, and
+        have install-unix-extras install into WebKitLibraries as per
+        convention.
+        
+        Reviewed by Mark Rowe.
+
+        * Scripts/install-unix-extras: Removed.
+        * wx/build-wxwebkit:
+        * wx/install-unix-extras: Copied from WebKitTools/Scripts/install-unix-extras.
+
 2007-11-21  Eric Seidel  <eric@webkit.org>
 
         Reviewed by Adam.
index 38f7a96348e6b011abd240098ee5af7f06011692..a2cb426658e6c44f2edb0444070d8143f7253999 100755 (executable)
@@ -185,6 +185,13 @@ else
 
     if [ $do_prep == 1 ]; then
         # Other preparation steps
+        
+        # since the buildbot will wipe the build tree clean sometimes, we need to reinstall
+        # the dependencies if they aren't installed.
+        if [ ! "${OSTYPE:0:6}" == "cygwin" ]; then
+            $WK_ROOT/WebKitTools/wx/install-unix-extras
+        fi
+        
         cd $WK_ROOT/JavaScriptCore
         # FIXME: The below is needed because Bakefile doesn't yet properly set dependencies on 
         # creating the build dir. Everything works when you do make all, but not when you
similarity index 55%
rename from WebKitTools/Scripts/install-unix-extras
rename to WebKitTools/wx/install-unix-extras
index a632687fe58194d826fb3289539f7f7a02106007..60b53976eca25d90db476d50442b251d8de1c330 100755 (executable)
 
 DL_CMD="curl -L"
 
+scriptDir="$(cd $(dirname $0);pwd)"
+WK_ROOT=$scriptDir/../..
+WK_ROOTDIR=$WK_ROOT
+
 DL_DIR=/tmp/webkit-deps
 # NOTE: If you change this, make sure the dir is on the path.
-DEPS_PREFIX=/usr/local
+DEPS_PREFIX=$WK_ROOT/WebKitLibraries/unix
+DLLEXT=so
+
+if [ "${OSTYPE:0:6}" == "darwin" ]; then
+    DLLEXT=dylib
+fi
 
 mkdir -p $DL_DIR
 mkdir -p $DEPS_PREFIX
@@ -43,6 +52,8 @@ ICU_VERSION="3.4.1"
 ICU_TARBALL="icu-$ICU_VERSION.tgz"
 ICU_URL="ftp://ftp.software.ibm.com/software/globalization/icu/$ICU_VERSION/$ICU_TARBALL"
 
+# dependent app, not lib, what should we do for these?
+
 GPERF_VERSION="3.0.1"
 GPERF_TARBALL="gperf-$GPERF_VERSION.tar.gz"
 GPERF_URL="ftp://mirrors.kernel.org/gnu/gperf/$GPERF_TARBALL"
@@ -55,6 +66,14 @@ ICONV_VERSION="1.9.2"
 ICONV_TARBALL="libiconv-$ICONV_VERSION.tar.gz"
 ICONV_URL="http://ftp.gnu.org/pub/gnu/libiconv/$ICONV_TARBALL"
 
+LIBJPEG_VERSION="6b"
+LIBJPEG_TARBALL="jpegsrc.v$LIBJPEG_VERSION.tar.gz"
+LIBJPEG_URL="http://www.ijg.org/files/$LIBJPEG_TARBALL"
+
+LIBPNG_VERSION="1.2.23"
+LIBPNG_TARBALL="libpng-$LIBPNG_VERSION.tar.gz"
+LIBPNG_URL="ftp://ftp.simplesystems.org/pub/libpng/png/src/$LIBPNG_TARBALL"
+
 cd $DL_DIR
 # build ICU
 if [ `which icu-config >/dev/null 2>&1` ]; then
@@ -64,43 +83,90 @@ if [ `which icu-config >/dev/null 2>&1` ]; then
   cd $DL_DIR/icu/source
   
   chmod +x configure install-sh
-  ./configure --prefix=$DEPS_PREFIX
-  
-  make
-  #make check
-  make install
+
+  if [ "${OSTYPE:0:6}" == "darwin" ]; then  
+    ./configure --prefix=$DEPS_PREFIX --disable-dependency-tracking
+    make CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
+    LDFLAGS="-arch i386 -arch ppc"
+    make install
+  else
+    ./configure --prefix=$DEPS_PREFIX
   
+    make
+    #make check
+    make install
+  fi
   cd $DL_DIR
   rm -rf icu
 fi
 
-if [ `which gperf >/dev/null 2>&1` ]; then
-  $DL_CMD -o $DL_DIR/$GPERF_TARBALL $GPERF_URL
+# TODO: What would be a good way to test for this?
+if [ ! -f $DEPS_PREFIX/lib/libiconv.$DLLEXT ]; then
+  $DL_CMD -o $DL_DIR/$ICONV_TARBALL $ICONV_URL
+
+  tar xzvf $DL_DIR/$ICONV_TARBALL
+  cd $DL_DIR/libiconv-$ICONV_VERSION
+
+  if [ "${OSTYPE:0:6}" == "darwin" ]; then  
+    ./configure --prefix=$DEPS_PREFIX --disable-dependency-tracking
+    make CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
+    LDFLAGS="-arch i386 -arch ppc"
+    make install
+  else
+    ./configure --prefix=$DEPS_PREFIX
+  
+    make
+    make install
+  fi
+  cd $DL_DIR
+  rm -rf $DL_DIR/libiconv-$ICONV_VERSION
+fi
+
+if [ ! -f $DEPS_PREFIX/lib/libjpeg.a ]; then
+  $DL_CMD -o $DL_DIR/$LIBJPEG_TARBALL $LIBJPEG_URL
+
+  tar xzvf $DL_DIR/$LIBJPEG_TARBALL
+  cd $DL_DIR/jpeg-$LIBJPEG_VERSION
+
+  # jpeg install command expects this to exist.
+  mkdir -p $DEPS_PREFIX/man/man1
 
-  tar xzvf $DL_DIR/$GPERF_TARBALL
-  cd $DL_DIR/gperf-$GPERF_VERSION
+  if [ "${OSTYPE:0:6}" == "darwin" ]; then
+    ./configure --prefix=$DEPS_PREFIX --disable-dependency-tracking
+    make CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
+    LDFLAGS="-arch i386 -arch ppc"
+    make install
+  else
+    ./configure --prefix=$DEPS_PREFIX
   
-  ./configure --prefix=$DEPS_PREFIX
+    make
+  fi
   
-  make
-  make install
+  cp libjpeg.a $DEPS_PREFIX/lib
+  cp *.h $DEPS_PREFIX/include
   
   cd $DL_DIR
-  rm -rf $DL_DIR/gperf-$GPERF_VERSION
+  rm -rf $DL_DIR/jpeg-$LIBJPEG_VERSION
 fi
 
-# TODO: What would be a good way to test for this?
-if [ ! -f $DEPS_PREFIX/lib/libiconv.dylib ]; then
-  $DL_CMD -o $DL_DIR/$ICONV_TARBALL $ICONV_URL
+if [ ! -f $DEPS_PREFIX/lib/libpng.a ]; then
+  $DL_CMD -o $DL_DIR/$LIBPNG_TARBALL $LIBPNG_URL
 
-  tar xzvf $DL_DIR/$ICONV_TARBALL
-  cd $DL_DIR/libiconv-$ICONV_VERSION
-  
-  ./configure --prefix=$DEPS_PREFIX
+  tar xzvf $DL_DIR/$LIBPNG_TARBALL
+  cd $DL_DIR/libpng-$LIBPNG_VERSION
+
+  if [ "${OSTYPE:0:6}" == "darwin" ]; then
+    ./configure --prefix=$DEPS_PREFIX --disable-dependency-tracking
+    make CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
+    LDFLAGS="-arch i386 -arch ppc"
+    make install
+  else
+    ./configure --prefix=$DEPS_PREFIX
   
-  make
-  make install
+    make
+    make install
+  fi
   
   cd $DL_DIR
-  rm -rf $DL_DIR/libiconv-$ICONV_VERSION
+  rm -rf $DL_DIR/libpng-$LIBPNG_VERSION
 fi