Skip to content

Commit

Permalink
Rework juce packaging, split 6.0, 6.1 and 7.0 variants
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Dec 28, 2023
1 parent 7367e7c commit 18daabe
Show file tree
Hide file tree
Showing 47 changed files with 428 additions and 196 deletions.
5 changes: 5 additions & 0 deletions sources/libs/distrho-juce-6.0/debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distrho-juce-6.0 (6:6.0.8+git2023-12-25-1kxstudio3) focal; urgency=medium

* Initial package

-- falkTX <falktx@falktx.com> Mon, 25 Dec 2023 14:29:55 +0100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: distrho-juce6
Source: distrho-juce-6.0
Section: devel
Priority: optional
Maintainer: falkTX <falktx@falktx.com>
Expand All @@ -17,19 +17,19 @@ Standards-Version: 4.5.0
Homepage: https://github.com/DISTRHO/JUCE/
Rules-Requires-Root: no

Package: distrho-juce6-bin
Package: distrho-juce-6.0-bin
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: cross-platform C++ framework with DISTRHO/KXStudio changes
JUCE is an open-source cross-platform C++ application framework used for
rapidly developing high quality desktop and mobile applications,
including LV2, VST, AU (and AUv3), RTAS and AAX audio plug-ins.
.
This package provides the DISTRHO/KXStudio fork of JUCE, version 6.
This package provides the DISTRHO/KXStudio fork of JUCE, version 6.0.

Package: distrho-juce6-dev
Package: distrho-juce-6.0-dev
Architecture: all
Depends: ${misc:Depends}, distrho-juce6-bin,
Depends: ${misc:Depends}, distrho-juce-6.0-bin,
cmake,
pkg-config,
libfreetype6-dev,
Expand All @@ -44,4 +44,4 @@ Description: cross-platform C++ framework with DISTRHO/KXStudio changes
rapidly developing high quality desktop and mobile applications,
including LV2, VST, AU (and AUv3), RTAS and AAX audio plug-ins.
.
This package provides the DISTRHO/KXStudio fork of JUCE, version 6.
This package provides the DISTRHO/KXStudio fork of JUCE, version 6.0.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/opt/kxstudio/include
/opt/kxstudio/lib
extras/Build/CMake/lv2_ttl_generator.c /opt/kxstudio/lib/cmake/JUCE6/
extras/Build/CMake/lv2_ttl_generator.c /opt/kxstudio/lib/cmake/JUCE-6.0.8/
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/opt/kxstudio/lib/cmake/JUCE-6.0.8/JUCEConfig.cmake /opt/kxstudio/lib/cmake/JUCE-6.0.8/JUCE-6.0.8Config.cmake
Original file line number Diff line number Diff line change
@@ -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)
+ 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 "$<TARGET_BUNDLE_CONTENT_DIR:${dest_target}>")
@@ -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)

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake
index 1d8408ebc..060ed45e3 100644
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)
Expand Down
5 changes: 5 additions & 0 deletions sources/libs/distrho-juce-6.0/debian/patches/series
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
01_kxstudio-build.patch
02_skip-alsa-dependency.patch
03_versioned-juceaide.patch
04_copy-to-destdir.patch
05_disable-xinerama.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ override_dh_auto_configure:
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/opt/kxstudio \
-DJUCE_BUILD_HELPER_TOOLS=ON \
-DJUCE_INSTALL_DESTINATION=lib/cmake/JUCE6
-DJUCE_INSTALL_DESTINATION=lib/cmake/JUCE-6.0.8

override_dh_auto_install:
dh_auto_install
install -d $(CURDIR)/debian/distrho-juce6-bin/opt/kxstudio/bin
install -d $(CURDIR)/debian/tmp/opt/kxstudio/bin
install -m 755 $(CURDIR)/obj-*/extras/Build/juceaide/juceaide_artefacts/Release/juceaide \
$(CURDIR)/debian/distrho-juce6-bin/opt/kxstudio/bin/juceaide6
$(CURDIR)/debian/tmp/opt/kxstudio/bin/juceaide60

%:
dh $@ -Scmake
1 change: 1 addition & 0 deletions sources/libs/distrho-juce-6.0/debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (native)
5 changes: 5 additions & 0 deletions sources/libs/distrho-juce-6.1/debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distrho-juce-6.1 (6:6.1.6+git2023-12-25-1kxstudio2) focal; urgency=medium

* Initial package

-- falkTX <falktx@falktx.com> Mon, 25 Dec 2023 14:29:55 +0100
47 changes: 47 additions & 0 deletions sources/libs/distrho-juce-6.1/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Source: distrho-juce-6.1
Section: devel
Priority: optional
Maintainer: falkTX <falktx@falktx.com>
Build-Depends: debhelper-compat (= 13),
kxstudio-build-scripts,
cmake,
pkg-config,
libfreetype6-dev,
libgl1-mesa-dev | libglvnd-dev,
libx11-dev,
libxcomposite-dev,
libxcursor-dev,
libxrandr-dev,
libxrender-dev
Standards-Version: 4.5.0
Homepage: https://github.com/DISTRHO/JUCE/
Rules-Requires-Root: no

Package: distrho-juce-6.1-bin
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: cross-platform C++ framework with DISTRHO/KXStudio changes
JUCE is an open-source cross-platform C++ application framework used for
rapidly developing high quality desktop and mobile applications,
including LV2, VST, AU (and AUv3), RTAS and AAX audio plug-ins.
.
This package provides the DISTRHO/KXStudio fork of JUCE, version 6.1.

Package: distrho-juce-6.1-dev
Architecture: all
Depends: ${misc:Depends}, distrho-juce-6.1-bin,
cmake,
pkg-config,
libfreetype6-dev,
libgl1-mesa-dev | libglvnd-dev,
libx11-dev,
libxcomposite-dev,
libxcursor-dev,
libxrandr-dev,
libxrender-dev
Description: cross-platform C++ framework with DISTRHO/KXStudio changes
JUCE is an open-source cross-platform C++ application framework used for
rapidly developing high quality desktop and mobile applications,
including LV2, VST, AU (and AUv3), RTAS and AAX audio plug-ins.
.
This package provides the DISTRHO/KXStudio fork of JUCE, version 6.1.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/opt/kxstudio/bin
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/opt/kxstudio/include
/opt/kxstudio/lib
extras/Build/CMake/lv2_ttl_generator.c /opt/kxstudio/lib/cmake/JUCE-6.1.6/
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/opt/kxstudio/lib/cmake/JUCE-6.1.6/JUCEConfig.cmake /opt/kxstudio/lib/cmake/JUCE-6.1.6/JUCE-6.1.6Config.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake
index 58e65087c..cb13f9fee 100644
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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/modules/juce_audio_devices/juce_audio_devices.h b/modules/juce_audio_devices/juce_audio_devices.h
index 0cc0a4496..f0eb557e5 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
@@ -105,7 +104,7 @@
Enables ALSA audio devices (Linux only).
*/
#ifndef JUCE_ALSA
- #define JUCE_ALSA 1
+ #define JUCE_ALSA 0
#endif

/** Config: JUCE_JACK
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/extras/Build/CMake/JUCEConfig.cmake.in b/extras/Build/CMake/JUCEConfig.cmake.in
index 3e5c97de5..5609fa7bd 100644
index 782c732..9f29061 100644
--- a/extras/Build/CMake/JUCEConfig.cmake.in
+++ b/extras/Build/CMake/JUCEConfig.cmake.in
@@ -20,10 +20,12 @@
Expand All @@ -12,87 +12,87 @@ index 3e5c97de5..5609fa7bd 100644
- IMPORTED_LOCATION "@PACKAGE_JUCEAIDE_PATH@")
+set(PACKAGE_PREFIX_DIR "@CMAKE_INSTALL_PREFIX@")
+
+if(NOT TARGET juceaide6)
+ add_executable(juceaide6 IMPORTED)
+ set_target_properties(juceaide6 PROPERTIES
+ IMPORTED_LOCATION "${PACKAGE_PREFIX_DIR}/bin/juceaide6")
+if(NOT TARGET juceaide61)
+ add_executable(juceaide61 IMPORTED)
+ 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 1d8408ebc..8c6a253fe 100644
index 786fc3a..86af138 100644
--- a/extras/Build/CMake/JUCEUtils.cmake
+++ b/extras/Build/CMake/JUCEUtils.cmake
@@ -419,7 +419,7 @@ function(_juce_add_au_resource_fork shared_code_target au_target)
@@ -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 juceaide6 auplugindefines "${defs_file}" "${secret_au_plugindefines}"
+ COMMAND juceaide61 auplugindefines "${defs_file}" "${secret_au_plugindefines}"
DEPENDS "${defs_file}"
VERBATIM)

@@ -861,7 +861,7 @@ function(juce_add_binary_data target)
list(APPEND binary_file_names "${juce_binary_data_folder}/${JUCE_ARG_HEADER_NAME}")
@@ -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 juceaide6 binarydata "${JUCE_ARG_NAMESPACE}" "${JUCE_ARG_HEADER_NAME}"
${juce_binary_data_folder} ${JUCE_ARG_SOURCES}
+ COMMAND juceaide61 binarydata "${JUCE_ARG_NAMESPACE}" "${JUCE_ARG_HEADER_NAME}"
${juce_binary_data_folder} "${input_file_list}"
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
DEPENDS ${JUCE_ARG_SOURCES}
@@ -958,7 +958,7 @@ function(juce_generate_juce_header target)
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 juceaide6 header "${defs_file}" "${juce_header}" ${extra_args}
+ COMMAND juceaide61 header "${defs_file}" "${juce_header}" ${extra_args}
DEPENDS "${defs_file}"
VERBATIM)
endfunction()
@@ -966,20 +966,20 @@ 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 juceaide6)
+ message(FATAL_ERROR "The juceaide6 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(juceaide6_location juceaide6 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 "${juceaide6_location}")
+ message(FATAL_ERROR "juceaide6 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 "${juceaide6_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 juceaide6 failed")
+ message(FATAL_ERROR "Running juceaide61 failed")
endif()
endfunction()

@@ -1100,7 +1100,7 @@ function(_juce_configure_bundle source_target dest_target)
@@ -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 juceaide6 pkginfo "${juce_kind_string}" "${this_output_pkginfo}"
+ COMMAND juceaide61 pkginfo "${juce_kind_string}" "${this_output_pkginfo}"
VERBATIM)

set(output_folder "$<TARGET_BUNDLE_CONTENT_DIR:${dest_target}>")
@@ -1192,7 +1192,7 @@ function(_juce_add_resources_rc source_target dest_target)
@@ -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 juceaide6 rcfile "${input_info_file}" "${resource_rc_file}"
+ COMMAND juceaide61 rcfile "${input_info_file}" "${resource_rc_file}"
${dependency}
VERBATIM)

Original file line number Diff line number Diff line change
@@ -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()

Loading

0 comments on commit 18daabe

Please sign in to comment.