Ticket #32376: Portfile.3

File Portfile.3, 3.0 KB (added by mklein-de (Michael Klein), 7 years ago)

updated updated Portfile

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