From 29a147183c9b10521062294ad2a6f1969df6e870 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 18 Mar 2022 18:36:27 -0400 Subject: [PATCH] system/hddtemp: Fix 32-bit build. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- system/hddtemp/hddtemp.SlackBuild | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/system/hddtemp/hddtemp.SlackBuild b/system/hddtemp/hddtemp.SlackBuild index 381473faf4..836e889351 100644 --- a/system/hddtemp/hddtemp.SlackBuild +++ b/system/hddtemp/hddtemp.SlackBuild @@ -24,11 +24,15 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20220318 bkw: Modified by SlackBuilds.org: +# - fix 32-bit build. +# - do not install useless INSTALL in doc dir. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=hddtemp VERSION=${VERSION:-0.3beta15} -BUILD=${BUILD:-3} +BUILD=${BUILD:-4} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -42,9 +46,6 @@ if [ -z "$ARCH" ]; then esac fi -# 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 @@ -79,12 +80,17 @@ cd $PRGNAM-$SRCVERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ + -o -perm 511 \) -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ patch -p1 < $CWD/hddtemp.patch +# 20220318 bkw: 'struct ucontext' was removed from glibc, use +# 'ucontext_t' instead: https://sourceware.org/glibc/wiki/Release/2.26 +# Curiously, this only broke the build on 32-bit Slackware... +sed -i 's,struct *ucontext,ucontext_t,g' src/backtrace.c + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -97,19 +103,14 @@ CXXFLAGS="$SLKCFLAGS" \ --build=$ARCH-slackware-linux make -make install DESTDIR=$PKG +make install-strip DESTDIR=$PKG +gzip -9 $PKG/usr/man/man*/* install -D -m 644 $CWD/hddtemp.db $PKG/etc/hddtemp/hddtemp.db.new install -D -m 644 $CWD/rc.hddtemp.new $PKG/etc/rc.d/rc.hddtemp.new -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 -cp -a ABOUT-NLS ChangeLog GPL-2 INSTALL README TODO COPYING LICENSE contribs/ \ +cp -a ABOUT-NLS ChangeLog GPL-2 README TODO COPYING LICENSE contribs/ \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild