desktop/dmenu: Updated for version 4.0

This commit is contained in:
Phillip Warner 2010-05-13 00:22:34 +02:00 committed by David Somero
parent ba206eee39
commit 2cc3ee9cd4
3 changed files with 44 additions and 9 deletions

View File

@ -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

View File

@ -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}

View File

@ -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"