ports/java/netbeans/Makefile
Muhammad Moinur Rahman 0835676e36
Mk/**java.mk: Convert bsd.java.mk to USES
The following features have been added or changed:
- Instead of USE_JAVA use USES=java. This defaults to
  USES=java:build,run if NO_BUILD is undefined. Else it defaults to
  USES=java:run
- Instead of USE_ANT=yes use USES=java:ant which also implies
  USES=java:build
- Instead of JAVA_BUILD=yes use USES=java:build. Does not imply run or
  extract
- Instead of JAVA_EXTRACT=yes use USES=java:extract does not imply
  build or run
- Instead of JAVA_RUN=yes use USES=java:run does not imply extract or
  build
- Instead of USE_JAVA=<version> use USES=java and JAVA_VERSION=<version>

Approved by: mat (portmgr), glewis
Differential Revision:  https://reviews.freebsd.org/D48201
2024-12-31 09:57:55 +01:00

53 lines
1.5 KiB
Makefile

PORTNAME= netbeans
DISTVERSION= 17
CATEGORIES= java devel
MASTER_SITES= APACHE/netbeans/netbeans/${PORTVERSION}/
DISTNAME= netbeans-${DISTVERSION}-bin
MAINTAINER= kwm@FreeBSD.org
COMMENT= Modular, standards-based integrated development environment
WWW= https://netbeans.apache.org/
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= cpe java shebangfix zip
CPE_VENDOR= apache
JAVA_VERSION= 11 17
NO_BUILD= yes
SHEBANG_FILES= extide/ant/bin/antRun.pl \
extide/ant/bin/complete-ant-cmd.pl \
extide/ant/bin/runant.pl \
extide/ant/bin/runant.py
perl_OLD_CMD= /usr/bin/perl
perl_CMD= ${LOCALBASE}/bin/perl
python_OLD_CMD= /usr/bin/python
python_CMD= ${LOCALBASE}/bin/python${PYTHON_DEFAULT}
WRKSRC= ${WRKDIR}/netbeans
DATADIR= ${PREFIX}/${PORTNAME}-${PORTVERSION}
PLIST_SUB+= PORTVERSION=${PORTVERSION}
DESKTOP_ENTRIES="Apache NetBeans" \
"Apache NetBeans IDE (incubating)" \
${DATADIR}/nb/netbeans.png \
${PORTNAME} \
"Development;" \
false
post-patch:
@${REINPLACE_CMD} -i '' -e '77s|#||;77s|/path/to/jdk|${JAVA_HOME}|' \
${WRKSRC}/etc/netbeans.conf
@${FIND} ${WRKSRC} -name "*.orig" -delete
do-install:
cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}${DATADIR}
cd ${STAGEDIR}${PREFIX} && ${LN} -sf ../${PORTNAME}-${PORTVERSION}/bin/netbeans bin/${PORTNAME}
cd ${STAGEDIR}${PREFIX} && ${LN} -sf ../${PORTNAME}-${PORTVERSION}/bin/netbeans bin/${PORTNAME}-${PORTVERSION}
${RM} -rf ${STAGEDIR}${DATADIR}/profiler/lib/deployed/jdk16/linux-arm*
.include <bsd.port.mk>