void-packages/srcpkgs/dmenu/template
Enno Boland 84e02ce89a Merge pull request #7633 from m-cz/dmenu
dmenu: remove old patch
2017-09-14 08:15:13 +02:00

40 lines
1.1 KiB
Bash

# Template file for 'dmenu'
pkgname=dmenu
version=4.7
revision=2
makedepends="libXinerama-devel libXft-devel freetype-devel"
short_desc="A generic menu for X"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="MIT"
homepage="https://tools.suckless.org/dmenu/"
distfiles="https://dl.suckless.org/tools/${pkgname}-${version}.tar.gz"
checksum=a75635f8dc2cbc280deecb906ad9b7594c5c31620e4a01ba30dc83984881f7b9
build_options="fuzzymatch"
desc_option_fuzzymatch="Enable Fuzzymatch support"
post_extract() {
if [ "$build_option_fuzzymatch" ]; then
msg_normal "Applying fuzzymatch patches"
patch -p1 < "${FILESDIR}/fuzzymatch.patch"
fi
sed -i -e '/CFLAGS/{s/-Os//;s/=/+=/}' \
-e '/LDFLAGS/{s/-s//;s/=/+=/}' config.mk
}
do_build() {
cp ${FILESDIR}/config.h config.h
sed -i -e "s|^FREETYPEINC|#FREETYPEINC|g" \
-e "s|^X11INC|#X11INC|g" \
-e "s|^X11LIB|#X11LIB|g" config.mk
x11inc=$XBPS_CROSS_BASE/usr/include/X11
x11lib=$XBPS_CROSS_BASE/usr/lib
freetypeinc=$XBPS_CROSS_BASE/usr/include/freetype2
make CC="$CC" ${makejobs} X11INC=$x11inc X11LIB=$x11lib FREETYPEINC=$freetypeinc
}
do_install() {
make PREFIX=/usr DESTDIR=${DESTDIR} install
vlicense LICENSE
}