diff --git a/.travis.yml b/.travis.yml index e6a1519..dd1c096 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,28 +16,28 @@ jobs: compiler: gcc env: - TARGET="linux" - - PLUGINS="dpf-plugins" + - PLUGINS="artyfx" # linux with macOS cross-compilation - os: linux compiler: gcc env: - TARGET="macos-old" - - PLUGINS="dpf-plugins" + - PLUGINS="artyfx" # linux with win32 cross-compilation - os: linux compiler: gcc env: - TARGET="win32" - - PLUGINS="dpf-plugins" + - PLUGINS="artyfx" # linux with win64 cross-compilation - os: linux compiler: gcc env: - TARGET="win64" - - PLUGINS="dpf-plugins" + - PLUGINS="artyfx" before_install: - bash ${TRAVIS_BUILD_DIR}/.travis/before_install.sh diff --git a/bootstrap.sh b/bootstrap.sh index beb49f0..9a81f5d 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -21,7 +21,9 @@ fi # - cmake # - make # - jq +# - patch # - python (waf, meson) +# - realpath # - sed # - tar diff --git a/patches/artyfx/01_xplat-compat.patch b/patches/artyfx/01_xplat-compat.patch new file mode 100644 index 0000000..151693a --- /dev/null +++ b/patches/artyfx/01_xplat-compat.patch @@ -0,0 +1,112 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1c290ba..7c23e9e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -24,7 +24,10 @@ pkg_check_modules(SND sndfile REQUIRED) + include_directories( ${SND_INCLUDE_DIRS} ) + #target_link_libraries( avtkDemo ${CAIRO_LIBRARIES} ) + +-SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fPIC -shared -L./src/avtk -Wl,--no-undefined") ++SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fPIC -shared -L./src/avtk") ++if(NOT APPLE) ++ SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") ++endif() + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -O1 -Wno-unused-variable") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -O1 -Wno-unused-variable -ftree-vectorize") + +diff --git a/src/dsp/artyfx.cxx b/src/dsp/artyfx.cxx +index 49ace32..5258490 100644 +--- a/src/dsp/artyfx.cxx ++++ b/src/dsp/artyfx.cxx +@@ -49,6 +49,7 @@ static const LV2_Descriptor descriptors[] = { + Bitta::cleanup, + Bitta::extension_data + }, ++#ifndef _WIN32 + { + CAPTA_URI, + Capta::instantiate, +@@ -59,6 +60,7 @@ static const LV2_Descriptor descriptors[] = { + Capta::cleanup, + Capta::extension_data + }, ++#endif + { + DELLA_URI, + Della::instantiate, +diff --git a/src/dsp/capta.cxx b/src/dsp/capta.cxx +index 26cf298..c99a850 100644 +--- a/src/dsp/capta.cxx ++++ b/src/dsp/capta.cxx +@@ -29,6 +29,8 @@ + #include + #include + ++#ifndef _WIN32 ++ + LV2_Handle Capta::instantiate(const LV2_Descriptor* descriptor, + double samplerate, + const char* bundle_path, +@@ -207,3 +209,4 @@ const void* Capta::extension_data(const char* uri) + return NULL; + } + ++#endif +diff --git a/src/dsp/capta.hxx b/src/dsp/capta.hxx +index 39bbb11..083b21e 100644 +--- a/src/dsp/capta.hxx ++++ b/src/dsp/capta.hxx +@@ -45,6 +45,8 @@ typedef enum { + #include "zix/sem.h" + #include "zix/thread.h" + ++#ifndef _WIN32 ++ + class SndfileHandle; + + class Capta +@@ -101,4 +103,6 @@ private: + } + }; + ++#endif ++ + #endif // OPENAV_CAPTA +diff --git a/src/dsp/driva.hxx b/src/dsp/driva.hxx +index 7657c85..67399da 100644 +--- a/src/dsp/driva.hxx ++++ b/src/dsp/driva.hxx +@@ -26,22 +26,22 @@ + #define DRIVA_URI "http://www.openavproductions.com/artyfx#driva" + #define DRIVA_UI_URI "http://www.openavproductions.com/artyfx#driva/gui" + +-typedef enum { +- // Audio +- INPUT = 0, +- OUTPUT, +- +- // Top signal +- DRIVA_TONE, +- DRIVA_AMOUNT, +- +-} DrivaPortIndex; +- + class StompBox; + + class Driva + { + public: ++ typedef enum { ++ // Audio ++ INPUT = 0, ++ OUTPUT, ++ ++ // Top signal ++ DRIVA_TONE, ++ DRIVA_AMOUNT, ++ ++ } DrivaPortIndex; ++ + Driva(int rate); + ~Driva(); + static LV2_Handle instantiate(const LV2_Descriptor* descriptor, diff --git a/setup/functions.sh b/setup/functions.sh index 4bb4e63..60ee665 100644 --- a/setup/functions.sh +++ b/setup/functions.sh @@ -75,7 +75,6 @@ function _prebuild() { export CFLAGS="${TARGET_CFLAGS}" export CXXFLAGS="${TARGET_CXXFLAGS}" export LDFLAGS="${TARGET_LDFLAGS}" - export PKG_CONFIG="${TARGET_PKG_CONFIG}" export PKG_CONFIG_PATH="${TARGET_PKG_CONFIG_PATH}" unset CPPFLAGS @@ -94,6 +93,7 @@ function _prebuild() { if [ ! -f "${pkgdir}/.stamp_configured" ]; then rm -f "${pkgdir}/.stamp_built" rm -f "${pkgdir}/.stamp_installed" + rm -f "${pkgdir}/CMakeCache.txt" elif [ ! -f "${pkgdir}/.stamp_built" ]; then rm -f "${pkgdir}/.stamp_installed" @@ -111,7 +111,6 @@ function _postbuild() { unset CPPFLAGS unset CXXFLAGS unset LDFLAGS - unset PKG_CONFIG unset PKG_CONFIG_PATH export PATH="${OLD_PATH}" @@ -204,8 +203,6 @@ function build_cmake() { if [ ! -f "${pkgdir}/.stamp_configured" ]; then pushd "${pkgdir}" - # FIXME put this as a patch file - sed -i -e 's/ -Wl,--no-undefined//' CMakeLists.txt cmake -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_PREFIX="${PAWPAW_PREFIX}" ${extraconfrules} touch .stamp_configured popd @@ -241,14 +238,14 @@ function build_make() { if [ ! -f "${pkgdir}/.stamp_built" ]; then pushd "${pkgdir}" - make PREFIX="${PAWPAW_PREFIX}" ${MAKE_ARGS} ${extraconfrules} + make PREFIX="${PAWPAW_PREFIX}" PKG_CONFIG="${TARGET_PKG_CONFIG}" ${MAKE_ARGS} ${extraconfrules} touch .stamp_built popd fi if [ ! -f "${pkgdir}/.stamp_installed" ]; then pushd "${pkgdir}" - make PREFIX="${PAWPAW_PREFIX}" ${MAKE_ARGS} install + make PREFIX="${PAWPAW_PREFIX}" PKG_CONFIG="${TARGET_PKG_CONFIG}" ${MAKE_ARGS} install touch .stamp_installed popd fi