Ticket #32376: Portfile

File Portfile, 2.8 KB (added by mklein-de (Michael Klein), 13 years ago)
Line 
1# $Id: Portfile 126 2011-12-02 22:08:19Z mapo $
2
3PortSystem 1.0
4
5name            x48
6version         0.6.4
7description     HP48 calculator emulator
8categories      emulators math
9maintainers     de.shuttle.lb.puffin:michael.klein openmaintainer
10long_description \
11        This emulator is capable of providing a faithful \
12        replication of the HP48. It also has a debugger for the \
13        saturn processor.
14
15homepage        http://${name}.berlios.de/
16platforms       darwin
17master_sites    http://download.berlios.de/${name} \
18                http://download2.berlios.de/${name}
19use_bzip2       yes
20
21extract.only    ${distname}${extract.suffix}
22
23checksums       ${distname}${extract.suffix} \
24                sha1    dfc82fe84f0c793a5f7b8024127e16d341ad2899 \
25                rmd160  a5d7ddb4eb47426c639941d8cf53926bd3451ef5
26
27livecheck.type  regex
28livecheck.url   http://developer.berlios.de/project/showfiles.php?group_id=3335
29livecheck.regex {x48-(\d+\.\d+\.\d+)\.tar\.bz2}
30
31depends_build   port:autoconf port:automake
32depends_lib     port:xorg-libXext port:readline
33
34worksrcdir      .
35
36set gxrom gxrom-r
37set sxrom sxrom-j
38
39set docdir ${prefix}/share/doc/${name}
40set romdir ${prefix}/share/${name}
41
42default_variants +roms
43
44variant roms description "download and install ROM images" {
45        distfiles-append ${gxrom}.bz2
46        checksums-append ${gxrom}.bz2 \
47                sha1    c60a83cd57681c3cb359f0cd2505ede686fdb4c8 \
48                rmd160  1dafce5902310161cb60f3dde401941565fd031c
49
50        distfiles-append ${sxrom}.bz2
51        checksums-append ${sxrom}.bz2 \
52                sha1    660252ec34357bf0e3c4f2ba78eab3409f1c6fe8 \
53                rmd160  8fb5f6f1284fb2dc15aa5d7603bbe3bfb8f30638
54
55        post-destroot {
56                xinstall -d ${destroot}${romdir}
57                system "bzcat ${distpath}/${gxrom}.bz2 > ${destroot}${romdir}/${gxrom}"
58                system "bzcat ${distpath}/${sxrom}.bz2 > ${destroot}${romdir}/${sxrom}"
59        }
60}
61
62pre-configure {
63        system "cd ${worksrcpath} && ./autogen.sh"
64}
65
66post-destroot {
67        xinstall -d ${destroot}${docdir}
68        copy ${worksrcpath}/README ${destroot}${docdir}
69}
70
71if {[variant_isset roms]} {
72        notes "############################################################################
73# Calculator ROMS have been installed to ${romdir}
74# Execute one of the commands below to initialize the emulator:
75#
76# x48 -initialize -rom ${romdir}/${gxrom}
77# x48 -initialize -rom ${romdir}/${sxrom}
78############################################################################"
79} else {
80        notes "############################################################################
81# No calculator ROMS have been installed. To use this emulator you need to
82# obtain a ROM dump first.
83#
84# Check ${docdir}/README for details
85############################################################################"
86}