Ticket #26074: Portfile.2

File Portfile.2, 2.6 KB (added by burkhard@…, 12 years ago)
Line 
1# $Id$
2
3PortSystem          1.0
4PortGroup           python 1.0
5PortGroup           app 1.0
6               
7name                zim
8version             0.56
9platforms           darwin
10categories          editors
11maintainers         ualberta.ca:burkhard
12license             GPLv2
13description         Personal desktop wiki
14long_description \
15    Zim is a graphical text editor used to maintain a collection of wiki pages. \
16    Each page can contain links to other pages, simple formatting and images. \
17    Pages are stored in a folder structure, like in an outliner, and can have \
18    attachments. Creating a new page is as easy as linking to a nonexistent \
19    page. All data is stored in plain text files with wiki formatting. Various \
20    plugins provide additional functionality, like a task list manager, an \
21    equation editor, a tray icon, and support for version control.
22
23homepage            http://zim-wiki.org
24master_sites        ${homepage}/downloads
25
26checksums           sha256  a4708a0e1f63a4b51ace7460d9324dc806b5b0221b51c1c821a24fdf5deaf1da
27
28use_configure       no
29build               {}
30
31set app.icon        icons/zim48.png
32set app.executable  ${workpath}/zim-app
33
34python.link_binaries    no
35set python.bindir       ""
36
37variant python27 conflicts python26 description {Configure to use Python version 2.7} {
38    python.default_version 27
39    set python.bindir   ${python.prefix}/bin
40    depends_lib-append  port:py27-gobject \
41                        port:py27-gtk \
42                        port:py27-xdg
43    destroot.destdir-append     --install-data=${prefix} \
44                                --skip-xdg-cmd
45}
46
47variant python26 conflicts python27 description {Configure to use Python version 2.6} {
48    python.default_version 26
49    set python.bindir   ${python.prefix}/bin
50    depends_lib-append  port:py26-gobject \
51                        port:py26-gtk \
52                        port:py26-xdg
53    destroot.destdir-append     --install-data=${prefix} \
54                                --skip-xdg-cmd
55}
56
57if {![variant_isset python26] && ![variant_isset python27]} {
58    default_variants +python27
59}
60
61pre-destroot {
62    xinstall -m 755 ${filespath}/zim ${destroot}${prefix}/bin
63    reinplace "s|__PREFIX__|${prefix}|g" ${destroot}${prefix}/bin/zim
64    reinplace "s|__PYTHON_BINDIR__|${python.bindir}|g" ${destroot}${prefix}/bin/zim
65    file copy ${filespath}/zim-app ${workpath}/zim-app
66    reinplace "s|__PREFIX__|${prefix}|g" ${workpath}/zim-app
67    reinplace "s|__PYTHON_BINDIR__|${python.bindir}|g" ${workpath}/zim-app
68}
69
70post-activate {
71    exec update-desktop-database
72    exec update-mime-database ${destroot}${prefix}/share/mime 2> /dev/null
73}
74
75universal_variant   no