summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2019-01-28 11:41:00 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-02-02 08:12:09 +0700
commit8412b63376e3900ae6cc90676ab0f7b919516058 (patch)
treed9be5e5009bdd6f3702af96a5265894857cbb0b2
parent58e46cadc224c0ea644ec068eb6fe3bae93acf7c (diff)
downloadslackbuilds-8412b63376e3900ae6cc90676ab0f7b919516058.tar.gz
system/pcmanfm: Updated for version 1.3.1, cleanups.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--system/pcmanfm/patches/0001-avoid-undefined-isdigit-behaviour.patch54
-rw-r--r--system/pcmanfm/pcmanfm.SlackBuild22
-rw-r--r--system/pcmanfm/pcmanfm.info6
3 files changed, 68 insertions, 14 deletions
diff --git a/system/pcmanfm/patches/0001-avoid-undefined-isdigit-behaviour.patch b/system/pcmanfm/patches/0001-avoid-undefined-isdigit-behaviour.patch
new file mode 100644
index 0000000000..ad9a022db9
--- /dev/null
+++ b/system/pcmanfm/patches/0001-avoid-undefined-isdigit-behaviour.patch
@@ -0,0 +1,54 @@
+From 0619a81f358d85568d990fc78c67e121e55f1c05 Mon Sep 17 00:00:00 2001
+From: Michael Weghorn <m.weghorn@posteo.de>
+Date: Thu, 27 Dec 2018 11:56:09 +0100
+Subject: [PATCH] Avoid undefined 'isdigit()' behaviour
+
+As the C11 standard says in section 7.4, 1),
+the 'isdigit()' function is only well-defined
+under this precondition:
+
+> The header <ctype.h> declares several functions
+> useful for classifying and mapping characters.
+> In all cases the argument is an int, the value of
+> which shall be representable as an unsigned char or
+> shall equal the value of the macro EOF. If the argument
+> has any other value, the behavior is undefined.
+
+Therefore avoid to use the 'isdigit()' function here,
+since the Gdk key codes and thus the 'keyval'
+member from the 'GdkEventKey' do not always fulfill
+this requirement and the behaviour is thus undefined.
+---
+ NEWS | 5 +++++
+ src/main-win.c | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/NEWS b/NEWS
+index d2e6caa..c5b2285 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,3 +1,8 @@
++Changes on 1.3.2 since 1.3.1:
++
++* Fixed case when some keyboard shortcuts stopped working: Alt+Home, Alt+Up.
++
++
+ Changes on 1.3.1 since 1.3.0:
+
+ * Allowed bigger sizes of icons and thumbnails as 256*256 appears to be small
+diff --git a/src/main-win.c b/src/main-win.c
+index 3907dba..49fc53b 100644
+--- a/src/main-win.c
++++ b/src/main-win.c
+@@ -2465,7 +2465,7 @@ static gboolean on_key_press_event(GtkWidget* w, GdkEventKey* evt)
+
+ if(modifier == GDK_MOD1_MASK) /* Alt */
+ {
+- if(isdigit(evt->keyval)) /* Alt + 0 ~ 9, nth tab */
++ if(evt->keyval >= '0' && evt->keyval <= '9') /* Alt + 0 ~ 9, nth tab */
+ {
+ int n;
+ if(evt->keyval == '0')
+--
+2.1.4
+
diff --git a/system/pcmanfm/pcmanfm.SlackBuild b/system/pcmanfm/pcmanfm.SlackBuild
index 60612070e8..2785dd5496 100644
--- a/system/pcmanfm/pcmanfm.SlackBuild
+++ b/system/pcmanfm/pcmanfm.SlackBuild
@@ -4,7 +4,7 @@
# Copyright 2006-2009 Chess Griffin <chess@chessgriffin.com>
# Copyright 2010 Chris Abela <chris.abela@maltats.com>
-# Copyright 2011-2018 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
+# Copyright 2011-2019 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +25,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=pcmanfm
-VERSION=${VERSION:-1.3.0}
+VERSION=${VERSION:-1.3.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -42,8 +42,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-DOCS="AUTHORS ChangeLog COPYING INSTALL NEWS README TODO"
-
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
@@ -63,6 +61,8 @@ case "$GTK" in
*) gtk="--with-gtk=2" ;;
esac
+DOCS="AUTHORS ChangeLog COPYING INSTALL NEWS README TODO"
+
set -e
rm -rf $PKG
@@ -71,13 +71,14 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z
cd $PRGNAM-$VERSION
-
-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 {} \;
+
+# Apply upstream patches
+for i in $CWD/patches/* ; do patch -p1 < $i ; done
sh autogen.sh || true
@@ -102,7 +103,6 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-find $PKG/usr/doc -type f -exec chmod 0644 {} \;
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/system/pcmanfm/pcmanfm.info b/system/pcmanfm/pcmanfm.info
index 0e77c2eb2d..7cb89e0763 100644
--- a/system/pcmanfm/pcmanfm.info
+++ b/system/pcmanfm/pcmanfm.info
@@ -1,8 +1,8 @@
PRGNAM="pcmanfm"
-VERSION="1.3.0"
+VERSION="1.3.1"
HOMEPAGE="https://wiki.lxde.org/en/PCManFM"
-DOWNLOAD="https://downloads.sf.net/pcmanfm/pcmanfm-1.3.0.tar.xz"
-MD5SUM="827838f7f6b17dc97e1690c07da8fdb3"
+DOWNLOAD="https://downloads.sf.net/pcmanfm/pcmanfm-1.3.1.tar.xz"
+MD5SUM="d32ad2c9c7c52bff2004bbc120b53420"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="libfm"