Rework multitail to be futur friendly regarding ncurses

Drop useless post-patch which are not doing anything anymore
Patch the Makefile to link to ncursesw if this is the implementation we do use
or in the futur link to ncurses (and panel) when only this version will be left
in base
This commit is contained in:
Baptiste Daroussin 2019-12-27 16:07:55 +00:00
parent df16ebc6cb
commit ced94c6976
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=521006
2 changed files with 26 additions and 5 deletions

View file

@ -18,14 +18,10 @@ USES= alias gmake ncurses tar:tgz
PLIST_FILES= bin/multitail etc/multitail.conf.sample \
man/man1/multitail.1.gz
PORTDOCS= readme.txt license.txt
MAKE_ARGS= NCURSES_IMPL="${NCURSES_IMPL}"
OPTIONS_DEFINE= DOCS
post-patch:
@${REINPLACE_CMD} -e 's,$$(DESTDIR)/etc/multitail.conf,${PREFIX}/etc/multitail.conf,' \
-e 's/CC=gcc/CC?=gcc/' \
${WRKSRC}/mt.c ${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/multitail ${STAGEDIR}${PREFIX}/bin/
${INSTALL_MAN} ${WRKSRC}/multitail.1 ${STAGEDIR}${MANPREFIX}/man/man1

View file

@ -0,0 +1,25 @@
--- Makefile.orig 2019-11-07 12:56:23 UTC
+++ Makefile
@@ -19,18 +19,12 @@ CPPFLAGS+=-D$(PLATFORM) -DVERSION=\"$(VERSION)\" $(DEB
# build dependency files while compile (*.d)
CPPFLAGS+= -MMD -MP
-
-ifeq ($(PLATFORM),Darwin)
- LDFLAGS+=-lpanel $(NCURSES_LIB) -lutil -lm
+ifeq ($(NCURSES_IMPL),ncursesw)
+LDFLAGS+=-lpanelw -lncursesw -lutil -lm
else
-ifeq ($(UTF8_SUPPORT),yes)
- LDFLAGS+=-lpanelw -lncursesw -lutil -lm
- CPPFLAGS+=-DUTF8_SUPPORT
-else
- LDFLAGS+=-lpanel -lncurses -lutil -lm
+LDFLAGS+=-lpanel -lncurses -lutil -lm
endif
-endif
-
+CPPFLAGS+=-DUTF8_SUPPORT
OBJS:=utils.o mt.o error.o my_pty.o term.o scrollback.o help.o mem.o cv.o selbox.o stripstring.o color.o misc.o ui.o exec.o diff.o config.o cmdline.o globals.o history.o clipboard.o
DEPENDS:= $(OBJS:%.o=%.d)