diff --git a/sysutils/mtm/Makefile b/sysutils/mtm/Makefile index fda3b05475f7..c52f0bfe51f7 100644 --- a/sysutils/mtm/Makefile +++ b/sysutils/mtm/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= mtm -DISTVERSION= g20180507 +DISTVERSION= 1.0.1 CATEGORIES= sysutils MAINTAINER= 0mp@FreeBSD.org @@ -10,21 +10,25 @@ COMMENT= Terminal multiplexer focued on simplicity, compatibility and stability LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/README.rst -USES= ncurses - +# NB: ncurses 6.1 is required. +USES= localbase:ldflags ncurses:port USE_CSTD= gnu99 USE_GITHUB= yes GH_ACCOUNT= deadpixi -GH_TAGNAME= b861104 PLIST_FILES= bin/mtm \ man/man1/mtm.1.gz -MAKE_ARGS+= LIBS='-lutil -lncursesw' +CFLAGS+= -I${NCURSESINC} +LDFLAGS+= -L${NCURSESLIB} PORTDATA= mtm.ti -post-install: +do-install: + @${MKDIR} ${STAGEDIR}${MAN1PREFIX}/man/man1 + ${INSTALL_MAN} ${WRKSRC}/mtm.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/mtm.1 + @${MKDIR} ${STAGEDIR}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/mtm ${STAGEDIR}${PREFIX}/bin/mtm @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/mtm.ti ${STAGEDIR}${DATADIR}/mtm.ti diff --git a/sysutils/mtm/distinfo b/sysutils/mtm/distinfo index d11532a11d93..5131bb1cc5b8 100644 --- a/sysutils/mtm/distinfo +++ b/sysutils/mtm/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1526029385 -SHA256 (deadpixi-mtm-g20180507-b861104_GH0.tar.gz) = f6685a9d309760f044c8de041d848fa97aafbc43e28127da63ef9fcd31fc9bd5 -SIZE (deadpixi-mtm-g20180507-b861104_GH0.tar.gz) = 281687 +TIMESTAMP = 1565084499 +SHA256 (deadpixi-mtm-1.0.1_GH0.tar.gz) = cb1758d810860d25c7dc6d6d5440ad79055a22935f521be7d7d9fae40124add8 +SIZE (deadpixi-mtm-1.0.1_GH0.tar.gz) = 284660 diff --git a/sysutils/mtm/files/patch-Makefile b/sysutils/mtm/files/patch-Makefile index 9256f5e0895d..4fb045188037 100644 --- a/sysutils/mtm/files/patch-Makefile +++ b/sysutils/mtm/files/patch-Makefile @@ -1,13 +1,27 @@ ---- Makefile.orig 2018-05-07 14:54:13 UTC +--- Makefile.orig 2019-08-06 13:35:52 UTC +++ Makefile -@@ -16,8 +16,8 @@ config.h: config.def.h +@@ -1,17 +1,20 @@ + CC ?= gcc + CFLAGS ?= -std=c99 -Wall -Wextra -pedantic -Os ++CPPFLAGS ?= ++LDFLAGS ?= + FEATURES ?= -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED +-HEADERS ?= +-LIBPATH ?= + DESTDIR ?= /usr/local + MANDIR ?= $(DESTDIR)/man/man1 + CURSESLIB ?= ncursesw +-LIBS ?= -l$(CURSESLIB) -lutil ++LIBRARIES ?= -l$(CURSESLIB) -lutil + ++CPPFLAGS += $(FEATURES) ++LDFLAGS += $(LIBRARIES) ++ + all: mtm + + mtm: vtparser.c mtm.c config.h +- $(CC) $(CFLAGS) $(FEATURES) -o $@ $(HEADERS) vtparser.c mtm.c $(LIBPATH) $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ vtparser.c mtm.c + + config.h: config.def.h cp -i config.def.h config.h - - install: mtm -- cp mtm $(DESTDIR)/bin -- cp mtm.1 $(DESTDIR)/share/man/man1 -+ ${BSD_INSTALL_PROGRAM} mtm $(DESTDIR)$(PREFIX)/bin -+ ${BSD_INSTALL_MAN} mtm.1 $(DESTDIR)$(PREFIX)/man/man1 - - install-terminfo: mtm.ti - tic -s -x mtm.ti diff --git a/sysutils/mtm/files/patch-config.def.h b/sysutils/mtm/files/patch-config.def.h deleted file mode 100644 index 08d476f569d8..000000000000 --- a/sysutils/mtm/files/patch-config.def.h +++ /dev/null @@ -1,20 +0,0 @@ ---- config.def.h.orig 2018-05-07 14:54:13 UTC -+++ config.def.h -@@ -38,7 +38,7 @@ - - /* The path for the wide-character curses library. */ - #ifndef NCURSESW_INCLUDE_H -- #if defined(__APPLE__) || (defined(BSD) && !defined(__linux__)) -+ #if defined(__APPLE__) || (defined(BSD) && !defined(__linux__)) || defined(__FreeBSD__) - #define NCURSESW_INCLUDE_H - #else - #define NCURSESW_INCLUDE_H -@@ -50,6 +50,8 @@ - #ifndef FORKPTY_INCLUDE_H - #if defined(__APPLE__) || (defined(BSD) && !defined(__linux__)) - #define FORKPTY_INCLUDE_H -+ #elif defined(__FreeBSD__) -+ #define FORKPTY_INCLUDE_H - #else - #define FORKPTY_INCLUDE_H - #endif