From 8c0bffb2b0feb74cd1e77ea162b3731301c2608a Mon Sep 17 00:00:00 2001 From: =?utf8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Mon, 16 Mar 2020 13:33:22 +0100 Subject: [PATCH] Add patch to allow overriding of pkg-config in generated Makefiles --- debian/patches/overridable_pkg-config.patch | 60 +++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 61 insertions(+) create mode 100644 debian/patches/overridable_pkg-config.patch diff --git a/debian/patches/overridable_pkg-config.patch b/debian/patches/overridable_pkg-config.patch new file mode 100644 index 00000000..89e6141a --- /dev/null +++ b/debian/patches/overridable_pkg-config.patch @@ -0,0 +1,60 @@ +From: Debian Multimedia Maintainers +Date: Mon, 16 Mar 2020 13:32:21 +0100 +Subject: Allow overridable pkg-config in generated Makefiles + +Origin: Debian +Bug: https://github.com/WeAreROLI/JUCE/issues/677 +Last-Update: 2020-03-16 + +E.g. to allow cross-building of juce-packages. +See also https://bugs.debian.org/951684 +Last-Update: 2020-03-16 +--- + .../Source/ProjectSaving/jucer_ProjectExport_Make.h | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h +index 2752788..2a5aa9f 100644 +--- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h ++++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h +@@ -246,8 +246,8 @@ public: + + if (! packages.isEmpty()) + { +- out << "\t@command -v pkg-config >/dev/null 2>&1 || { echo >&2 \"pkg-config not installed. Please, install it.\"; exit 1; }" << newLine +- << "\t@pkg-config --print-errors"; ++ out << "\t@command -v $(PKG_CONFIG) >/dev/null 2>&1 || { echo >&2 \"pkg-config not installed. Please, install it.\"; exit 1; }" << newLine ++ << "\t@$(PKG_CONFIG) --print-errors"; + + for (auto& pkg : packages) + out << " " << pkg; +@@ -507,7 +507,7 @@ private: + auto packages = getPackages(); + + if (packages.size() > 0) +- return "$(shell pkg-config --cflags " + packages.joinIntoString (" ") + ")"; ++ return "$(shell $(PKG_CONFIG) --cflags " + packages.joinIntoString (" ") + ")"; + + return {}; + } +@@ -517,7 +517,7 @@ private: + auto packages = getPackages(); + + if (packages.size() > 0) +- return "$(shell pkg-config --libs " + packages.joinIntoString (" ") + ")"; ++ return "$(shell $(PKG_CONFIG) --libs " + packages.joinIntoString (" ") + ")"; + + return {}; + } +@@ -912,6 +912,11 @@ private: + << "endif" << newLine + << newLine; + ++ out << "ifndef PKG_CONFIG" << newLine ++ << " PKG_CONFIG=pkg-config" << newLine ++ << "endif" << newLine ++ << newLine; ++ + out << "ifndef AR" << newLine + << " AR=ar" << newLine + << "endif" << newLine diff --git a/debian/patches/series b/debian/patches/series index d57bbe87..91be27dc 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -10,3 +10,4 @@ debian_vst.patch debian_link_systemlibs.patch 0011-Don-t-fail-fatally-if-gui-cannot-connect-to-X-server.patch cross.patch +overridable_pkg-config.patch -- 2.30.2