Ticket #40139: Portfile.7

File Portfile.7, 4.7 KB (added by dliessi (Davide Liessi), 11 years ago)

oops, remove forgotten conflicts line

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           python 1.0
6PortGroup           github 1.0
7
8github.setup        wbsoft frescobaldi 2.0.11 v
9categories          editors python
10maintainers         gmail.com:davide.liessi openmaintainer
11description         A LilyPond sheet music text editor
12long_description    Frescobaldi is a LilyPond sheet music text editor. \
13                    It aims to be powerful, yet lightweight and easy to use.
14homepage            http://www.frescobaldi.org/
15platforms           darwin
16supported_archs     noarch
17license             GPL-2+
18
19checksums           rmd160  5033eef310d5b68de3951cf07517416436f47cb7 \
20                    sha256  478177a1292e1232df7fb11cae3a28e67af2186191ad1f976e390029e331139c
21
22build {}
23
24depends_run-append  port:portmidi
25
26variant python26 conflicts python27 description {Use Python 2.6} {
27    python.default_version  26
28    depends_run-append      port:py${python.default_version}-pyqt4 \
29                            port:py${python.default_version}-python-poppler-qt4
30}
31variant python27 conflicts python26 description {Use Python 2.7} {
32    python.default_version  27
33    depends_run-append      port:py${python.default_version}-pyqt4 \
34                            port:py${python.default_version}-python-poppler-qt4
35}
36if {![variant_isset python26]} {
37    default_variants        +python27
38}
39
40variant app description {Make application bundle} {
41    depends_build-append    port:py${python.default_version}-cx_Freeze
42}
43default_variants    +app
44
45post-destroot {
46    set share_destroot ${destroot}${prefix}/share
47    set share_python ${python.prefix}/share
48
49    set man_dir /man/man1
50    xinstall -d ${share_destroot}${man_dir}
51    ln -s ${share_python}${man_dir}/frescobaldi.1 ${share_destroot}${man_dir}
52
53    set desktop_dir /applications
54    xinstall -d ${share_destroot}${desktop_dir}
55    ln -s ${share_python}${desktop_dir}/frescobaldi.desktop ${share_destroot}${desktop_dir}
56
57    set icons_dir /icons/hicolor/scalable/apps
58    xinstall -d ${share_destroot}${icons_dir}
59    ln -s ${share_python}${icons_dir}/frescobaldi.svg ${share_destroot}${icons_dir}
60
61    set doc_dir ${share_destroot}/doc/${subport}
62    xinstall -d ${doc_dir}
63    xinstall -m 644 -W ${worksrcpath} \
64        COPYING \
65        ChangeLog \
66        README \
67        THANKS \
68        ${doc_dir}
69
70    if {[variant_isset app]} {
71        set app_contents    ${destroot}${applications_dir}/Frescobaldi.app/Contents
72        set app_macos       ${app_contents}/MacOS
73        set app_resources   ${app_contents}/Resources
74
75        set infopliststrings \
76"/* Localized versions of Info.plist keys */
77
78CFBundleName = \"Frescobaldi\";
79CFBundleDisplayName = \"Frescobaldi\";
80
81NSHumanReadableCopyright = \"Copyright © 2008-2012 Wilbert Berendsen.\";
82"
83        foreach l {cs de en es fr gl it nl pl pt ru tr uk} {
84            set app_lproj ${app_resources}/${l}.lproj
85            xinstall -d ${app_lproj}
86            set fileID [ open "${app_lproj}/InfoPlist.strings" "w" ]
87            puts -nonewline ${fileID} ${infopliststrings}
88            close ${fileID}
89        }
90
91        set infoplist \
92"<?xml version=\"1.0\" encoding=\"UTF-8\"?>
93<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
94<plist version=\"1.0\">
95<dict>
96    <key>CFBundlePackageType</key>
97    <string>APPL</string>
98    <key>CFBundleIdentifier</key>
99    <string>org.frescobaldi.frescobaldi</string>
100    <key>CFBundleSignature</key>
101    <string>????</string>
102    <key>CFBundleExecutable</key>
103    <string>Frescobaldi</string>
104    <key>CFBundleDisplayName</key>
105    <string>Frescobaldi</string>
106    <key>CFBundleVersion</key>
107    <string>${version}</string>
108    <key>CFBundleName</key>
109    <string>Frescobaldi</string>
110    <key>CFBundleIconFile</key>
111    <string>frescobaldi.icns</string>
112    <key>NSHumanReadableCopyright</key>
113    <string>Copyright © 2008-2012 Wilbert Berendsen.</string>
114</dict>
115</plist>
116"
117        set fileID [ open "${app_contents}/Info.plist" "w" ]
118        puts -nonewline ${fileID} ${infoplist}
119        close ${fileID}
120
121        xinstall -d ${app_macos}
122        exec ${prefix}/bin/cxfreeze-${python.branch} \
123            ${destroot}${python.prefix}/bin/frescobaldi \
124            --target-dir ${app_macos} --no-copy-deps --target-name Frescobaldi
125
126        xinstall -m 644 -W ${filespath} frescobaldi.icns ${app_resources}
127    }
128}
129
130python.link_binaries_suffix
131
132notes \
133"You may want to install FluidSynth and obtain a SoundFont
134in order to have audio output from Frescobaldi's MIDI output.
135
136You will need to select FluidSynth's MIDI input port
137in Frescobaldi's MIDI settings (in Preferences)
138while FluidSynth is running."