Skip to content

Commit

Permalink
Resolve unnecessary bsd.port.options.mk inclusion by using OPTIONS he…
Browse files Browse the repository at this point in the history
…lpers.

Approved by:	portmgr (blanket)
  • Loading branch information
assistcontrol committed Jul 3, 2014
1 parent 2af463a commit c26fe43
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 85 deletions.
1 change: 0 additions & 1 deletion ftp/bftpd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 1 addition & 3 deletions ftp/bsdftpd-ssl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down
20 changes: 5 additions & 15 deletions ftp/filezilla/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions ftp/ftpcopy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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>
2 changes: 0 additions & 2 deletions ftp/p5-Net-FTPServer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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," \
Expand Down
2 changes: 0 additions & 2 deletions ftp/p5-POE-Component-Client-FTP/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
15 changes: 3 additions & 12 deletions ftp/py-pyftpdlib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,22 @@ 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)

# 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
Expand Down
6 changes: 3 additions & 3 deletions ftp/scythia/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
5 changes: 1 addition & 4 deletions ftp/tnftpd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
12 changes: 3 additions & 9 deletions ftp/weex/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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|' \
Expand Down
43 changes: 13 additions & 30 deletions ftp/yafc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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>

0 comments on commit c26fe43

Please sign in to comment.