mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-30 10:38:37 +00:00
x11-wm/dwm: simplify patching
Override variables instead of trying to fix them, sometimes incorrectly. PR: 204658 Approved by: portmgr blanket
This commit is contained in:
parent
9153a28ad7
commit
ebcc3aa614
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=403180
@ -20,8 +20,11 @@ OPTIONS_DEFINE= XINERAMA DOCS
|
||||
OPTIONS_DEFAULT=XINERAMA
|
||||
|
||||
XINERAMA_USE= XORG=xinerama
|
||||
XINERAMA_MAKE_ARGS_OFF= XINERAMAFLAGS= XINERAMALIBS=
|
||||
|
||||
USE_XORG= x11 xft
|
||||
MAKE_ARGS= CC="${CC}" PREFIX="${PREFIX}" MANPREFIX="${MANPREFIX}/man" \
|
||||
X11INC="${LOCALBASE}/include" X11LIB="${LOCALBASE}/lib"
|
||||
|
||||
PLIST_FILES= bin/dwm \
|
||||
man/man1/dwm.1.gz
|
||||
@ -38,16 +41,6 @@ post-extract:
|
||||
${CP} "${DWM_CONF}" ${WRKSRC}/config.h; \
|
||||
fi
|
||||
|
||||
post-patch:
|
||||
@${GREP} -Rl '%%[[:alpha:]]\+%%' ${WRKSRC}|${XARGS} ${REINPLACE_CMD} \
|
||||
-e "s,%%PREFIX%%,${PREFIX},g" \
|
||||
-e "s,%%LOCALBASE%%,${LOCALBASE},g" \
|
||||
-e "s,%%MANPREFIX%%,${MANPREFIX},g"
|
||||
|
||||
post-patch-XINERAMA-off:
|
||||
@${REINPLACE_CMD} -e 's,$${XINERAMALIBS},,g' \
|
||||
-e 's,$${XINERAMAFLAGS},,g' ${WRKSRC}/config.mk
|
||||
|
||||
post-install:
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
|
||||
|
@ -1,24 +0,0 @@
|
||||
--- Makefile.orig 2011-03-25 12:53:10.000000000 +0100
|
||||
+++ Makefile 2011-03-25 12:53:19.000000000 +0100
|
||||
@@ -46,15 +46,15 @@
|
||||
@mkdir -p ${DESTDIR}${PREFIX}/bin
|
||||
@cp -f dwm ${DESTDIR}${PREFIX}/bin
|
||||
@chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
|
||||
- @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
|
||||
- @mkdir -p ${DESTDIR}${MANPREFIX}/man1
|
||||
- @sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
|
||||
- @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
|
||||
+ @echo installing manual page to ${DESTDIR}${MANPREFIX}/man/man1
|
||||
+ @mkdir -p ${DESTDIR}${MANPREFIX}/man/man1
|
||||
+ @sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man/man1/dwm.1
|
||||
+ @chmod 644 ${DESTDIR}${MANPREFIX}/man/man1/dwm.1
|
||||
|
||||
uninstall:
|
||||
@echo removing executable file from ${DESTDIR}${PREFIX}/bin
|
||||
@rm -f ${DESTDIR}${PREFIX}/bin/dwm
|
||||
- @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
|
||||
- @rm -f ${DESTDIR}${MANPREFIX}/man1/dwm.1
|
||||
+ @echo removing manual page from ${DESTDIR}${MANPREFIX}/man/man1
|
||||
+ @rm -f ${DESTDIR}${MANPREFIX}/man/man1/dwm.1
|
||||
|
||||
.PHONY: all options clean dist install uninstall
|
@ -1,22 +1,6 @@
|
||||
--- config.mk.orig 2015-11-08 22:39:37 UTC
|
||||
+++ config.mk
|
||||
@@ -4,11 +4,11 @@ VERSION = 6.1
|
||||
# Customize below to fit your system
|
||||
|
||||
# paths
|
||||
-PREFIX = /usr/local
|
||||
-MANPREFIX = ${PREFIX}/share/man
|
||||
+PREFIX = %%PREFIX%%
|
||||
+MANPREFIX = %%MANPREFIX%%
|
||||
|
||||
-X11INC = /usr/X11R6/include
|
||||
-X11LIB = /usr/X11R6/lib
|
||||
+X11INC = %%LOCALBASE%%/include
|
||||
+X11LIB = %%LOCALBASE%%/lib
|
||||
|
||||
# Xinerama, comment if you don't want it
|
||||
XINERAMALIBS = -lXinerama
|
||||
@@ -25,14 +25,14 @@ INCS = -I${X11INC} -I${FREETYPEINC}
|
||||
@@ -25,10 +25,10 @@ INCS = -I${X11INC} -I${FREETYPEINC}
|
||||
LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS}
|
||||
|
||||
# flags
|
||||
@ -31,8 +15,3 @@
|
||||
|
||||
# Solaris
|
||||
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
|
||||
#LDFLAGS = ${LIBS}
|
||||
|
||||
# compiler and linker
|
||||
-CC = cc
|
||||
+CC?= cc
|
||||
|
Loading…
Reference in New Issue
Block a user