aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorPawel Pekala <pawel@FreeBSD.org>2014-04-07 10:47:45 +0000
committerPawel Pekala <pawel@FreeBSD.org>2014-04-07 10:47:45 +0000
commitee25b25b11ca088a9d4833c8fa1c0b2cf4622786 (patch)
tree8f649602a8f90d397782c8c5bce8dc12caff6a83 /editors
parent28a2bc9efb8f25280a3734688da1097a06508cf5 (diff)
downloadports-ee25b25b11ca088a9d4833c8fa1c0b2cf4622786.tar.gz
ports-ee25b25b11ca088a9d4833c8fa1c0b2cf4622786.zip
- Add staging support
- Convert to USES=gmake, new options framework - Make post-patch target simplier
Notes
Notes: svn path=/head/; revision=350457
Diffstat (limited to 'editors')
-rw-r--r--editors/ne/Makefile53
1 files changed, 22 insertions, 31 deletions
diff --git a/editors/ne/Makefile b/editors/ne/Makefile
index 384872cef7f1..66a018b94b42 100644
--- a/editors/ne/Makefile
+++ b/editors/ne/Makefile
@@ -11,13 +11,10 @@ COMMENT= Nice and powerful editor
LICENSE= GPLv3
-OPTIONS_DEFINE= DOCS
-
BUILD_WRKSRC= ${WRKSRC}/src
-USES= perl5
+USES= gmake perl5
USE_PERL5= build
-USE_GMAKE= yes
MAKEFILE= makefile
ALL_TARGET= ${PORTNAME}
MAKE_ARGS= CC="${CC}" \
@@ -25,10 +22,10 @@ MAKE_ARGS= CC="${CC}" \
LDFLAGS="-lgnuregex" \
NE_GLOBAL_DIR="${DATADIR}"
-MAN1= ${PORTNAME}.1
INFO= ${PORTNAME}
PORTDOCS= *
PLIST_FILES= bin/${PORTNAME} \
+ man/man1/${PORTNAME}.1.gz \
%%DATADIR%%/default.keys %%DATADIR%%/default.menus \
%%DATADIR%%/syntax/4gl.jsf %%DATADIR%%/syntax/ada.jsf \
%%DATADIR%%/syntax/asm.jsf %%DATADIR%%/syntax/awk.jsf \
@@ -55,43 +52,37 @@ PLIST_FILES= bin/${PORTNAME} \
%%DATADIR%%/syntax/vhdl.jsf %%DATADIR%%/syntax/xml.jsf
PLIST_DIRS= %%DATADIR%%/syntax %%DATADIR%%
-NO_STAGE= yes
+OPTIONS_DEFINE= DEBUG DOCS
+
.include <bsd.port.options.mk>
-.if !defined(WITH_DEBUG)
+.if ! ${PORT_OPTIONS:MDEBUG}
CFLAGS+= -DNODEBUG
.endif
post-patch:
-.for file in actions.c
- @${REINPLACE_CMD} -e 's|tmpnam(|mkstemp(|g' ${BUILD_WRKSRC}/${file}
-.endfor
-.for file in ne.c search.c
- @${REINPLACE_CMD} -e 's|"regex\.h"|<gnu/regex.h>|g' ${BUILD_WRKSRC}/${file}
-.endfor
-.for file in makefile
+ @${REINPLACE_CMD} -e 's|tmpnam(|mkstemp(|g' ${BUILD_WRKSRC}/actions.c
+ @${REINPLACE_CMD} -e 's|"regex\.h"|<gnu/regex.h>|g' \
+ ${BUILD_WRKSRC}/ne.c \
+ ${BUILD_WRKSRC}/search.c
@${REINPLACE_CMD} -e '/[[:space:]]regex.o/d ; \
- s|regex.h||g' ${BUILD_WRKSRC}/${file}
-.endfor
+ s|regex.h||g' ${BUILD_WRKSRC}/makefile
post-build:
cd ${WRKSRC}/doc && makeinfo ${PORTNAME}.texinfo
do-install:
- ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${PORTNAME} ${PREFIX}/bin
- ${INSTALL_MAN} ${WRKSRC}/doc/${PORTNAME}.1 ${MANPREFIX}/man/man1
- ${INSTALL_DATA} ${WRKSRC}/doc/${PORTNAME}.info ${PREFIX}/${INFO_PATH}
- @${MKDIR} ${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/doc/default.* ${DATADIR}
- @(cd ${WRKSRC} && ${COPYTREE_SHARE} syntax ${DATADIR})
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/CHANGES ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/NEWS ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/doc/${PORTNAME}.pdf ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/doc/${PORTNAME}.txt ${DOCSDIR}
- @(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} html ${DOCSDIR})
-.endif
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/doc/${PORTNAME}.1 \
+ ${STAGEDIR}${MANPREFIX}/man/man1
+ ${INSTALL_DATA} ${WRKSRC}/doc/${PORTNAME}.info \
+ ${STAGEDIR}${PREFIX}/${INFO_PATH}
+ @${MKDIR} ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/default.* ${STAGEDIR}${DATADIR}
+ (cd ${WRKSRC} && ${COPYTREE_SHARE} syntax ${STAGEDIR}${DATADIR})
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ (cd ${WRKSRC} && ${INSTALL_DATA} CHANGES NEWS README \
+ doc/${PORTNAME}.pdf doc/${PORTNAME}.txt ${STAGEDIR}${DOCSDIR})
+ (cd ${WRKSRC}/doc && ${COPYTREE_SHARE} html ${STAGEDIR}${DOCSDIR})
.include <bsd.port.mk>