Ticket #38099: Portfile.2

File Portfile.2, 2.5 KB (added by patrik.andersson.se@…, 11 years ago)

Revised Portfile

Line 
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
2# $Id$
3
4PortSystem          1.0
5PortGroup           kde4 1.1
6
7name                krita
8version             2.6.0
9categories          kde4 graphics
10platforms           darwin
11license             GPL
12maintainers         gmail.com:patrik.andersson.se
13description         Krita ${version} (without Vc)
14long_description    Krita is the full-featured free digital painting studio for \
15                    artists who want to create professional work from start to end. \
16                    Krita is used by comic book artists, illustrators, concept \
17                    artists, matte and texture painters and in the digital VFX \
18                    industry.
19homepage            http://www.krita.org
20master_sites        http://download.kde.org/stable/calligra-latest/\
21                    http://www.patriksmediedesign.se/
22
23checksums           rmd160 b25805f91372295d127be7ef229c3b575c662071 \
24                    sha256 1bc0cd40734baf68a0d79307d0ffbd8e15a4571375a60b1016f0fc8b68c3d2ce
25
26# Some of these are drawn in as dependencies automatically by the kde4 portgroup, but I'll leave them all in anyway just in case
27depends_lib-append  port:kdelibs4 \
28                    port:kde4-runtime \
29                    port:eigen \
30                    port:qt4-mac \
31                    port:cmake \
32                    port:lcms \
33                    port:libpng \
34                    port:exiv2
35
36
37# It would be better to do this by setting configure.args instead
38# The src folder does not contain a configure file to run, therefore this solution.
39configure {
40    system -W ${workpath} "cmake -DCMAKE_INSTALL_PREFIX=${destroot} \
41    ${worksrcpath} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCREATIVEONLY=ON"
42}
43
44# These commands needs to be run, j3 shall be j{n+1} where n is the number of cores
45# I tried withtout them but then it tries to do "make all" and it crashes.
46build {
47    system -W ${workpath} "make -j3"
48}
49
50# Install prefix is set in the configure, therefore a more simple commandline...
51destroot {
52    system -W ${workpath} "make install"
53}
54
55install {
56# export statements removed, they just pointed to placeholders
57# it is necessary to create some kind of path to run the application, perhaps a post-destroot script could do that.
58    system "launchctl load -w /Library/LaunchAgents/org.macports.kdecache.plist"
59    system "launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist"
60    system -W ${workpath} "kbuildsycoca4"
61}