diff options
author | danfe <danfe@FreeBSD.org> | 2013-08-20 13:36:09 +0800 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2013-08-20 13:36:09 +0800 |
commit | aae92e34c787cbbc5ea401ffd7fab64f1aebdf75 (patch) | |
tree | 72f611753e0562a5e8b5428e0f6d8b7944956401 /news | |
parent | 346709d43d27ba39a9315e6220c0dab55edbb4db (diff) | |
download | freebsd-ports-gnome-aae92e34c787cbbc5ea401ffd7fab64f1aebdf75.tar.gz freebsd-ports-gnome-aae92e34c787cbbc5ea401ffd7fab64f1aebdf75.tar.zst freebsd-ports-gnome-aae92e34c787cbbc5ea401ffd7fab64f1aebdf75.zip |
- Allow parallel (-jX) builds to work: some object files
depend on the generated header; convert USE_GMAKE
- Use contemporary form of MASTER_SITES for local distfiles
- Convert to OptionsNG (SSL and EXAMPLES only this time)
- Utilize REINPLACE_CMD more vividly in post-patch
- Simplify installation of examples while here
Reported by: marino
Approved by: miwi, bapt (portmgr, implicit)
Diffstat (limited to 'news')
-rw-r--r-- | news/suck/Makefile | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/news/suck/Makefile b/news/suck/Makefile index d7e9f04fb0d0..499a8738ae2d 100644 --- a/news/suck/Makefile +++ b/news/suck/Makefile @@ -1,4 +1,4 @@ -# Created by: graphite@taurus.bekkoame.or.jp +# Created by: Noritaka Ishizumi <graphite@taurus.bekkoame.or.jp> # $FreeBSD$ PORTNAME= suck @@ -7,22 +7,26 @@ PORTREVISION= 2 CATEGORIES= news #MASTER_SITES= http://www.sucknews.org/ MASTER_SITES= http://home.comcast.net/~bobyetman/ \ - ${MASTER_SITE_LOCAL} -MASTER_SITE_SUBDIR= dinoex + LOCAL/dinoex PKGNAMESUFFIX?= ${CNEWS_SUFFIX}${PKGNAMESUFFIX2} MAINTAINER= dinoex@FreeBSD.org COMMENT= Receives/sends news to/from localhost via NNTP CONFLICTS?= suckblow-1.* -USE_GMAKE= yes + +USES= gmake GNU_CONFIGURE= yes +MAKE_ENV= CHKHISTORY=chkhistory_db.o + MAN1= suck.1 rpost.1 testhost.1 lmove.1 EX_SCRIPTS= get.news.generic get.news.inn perl_kill.pl perl_xover.pl \ post_filter.pl put.news put.news.pl put.news.sm put.news.sm.pl EX_DATA= suckkillfile.sample sucknewsrc.sample suckothermsgs.sample -MAKE_ENV+= CHKHISTORY=chkhistory_db.o +OPTIONS_DEFINE= SSL EXAMPLES + +.include <bsd.port.options.mk> .if defined(NEWSBIN) && !defined(SUCK_WITH_INN) CNEWS_PORT?= news/cnews @@ -43,7 +47,7 @@ BUILD_DEPENDS+= ${LOCALBASE}/news/lib/libinn.a:${PORTSDIR}/news/inn CONFLICTS+= suck-cnews-4.* .endif -.if !defined(SUCK_WITHOUT_SSL) && !defined(WITHOUT_SSL) +.if ${PORT_OPTIONS:MSSL} USE_OPENSSL= yes MAKE_ENV+= SSL_LIB="-lssl -lcrypto" MAKE_ENV+= SSL_DEFS="-I${OPENSSLINC} -DHAVE_LIBSSL" @@ -51,29 +55,27 @@ MAKE_ENV+= SSL_LIB_LOC="-L${OPENSSLLIB}" .endif post-patch: - @${MV} ${WRKSRC}/Makefile.in ${WRKSRC}/Makefile.in.sed - ${SED} -e "s=/usr/local/=${LOCALBASE}/=" \ - ${WRKSRC}/Makefile.in.sed > ${WRKSRC}/Makefile.in - @${MV} ${WRKSRC}/suck_config.h ${WRKSRC}/suck_config.h.sed + @${REINPLACE_CMD} -e "s=/usr/local/=${LOCALBASE}/=" \ + ${WRKSRC}/Makefile.in + @${REINPLACE_CMD} -e "s=/usr/local/lib/suck=${PREFIX}/lib/suck=" \ + ${WRKSRC}/suck_config.h .if defined(NEWSBIN) && !defined(SUCK_WITH_INN) - ${SED} -e "s=/usr/local/lib/suck=${PREFIX}/lib/suck=" \ - -e "s=/usr/local/news/lib=${NEWSCTL}=" \ - ${WRKSRC}/suck_config.h.sed > ${WRKSRC}/suck_config.h + @${REINPLACE_CMD} -e -e "s=/usr/local/news/lib=${NEWSCTL}=" \ + ${WRKSRC}/suck_config.h .else - ${SED} -e "s=/usr/local/lib/suck=${PREFIX}/lib/suck=" \ - -e "s=/usr/local/news/lib=${LOCALBASE}/news/lib=" \ - ${WRKSRC}/suck_config.h.sed > ${WRKSRC}/suck_config.h + @${REINPLACE_CMD} -e "s=/usr/local/news/lib=${LOCALBASE}/news/lib=" \ + ${WRKSRC}/suck_config.h .endif +# Add missing dependency to allow parallel (-jX) builds + @${GREP} -l '#include "phrases.h"' ${WRKSRC}/*.c | ${SED} -e \ + 's=.*/== ; s=\.c=.o= ; $$s=$$=: phrases.h=' | ${XARGS} \ + >> ${WRKSRC}/Makefile.in -.if !defined(NOPORTEXAMPLES) post-install: - ${MKDIR} ${EXAMPLESDIR} -.for i in ${EX_SCRIPTS} - ${INSTALL_SCRIPT} ${WRKSRC}/sample/${i} ${EXAMPLESDIR}/ -.endfor -.for i in ${EX_DATA} - ${INSTALL_DATA} ${WRKSRC}/sample/${i} ${EXAMPLESDIR}/ -.endfor +.if ${PORT_OPTIONS:MEXAMPLES} + @${MKDIR} ${EXAMPLESDIR} + ${INSTALL_SCRIPT} ${EX_SCRIPTS:S=^=${WRKSRC}/sample/=} ${EXAMPLESDIR} + ${INSTALL_DATA} ${EX_DATA:S=^=${WRKSRC}/sample/=} ${EXAMPLESDIR} .endif .include <bsd.port.mk> |