Files
Vadym-Valdis Yudaiev 801a49dadc pmd: update to 7.25.0
2026-06-22 22:47:34 +03:00

77 lines
2.6 KiB
Tcl

# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup github 1.0
PortGroup java 1.0
github.setup pmd pmd 7.25.0 pmd_releases/
github.tarball_from releases
revision 0
categories java lang
license {BSD Apache-2}
platforms any
supported_archs noarch
maintainers {judaew @judaew} openmaintainer
description PMD is a Java source code analyzer
long_description PMD is a Java source code analyzer. It finds unused \
variables, empty catch blocks, unnecessary object \
creation, and so forth.
homepage https://pmd.github.io
use_zip yes
distname ${name}-dist-${version}-bin
checksums ${distname}${extract.suffix} \
rmd160 508dfcf8282e8de5107bed6557a215da70d19fda \
sha256 1fceb3005ebfd580cc9afa5242e07df74826eedeb225f239f503083845d77fc2 \
size 73610197
java.version 1.8+
java.fallback openjdk11
worksrcdir ${name}-bin-${version}
use_configure no
build {}
variant doc description "Include offline documentation" {
distfiles-append ${name}-dist-${version}-doc${extract.suffix}:doc
checksums-append ${name}-dist-${version}-doc${extract.suffix} \
rmd160 3727263e4ff970bdc8568944f0f18548d0dc2827 \
sha256 d8fec3c632d2c3ba6555dd7efbe883b170972407fd2a6f4ad68c1ea7c6676e11 \
size 9576719
}
pre-destroot {
delete ${worksrcpath}/bin/pmd.bat
}
destroot {
xinstall -m 755 -d ${destroot}${prefix}/share/java/${name}/bin
xinstall -m 755 ${worksrcpath}/bin/pmd \
${destroot}${prefix}/share/java/${name}/bin
xinstall -m 755 -d ${destroot}${prefix}/share/java/${name}/conf
xinstall -m 755 ${worksrcpath}/conf/simplelogger.properties \
${destroot}${prefix}/share/java/${name}/conf
xinstall -m 755 -d ${destroot}${prefix}/share/java/${name}
move ${worksrcpath}/lib \
${worksrcpath}/LICENSE \
${destroot}${prefix}/share/java/${name}
ln -s ${prefix}/share/java/${name}/bin/pmd ${destroot}${prefix}/bin/${name}
if {[variant_isset doc]} {
xinstall -m 755 -d ${destroot}${prefix}/share/java/${name}/doc
move {*}[glob -directory ${workpath}/${name}-doc-${version} *] \
${destroot}${prefix}/share/java/${name}/doc
}
}
# Only allow numbers, to avoid pre-release versions
github.livecheck.regex {([0-9.]+)}