source: trunk/dports/java/mars/Portfile @ 103815

Last change on this file since 103815 was 103815, checked in by ryandesign@…, 7 years ago

mars: new port, version 4.3 (#38320)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1# -*- 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
2# $Id: Portfile 103815 2013-03-08 05:53:45Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                mars
7version             4.3
8set releasedate     Jan2013
9set fileversion     [join [split ${version} .] _]
10revision            0
11categories          java devel
12platforms           darwin
13supported_archs     noarch
14license             MIT
15maintainers         gmx.de:Torsten.Maehne openmaintainer
16
17description         MARS (MIPS Assembler and Runtime Simulator)
18
19long_description    MARS is a lightweight interactive development environment \
20                    (IDE) for programming in MIPS assembly language, intended \
21                    for educational-level use with Patterson and Hennessy's \
22                    Computer Organization and Design.
23
24homepage            http://courses.missouristate.edu/kenvollmar/mars/
25master_sites        ${homepage}MARS_${fileversion}_${releasedate}/
26distname            Mars${fileversion}
27use_zip             yes
28extract.suffix      .jar
29
30checksums           sha1    5a8608ba0a8548d12c035d9817769d86edfa77f8 \
31                    rmd160  21e419cd2cd181e48e651e6beeae88cd4273466f
32
33depends_lib         bin:java:kaffe
34
35use_configure       no
36
37build               {}
38
39destroot {
40    # Install Mars JAR
41    xinstall -m 755 -d ${destroot}${prefix}/share/java
42    xinstall -m 644 -W ${distpath} ${distname}.jar ${destroot}${prefix}/share/java
43   
44    # Install and configure mars command line wrapper
45    xinstall -m 755 ${filespath}/mars.in ${destroot}${prefix}/bin/mars
46    reinplace "s|@MARSJARPATH@|${prefix}/share/java/${distname}.jar|g" ${destroot}${prefix}/bin/mars
47}
48
49# The only reason we extract the zip file is to get the image for the OS X app icon,
50# so we don't need to extract it on other platforms.
51if {${os.platform} != "darwin"} {
52    extract.only
53}
54
55platform darwin {
56    depends_build-append        port:makeicns
57   
58    extract.mkdir               yes
59    pre-extract {
60        extract.post_args-append    images/MarsThumbnail.gif
61    }
62   
63    # Build a nice .app
64    post-destroot {
65        set MarsAppPath ${destroot}${applications_dir}/MARS.app
66        # Build paths
67        xinstall -m 755 -d ${MarsAppPath}/Contents/Resources/Java \
68                           ${MarsAppPath}/Contents/MacOS
69        # Basic package information
70        xinstall -m 644 ${filespath}/PkgInfo ${MarsAppPath}/Contents/PkgInfo
71        xinstall -m 644 ${filespath}/Info.plist.in ${MarsAppPath}/Contents/Info.plist
72        # Set the version in the Info.plist
73        reinplace "s|@VERSION@|${version}|g" ${MarsAppPath}/Contents/Info.plist
74        # Set the JAR file name
75        reinplace "s|@MARSJARFILE@|${distname}.jar|g" ${MarsAppPath}/Contents/Info.plist
76        # Generate the icon
77        system "${prefix}/bin/makeicns -in ${worksrcpath}/images/MarsThumbnail.gif -out ${MarsAppPath}/Contents/Resources/Mars.icns"
78        # Link to the JAR file
79        ln -s ${prefix}/share/java/${distname}.jar \
80                        ${MarsAppPath}/Contents/Resources/Java/${distname}.jar
81        # Copy the stub app
82        xinstall -m 755 "/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/MacOS/JavaApplicationStub" \
83                        ${MarsAppPath}/Contents/MacOS
84    }
85}
Note: See TracBrowser for help on using the repository browser.