aboutsummaryrefslogtreecommitdiff
path: root/media/gfx/jhead/jhead.SlackBuild
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-01-13 14:34:45 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-01-13 14:34:45 +0000
commitee9798b0ddaf062b80c7ac9c5f7adc8bf7f370d8 (patch)
treebabc8ddd77fea9c1eb1554cdaf69b3661f586ca9 /media/gfx/jhead/jhead.SlackBuild
parent473388597803932cdefb6154e056f2a458200758 (diff)
downloadslackbuilds-ee9798b0ddaf062b80c7ac9c5f7adc8bf7f370d8.tar.gz
slackbuilds-ee9798b0ddaf062b80c7ac9c5f7adc8bf7f370d8.tar.bz2
jhead: adding patch to fix GLSA 200901-02
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2077 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'media/gfx/jhead/jhead.SlackBuild')
-rw-r--r--media/gfx/jhead/jhead.SlackBuild31
1 files changed, 28 insertions, 3 deletions
diff --git a/media/gfx/jhead/jhead.SlackBuild b/media/gfx/jhead/jhead.SlackBuild
index 137c0c02..873dc3f1 100644
--- a/media/gfx/jhead/jhead.SlackBuild
+++ b/media/gfx/jhead/jhead.SlackBuild
@@ -47,9 +47,9 @@ NUMJOBS=${NUMJOBS:=""}
LIBDIR="$PREFIX/lib"
if [ "$ARCH" = "i386" ]; then
- SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i386 -mtune=i686"
elif [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686"
elif [ "$ARCH" = "s390" ]; then
@@ -120,7 +120,7 @@ if [ -e "$CWD/Manifest" ]; then
fi
# Check source code integrity
- for ALGO in md5 sha1 sha256 sha512 rmd160; do
+ for ALGO in md5 rmd160 sha1 sha256 sha512; do
if [ $ALGO = "rmd160" ]; then
ALGO_SRC="`openssl rmd160 $MANIFEST_FILE | awk '{ print $2 }'`"
else
@@ -148,6 +148,31 @@ tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TA
PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
cd "$PKG_SRC"
+# Patch source
+patches=" [[PATCH URLS]]
+ $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
+ $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
+for patch in $patches; do
+ patch="`basename $patch`"
+ if [ -f "$CWD/$patch" ]; then
+ patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch" ]; then
+ patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/$patch.gz" ]; then
+ gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch.gz" ]; then
+ gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$SRC_DIR/$patch" ]; then
+ if [ "`basename $patch .gz`" != "$patch" ]; then
+ gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ elif [ "`basename $patch .bz2`" != "$patch" ]; then
+ bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ else
+ patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
+ fi
+ fi
+done
+
# Compile
make $NUMJOBS || exit $ERROR_MAKE