summaryrefslogtreecommitdiffstats
path: root/libraries/nx-libs/nx-libs.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/nx-libs/nx-libs.SlackBuild')
-rw-r--r--libraries/nx-libs/nx-libs.SlackBuild46
1 files changed, 38 insertions, 8 deletions
diff --git a/libraries/nx-libs/nx-libs.SlackBuild b/libraries/nx-libs/nx-libs.SlackBuild
index 0f4c934ccc..fbc40c8eb6 100644
--- a/libraries/nx-libs/nx-libs.SlackBuild
+++ b/libraries/nx-libs/nx-libs.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for nx-libs
@@ -23,11 +23,23 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220215 bkw: Modified by SlackBuilds.org:
+# - added -j1 to the make commands. parallel builds are broken. they
+# may occasionally work, but it's unreliable.
+# Note: there are other issues with this script:
+# ! SLKCFLAGS are never used.
+# ! -Werror is included in the flags that do get used, meaning this
+# will break in the future when Slackware's gcc gets upgraded.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=nx-libs
-VERSION=${VERSION:-3.5.99.20_1}
-SRCVERSION=$(echo $VERSION | tr _ - )
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-3.5.99.26}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCVERSION=$(echo $VERSION | tr _ - )
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +49,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -62,7 +81,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$SRCVERSION
-tar xvf $CWD/$PRGNAM-$SRCVERSION-full.tar.gz
+tar xvf $CWD/$PRGNAM-$SRCVERSION.tar.gz
cd $PRGNAM-$SRCVERSION
chown -R root:root .
find -L . \
@@ -71,10 +90,16 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# Fix for the newer binutils (no more l flag for ar)
+sed -i -e "s|ArCmdBase\ clq|ArCmdBase cq|" \
+ -e "s|ArCmdBase\ rul|ArCmdBase ru|" \
+ -e "s|ArCmdBase\ xl|ArCmdBase x|" \
+ nx-X11/config/cf/Imake.tmpl
+
# Fix man install dir
sed -i "s|share/man|man|g" Makefile
-make CONFIGURE="./configure --libdir=/usr/lib${LIBDIRSUFFIX} --prefix=/usr --mandir=/usr/man" PREFIX=/usr LIBDIR=/usr/lib${LIBDIRSUFFIX}
+make -j1 CONFIGURE="./configure --libdir=/usr/lib${LIBDIRSUFFIX} --prefix=/usr --mandir=/usr/man" PREFIX=/usr LIBDIR=/usr/lib${LIBDIRSUFFIX} IMAKE_DEFINES="-DUseTIRPC=YES"
make install PREFIX=/usr LIBDIR=/usr/lib${LIBDIRSUFFIX} DESTDIR=$PKG
@@ -86,11 +111,16 @@ chmod 0755 $PKG/usr/lib${LIBDIRSUFFIX}/lib*.so*
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+rm -f $PKG/usr/lib*/*.la
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE