# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup java 1.0 name NetBeans set name_lower [string tolower ${name}] version 23 revision 0 categories aqua devel java license Apache-2 maintainers openmaintainer {amake @amake} supported_archs noarch description Java integrated development environment long_description \ NetBeans IDE lets you quickly and easily develop Java desktop, mobile, and \ web applications, as well as HTML5 applications with HTML, JavaScript, and \ CSS. The IDE also provides a great set of tools for PHP and C/C++ \ developers. It is free and open source and has a large community of users \ and developers around the world. homepage https://netbeans.apache.org/ platforms {darwin any} distname ${name_lower}-${version}-bin master_sites apache:${name_lower}/${name_lower}/${version} checksums rmd160 360ddb37dca7cf3c49b6bf483d16f511c045f3e0 \ sha256 50d4d6d0af09964c4e2b3f683b71d404f678c9963bb96064159776b9e9d7b590 \ size 510066865 worksrcdir ${name_lower} use_zip yes use_configure no java.version 11+ build {} post-extract { delete {*}[glob ${worksrcpath}/bin/*.exe] } destroot { xinstall -m 0755 -d ${destroot}${prefix}/share/java set target_dir ${prefix}/share/java/${name_lower} copy ${worksrcpath} ${destroot}/${target_dir} ln -s ${target_dir}/bin/${name_lower} ${destroot}${prefix}/bin/${name_lower} set app "${destroot}${applications_dir}/Apache ${name} ${version}.app" xinstall -d ${app}/Contents/MacOS ln -s ${target_dir}/bin/${name_lower} ${app}/Contents/MacOS/${name_lower} xinstall -d ${app}/Contents/Resources # Icon and Plist from official app xinstall -m 0644 ${filespath}/Info.plist ${app}/Contents/ xinstall -m 0644 ${filespath}/${name_lower}.icns ${app}/Contents/Resources/ reinplace "s|@@VERSION@@|${version}|g" ${app}/Contents/Info.plist # rev-upgrade considers these two files to be broken on arm64. They are weirdly constructed; see # https://github.com/apache/netbeans/blob/ba85468772292fd64f188f4022f9d49f77f00b89/profiler/lib.profiler/native/scripts/buildnative-mac.sh#L62-L92 # # For some reason removing all architectures but x86_64 fixes the issue. # # TODO: When arm64 support is added to these files, see if this hack is still helpful system -W ${destroot}${prefix}/share/java/netbeans/profiler/lib/deployed/jdk15/mac/ \ "lipo -thin x86_64 libprofilerinterface.jnilib -o libprofilerinterface.jnilib" system -W ${destroot}${prefix}/share/java/netbeans/profiler/lib/deployed/jdk16/mac/ \ "lipo -thin x86_64 libprofilerinterface.jnilib -o libprofilerinterface.jnilib" } universal_variant no livecheck.type regex livecheck.url https://netbeans.apache.org/download/archive/index.html livecheck.regex ${name} (\\d+(?:\\.\\d+)*)