freebsd-ports/java/bouncycastle/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

63 lines
2.1 KiB
Makefile

PORTNAME= bouncycastle
PORTVERSION= 1.45
PORTREVISION= 2
CATEGORIES= java security
MASTER_SITES= http://downloads.bouncycastle.org/java/ \
http://polydistortion.net/bc/download/ \
http://bouncycastle.gva.es/download/
DISTNAME= crypto-${JARVERSION}
MAINTAINER= ale@FreeBSD.org
COMMENT= Cleanroom build of Java Cryptography Extensions
WWW= https://www.bouncycastle.org/
BUILD_DEPENDS= ${JAVALIBDIR}/mail.jar:java/javamail \
${JAVALIBDIR}/junit.jar:java/junit
RUN_DEPENDS= ${JAVALIBDIR}/mail.jar:java/javamail
OPTIONS_DEFINE= DOCS
CPE_PRODUCT= legion-of-the-bouncy-castle-java-crytography-api
CPE_VENDOR= ${PORTNAME}
USE_JAVA= yes
USES= cpe
JDKMVERSION= 1.6 # ${JAVA_PORT_VERSION:C/^([0-9]\.[0-9])(.*)$/\1/}
JDKNVERSION= 16 # ${JAVA_PORT_VERSION:C/^([0-9])\.([0-9])(.*)$/\1\2/}
USE_ANT= yes
MAKE_ENV= ANT_INCLUDE_SHARED_JARS=YES
MAKE_ARGS= -f jdk${JDKNVERSION}.xml
ALL_TARGET= build-provider build zip-src
JARVERSION= ${PORTVERSION:S/.//}
JARS= bcprov bcmail bctsp bcpg
PORTDOCS= *
PORTSCOUT= skipv:146
post-patch:
@${REINPLACE_CMD} s/BERConstructedOctetString/DEROctetString/ \
${WRKSRC}/src/org/bouncycastle/cms/CMS*DataGenerator.java
@${REINPLACE_CMD} 's/<javac/<javac encoding="UTF-8"/;s/<javadoc/<javadoc encoding="UTF-8"/' \
${WRKSRC}/bc-build.xml ${WRKSRC}/common.xml
do-install:
@${MKDIR} ${STAGEDIR}${DATADIR}
.for jar in ${JARS}
${INSTALL_DATA} ${WRKSRC}/build/artifacts/jdk${JDKMVERSION}/jars/${jar}-jdk${JDKNVERSION}-${JARVERSION}.jar \
${STAGEDIR}${JAVAJARDIR}/${jar}.jar
${INSTALL_DATA} ${WRKSRC}/build/artifacts/jdk${JDKMVERSION}/${jar}-jdk${JDKNVERSION}-${JARVERSION}/src.zip \
${STAGEDIR}${DATADIR}/${jar}-src.zip
.endfor
${INSTALL_DATA} ${WRKSRC}/jars/bcprov-jdk${JDKNVERSION}-${JARVERSION}.jar \
${STAGEDIR}${JAVAJARDIR}/bcprov.jar
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/*.html ${STAGEDIR}${DOCSDIR}
.for jar in ${JARS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}/${jar}
@cd ${WRKSRC}/build/artifacts/jdk${JDKMVERSION}/${jar}-jdk${JDKNVERSION}-${JARVERSION}/docs/ && \
${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/${jar}
.endfor
.include <bsd.port.mk>