ports/x11/dmenu2/files/patch-Makefile
Alexey Dokuchaev e122a29f2c Add `x11/dmenu2', a fork of classic dmenu with many enhancements and
additional options.

While original upstream is https://bitbucket.org/melek/dmenu2, prefer
more up-to-date GitHub repo which was forked from it (and because of
our nice USE_GITHUB support for fetching the distfiles).

PR:		209391
Submitted by:	Timothy Beyer
2017-03-18 15:42:22 +00:00

48 lines
1.6 KiB
Text

--- Makefile.orig 2015-02-10 20:52:44 UTC
+++ Makefile
@@ -1,14 +1,14 @@
-VERSION = 0.1
+VERSION = 0.2
CC ?= gcc
-LIBS = -lX11 -lXinerama -lXft -lXrender -lfreetype -lz -lfontconfig
-CFLAGS += -std=c99 -pedantic -Wall -Wextra -I/usr/include/freetype2
-CFLAGS += -DXINERAMA -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\"
-LDFLAGS +=
+LIBS += -lX11 -lXft -lXrender -lfreetype -lz -lfontconfig
+CFLAGS += -std=c99 -pedantic -Wall -Wextra -I$(LOCALBASE)/include -I$(LOCALBASE)/include/freetype2
+CFLAGS += -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\"
+LDFLAGS += -L$(LOCALBASE)/lib
PREFIX ?= /usr/local
BINPREFIX = $(PREFIX)/bin
-MANPREFIX = $(PREFIX)/share/man
+MANPREFIX = $(PREFIX)/man
DM_SRC = dmenu.c draw.c
DM_OBJ = $(DM_SRC:.c=.o)
@@ -16,8 +16,6 @@ DM_OBJ = $(DM_SRC:.c=.o)
ST_SRC = stest.c
ST_OBJ = $(ST_SRC:.c=.o)
-all: CFLAGS += -Os
-all: LDFLAGS += -s
all: dmenu stest
debug: CFLAGS += -g -O0 -DDEBUG
@@ -34,9 +32,13 @@ stest: $(ST_OBJ)
install:
mkdir -p "$(DESTDIR)$(BINPREFIX)"
- cp -p dmenu dmenu_run stest "$(DESTDIR)$(BINPREFIX)"
+ $(BSD_INSTALL_PROGRAM) dmenu "$(DESTDIR)$(BINPREFIX)/dmenu2"
+ $(BSD_INSTALL_PROGRAM) stest "$(DESTDIR)$(BINPREFIX)/stest2"
+ $(BSD_INSTALL_SCRIPT) dmenu_run "$(DESTDIR)$(BINPREFIX)/dmenu2_run"
+ $(BSD_INSTALL_SCRIPT) dmenu2_path "$(DESTDIR)$(BINPREFIX)"
mkdir -p "$(DESTDIR)$(MANPREFIX)"/man1
- cp -p dmenu.1 stest.1 "$(DESTDIR)$(MANPREFIX)"/man1
+ $(BSD_INSTALL_MAN) dmenu.1 "$(DESTDIR)$(MANPREFIX)/man1/dmenu2.1"
+ $(BSD_INSTALL_MAN) stest.1 "$(DESTDIR)$(MANPREFIX)/man1/stest2.1"
uninstall:
rm -f "$(DESTDIR)$(BINPREFIX)"/dmenu