Author: miguel
Date: 2005-05-24 13:03:35 -0400 (Tue, 24 May 2005)
New Revision: 44934

Modified:
   trunk/release/macosx/monobuild.sh
Log:
New updated version

Modified: trunk/release/macosx/monobuild.sh
===================================================================
--- trunk/release/macosx/monobuild.sh   2005-05-24 16:56:46 UTC (rev 44933)
+++ trunk/release/macosx/monobuild.sh   2005-05-24 17:03:35 UTC (rev 44934)
@@ -3,7 +3,7 @@
 #This script must be run as root!
 
 #startup options, these are default values.
-CLEAN="NO"
+CLEAN="YES"
 CONFIGURE="YES"
 MAKE="YES"
 INSTALL="YES"
@@ -12,22 +12,6 @@
 SVNDIR="NO"
 MONOVERSION="NO"
 
-BUILDROOT=/Users/Shared/MonoBuild
-PLISTS=${BUILDROOT}/plists
-RESOURCES=${BUILDROOT}/resources
-FRAMEWORKPREFIX=/Library/Frameworks/Mono.framework
-MONOPREFIX=/Library/Frameworks/Mono.framework/Versions/${MONOVERSION}
-DEPS=${BUILDROOT}/Dependancies
-
-export CFLAGS="-I${MONOPREFIX}/include" 
-export C_INCLUDE_FLAGS="-I${MONOPREFIX}/include"
-export CPATH="${MONOPREFIX}/include"
-export DYLD_LIBRARY_PATH="${MONOPREFIX}/lib"
-export LDFLAGS="-L${MONOPREFIX}/lib"
-export PATH="/usr/X11R6/bin/:${MONOPREFIX}/bin:$PATH"
-export PKG_CONFIG_PATH="/usr/X11R6/lib/pkgconfig/:$PKG_CONFIG_PATH"
-export ACLOCAL_FLAGS="-I ${MONOPREFIX}/share/aclocal/"
-
 usage()
 {
 echo "Proper usage is as follows"
@@ -92,6 +76,19 @@
                fi
 done
 
+if test x$MONOVERSION = xNO; then
+    echo Please specify a version with -m VERSION
+    exit 1
+fi
+
+BUILDROOT=/Users/Shared/MonoBuild
+PLISTS=${BUILDROOT}/plists
+RESOURCES=${BUILDROOT}/resources
+FRAMEWORKPREFIX=/Library/Frameworks/Mono.framework
+MONOPREFIX=/Library/Frameworks/Mono.framework/Versions/${MONOVERSION}
+DEPS=${BUILDROOT}/Dependancies
+
+
 #              if [ ! -d ${MONOPREFIX}/lib ]; then
 mkdir -p ${MONOPREFIX}/lib
 mkdir -p ${MONOPREFIX}/man
@@ -116,11 +113,19 @@
        mkdir -p ${DEPS}
 fi
 
+stop()
+{
+    echo Step: $2 aborted
+    echo see `pwd`/$2.log for details
+    exit 1
+}
+
 build()
 {
+        echo Processing $1
        cd $1
        if [ ${CLEAN} == "YES" ]; then
-               make clean
+               make clean >& log.clean || echo $1: clean failed
        fi
        if [ ${CONFIGURE} == "YES" ]; then
                if [ $2 == "mono" ]; then
@@ -140,16 +145,16 @@
 </configuration>
 EOF
 
-                        ./configure --prefix=$MONOPREFIX --with-preview=yes 
+                        ./configure --prefix=$MONOPREFIX --with-preview=yes >& 
configure.log  || stop $1 configure
                else
-                       ./configure --prefix=$MONOPREFIX 
+                       ./configure --prefix=$MONOPREFIX >& configure.log  || 
stop $1 configure
                fi
        fi
        if [ ${MAKE} == "YES" ]; then
-               make 
+               make >& make.log || stop $1 make
        fi
        if [ ${INSTALL} == "YES" ]; then
-               make install
+               make install >& install.log || stop $1 install
        fi
 }
 
@@ -158,7 +163,6 @@
 packages() 
 {
 
-
 #pkgconfig
 #################################################
 NAME=pkgconfig
@@ -173,6 +177,7 @@
 echo "Done with ${NAME}"
 #################################################
 
+
 #gettext
 #################################################
 NAME=gettext
@@ -182,11 +187,22 @@
 WORKSRCDIR=${NAME}-${VERSION}
 
 echo "Building ${NAME}"
+touch $MONOPREFIX/reference
 fetch ${WORKSRCDIR} ${URL} ${DISTNAME}
 build ${WORKSRCDIR} ${NAME}
+
 echo "Done with ${NAME}"
 #################################################
 
+export C_INCLUDE_FLAGS="-I${MONOPREFIX}/include"
+export C_INCLUDE_PATH="-I${MONOPREFIX}/include"
+export CPATH="${MONOPREFIX}/include"
+export DYLD_LIBRARY_PATH="${MONOPREFIX}/lib"
+export LDFLAGS="-L${MONOPREFIX}/lib"
+export PATH="/usr/X11R6/bin/:${MONOPREFIX}/bin:$PATH"
+export 
PKG_CONFIG_PATH="/usr/X11R6/lib/pkgconfig/:/Library/Frameworks/Mono.framework/Library/pkgconfig:$PKG_CONFIG_PATH"
+export ACLOCAL_FLAGS="-I ${MONOPREFIX}/share/aclocal/"
+
 #glib
 #################################################
 NAME=glib
@@ -201,6 +217,8 @@
 echo "Done with ${NAME}"
 #################################################
 
+clean_gettext
+
 #mono
 #################################################
 NAME=mono
@@ -209,7 +227,7 @@
 URL=http://www.go-mono.com/sources/mono-1.1/${DISTNAME}
 WORKSRCDIR=${NAME}-${VERSION}
 
-if [ SVNDIR == "NO" ]; then
+if [ $SVNDIR == "NO" ]; then
        echo "Building ${NAME}"
        fetch ${WORKSRCDIR} ${URL} ${DISTNAME}
        build ${WORKSRCDIR} ${NAME}
@@ -233,7 +251,6 @@
 fi
 #################################################
 
-
 #JPEG
 #################################################
 PATCHDIR=${MONOBUILDFILES}/libgdiplus/jpeg/files
@@ -258,13 +275,13 @@
     sed -e 's/(prefix)\/man/(prefix)\/share\/man/g' makefile.cfg > 
makefile.cfg.patched
     mv makefile.cfg.patched makefile.cfg
 
-    ./configure --enable-shared --enable-static --prefix=${MONOPREFIX}  
+    ./configure --enable-shared --enable-static --prefix=${MONOPREFIX}  >& 
configure.log || stop jpeg configure
 fi
 if [ ${MAKE} == "YES" ]; then
-       make 
+       make >& make.log || stop jpeg make
 fi
 if [ ${INSTALL} == "YES" ]; then
-       make install
+       make install-lib >& install.log || stop jpeg install
 fi
 
 ################################
@@ -278,18 +295,18 @@
 cd ${WORKSRCDIR}
 
 if [ ${CLEAN} == "YES" ]; then
-       make clean
+       make clean >& clean.log || echo tiff clean failed
 fi
 if [ ${CONFIGURE} == "YES" ]; then
     ./configure --prefix=${MONOPREFIX} --mandir=${MONOPREFIX}/share/man \
        --with-jpeg-include-dir=${MONOPREFIX}/include \
-       --with-jpeg-lib-dir=${MONOPREFIX}/lib  
+       --with-jpeg-lib-dir=${MONOPREFIX}/lib  >& configure.log || stop tiff 
configure
 fi
 if [ ${MAKE} == "YES" ]; then
-       make 
+       make >& make.log || stop tiff make
 fi
 if [ ${INSTALL} == "YES" ]; then
-       make install
+       (cd libtiff; make install >& install.log || stop tiff install)
 fi
 
 ###############################################
@@ -317,6 +334,7 @@
 build ${WORKSRCDIR} ${NAME}
 echo "Done with ${NAME}"
 
+
 ###############################################
 NAME=libgdiplus
 VERSION=1.1.7
@@ -329,16 +347,16 @@
 
 cd ${WORKSRCDIR}
 if [ ${CLEAN} == "YES" ]; then
-       make clean
+       make clean >& clean.log || echo gdiplus clean failed
 fi
 if [ ${CONFIGURE} == "YES" ]; then
-       ./configure --prefix=${MONOPREFIX} --with-libjpeg 
--includedir=${MONOPREFIX}/include  
+       ./configure --enable-quartz --enable-freetype --prefix=${MONOPREFIX} 
--with-libjpeg --includedir=${MONOPREFIX}/include  >& configure.log || stop 
gdiplus configure
 fi
 if [ ${MAKE} == "YES" ]; then
-       make 
+       make >& make.log || stop gdiplus make
 fi
 if [ ${INSTALL} == "YES" ]; then
-       make install
+       make install >& install.log || stop gdiplus install
 fi
 
 #cocoa#
@@ -359,25 +377,23 @@
 
 cd ${NAME}
 if [ ${CLEAN} == "YES" ]; then
-       make clean
+       make clean >& clean.log || echo cocoa clean failed
 fi
 if [ ${CONFIGURE} == "YES" ]; then
-       ./autogen.sh --prefix=${MONOPREFIX} --with-preview=yes
+       ./configure --prefix=${MONOPREFIX} --with-preview=yes >& configure.log 
|| stop cocoasharp configure
 fi
 if [ ${MAKE} == "YES" ]; then
-       make 
+       make >& make.log || stop cocoasharp make
 fi
 if [ ${INSTALL} == "YES" ]; then
-       make install
+       make install >& install.log || stop cocoashap install
 fi
 
 echo "Done with ${NAME}"
 
 #################################################
-
 }
 
-
 ###############################################
 #create plist files that are needed by the Installer.
 
@@ -606,6 +622,25 @@
 chmod 755 ${RESOURCES}/postflight
 }
 
+clean_gettext()
+{
+    cd $MONOPREFIX
+    (cd share/; find . -newer $MONOPREFIX/reference -and -type f | xargs rm)
+    (cd bin/; find . -newer $MONOPREFIX/reference -and -type f | xargs rm)
+    rm $MONOPREFIX/reference
+}
+
+# 
+cleanup()
+{
+    rm bin/gettext* bin/ngettext bin/xgettext 
+    rm bin/glib-*
+    rm bin/gobject-query
+    rm lib/lib*a
+    strip bin/pedump bin/monodiet bin/monodis bin/jay bin/monograph
+    rm -rf share/gtk-doc
+}
+
 framework()
 {
 ###############################################
@@ -682,6 +717,7 @@
 ################################################
 #Actualy calls the script funcations
 packages
+cleanup
 plists
 rtfs
 framework

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to