# -*- 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: Portfile 93025 2012-05-14 06:03:08Z jmr@macports.org $

PortSystem          1.0
PortGroup           cmake 1.0
PortGroup           qt4 1.0

name                lmms
version             0.4.12
categories          multimedia
maintainers         nomaintainer

description         Linux Multimedia Studio
long_description    LMMS is a free cross-platform alternative to commercial programs like FL Studio®, \
                    which allow you to produce music with your computer. This includes the creation of \
                    melodies and beats, the synthesis and mixing of sounds, and arranging of samples. \
                    You can have fun with your MIDI-keyboard and much more, all in a user-friendly and \
                    modern interface.

homepage            http://lmms.sourceforge.net
platforms           darwin
master_sites        sourceforge
#parallel build seems broken :(
use_parallel_build  no
use_bzip2           yes
checksums           md5     0642aba9b6b71d2ed41b44cfde4004f6 \
                    sha1    680495a87517f90a63b58ea052c369c8ab31bb9a \
                    rmd160  534784eca23d653f3cd1ad780c7a4d2c14d223a8

depends_build-append port:pkgconfig
depends_lib-append  port:libsndfile \
                    path:lib/pkgconfig/sdl.pc:libsdl \
                    port:fftw-3-single \
                    port:fluidsynth \
                    port:jack \
                    port:fltk-devel

patchfiles          patch-qt-include.diff \
                    patch-zynaddsubfx-CMakeLists.txt.diff

# Use bundled libsamplerate due to link problems with the external library
configure.args-append -DWANT_SYSTEM_SR=OFF
# Disable VST because it is not supported on OS X
configure.args-append -DWANT_VST=OFF

configure.args-append -DWANT_ALSA=OFF \
                      -DWANT_PULSEAUDIO=OFF \
                      -DWANT_FFTW3F=ON \
                      -DWANT_SDL=ON \
                      -DWANT_OGGVORBIS=ON \
                      -DWANT_STK=OFF \
                      -DWANT_JACK=ON

platform darwin 8 {
    configure.ldflags-append -lpng -lz
}

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