1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-25 09:34:11 +00:00
freebsd-ports/java/bouncycastle15/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

93 lines
2.8 KiB
Makefile

PORTNAME= bouncycastle
PORTVERSION= 1.71
CATEGORIES= java security
MASTER_SITES= http://www.bouncycastle.org/download/ \
http://polydistortion.net/bc/download/
PKGNAMESUFFIX= 15
DISTNAME= crypto-${DVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Cleanroom build of Java Cryptography Extensions
WWW= https://www.bouncycastle.org/
# APACHE20 is used by pg/src/main/java/org/bouncycastle/apache/bzip2/*.
LICENSE= APACHE20 MIT
LICENSE_COMB= multi
LICENSE_FILE_MIT= ${WRKSRC}/LICENSE.html
BUILD_DEPENDS= ${JAVALIBDIR}/junit.jar:java/junit \
${JAVALIBDIR}/mail.jar:java/javamail
RUN_DEPENDS= ${JAVALIBDIR}/mail.jar:java/javamail
USES= cpe
CPE_VENDOR= ${PORTNAME}
CPE_PRODUCT= legion-of-the-bouncy-castle-java-crytography-api
USE_ANT= yes
USE_JAVA= yes
MAKE_ARGS= -f \
ant/jdk${JDKNVERSION}+.xml
MAKE_ENV= ANT_INCLUDE_SHARED_JARS=YES
ALL_TARGET= build-provider build
CONFLICTS_INSTALL= bouncycastle-1.4*
NO_ARCH= yes
OPTIONS_DEFINE= DOCS ZIPSRC
OPTIONS_DEFAULT= ZIPSRC
OPTIONS_SUB= yes
ZIPSRC_DESC= Install bundled ZIP source files
ZIPSRC_ALL_TARGET= zip-src
ARTIFACTSDIR= ${WRKSRC}/build/artifacts/jdk${JDKMVERSION}
DVERSION= ${PORTVERSION:S/.//}
JDKMVERSION= 1.5
JDKNVERSION= 15
JARSUFFIX= -jdk${JDKNVERSION}to18-${DVERSION}.jar
.include <bsd.port.options.mk>
# PR 220612: remove fork="true" in javac and fork="yes" in junit tasks
.if ${ARCH} == armv6 || ${ARCH} == armv7
EXTRA_PATCHES+= ${FILESDIR}/armv6-patch-bc+-build.xml
.endif
do-install:
for src in $$(${FIND} ${ARTIFACTSDIR}/jars -name "*${JARSUFFIX}"); do \
dst="$${src##*/}"; \
dst="$${dst%%-jdk*}.jar"; \
${INSTALL_DATA} "$$src" "${STAGEDIR}/${JAVAJARDIR}/$${dst}"; \
done
# Install the bundlded version of bcprov.jar because we need a signed JAR.
# See bfca5d2c6e01d757f1f37c141c22645c2835104b for details.
${INSTALL_DATA} ${WRKSRC}/jars/bcprov${JARSUFFIX} \
${STAGEDIR}${JAVAJARDIR}/bcprov.jar
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/*.html ${STAGEDIR}${DOCSDIR}
@${MKDIR} ${STAGEDIR}${DOCSDIR}/docs
(cd ${WRKSRC} && ${COPYTREE_SHARE} docs "${STAGEDIR}${DOCSDIR}")
@${MKDIR} ${STAGEDIR}${DOCSDIR}/tls/docs
(cd ${WRKSRC} && ${COPYTREE_SHARE} tls/docs "${STAGEDIR}${DOCSDIR}")
# Skip the lcrypto documentation since that JAR is not installed.
@${MKDIR} ${STAGEDIR}${DOCSDIR}
for src in $$(${FIND} ${ARTIFACTSDIR} -type d -name "docs"); do \
dst="$${src%%-jdk*}"; \
dst="$${dst##*/}"; \
case $${dst} in lcrypto) continue;; esac; \
(cd $${src} && ${COPYTREE_SHARE} . "${STAGEDIR}${DOCSDIR}/$${dst}"); \
done
do-install-ZIPSRC-on:
@${MKDIR} ${STAGEDIR}${DATADIR}
for src in $$(${FIND} ${ARTIFACTSDIR} -name "src.zip"); do \
dst="$${src%%-jdk*}"; \
dst="$${dst##*/}-src.zip"; \
${INSTALL_DATA} "$$src" "${STAGEDIR}/${DATADIR}/$${dst}"; \
done
.include <bsd.port.mk>