From 8ec75fa68d140f8c45c10c9f3b0407dc8e20285f Mon Sep 17 00:00:00 2001 From: Willy Sudiarto Raharjo Date: Thu, 3 Mar 2016 21:02:14 +0700 Subject: [PATCH] system/hddtemp: Fix build. Signed-off-by: Willy Sudiarto Raharjo --- system/hddtemp/hddtemp.SlackBuild | 23 +++++++++++------------ system/hddtemp/hddtemp.patch | 24 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 12 deletions(-) create mode 100644 system/hddtemp/hddtemp.patch diff --git a/system/hddtemp/hddtemp.SlackBuild b/system/hddtemp/hddtemp.SlackBuild index 9095f02965..d6470bfc93 100644 --- a/system/hddtemp/hddtemp.SlackBuild +++ b/system/hddtemp/hddtemp.SlackBuild @@ -9,7 +9,7 @@ PRGNAM=hddtemp SRCVERSION=${SRCVERSION:-0.3-beta15} VERSION=$(echo $SRCVERSION | tr -d "-") -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -39,7 +39,7 @@ else LIBDIRSUFFIX="" fi -set -e +set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -49,10 +49,12 @@ tar xvf $CWD/$PRGNAM-$SRCVERSION.tar.bz2 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 \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -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 {} \; + +patch -p1 < $CWD/hddtemp.patch CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -65,14 +67,11 @@ CXXFLAGS="$SLKCFLAGS" \ make make install DESTDIR=$PKG -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +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 -( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done -) - +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/etc/hddtemp cp -a $CWD/hddtemp.db $PKG/etc/hddtemp/hddtemp.db.new diff --git a/system/hddtemp/hddtemp.patch b/system/hddtemp/hddtemp.patch new file mode 100644 index 0000000000..904a674c93 --- /dev/null +++ b/system/hddtemp/hddtemp.patch @@ -0,0 +1,24 @@ +__USE_GNU needs to be in effect when including sys/ucontext.h, +and signal.h pulls it in in some setups. + +diff -up hddtemp-0.3-beta15/src/backtrace.c~ hddtemp-0.3-beta15/src/backtrace.c +--- hddtemp-0.3-beta15/src/backtrace.c~ 2006-04-19 05:38:14.000000000 +0300 ++++ hddtemp-0.3-beta15/src/backtrace.c 2010-02-14 21:59:47.000000000 +0200 +@@ -27,13 +27,12 @@ + #include + #include + #include ++#define __USE_GNU ++#include + #include + #include + #include + +-#define __USE_GNU +-#include +- + #define MAX_BTSIZE 64 + + void backtrace_handler(int n, siginfo_t *ist, void *extra) { + +