# -*- 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

PortSystem          1.0

name                solfege
version             3.22.2
revision            0
checksums           rmd160  35f3a7adbf30c95552e9f62ca8bc06d8f3f71065 \
                    sha256  e46a0960c83e4998d9dcf7bb07b8269e03fc81fab6c4485f8112c5a3e6488fe4 \
                    size    6890977

categories          audio education python
maintainers         nomaintainer

description         Ear training software
license             GPL-3
long_description    Solfege is a free eartraining program. The program is part \
                    of the GNU Project. One of the ideas of this program is \
                    that you can extend the program without having to dig into \
                    the source code. If you want to practise some special \
                    chords or want to practise dictation with some music not \
                    included, you can write lesson files and put them into a \
                    lessonfiles subdirectory in your home directory.

supported_archs     noarch

# Solfege fails to load its icon without librsvg; it should be a dependency of
# gdk-pixbuf2, but can't be because it would create a cycle. Add it here
# instead.
depends_lib         port:py27-pygtk \
                    path:lib/pkgconfig/librsvg-2.0.pc:librsvg

depends_build       port:texinfo \
                    port:pkgconfig
depends_run         port:qtplay

homepage            https://www.gnu.org/software/solfege/
master_sites        sourceforge:project/solfege/solfege-stable/${version} \
                    gnu

patchfiles          patch-default-config.diff \
                    patch-Makefile.in-avoid-cp-parents.diff

post-patch {
    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/default.config
}

configure.python    ${prefix}/bin/python2.7
configure.pkg_config_path   ${frameworks_dir}/Python.framework/Versions/2.7/lib/pkgconfig/

livecheck.type      regex
livecheck.url       http://sourceforge.net/projects/${name}/files/
livecheck.regex     /${name}-(\[0-9.\]+)${extract.suffix}
