source: trunk/dports/java/pmd/Portfile

Last change on this file was 142698, checked in by landonf@…, 2 years ago

Drop maintainership of (almost) all my ports, as I'm no longer using Mac OS X as my desktop OS.

The dict port here dates back to ~2002; it was the first port used as a test case when we were developing MacPorts.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1# $Id: Portfile 142698 2015-11-20 16:55:09Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name             pmd
6version          3.9
7
8categories       java lang
9platforms        darwin
10maintainers      nomaintainer
11
12description      PMD is a Java source code analyzer
13long_description PMD is a Java source code analyzer. It finds unused \
14                 variables, empty catch blocks, unnecessary object \
15                 creation, and so forth.
16
17homepage         http://pmd.sourceforge.net/
18master_sites     sourceforge
19distname         ${name}-src-${version}
20checksums        md5 2ddefa2c0aa890693e2ce07a548b189f
21use_zip          yes
22
23depends_build    bin:ant:apache-ant port:junit
24
25worksrcdir       ${name}-${version}
26
27post-extract   {
28    # Ensure this gets rebuilt
29    file delete ${worksrcpath}/lib/pmd-${version}.jar
30}
31
32use_configure  no
33
34build.cmd      ant
35build.target   dist
36build.dir      ${worksrcpath}/bin
37
38build.args     -lib ${prefix}/share/java/junit.jar
39
40destroot {
41    # Install the wrapper script
42    xinstall -m 755 ${filespath}/pmd ${destroot}${prefix}/bin
43    reinplace "s|_PREFIX_|${prefix}|g" ${destroot}${prefix}/bin/pmd
44
45    # Install jars
46    xinstall -m 755 -d ${destroot}${prefix}/share/pmd
47    file copy ${worksrcpath}/rulesets ${destroot}${prefix}/share/pmd
48    foreach file [glob ${worksrcpath}/lib/*.jar] {
49        xinstall -m 644 ${file} ${destroot}${prefix}/share/pmd/
50    }
51    system "cd ${destroot}${prefix}/share/pmd && ln -s pmd-${version}.jar pmd.jar"
52
53    # Install documentation
54    xinstall -m 755 -d ${destroot}${prefix}/share/doc/pmd
55    file copy ${worksrcpath}/docs ${destroot}${prefix}/share/doc/pmd
56}
Note: See TracBrowser for help on using the repository browser.