"Fossies" - the Fresh Open Source Software Archive

Member "asymptote-2.61/build-scripts/build-asygl" (18 Nov 2019, 1229 Bytes) of package /linux/misc/asymptote-2.61.src.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "build-asygl": 2.58_vs_2.59.

    1 #!/bin/sh
    2 if [ $# -gt 1 -o \( $# = 1 -a "$1" != "debug" \) ]; then \
    3     echo Usage: "$0 [debug]"; exit 1; \
    4 fi
    5 
    6 if [ $# -eq 1 ]; then \
    7 UGLIFY=cat; \
    8 UGLIFYOPT=""; \
    9 else \
   10 UGLIFY=uglifyjs; \
   11 UGLIFYOPTIONS="-m -c --comments"; \
   12 fi    
   13 
   14 GL_MATRIX_VERSION=2.4.0
   15 GL_MATRIX_DIR=gl-matrix-$GL_MATRIX_VERSION
   16 GL_MATRIX_DIR_PRUNED=$GL_MATRIX_DIR-pruned
   17 if test ! -r $GL_MATRIX_DIR_PRUNED; then \
   18     TEMPDIR=`mktemp -d`
   19     TARFILE=$TEMPDIR/$GL_MATRIX_DIR.tar.gz
   20     wget https://github.com/toji/gl-matrix/archive/v$GL_MATRIX_VERSION.tar.gz --output-document=$TARFILE
   21 tar -zxf $TARFILE
   22 mv $GL_MATRIX_DIR $GL_MATRIX_DIR_PRUNED
   23 rm -r $TEMPDIR
   24 cd $GL_MATRIX_DIR_PRUNED
   25 patch -p1 < ../patches/$GL_MATRIX_DIR_PRUNED.patch
   26 npm install
   27 npm run build-all
   28 echo "/*@license for gl-matrix mat3 and mat4 functions:" > LICENSE.js
   29 echo "*/"| cat LICENSE.md - >> LICENSE.js
   30 cd ..
   31 fi
   32 SHADERS=`mktemp`
   33 echo "let vertex=\`" > $SHADERS
   34 echo "\`;" | cat webgl/vertex.glsl - >> $SHADERS
   35 echo "let fragment=\`" >> $SHADERS
   36 echo "\`;" | cat webgl/fragment.glsl - >> $SHADERS
   37 cat webgl/license $GL_MATRIX_DIR_PRUNED/LICENSE.js \
   38     $SHADERS $GL_MATRIX_DIR_PRUNED/dist/gl-matrix.js webgl/gl.js | \
   39     $UGLIFY $UGLIFYOPTIONS > base/webgl/asygl.js
   40 rm $SHADERS