diff options
author | Vijay Marcel <vijaymarcel@outlook.com> | 2024-09-04 21:58:58 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-09-04 22:01:46 +0700 |
commit | 700da5873fad09a8d6373a8bf9e4c9d6f8f7e9a4 (patch) | |
tree | 908261bbc976e4829b1278744f218e5b87f6c785 /development/cunit/cunit.SlackBuild | |
parent | 18222c767087a56eb8a5444d4d164e5c1d52868e (diff) |
development/cunit: New maintainer and patches.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/cunit/cunit.SlackBuild')
-rw-r--r-- | development/cunit/cunit.SlackBuild | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/development/cunit/cunit.SlackBuild b/development/cunit/cunit.SlackBuild index 5b0014d755533..90ab10c80f1e0 100644 --- a/development/cunit/cunit.SlackBuild +++ b/development/cunit/cunit.SlackBuild @@ -3,6 +3,7 @@ # Slackware build script for CUnit # Copyright 2013 Benjamin Trigona-Harany +# Copyright 2024 Vijay Marcel # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -30,7 +31,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=cunit SRCNAM=CUnit VERSION=${VERSION:-2.1_3} -BUILD=${BUILD:-3} +BUILD=${BUILD:-4} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -54,13 +55,13 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" + SLKCFLAGS="-march=i586 -mtune=i686 -pipe -O2 -fPIC" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" + SLKCFLAGS="-march=i686 -mtune=i686 -pipe -O2 -fPIC" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" + SLKCFLAGS="-march=x86-64 -mtune=generic -pipe -O2 -fPIC" LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" @@ -68,6 +69,7 @@ else fi set -e +trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -82,41 +84,46 @@ 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 {} \+ -libtoolize --force --copy -aclocal -autoheader -automake --add-missing --include-deps --copy -autoconf + +patch -p1 --verbose --unified < $CWD/patches/0003-fix-warnings-in-man.patch +patch -p1 --verbose --unified < $CWD/patches/0004-doc-intorduction-fix-links-to-headers-4K-in-size.patch +patch -p1 --verbose --unified < $CWD/patches/fix-string-format-errors-with-recent-ncu.patch +patch -p1 --verbose --unified < $CWD/patches/curses_ftbfs.patch + +autoreconf -fiv CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --build=$ARCH \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ + --enable-curses \ + --enable-examples \ + --enable-memtrace \ --enable-static=no \ + --with-gnu-ld \ --build=$ARCH-slackware-linux make make install DESTDIR=$PKG find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + | cut -f 1 -d : | xargs strip --strip-unneeded --remove-section=.comment --remove-section=.note 2> /dev/null || true + +rm -vf $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la # Need to adjust mandir location mv $PKG/usr/share/man $PKG/usr/man 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 +mkdir -pv $PKG/usr/doc/$PRGNAM-$VERSION mv $PKG/usr/doc/$SRCNAM $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - AUTHORS COPYING ChangeLog NEWS README TODO \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -av AUTHORS COPYING ChangeLog NEWS README TODO $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 +mkdir -pv $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG |