Ticket #26074: Portfile.3.diff

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

Correct diff to 0.60

  • (a) Portfile vs. (b) newPortfile

    a b  
    11# $Id$
    22
    33PortSystem          1.0
    4 
     4PortGroup           python 1.0
     5PortGroup           app 1.0
     6               
    57name                zim
    6 version             0.28
    7 revision            1
     8version             0.60
     9platforms           darwin
    810categories          editors
    9 license             {Artistic-1 GPL}
    10 maintainers         nomaintainer
    11 description         Desktop-based wiki
     11maintainers         gabrielbenjamin
     12license             GPLv2
     13description         Personal desktop wiki
    1214long_description \
    13    Zim is a WYSIWYG text editor written in Gtk2-Perl. It aims to bring the \
    14    concept of a wiki to your desktop. Every page is saved as a text file \
    15    with wiki markup. Pages can contain links to other pages, and are saved \
    16    automatically. Creating a new page is as easy as linking to a \
    17    non-existing page. This tool is intended to keep track of TODO lists or \
    18    to serve as a personal scratch book. But it will also serve you when \
    19    writing longer and more complicated documents.
     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.
    2022
    21 platforms           darwin
    22 supported_archs     noarch
    23 
    24 homepage            http://www.zim-wiki.org
     23homepage            http://zim-wiki.org
    2524master_sites        ${homepage}/downloads/
    26 distname            Zim-${version}
     25distname            zim-${version}
     26
     27checksums           rmd160  896facd152cf7403479a2307efe0763d9d2c37fe \
     28                    sha256  1093f7bf0051eda8eaad33f037b03df66b30c24da275d59cedbf8f792011196b
    2729
    28 checksums           md5     fce152562b57d4753edfcdc635a26e42 \
    29                     sha1    c0d1d5ad956ee682f01ecbd89009eb9f0852f34c \
    30                     rmd160  b6ecc7c6f094670754b4219e7506edefd00b2ca1
     30use_configure       no
     31build               {}
    3132
    32 depends_lib         port:p5.12-gtk2 port:p5.12-module-build port:p5.12-file-mimeinfo \
    33                     port:p5.12-file-basedir port:p5.12-file-desktopentry
     33set app.icon        icons/zim48.png
     34set app.executable  ${workpath}/zim-app
     35
     36python.link_binaries    no
     37set python.bindir       ""
     38
     39variant python27 conflicts python26 description {Configure to use Python version 2.7} {
     40    python.default_version 27
     41    set python.bindir   ${python.prefix}/bin
     42    depends_lib-append  port:py27-gobject \
     43                        port:py27-pygtk \
     44                        port:py27-xdg
     45    destroot.destdir-append     --install-data=${prefix} \
     46                                --skip-xdg-cmd
     47}
     48
     49variant python26 conflicts python27 description {Configure to use Python version 2.6} {
     50    python.default_version 26
     51    set python.bindir   ${python.prefix}/bin
     52    depends_lib-append  port:py26-gobject \
     53                        port:py26-gtk \
     54                        port:py26-xdg
     55    destroot.destdir-append     --install-data=${prefix} \
     56                                --skip-xdg-cmd
     57}
     58
     59if {![variant_isset python26] && ![variant_isset python27]} {
     60    default_variants +python27
     61}
     62
     63pre-destroot {
     64    xinstall -m 755 ${filespath}/zim ${destroot}${prefix}/bin
     65    reinplace "s|__PREFIX__|${prefix}|g" ${destroot}${prefix}/bin/zim
     66    reinplace "s|__PYTHON_BINDIR__|${python.bindir}|g" ${destroot}${prefix}/bin/zim
     67    file copy ${filespath}/zim-app ${workpath}/zim-app
     68    reinplace "s|__PREFIX__|${prefix}|g" ${workpath}/zim-app
     69    reinplace "s|__PYTHON_BINDIR__|${python.bindir}|g" ${workpath}/zim-app
     70}
     71
     72post-activate {
     73    exec update-desktop-database
     74    exec update-mime-database ${destroot}${prefix}/share/mime 2> /dev/null
     75}
    3476
    35 configure.cmd       ${prefix}/bin/perl5.12
    36 configure.pre_args  ./Makefile.PL
     77universal_variant   no