Index: head/mail/crm114/Makefile =================================================================== --- head/mail/crm114/Makefile (revision 319664) +++ head/mail/crm114/Makefile (revision 319665) @@ -1,116 +1,115 @@ # Created by: Meno Abels # $FreeBSD$ PORTNAME= crm114 PORTVERSION= 20100106 PORTREVISION= 1 # WARNING change versionname in CRM114RELEASENAME too. # portlint didn't like this variable at this place. # So I have to put it down in this file. CATEGORIES= mail MASTER_SITES= http://crm114.sourceforge.net/tarballs/ # Oliver Eikemeier recommended the following construction # to avoid the reduncany of the CRM114RELEASENAME and .src and # .css extention. DISTNAME= ${PORTNAME}-${PORTVERSION}-${CRM114RELEASENAME}.src MAINTAINER= chalpin@cs.wisc.edu COMMENT= A Markov based SpamFilter LIB_DEPENDS= tre.5:${PORTSDIR}/textproc/libtre CRM114RELEASENAME=BlameMichelson USES= gettext iconv MAKE_ARGS= CC="${CC}" prefix="${PREFIX}" \ LIBS="${LIBS}" \ INSTALL_PROGRAM="${INSTALL_PROGRAM}" CFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib LIBS+= -L${LOCALBASE}/lib -liconv -lintl CFLAGS+= -DVERSION='\"${PORTVERSION}-${CRM114RELEASENAME}\"' CFLAGS+= -DNO_LOGL INSTALL_TARGET= install_binary_only CRM_FILES= mailfilter.crm mailfilter.cf mailreaver.crm mailtrainer.crm \ maillib.crm shuffle.crm rewriteutil.crm rewrites.mfp \ whitelist.mfp blacklist.mfp priolist.mfp priolist.mfp.example \ blacklist.mfp.example whitelist.mfp.example crm114-mode.el \ reto_procmailrc.recipe OPTIONS_DEFINE= PGO -PGO_DESC= Profile-Guided Optimization .include .if ${PORT_OPTIONS:MPGO} MAKE_ARGS+= CFLAGS="${CFLAGS} -fprofile-use" \ LDFLAGS="${LDFLAGS} -fprofile-use" .else MAKE_ARGS+= CFLAGS="${CFLAGS}" \ LDFLAGS="${LDFLAGS}" .endif post-patch: @${REINPLACE_CMD} -Ee \ 's,^((LD|C)FLAGS),#\1,;;s,^(prefix=),#\1,;;s,^(.*-install),#\1,' \ ${WRKSRC}/Makefile .if ${PORT_OPTIONS:MPGO} .if target(pre-build) .error Makefile error since pre-build target has already been defined .endif pre-build: pgo .endif # Peter Jeremy recommended the use of b64decode and md5 20040302 post-install: @${REINPLACE_CMD} -Ee 's|^(.*/openssl base64 -d/)|#\1|' \ -e 's|/mewdecode/|/b64decode -pr/|' ${WRKSRC}/mailfilter.cf @${REINPLACE_CMD} -e 's|/md5sum/|/md5 -r/|' \ -e 's|#!.*/usr/bin/crm.*|#!${PREFIX}/bin/crm|' \ ${WRKSRC}/mailfilter.crm ${WRKSRC}/mailtrainer.crm \ ${WRKSRC}/rewriteutil.crm \ ${WRKSRC}/mailreaver.crm ${WRKSRC}/shuffle.crm @for i in priolist.mfp whitelist.mfp; do \ ${CP} ${WRKSRC}/$${i}.example ${WRKSRC}/$${i}; \ done .if ${PORT_OPTIONS:MNORMALIZEMIME} @${REINPLACE_CMD} -Ee 's|^#(.*/normalizemime/)|\1|' \ ${WRKSRC}/mailfilter.cf .else @${REINPLACE_CMD} -Ee 's|^#(.*/b64decode -pr/)|\1|' \ ${WRKSRC}/mailfilter.cf .endif @${MKDIR} ${EXAMPLESDIR} for i in ${CRM_FILES}; do \ ${INSTALL_DATA} ${WRKSRC}/$${i} ${EXAMPLESDIR}; \ done .ifndef(NOPORTDOCS) @${MKDIR} ${DOCSDIR} @for i in ${WRKSRC}/[^G]*.txt ${WRKSRC}/README; do \ ${INSTALL_DATA} $${i} ${DOCSDIR}; \ done .endif .if ${PORT_OPTIONS:MPGO} pgo: pgo-build pgo-run pgo-clean pgo-build: @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} CFLAGS="${CFLAGS} -fprofile-generate" LDFLAGS="${LDFLAGS} -fprofile-generate" ${ALL_TARGET}) pgo-run: # Check everything to generate profiling information. # We will ignore any errors. @-(cd ${BUILD_WRKSRC}; ${MAKE} megatest) pgo-clean: @(cd ${BUILD_WRKSRC}; ${MAKE} clean) .endif # if ${PORT_OPTIONS:MPGO} .include Index: head/textproc/libtre/Makefile =================================================================== --- head/textproc/libtre/Makefile (revision 319664) +++ head/textproc/libtre/Makefile (revision 319665) @@ -1,122 +1,121 @@ # Created by: ijliao # $FreeBSD$ PORTNAME= libtre PORTVERSION= 0.8.0 PORTREVISION= 1 CATEGORIES= textproc MASTER_SITES= http://laurikari.net/tre/ \ LOCAL/bf DISTNAME= tre-${PORTVERSION} MAINTAINER= bf@FreeBSD.org COMMENT= Lightweight fully POSIX compliant regexp matching library LICENSE= BSD LICENSE_FILE= ${WRKSRC}/LICENSE USE_BZIP2= yes USES= pathfix pkgconfig USE_AUTOTOOLS= libtool CONFIGURE_ARGS+= --enable-static USE_LDCONFIG= yes CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib OPTIONS_DEFINE= NLS OPTIMIZED_CFLAGS PGO DOCS -PGO_DESC= Enable Profile-Guided Optimization MAN1= tre_agrep.1 .include .if ${PORT_OPTIONS:MNLS} USES+= gettext PLIST_SUB+= NLS="" .else CONFIGURE_ARGS+= --disable-nls PLIST_SUB+= NLS="@comment " .endif .include .if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} CFLAGS+= -Wuninitialized -ffast-math -finline-functions \ -fomit-frame-pointer -fexpensive-optimizations \ -fforce-mem -fforce-addr -O3 .endif .if ${PORT_OPTIONS:MPGO} LDFLAGS+= -fprofile-generate CFLAGS+= -fprofile-generate .endif post-patch: ${MV} ${WRKSRC}/doc/agrep.1.in ${WRKSRC}/doc/tre_agrep.1.in ${REINPLACE_CMD} -e 's;agrep\.1;tre_agrep\.1;g' ${WRKSRC}/configure \ ${WRKSRC}/tre.spec.in ${WRKSRC}/doc/Makefile.in ${REINPLACE_CMD} -e 's;agrep;tre_agrep;g' ${WRKSRC}/tests/agrep/*.ok .if ${PORT_OPTIONS:MPGO} .if target(pre-build) .error Makefile error since pre-build target has already been defined .endif pre-build: pgo .endif post-install: .if ${PORT_OPTIONS:MDOCS} ${MKDIR} ${DOCSDIR} .for i in tre-api.html tre-syntax.html ${INSTALL_DATA} ${WRKSRC}/doc/${i} ${DOCSDIR} .endfor .endif regression-test: build @(cd ${BUILD_WRKSRC} ; ${SETENV} ${MAKE_ENV} ${MAKE} check ) .if ${PORT_OPTIONS:MPGO} pgo: pgo-pre-build pgo-build pgo-run pgo-post-run pgo-clean pgo-pre-build: @${FIND} ${BUILD_WRKSRC} -type f -name Makefile -exec \ ${REINPLACE_CMD} -E \ -e 's,^((C|LD)FLAGS[[:space:]]*=.*)-fprofile-generate,\1,' \ -e 's,^(CFLAGS[[:space:]]*=.*)-fprofile-use,\1,' \ -e 's,^((C|LD)FLAGS[[:space:]]*=.*)$$,\1 -fprofile-generate,' \ {} \; pgo-build: @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}) pgo-run: # Check everything to generate profiling information. @-(cd ${BUILD_WRKSRC} ; ${SETENV} ${MAKE_ENV} ${MAKE} check) pgo-post-run: @${FIND} ${BUILD_WRKSRC} -type f -name Makefile -exec \ ${REINPLACE_CMD} -E \ -e 's,^((C|LD)FLAGS[[:space:]]*=.*)-fprofile-generate,\1,' \ -e 's,^(CFLAGS[[:space:]]*=.*)-fprofile-use,\1,' \ -e 's,^(CFLAGS[[:space:]]*=.*)$$,\1 -fprofile-use,' \ {} \; @${REINPLACE_CMD} -E \ -e 's,-fprofile-generate,-fprofile-use,g' \ ${CONFIGURE_WRKSRC}/config.status \ ${CONFIGURE_WRKSRC}/libtool @${REINPLACE_CMD} -E \ -e 's,-fprofile-generate,,g' \ ${BUILD_WRKSRC}/tre.pc pgo-clean: # Selectively clean some directories. . for dir in src tests @(cd ${BUILD_WRKSRC}/${dir}; ${SETENV} ${MAKE_ENV} ${MAKE} clean) . endfor # Only remove some files from lib to preserve profiling information. @${FIND} -E ${BUILD_WRKSRC}/lib -iregex ".*\.(a|la|lai|lo|o|so|so\..*)$$" \ -exec ${RM} -f {} \; .endif # if ${PORT_OPTIONS:MPGO} .include