Ticket #33058: Portfile

File Portfile, 4.0 KB (added by mklein-de (Michael Klein), 13 years ago)
Line 
1# $Id$
2PortSystem          1.0
3
4name                vice
5version             2.3
6categories          emulators
7maintainers         michael.klein@puffin.lb.shuttle.de openmaintainer
8description         Versatile Commodore Emulator
9license             GPL-2+
10long_description    VICE is an emulator collection which emulates the \
11                    C64, the C64-DTV, the C128, the VIC20, almost all \
12                    PET models, the PLUS4 and the CBM-II (aka C610).
13conflicts           vice-devel
14platforms           darwin
15
16homepage            http://vice-emu.sourceforge.net
17
18master_sites        sourceforge:project/vice-emu/releases
19
20checksums           rmd160  056e48ffedfaecd470892c73b97af89c1e002ff9 \
21                    sha256  b1817c8dce023069d5c15234c2b4da0a152d297ee8ed01f0b361795c4beeb50e
22
23depends_build       port:bison port:flex
24depends_lib         port:libedit port:giflib port:jpeg
25
26configure.args      --disable-ffmpeg --disable-lame
27
28set appdir ${applications_dir}/VICE
29
30variant cocoa conflicts gnome sdl xaw xaw3d description "enables native Cocoa UI on Macs" {
31        configure.args-append --with-cocoa
32}
33
34variant gnome conflicts cocoa sdl xaw xaw3d description "enables GNOME UI support" {
35        depends_lib-append port:gtk2
36        configure.args-append --without-cocoa --enable-gnomeui --disable-bundle
37}
38
39variant sdl conflicts cocoa gnome xaw xaw3d description "enables SDL UI support" {
40        depends_lib-append port:libsdl-framework
41        configure.args-append --without-cocoa --enable-sdlui
42}
43
44variant xaw conflicts cocoa gnome sdl xaw3d description "enables plain Xaw UI" {
45        depends_lib-append port:xorg-libXaw
46        configure.args-append --without-cocoa --with-x --disable-bundle
47}
48
49variant xaw3d conflicts cocoa gnome sdl xaw description "enables Xaw3d UI" {
50        depends_lib-append port:Xaw3d
51        configure.args-append --without-cocoa --with-xaw3d --disable-bundle
52}
53
54variant app_bundle conflicts cocoa sdl description "enable application bundle for Xaw/Xaw3D/Gnome UI variants" {
55        depends_build-append port:platypus
56        configure.args-delete --disable-bundle
57        configure.args-append --enable-bundle
58
59        set appdir ${applications_dir}
60}
61
62variant ffmpeg description "enable FFmpeg library support" {
63        depends_lib-append    port:ffmpeg
64        configure.args-delete --disable-ffmpeg
65        configure.args-append --enable-ffmpeg
66}
67
68variant lame description "enable MP3 export with LAME" {
69        configure.args-delete --disable-lame
70        configure.args-append --enable-lame
71        depends_lib-append    port:lame
72}
73
74default_variants +ffmpeg +lame
75
76if {!([variant_isset gnome] || [variant_isset sdl] || [variant_isset xaw] || [variant_isset xaw3d])} {
77        default_variants +cocoa
78}
79
80post-patch {
81        reinplace "s|/Library/Frameworks/SDL.framework|${frameworks_dir}/SDL.framework|; s|-framework SDL|-F${frameworks_dir} -framework SDL|" ${worksrcpath}/configure
82}
83
84post-build {
85        if {[variant_isset app_bundle] || [variant_isset cocoa] || [variant_isset sdl]} {
86                system "make -C ${worksrcpath} bindist"
87        }
88}
89
90destroot {
91
92        if {[variant_isset app_bundle] || [variant_isset cocoa] || [variant_isset sdl]} {
93                xinstall -d ${destroot}${appdir}
94                eval copy [glob ${worksrcpath}/vice-macosx-*-${version}/*.app] ${destroot}${appdir}
95                foreach tool {c1541 cartconv petcat} {
96                        eval xinstall [glob ${worksrcpath}/vice-macosx-*-${version}/tools/${tool}] ${destroot}${prefix}/bin
97                }
98        } else {
99                set docdir ${prefix}/share/doc/${name}
100                system "make -C ${worksrcpath} DESTDIR=${destroot} install"
101                xinstall -d ${destroot}${docdir}
102                move ${destroot}${prefix}/share/info/vice.pdf ${destroot}${docdir}
103                move ${destroot}${prefix}/share/info/vice.txt ${destroot}${docdir}
104        }
105}
106
107livecheck.type      regex
108livecheck.url       http://sourceforge.net/projects/vice-emu/files/releases
109livecheck.regex     {vice-([0-9.]*)\.tar\.gz}