diff --git a/bootstrap.sh b/bootstrap.sh index 250cc970..2ba24d0e 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -249,6 +249,7 @@ elif [ "${BUILDTARGET}" = "juce" ]; then ${BR2_MAKE} juce-6.0 ${BR2_MAKE} juce-6.1 ${BR2_MAKE} juce-7.0 + ${BR2_MAKE} juce-8.0 ${BR2_MAKE} mod-plugin-builder elif [ "${BUILDTARGET}" = "dev" ]; then ${BR2_MAKE} host-python3 diff --git a/local.env b/local.env index eea5ea61..416c2c34 100644 --- a/local.env +++ b/local.env @@ -75,6 +75,7 @@ export HOST_DIR export JUCE_6_0_TOOLCHAIN_FILE="${STAGING_DIR}/usr/lib/cmake/JUCE-6.0.8/toolchainfile.cmake" export JUCE_6_1_TOOLCHAIN_FILE="${STAGING_DIR}/usr/lib/cmake/JUCE-6.1.6/toolchainfile.cmake" export JUCE_7_0_TOOLCHAIN_FILE="${STAGING_DIR}/usr/lib/cmake/JUCE-7.0.9/toolchainfile.cmake" +export JUCE_8_0_TOOLCHAIN_FILE="${STAGING_DIR}/usr/lib/cmake/JUCE-8.0.4/toolchainfile.cmake" alias ar=${AR} alias cc=${CC} diff --git a/patches/crosstool-ng-1.25.0/gcc-9.4.0/0020-fix-utility-make-integer-seq.patch b/patches/crosstool-ng-1.25.0/gcc-9.4.0/0020-fix-utility-make-integer-seq.patch new file mode 100644 index 00000000..d33ec3fd --- /dev/null +++ b/patches/crosstool-ng-1.25.0/gcc-9.4.0/0020-fix-utility-make-integer-seq.patch @@ -0,0 +1,13 @@ +diff --git a/libstdc++-v3/include/std/utility b/libstdc++-v3/include/std/utility +index c687c1d..d651b92 100644 +--- a/libstdc++-v3/include/std/utility ++++ b/libstdc++-v3/include/std/utility +@@ -293,7 +293,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION + + #ifdef __has_builtin + # if __has_builtin(__make_integer_seq) +-# define _GLIBCXX_USE_MAKE_INTEGER_SEQ 1 ++# define _GLIBCXX_USE_MAKE_INTEGER_SEQ 0 + # endif + #endif + diff --git a/plugins-dep/package/juce-8.0/01_always-generate-lv2-helper.patch b/plugins-dep/package/juce-8.0/01_always-generate-lv2-helper.patch new file mode 100644 index 00000000..8268123d --- /dev/null +++ b/plugins-dep/package/juce-8.0/01_always-generate-lv2-helper.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 019aa86..b057f81 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -177,7 +177,7 @@ install(FILES "${JUCE_BINARY_DIR}/JUCEConfigVersion.cmake" + "${JUCE_CMAKE_UTILS_DIR}/juce_LinuxSubprocessHelper.cpp" + DESTINATION "${JUCE_INSTALL_DESTINATION}") + +-if(("${CMAKE_SOURCE_DIR}" STREQUAL "${JUCE_SOURCE_DIR}") AND (NOT JUCE_BUILD_HELPER_TOOLS)) ++if("${CMAKE_SOURCE_DIR}" STREQUAL "${JUCE_SOURCE_DIR}") + _juce_add_lv2_manifest_helper_target() + + if(TARGET juce_lv2_helper) diff --git a/plugins-dep/package/juce-8.0/02_do-not-set-PTHREAD_PRIO_INHERIT.patch b/plugins-dep/package/juce-8.0/02_do-not-set-PTHREAD_PRIO_INHERIT.patch new file mode 100644 index 00000000..39720919 --- /dev/null +++ b/plugins-dep/package/juce-8.0/02_do-not-set-PTHREAD_PRIO_INHERIT.patch @@ -0,0 +1,13 @@ +diff --git a/modules/juce_core/native/juce_SharedCode_posix.h b/modules/juce_core/native/juce_SharedCode_posix.h +index c53ef0f..1590662 100644 +--- a/modules/juce_core/native/juce_SharedCode_posix.h ++++ b/modules/juce_core/native/juce_SharedCode_posix.h +@@ -40,7 +40,7 @@ CriticalSection::CriticalSection() noexcept + pthread_mutexattr_t atts; + pthread_mutexattr_init (&atts); + pthread_mutexattr_settype (&atts, PTHREAD_MUTEX_RECURSIVE); +- #if ! JUCE_ANDROID ++ #if ! JUCE_ANDROID && ! JUCE_ARM + pthread_mutexattr_setprotocol (&atts, PTHREAD_PRIO_INHERIT); + #endif + pthread_mutex_init (&lock, &atts); diff --git a/plugins-dep/package/juce-8.0/Config.in b/plugins-dep/package/juce-8.0/Config.in new file mode 100644 index 00000000..0d0038f6 --- /dev/null +++ b/plugins-dep/package/juce-8.0/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_JUCE_8_0 + bool "juce-8.0" + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_XLIB_LIBX11 diff --git a/plugins-dep/package/juce-8.0/juce-8.0.mk b/plugins-dep/package/juce-8.0/juce-8.0.mk new file mode 100644 index 00000000..3f654a78 --- /dev/null +++ b/plugins-dep/package/juce-8.0/juce-8.0.mk @@ -0,0 +1,59 @@ +###################################### +# +# juce-8.0 +# +###################################### + +JUCE_8_0_VERSION = 51d11a2be6d5c97ccf12b4e5e827006e19f0555a +JUCE_8_0_VERSION_PROJECT = JUCE-8.0.4 +JUCE_8_0_SITE = $(call github,juce-framework,juce,$(JUCE_8_0_VERSION)) +JUCE_8_0_DEPENDENCIES = host-juce-8.0 freetype xlib_libX11 +JUCE_8_0_INSTALL_STAGING = YES +JUCE_8_0_TOOLCHAIN_FILE = $(STAGING_DIR)/usr/lib/cmake/$(JUCE_8_0_VERSION_PROJECT)/toolchainfile.cmake +HOST_JUCE_8_0_DEPENDENCIES = host-cmake host-freetype host-xlib_libX11 + +# this custom configure follows the same rules as buildroot, with these exceptions: +# - CMAKE_FIND_ROOT_PATH_MODE_PROGRAM="ONLY" (buildroot uses "NEVER") +# - CMAKE_MAKE_PROGRAM="/usr/bin/make" (not needed in buildroot, only for juce) +# - PKG_CONFIG related env vars (buildroot unsets them for the build) +define HOST_JUCE_8_0_CONFIGURE_CMDS + (mkdir -p $(@D) && cd $(@D) && rm -f CMakeCache.txt && \ + env PKG_CONFIG_SYSROOT_DIR="$(HOST_DIR)" PKG_CONFIG_PATH="$(HOST_DIR)/usr/lib/pkgconfig" \ + $(HOST_DIR)/usr/bin/cmake $(@D) \ + -DCMAKE_INSTALL_PREFIX=$(HOST_DIR)/usr \ + -DCMAKE_INSTALL_SO_NO_EXE=0 \ + -DCMAKE_FIND_ROOT_PATH="$(HOST_DIR)" \ + -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="ONLY" \ + -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE="ONLY" \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="ONLY" \ + -DCMAKE_MAKE_PROGRAM="/usr/bin/make" \ + -DCMAKE_C_COMPILER="$(HOSTCC)" \ + -DCMAKE_CXX_COMPILER="$(HOSTCXX)" \ + -DCMAKE_CXX_FLAGS="$(HOST_CXXFLAGS) -DJUCE_USE_CURL=0 -DJUCE_USE_XCURSOR=0 -DJUCE_USE_XINERAMA=0 -DJUCE_USE_XRANDR=0 -DJUCE_USE_XSHM=0" \ + -DJUCE_BUILD_HELPER_TOOLS=ON \ + -DJUCE_INSTALL_DESTINATION=lib/cmake/$(JUCE_8_0_VERSION_PROJECT) \ + ) +endef + +define HOST_JUCE_8_0_POST_INSTALL_JUCEAIDE + $(INSTALL) -d $(HOST_DIR)/usr/bin/$(JUCE_8_0_VERSION_PROJECT) + $(INSTALL) -m 755 $(@D)/extras/Build/juceaide/juceaide_artefacts/juceaide $(HOST_DIR)/usr/bin/$(JUCE_8_0_VERSION_PROJECT) + $(INSTALL) -m 644 $($(PKG)_PKGDIR)/toolchainfile.cmake $(HOST_DIR)/usr/lib/cmake/$(JUCE_8_0_VERSION_PROJECT)/ +endef + +HOST_JUCE_8_0_POST_INSTALL_HOOKS += HOST_JUCE_8_0_POST_INSTALL_JUCEAIDE + +define JUCE_8_0_INSTALL_STAGING_CMDS + $(INSTALL) -d $(STAGING_DIR)/usr/bin/$(JUCE_8_0_VERSION_PROJECT) + $(INSTALL) -d $(STAGING_DIR)/usr/include + $(INSTALL) -d $(STAGING_DIR)/usr/lib/cmake + cp $(HOST_DIR)/usr/bin/$(JUCE_8_0_VERSION_PROJECT)/juceaide $(STAGING_DIR)/usr/bin/$(JUCE_8_0_VERSION_PROJECT)/ + cp $(HOST_DIR)/usr/bin/$(JUCE_8_0_VERSION_PROJECT)/juce_lv2_helper $(STAGING_DIR)/usr/bin/$(JUCE_8_0_VERSION_PROJECT)/ + cp $(HOST_DIR)/usr/bin/$(JUCE_8_0_VERSION_PROJECT)/juce_vst3_helper $(STAGING_DIR)/usr/bin/$(JUCE_8_0_VERSION_PROJECT)/ + cp -r $(HOST_DIR)/usr/include/$(JUCE_8_0_VERSION_PROJECT) $(STAGING_DIR)/usr/include/ + cp -r $(HOST_DIR)/usr/lib/cmake/$(JUCE_8_0_VERSION_PROJECT) $(STAGING_DIR)/usr/lib/cmake/ + ln -sf JUCEConfig.cmake $(STAGING_DIR)/usr/lib/cmake/$(JUCE_8_0_VERSION_PROJECT)/$(JUCE_8_0_VERSION_PROJECT)Config.cmake +endef + +$(eval $(generic-package)) +$(eval $(host-cmake-package)) diff --git a/plugins-dep/package/juce-8.0/toolchainfile.cmake b/plugins-dep/package/juce-8.0/toolchainfile.cmake new file mode 100644 index 00000000..b5fec62c --- /dev/null +++ b/plugins-dep/package/juce-8.0/toolchainfile.cmake @@ -0,0 +1,24 @@ +# Aide juceaide in MOD builds + +set(HOST_DIR "$ENV{HOST_DIR}") +get_filename_component(TARGET_DIR "${HOST_DIR}/../target" REALPATH) + +include("${HOST_DIR}/usr/share/buildroot/toolchainfile.cmake") + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DJUCE_USE_CURL=0") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DJUCE_USE_XCURSOR=0") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DJUCE_USE_XINERAMA=0") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DJUCE_USE_XRANDR=0") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DJUCE_USE_XSHM=0") + +if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + set(CROSSCOMPILING TRUE) + set(CROSSCOMPILING_EMULATOR qemu-aarch64-static -L "${TARGET_DIR}") + separate_arguments(CMAKE_CROSSCOMPILING_EMULATOR) +elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l") + set(CROSSCOMPILING TRUE) + set(CROSSCOMPILING_EMULATOR qemu-arm-static -L "${TARGET_DIR}") + separate_arguments(CMAKE_CROSSCOMPILING_EMULATOR) +endif() + +set(JUCE_MOD_BUILD TRUE)