Patch to inject (arch-specific) build-flags into projects built with Projucer
authorIOhannes m zmölnig <zmoelnig@umlautS.umlaeute.mur.at>
Thu, 22 Aug 2019 07:49:46 +0000 (09:49 +0200)
committerIOhannes m zmölnig <zmoelnig@umlautS.umlaeute.mur.at>
Thu, 22 Aug 2019 07:49:46 +0000 (09:49 +0200)
debian/patches/debian_link_systemlibs.patch
debian/rules

index 5f69537c673ca6231910f8378119c43d98e44ffb..4be7166e2651d8f66992d88f8716933596ffd0ef 100644 (file)
@@ -49,3 +49,13 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
          packages.removeDuplicates (false);\r
  \r
          return packages;\r
+@@ -563,6 +596,9 @@
+         StringArray result (linuxLibs);\r
\r
+         auto libraries = StringArray::fromTokens (getExternalLibrariesString(), ";", "\"'");\r
++#ifdef DEBIAN_JUCERPROJECT_LIBS\r
++        libraries.addArray(StringArray::fromTokens (DEBIAN_JUCERPROJECT_LIBS, ";", "\"'"));\r
++#endif\r
+         libraries.removeEmptyStrings();\r
\r
+         for (auto& lib : libraries)\r
index 6b7634275234f4a543ce90a1996b8ca3baedb648..f87b6f75d92cce652715235278e49cc2bcf3ff21 100755 (executable)
@@ -30,6 +30,7 @@ noatomicarch = $(shell dpkg-architecture -qDEB_HOST_ARCH | egrep -x "(armel|powe
 # link with libatomic on architectures without built-in atomic
 ifeq ($(if $(noatomicarch),atomic), atomic)
        LDFLAGS += -latomic
+       CPPFLAGS += -DDEBIAN_JUCERPROJECT_LIBS='\"atomic\"'
 endif
 
 %:
@@ -41,6 +42,7 @@ override_dh_auto_build-arch:
        dh_auto_build -D $(DEB_SRCDIR) -- \
                V=1 \
                LDFLAGS="$(LDFLAGS)" \
+               CPPFLAGS="$(CPPFLAGS)" \
                $(empty)
        make -C debian/extra/lv2-ttl-generator/
        help2man -N \