From f1857f81eb5f9f7cd5ef35b7a61489c4449e44db Mon Sep 17 00:00:00 2001 From: Niclas Hofmann Date: Thu, 19 Sep 2019 14:47:55 +0200 Subject: [PATCH 1/5] xfig-3.2.7: add --- xfig-3.2.7-0.build.sh | 101 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100755 xfig-3.2.7-0.build.sh diff --git a/xfig-3.2.7-0.build.sh b/xfig-3.2.7-0.build.sh new file mode 100755 index 0000000..9657129 --- /dev/null +++ b/xfig-3.2.7-0.build.sh @@ -0,0 +1,101 @@ +#! /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 $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 + PKGDIR=$(pwd)/pkg + make package pkgdir=$PKGDIR + ./installnetpbm < Date: Fri, 20 Sep 2019 14:41:00 +0200 Subject: [PATCH 2/5] xfig: Harden multiprocessor build With 12 cores building is ok, with ~60 not always. --- xfig-3.2.7-0.build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xfig-3.2.7-0.build.sh b/xfig-3.2.7-0.build.sh index 9657129..d6b1bab 100755 --- a/xfig-3.2.7-0.build.sh +++ b/xfig-3.2.7-0.build.sh @@ -62,7 +62,7 @@ cd $BUILDDIR RPATH = -Wl,-rpath=$PREFIX/lib EOF - make + make || make -j1 PKGDIR=$(pwd)/pkg make package pkgdir=$PKGDIR ./installnetpbm < Date: Fri, 20 Sep 2019 14:43:11 +0200 Subject: [PATCH 3/5] xfig: Tell xfig about its default settings Yes, and a user may also define its own creation... --- xfig-3.2.7-0.build.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/xfig-3.2.7-0.build.sh b/xfig-3.2.7-0.build.sh index d6b1bab..98654bd 100755 --- a/xfig-3.2.7-0.build.sh +++ b/xfig-3.2.7-0.build.sh @@ -1,7 +1,5 @@ #! /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 @@ -88,6 +86,17 @@ EOF --prefix=$PREFIX make make install + # create a xfig wrapper since /etc/X11/app-defaults/Fig is gone/outdated + ( + cd $PREFIX/bin + mv xfig xfig.app + cat <<- EOF > xfig + #! /bin/bash + XAPPLRESDIR=\${XAPPLRESDIR:-$PREFIX/share/X11/app-defaults} \ + exec $PREFIX/bin/xfig.app "\$@" + EOF + chmod 755 xfig + ) ) ( From 48ec905857f9fc095866e3d70ad2f5a188d00bce Mon Sep 17 00:00:00 2001 From: thomas Date: Fri, 20 Sep 2019 14:44:15 +0200 Subject: [PATCH 4/5] xfig: Install netpbm 'by hand' Faking the interactive way is too spooky :) --- xfig-3.2.7-0.build.sh | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/xfig-3.2.7-0.build.sh b/xfig-3.2.7-0.build.sh index 98654bd..26427b9 100755 --- a/xfig-3.2.7-0.build.sh +++ b/xfig-3.2.7-0.build.sh @@ -63,19 +63,32 @@ EOF make || make -j1 PKGDIR=$(pwd)/pkg make package pkgdir=$PKGDIR - ./installnetpbm < $PREFIX/lib/pkgconfig/netpbm.pc + + cd $PKGDIR + cp -va bin $PREFIX + cp -va include $PREFIX + ( cd $PREFIX/include; for i in netpbm/*.h; do ln -s $i; done ) # an awful compatibility hack ... + if [ -r lib/libnetpbm.so.11 ]; then + ( cd lib ; rm -f libnetpbm.so ; ln -sf libnetpbm.so.11 libnetpbm.so ) + else + echo "ERROR: libnetpbm.so.11 not found." + echo "Please edit the correct library major version into the build script" + kill $$; exit 1 + fi + cp -va lib $PREFIX + cp -vp link/libnetpbm.a $PREFIX/lib + cp -va man/man? $PREFIX/share/man + cp -vp misc/* $PREFIX/lib ) ( From d5000f98ee9717fcbf706531f0654c9b90137443 Mon Sep 17 00:00:00 2001 From: thomas Date: Fri, 20 Sep 2019 14:44:50 +0200 Subject: [PATCH 5/5] xfig: Remove devel magic --- xfig-3.2.7-0.build.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/xfig-3.2.7-0.build.sh b/xfig-3.2.7-0.build.sh index 26427b9..4875362 100755 --- a/xfig-3.2.7-0.build.sh +++ b/xfig-3.2.7-0.build.sh @@ -1,9 +1,5 @@ #! /bin/bash -# 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