Ticket #38099: Portfile.diff

File Portfile.diff, 4.4 KB (added by cooljeanius (Eric Gallager), 12 years ago)

diff for the portfile author to apply to his portfile

  • /opt/local/var/macports/sources/LocalPorts/kde4/krita/Portfile

    old new  
     1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
    12# $Id$
    23
    34PortSystem          1.0
     5PortGroup           kde4 1.1
    46
    57name                krita
    68version             2.6.0
    7 categories          kde4
     9categories          kde4 graphics
    810platforms           darwin
    9 license                         GPL
     11license             GPL
    1012maintainers         gmail.com:patrik.andersson.se
    11 description             Krita 2.6.0 (without Vc)
     13description         Krita ${version} (without Vc)
    1214long_description    Krita is the full-featured free digital painting studio for \
    1315                    artists who want to create professional work from start to end. \
    1416                    Krita is used by comic book artists, illustrators, concept \
    1517                    artists, matte and texture painters and in the digital VFX \
    1618                    industry.
    17 homepage                        http://www.krita.org
     19homepage            http://www.krita.org
    1820master_sites        http://download.kde.org/stable/calligra-latest/
    1921
    20 checksums                       rmd160 579752fd844b7064f4386f22c7a36d02ee615fda \
    21                                         sha256 77e1257588856bf4b3924672c847c3c766e8d8819c23017ea24e141e4e9051cf
     22checksums           rmd160 579752fd844b7064f4386f22c7a36d02ee615fda \
     23                    sha256 77e1257588856bf4b3924672c847c3c766e8d8819c23017ea24e141e4e9051cf
    2224
    23 depends_lib                     port:kdelibs4 \
    24                                         port:kde4-runtime \
    25                                         port:eigen \
    26                                         port:qt4-mac \
    27                                         port:cmake \
    28                                         port:lcms \
    29                                         port:libpng \
    30                                         port:exiv2
     25# Some of these are drawn in as dependencies automatically by the kde4 portgroup, but I'll leave them all in anyway just in case
     26depends_lib-append  port:kdelibs4 \
     27                    port:kde4-runtime \
     28                    port:eigen \
     29                    port:qt4-mac \
     30                    port:cmake \
     31                    port:lcms \
     32                    port:libpng \
     33                    port:exiv2
    3134
     35# This is probably a bad idea; you should probably just let MacPorts extract into the normal spot
     36# However, I'll let it be in case you have a good reason for doing it this way.
    3237extract {
    33         mkdir -p $HOME/kde4/src
    34         mkdir -p $HOME/kde4/build
    35         mkdir -p $HOME/kde4/inst
    36         mkdir -p $HOME/kde4/build/calligra
    37         mv ${distfiles} $HOME/kde4/src/${distfiles}
    38         cd $HOME/kde4/src/calligra
    39         tar -x ${distfiles}
    40         cd calligra
     38    system "mkdir -p $HOME/kde4/src"
     39    system "mkdir -p $HOME/kde4/build"
     40    system "mkdir -p $HOME/kde4/inst"
     41    system "mkdir -p $HOME/kde4/build/calligra"
     42    system "mv ${distfiles} $HOME/kde4/src/${distfiles}"
     43    system "cd $HOME/kde4/src/calligra"
     44    system "tar -x ${distfiles}"
     45    system "cd calligra"
    4146}
    4247
     48# It would be better to do this by setting configure.args instead
    4349configure {
    44         cmake -DCMAKE_INSTALL_PREFIX=$HOME/kde4/inst $HOME/kde4/src/calligra \
    45       -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCREATIVEONLY=ON
     50    system -W $HOME/kde4/src/calligra "cmake -DCMAKE_INSTALL_PREFIX=$HOME/kde4/inst \
     51    $HOME/kde4/src/calligra -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCREATIVEONLY=ON"
    4652}
    4753
     54# It would be better to do this part with build.args, seeing as "make" is already the default build.cmd
    4855build {
    49         make -j3
     56    system -W $HOME/kde4/src/calligra "make -j3"
    5057}
    5158
    52 test {}
     59# Putting this because of your use of $HOME
     60destroot.violate_mtree yes
    5361
    5462destroot {
    5563}
    5664
    5765install {
    58         make install
    59         export KDEDIRS=/path/to/install:$KDEDIRS
    60         export PATH=/path/to/install/bin:$PATH
    61         export KDEHOME=/path/to/a/config/dir
    62         launchctl load -w /Library/LaunchAgents/org.macports.kdecache.plist
    63         launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
    64         kbuildsycoca4
     66# "make install" would normally be run during the destroot step; I'm not sure why you're skipping that
     67    system "make install"
     68# export statements removed, they just pointed to placeholders
     69    system "launchctl load -w /Library/LaunchAgents/org.macports.kdecache.plist"
     70    system "launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist"
     71    system "kbuildsycoca4"
    6572}
    6673
     74# This is probably a bad idea, too. Although I can see why you're doing it,
     75# since you're installing stuff directly instead of archiving it from the destroot.
     76# (It's still a bad idea though)
    6777activate {}
    6878
    6979