Skip to content
Permalink
Browse files

lmms: update to 1.0.0; add dependencies; use app portgroup

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@118213 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
ryandesign committed Mar 25, 2014
1 parent 3ff7090 commit c6dcc020d3bd8a254343d686a6f3f0a58b22b1a7
@@ -2,14 +2,15 @@
# $Id$

PortSystem 1.0
PortGroup app 1.0
PortGroup cmake 1.0
PortGroup qt4 1.0

# cmake/modules/DetectMachine.cmake tries to detect bitness
PortGroup muniversal 1.0

name lmms
version 0.4.15
version 1.0.0
categories multimedia
maintainers ryandesign openmaintainer
license GPL-2+
@@ -24,23 +25,32 @@ long_description LMMS is a free cross-platform alternative to commercial prog
homepage http://lmms.sourceforge.net
platforms darwin
master_sites sourceforge:project/lmms/lmms/${version}
use_bzip2 yes
distfiles ${name}-${version}-src${extract.suffix}

# https://sourceforge.net/p/lmms/bugs/571/
use_parallel_build no
use_bzip2 yes

checksums rmd160 d660769cda53e0d6ca15f2e578478e8f27dbb851 \
sha256 0104caaea8adf7b51b0fc4ff2ab26364d1da5751a8fcbf6772704c8ef57a020b
checksums rmd160 4cee3b94ad70f297067b0572424a350e6f2a85fc \
sha256 4949cac86ef311165bf75bc66ce3862e26c72d313809d924c932741d2421e7b5

depends_lib-append port:libsndfile \
port:libsdl \
port:portaudio \
port:fftw-3-single \
depends_lib-append port:fftw-3-single \
path:lib/libfltk.dylib:fltk \
port:fluidsynth \
port:jack \
path:lib/libfltk.dylib:fltk
port:libogg \
port:libsamplerate \
port:libsdl \
port:libsndfile \
port:libvorbis \
port:portaudio \
port:pulseaudio \
port:xorg-libXext

patchfiles patch-plugins-zynaddsubfx-CMakeLists.txt.diff \
patchfiles patch-CMakeLists.txt \
patch-plugins-dynamics_processor-dynamics_processor.cpp.diff \
patch-plugins-LadspaEffect-calf-CMakeLists.txt.diff \
patch-plugins-zynaddsubfx-CMakeLists.txt.diff \
patch-plugins-zynaddsubfx-ZynAddSubFx.cpp.diff

# https://sourceforge.net/p/lmms/bugs/487/
@@ -49,17 +59,17 @@ configure.cflags-append -std=gnu89
# This project has buggy C++ code
compiler.blacklist *clang*

# 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_JACK=ON \
-DWANT_OGGVORBIS=ON \
-DWANT_PORTAUDIO=ON \
-DWANT_PULSEAUDIO=ON \
-DWANT_SDL=ON \
-DWANT_STK=OFF \
-DWANT_VST=OFF

configure.args-append -DWANT_ALSA=OFF \
-DWANT_PULSEAUDIO=OFF \
-DWANT_SDL=ON \
-DWANT_OGGVORBIS=ON \
-DWANT_STK=OFF \
-DWANT_JACK=ON
app.name LMMS
app.icon ${worksrcpath}/data/lmms.png

platform darwin 8 {
configure.ldflags-append -lpng -lz
@@ -0,0 +1,11 @@
--- CMakeLists.txt.orig 2014-03-23 18:00:39.000000000 -0500
+++ CMakeLists.txt 2014-03-25 15:55:22.000000000 -0500
@@ -307,7 +307,7 @@
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/plugins/zynaddsubfx/zynaddsubfx.rc.in" "${CMAKE_BINARY_DIR}/plugins/zynaddsubfx/zynaddsubfx.rc")

# set compiler flags
-SET(WERROR_FLAGS "-Wall -Werror -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow")
+SET(WERROR_FLAGS "-Wall -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow")
SET(CMAKE_C_FLAGS "-O2 -g ${WERROR_FLAGS} ${CMAKE_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "-O2 -g -fno-exceptions ${WERROR_FLAGS} ${CMAKE_CXX_FLAGS}")
set(CMAKE_C_FLAGS_DEBUG "-DLMMS_DEBUG")
@@ -0,0 +1,15 @@
--- plugins/LadspaEffect/calf/CMakeLists.txt.orig 2014-03-23 18:00:39.000000000 -0500
+++ plugins/LadspaEffect/calf/CMakeLists.txt 2014-03-25 16:36:57.000000000 -0500
@@ -10,7 +10,11 @@
IF(NOT LMMS_BUILD_APPLE)
SET(INLINE_FLAGS "-finline-functions-called-once")
ENDIF(NOT LMMS_BUILD_APPLE)
-SET_TARGET_PROPERTIES(calf PROPERTIES COMPILE_FLAGS "-O2 -finline-limit=80 -finline-functions ${INLINE_FLAGS}")
+SET(INLINE_FLAGS2 "")
+if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+SET(INLINE_FLAGS2 "-finline-limit=80")
+ENDIF(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+SET_TARGET_PROPERTIES(calf PROPERTIES COMPILE_FLAGS "-O2 ${INLINE_FLAGS2} -finline-functions ${INLINE_FLAGS}")

IF(LMMS_BUILD_WIN32)
ADD_CUSTOM_COMMAND(TARGET calf POST_BUILD COMMAND "${STRIP}" "\"${CMAKE_CURRENT_BINARY_DIR}/calf.dll\"")
@@ -0,0 +1,11 @@
--- plugins/dynamics_processor/dynamics_processor.cpp.orig 2014-03-23 18:00:39.000000000 -0500
+++ plugins/dynamics_processor/dynamics_processor.cpp 2014-03-25 16:03:36.000000000 -0500
@@ -28,7 +28,7 @@
#include <math.h>
#include "embed.cpp"

-#ifdef LMMS_BUILD_WIN32
+#if defined (LMMS_BUILD_WIN32) || defined (LMMS_BUILD_APPLE)
#ifndef isnanf
#define isnanf(x) isnan(x)
#endif
@@ -1,41 +1,10 @@
--- plugins/zynaddsubfx/CMakeLists.txt.orig 2013-06-11 15:57:16.000000000 -0500
+++ plugins/zynaddsubfx/CMakeLists.txt 2013-12-17 22:11:14.000000000 -0600
--- plugins/zynaddsubfx/CMakeLists.txt.orig 2014-03-23 18:00:39.000000000 -0500
+++ plugins/zynaddsubfx/CMakeLists.txt 2014-03-25 15:46:36.000000000 -0500
@@ -21,6 +21,7 @@
${CMAKE_CURRENT_SOURCE_DIR}/src/UI/BankUI.cc
"${CMAKE_CURRENT_SOURCE_DIR}/src/UI/BankUI.cc"
)

+SET(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${PLUGIN_DIR}")

# definitions for ZynAddSubFX
IF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE)
@@ -45,7 +46,7 @@
ADD_DEFINITIONS(-DPTW32_STATIC_LIB)
ENDIF(LMMS_BUILD_WIN32)

-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/fltk/ ${CMAKE_CURRENT_SOURCE_DIR} ${FFTW3F_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} )
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${FFTW3F_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} )

set(ZASF_CORE_LIBS
zynaddsubfx_input
@@ -98,7 +99,7 @@
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
ADD_EXECUTABLE(RemoteZynAddSubFx RemoteZynAddSubFx.cpp ${ZYN_SRC_GUI} ${WINRC})
INSTALL(TARGETS RemoteZynAddSubFx RUNTIME DESTINATION ${PLUGIN_DIR})
-TARGET_LINK_LIBRARIES(RemoteZynAddSubFx -lpthread -L${CMAKE_CURRENT_BINARY_DIR} -lZynAddSubFxCore ${CMAKE_CURRENT_BINARY_DIR}/fltk/lib/libfltk.a)
+TARGET_LINK_LIBRARIES(RemoteZynAddSubFx -lpthread -L${CMAKE_CURRENT_BINARY_DIR} -lZynAddSubFxCore -lfltk)
ADD_DEPENDENCIES(RemoteZynAddSubFx ZynAddSubFxCore)

# link system libraries when on win32
@@ -119,12 +120,3 @@
ADD_CUSTOM_COMMAND(TARGET RemoteZynAddSubFx POST_BUILD COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/RemoteZynAddSubFx.exe)
ENDIF(LMMS_BUILD_WIN32)

-# build FLTK
-IF(LMMS_BUILD_WIN64)
- SET(FLTK_EXTRA_FLAGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/modules/Win64Toolchain.cmake")
-ELSEIF(LMMS_BUILD_WIN32)
- SET(FLTK_EXTRA_FLAGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/modules/Win32Toolchain.cmake")
-ENDIF(LMMS_BUILD_WIN64)
-ADD_CUSTOM_TARGET(libfltk COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/fltk && cd ${CMAKE_CURRENT_BINARY_DIR}/fltk && ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}/fltk ${FLTK_EXTRA_FLAGS} -DCMAKE_MODULE_PATH=${CMAKE_SOURCE_DIR}/cmake/modules/ -DFLTK_USE_SYSTEM_ZLIB:BOOL=ON -DFLTK_USE_SYSTEM_JPEG:BOOL=ON -DFLTK_USE_SYSTEM_PNG:BOOL=ON -DOPTION_BUILD_EXAMPLES:BOOL=OFF -DCMAKE_BUILD_TYPE=release && ${CMAKE_BUILD_TOOL})
-
-ADD_DEPENDENCIES(RemoteZynAddSubFx libfltk)

0 comments on commit c6dcc02

Please sign in to comment.
You can’t perform that action at this time.