diff --git a/tools/install/macosx/makefpcsnapshot.sh b/tools/install/macosx/makefpcsnapshot.sh index 900b400b37..b75761e20d 100755 --- a/tools/install/macosx/makefpcsnapshot.sh +++ b/tools/install/macosx/makefpcsnapshot.sh @@ -2,22 +2,43 @@ set -e -PPCARCH=ppcppc -SVN=/usr/local/bin/svn +PPC_RELEASE=$1 + +if [ ! -e "$PPC_RELEASE" ]; then + PPC_RELEASE=/usr/local/lib/fpc/2.0.2/ppcppc + echo "Using default PPC_RELEASE: $PPC_RELEASE" +fi + FREEZE=/usr/bin/freeze HDIUTIL=/usr/bin/hdiutil UPDATELIST=~/tmp/updatelist - -TEMPLATEDIR=~/src/lazarus/tools/install/macosx - +TEMPLATEDIR=`dirname $0` FPCSVNDIR=~/src/fpc/build FPCSOURCEDIR=$FPCSVNDIR/fpcsrc -PPC_RELEASE=/usr/local/lib/fpc/2.0.2/$PPCARCH BUILDDIR=~/tmp/build FPCBUILDDIR=$BUILDDIR/fpc INSTALLDIR=~/tmp/fpc INSTALLFPCDIR=~/fpc +PPCARCH=ppcppc +ARCH=`uname -p` +if [ "$ARCH" = "i386" ]; then + PPCARCH=ppc386 +fi + +SVN=`which svn` +if [ ! -e "$SVN" ]; then + SVN=/usr/local/bin/svn +fi + +if [ ! -e "$SVN" ]; then + SVN=/sw/bin/svn +fi + +if [ ! -e "$SVN" ]; then + echo "Cannot find a svn executable" +fi + DATESTAMP=`date +%Y%m%d` FPCPACKPROJ=fpc.packproj @@ -32,9 +53,12 @@ else fi fi -$SVN export $FPCSVNDIR $FPCBUILDDIR -$SVN export $FPCSVNDIR/fpcsrc $FPCBUILDDIR/fpcsrc -$SVN export $FPCSVNDIR/fpcdocs $FPCBUILDDIR/fpcdocs +$SVN export $FPCSVNDIR $FPCBUILDDIR +if [ ! -d "$FPCBUILDDIR/fpcsrc" ]; then +# old versions of svn did not export external repositories + $SVN export $FPCSVNDIR/fpcsrc $FPCBUILDDIR/fpcsrc + $SVN export $FPCSVNDIR/fpcdocs $FPCBUILDDIR/fpcdocs +fi cd $FPCBUILDDIR make distclean PP=$PPC_RELEASE diff --git a/tools/install/macosx/makefpcsrcsnapshot.sh b/tools/install/macosx/makefpcsrcsnapshot.sh index 60dab2b2f9..f0af45dc3a 100755 --- a/tools/install/macosx/makefpcsrcsnapshot.sh +++ b/tools/install/macosx/makefpcsrcsnapshot.sh @@ -2,13 +2,30 @@ set -e -PPCARCH=ppcppc -SVN=/usr/local/bin/svn FREEZE=/usr/bin/freeze HDIUTIL=/usr/bin/hdiutil UPDATELIST=~/tmp/updatelist -TEMPLATEDIR=~/etc/templates +PPCARCH=ppcppc +ARCH=`uname -p` +if [ "$ARCH" = "i386" ]; then + PPCARCH=ppc386 +fi + +SVN=`which svn` +if [ ! -e "$SVN" ]; then + SVN=/usr/local/bin/svn +fi + +if [ ! -e "$SVN" ]; then + SVN=/sw/bin/svn +fi + +if [ ! -e "$SVN" ]; then + echo "Cannot find a svn executable" +fi + +TEMPLATEDIR=`dirname $0` FPCSVNDIR=~/src/fpc/build FPCSOURCEDIR=$FPCSVNDIR/fpcsrc @@ -16,7 +33,7 @@ COMPILER=~/fpc/bin/$PPCARCH INSTALLDIR=~/tmp/fpcsrc DATESTAMP=`date +%Y%m%d` -PACKPROJ=fpcsrc.packproj +PACKPROJ=fpcsrc.packproj.template # clean installdir: since I am not root and the install dir can contain files owned by root diff --git a/tools/install/macosx/makelazsnapshot.sh b/tools/install/macosx/makelazsnapshot.sh index 046933c015..2e728ac9e4 100755 --- a/tools/install/macosx/makelazsnapshot.sh +++ b/tools/install/macosx/makelazsnapshot.sh @@ -3,12 +3,29 @@ set -e set -x -PPCARCH=ppcppc -SVN=/usr/local/bin/svn FREEZE=/usr/bin/freeze HDIUTIL=/usr/bin/hdiutil UPDATELIST=~/tmp/updatelist +PPCARCH=ppcppc +ARCH=`uname -p` +if [ "$ARCH" = "i386" ]; then + PPCARCH=ppc386 +fi + +SVN=`which svn` +if [ ! -e "$SVN" ]; then + SVN=/usr/local/bin/svn +fi + +if [ ! -e "$SVN" ]; then + SVN=/sw/bin/svn +fi + +if [ ! -e "$SVN" ]; then + echo "Cannot find a svn executable" +fi + LAZSOURCEDIR=~/src/lazsource COMPILER=~/fpc/bin/$PPCARCH @@ -45,10 +62,10 @@ strip lazarus strip startlazarus # create symlinks -mkdir -p $BUILDDIR\bin -cd $BUILDDIR\bin +mkdir -p $BUILDDIR/bin +cd $BUILDDIR/bin ln -s ../share/lazarus/lazarus lazarus -ln -s ../share/lazarus/startlazarus lazarus +ln -s ../share/lazarus/startlazarus startlazarus # copy license file, it must be a txt file. cp $LAZBUILDDIR/COPYING.GPL $BUILDDIR/License.txt