8df6682efe
Changelog: * file.c: improve the "No changes need to be saved" check * fileio.c, funmap.c, echo.c: handle strdup failure * re_search.c: fix regex-replace infinite loop issues * word.c: rework grabword() a bit; plug a memory leak * interpreter.c: fix two memory leaks * dired.c: improve externs for KEYMAPE() * mg.1: fix typo https://cvsweb.openbsd.org/src/usr.bin/mg/ PR: 295474 MFH: 2026Q2 Approved by: osa, vvd (Mentors, implicit)
47 lines
982 B
Makefile
47 lines
982 B
Makefile
PORTNAME= mg
|
|
DISTVERSION= 20260519
|
|
PORTEPOCH= 1
|
|
CATEGORIES= editors
|
|
MASTER_SITES= https://hydrus.org.uk/downloads/
|
|
|
|
MAINTAINER= cdr.nil@gmail.com
|
|
COMMENT= Small, fast Emacs-like editor
|
|
WWW= https://man.openbsd.org/mg
|
|
|
|
LICENSE= PD
|
|
|
|
FLAVORS= dynamic static
|
|
FLAVOR?= ${FLAVORS:[1]}
|
|
static_PKGNAMESUFFIX= -static
|
|
|
|
USES= ncurses uidfix
|
|
|
|
.if ${FLAVOR} == static
|
|
COMMENT+= (rescue(8) version)
|
|
MAKE_ARGS+= NO_SHARED=yes
|
|
PLIST_FILES= /rescue/mg
|
|
.else
|
|
PLIST_FILES= bin/mg \
|
|
share/man/man1/mg.1.gz
|
|
PORTDOCS= README tutorial
|
|
OPTIONS_DEFINE= DOCS
|
|
.endif
|
|
|
|
MAKE_ARGS+= BINDIR=${PREFIX}/bin \
|
|
DISTVERSION=${DISTVERSION} \
|
|
MANDIR=${PREFIX}/share/man/man \
|
|
NCURSESINC=${NCURSESINC} \
|
|
NCURSESLIB=${NCURSESLIB}
|
|
|
|
.if ${FLAVOR} == static
|
|
do-install:
|
|
@${MKDIR} ${STAGEDIR}/rescue
|
|
${INSTALL_PROGRAM} ${WRKSRC}/mg ${STAGEDIR}/rescue
|
|
.else
|
|
post-install-DOCS-on:
|
|
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
|
|
.endif
|
|
|
|
.include <bsd.port.mk>
|