diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/asymptote/build-scripts/build-asymptote |
Initial commit
Diffstat (limited to 'graphics/asymptote/build-scripts/build-asymptote')
-rwxr-xr-x | graphics/asymptote/build-scripts/build-asymptote | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/graphics/asymptote/build-scripts/build-asymptote b/graphics/asymptote/build-scripts/build-asymptote new file mode 100755 index 0000000000..e3553fbfd0 --- /dev/null +++ b/graphics/asymptote/build-scripts/build-asymptote @@ -0,0 +1,74 @@ +#!/bin/sh -x +# Usage: build-asymptote [suffix] + +HOME=~bowman +SHARED=$HOME/shared/asy + +GCVERSION=8.0.4 +ATOMICVERSION=7.6.10 +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 https://github.com/ivmai/bdwgc/releases/download/v$GCVERSION/gc-$GCVERSION.tar.gz +wget https://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 -rf .gitignore .vscode +./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.x86_64.tgz $BINDIR +cp $SRC $SHARED +rm -rf $BUILD/$BINDIR +tar -zxf asymptote-$VERSION.x86_64.tgz +su rpmbuild -c "rpmbuild -ta --nodeps $SRC && rm -rf ~/rpms/BUILD/asymptote-$VERSION&&chmod -R g+r /u/rpmbuild/rpms/RPMS/" |