Commit aa8c6f4a authored by Daniele's avatar Daniele
Browse files

Rebuilding zynaddsubfx with fltk, adding Gentoo patches to make it link.

parent d72110c3
......@@ -3,26 +3,42 @@
_pkgname=ZynAddSubFX
pkgname=zynaddsubfx
pkgver=2.4.1
pkgrel=1
pkgrel=2
pkgdesc="ZynAddSubFX is a open source software synthesizer capable of making a countless number of instruments, from some common heard from expensive hardware to interesting sounds that you'll boost to an amazing universe of sounds."
arch=('i686' 'x86_64')
url="http://zynaddsubfx.sourceforge.net/"
license=('GPL2')
depends=('fftw' 'mxml' 'zlib')
depends=('fftw' 'mxml' 'zlib' 'fltk')
makedepends=('oss' 'jack')
source=("https://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${_pkgname}-${pkgver}.tar.bz2")
md5sums=('59eb69ce24d6f8c605f8ba43958d0526')
source=("https://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${_pkgname}-${pkgver}.tar.bz2"
'gentoo-zynaddsubfx-2.4.1-docs.patch'
'gentoo-zynaddsubfx-2.4.1-fltk.patch'
'gentoo-zynaddsubfx-2.4.1-fltk13.patch')
md5sums=('59eb69ce24d6f8c605f8ba43958d0526'
'1cc79aea2033fab472f35a5fec60167e'
'eb95d339ff5deac8c6b54965f04a8c60'
'49464a33ab9c4250520eda0df7705663')
build() {
# Patch it first
cd "${srcdir}/${_pkgname}-${pkgver}"
patch -Np1 -i "${srcdir}/gentoo-zynaddsubfx-2.4.1-docs.patch"
patch -Np1 -i "${srcdir}/gentoo-zynaddsubfx-2.4.1-fltk.patch"
patch -Np1 -i "${srcdir}/gentoo-zynaddsubfx-2.4.1-fltk13.patch"
# Then, prepare the build directory
cd "${srcdir}"
[ ! -d build ] && mkdir -p build
# Then, actually build it
cd build
cmake "${srcdir}/${_pkgname}-${pkgver}" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr
-DCMAKE_INSTALL_PREFIX=/usr \
-DGuiModule=fltk
make
}
......
Index: ZynAddSubFX-2.4.1/CMakeLists.txt
===================================================================
--- ZynAddSubFX-2.4.1.orig/CMakeLists.txt
+++ ZynAddSubFX-2.4.1/CMakeLists.txt
@@ -5,7 +5,3 @@ project(zynaddsubfx)
enable_testing()
#Currently the only directory that uses cmake
add_subdirectory(src)
-
-install(FILES AUTHORS.txt COPYING FAQ.txt HISTORY.txt README.txt
- DESTINATION share/doc/zynaddsubfx
- )
Index: ZynAddSubFX-2.4.1/src/CMakeLists.txt
===================================================================
--- ZynAddSubFX-2.4.1.orig/src/CMakeLists.txt
+++ ZynAddSubFX-2.4.1/src/CMakeLists.txt
@@ -96,24 +96,7 @@ if(FltkGui)
#message(STATUS "FLTK_LIBRARIES: ${FLTK_LIBRARIES}")
#message(STATUS "FLTK_MATH_LIBRARY: ${FLTK_MATH_LIBRARY}")
- #UGLY WORKAROUND
- find_program (MYFLTK_CONFIG fltk-config)
- if (MYFLTK_CONFIG)
- execute_process (COMMAND ${MYFLTK_CONFIG} --ldflags OUTPUT_VARIABLE MYFLTK_LDFLAGS)
- string(STRIP ${MYFLTK_LDFLAGS} MYFLTK_LIBRARIES)
- endif()
- mark_as_advanced(FORCE FLTK_BASE_LIBRARY)
- mark_as_advanced(FORCE FLTK_CONFIG_SCRIPT)
- mark_as_advanced(FORCE FLTK_DIR)
- mark_as_advanced(FORCE FLTK_FLUID_EXECUTABLE)
- mark_as_advanced(FORCE FLTK_FORMS_LIBRARY)
- mark_as_advanced(FORCE FLTK_GL_LIBRARY)
- mark_as_advanced(FORCE FLTK_IMAGES_LIBRARY)
- mark_as_advanced(FORCE FLTK_INCLUDE_DIR)
- mark_as_advanced(FORCE FLTK_MATH_LIBRARY)
-
-
- set(GUI_LIBRARIES ${FLTK_LIBRARIES} ${MYFLTK_LIBRARIES} ${OPENGL_LIBRARIES} zynaddsubfx_gui)
+ set(GUI_LIBRARIES ${FLTK_LIBRARIES} ${OPENGL_LIBRARIES} zynaddsubfx_gui)
add_definitions(-DFLTK_GUI)
message(STATUS "Will build fltk gui")
@@ -121,6 +104,7 @@ if(FltkGui)
include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}/UI"
"${CMAKE_CURRENT_BINARY_DIR}/UI"
+ ${FLTK_INCLUDE_DIR}
)
add_subdirectory(UI)
Sounds hackish but that's the only way I found to force it to generate the
functions in the .cxx files with fluid 1.3...
Index: ZynAddSubFX-2.4.1/src/UI/BankUI.fl
===================================================================
--- ZynAddSubFX-2.4.1.orig/src/UI/BankUI.fl
+++ ZynAddSubFX-2.4.1/src/UI/BankUI.fl
@@ -32,7 +32,7 @@ decl {\#include "../Misc/Config.h"} {pub
class BankProcess_ {} {
Function {process()} {open return_type {virtual void}
- } {}
+ } {code{;}}
decl {Bank *bank;} {public
}
}
Index: ZynAddSubFX-2.4.1/src/UI/OscilGenUI.fl
===================================================================
--- ZynAddSubFX-2.4.1.orig/src/UI/OscilGenUI.fl
+++ ZynAddSubFX-2.4.1/src/UI/OscilGenUI.fl
@@ -129,7 +129,7 @@ delete [] spc;} {selected
class PSlider {: {public Fl_Slider}
} {
- Function {PSlider(int x,int y, int w, int h, const char *label=0):Fl_Slider(x,y,w,h,label)} {} {}
+ Function {PSlider(int x,int y, int w, int h, const char *label=0):Fl_Slider(x,y,w,h,label)} {} {code{;}}
Function {handle(int event)} {return_type int
} {
code {int X=x(),Y=y(),W=w(),H=h();
Index: ZynAddSubFX-2.4.1/src/UI/PartUI.fl
===================================================================
--- ZynAddSubFX-2.4.1.orig/src/UI/PartUI.fl
+++ ZynAddSubFX-2.4.1/src/UI/PartUI.fl
@@ -85,7 +85,7 @@ end();} {}
class PartUI_ {} {
Function {showparameters(int kititem,int engine)} {return_type virtual
- } {}
+ } {code{;}}
}
class PartKitItem {: {public Fl_Group}
Index: ZynAddSubFX-2.4.1/src/UI/PresetsUI.fl
===================================================================
--- ZynAddSubFX-2.4.1.orig/src/UI/PresetsUI.fl
+++ ZynAddSubFX-2.4.1/src/UI/PresetsUI.fl
@@ -18,9 +18,9 @@ decl {\#include "../Params/Presets.h"} {
class PresetsUI_ {} {
Function {refresh()} {open return_type {virtual void}
- } {}
+ } {code{;}}
Function {~PresetsUI_()} {open return_type virtual
- } {}
+ } {code{;}}
}
class PresetsUI {} {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment