diff options
Diffstat (limited to 'Build/source/utils/asymptote/build-scripts/build-asymptote.dos')
-rwxr-xr-x | Build/source/utils/asymptote/build-scripts/build-asymptote.dos | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/build-scripts/build-asymptote.dos b/Build/source/utils/asymptote/build-scripts/build-asymptote.dos new file mode 100755 index 00000000000..5bb6777cc2f --- /dev/null +++ b/Build/source/utils/asymptote/build-scripts/build-asymptote.dos @@ -0,0 +1,99 @@ +#!/bin/sh -x +GC=7.6.2 + +MACHINE=`uname -m` +if [ $MACHINE == i686 ]; then +BINDIR=i386-windows +else +BINDIR=x86_64-windows +fi +SHARED=~/shared/asy +MAKEFLAGS=-j8 +export MAKEFLAGS +VERSION=$1 +if [ -z $VERSION ]; then +VERSION=`grep AC_INIT configure.ac | cut -s -d[ -f3 | cut -s -d] -f1` +if [ -z $VERSION ]; then +echo Usage: $0 VERSION +exit +fi +else +echo Building asymptote-$VERSION +cd ~/ +rm -rf asymptote-$VERSION +mkdir -p CTAN +rm -rf CTAN/asymptote-$VERSION +tar -zxf $SHARED/asymptote-$VERSION.src.tgz -C CTAN +tar -zxf $SHARED/asymptote-$VERSION.src.tgz +mkdir -p CTAN/asymptote-$VERSION/binaries/$BINDIR/texlive +cd asymptote-$VERSION +fi +BUILD=build-$VERSION +ln -sf ../gc-$GC.tar.gz . +ln -sf ../gc-$GC . +make -n MSDOS=1 >& /dev/null || ./configure OSTYPE=msdos --enable-gc=$GC --with-latex=/usr/local/share --with-context=/usr/local/share +rm -rf $BUILD +mkdir -p $BUILD +cp -a $HOME/dll/cygwin/*.dll $BUILD +cp /etc/pki/tls/certs/ca-bundle.crt $BUILD +chmod 0644 $BUILD/*.dll +cp -a $BUILD/*.dll ~/CTAN/asymptote-$VERSION/binaries/$BINDIR/ +make MSDOS=1 DESTDIR="$BUILD/" docdir="$BUILD/" +test -f asy.list || make MSDOS=1 keywords DESTDIR="$BUILD/" docdir="$BUILD/" +make MSDOS=1 install-asy DESTDIR="$BUILD/" docdir="$BUILD/" +cp asy.ico README LICENSE* $BUILD +pushd $BUILD +mv usr/local/bin/* . +mv usr/local/share/asymptote/GUI . +rm -rf usr/local/share/asymptote/GUI +mv usr/local/share/asymptote/* . +cp $SHARED/asydoc/*.pdf . +rm -rf bin share doc usr +popd +echo \!define PRODUCT_VERSION \"$VERSION\" > AsymptoteInstallInfo.nsi +# generate uninstallation commands +ls -p1 $BUILD \ + | awk '{ if(index($0,"/")==length($0)) print "RMDir /r $INSTDIR\\" substr($0,0,length($0)-1); else print "Delete $INSTDIR\\" $0 }' \ + > AsymptoteUninstallList.nsi + +rm $BUILD/xasy +if [ $MACHINE == i686 ]; then +sed asymptote.nsi -e 's/$PROGRAMFILES64/$PROGRAMFILES/g' > asymptote32.nsi +/cygdrive/c/Program\ Files\ \(x86\)/NSIS/makensis.exe asymptote32.nsi +SUFFIX=-i386_32 +else +/cygdrive/c/Program\ Files\ \(x86\)/NSIS/makensis.exe asymptote.nsi +SUFFIX= +fi +cp -a --no-preserve=mode asymptote-$VERSION-setup.exe $SHARED/asymptote-$VERSION-setup$SUFFIX.exe +mv asymptote-$VERSION-setup.exe ~/asymptote-$VERSION-setup$SUFFIX.exe + +cd ~/ +rm -rf asymptote-${VERSION}TL || exit +cp -a asymptote-$VERSION asymptote-${VERSION}TL +sed asymptote-$VERSION/config.h -e 's/ASYMPTOTE_SYSDIR ".*"/ASYMPTOTE_SYSDIR ""/g' > asymptote-${VERSION}TL/config.h +#sed asymptote-$VERSION/configure.ac -e 's/\-std=c++11//g' > asymptote-${VERSION}TL/configure.ac +touch -r asymptote-$VERSION/config.h asymptote-${VERSION}TL/config.h +touch -r asymptote-$VERSION/configure.ac asymptote-${VERSION}TL/configure.ac +cd asymptote-${VERSION}TL +rm settings.o +rm -f doc/*.aux doc/*.log doc/*.dvi +make MSDOS=1 DESTDIR="$BUILD/" +make MSDOS=1 install-asy DESTDIR="$BUILD/" +mv $BUILD/usr/local/bin/asy.exe $BUILD +cp $BUILD/asy.exe ~/CTAN/asymptote-$VERSION/binaries/$BINDIR/texlive +cp -a configure.ac ~/CTAN/asymptote-$VERSION/ +cp -a $SHARED/asydoc/* ~/CTAN/asymptote-$VERSION/doc +cd ~/CTAN/asymptote-$VERSION/binaries/$BINDIR +cp -a ../../README . +cd ~/CTAN +cp -a ~/asymptote/build-scripts/README-binaries asymptote-$VERSION/binaries/$BINDIR/texlive/README +SHAREDBIN=$SHARED/CTAN/asymptote-$VERSION +if [ $MACHINE == i686 ]; then +mkdir -p $SHAREDBIN +cp -a asymptote-$VERSION/binaries/$BINDIR $SHAREDBIN +else +cp -a $SHAREDBIN/i386-windows ~/CTAN/asymptote-$VERSION/binaries +fi +tar cfz asymptote-$VERSION-CTAN.tgz asymptote-$VERSION +cp -a --no-preserve=mode asymptote-$VERSION-CTAN.tgz $SHARED |