source: trunk/dports/java/pmd/Portfile @ 23776

Last change on this file since 23776 was 23776, checked in by landonf@…, 14 years ago

The PMD port wasn't working; this commit:

  • Uses the included .jar dependencies
  • Fixes the bin/pmd script to pass arguments directly to pmd
  • Does not attempt to depend on kaffe (unusable).
  • Claims ownership (plus openmaintainer)
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1# $Id: Portfile 23776 2007-04-09 17:59:42Z landonf@macports.org $
2
3PortSystem 1.0
4
5name             pmd
6version          3.9
7
8categories       java lang
9platforms        darwin
10maintainers      landonf@macports.org openmaintainer@macports.org
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
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
38destroot {
39    # Install the wrapper script
40    xinstall -m 755 ${filespath}/pmd ${destroot}${prefix}/bin
41    reinplace "s|_PREFIX_|${prefix}|g" ${destroot}${prefix}/bin/pmd
42
43    # Install jars
44    xinstall -m 755 -d ${destroot}${prefix}/share/pmd
45    file copy ${worksrcpath}/rulesets ${destroot}${prefix}/share/pmd
46    foreach file [glob ${worksrcpath}/lib/*.jar] {
47        xinstall -m 644 ${file} ${destroot}${prefix}/share/pmd/
48    }
49    system "cd ${destroot}${prefix}/share/pmd && ln -s pmd-${version}.jar pmd.jar"
50
51    # Install documentation
52    xinstall -m 755 -d ${destroot}${prefix}/share/doc/pmd
53    file copy ${worksrcpath}/docs ${destroot}${prefix}/share/doc/pmd
54}
Note: See TracBrowser for help on using the repository browser.