freebsd-ports/math/jts/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

97 lines
2.6 KiB
Makefile

PORTNAME= jts
DISTVERSION= 1.18.1
DISTVERSIONPREFIX= jts-
CATEGORIES= math databases java
MAINTAINER= mfechner@FreeBSD.org
COMMENT= JTS Topology Suite
WWW= https://github.com/locationtech/jts
LICENSE= EPL
#LICENSE_COMB= dual
BUILD_DEPENDS= mvn:devel/maven
USE_GITHUB= yes
GH_ACCOUNT= locationtech
USE_JAVA= yes
JAVA_VERSION= 11+
NO_ARCH= yes
VER= ${PORTVERSION:tl}
JARFILES= core/target/jts-core app/target/jts-app io/common/target/jts-io-common lab/target/jts-lab
JARDOCFILES= io/common/target/jts-io-common core/target/jts-core lab/target/jts-lab
PLIST_SUB= VERSION=${VER}
PORTDOCS= *
OPTIONS_DEFINE= DOCS
# to rebuild the deps archive:
# 1. set DEV_UPDATE_MODE=yes
# 2. make makesum build
# 3. upload the *-deps using: make pushToGH
# 4. set DEV_UPDATE_MODE=no
# 5. make clean makesum
DEV_UPDATE_MODE= no
.if (${DEV_UPDATE_MODE} == "yes")
pre-build:
mkdir -p ${WRKDIR}/.m2
cd ${WRKDIR}/.m2 && rm -Rf .git
cd ${WRKDIR}/.m2 && git init
cd ${WRKDIR}/.m2 && git remote add origin git@github.com:mfechner/freebsd-math-jts-deps.git
cd ${WRKDIR}/.m2 && git fetch
cd ${WRKDIR}/.m2 && rm -Rf repository
cd ${WRKDIR}/.m2 && git checkout master
cd ${WRKDIR}/.m2 && rm -Rf repository
post-build:
@${ECHO} "(!!!) Please upload the maven repo using: make pushToGH"
.else
GH_TUPLE= mfechner:freebsd-math-jts-deps:${VER}:m2
MASTER_SITES+= LOCAL/mfechner/:maven
MVN_ARGS= --offline
# Move the download deps to correct destination
post-patch:
@${MV} ${WRKDIR}/freebsd-math-jts-deps-${VER} ${WRKDIR}/.m2
.endif
#-Dmaven.repo.local=${WRKDIR}/freebsd-math-jts-deps-${VER}/
do-build:
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
${LOCALBASE}/bin/mvn ${MVN_ARGS} \
-fae clean install \
-Dmaven.test.skip=true \
-Duser.home=${WRKDIR}
do-install:
.for jar in ${JARFILES}
@${INSTALL_DATA} ${WRKSRC}/modules/${jar}-${VER}.jar \
${STAGEDIR}${JAVALIBDIR}/
.endfor
${RLN} ${STAGEDIR}${JAVALIBDIR}/jts-core-${VER}.jar ${STAGEDIR}${JAVALIBDIR}/jts-core.jar
do-install-DOCS-on:
.for jar in ${JARDOCFILES}
@${INSTALL_DATA} ${WRKSRC}/modules/${jar}-${VER}-javadoc.jar \
${STAGEDIR}${JAVALIBDIR}/
.endfor
# Make sure you build the port before (not in poudriere, make build) with DEV_UPDATE_MODE=yes
# before you execute this target
pushToGH:
@cd ${WRKDIR}/.m2
cd ${WRKDIR}/.m2 && git add .
cd ${WRKDIR}/.m2 && git status
cd ${WRKDIR}/.m2 && git commit -m "Update deps for version ${VER}."
read -p "Continue to push new version ${VER} to GH" dummy
cd ${WRKDIR}/.m2 && git push -u origin master
cd ${WRKDIR}/.m2 && git tag -f ${VER}
cd ${WRKDIR}/.m2 && git push --tags -f
.include <bsd.port.mk>