x11-misc/dmenu: Fix patch, rework src_compile().
authorJeroen Roovers <jer@gentoo.org>
Sat, 28 Apr 2018 12:14:04 +0000 (14:14 +0200)
committerJeroen Roovers <jer@gentoo.org>
Sat, 28 Apr 2018 12:14:36 +0000 (14:14 +0200)
Package-Manager: Portage-2.3.31, Repoman-2.3.9

x11-misc/dmenu/dmenu-9999.ebuild
x11-misc/dmenu/files/dmenu-9999-gentoo.patch

index e55ea229223138c9c5b196995112ba7622cda3b7..5cb15906696b0c568e6cd1a74af6c2ab34bfda8b 100644 (file)
@@ -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() {
index faeed310c8861ce0e7feb2ac3f3949715361f46a..75a1f89415ece1d568c9b459ced53c3eace7e0ac 100644 (file)
@@ -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