freebsd-ports/www/vertx/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

124 lines
2.8 KiB
Makefile

PORTNAME= vertx
PORTVERSION= 2.1.1
PORTREVISION= 0
CATEGORIES= www
MASTER_SITES= http://dl.bintray.com/vertx/downloads/
DISTNAME= vert.x-${PORTVERSION}
MAINTAINER= nivit@FreeBSD.org
COMMENT= Effortless asynchronous application development for the modern web
WWW= https://vertx.io/
LICENSE= APACHE20
RUN_DEPENDS= bash:shells/bash
DATADIR= ${JAVASHAREDIR}/${PORTNAME}
JAVA_OS= native
JAVA_RUN= yes
PLIST_SUB= VERTXVER=${PORTVERSION}
REINPLACE_ARGS= -i ''
SED_APPEND_ARGS= ${nl}JAVA_HOME=${JAVA_HOME}
SHEBANG_FILES= bin/vertx
USE_JAVA= yes
USES= shebangfix
VERTX_CMD= ${WRKSRC}/bin/vertx
VERTX_DIST= client conf lib
OPTIONS_DEFINE= CLOJURE DOCS DYNJS GROOVY JYTHON JRUBY PHP RHINO SCALA
OPTIONS_SUB= yes
CLOJURE_DESC= Use Clojure to write verticles
DYNJS_DESC= Use DynJS to write verticles
GROOVY_DESC= Use Groovy to write verticles
JYTHON_DESC= Use Python to write verticles
JRUBY_DESC= Use Ruby to write verticles
PHP_DESC= Use PHP to write verticles (experimental)
RHINO_DESC= Use Rhino to write verticles
SCALA_DESC= Use Scala to write verticles
JYTHON_RUN_DEPENDS= jython:lang/jython
JRUBY_RUN_DEPENDS= jruby:lang/jruby
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MCLOJURE}
VERTX_MODULES= clojure
.endif
.if ${PORT_OPTIONS:MDYNJS}
VERTX_MODULES+= dynjs
.endif
.if ${PORT_OPTIONS:MGROOVY}
VERTX_MODULES+= groovy
.endif
.if ${PORT_OPTIONS:MJYTHON}
SED_APPEND_ARGS+= \${nl}JYTHON_HOME=${LOCALBASE}/lib/jython
VERTX_MODULES+= jython
.endif
.if ${PORT_OPTIONS:MJRUBY}
SED_APPEND_ARGS+= \${nl}JRUBY_HOME=${LOCALBASE}/share/jruby
VERTX_MODULES+= ruby
.endif
.if ${PORT_OPTIONS:MPHP}
VERTX_MODULES+= php
.endif
.if ${PORT_OPTIONS:MRHINO}
VERTX_MODULES+= rhino
.endif
.if ${PORT_OPTIONS:MSCALA}
VERTX_MODULES+= scala
.endif
nl= ${.newline}
.if !empty(VERTX_MODULES)
MAKE_ENV= VERTX_MODS=${WRKSRC}
PLIST_SUB+= SYSMODS=""
VERTX_DIST+= sys-mods
do-build:
@(cd ${VERTX_MODS} && \
for mod in $$(${CUT} -s -d = -f 2 ${WRKSRC}/conf/langs.properties | \
${CUT} -s -d : -f 1 | ${EGREP} -i -e '(${VERTX_MODULES:ts|})'); do \
${VERTX_CMD} install $${mod}; \
done;)
.else
PLIST_SUB+= SYSMODS="@comment "
do-build:
@${DO_NADA}
.endif
post-patch:
@${FIND} ${WRKSRC} -type f \( -name "*.bat" -o -name "*.orig" \) -delete
@${REINPLACE_CMD} -E -e '/APP_BASE_NAME=/a \${SED_APPEND_ARGS}' \
-e 's,(pattern=)%t,\1%h,1' \
-e 's,-Djruby.home=,-Dpython.cachedir=$${HOME}/.jython-cachedir &,1' \
${WRKSRC}/bin/${PORTNAME} ${WRKSRC}/conf/logging.properties
do-install:
@${MKDIR} ${STAGEDIR}${DATADIR}
.for d in ${VERTX_DIST}
cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${STAGEDIR}${DATADIR}
.endfor
@${MKDIR} ${STAGEDIR}${DATADIR}/bin
${INSTALL_SCRIPT} ${WRKSRC}/bin/${PORTNAME} ${STAGEDIR}${DATADIR}/bin/${PORTNAME}
${LN} -s ${DATADIR}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
cd ${WRKSRC}/api-docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>