Ticket #33059: Portfile

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