diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index 29e0751..1f71871 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 6 + CACHE_VERSION: 7 DEBIAN_FRONTEND: noninteractive PAWPAW_SKIP_TESTS: 1 @@ -866,6 +866,9 @@ jobs: - name: Set up dependencies run: | ./.github/workflows/bootstrap-deps.sh ${{ matrix.target }} + if [ "${{ matrix.target }}" = "linux-x86_64" ]; then + apt-get install -yqq libfreetype6-dev + fi - name: Run bootstrap shell: bash run: | diff --git a/bootstrap-mod.sh b/bootstrap-mod.sh index df150b3..c54c9cc 100755 --- a/bootstrap-mod.sh +++ b/bootstrap-mod.sh @@ -134,6 +134,59 @@ fi download jack-example-tools "${JACK_EXAMPLE_TOOLS_VERSION}" "${JACK_EXAMPLE_TOOLS_URL}" "" "git" build_meson jack-example-tools "${JACK_EXAMPLE_TOOLS_VERSION}" "${JACK_EXAMPLE_TOOLS_EXTRAFLAGS}" +# --------------------------------------------------------------------------------------------------------------------- +# juce-6.0 + +JUCE_6_0_VERSION="6648f3fee63fce603a21d467715e4314f3766a27" +JUCE_6_0_URL="https://github.com/DISTRHO/JUCE.git" + +JUCE_6_0_EXTRAFLAGS="" +JUCE_6_0_EXTRAFLAGS+=" -DCMAKE_INSTALL_PREFIX=${PAWPAW_PREFIX}" +JUCE_6_0_EXTRAFLAGS+=" -DJUCE_BUILD_HELPER_TOOLS=ON" +JUCE_6_0_EXTRAFLAGS+=" -DJUCE_INSTALL_DESTINATION=lib/cmake/JUCE-6.0.8" + +download juce-6.0 "${JUCE_6_0_VERSION}" "${JUCE_6_0_URL}" "" "git" +build_host_cmake juce-6.0 "${JUCE_6_0_VERSION}" "${JUCE_6_0_EXTRAFLAGS}" + +link_target_file juce-6.0 "${JUCE_6_0_VERSION}" "JUCEConfig.cmake" "lib/cmake/JUCE-6.0.8/JUCE-6.0.8Config.cmake" +install_file juce-6.0 "${JUCE_6_0_VERSION}" "build/extras/Build/juceaide/juceaide_artefacts/Release/juceaide" "bin" "juceaide60" +install_file juce-6.0 "${JUCE_6_0_VERSION}" "extras/Build/CMake/lv2_ttl_generator.c" "lib/cmake/JUCE-6.0.8" + +# --------------------------------------------------------------------------------------------------------------------- +# juce-6.1 + +JUCE_6_1_VERSION="7c23c02e47739ee77f29a9bec4d5440b59dc54d3" +JUCE_6_1_URL="https://github.com/DISTRHO/JUCE.git" + +JUCE_6_1_EXTRAFLAGS="" +JUCE_6_1_EXTRAFLAGS+=" -DCMAKE_INSTALL_PREFIX=${PAWPAW_PREFIX}" +JUCE_6_1_EXTRAFLAGS+=" -DJUCE_BUILD_HELPER_TOOLS=ON" +JUCE_6_1_EXTRAFLAGS+=" -DJUCE_INSTALL_DESTINATION=lib/cmake/JUCE-6.1.6" + +download juce-6.1 "${JUCE_6_1_VERSION}" "${JUCE_6_1_URL}" "" "git" +build_host_cmake juce-6.1 "${JUCE_6_1_VERSION}" "${JUCE_6_1_EXTRAFLAGS}" + +link_target_file juce-6.1 "${JUCE_6_1_VERSION}" "JUCEConfig.cmake" "lib/cmake/JUCE-6.1.6/JUCE-6.1.6Config.cmake" +install_file juce-6.1 "${JUCE_6_1_VERSION}" "build/extras/Build/juceaide/juceaide_artefacts/Release/juceaide" "bin" "juceaide61" +install_file juce-6.1 "${JUCE_6_1_VERSION}" "extras/Build/CMake/lv2_ttl_generator.c" "lib/cmake/JUCE-6.1.6" + +# --------------------------------------------------------------------------------------------------------------------- +# juce-7.0 + +JUCE_7_0_VERSION="c3099e733e90b8a2e7071698980abd70efb9a4e7" +JUCE_7_0_URL="https://github.com/DISTRHO/JUCE.git" + +JUCE_7_0_EXTRAFLAGS="" +JUCE_7_0_EXTRAFLAGS+=" -DCMAKE_INSTALL_PREFIX=${PAWPAW_PREFIX}" +JUCE_7_0_EXTRAFLAGS+=" -DJUCE_BUILD_HELPER_TOOLS=ON" +JUCE_7_0_EXTRAFLAGS+=" -DJUCE_INSTALL_DESTINATION=lib/cmake/JUCE-7.0.9" + +download juce-7.0 "${JUCE_7_0_VERSION}" "${JUCE_7_0_URL}" "" "git" +build_host_cmake juce-7.0 "${JUCE_7_0_VERSION}" "${JUCE_7_0_EXTRAFLAGS}" + +link_target_file juce-7.0 "${JUCE_7_0_VERSION}" "JUCEConfig.cmake" "lib/cmake/JUCE-7.0.9/JUCE-7.0.9Config.cmake" +install_file juce-7.0 "${JUCE_7_0_VERSION}" "build/extras/Build/juceaide/juceaide_artefacts/Release/juceaide" "bin" "juceaide70" + # --------------------------------------------------------------------------------------------------------------------- # lvtk1 diff --git a/patches/juce-6.0/01_mod-build.patch b/patches/juce-6.0/01_mod-build.patch new file mode 100644 index 0000000..05f4d26 --- /dev/null +++ b/patches/juce-6.0/01_mod-build.patch @@ -0,0 +1,13 @@ +diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake +index 87929c4..23b56c4 100644 +--- a/extras/Build/CMake/JUCEUtils.cmake ++++ b/extras/Build/CMake/JUCEUtils.cmake +@@ -137,7 +137,7 @@ function(_juce_find_linux_target_architecture result) + set("${result}" "${match_result}" PARENT_SCOPE) + endfunction() + +-if(CMAKE_SYSTEM_NAME STREQUAL "Linux") ++if(CMAKE_SYSTEM_NAME STREQUAL "LinuxIgnoredForPawPaw") + _juce_create_pkgconfig_target(JUCE_CURL_LINUX_DEPS libcurl) + _juce_create_pkgconfig_target(JUCE_BROWSER_LINUX_DEPS webkit2gtk-4.0 gtk+-x11-3.0) + diff --git a/patches/juce-6.0/02_less-deps.patch b/patches/juce-6.0/02_less-deps.patch new file mode 100644 index 0000000..5363720 --- /dev/null +++ b/patches/juce-6.0/02_less-deps.patch @@ -0,0 +1,25 @@ +diff --git a/modules/juce_audio_devices/juce_audio_devices.h b/modules/juce_audio_devices/juce_audio_devices.h +index e27163c..af02932 100644 +--- a/modules/juce_audio_devices/juce_audio_devices.h ++++ b/modules/juce_audio_devices/juce_audio_devices.h +@@ -41,7 +41,6 @@ + dependencies: juce_audio_basics, juce_events + OSXFrameworks: CoreAudio CoreMIDI AudioToolbox + iOSFrameworks: CoreAudio CoreMIDI AudioToolbox AVFoundation +- linuxPackages: alsa + mingwLibs: winmm + + END_JUCE_MODULE_DECLARATION +diff --git a/modules/juce_audio_processors/juce_audio_processors.h b/modules/juce_audio_processors/juce_audio_processors.h +index 4b3c999..349fc41 100644 +--- a/modules/juce_audio_processors/juce_audio_processors.h ++++ b/modules/juce_audio_processors/juce_audio_processors.h +@@ -41,7 +41,7 @@ + website: http://www.juce.com/juce + license: GPL/Commercial + +- dependencies: juce_gui_extra, juce_audio_basics ++ dependencies: juce_data_structures, juce_audio_basics + OSXFrameworks: CoreAudio CoreMIDI AudioToolbox + iOSFrameworks: AudioToolbox + diff --git a/patches/juce-6.0/03_versioned-juceaide.patch b/patches/juce-6.0/03_versioned-juceaide.patch new file mode 100644 index 0000000..bc31ef6 --- /dev/null +++ b/patches/juce-6.0/03_versioned-juceaide.patch @@ -0,0 +1,84 @@ +diff --git a/extras/Build/CMake/JUCEConfig.cmake.in b/extras/Build/CMake/JUCEConfig.cmake.in +index 3e5c97d..f2af3a8 100644 +--- a/extras/Build/CMake/JUCEConfig.cmake.in ++++ b/extras/Build/CMake/JUCEConfig.cmake.in +@@ -20,10 +20,12 @@ + + @PACKAGE_INIT@ + +-if(NOT TARGET juce::juceaide) +- add_executable(juce::juceaide IMPORTED) +- set_target_properties(juce::juceaide PROPERTIES +- IMPORTED_LOCATION "@PACKAGE_JUCEAIDE_PATH@") ++set(PACKAGE_PREFIX_DIR "@CMAKE_INSTALL_PREFIX@") ++ ++if(NOT TARGET juceaide60) ++ add_executable(juceaide60 IMPORTED GLOBAL) ++ set_target_properties(juceaide60 PROPERTIES ++ IMPORTED_LOCATION "${PACKAGE_PREFIX_DIR}/bin/juceaide60") + endif() + + check_required_components("@PROJECT_NAME@") +diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake +index 23b56c4..0d8fd93 100644 +--- a/extras/Build/CMake/JUCEUtils.cmake ++++ b/extras/Build/CMake/JUCEUtils.cmake +@@ -414,7 +414,7 @@ function(_juce_add_au_resource_fork shared_code_target au_target) + # In the end, it's simplest to generate a special single-purpose appconfig just for the + # resource compiler. + add_custom_command(OUTPUT "${secret_au_plugindefines}" +- COMMAND juce::juceaide auplugindefines "${defs_file}" "${secret_au_plugindefines}" ++ COMMAND juceaide60 auplugindefines "${defs_file}" "${secret_au_plugindefines}" + DEPENDS "${defs_file}" + VERBATIM) + +@@ -856,7 +856,7 @@ function(juce_add_binary_data target) + list(APPEND binary_file_names "${juce_binary_data_folder}/${JUCE_ARG_HEADER_NAME}") + + add_custom_command(OUTPUT ${binary_file_names} +- COMMAND juce::juceaide binarydata "${JUCE_ARG_NAMESPACE}" "${JUCE_ARG_HEADER_NAME}" ++ COMMAND juceaide60 binarydata "${JUCE_ARG_NAMESPACE}" "${JUCE_ARG_HEADER_NAME}" + ${juce_binary_data_folder} ${JUCE_ARG_SOURCES} + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + DEPENDS ${JUCE_ARG_SOURCES} +@@ -953,7 +953,7 @@ function(juce_generate_juce_header target) + set(extra_args) + + add_custom_command(OUTPUT "${juce_header}" +- COMMAND juce::juceaide header "${defs_file}" "${juce_header}" ${extra_args} ++ COMMAND juceaide60 header "${defs_file}" "${juce_header}" ${extra_args} + DEPENDS "${defs_file}" + VERBATIM) + endfunction() +@@ -961,11 +961,11 @@ endfunction() + # ================================================================================================== + + function(_juce_execute_juceaide) +- if(NOT TARGET juce::juceaide) ++ if(NOT TARGET juceaide60) + message(FATAL_ERROR "The juceaide target does not exist") + endif() + +- get_target_property(juceaide_location juce::juceaide IMPORTED_LOCATION) ++ get_target_property(juceaide_location juceaide60 IMPORTED_LOCATION) + + if(NOT EXISTS "${juceaide_location}") + message(FATAL_ERROR "juceaide was imported, but it doesn't exist!") +@@ -1095,7 +1095,7 @@ function(_juce_configure_bundle source_target dest_target) + MACOSX_BUNDLE_INFO_PLIST "${this_output_plist}") + + add_custom_command(OUTPUT "${this_output_pkginfo}" +- COMMAND juce::juceaide pkginfo "${juce_kind_string}" "${this_output_pkginfo}" ++ COMMAND juceaide60 pkginfo "${juce_kind_string}" "${this_output_pkginfo}" + VERBATIM) + + set(output_folder "$") +@@ -1187,7 +1187,7 @@ function(_juce_add_resources_rc source_target dest_target) + set(resource_rc_file "${juce_library_code}/resources.rc") + + add_custom_command(OUTPUT "${resource_rc_file}" +- COMMAND juce::juceaide rcfile "${input_info_file}" "${resource_rc_file}" ++ COMMAND juceaide60 rcfile "${input_info_file}" "${resource_rc_file}" + ${dependency} + VERBATIM) + diff --git a/patches/juce-6.0/04_copy-to-destdir.patch b/patches/juce-6.0/04_copy-to-destdir.patch new file mode 100644 index 0000000..7ad010e --- /dev/null +++ b/patches/juce-6.0/04_copy-to-destdir.patch @@ -0,0 +1,17 @@ +diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake +index 768dc8a..052d9b3 100644 +--- a/extras/Build/CMake/JUCEUtils.cmake ++++ b/extras/Build/CMake/JUCEUtils.cmake +@@ -182,9 +182,9 @@ function(_juce_set_default_properties) + set_property(GLOBAL PROPERTY JUCE_VST3_COPY_DIR "${prefix}/VST3") + set_property(GLOBAL PROPERTY JUCE_AAX_COPY_DIR "${prefix}/Avid/Audio/Plug-Ins") + elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") +- set_property(GLOBAL PROPERTY JUCE_VST_COPY_DIR "$ENV{HOME}/.vst") +- set_property(GLOBAL PROPERTY JUCE_VST3_COPY_DIR "$ENV{HOME}/.vst3") +- set_property(GLOBAL PROPERTY JUCE_LV2_COPY_DIR "$ENV{HOME}/.lv2") ++ set_property(GLOBAL PROPERTY JUCE_VST_COPY_DIR "$ENV{DESTDIR}/usr/lib/vst") ++ set_property(GLOBAL PROPERTY JUCE_VST3_COPY_DIR "$ENV{DESTDIR}/usr/lib/vst3") ++ set_property(GLOBAL PROPERTY JUCE_LV2_COPY_DIR "$ENV{DESTDIR}/usr/lib/lv2") + endif() + endfunction() + diff --git a/patches/juce-6.0/05_disable-xinerama.patch b/patches/juce-6.0/05_disable-xinerama.patch new file mode 100644 index 0000000..ec38d9e --- /dev/null +++ b/patches/juce-6.0/05_disable-xinerama.patch @@ -0,0 +1,13 @@ +diff --git a/modules/juce_gui_basics/juce_gui_basics.h b/modules/juce_gui_basics/juce_gui_basics.h +index 28097d128..fe635da32 100644 +--- a/modules/juce_gui_basics/juce_gui_basics.h ++++ b/modules/juce_gui_basics/juce_gui_basics.h +@@ -88,7 +88,7 @@ + the availability of Xinerama is queried during runtime. + */ + #ifndef JUCE_USE_XINERAMA +- #define JUCE_USE_XINERAMA 1 ++ #define JUCE_USE_XINERAMA 0 + #endif + + /** Config: JUCE_USE_XSHM diff --git a/patches/juce-6.0/06_no-lto.patch b/patches/juce-6.0/06_no-lto.patch new file mode 100644 index 0000000..adbf699 --- /dev/null +++ b/patches/juce-6.0/06_no-lto.patch @@ -0,0 +1,20 @@ +diff --git a/extras/Build/CMake/JUCEHelperTargets.cmake b/extras/Build/CMake/JUCEHelperTargets.cmake +index 97e4194..dadb5d3 100644 +--- a/extras/Build/CMake/JUCEHelperTargets.cmake ++++ b/extras/Build/CMake/JUCEHelperTargets.cmake +@@ -48,15 +48,3 @@ endif() + + add_library(juce_recommended_lto_flags INTERFACE) + add_library(juce::juce_recommended_lto_flags ALIAS juce_recommended_lto_flags) +- +-if((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")) +- target_compile_options(juce_recommended_lto_flags INTERFACE +- $<$:$,-GL,-flto>>) +- target_link_libraries(juce_recommended_lto_flags INTERFACE +- $<$:$<$:-LTCG>>) +-elseif((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +- OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") +- OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")) +- target_compile_options(juce_recommended_lto_flags INTERFACE $<$:-flto>) +- target_link_libraries(juce_recommended_lto_flags INTERFACE $<$:-flto>) +-endif() diff --git a/patches/juce-6.1/01_mod-build.patch b/patches/juce-6.1/01_mod-build.patch new file mode 100644 index 0000000..141de57 --- /dev/null +++ b/patches/juce-6.1/01_mod-build.patch @@ -0,0 +1,13 @@ +diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake +index 3f59bea..786fc3a 100644 +--- a/extras/Build/CMake/JUCEUtils.cmake ++++ b/extras/Build/CMake/JUCEUtils.cmake +@@ -84,7 +84,7 @@ define_property(TARGET PROPERTY JUCE_COPY_PLUGIN_AFTER_BUILD INHERITED + FULL_DOCS "Whether or not plugins should be copied after building") + set_property(GLOBAL PROPERTY JUCE_COPY_PLUGIN_AFTER_BUILD FALSE) + +-if((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) ++if((CMAKE_SYSTEM_NAME STREQUAL "LinuxIgnoredForPawPaw") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) + _juce_create_pkgconfig_target(JUCE_CURL_LINUX_DEPS libcurl) + _juce_create_pkgconfig_target(JUCE_BROWSER_LINUX_DEPS webkit2gtk-4.0 gtk+-x11-3.0) + elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") diff --git a/patches/juce-6.1/02_less-deps.patch b/patches/juce-6.1/02_less-deps.patch new file mode 100644 index 0000000..fbf5609 --- /dev/null +++ b/patches/juce-6.1/02_less-deps.patch @@ -0,0 +1,25 @@ +diff --git a/modules/juce_audio_devices/juce_audio_devices.h b/modules/juce_audio_devices/juce_audio_devices.h +index b407702..c7adc25 100644 +--- a/modules/juce_audio_devices/juce_audio_devices.h ++++ b/modules/juce_audio_devices/juce_audio_devices.h +@@ -42,7 +42,6 @@ + dependencies: juce_audio_basics, juce_events + OSXFrameworks: CoreAudio CoreMIDI AudioToolbox + iOSFrameworks: CoreAudio CoreMIDI AudioToolbox AVFoundation +- linuxPackages: alsa + mingwLibs: winmm + + END_JUCE_MODULE_DECLARATION +diff --git a/modules/juce_audio_processors/juce_audio_processors.h b/modules/juce_audio_processors/juce_audio_processors.h +index 25dcf0f..e363697 100644 +--- a/modules/juce_audio_processors/juce_audio_processors.h ++++ b/modules/juce_audio_processors/juce_audio_processors.h +@@ -42,7 +42,7 @@ + license: GPL/Commercial + minimumCppStandard: 14 + +- dependencies: juce_gui_extra, juce_audio_basics ++ dependencies: juce_data_structures, juce_audio_basics + OSXFrameworks: CoreAudio CoreMIDI AudioToolbox + iOSFrameworks: AudioToolbox + diff --git a/patches/juce-6.1/03_versioned-juceaide.patch b/patches/juce-6.1/03_versioned-juceaide.patch new file mode 100644 index 0000000..a270861 --- /dev/null +++ b/patches/juce-6.1/03_versioned-juceaide.patch @@ -0,0 +1,98 @@ +diff --git a/extras/Build/CMake/JUCEConfig.cmake.in b/extras/Build/CMake/JUCEConfig.cmake.in +index 782c732..9f29061 100644 +--- a/extras/Build/CMake/JUCEConfig.cmake.in ++++ b/extras/Build/CMake/JUCEConfig.cmake.in +@@ -20,10 +20,12 @@ + + @PACKAGE_INIT@ + +-if(NOT TARGET juce::juceaide) +- add_executable(juce::juceaide IMPORTED) +- set_target_properties(juce::juceaide PROPERTIES +- IMPORTED_LOCATION "@PACKAGE_JUCEAIDE_PATH@") ++set(PACKAGE_PREFIX_DIR "@CMAKE_INSTALL_PREFIX@") ++ ++if(NOT TARGET juceaide61) ++ add_executable(juceaide61 IMPORTED GLOBAL) ++ set_target_properties(juceaide61 PROPERTIES ++ IMPORTED_LOCATION "${PACKAGE_PREFIX_DIR}/bin/juceaide61") + endif() + + check_required_components("@PROJECT_NAME@") +diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake +index 786fc3a..86af138 100644 +--- a/extras/Build/CMake/JUCEUtils.cmake ++++ b/extras/Build/CMake/JUCEUtils.cmake +@@ -187,7 +187,7 @@ function(_juce_add_au_resource_fork shared_code_target au_target) + # In the end, it's simplest to generate a special single-purpose appconfig just for the + # resource compiler. + add_custom_command(OUTPUT "${secret_au_plugindefines}" +- COMMAND juce::juceaide auplugindefines "${defs_file}" "${secret_au_plugindefines}" ++ COMMAND juceaide61 auplugindefines "${defs_file}" "${secret_au_plugindefines}" + DEPENDS "${defs_file}" + VERBATIM) + +@@ -409,7 +409,7 @@ function(juce_add_binary_data target) + file(WRITE "${input_file_list}" "${newline_delimited_input}") + + add_custom_command(OUTPUT ${binary_file_names} +- COMMAND juce::juceaide binarydata "${JUCE_ARG_NAMESPACE}" "${JUCE_ARG_HEADER_NAME}" ++ COMMAND juceaide61 binarydata "${JUCE_ARG_NAMESPACE}" "${JUCE_ARG_HEADER_NAME}" + ${juce_binary_data_folder} "${input_file_list}" + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + DEPENDS "${input_file_list}" +@@ -493,7 +493,7 @@ function(juce_generate_juce_header target) + set(extra_args) + + add_custom_command(OUTPUT "${juce_header}" +- COMMAND juce::juceaide header "${defs_file}" "${juce_header}" ${extra_args} ++ COMMAND juceaide61 header "${defs_file}" "${juce_header}" ${extra_args} + DEPENDS "${defs_file}" + VERBATIM) + endfunction() +@@ -501,20 +501,20 @@ endfunction() + # ================================================================================================== + + function(_juce_execute_juceaide) +- if(NOT TARGET juce::juceaide) +- message(FATAL_ERROR "The juceaide target does not exist") ++ if(NOT TARGET juceaide61) ++ message(FATAL_ERROR "The juceaide61 target does not exist") + endif() + +- get_target_property(juceaide_location juce::juceaide IMPORTED_LOCATION) ++ get_target_property(juceaide61_location juceaide61 IMPORTED_LOCATION) + +- if(NOT EXISTS "${juceaide_location}") +- message(FATAL_ERROR "juceaide was imported, but it doesn't exist!") ++ if(NOT EXISTS "${juceaide61_location}") ++ message(FATAL_ERROR "juceaide61 was imported, but it doesn't exist!") + endif() + +- execute_process(COMMAND "${juceaide_location}" ${ARGN} RESULT_VARIABLE result_variable) ++ execute_process(COMMAND "${juceaide61_location}" ${ARGN} RESULT_VARIABLE result_variable) + + if(result_variable) +- message(FATAL_ERROR "Running juceaide failed") ++ message(FATAL_ERROR "Running juceaide61 failed") + endif() + endfunction() + +@@ -651,7 +651,7 @@ function(_juce_configure_bundle source_target dest_target) + MACOSX_BUNDLE_INFO_PLIST "${this_output_plist}") + + add_custom_command(OUTPUT "${this_output_pkginfo}" +- COMMAND juce::juceaide pkginfo "${juce_kind_string}" "${this_output_pkginfo}" ++ COMMAND juceaide61 pkginfo "${juce_kind_string}" "${this_output_pkginfo}" + VERBATIM) + + set(output_folder "$") +@@ -743,7 +743,7 @@ function(_juce_add_resources_rc source_target dest_target) + set(resource_rc_file "${juce_library_code}/resources.rc") + + add_custom_command(OUTPUT "${resource_rc_file}" +- COMMAND juce::juceaide rcfile "${input_info_file}" "${resource_rc_file}" ++ COMMAND juceaide61 rcfile "${input_info_file}" "${resource_rc_file}" + ${dependency} + VERBATIM) + diff --git a/patches/juce-6.1/04_copy-to-destdir.patch b/patches/juce-6.1/04_copy-to-destdir.patch new file mode 100644 index 0000000..918b9d7 --- /dev/null +++ b/patches/juce-6.1/04_copy-to-destdir.patch @@ -0,0 +1,17 @@ +diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake +index 86af138..07c279c 100644 +--- a/extras/Build/CMake/JUCEUtils.cmake ++++ b/extras/Build/CMake/JUCEUtils.cmake +@@ -117,9 +117,9 @@ function(_juce_set_default_properties) + set_property(GLOBAL PROPERTY JUCE_VST3_COPY_DIR "${prefix}/VST3") + set_property(GLOBAL PROPERTY JUCE_AAX_COPY_DIR "${prefix}/Avid/Audio/Plug-Ins") + elseif((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) +- set_property(GLOBAL PROPERTY JUCE_VST_COPY_DIR "$ENV{HOME}/.vst") +- set_property(GLOBAL PROPERTY JUCE_VST3_COPY_DIR "$ENV{HOME}/.vst3") +- set_property(GLOBAL PROPERTY JUCE_LV2_COPY_DIR "$ENV{HOME}/.lv2") ++ set_property(GLOBAL PROPERTY JUCE_VST_COPY_DIR "$ENV{DESTDIR}/usr/lib/vst") ++ set_property(GLOBAL PROPERTY JUCE_VST3_COPY_DIR "$ENV{DESTDIR}/usr/lib/vst3") ++ set_property(GLOBAL PROPERTY JUCE_LV2_COPY_DIR "$ENV{DESTDIR}/usr/lib/lv2") + endif() + endfunction() + diff --git a/patches/juce-6.1/05_disable-xinerama.patch b/patches/juce-6.1/05_disable-xinerama.patch new file mode 100644 index 0000000..ec38d9e --- /dev/null +++ b/patches/juce-6.1/05_disable-xinerama.patch @@ -0,0 +1,13 @@ +diff --git a/modules/juce_gui_basics/juce_gui_basics.h b/modules/juce_gui_basics/juce_gui_basics.h +index 28097d128..fe635da32 100644 +--- a/modules/juce_gui_basics/juce_gui_basics.h ++++ b/modules/juce_gui_basics/juce_gui_basics.h +@@ -88,7 +88,7 @@ + the availability of Xinerama is queried during runtime. + */ + #ifndef JUCE_USE_XINERAMA +- #define JUCE_USE_XINERAMA 1 ++ #define JUCE_USE_XINERAMA 0 + #endif + + /** Config: JUCE_USE_XSHM diff --git a/patches/juce-6.1/06_no-lto.patch b/patches/juce-6.1/06_no-lto.patch new file mode 100644 index 0000000..3974c8e --- /dev/null +++ b/patches/juce-6.1/06_no-lto.patch @@ -0,0 +1,20 @@ +diff --git a/extras/Build/CMake/JUCEHelperTargets.cmake b/extras/Build/CMake/JUCEHelperTargets.cmake +index f592f99..54243be 100644 +--- a/extras/Build/CMake/JUCEHelperTargets.cmake ++++ b/extras/Build/CMake/JUCEHelperTargets.cmake +@@ -47,15 +47,3 @@ endif() + + add_library(juce_recommended_lto_flags INTERFACE) + add_library(juce::juce_recommended_lto_flags ALIAS juce_recommended_lto_flags) +- +-if((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")) +- target_compile_options(juce_recommended_lto_flags INTERFACE +- $<$:$,-GL,-flto>>) +- target_link_libraries(juce_recommended_lto_flags INTERFACE +- $<$:$<$:-LTCG>>) +-elseif((NOT MINGW) AND ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +- OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") +- OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))) +- target_compile_options(juce_recommended_lto_flags INTERFACE $<$:-flto>) +- target_link_libraries(juce_recommended_lto_flags INTERFACE $<$:-flto>) +-endif() diff --git a/patches/juce-7.0/01_mod-build.patch b/patches/juce-7.0/01_mod-build.patch new file mode 100644 index 0000000..45e28b2 --- /dev/null +++ b/patches/juce-7.0/01_mod-build.patch @@ -0,0 +1,13 @@ +diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake +index e6f69ba..d775ab8 100644 +--- a/extras/Build/CMake/JUCEUtils.cmake ++++ b/extras/Build/CMake/JUCEUtils.cmake +@@ -84,7 +84,7 @@ define_property(TARGET PROPERTY JUCE_COPY_PLUGIN_AFTER_BUILD INHERITED + FULL_DOCS "Whether or not plugins should be copied after building") + set_property(GLOBAL PROPERTY JUCE_COPY_PLUGIN_AFTER_BUILD FALSE) + +-if((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) ++if((CMAKE_SYSTEM_NAME STREQUAL "LinuxIgnoredForPawPaw") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) + _juce_create_pkgconfig_target(JUCE_CURL_LINUX_DEPS libcurl) + _juce_create_pkgconfig_target(JUCE_BROWSER_LINUX_DEPS webkit2gtk-4.0 gtk+-x11-3.0) + endif() diff --git a/patches/juce-7.0/02_less-deps.patch b/patches/juce-7.0/02_less-deps.patch new file mode 100644 index 0000000..b16749d --- /dev/null +++ b/patches/juce-7.0/02_less-deps.patch @@ -0,0 +1,25 @@ +diff --git a/modules/juce_audio_devices/juce_audio_devices.h b/modules/juce_audio_devices/juce_audio_devices.h +index ad9df36..6eb6a96 100644 +--- a/modules/juce_audio_devices/juce_audio_devices.h ++++ b/modules/juce_audio_devices/juce_audio_devices.h +@@ -42,7 +42,6 @@ + dependencies: juce_audio_basics, juce_events + OSXFrameworks: CoreAudio CoreMIDI AudioToolbox + iOSFrameworks: CoreAudio CoreMIDI AudioToolbox AVFoundation +- linuxPackages: alsa + mingwLibs: winmm + + END_JUCE_MODULE_DECLARATION +diff --git a/modules/juce_audio_processors/juce_audio_processors.h b/modules/juce_audio_processors/juce_audio_processors.h +index 1d59954..ce2db32 100644 +--- a/modules/juce_audio_processors/juce_audio_processors.h ++++ b/modules/juce_audio_processors/juce_audio_processors.h +@@ -42,7 +42,7 @@ + license: GPL/Commercial + minimumCppStandard: 17 + +- dependencies: juce_gui_extra, juce_audio_basics ++ dependencies: juce_data_structures, juce_audio_basics + OSXFrameworks: CoreAudio CoreMIDI AudioToolbox + iOSFrameworks: AudioToolbox + diff --git a/patches/juce-7.0/03_versioned-juceaide.patch b/patches/juce-7.0/03_versioned-juceaide.patch new file mode 100644 index 0000000..85b5580 --- /dev/null +++ b/patches/juce-7.0/03_versioned-juceaide.patch @@ -0,0 +1,84 @@ +diff --git a/extras/Build/CMake/JUCEConfig.cmake.in b/extras/Build/CMake/JUCEConfig.cmake.in +index 6a96e24..500528d 100644 +--- a/extras/Build/CMake/JUCEConfig.cmake.in ++++ b/extras/Build/CMake/JUCEConfig.cmake.in +@@ -22,10 +22,12 @@ + + include("${CMAKE_CURRENT_LIST_DIR}/LV2_HELPER.cmake") + +-if(NOT TARGET juce::juceaide) +- add_executable(juce::juceaide IMPORTED) +- set_target_properties(juce::juceaide PROPERTIES +- IMPORTED_LOCATION "@PACKAGE_JUCEAIDE_PATH@") ++set(PACKAGE_PREFIX_DIR "@CMAKE_INSTALL_PREFIX@") ++ ++if(NOT TARGET juceaide70) ++ add_executable(juceaide70 IMPORTED GLOBAL) ++ set_target_properties(juceaide70 PROPERTIES ++ IMPORTED_LOCATION "${PACKAGE_PREFIX_DIR}/bin/juceaide70") + endif() + + check_required_components("@PROJECT_NAME@") +diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake +index d775ab8..a61b3f4 100644 +--- a/extras/Build/CMake/JUCEUtils.cmake ++++ b/extras/Build/CMake/JUCEUtils.cmake +@@ -202,7 +202,7 @@ function(_juce_create_embedded_linux_subprocess_target output_target_name target + OUTPUT + ${binary_header_file} + ${binary_source_file} +- COMMAND juce::juceaide binarydata "LinuxSubprocessHelperBinaryData" "${binary_header_file}" ++ COMMAND juceaide70 binarydata "LinuxSubprocessHelperBinaryData" "${binary_header_file}" + ${juce_linux_subprocess_helper_binary_dir} "${juceaide_input_file}" + COMMAND + ${CMAKE_COMMAND} -E rename "${juce_linux_subprocess_helper_binary_dir}/BinaryData1.cpp" "${binary_source_file}" +@@ -436,7 +436,7 @@ function(juce_add_binary_data target) + file(WRITE "${input_file_list}" "${newline_delimited_input}") + + add_custom_command(OUTPUT ${binary_file_names} +- COMMAND juce::juceaide binarydata "${JUCE_ARG_NAMESPACE}" "${JUCE_ARG_HEADER_NAME}" ++ COMMAND juceaide70 binarydata "${JUCE_ARG_NAMESPACE}" "${JUCE_ARG_HEADER_NAME}" + ${juce_binary_data_folder} "${input_file_list}" + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + DEPENDS "${input_file_list}" ${JUCE_ARG_SOURCES} +@@ -520,7 +520,7 @@ function(juce_generate_juce_header target) + set(extra_args) + + add_custom_command(OUTPUT "${juce_header}" +- COMMAND juce::juceaide header "${defs_file}" "${juce_header}" ${extra_args} ++ COMMAND juceaide70 header "${defs_file}" "${juce_header}" ${extra_args} + DEPENDS "${defs_file}" + VERBATIM) + endfunction() +@@ -528,11 +528,11 @@ endfunction() + # ================================================================================================== + + function(_juce_execute_juceaide) +- if(NOT TARGET juce::juceaide) ++ if(NOT TARGET juceaide70) + message(FATAL_ERROR "The juceaide target does not exist") + endif() + +- get_target_property(juceaide_location juce::juceaide IMPORTED_LOCATION) ++ get_target_property(juceaide_location juceaide70 IMPORTED_LOCATION) + + if(NOT EXISTS "${juceaide_location}") + message(FATAL_ERROR "juceaide was imported, but it doesn't exist!") +@@ -681,7 +681,7 @@ function(_juce_configure_bundle source_target dest_target) + MACOSX_BUNDLE_INFO_PLIST "${this_output_plist}") + + add_custom_command(OUTPUT "${this_output_pkginfo}" +- COMMAND juce::juceaide pkginfo "${juce_kind_string}" "${this_output_pkginfo}" ++ COMMAND juceaide70 pkginfo "${juce_kind_string}" "${this_output_pkginfo}" + VERBATIM) + + set(output_folder "$") +@@ -769,7 +769,7 @@ function(_juce_add_resources_rc source_target dest_target) + set(resource_rc_file "${juce_library_code}/${source_target}_resources.rc") + + add_custom_command(OUTPUT "${resource_rc_file}" +- COMMAND juce::juceaide rcfile "${input_info_file}" "${resource_rc_file}" ++ COMMAND juceaide70 rcfile "${input_info_file}" "${resource_rc_file}" + ${dependency} + VERBATIM) + diff --git a/patches/juce-7.0/04_copy-to-destdir.patch b/patches/juce-7.0/04_copy-to-destdir.patch new file mode 100644 index 0000000..2f74822 --- /dev/null +++ b/patches/juce-7.0/04_copy-to-destdir.patch @@ -0,0 +1,19 @@ +diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake +index a61b3f4..c6b8357 100644 +--- a/extras/Build/CMake/JUCEUtils.cmake ++++ b/extras/Build/CMake/JUCEUtils.cmake +@@ -115,10 +115,10 @@ function(_juce_set_default_properties) + set_property(GLOBAL PROPERTY JUCE_LV2_COPY_DIR "$ENV{APPDATA}/LV2") + set_property(GLOBAL PROPERTY JUCE_UNITY_COPY_DIR "$ENV{APPDATA}/Unity") + elseif((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) +- set_property(GLOBAL PROPERTY JUCE_LV2_COPY_DIR "$ENV{HOME}/.lv2") +- set_property(GLOBAL PROPERTY JUCE_VST_COPY_DIR "$ENV{HOME}/.vst") +- set_property(GLOBAL PROPERTY JUCE_VST3_COPY_DIR "$ENV{HOME}/.vst3") +- set_property(GLOBAL PROPERTY JUCE_UNITY_COPY_DIR "$ENV{HOME}/.unity") ++ set_property(GLOBAL PROPERTY JUCE_LV2_COPY_DIR "$ENV{DESTDIR}/usr/lib/lv2") ++ set_property(GLOBAL PROPERTY JUCE_VST_COPY_DIR "$ENV{DESTDIR}/usr/lib/vst") ++ set_property(GLOBAL PROPERTY JUCE_VST3_COPY_DIR "$ENV{DESTDIR}/usr/lib/vst3") ++ set_property(GLOBAL PROPERTY JUCE_UNITY_COPY_DIR "$ENV{DESTDIR}/usr/lib/unity") + endif() + endfunction() + diff --git a/patches/juce-7.0/05_disable-xinerama.patch b/patches/juce-7.0/05_disable-xinerama.patch new file mode 100644 index 0000000..ec38d9e --- /dev/null +++ b/patches/juce-7.0/05_disable-xinerama.patch @@ -0,0 +1,13 @@ +diff --git a/modules/juce_gui_basics/juce_gui_basics.h b/modules/juce_gui_basics/juce_gui_basics.h +index 28097d128..fe635da32 100644 +--- a/modules/juce_gui_basics/juce_gui_basics.h ++++ b/modules/juce_gui_basics/juce_gui_basics.h +@@ -88,7 +88,7 @@ + the availability of Xinerama is queried during runtime. + */ + #ifndef JUCE_USE_XINERAMA +- #define JUCE_USE_XINERAMA 1 ++ #define JUCE_USE_XINERAMA 0 + #endif + + /** Config: JUCE_USE_XSHM diff --git a/setup/functions.sh b/setup/functions.sh index 96941d3..c7054cd 100644 --- a/setup/functions.sh +++ b/setup/functions.sh @@ -639,19 +639,30 @@ function build_host_autoconf() { unset CXXFLAGS unset LDFLAGS - if [ -d "${PAWPAW_ROOT}/patches/${name}" ] && [ ! -f "${pkgdir}/.stamp_cleanup" ]; then - for p in $(ls "${PAWPAW_ROOT}/patches/${name}/" | grep "\.patch$" | sort); do - if [ ! -f "${pkgdir}/.stamp_applied_${p}" ]; then - patch -p1 -d "${pkgdir}" -i "${PAWPAW_ROOT}/patches/${name}/${p}" - touch "${pkgdir}/.stamp_applied_${p}" + if [ -e "${PAWPAW_ROOT}/patches/${pkgname}" ] && [ ! -f "${pkgdir}/.stamp_cleanup" ] && [ ! -f "${pkgdir}/.stamp_configured" ]; then + local patchtargets="${PAWPAW_TARGET}" + if [[ "${PAWPAW_TARGET}" = "linux-"* ]]; then + patchtargets+=" linux" + elif [ "${PAWPAW_TARGET}" = "macos-universal-10.15" ]; then + patchtargets+=" macos-10.15 macos-universal" + elif [ "${PAWPAW_TARGET}" = "win64" ]; then + patchtargets+=" win32" + fi + + for target in ${patchtargets[@]}; do + if [ -e "${PAWPAW_ROOT}/patches/${pkgname}/${target}" ]; then + for p in $(ls "${PAWPAW_ROOT}/patches/${pkgname}/${target}/" | grep "\.patch$" | sort); do + if [ ! -f "${pkgdir}/.stamp_applied_${p}" ]; then + patch -p1 -d "${pkgdir}" -i "${PAWPAW_ROOT}/patches/${pkgname}/${target}/${p}" + touch "${pkgdir}/.stamp_applied_${p}" + fi + done fi done - fi - if [ -d "${PAWPAW_ROOT}/patches/${name}/${PAWPAW_TARGET}" ] && [ ! -f "${pkgdir}/.stamp_cleanup" ]; then - for p in $(ls "${PAWPAW_ROOT}/patches/${name}/${PAWPAW_TARGET}/" | grep "\.patch$" | sort); do + for p in $(ls "${PAWPAW_ROOT}/patches/${pkgname}/" | grep "\.patch$" | sort); do if [ ! -f "${pkgdir}/.stamp_applied_${p}" ]; then - patch -p1 -d "${pkgdir}" -i "${PAWPAW_ROOT}/patches/${name}/${PAWPAW_TARGET}/${p}" + patch -p1 -d "${pkgdir}" -i "${PAWPAW_ROOT}/patches/${pkgname}/${p}" touch "${pkgdir}/.stamp_applied_${p}" fi done @@ -679,6 +690,82 @@ function build_host_autoconf() { fi } +function build_host_cmake() { + local pkgname="${1}" + local version="${2}" + local extraconfrules="${3}" + + local pkgdir="${PAWPAW_BUILDDIR}/${pkgname}-${version}" + + unset AR + unset CC + unset CXX + unset LD + unset STRIP + unset CFLAGS + unset CPPFLAGS + unset CXXFLAGS + unset LDFLAGS + + if [ -e "${PAWPAW_ROOT}/patches/${pkgname}" ] && [ ! -f "${pkgdir}/.stamp_cleanup" ] && [ ! -f "${pkgdir}/.stamp_configured" ]; then + local patchtargets="${PAWPAW_TARGET}" + if [[ "${PAWPAW_TARGET}" = "linux-"* ]]; then + patchtargets+=" linux" + elif [ "${PAWPAW_TARGET}" = "macos-universal-10.15" ]; then + patchtargets+=" macos-10.15 macos-universal" + elif [ "${PAWPAW_TARGET}" = "win64" ]; then + patchtargets+=" win32" + fi + + for target in ${patchtargets[@]}; do + if [ -e "${PAWPAW_ROOT}/patches/${pkgname}/${target}" ]; then + for p in $(ls "${PAWPAW_ROOT}/patches/${pkgname}/${target}/" | grep "\.patch$" | sort); do + if [ ! -f "${pkgdir}/.stamp_applied_${p}" ]; then + patch -p1 -d "${pkgdir}" -i "${PAWPAW_ROOT}/patches/${pkgname}/${target}/${p}" + touch "${pkgdir}/.stamp_applied_${p}" + fi + done + fi + done + + for p in $(ls "${PAWPAW_ROOT}/patches/${pkgname}/" | grep "\.patch$" | sort); do + if [ ! -f "${pkgdir}/.stamp_applied_${p}" ]; then + patch -p1 -d "${pkgdir}" -i "${PAWPAW_ROOT}/patches/${pkgname}/${p}" + touch "${pkgdir}/.stamp_applied_${p}" + fi + done + fi + + mkdir -p "${pkgdir}/build" + + if [ ! -f "${pkgdir}/.stamp_configured" ]; then + pushd "${pkgdir}/build" + ${CMAKE_EXE_WRAPPER} ${cmake} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_INSTALL_PREFIX="${PAWPAW_PREFIX}-host" \ + -DCMAKE_MODULE_PATH="${PAWPAW_PREFIX}-host/lib/cmake" \ + -DBUILD_SHARED_LIBS=OFF \ + ${extraconfrules} .. + touch ../.stamp_configured + popd + fi + + if [ ! -f "${pkgdir}/.stamp_built" ]; then + pushd "${pkgdir}/build" + make ${MAKE_ARGS} ${EXTRA_MAKE_ARGS} + touch ../.stamp_built + popd + fi + + if [ ! -f "${pkgdir}/.stamp_installed" ]; then + pushd "${pkgdir}/build" + make ${MAKE_ARGS} -j 1 install + touch ../.stamp_installed + popd + fi +} + # --------------------------------------------------------------------------------------------------------------------- function patch_file() { @@ -714,12 +801,17 @@ function install_file() { local version="${2}" local source="${3}" local targetdir="${4}" + local targetname="${5}" + + if [ -z "${targetname}" ]; then + targetname="$(basename ${source})" + fi local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}" - if [ ! -e "${PAWPAW_PREFIX}/${targetdir}/$(basename ${source})" ]; then + if [ ! -e "${PAWPAW_PREFIX}/${targetdir}/${targetname})" ]; then pushd "${pkgdir}" - cp -v "${source}" "${PAWPAW_PREFIX}/${targetdir}/" + cp -v "${source}" "${PAWPAW_PREFIX}/${targetdir}/${targetname}" popd fi } @@ -739,6 +831,32 @@ function link_file() { fi } +function link_host_file() { + local name="${1}" + local version="${2}" + local source="${3}" + local target="${4}" + + local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}" + + if [ ! -e "${PAWPAW_PREFIX}-host/${target}" ]; then + ln -sfv "${source}" "${PAWPAW_PREFIX}-host/${target}" + fi +} + +function link_target_file() { + local name="${1}" + local version="${2}" + local source="${3}" + local target="${4}" + + local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}" + + if [ ! -e "${PAWPAW_PREFIX}/${target}" ]; then + ln -sfv "${source}" "${PAWPAW_PREFIX}/${target}" + fi +} + function remove_file() { local name="${1}" local version="${2}"