summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2018-04-28 14:14:04 +0200
committerJeroen Roovers <jer@gentoo.org>2018-04-28 14:14:36 +0200
commit4012abe8b06da80e146bacd1ccbfec0af1a255cb (patch)
treecca43b501799235f27599be0a063e39b570749ef /x11-misc/dmenu
parentAdd ~arm keyword (bug #646506) (diff)
downloadgentoo-4012abe8b06da80e146bacd1ccbfec0af1a255cb.tar.gz
gentoo-4012abe8b06da80e146bacd1ccbfec0af1a255cb.tar.bz2
gentoo-4012abe8b06da80e146bacd1ccbfec0af1a255cb.zip
x11-misc/dmenu: Fix patch, rework src_compile().
Package-Manager: Portage-2.3.31, Repoman-2.3.9
Diffstat (limited to 'x11-misc/dmenu')
-rw-r--r--x11-misc/dmenu/dmenu-9999.ebuild21
-rw-r--r--x11-misc/dmenu/files/dmenu-9999-gentoo.patch38
2 files changed, 18 insertions, 41 deletions
diff --git a/x11-misc/dmenu/dmenu-9999.ebuild b/x11-misc/dmenu/dmenu-9999.ebuild
index e55ea2292231..5cb15906696b 100644
--- a/x11-misc/dmenu/dmenu-9999.ebuild
+++ b/x11-misc/dmenu/dmenu-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -42,16 +42,15 @@ src_prepare() {
src_compile() {
emake CC=$(tc-getCC) \
- "FREETYPEINC=$( $(tc-getPKG_CONFIG) --cflags x11 fontconfig xft 2>/dev/null )" \
- "FREETYPELIBS=$( $(tc-getPKG_CONFIG) --libs x11 fontconfig xft 2>/dev/null )" \
- "XINERAMAFLAGS=$(
- usex xinerama "-DXINERAMA $(
- $(tc-getPKG_CONFIG) --cflags xinerama 2>/dev/null
- )" ''
- )" \
- "XINERAMALIBS=$(
- usex xinerama "$( $(tc-getPKG_CONFIG) --libs xinerama 2>/dev/null)" ''
- )"
+ INCS=" \
+ $(usex xinerama "-DXINERAMA" '') \
+ $(
+ $(tc-getPKG_CONFIG) --cflags fontconfig freetype2 x11 xft $(usex xinerama xinerama '')
+ )" \
+ LIBS=" \
+ $(
+ $(tc-getPKG_CONFIG) --libs fontconfig x11 xft $(usex xinerama xinerama '')
+ )"
}
src_install() {
diff --git a/x11-misc/dmenu/files/dmenu-9999-gentoo.patch b/x11-misc/dmenu/files/dmenu-9999-gentoo.patch
index faeed310c886..75a1f89415ec 100644
--- a/x11-misc/dmenu/files/dmenu-9999-gentoo.patch
+++ b/x11-misc/dmenu/files/dmenu-9999-gentoo.patch
@@ -1,37 +1,15 @@
--- a/config.mk
+++ b/config.mk
-@@ -5,8 +5,8 @@
- PREFIX = /usr/local
- MANPREFIX = ${PREFIX}/share/man
-
--X11INC = /usr/X11R6/include
--X11LIB = /usr/X11R6/lib
-+X11INC = -I/usr/X11R6/include
-+X11LIB = -L/usr/X11R6/lib
-
- # Xinerama, comment if you don't want it
- XINERAMALIBS = -lXinerama
-@@ -14,18 +14,18 @@
-
- # freetype
- FREETYPELIBS = -lfontconfig -lXft
--FREETYPEINC = /usr/include/freetype2
-+FREETYPEINC = -I/usr/include/freetype2
- # OpenBSD (uncomment)
- #FREETYPEINC = ${X11INC}/freetype2
-
- # includes and libs
--INCS = -I${X11INC} -I${FREETYPEINC}
--LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS}
-+INCS = ${X11INC} ${FREETYPEINC}
-+LIBS = ${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS}
+@@ -23,9 +23,9 @@
+ LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS)
# flags
- CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
--CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
--LDFLAGS = -s ${LIBS}
-+CFLAGS = -std=c99 -pedantic -Wall ${INCS} ${CPPFLAGS}
-+LDFLAGS = ${LIBS}
+-CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS)
+-CFLAGS = -std=c99 -pedantic -Wall -Os $(INCS) $(CPPFLAGS)
+-LDFLAGS = -s $(LIBS)
++CPPFLAGS += -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\"
++CFLAGS += -std=c99 -pedantic -Wall $(INCS) $(CPPFLAGS)
++LDFLAGS += $(LIBS)
# compiler and linker
CC = cc