Ticket #58588: Portfile

File Portfile, 2.1 KB (added by kjyv (Stefan Bethge), 5 years ago)

updated Portfile

Line 
1# $Id$
2
3PortSystem          1.0
4PortGroup           python 1.0
5PortGroup           app 1.0
6
7name                zim
8version             0.71.1
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 acaf8f2b7a2bae1eee1bae46ebdb9d90c1d0a3f74069bf695570d2b92e87fc34
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 python36 description {Configure to use Python version 3.6} {
38    python.default_version 36
39    set python.bindir   ${python.prefix}/bin
40    depends_lib-append  port:py36-gobject3 \
41                        port:py36-xdg \
42                        port:xdg-utils
43    destroot.destdir-append     --install-data=${prefix}
44}
45
46default_variants +python36
47
48pre-destroot {
49    xinstall -m 755 ${filespath}/zim ${destroot}${prefix}/bin
50    reinplace "s|__PREFIX__|${prefix}|g" ${destroot}${prefix}/bin/zim
51    reinplace "s|__PYTHON_BINDIR__|${python.bindir}|g" ${destroot}${prefix}/bin/zim
52    file copy ${filespath}/zim-app ${workpath}/zim-app
53    reinplace "s|__PREFIX__|${prefix}|g" ${workpath}/zim-app
54    reinplace "s|__PYTHON_BINDIR__|${python.bindir}|g" ${workpath}/zim-app
55}
56
57post-activate {
58    exec update-desktop-database
59    exec update-mime-database ${destroot}${prefix}/share/mime 2> /dev/null
60}
61
62universal_variant   no