aboutsummaryrefslogtreecommitdiff
path: root/desktop/dmenu
diff options
context:
space:
mode:
authorPhillip Warner <pc_warner@yahoo.com>2010-05-13 00:22:34 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-13 00:22:34 +0200
commit2cc3ee9cd42c3038302ea26e12b958ea6891b60e (patch)
treedb538905bfe4df97502d6a0f73f6ce58f5ace6cf /desktop/dmenu
parentba206eee3917eca24c0e5d3c76b0216ba9e972ae (diff)
desktop/dmenu: Updated for version 4.0
Diffstat (limited to 'desktop/dmenu')
-rw-r--r--desktop/dmenu/dmenu-4.0-libdir_cflags_fixups.diff26
-rw-r--r--desktop/dmenu/dmenu.SlackBuild25
-rw-r--r--desktop/dmenu/dmenu.info2
3 files changed, 44 insertions, 9 deletions
diff --git a/desktop/dmenu/dmenu-4.0-libdir_cflags_fixups.diff b/desktop/dmenu/dmenu-4.0-libdir_cflags_fixups.diff
new file mode 100644
index 0000000000000..b8e009ff3c552
--- /dev/null
+++ b/desktop/dmenu/dmenu-4.0-libdir_cflags_fixups.diff
@@ -0,0 +1,26 @@
+diff -Nur dmenu-4.0.orig/config.mk dmenu-4.0/config.mk
+--- dmenu-4.0.orig/config.mk 2009-04-18 06:50:04.000000000 -0500
++++ dmenu-4.0/config.mk 2009-08-03 00:32:57.258455322 -0500
+@@ -6,6 +6,7 @@
+ # paths
+ PREFIX = /usr/local
+ MANPREFIX = ${PREFIX}/share/man
++LIBDIR = /usr/local/lib
+
+ X11INC = /usr/X11R6/include
+ X11LIB = /usr/X11R6/lib
+@@ -16,11 +17,12 @@
+
+ # includes and libs
+ INCS = -I. -I/usr/include -I${X11INC}
+-LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS}
++LIBS = -L${LIBDIR} -lc -L${X11LIB} -lX11 ${XINERAMALIBS}
+
+ # flags
++OPTS ?= -Os
+ CPPFLAGS = -D_BSD_SOURCE -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
+-CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
++CFLAGS = -std=c99 -pedantic -Wall ${OPTS} ${INCS} ${CPPFLAGS}
+ LDFLAGS = -s ${LIBS}
+
+ # Solaris
diff --git a/desktop/dmenu/dmenu.SlackBuild b/desktop/dmenu/dmenu.SlackBuild
index 28b1706887c7b..f7c99ae826e93 100644
--- a/desktop/dmenu/dmenu.SlackBuild
+++ b/desktop/dmenu/dmenu.SlackBuild
@@ -36,10 +36,13 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
set -e
@@ -48,7 +51,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
@@ -57,14 +60,18 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Fix the prefix, mandir and CFLAGS
-sed -i \
- -e 's/^PREFIX = \/usr\/local/PREFIX = \/usr/' \
- -e 's/^MANPREFIX = ${PREFIX}\/share\/man/MANPREFIX = ${PREFIX}\/man/' \
- -e 's/^CFLAGS = -std=c99 -pedantic -Wall -Os/CFLAGS += -std=c99 -pedantic -Wall/' \
- config.mk
+# Fixup the CFLAGS and LIBDIR settings to prevent multilib conflicts
+patch -p1 < $CWD/dmenu-4.0-libdir_cflags_fixups.diff
+
+make install \
+ OPTS="$SLKCFLAGS" \
+ PREFIX=/usr \
+ LIBDIR=/usr/lib${LIBDIRSUFFIX} \
+ MANPREFIX=/usr/man \
+ X11INC=/usr/include \
+ X11LIB=/usr/lib${LIBDIRSUFFIX}/X11 \
+ DESTDIR=$PKG
-CFLAGS=${SLKCFLAGS} make install DESTDIR=$PKG
( find $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
xargs strip --strip-unneeded 2> /dev/null || true
@@ -85,4 +92,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/desktop/dmenu/dmenu.info b/desktop/dmenu/dmenu.info
index 2cc0719432e72..0b66643f0b87b 100644
--- a/desktop/dmenu/dmenu.info
+++ b/desktop/dmenu/dmenu.info
@@ -3,6 +3,8 @@ VERSION="4.0"
HOMEPAGE="http://www.suckless.org/programs/dmenu.html"
DOWNLOAD="http://code.suckless.org/dl/tools/dmenu-4.0.tar.gz"
MD5SUM="66e761a653930cc8a21614ba9fedf903"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
MAINTAINER="Phillip Warner"
EMAIL="pc_warner@yahoo.com"
APPROVED="dsomero"