aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKot Czarny <tjosko@yahoo.com>2018-07-12 23:20:20 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-07-14 06:55:55 +0700
commit940631b0eec58bfad2e874beada0c9149e1c6fb4 (patch)
tree2e328f094fd995b7028b2ae52df44e7ac9141e72
parentaa2e9c34ea2be7c45f0e3f839920a95c0f19d82f (diff)
system/upx: Updated for version 3.94 + new maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/upx/slack-desc2
-rw-r--r--system/upx/upx-0001-fix-check_whitespace.patch11
-rw-r--r--system/upx/upx.SlackBuild42
-rw-r--r--system/upx/upx.info14
4 files changed, 47 insertions, 22 deletions
diff --git a/system/upx/slack-desc b/system/upx/slack-desc
index 920fab84f5ad3..8f212c121041c 100644
--- a/system/upx/slack-desc
+++ b/system/upx/slack-desc
@@ -13,7 +13,7 @@ upx: decompression. Your executables suffer no memory overhead or other
upx: drawbacks for most of the formats supported, because of in-place
upx: decompression.
upx:
-upx: Homepage: http://upx.sourceforge.net/
+upx: Homepage: https://upx.github.io/
upx:
upx:
upx:
diff --git a/system/upx/upx-0001-fix-check_whitespace.patch b/system/upx/upx-0001-fix-check_whitespace.patch
new file mode 100644
index 0000000000000..67aa0647a5341
--- /dev/null
+++ b/system/upx/upx-0001-fix-check_whitespace.patch
@@ -0,0 +1,11 @@
+--- a/src/stub/scripts/check_whitespace.sh 2018-06-19 10:37:43.906967996 +0200
++++ b/src/stub/scripts/check_whitespace.sh 2018-06-19 10:32:18.002066908 +0200
+@@ -15,6 +15,8 @@
+ -type f -iname '*.exe' -prune -o \
+ -type f -iname '*.pdf' -prune -o \
+ -type f -iname '*.swp' -prune -o \
++ -type f -iname '*.o' -prune -o \
++ -type f -iname '*.out' -prune -o \
+ -type f -print0 | \
+ LC_ALL=C sort -z | xargs -0r perl -n -e '
+ #print("$ARGV\n");
diff --git a/system/upx/upx.SlackBuild b/system/upx/upx.SlackBuild
index 2f139e743f11c..8e3e17f3e0874 100644
--- a/system/upx/upx.SlackBuild
+++ b/system/upx/upx.SlackBuild
@@ -2,6 +2,7 @@
# Slackware build script for upx
+# Copyright 2018 KotCzarny <tjosko@yahoo.com>
# Copyright 2010, 2012 Binh Nguyen <binhvng@gmail.com>
# All rights reserved.
#
@@ -23,13 +24,13 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=upx
-VERSION=${VERSION:-3.91}
+VERSION=${VERSION:-3.94}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -40,36 +41,51 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
set -eu
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION-src
-tar xvf $CWD/$PRGNAM-$VERSION-src.tar.bz2
+tar xvf $CWD/$PRGNAM-$VERSION-src.tar.xz
cd $PRGNAM-$VERSION-src
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 {} \;
-# Extract LZMA SDK to a proper place for use at build-time
-mkdir -p $TMP/lzma465
-tar xvf $CWD/lzma465.tar.bz2 -C $TMP/lzma465
+patch -p1 < "$CWD/upx-0001-fix-check_whitespace.patch"
-make UPX_LZMA_VERSION=0x465 UPX_LZMADIR=$TMP/lzma465 all
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+CXXFLAGS_WERROR="" \
+make all
install -D src/upx.out $PKG/usr/bin/upx
-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
install -D -m 644 doc/upx.1 $PKG/usr/man/man1/upx.1
find $PKG/usr/man -type f -exec gzip -9 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a BUGS COPYING LICENSE NEWS PROJECTS README* THANKS TODO \
+cp -a BUGS COPYING LICENSE NEWS PROJECTS README* THANKS \
doc/*.txt doc/upx.pod \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
diff --git a/system/upx/upx.info b/system/upx/upx.info
index ea0ef79aad67c..ce664df17a8d5 100644
--- a/system/upx/upx.info
+++ b/system/upx/upx.info
@@ -1,12 +1,10 @@
PRGNAM="upx"
-VERSION="3.91"
-HOMEPAGE="http://upx.sourceforge.net/"
-DOWNLOAD="http://downloads.sourceforge.net/upx/upx-3.91-src.tar.bz2 \
- http://downloads.sourceforge.net/sevenzip/lzma465.tar.bz2"
-MD5SUM="c6d0b3ea2ecb28cb8031d59a4b087a43 \
- 29d5ffd03a5a3e51aef6a74e9eafb759"
+VERSION="3.94"
+HOMEPAGE="https://upx.github.io/"
+DOWNLOAD="https://github.com/upx/upx/releases/download/v3.94/upx-3.94-src.tar.xz"
+MD5SUM="19e898edc41bde3f21e997d237156731"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="ucl"
-MAINTAINER="Binh Nguyen"
-EMAIL="binhvng@gmail.com"
+MAINTAINER="Kot Czarny"
+EMAIL="tjosko@yahoo.com"