source: trunk/dports/python/quodlibet/Portfile

Last change on this file was 152087, checked in by elelay@…, 11 months ago

quodlibet upgrade to 3.7.0

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.6 KB
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 152087 2016-08-29 07:00:19Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6PortGroup           app 1.0
7PortGroup           active_variants 1.1
8
9name                quodlibet
10version             3.7.0
11categories-append   audio gnome
12maintainers         elelay openmaintainer
13license             GPL-2
14platforms           darwin
15description         audio library manager and player for GTK+
16
17long_description \
18Quod Libet is a GTK+-based audio player written in Python, \
19using the Mutagen tagging library and GStreamer for playback.\
20It provides several different ways to view your audio library, \
21as well as support for Internet radio and audio feeds.\
22It has extremely flexible metadata tag editing and searching capabilities.
23
24homepage            http://code.google.com/p/quodlibet/
25master_sites        https://bitbucket.org/lazka/quodlibet-files/raw/default/releases
26
27checksums           rmd160  79de656b82175c0817d2667cfe1aa926d172e41c \
28                    sha256  326be5ea5a2033017d2b944f44ee6c488037c976cee904ebcd82adf472f30e81
29
30python.default_version 27
31
32depends_build       port:intltool \
33                    port:librsvg
34depends_lib         port:dbus-python27 \
35                    port:gstreamer1-gst-plugins-good \
36                    port:py27-mutagen \
37                    port:py27-feedparser \
38                    port:py27-gobject3 \
39                    port:py27-pyobjc-cocoa
40
41depends_run         port:gnome-themes-standard
42
43# - patch-ignore_psn.diff
44#   when run as an application, the argument -psn_x_xxxxx is passed to the program
45#   but quodlibet is not prepared to handle it...
46patchfiles          patch-ignore_psn.diff
47
48variant quartz {
49
50    depends_lib-append  port:gtk-osx-application-gtk3
51
52}
53
54post-patch {
55    foreach file { quodlibet.py exfalso.py operon.py } {
56        reinplace "s|/usr/bin/env python2|${frameworks_dir}/Python.framework/Versions/2.7/bin/python2.7|g" \
57            ${worksrcpath}/${file}
58    }
59}
60
61
62post-destroot {
63    # icon keeps bouncing in the dock otherwise
64    if {![variant_isset quartz]} {
65      reinplace -E {s|(<string>APPL</string>)|\1 <key>LSUIElement</key><string>1</string>|} \
66                "${destroot}${applications_dir}/Quodlibet.app/Contents/Info.plist"
67    }
68   
69    # generate nicer icon (no png scaling)
70    # set makeicnsargs {}
71    # foreach w {16 32 128 256 512} {
72        # lappend makeicnsargs -$w ${worksrcpath}/${w}.png
73        #
74        # if {[catch {exec ${prefix}/bin/rsvg-convert -w $w -h $w ${worksrcpath}/${app.icon} > ${worksrcpath}/$w.png }]} {
75            # return -code error "${app.icon} could not be converted to png: $::errorInfo"
76        # }
77    # }
78    # if {[catch {eval exec ${prefix}/bin/makeicns $makeicnsargs -out ${destroot}${applications_dir}/${app.name}.app/Contents/Resources/${app.name}.icns 2>@1}]} {
79        # return -code error "app.icns could not be created: $::errorInfo"
80    # }
81}
82
83# makeicns doesn't know how to generate icns out of svg (rasterizing + making icns)
84# still the app.icon is provided so that makeicns is added as dependency and maybe one day
85# app portgroup will itself rasterize if svg file is given...
86# see https://trac.macports.org/ticket/40109
87app.icon       quodlibet/images/hicolor/scalable/apps/quodlibet.svg
88
89app.executable "${frameworks_dir}/Python.framework/Versions/2.7/bin/quodlibet"
90
91
92notes "If you want to play mp3 files, don't forget to install gstreamer1-gst-plugins-ugly"
93
94livecheck.type      regex
95livecheck.url       https://${name}.readthedocs.org/en/latest/downloads.html
96livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.