pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

mtm: properly use LDFLAGS



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By:	wiz
Date:		Wed Jul 3 06:35:27 2024 +0200
Changeset:	dd3cf4fe9511c764fd861542b618a48dfec0484c

Modified Files:
	mtm/Makefile
	mtm/distinfo
Added Files:
	mtm/patches/patch-Makefile

Log Message:
mtm: properly use LDFLAGS

Note why NetBSD curses is not enough.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=dd3cf4fe9511c764fd861542b618a48dfec0484c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 mtm/Makefile               |  7 +++----
 mtm/distinfo               |  1 +
 mtm/patches/patch-Makefile | 15 +++++++++++++++
 3 files changed, 19 insertions(+), 4 deletions(-)

diffs:
diff --git a/mtm/Makefile b/mtm/Makefile
index c3b21db7de..461aed3647 100644
--- a/mtm/Makefile
+++ b/mtm/Makefile
@@ -12,14 +12,13 @@ LICENSE=	gnu-gpl-v3
 
 INSTALLATION_DIRS=	bin man/man1
 
-LIB=		${PREFIX}/lib
-
-# upstream makefile doesn't use LDFLAGS
-CFLAGS+=	-R${LIB} -L${LIB}
+LDFLAGS+=	${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.ncurses}/lib
+LDFLAGS+=	-L${BUILDLINK_PREFIX.ncurses}/lib
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/mtm ${DESTDIR}/${PREFIX}/bin && \
 	${INSTALL_MAN} ${WRKSRC}/mtm.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
 
+# needs ncurses: wgetscrreg
 .include "../../devel/ncurses/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/mtm/distinfo b/mtm/distinfo
index 790d1b3247..30b4db1d18 100644
--- a/mtm/distinfo
+++ b/mtm/distinfo
@@ -3,4 +3,5 @@ $NetBSD$
 BLAKE2s (mtm-1.2.1.tar.gz) = 916de695bc4f3a810e1492b01f09ff5ed7e8c7746c6e18cc3beb255afad53c6d
 SHA512 (mtm-1.2.1.tar.gz) = 74e5230c6ea65c87d580516b7b62edeb4f273c1a36662bac84af41ca47e4ce252e393132dfe8c700441d6b74c19d6d560fbc503815c12f9d1cbdda2e19a9a9e2
 Size (mtm-1.2.1.tar.gz) = 383409 bytes
+SHA1 (patch-Makefile) = 90bd29f585dcc29c78adef0966bbfc8436a5f6a5
 SHA1 (patch-config.def.h) = 5a07f016163fd8e674eb4602cb51af6e1a068548
diff --git a/mtm/patches/patch-Makefile b/mtm/patches/patch-Makefile
new file mode 100644
index 0000000000..2363fe4055
--- /dev/null
+++ b/mtm/patches/patch-Makefile
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Use LDFLAGS.
+
+--- Makefile.orig	2024-07-03 04:33:05.333529850 +0000
++++ Makefile
+@@ -11,7 +11,7 @@ LIBS      ?= -l$(CURSESLIB) -lutil
+ all: mtm
+ 
+ mtm: vtparser.c mtm.c pair.c config.h
+-	$(CC) $(CFLAGS) $(FEATURES) -o $@ $(HEADERS) vtparser.c mtm.c pair.c $(LIBPATH) $(LIBS)
++	$(CC) $(LDFLAGS) $(CFLAGS) $(FEATURES) -o $@ $(HEADERS) vtparser.c mtm.c pair.c $(LIBPATH) $(LIBS)
+ 	strip mtm
+ 
+ config.h: config.def.h


Home | Main Index | Thread Index | Old Index