# -*- 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 OmegaT set name_lower [string tolower ${name}] version 6.0.1 revision 0 categories aqua textproc java license GPL-3 maintainers {amake @amake} openmaintainer description A full-featured Computer-Aided Translation (CAT) tool long_description OmegaT is a free and open source multiplatform Computer Assisted \ Translation tool with fuzzy matching, translation memory, keyword \ search, glossaries, and translation leveraging into updated projects. homepage https://omegat.org/ platforms {darwin any} supported_archs noarch java.version 11 java.fallback openjdk11 set flavor Standard checksums rmd160 009f9da89322e88e632203bf9fbf4aa7163b8b60 \ sha256 463e746f34fc93bf8659bd29fe66becf2f8fce417bb41ea25781785150089898 \ size 179335627 set dist_platform Without_JRE distname ${name}_${version}_${dist_platform} set flavor_dir ${name}%20-%20${flavor} set version_dir ${name}%20[string map {_0 "%20update%20" _ "%20update%20"} $version] master_sites sourceforge:project/${name_lower}/${flavor_dir}/${version_dir} use_configure no use_zip yes build {} destroot { xinstall -m 0755 -d ${destroot}${prefix}/share/java # Main application payload set target_dir ${prefix}/share/java/${name} copy ${worksrcpath} ${destroot}/${target_dir} # CLI wrapper script set cli_bin ${destroot}${prefix}/bin/${name_lower} xinstall -m 0755 ${filespath}/${name}_cli_bin ${cli_bin} # .app bundle set app ${destroot}${applications_dir}/${name}.app xinstall -d ${app}/Contents/MacOS xinstall -d ${app}/Contents/Resources xinstall -m 0644 ${filespath}/Info.plist ${app}/Contents/ reinplace "s|@@VERSION@@|${version}|g" ${app}/Contents/Info.plist xinstall -m 0644 ${filespath}/${name}.icns ${app}/Contents/Resources/ set app_bin ${app}/Contents/MacOS/${name} xinstall -m 0755 ${filespath}/${name}_app_bin ${app_bin} reinplace "s|@@JAVA_VERSION@@|${java.version}|g" ${app_bin} reinplace "s|@@ICON@@|${applications_dir}/${name}.app/Contents/Resources/${name}.icns|g" ${app_bin} reinplace "s|@@JAR@@|${target_dir}/${name}.jar|g" ${app_bin} ${cli_bin} reinplace "s|@@NAME@@|${name}|g" ${app_bin} ${cli_bin} } livecheck.type regex livecheck.url https://omegat.org/download livecheck.regex ${flavor}/\[^/\]*/${name}_(\\d+\\.\\d+(\\.\\d+)?(_\\d+)?)_${dist_platform}\\.zip subport ${name}-latest { PortGroup obsolete 1.0 version 5.7.1 revision 0 replaced_by ${name} livecheck.type none }