diff options
author | Karl Berry <karl@freefriends.org> | 2018-04-03 22:35:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-04-03 22:35:04 +0000 |
commit | 36b8d1341af4a7ab1f5759d75ad1eecfc375c1f4 (patch) | |
tree | 12d09b686d2c18f245dc6fd492c09cdcd4c02ebc /Build/source/utils/asymptote/build-scripts | |
parent | d73e029b665b866fe734e44508746a2cba513fd7 (diff) |
asy 2.42 sources
git-svn-id: svn://tug.org/texlive/trunk@47274 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/build-scripts')
5 files changed, 265 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/build-scripts/HOWTO-MSWindows b/Build/source/utils/asymptote/build-scripts/HOWTO-MSWindows new file mode 100644 index 00000000000..d96a8fc9876 --- /dev/null +++ b/Build/source/utils/asymptote/build-scripts/HOWTO-MSWindows @@ -0,0 +1,86 @@ + Compiling MSWindows binary of Asymptote under CYGWIN-x86_64 + +First run build-asymptote on Linux. This will build the documentation +and source tar ball and copy them to a directory ~/shared which needs to be +shared via virtualbox to the cygwin build environment. + +Install these cygwin packages: + +wget +make +patch +gcc-g++ +autoconf +bison +flex +w32api-headers +w32api-runtime +zlib-devel +libGLU-devel +libtirpc-devel (SRC) +libncurses-devel (SRC) +libreadline-devel (SRC) +libfftw3-devel (SRC) +libgsl-devel (SRC) +automake +libtool + +ln -s /usr/include/tirpc/rpc /usr/include/rpc +ln -s /usr/include/tirpc/netconfig.h /usr/include/netconfig.h +ln -s /usr/lib/libtirpc.a /usr/lib/librpc.a + +mv /usr/include/GL /usr/include/GL.orig + +Build and install from /usr/local/src: + +gsl-devel +./configure --prefix=/usr +make install + +ncurses-devel +./configure --prefix=/usr +make install + +readline-devel +./configure --prefix=/usr --without-curses --disable-shared +make install + +fftw3-devel: +./configure --prefix=/usr --enable-shared +make install + +Compile static libraries from source: +tirpc-devel +./configure --prefix=/usr --disable-gssapi +make install + +termcap-1.3.1 +./configure --prefix=/usr +make install + +git clone http://github.com/vectorgraphics/asymptote + +cd /usr/include +patch -p0 < ~/asymptote/patches/cygwin_glu.patch + +cd +~/asymptote/build-scripts/build-freeglut +mkdir -p ~/dll/cygwin +cp /usr/bin/cygwin1.dll ~/dll/cygwin + +install texlive + +mkdir ~/CTAN +cp -a ~/asymptote/buildscripts/README-binaries ~/CTAN + +GCVERSION=7.6.2 +tar -zxf gc-$GCVERSION.tar.gz +tar -zxf libatomic_ops-$GCVERSION.tar.gz +mv libatomic_ops-$GCVERSION gc-$GCVERSION/libatomic_ops +cd gc-$GCVERSION +patch < ~/asymptote/patches/cygwin_gc.patch +./configure --disable-shared +make check + +VERSION=2.42 +~/asymptote/build-scripts/build-asymptote.dos $VERSION diff --git a/Build/source/utils/asymptote/build-scripts/README-binaries b/Build/source/utils/asymptote/build-scripts/README-binaries new file mode 100644 index 00000000000..8e4192121d9 --- /dev/null +++ b/Build/source/utils/asymptote/build-scripts/README-binaries @@ -0,0 +1,5 @@ +The Asymptote executable for MSWindows can only be released under the GNU +General Public License (GPL) as it is linked against the GNU Scientific +Library, GNU Readline library, and other GPL libraries. The Asymptote +source itself is released under the GNU Lesser General Public License. + diff --git a/Build/source/utils/asymptote/build-scripts/build-asymptote b/Build/source/utils/asymptote/build-scripts/build-asymptote new file mode 100755 index 00000000000..75ab3f46392 --- /dev/null +++ b/Build/source/utils/asymptote/build-scripts/build-asymptote @@ -0,0 +1,74 @@ +#!/bin/sh -x +# Usage: build-asymptote [suffix] + +HOME=~bowman +SHARED=$HOME/shared/asy + +GCVERSION=7.6.2 +ATOMICVERSION=7.6.2 +GC=gc-$GCVERSION + +MAKEFLAGS=-j8 +export MAKEFLAGS +ASYMPTOTE=$HOME/asymptote +BUILD=/usr/local/src +BINDIR=usr +test /usr -ef $BUILD/$BINDIR && exit +LATEXDIR=$BUILD/$BINDIR/share/texmf/tex/latex/asymptote +cd $BUILD +rm -rf asymptote +git clone http://github.com/vectorgraphics/asymptote +cd asymptote +git log > ChangeLog +VERSIONgit=`grep AC_INIT configure.ac | cut -s -d[ -f3 | cut -s -d] -f1` +VERSION=${VERSIONgit/git/} +cat configure.ac | sed -e "s/$VERSIONgit/$VERSION/" > configure.ac_ +mv configure.ac_ configure.ac +cat $ASYMPTOTE/asymptote.spec | sed -e "s|Version:.*|Version: $VERSION|" > asymptote.spec +SRC=asymptote-$VERSION.src.tgz +if [ $# == 0 ]; then + cp asymptote.spec $ASYMPTOTE +fi +cd $BUILD +rm -rf asymptote-$VERSION +rm -rf $BUILD/$BINDIR +mv asymptote asymptote-$VERSION +wget http://hboehm.info/gc/gc_source/gc-$GCVERSION.tar.gz +wget http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-$ATOMICVERSION.tar.gz +cp /usr/local/src/$GC.tar.gz asymptote-$VERSION +cp /usr/local/src/libatomic_ops-$ATOMICVERSION.tar.gz asymptote-$VERSION +chown -R root.root asymptote-$VERSION +cd asymptote-$VERSION +find . -type d -exec /bin/bash -c "cd '{}';rm -rf .git" \; +rm -f .gitignore +./autogen.sh +./configure +make $MAKEFLAGS check || exit +make uninstall +make $MAKEFLAGS asy +make -j1 all +make -j1 install +#rm asy +#make LFLAGS=-static +strip asy +make DESTDIR="$BUILD/" latexdir=$LATEXDIR install +#rm $GC.tar.gz +rm $BUILD/$BINDIR/local/info/dir +cp -a $BUILD/asymptote-$VERSION/ChangeLog . +cp -a $ASYMPTOTE/ReleaseNotes . +make distclean +rm -rf autom4te.cache +cd /usr/local/share/doc/asymptote +rm -rf $SHARED/asydoc +mkdir -p $SHARED/asydoc/png +mkdir -p $SHARED/asydoc/FAQ +cp -a *.pdf ../../man/man1/asy.1 $SHARED/asydoc +cp -a /usr/local/share/info/asymptote/asymptote.info $SHARED/asydoc/png +cp -a /usr/local/share/info/asy-faq.info $SHARED/asydoc/FAQ +cd $BUILD +tar cfz $SRC asymptote-$VERSION +tar cfz asymptote-$VERSION.i386.tgz $BINDIR +cp $SRC $SHARED +rm -rf $BUILD/$BINDIR +tar -zxf asymptote-$VERSION.i386.tgz +su rpmbuild -c "rpmbuild -ta --nodeps $SRC && rm -rf ~/rpms/BUILD/asymptote-$VERSION" 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..376e0da0558 --- /dev/null +++ b/Build/source/utils/asymptote/build-scripts/build-asymptote.dos @@ -0,0 +1,78 @@ +#!/bin/sh -x +GC=7.6.2 + +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/i386-win32/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 $HOME/dll/*.dll $BUILD +chmod 0644 $BUILD/*.dll +cp -a $BUILD/*.dll ~/CTAN/asymptote-$VERSION/binaries/i386-win32/ +cp -a $HOME/dll/*.dll . +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/*.py . +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 + +/cygdrive/c/Program\ Files\ \(x86\)/NSIS/makensis.exe asymptote.nsi +cp -a --no-preserve=mode asymptote-$VERSION-setup.exe $SHARED +mv asymptote-$VERSION-setup.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/i386-win32/texlive +cp -a configure.ac ~/CTAN/asymptote-$VERSION/ +cp -a $SHARED/asydoc/* ~/CTAN/asymptote-$VERSION/doc +cd ~/CTAN/asymptote-$VERSION/binaries/i386-win32 +ln -sf ../../README . +cd ~/CTAN +cp -a ~/asymptote/build-scripts/README-binaries asymptote-$VERSION/binaries/i386-win32/texlive/README +tar cfz asymptote-$VERSION-CTAN.tgz asymptote-$VERSION +cp -a --no-preserve=mode asymptote-$VERSION-CTAN.tgz $SHARED diff --git a/Build/source/utils/asymptote/build-scripts/build-freeglut b/Build/source/utils/asymptote/build-scripts/build-freeglut new file mode 100755 index 00000000000..95d4cbfb4bf --- /dev/null +++ b/Build/source/utils/asymptote/build-scripts/build-freeglut @@ -0,0 +1,22 @@ +#!/bin/sh -x +#Be sure to remove /usr/include/GL +wget http://prdownloads.sourceforge.net/freeglut/freeglut-2.8.1.tar.gz +ln -sf /usr/bin/cyggcc_s-1.dll /usr/lib/libgcc_s.a +tar -zxf freeglut-2.8.1.tar.gz +cd freeglut-2.8.1 +patch -p1 < ~/asymptote/patches/cygwin_freeglut-2.8.1.patch +./configure --prefix=/usr --without-x +make +cd src +gcc -s -static -shared -o freeglut.dll *.o -Wl,--out-implib=libfreeglut.a -lglu32 -lopengl32 -lgdi32 -lwinmm +cp freeglut.dll /lib +mkdir -p ~/dll +cp freeglut.dll ~/dll +gcc -s -shared -o freeglut.dll *.o -Wl,--out-implib=libfreeglut.a -lglu32 -lopengl32 -lgdi32 -lwinmm +cp libfreeglut.a /lib +cd .. +cp -a include/GL/*.h /usr/include/w32api/GL/ + +#OPTIONAL: To compile manually in src: +#gcc -O2 -c -D_WIN32 -DHAVE_CONFIG_H -DFREEGLUT_EXPORTS *.c -I.. -I../include + |