Ticket #13418: Portfile

File Portfile, 2.0 KB (added by brennan@…, 16 years ago)

Portfile to build proposed new port groovy-devel

Line 
1# $Id: Portfile 30199 2007-10-22 21:00:27Z jmpp@macports.org $
2
3PortSystem                      1.0
4
5name                            groovy-devel
6version                         1.1-rc-2
7
8categories                      java lang
9maintainers                     openmaintainer
10platforms                       darwin
11
12description                     Groovy -- a Java-based scripting language
13long_description        Groovy is a new agile dynamic language for the JVM combining \
14                                        lots of great features from languages like Python, Ruby and \
15                                        Smalltalk and making them available to Java developers \
16                                        using a Java-like syntax. \
17                                        \
18                                        Groovy is designed to help you get things done on the Java \
19                                        platform in a quicker, more concise and fun way - bringing \
20                                        the power of Python and Ruby inside the Java platform. \
21                                        \
22                                        Groovy can be used as an alternative compiler to javac to \
23                                        generate standard Java bytecode to be used by any Java project \
24                                        or it can be used dynamically as an alternative language such \
25                                        as for scripting Java objects, templating or writing unit test cases.
26homepage                        http://groovy.codehaus.org/
27
28distname                        groovy-src-${version}
29master_sites            http://dist.codehaus.org/groovy/distributions/
30checksums                       md5 07145de6cc2e65b15de6599426e3ff1d
31use_zip                         yes
32
33depends_build           bin:ant:apache-ant \
34                                        bin:maven:maven                                 
35depends_lib                     bin:java:kaffe
36                                       
37use_configure           no
38
39worksrcdir                      groovy-${version}
40
41build.cmd                       ant
42build.target            install -DskipTests=true
43
44destroot {
45        set target ${destroot}${prefix}/share/java/groovy
46       
47        # Create the target java directory
48        xinstall -m 755 -d ${destroot}${prefix}/share/java
49       
50        # Copy in our directory tree
51        file copy ${worksrcpath}/target/install ${target}
52               
53        # Remove .bat files
54        foreach f [glob -directory ${target}/bin *.bat] { file delete $f }
55       
56        # Fix permissions on the scripts,
57        # and at the same time add symlinks to them
58        foreach f { groovy groovyc groovyConsole groovysh startGroovy } {
59                file attributes ${target}/bin/${f} -permissions +x
60                system "cd ${destroot}${prefix}/bin && ln -s ../share/java/groovy/bin/${f}"
61        }
62}