# -*- 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 28 revision 0 categories aqua devel java # This port uses prebuilt binaries; 'NoMirror' makes sure MacPorts doesn't # mirror/distribute these third-party binaries license Apache-2 NoMirror 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 5133479326cefefb09185b7b631bfb0b46a2d6d8 \ sha256 00b9fa5c02c07106dfeb37a889e2a04e3e2c522b36e15cf37d31ee90fa1afc32 \ size 515738035 worksrcdir ${name_lower} use_zip yes use_configure no java.version 17+ 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 # There is some arcane magic going into this binary: # https://github.com/apache/netbeans/blob/ba85468772292fd64f188f4022f9d49f77f00b89/profiler/lib.profiler/native/scripts/buildnative-mac.sh#L62-L92 # # On PPC{,64}, and i386, this binary has a reference to # /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM which # doesn't exist on modern systems, and MacPorts' rev-upgrade flags the # binary as broken. We remove these archs to make rev-upgrade pass, but it's # unclear what effect this has on systems of the relevant archs. system -W ${destroot}${prefix}/share/java/netbeans/profiler/lib/deployed/jdk15/mac/ \ "lipo -remove ppc -remove ppc64 -remove i386 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+)*)