summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Piotrowski <0mp@FreeBSD.org>2019-08-06 14:59:47 +0000
committerMateusz Piotrowski <0mp@FreeBSD.org>2019-08-06 14:59:47 +0000
commit83c42f3e262967a21e38c95d943f212745ee212d (patch)
tree9d70c806b22d75873a71dfe2f619a218cd79fbf6
parentUpdate to 2.4.48. (diff)
sysutils/mtm: Update to 1.0.1
Reported by: Repology
-rw-r--r--sysutils/mtm/Makefile16
-rw-r--r--sysutils/mtm/distinfo6
-rw-r--r--sysutils/mtm/files/patch-Makefile34
-rw-r--r--sysutils/mtm/files/patch-config.def.h20
4 files changed, 37 insertions, 39 deletions
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
- cp -i config.def.h config.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
- 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
+ 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
- install-terminfo: mtm.ti
- tic -s -x mtm.ti
+ config.h: config.def.h
+ cp -i config.def.h config.h
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 <curses.h>
- #else
- #define NCURSESW_INCLUDE_H <ncursesw/curses.h>
-@@ -50,6 +50,8 @@
- #ifndef FORKPTY_INCLUDE_H
- #if defined(__APPLE__) || (defined(BSD) && !defined(__linux__))
- #define FORKPTY_INCLUDE_H <util.h>
-+ #elif defined(__FreeBSD__)
-+ #define FORKPTY_INCLUDE_H <libutil.h>
- #else
- #define FORKPTY_INCLUDE_H <pty.h>
- #endif