ports/java/apache-commons-beanutils/Makefile
Muhammad Moinur Rahman ac7a7d6fe1
Mk/Uses/java.mk: Runtime fix with USES=java:ant
USES=java:ant does not imply USES=java:run so we need to add the run arg
seperately when we are using USES=java:ant. Not all ports require the
the argument so it is better to address the ports individually instead
of handling it automatically by implying run for ant.

Thanks to vvd for carefully going through this.

Reported by:	vvd
Approved by:	portmgr (blanket)
2024-12-31 15:39:30 +01:00

53 lines
1.6 KiB
Makefile

PORTNAME= commons-beanutils
PORTVERSION= 1.9.4
PORTREVISION= 1
CATEGORIES= java devel
MASTER_SITES= APACHE_COMMONS_SOURCE
PKGNAMEPREFIX= apache-
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
MAINTAINER= olgeni@FreeBSD.org
COMMENT= JavaBeans utility library
WWW= https://commons.apache.org/proper/commons-beanutils/
LICENSE= APACHE20
BUILD_DEPENDS= ${JAVALIBDIR}/commons-logging.jar:java/apache-commons-logging \
${JAVALIBDIR}/commons-collections.jar:java/apache-commons-collections
RUN_DEPENDS= ${JAVALIBDIR}/commons-logging.jar:java/apache-commons-logging \
${JAVALIBDIR}/commons-collections.jar:java/apache-commons-collections
USES= dos2unix java:ant,run
DOS2UNIX_FILES= build.xml
ALL_TARGET= dist
MAKE_ARGS+= -Dcommons-collections.jar=${JAVALIBDIR}/commons-collections.jar \
-Dcommons-logging.jar=${JAVALIBDIR}/commons-logging.jar
NO_ARCH= yes
JARFILE= ${PORTNAME}.jar
PLIST_FILES= ${JAVAJARDIR}/${JARFILE}
OPTIONS_DEFINE= DOCS
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDOCS}
APIDOCS= api
OTHERDOCS= LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
PORTDOCS= ${APIDOCS} ${OTHERDOCS}
.endif
pre-build:
@${REINPLACE_CMD} -e 's!1.9.3-SNAPSHOT!${PORTVERSION}!g;' \
${WRKSRC}/build.xml
do-install:
${INSTALL_DATA} ${WRKSRC}/dist/${PORTNAME}-${PORTVERSION}.jar ${STAGEDIR}${JAVALIBDIR}/${JARFILE}
.if ${PORT_OPTIONS:MDOCS}
cd ${WRKSRC}/dist/docs \
&& ${FIND} ${APIDOCS} -type d -exec ${MKDIR} ${STAGEDIR}${DOCSDIR}/{} \; \
&& ${FIND} ${APIDOCS} -type f -exec ${INSTALL_DATA} {} ${STAGEDIR}${DOCSDIR}/{} \;
${INSTALL_DATA} ${OTHERDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/
.endif
.include <bsd.port.mk>