1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

Resolve unnecessary bsd.port.options.mk inclusion by using OPTIONS helpers.

Approved by:	portmgr (blanket)
This commit is contained in:
Adam Weinberger 2014-07-03 18:18:02 +00:00
parent bd1c82afd5
commit 660fc56a82
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=360440
11 changed files with 29 additions and 85 deletions

View File

@ -18,7 +18,6 @@ WRKSRC= ${WRKDIR}/${PORTNAME}
PLIST_FILES= sbin/${PORTNAME} etc/${PORTNAME}.conf.sample \
man/man8/bftpd.8.gz
MAN8= bftpd.8
PORTDOCS= en pl sk
.include <bsd.port.pre.mk>

View File

@ -15,7 +15,7 @@ USE_OPENSSL= yes
MAKE_ENV+= OBJFORMAT=elf
MAKE_JOBS_UNSAFE= yes
OPTIONS_DEFINE= SERVER
OPTIONS_DEFINE= SERVER DOCS EXAMPLES
SERVER_DESC= Build/install FTP server as well
OPTIONS_SUB= yes
USE_RC_SUBR= ${PORTNAME}
@ -59,13 +59,11 @@ do-install:
.endif
post-install:
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/docs/* ${STAGEDIR}${DOCSDIR}
. for file in COPYRIGHT README INSTALL ChangeLog
${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR}
. endfor
.endif
.if ${PORT_OPTIONS:MSERVER} && ${PORT_OPTIONS:MEXAMPLES}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/cert

View File

@ -33,23 +33,13 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
OPTIONS_DEFINE= DBUS NLS
OPTIONS_DEFAULT=DBUS NLS
OPTIONS_SUB= yes
.include <bsd.port.options.mk>
DBUS_LIB_DEPENDS= libdbus-1.so:${PORTSDIR}/devel/dbus
DBUS_CONFIGURE_WITH= dbus
.if ${PORT_OPTIONS:MDBUS}
LIB_DEPENDS+= libdbus-1.so:${PORTSDIR}/devel/dbus
CONFIGURE_ARGS+= --with-dbus
.else
CONFIGURE_ARGS+= --without-dbus
.endif
.if ${PORT_OPTIONS:MNLS}
USES+= gettext
PLIST_SUB+= NLS=""
.else
CONFIGURE_ARGS+= --disable-locales
PLIST_SUB+= NLS="@comment "
.endif
NLS_USES= gettext
NLS_CONFIGURE_OFF= --disable-locales
.if !defined(MAINTAINER_MODE)
CONFIGURE_ARGS+= --disable-manualupdatecheck

View File

@ -16,8 +16,6 @@ WRKSRC= ${WRKDIR}/web/${DISTNAME}
OPTIONS_DEFINE= DOCS
.include <bsd.port.options.mk>
pre-build:
${ECHO} "${CC}" >${WRKSRC}/src/conf-cc
${ECHO} "${CPPFLAGS} ${CFLAGS}" >${WRKSRC}/src/conf-cflags
@ -28,11 +26,9 @@ do-install:
${INSTALL_PROGRAM} ftpcopy ftpls ${STAGEDIR}${PREFIX}/bin && \
${INSTALL_MAN} *.1 ${STAGEDIR}${PREFIX}/man/man1 && \
${INSTALL_SCRIPT} ftpcp ${STAGEDIR}${PREFIX}/bin
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${STAGEDIR}${DOCSDIR} && \
cd ${WRKSRC}/compile && \
${INSTALL_DATA} ChangeLog NEWS \
README THANKS ftpcopy.html ftpls.html ${STAGEDIR}${DOCSDIR}
.endif
.include <bsd.port.mk>

View File

@ -31,8 +31,6 @@ PORTEXAMPLES= ftpd.conf
OPTIONS_DEFINE= DOCS EXAMPLES
.include <bsd.port.options.mk>
post-patch:
@${REINPLACE_CMD} -e "s/root,root/root,wheel/" \
-e "s,/usr/sbin,${PREFIX}/sbin," \

View File

@ -23,8 +23,6 @@ PORTEXAMPLES= dotfer.pl list.pl sync.pl
OPTIONS_DEFINE= EXAMPLES
.include <bsd.port.options.mk>
post-install:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_SCRIPT} ${WRKSRC}/examples/* ${STAGEDIR}${EXAMPLESDIR}

View File

@ -16,7 +16,7 @@ LICENSE= MIT
USE_PYTHON= 2
USE_PYDISTUTILS= yes
OPTIONS_DEFINE= SENDFILE OPENSSL
OPTIONS_DEFINE= SENDFILE OPENSSL EXAMPLES
OPTIONS_DEFAULT= SENDFILE OPENSSL
SENDFILE_DESC= Enable sendfile(2) support
OPENSSL_DESC= Enable FTP over SSL/TLS (RFC4217)
@ -24,23 +24,14 @@ OPENSSL_DESC= Enable FTP over SSL/TLS (RFC4217)
# Workaround ports infrastructure bug
OPTIONSFILE= ${PORT_DBDIR}/py-${PORTNAME}/options
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MSENDFILE}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}pysendfile>0:${PORTSDIR}/net/py-pysendfile
.endif
.if ${PORT_OPTIONS:MOPENSSL}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}openssl>0:${PORTSDIR}/security/py-openssl
.endif
SENDFILE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pysendfile>0:${PORTSDIR}/net/py-pysendfile
OPENSSL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}openssl>0:${PORTSDIR}/security/py-openssl
EXAMPLESDIR= ${PREFIX}/share/examples/py-${PORTNAME}
post-install:
.if !defined(NOPORTEXAMPLES)
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${CP} -R ${WRKSRC}/demo/ ${STAGEDIR}${EXAMPLESDIR}
.endif
test: build
${TOUCH} ${WRKSRC}/test/__init__.py

View File

@ -17,9 +17,9 @@ USE_QT4= gui network corelib uic_build moc_build rcc_build
INSTALLS_ICONS= yes
WRKSRC= ${WRKDIR}/${PORTNAME}
.if defined(NOPORTDOCS)
INSTALL_TARGET=install_lang install_icon install_icon2 install_target
.endif
OPTIONS_DEFINE= DOCS
DOCS_INSTALL_TARGET_OFF= install_lang install_icon install_icon2 install_target
DESKTOP_ENTRIES= "Scythia" \
"Small ftp client unpretentious" \

View File

@ -18,6 +18,7 @@ PLIST_FILES= libexec/tnftpd \
PORTDOCS= ChangeLog NEWS README THANKS COPYING
PORTEXAMPLES= ftpd.conf ftpusers
OPTIONS_DEFINE= DOCS EXAMPLES
SUB_FILES= pkg-message
.include <bsd.port.pre.mk>
@ -33,17 +34,13 @@ do-install:
${INSTALL_MAN} ${WRKSRC}/src/ftpd.conf.man ${STAGEDIR}${PREFIX}/man/man5/ftpd.conf.5
${INSTALL_MAN} ${WRKSRC}/src/ftpusers.man ${STAGEDIR}${PREFIX}/man/man5/ftpusers.5
${INSTALL_MAN} ${WRKSRC}/src/tnftpd.man ${STAGEDIR}${PREFIX}/man/man8/tnftpd.8
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for f in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
.endfor
.endif
.if ${PORT_OPTIONS:MEXAMPLES}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
.for f in ${PORTEXAMPLES}
${INSTALL_DATA} ${WRKSRC}/examples/${f} ${STAGEDIR}${EXAMPLESDIR}
.endfor
.endif
.include <bsd.port.post.mk>

View File

@ -15,16 +15,10 @@ GNU_CONFIGURE= yes
PORTDOCS= ChangeLog README
OPTIONS_DEFINE= DOCS NLS
OPTIONS_SUB= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MNLS}
USES+= gettext
PLIST_SUB+= NLS=""
.else
CONFIGURE_ARGS+=--disable-nls
PLIST_SUB+= NLS="@comment "
.endif
NLS_USES= gettext
NLS_CONFIGURE_ENABLE= nls
post-patch:
@${REINPLACE_CMD} -e 's|^\(SUBDIRS.*\)debian|\1|' \

View File

@ -29,42 +29,25 @@ PLIST_FILES= bin/yafc \
info/yafc.info \
man/man1/yafc.1.gz
.include <bsd.port.options.mk>
NLS_USES= gettext
NLS_USE= GNOME=intltool
NLS_CONFIGURE_WITH= gettext=${LOCALBASE}
NLS_PLIST_FILES= share/locale/de/LC_MESSAGES/yafc.mo \
share/locale/sv/LC_MESSAGES/yafc.mo
.if ${PORT_OPTIONS:MNLS}
USE_GNOME+= intltool
USES+= gettext
CONFIGURE_ARGS+= --with-gettext=${LOCALBASE}
PLIST_FILES+= share/locale/de/LC_MESSAGES/yafc.mo \
share/locale/sv/LC_MESSAGES/yafc.mo
.else
CONFIGURE_ARGS+= --without-gettext
.endif
READLINE_USES= readline
READLINE_CONFIGURE_WITH=readline
.if ${PORT_OPTIONS:MREADLINE}
USES+= readline
.else
CONFIGURE_ARGS+= --without-readline
.endif
SSH_LIB_DEPENDS= libssh.so:${PORTSDIR}/security/libssh
SSH_CONFIGURE_OFF= --without-ssh
.if ${PORT_OPTIONS:MSSH}
LIB_DEPENDS+= libssh.so:${PORTSDIR}/security/libssh
.else
CONFIGURE_ARGS+= --without-ssh
.endif
.if ${PORT_OPTIONS:MBASH}
CONFIGURE_ARGS+= --with-bash-completion=yes
PLIST_FILES+= etc/bash_completion.d/yafc
PLIST_DIRSTRY= etc/bash_completion.d
.else
CONFIGURE_ARGS+= --with-bash-completion=no
.endif
BASH_CONFIGURE_ON= --with-bash-completion=yes
BASH_PLIST_FILES= etc/bash_completion.d/yafc
BASH_PLIST_DIRSTRY= etc/bash_completion.d
BASH_CONFIGURE_OFF= --with-bash-completion=no
post-install:
.if ${PORT_OPTIONS:MEXAMPLES}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/samples/* ${STAGEDIR}${EXAMPLESDIR}
.endif
.include <bsd.port.mk>