source: trunk/dports/multimedia/lmms/Portfile

Last change on this file was 136280, checked in by ryandesign@…, 2 years ago

lmms: re-fix build with older clang (#35885)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.3 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 136280 2015-05-13 23:59:33Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           cmake 1.0
6PortGroup           github 1.0
7PortGroup           qt4 1.0
8
9github.setup        LMMS lmms 1.1.3 v
10categories          multimedia
11maintainers         ryandesign openmaintainer
12license             GPL-2+
13
14description         Linux Multimedia Studio
15long_description    LMMS is a free cross-platform alternative to commercial programs like FL Studio®, \
16                    which allow you to produce music with your computer. This includes the creation of \
17                    melodies and beats, the synthesis and mixing of sounds, and arranging of samples. \
18                    You can have fun with your MIDI-keyboard and much more, all in a user-friendly and \
19                    modern interface.
20
21homepage            https://lmms.io/
22platforms           darwin
23
24# https://sourceforge.net/p/lmms/bugs/571/
25# This issue tracker has disappeared but this issue still occurs.
26# A new issue tracker has been set up at github.
27use_parallel_build  no
28
29checksums           rmd160  6af06a2bb277d41c4ee8a3bdc85fc30c171cd6c3 \
30                    sha256  c8611be5c259f49cdcaac583bdf9bdd2ffc1f843cd8233ab5bb63c5a720f4910
31
32depends_lib-append  port:fftw-3-single \
33                    path:lib/libfltk.dylib:fltk \
34                    port:fluidsynth \
35                    port:jack \
36                    port:libogg \
37                    port:libsamplerate \
38                    port:libsdl \
39                    port:libsndfile \
40                    port:libvorbis \
41                    port:portaudio \
42                    port:stk
43
44patchfiles          patch-CMakeLists.txt.diff \
45                    patch-cmake-modules-DetectMachine.cmake.diff \
46                    patch-data-lmms.plist.in.diff \
47                    patch-data-scripts-create_apple_bundle.sh.in.diff
48
49post-patch {
50    reinplace "s|@APPLICATIONS_DIR@|${applications_dir}|g" ${worksrcpath}/data/scripts/create_apple_bundle.sh.in
51    reinplace "s|@DESTROOT@|${destroot}|g" ${worksrcpath}/data/scripts/create_apple_bundle.sh.in
52    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/data/scripts/create_apple_bundle.sh.in
53}
54
55# Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn)
56# Undefined symbols: "_waveguide_nl_process", referenced from: _runGong in gong_1424.o, _runAddingGong in gong_1424.o
57configure.cflags-append -std=gnu89
58
59cmake.out_of_source yes
60
61# The build system uses CMAKE_INSTALL_PREFIX in a nonstandard way, both by
62# writing the Info.plist into it during configure and by attempting to copy
63# all items contained in it into the application bundle during destroot. So
64# it must be set to an empty writable directory.
65set target_path         ${workpath}/target
66pre-configure {
67    file mkdir ${target_path}
68}
69configure.pre_args      -DCMAKE_INSTALL_PREFIX=${target_path}
70
71configure.args-append   -DFLTK_FLUID_EXECUTABLE=${prefix}/bin/fluid \
72                        -DSTK_INCLUDE_DIR=${prefix}/include/stk \
73                        -DWANT_ALSA=OFF \
74                        -DWANT_JACK=ON \
75                        -DWANT_OGGVORBIS=ON \
76                        -DWANT_PORTAUDIO=ON \
77                        -DWANT_PULSEAUDIO=OFF \
78                        -DWANT_SDL=ON \
79                        -DWANT_STK=ON \
80                        -DWANT_VST=OFF
81
82configure.args-replace  -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib -DCMAKE_INSTALL_NAME_DIR=${applications_dir}/LMMS.app/Contents/Frameworks
83
84# The build system only partly honors DESTDIR, such that the destroot fails
85# if it is set, and since we've already patched the build system to stage
86# into the destroot, we can just unset it. MacPorts base sets DESTDIR in
87# destroot.destdir, while the qt4 portgroup sets it as an environment variable.
88destroot.destdir
89destroot.env-delete     DESTDIR=${destroot}
90
91post-destroot {
92    ln -s ${applications_dir}/LMMS.app/Contents/MacOS/lmms ${destroot}${prefix}/bin/
93    ln -s ${applications_dir}/LMMS.app/Contents/share/man/man1/lmms.1.gz ${destroot}${prefix}/share/man/man1/
94}
95
96# cmake/modules/DetectMachine.cmake tries to detect bitness but because the
97# build system does not destroot entirely within the destdir, using the
98# muniversal portgroup will be complicated.
99#PortGroup               muniversal 1.0
100universal_variant       no
Note: See TracBrowser for help on using the repository browser.