summaryrefslogtreecommitdiff
path: root/desktop/kde-gtk-config/kde-gtk-config.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/kde-gtk-config/kde-gtk-config.SlackBuild')
-rw-r--r--desktop/kde-gtk-config/kde-gtk-config.SlackBuild37
1 files changed, 23 insertions, 14 deletions
diff --git a/desktop/kde-gtk-config/kde-gtk-config.SlackBuild b/desktop/kde-gtk-config/kde-gtk-config.SlackBuild
index 53071aa7c6..46747081c7 100644
--- a/desktop/kde-gtk-config/kde-gtk-config.SlackBuild
+++ b/desktop/kde-gtk-config/kde-gtk-config.SlackBuild
@@ -2,8 +2,11 @@
# Slackware build script for kde-gtk-config
+# Copyright 2017 Daniel Prosser | Lexington Park, MD
+# All rights reserved.
+#
# Originally by Luis Henrique <lmello.009@gmail.com>
-# Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org
+# and Ryan P.C. McQuen <ryanpcmcquen@member.fsf.org>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,13 +27,13 @@
# <http://www.gnu.org/licenses/>.
PRGNAM=kde-gtk-config
-VERSION=${VERSION:-2.2.1}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-2.2_git}
+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
@@ -41,8 +44,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -60,9 +63,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -fr $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -70,20 +73,26 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-sed -i "s|DATA_DIR \"/preview.ui\"|\"\/usr\/share\/apps\/kcm-gtk-module\/preview.ui\"|"g gtk3proxies/preview3.c
-sed -i "s|DATA_DIR \"/preview.ui\"|\"\/usr\/share\/apps\/kcm-gtk-module\/preview.ui\"|"g gtkproxies/preview.c
+# Patch some errors in cmake files to fix gtk_preview and gtk3_preview
+patch -p1 < $CWD/gtkproxies.diff
+patch -p1 < $CWD/gtk3proxies.diff
mkdir -p build
cd build
- cmake -DCMAKE_INSTALL_PREFIX=/usr -DLIB_SUFFIX=$LIBDIRSUFFIX ..
- make VERBOSE=1
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
make install DESTDIR=$PKG
cd ..
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
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a ChangeLog COPYING README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild