Ticket #32376: Portfile.2

File Portfile.2, 2.9 KB (added by mf2k (Frank Schima), 7 years ago)

Here is my updated version of the 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
24#extract.only        ${distname}${extract.suffix}
25
26checksums           ${distname}${extract.suffix} \
27                    sha1    dfc82fe84f0c793a5f7b8024127e16d341ad2899 \
28                    rmd160  a5d7ddb4eb47426c639941d8cf53926bd3451ef5 \
29                    sha256  dd42fb3dfde860abb758f8e6d5ccd01845bbf0dcd808b87786eec3ef7091067f \
30
31depends_build       port:autoconf \
32                    port:automake
33depends_lib         port:readline \
34                    port:xorg-libXext
35
36worksrcdir          .
37
38set gxrom           gxrom-r
39set sxrom           sxrom-j
40
41set docdir          ${prefix}/share/doc/${name}
42set romdir          ${prefix}/share/${name}
43
44pre-configure {
45        system "cd ${worksrcpath} && ./autogen.sh"
46}
47
48post-destroot {
49        xinstall -d ${destroot}${docdir}
50        copy ${worksrcpath}/README ${destroot}${docdir}
51}
52
53default_variants    +roms
54
55variant roms description "download and install ROM images" {
56    distfiles-append ${gxrom}.bz2
57    checksums-append ${gxrom}.bz2 \
58        sha1    c60a83cd57681c3cb359f0cd2505ede686fdb4c8 \
59        rmd160  1dafce5902310161cb60f3dde401941565fd031c \
60        sha256  f89eb7bf979e62db53d436e3218b963c693f66c52797218c01d6552f1bbe014f \
61
62    distfiles-append ${sxrom}.bz2
63    checksums-append ${sxrom}.bz2 \
64        sha1    660252ec34357bf0e3c4f2ba78eab3409f1c6fe8 \
65        rmd160  8fb5f6f1284fb2dc15aa5d7603bbe3bfb8f30638 \
66        sha256  abd7f59cc07dcd22d1ac62bff901172d37e1ea4f01e1afdd099aa4bcf77e14a8
67
68    post-destroot {
69        xinstall -d ${destroot}${romdir}
70        system "bzcat ${distpath}/${gxrom}.bz2 > ${destroot}${romdir}/${gxrom}"
71        system "bzcat ${distpath}/${sxrom}.bz2 > ${destroot}${romdir}/${sxrom}"
72    }
73}
74
75if {[variant_isset roms]} {
76    notes "Calculator ROMS have been installed to ${romdir}
77Execute one of the commands below to initialize the emulator:
78
79x48 -initialize -rom ${romdir}/${gxrom}
80x48 -initialize -rom ${romdir}/${sxrom}
81"
82} else {
83    notes "No calculator ROMS have been installed. To use this emulator you need to
84obtain a ROM dump first.
85
86Check ${docdir}/README for details
87"
88}
89
90livecheck.type  regex
91livecheck.url   http://developer.berlios.de/project/showfiles.php?group_id=3335
92livecheck.regex {x48-(\d+\.\d+\.\d+)\.tar\.bz2}