Ticket #23468: Portfile

File Portfile, 2.7 KB (added by jp@…, 15 years ago)
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: Portfile 56036 2009-08-23 16:59:10Z devans@macports.org $
3
4PortSystem 1.0
5PortGroup  xcode 1.0
6
7name            gimp-app
8version         2.6.0
9revision        1
10maintainers     devans
11description     Gimp.app application bundle
12long_description ${description}
13
14categories      aqua graphics
15homepage        http://gimp-app.sourceforge.net/
16
17depends_run     bin:gimp:gimp2
18
19master_sites    sourceforge
20distfiles       ScriptExec.tar.gz \
21                gimp.app.skel.tar.gz
22checksums       ScriptExec.tar.gz md5 fc444a1e18cf2664f29af6ca6ca335ef \
23                gimp.app.skel.tar.gz md5 66ad4912a3c71056c479c8eeef11fd43
24worksrcdir      ScriptExec
25
26pre-patch {
27    foreach f {Info.plist PkgInfo} {
28        delete ${workpath}/Gimp.app/Contents/$f
29        xinstall -m 644 ${filespath}/$f ${workpath}/Gimp.app/Contents
30    }
31    delete ${workpath}/Gimp.app/Contents/Resources/script
32    xinstall -m 755 ${filespath}/script ${workpath}/Gimp.app/Contents/Resources
33    reinplace "s|__VERSION__|${version}|g" ${workpath}/Gimp.app/Contents/Info.plist
34}
35
36patch {
37    reinplace "s|`dirname \\\\\"\$0\\\\\"`|${prefix}|g" \
38        ${workpath}/Gimp.app/Contents/Resources/openDoc \
39        ${workpath}/Gimp.app/Contents/Resources/script
40}
41
42pre-build {
43    # clean up old precompiled headers just in case
44    system "cd ${worksrcpath} && ${xcodebuildcmd} clean"
45}
46
47destroot {
48    xinstall -m 755 \
49        ${workpath}/Gimp.app/Contents/Resources/bin/getdisplay.sh \
50        ${destroot}${prefix}/bin
51}
52post-destroot {
53    foreach f {Gimp.icns bin etc lib share} {
54        delete ${workpath}/Gimp.app/Contents/Resources/$f
55    }
56    xinstall -m 644 -W ${filespath} Gimp.icns xcf.icns \
57        ${workpath}/Gimp.app/Contents/Resources
58
59    xinstall -m 755 \
60        ${worksrcpath}/build/Deployment/ScriptExec.app/Contents/MacOS/ScriptExec \
61        ${workpath}/Gimp.app/Contents/MacOS/Gimp
62
63    xinstall -d ${destroot}${applications_dir}
64    copy ${workpath}/Gimp.app ${destroot}${applications_dir}
65}
66
67post-install {
68    ui_msg "
69    If you are having problems viewing the help files when using Gimp.app,
70            1- Make sure you have the user manual installed (port gimp-user-manual)
71            2- Add the following line to ~/.gimp-2.6/gimprc :
72                (help-locales \"LANG\")
73                        where LANG is your two-letters locale (fr, en, jp, ...)
74    "
75}
76
77variant quartz {
78    patch {}
79    destroot {
80        foreach f {openDoc script} {
81            delete ${workpath}/Gimp.app/Contents/Resources/$f
82            ln -s ${prefix}/bin/gimp \
83                ${workpath}/Gimp.app/Contents/Resources/$f
84        }
85    }
86}
87
88livecheck.regex <title>${name} (\[0-9.\]+).* released.*</title>