Ticket #26074: Portfile.diff.2

File Portfile.diff.2, 4.2 KB (added by gabriel.ben.jamin@…, 10 years ago)

Diff to a current Portfile

Line 
1--- Portfile.old        2014-04-28 00:00:28.000000000 -0400
2+++ Portfile    2014-04-27 21:15:42.000000000 -0400
3@@ -1,36 +1,77 @@
4-# $Id: Portfile 103278 2013-02-20 03:51:22Z jmr@macports.org $
5+# $Id$
6 
7 PortSystem          1.0
8-
9+PortGroup           python 1.0
10+PortGroup           app 1.0
11+               
12 name                zim
13-version             0.28
14-revision            1
15+version             0.59
16+platforms           darwin
17 categories          editors
18-license             {Artistic-1 GPL}
19-maintainers         nomaintainer
20-description         Desktop-based wiki
21+maintainers         gabrielbenjamin
22+license             GPLv2
23+description         Personal desktop wiki
24 long_description \
25-   Zim is a WYSIWYG text editor written in Gtk2-Perl. It aims to bring the \
26-   concept of a wiki to your desktop. Every page is saved as a text file \
27-   with wiki markup. Pages can contain links to other pages, and are saved \
28-   automatically. Creating a new page is as easy as linking to a \
29-   non-existing page. This tool is intended to keep track of TODO lists or \
30-   to serve as a personal scratch book. But it will also serve you when \
31-   writing longer and more complicated documents.
32+    Zim is a graphical text editor used to maintain a collection of wiki pages. \
33+    Each page can contain links to other pages, simple formatting and images. \
34+    Pages are stored in a folder structure, like in an outliner, and can have \
35+    attachments. Creating a new page is as easy as linking to a nonexistent \
36+    page. All data is stored in plain text files with wiki formatting. Various \
37+    plugins provide additional functionality, like a task list manager, an \
38+    equation editor, a tray icon, and support for version control.
39 
40-platforms           darwin
41-supported_archs     noarch
42-
43-homepage            http://www.zim-wiki.org
44+homepage            http://zim-wiki.org
45 master_sites        ${homepage}/downloads/
46-distname            Zim-${version}
47+distname            zim-${version}
48+
49+checksums           rmd160  896facd152cf7403479a2307efe0763d9d2c37fe \
50+                    sha256  1093f7bf0051eda8eaad33f037b03df66b30c24da275d59cedbf8f792011196b
51 
52-checksums           md5     fce152562b57d4753edfcdc635a26e42 \
53-                    sha1    c0d1d5ad956ee682f01ecbd89009eb9f0852f34c \
54-                    rmd160  b6ecc7c6f094670754b4219e7506edefd00b2ca1
55+use_configure       no
56+build               {}
57 
58-depends_lib         port:p5.12-gtk2 port:p5.12-module-build port:p5.12-file-mimeinfo \
59-                    port:p5.12-file-basedir port:p5.12-file-desktopentry
60+set app.icon        icons/zim48.png
61+set app.executable  ${workpath}/zim-app
62+
63+python.link_binaries    no
64+set python.bindir       ""
65+
66+variant python27 conflicts python26 description {Configure to use Python version 2.7} {
67+    python.default_version 27
68+    set python.bindir   ${python.prefix}/bin
69+    depends_lib-append  port:py27-gobject \
70+                        port:py27-pygtk \
71+                        port:py27-xdg
72+    destroot.destdir-append     --install-data=${prefix} \
73+                                --skip-xdg-cmd
74+}
75+
76+variant python26 conflicts python27 description {Configure to use Python version 2.6} {
77+    python.default_version 26
78+    set python.bindir   ${python.prefix}/bin
79+    depends_lib-append  port:py26-gobject \
80+                        port:py26-gtk \
81+                        port:py26-xdg
82+    destroot.destdir-append     --install-data=${prefix} \
83+                                --skip-xdg-cmd
84+}
85+
86+if {![variant_isset python26] && ![variant_isset python27]} {
87+    default_variants +python27
88+}
89+
90+pre-destroot {
91+    xinstall -m 755 ${filespath}/zim ${destroot}${prefix}/bin
92+    reinplace "s|__PREFIX__|${prefix}|g" ${destroot}${prefix}/bin/zim
93+    reinplace "s|__PYTHON_BINDIR__|${python.bindir}|g" ${destroot}${prefix}/bin/zim
94+    file copy ${filespath}/zim-app ${workpath}/zim-app
95+    reinplace "s|__PREFIX__|${prefix}|g" ${workpath}/zim-app
96+    reinplace "s|__PYTHON_BINDIR__|${python.bindir}|g" ${workpath}/zim-app
97+}
98+
99+post-activate {
100+    exec update-desktop-database
101+    exec update-mime-database ${destroot}${prefix}/share/mime 2> /dev/null
102+}
103 
104-configure.cmd       ${prefix}/bin/perl5.12
105-configure.pre_args  ./Makefile.PL
106+universal_variant   no