From d56569ff5759ea674905a34878ac40396bde1da6 Mon Sep 17 00:00:00 2001 From: Trevor Johnson Date: Fri, 2 Apr 2004 12:25:24 +0000 Subject: Make examples (mostly) optional, requested by obrien. --- devel/gettext/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'devel/gettext/Makefile') diff --git a/devel/gettext/Makefile b/devel/gettext/Makefile index 20716bf9e10e..068612dd8e3c 100644 --- a/devel/gettext/Makefile +++ b/devel/gettext/Makefile @@ -31,6 +31,8 @@ CONFIGURE_ARGS= --with-libexpat-prefix=${LOCALBASE}/lib \ --mandir=${PREFIX}/man INSTALLS_SHLIB= yes +OPTIONS= EXAMPLES "install example files" off +PLIST= ${WRKDIR}/plist PLIST_SUB= LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} \ VERSION=${PORTVERSION} @@ -68,10 +70,27 @@ post-build: @sleep 5 .endif +pre-install: + @${RM} -f ${PLIST} +.if defined (WITH_EXAMPLES) + cd ${WRKSRC}/gettext-tools && \ + ${FIND} -s examples -type f | ${GREP} -vw examples/po | \ + ${GREP} -v ChangeLog | ${GREP} -v examples/Makefile | \ + ${GREP} -v examples/installpaths.in | \ + ${SED} 's:^:share/doc/gettext/:' > ${PLIST} && \ + ${FIND} -d examples -type d | ${GREP} -v examples/po | \ + ${SED} -e 's:^:@dirrm share/doc/gettext/:' \ + >> ${PLIST} +.endif + @${CAT} ${.CURDIR}/pkg-plist >> ${PLIST} + post-install: .for f in po-compat.el po-mode.el ${INSTALL_DATA} ${WRKSRC}/gettext-tools/misc/${f} ${PREFIX}/share/emacs/site-lisp .endfor ${MKDIR} ${X11BASE}/share/locale +.if defined (WITH_EXAMPLES) + cd ${WRKSRC}/gettext-tools/examples && make install +.endif .include -- cgit v1.2.3