[112987] trunk/dports/editors

g5pw at macports.org g5pw at macports.org
Wed Nov 6 05:30:52 PST 2013


Revision: 112987
          https://trac.macports.org/changeset/112987
Author:   g5pw at macports.org
Date:     2013-11-06 05:30:51 -0800 (Wed, 06 Nov 2013)
Log Message:
-----------
editors/frescobaldi:
  new port, #40139

Added Paths:
-----------
    trunk/dports/editors/frescobaldi/
    trunk/dports/editors/frescobaldi/Portfile
    trunk/dports/editors/frescobaldi/files/
    trunk/dports/editors/frescobaldi/files/InfoPlist.strings
    trunk/dports/editors/frescobaldi/files/mac-app.py

Added: trunk/dports/editors/frescobaldi/Portfile
===================================================================
--- trunk/dports/editors/frescobaldi/Portfile	                        (rev 0)
+++ trunk/dports/editors/frescobaldi/Portfile	2013-11-06 13:30:51 UTC (rev 112987)
@@ -0,0 +1,125 @@
+# -*- 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
+# $Id$
+
+PortSystem          1.0
+PortGroup           python 1.0
+PortGroup           github 1.0
+
+github.setup        wbsoft frescobaldi e7e3b25bf83f8a27a4759ee70428eaf8b3810c0c
+version             2.0.11
+conflicts           frescobaldi-devel
+categories          editors python
+maintainers         gmail.com:davide.liessi openmaintainer
+description         A LilyPond sheet music text editor
+long_description    Frescobaldi is a LilyPond sheet music text editor. \
+                    It aims to be powerful, yet lightweight and easy to use.
+homepage            http://www.frescobaldi.org/
+platforms           darwin
+supported_archs     noarch
+license             GPL-2+
+
+checksums           rmd160  4c2b972c20d470d01d13a7e2b5ab37fc032948fb \
+                    sha256  b9ae5263982f39114e8e785474e4e4d80aea54f938bd08e562d0b72b8e3c8c0e
+
+subport frescobaldi-devel {
+    github.setup        wbsoft frescobaldi 2a50b1033695350416fe0c2a2e605a9d74b3265a
+
+    # github.setup also sets 'name frescobaldi', overriding the subport name.
+    # With 'name ${subport}', `port lint frescobaldi-devel` gives the following error:
+    # 'Error: Portfile directory frescobaldi does not match port name frescobaldi-devel'.
+    # With 'set PortInfo(name) ${subport}' (see the definition of 'proc subport' in
+    # portutil.tcl) the Portfile works correctly and the error disappears.
+    global PortInfo
+    set PortInfo(name) ${subport}
+
+    conflicts           frescobaldi
+    version             20131104
+    set dev_version     2.0.12
+
+    checksums           rmd160  a1d45ccde2aa445bc9284dc9a50da973bcb90a3d \
+                        sha256  ccd868a9d019679bc11cdc2dfc41591e861ead50c044bc476189487d54062b7e
+}
+
+build {}
+
+depends_run-append  port:portmidi
+
+variant python26 conflicts python27 description {Use Python 2.6} {
+    python.default_version  26
+    depends_run-append      port:py${python.default_version}-pyqt4 \
+                            port:py${python.default_version}-python-poppler-qt4
+}
+variant python27 conflicts python26 description {Use Python 2.7} {
+    python.default_version  27
+    depends_run-append      port:py${python.default_version}-pyqt4 \
+                            port:py${python.default_version}-python-poppler-qt4
+}
+if {![variant_isset python26]} {
+    default_variants        +python27
+}
+
+variant app description {Make application bundle} {
+    depends_build-append    port:py${python.default_version}-py2app
+}
+default_variants    +app
+
+post-destroot {
+    set share_destroot ${destroot}${prefix}/share
+    set share_python ${python.prefix}/share
+
+    set man_dir /man/man1
+    xinstall -d ${share_destroot}${man_dir}
+    ln -s ${share_python}${man_dir}/frescobaldi.1 ${share_destroot}${man_dir}
+
+    set desktop_dir /applications
+    xinstall -d ${share_destroot}${desktop_dir}
+    ln -s ${share_python}${desktop_dir}/frescobaldi.desktop ${share_destroot}${desktop_dir}
+
+    set icons_dir /icons/hicolor/scalable/apps
+    xinstall -d ${share_destroot}${icons_dir}
+    ln -s ${share_python}${icons_dir}/frescobaldi.svg ${share_destroot}${icons_dir}
+
+    set doc_dir ${share_destroot}/doc/${subport}
+    xinstall -d ${doc_dir}
+    xinstall -m 644 -W ${worksrcpath} \
+        COPYING \
+        ChangeLog \
+        README \
+        THANKS \
+        ${doc_dir}
+
+    if {[variant_isset app]} {
+        if {${name} eq ${subport}} {
+            set bundle_version    ${version}
+        } else {
+            set bundle_version    ${dev_version}-dev-${version}
+        }
+
+        xinstall -m 644 -W ${filespath} mac-app.py ${workpath}
+        reinplace "s|%%VERSION%%|${bundle_version}|g" ${workpath}/mac-app.py
+        reinplace "s|%%PREFIX%%|${prefix}|g" ${workpath}/mac-app.py
+
+        system "cd ${workpath} && ${prefix}/bin/python${python.branch} mac-app.py py2app"
+
+        set app_resources   ${workpath}/dist/Frescobaldi.app/Contents/Resources
+        xinstall -m 644 -W ${worksrcpath}/macosx/icons frescobaldi.icns ${app_resources}
+
+        foreach l {cs de en es fr gl it nl pl pt ru tr uk} {
+            set app_lproj ${app_resources}/${l}.lproj
+            xinstall -d ${app_lproj}
+            xinstall -m 644 -W ${filespath} InfoPlist.strings ${app_lproj}
+        }
+
+        file copy ${workpath}/dist/Frescobaldi.app ${destroot}${applications_dir}
+    }
+}
+
+python.link_binaries_suffix
+
+notes \
+"You may want to install FluidSynth and obtain a SoundFont
+in order to have audio output from Frescobaldi's MIDI output.
+
+You will need to select FluidSynth's MIDI input port
+in Frescobaldi's MIDI settings (in Preferences)
+while FluidSynth is running."


Property changes on: trunk/dports/editors/frescobaldi/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/editors/frescobaldi/files/InfoPlist.strings
===================================================================
--- trunk/dports/editors/frescobaldi/files/InfoPlist.strings	                        (rev 0)
+++ trunk/dports/editors/frescobaldi/files/InfoPlist.strings	2013-11-06 13:30:51 UTC (rev 112987)
@@ -0,0 +1,6 @@
+/* Localized versions of Info.plist keys */
+
+CFBundleName = \"Frescobaldi\";
+CFBundleDisplayName = \"Frescobaldi\";
+
+NSHumanReadableCopyright = \"Copyright © 2008-2012 Wilbert Berendsen.\";

Added: trunk/dports/editors/frescobaldi/files/mac-app.py
===================================================================
--- trunk/dports/editors/frescobaldi/files/mac-app.py	                        (rev 0)
+++ trunk/dports/editors/frescobaldi/files/mac-app.py	2013-11-06 13:30:51 UTC (rev 112987)
@@ -0,0 +1,82 @@
+"""
+A setup file to build Frescobaldi.app with py2app.
+
+Initial version by Henning Hraban Ramm.
+"""
+
+from setuptools import setup
+
+APPNAME = 'frescobaldi'
+APP = ['%%PREFIX%%/bin/{0}'.format(APPNAME)]
+NAME = 'Frescobaldi'
+VERSION = '%%VERSION%%'
+
+plist = dict(
+    CFBundleName                  = NAME,
+    CFBundleDisplayName           = NAME,
+    CFBundleShortVersionString    = VERSION,
+    CFBundleVersion               = VERSION,
+    CFBundleExecutable            = NAME,
+    CFBundleIdentifier            = 'org.{0}.{0}'.format(APPNAME),
+    CFBundleIconFile              = '{0}.icns'.format(APPNAME),
+    NSHumanReadableCopyright      = 'Copyright 2008-2012 Wilbert Berendsen.',
+    CFBundleDocumentTypes         = [
+        {
+            'CFBundleTypeExtensions': ['ly', 'lyi', 'ily'],
+            'CFBundleTypeName':'LilyPond file',
+            'CFBundleTypeRole':'Editor',
+        },
+        {
+            'CFBundleTypeExtensions': ['tex', 'lytex', 'latex'],
+            'CFBundleTypeName':'LaTeX file',
+            'CFBundleTypeRole':'Editor',
+        },
+        {
+            'CFBundleTypeExtensions': ['docbook', 'lyxml'],
+            'CFBundleTypeName':'DocBook file',
+            'CFBundleTypeRole':'Editor',
+        },
+        {
+            'CFBundleTypeExtensions': ['html'],
+            'CFBundleTypeName':'HTML file',
+            'CFBundleTypeRole':'Editor',
+            'LSItemContentTypes': ['public.html']
+        },
+        {
+            'CFBundleTypeExtensions': ['xml'],
+            'CFBundleTypeName':'XML file',
+            'CFBundleTypeRole':'Editor',
+            'LSItemContentTypes': ['public.xml']
+        },
+        {
+            'CFBundleTypeExtensions': ['itely', 'tely', 'texi', 'texinfo'],
+            'CFBundleTypeName':'Texinfo file',
+            'CFBundleTypeRole':'Editor',
+        },
+        {
+            'CFBundleTypeExtensions': ['scm'],
+            'CFBundleTypeName':'Scheme file',
+            'CFBundleTypeRole':'Editor',
+        },
+        {
+            'CFBundleTypeExtensions': ['*'],
+            'CFBundleTypeName':'Text file',
+            'CFBundleTypeRole':'Editor',
+            'LSItemContentTypes': ['public.text']
+        }
+    ]
+)
+
+OPTIONS = {
+    'argv_emulation': True,
+    'semi_standalone': True,
+    'alias': True,
+    'plist': plist,
+}
+
+setup(
+    app=APP,
+    name=NAME,
+    options={'py2app': OPTIONS},
+    setup_requires=['py2app'],
+)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131106/d9d0e541/attachment-0001.html>


More information about the macports-changes mailing list