Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jan 2024 10:55:14 GMT
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: b0da15216ec6 - main - editors/heme: convert MAKE_ARGS to patch file (for manpages)
Message-ID:  <202401221055.40MAtEKU044706@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b0da15216ec6de453d01652e62328a0ce3be536d

commit b0da15216ec6de453d01652e62328a0ce3be536d
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2024-01-22 10:54:24 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2024-01-22 10:54:24 +0000

    editors/heme: convert MAKE_ARGS to patch file (for manpages)
    
    Now that default manpage installation prefix had been changed,
    patching the Makefile statically would be more readable than
    combination of MAKE_ARGS + REINPLACE_CMD.  While here, do not
    unconditionally try to strip the binary (respect WITH_DEBUG).
---
 editors/heme/Makefile             |  5 +----
 editors/heme/files/patch-Makefile | 26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/editors/heme/Makefile b/editors/heme/Makefile
index 276583e9c520..ecc844487ec3 100644
--- a/editors/heme/Makefile
+++ b/editors/heme/Makefile
@@ -11,11 +11,8 @@ LICENSE=	GPLv2
 
 USES=		ncurses
 ALL_TARGET=	${PORTNAME}
-MAKE_ARGS=	CFLAGS="${CFLAGS} -Wall -DHAVE_MMAP" \
-		LDFLAGS="${LDFLAGS} -lncurses" \
-		INSTALL_PREFIX="${STAGEDIR}${PREFIX}"
 
-PLIST_FILES=	bin/${PORTNAME} man/man1/${PORTNAME}.1.gz
+PLIST_FILES=	bin/${PORTNAME} share/man/man1/${PORTNAME}.1.gz
 PORTDOCS=	README
 
 OPTIONS_DEFINE=	DOCS
diff --git a/editors/heme/files/patch-Makefile b/editors/heme/files/patch-Makefile
new file mode 100644
index 000000000000..249ac3d9461c
--- /dev/null
+++ b/editors/heme/files/patch-Makefile
@@ -0,0 +1,26 @@
+--- Makefile.orig	2006-11-22 22:24:17 UTC
++++ Makefile
+@@ -1,18 +1,18 @@
+ INSTALL_PREFIX = /usr/local
+-CFLAGS = -Wall -DHAVE_MMAP	# remove -DHAVE_MMAP if you don't have mmap
+-LDFLAGS = -lcurses
++CFLAGS += -Wall -DHAVE_MMAP
++LDFLAGS += -lcurses
+ OBJECTS = heme.o xmalloc.o error.o pconfig.o pgetopt.o
+ TARGET = heme
+ 
+ $(TARGET): $(OBJECTS)
+-	$(CC) $(OBJECTS) -o $(TARGET) $(LDFLAGS) 
++	$(CC) $(CFLAGS) $(OBJECTS) -o $(TARGET) $(LDFLAGS)
+ 
+ .c.o:
+ 	$(CC) $(CFLAGS) -c $< -o $@
+ 
+ install: $(TARGET)
+-	install -s -m 0755 $(TARGET) $(INSTALL_PREFIX)/bin
+-	install -m 0644 heme.1 $(INSTALL_PREFIX)/man/man1
++	$(BSD_INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(PREFIX)/bin
++	$(BSD_INSTALL_DATA) heme.1 $(DESTDIR)$(PREFIX)/share/man/man1
+ 
+ uninstall:
+ 	rm -f $(INSTALL_PREFIX)/bin/$(TARGET)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401221055.40MAtEKU044706>