Skip to content
Permalink
765a5082c3
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 101 lines (78 sloc) 2.35 KB
#! /bin/bash
# MIND: xfig-3.2.7-0/share/X11/app-defaults/Fig and old /etc/X11/app-defaults/Fig
# wenn fertig - beide zeilen loeschen
COOKIE=$(mcookie); grep -v V_GREP_ME $0 > /dev/shm/runme-$COOKIE.sh ; sleep 1; exec bash /dev/shm/runme-$COOKIE.sh
TESTING=1
PKG=xfig
VERSION=3.2.7
BUILD=0
PREFIX=/pkg/$PKG-$VERSION-$BUILD
if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$VERSION-$BUILD ; fi
set -xe
umask 022
BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.build.tmp
test -d $BUILD_TMPDIR && ( chmod -R u+rwx $BUILD_TMPDIR || true ; rm -rf $BUILD_TMPDIR )
mkdir -p $BUILD_TMPDIR/home
export TMPDIR=$BUILD_TMPDIR
export HOME=$BUILD_TMPDIR/home
exec </dev/null
mkdir -p $PREFIX
cat >$PREFIX/profile <<-EOF
PATH=$PREFIX/bin:\$PATH
if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} ; fi
EOF
. $PREFIX/profile
export MAKEFLAGS="-j $(nproc)"
BUILDDIR=$PREFIX/build
mkdir -p $BUILDDIR
cd $BUILDDIR
(
NPBMVERSION=10.73.28
test -e netpbm-${NPBMVERSION}.tar.gz || wget https://sourceforge.net/projects/netpbm/files/latest/download -O netpbm-${NPBMVERSION}.tar.gz
test -d netpbm-${NPBMVERSION} || tar xvf netpbm-${NPBMVERSION}.tar.gz
cd netpbm-${NPBMVERSION}
cat config.mk.in - <<- EOF > config.mk
DEFAULT_TARGET = nonmerge
NETPBMLIBTYPE = unixshared
NETPBMLIBSUFFIX = so
STATICLIB_TOO = Y
CFLAGS = -O3 -ffast-math -pedantic -fno-common -Wall -Wno-uninitialized -Wmissing-declarations -Wimplicit -Wwrite-strings -Wmissing-prototypes -Wundef -Wno-unknown-pragmas
CFLAGS_MERGE = -Wno-missing-declarations -Wno-missing-prototypes
LDRELOC = ld --reloc
LINKER_CAN_DO_EXPLICIT_LIBRARY = Y
LINKERISCOMPILER = Y
CFLAGS_SHLIB += -fPIC
TIFFLIB = libtiff.so
JPEGLIB = libjpeg.so
ZLIB = libz.so
NETPBM_DOCURL = http://netpbm.sourceforge.net/doc/
WANT_SSE = Y
RPATH = -Wl,-rpath=$PREFIX/lib
EOF
make || make -j1
PKGDIR=$(pwd)/pkg
make package pkgdir=$PKGDIR
./installnetpbm <<EOF
./pkg
../../
N
N
EOF
)
(
test -e xfig-${VERSION}.tar.xz || wget http://downloads.sourceforge.net/mcj/xfig-full-${VERSION}a.tar.xz -O xfig-${VERSION}.tar.xz
test -d xfig-${VERSION}a || tar xvf xfig-${VERSION}.tar.xz
cd xfig-${VERSION}a
./configure \
--prefix=$PREFIX
make
make install
)
(
cd fig2dev-${VERSION}a
./configure \
--prefix=$PREFIX
make
make install
)
exit