Pass "-latomic" via the LIBS
authorIOhannes m zmölnig <zmoelnig@umlautS.umlaeute.mur.at>
Wed, 23 May 2018 17:55:12 +0000 (19:55 +0200)
committerIOhannes m zmölnig <zmoelnig@umlautS.umlaeute.mur.at>
Wed, 23 May 2018 17:55:12 +0000 (19:55 +0200)
debian/rules

index d780407c3d4587d396afc775a3f637f5fe136da1..0fa6998565d83549a5889de475d7687cb5517a01 100755 (executable)
@@ -12,6 +12,10 @@ endif
 
 JUCE_VERSION := $(shell dpkg-query --show --showformat='$${source:Version}' juce-modules-source)
 
+CPPFLAGS+=-DBUILD_DATE='"$(BUILD_DATE)"'
+CXXFLAGS+=-std=c++11 -Wno-error
+LIBS=$(shell pkg-config --libs libjpeg libpng)
+
 # JUCE (used by giada) uses some c++11 features requiring atomic_store_8 and
 # atomic_load_8, so we need to link with libatomic on
 # armel, powerpc, powerpcspe, m68k, mips, mipsel, and sh4
@@ -22,12 +26,9 @@ JUCE_VERSION := $(shell dpkg-query --show --showformat='$${source:Version}' juce
 noatomicarch = $(shell dpkg-architecture -qDEB_HOST_ARCH | egrep -x "(armel|powerpc|powerpcspe|m68k|mips|mipsel|sh4)")
 # link with libatomic on architectures without built-in atomic
 ifeq ($(if $(noatomicarch),atomic), atomic)
-       DEB_LDFLAGS_MAINT_APPEND += -latomic
+       LIBS += -latomic
 endif
 
-CPPFLAGS+=-DBUILD_DATE='"$(BUILD_DATE)"'
-CXXFLAGS+=-std=c++11 -Wno-error
-
 %:
        dh $@
 
@@ -36,7 +37,7 @@ override_dh_auto_configure:
                --enable-vst \
                --enable-system-catch \
                --target=linux \
-               LIBS="$(shell pkg-config --libs libjpeg libpng)"
+               LIBS="$(LIBS)"
 
 override_dh_auto_build:
        cp -rav /usr/share/juce src/deps/