ensemble-chorus: unpin gcc8

fix build to use default gcc toolchain which fixes link errors
associated with building against mismatched libstd++

patch vendored juice library to remove packed attributes which cause
compile errors but add static asserts to verify that the struct / class
layouts are identical regardless of attribute

annalee c8bdca3a 3e0bedf9

+61 -1
+5
pkgs/applications/audio/ensemble-chorus/default.nix
··· 12 12 fetchSubmodules = true; 13 13 }; 14 14 15 + patches = [ 16 + # fix compile error regarding packed attribute in 3rd party juice library 17 + ./juice-cxx-packing-fix.diff 18 + ]; 19 + 15 20 nativeBuildInputs = [ cmake pkg-config ]; 16 21 17 22 buildInputs = [
+55
pkgs/applications/audio/ensemble-chorus/juice-cxx-packing-fix.diff
··· 1 + diff --git a/thirdparty/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h b/thirdparty/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h 2 + index 69a66e4..3e50635 100644 3 + --- a/thirdparty/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h 4 + +++ b/thirdparty/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h 5 + @@ -111,18 +111,10 @@ public: 6 + forcedinline uint8 getGreen() const noexcept { return components.g; } 7 + forcedinline uint8 getBlue() const noexcept { return components.b; } 8 + 9 + - #if JUCE_GCC 10 + - // NB these are here as a workaround because GCC refuses to bind to packed values. 11 + - forcedinline uint8& getAlpha() noexcept { return comps [indexA]; } 12 + - forcedinline uint8& getRed() noexcept { return comps [indexR]; } 13 + - forcedinline uint8& getGreen() noexcept { return comps [indexG]; } 14 + - forcedinline uint8& getBlue() noexcept { return comps [indexB]; } 15 + - #else 16 + forcedinline uint8& getAlpha() noexcept { return components.a; } 17 + forcedinline uint8& getRed() noexcept { return components.r; } 18 + forcedinline uint8& getGreen() noexcept { return components.g; } 19 + forcedinline uint8& getBlue() noexcept { return components.b; } 20 + - #endif 21 + 22 + //============================================================================== 23 + /** Copies another pixel colour over this one. 24 + @@ -336,21 +328,22 @@ private: 25 + uint8 b, g, r, a; 26 + #endif 27 + #endif 28 + - } JUCE_PACKED; 29 + + }; 30 + + 31 + + // structure must be packed but using the packed attribute causes compile 32 + + // failures with newer c++ compilers. Verify default packing produces same layout 33 + + static_assert(sizeof(Components) == 4, "Components struct is not packed"); 34 + 35 + union 36 + { 37 + uint32 internal; 38 + Components components; 39 + - #if JUCE_GCC 40 + - uint8 comps[4]; // helper struct needed because gcc does not allow references to packed union members 41 + - #endif 42 + }; 43 + -} 44 + -#ifndef DOXYGEN 45 + - JUCE_PACKED 46 + -#endif 47 + -; 48 + +}; 49 + + 50 + +// class must be packed but using the packed attribute causes compile 51 + +// failures with newer c++ compilers. Verify default packing produces same layout 52 + +static_assert(sizeof(PixelARGB) == 4, "PixelARGB class is not packed"); 53 + 54 + 55 + //==============================================================================
+1 -1
pkgs/top-level/all-packages.nix
··· 7823 7823 7824 7824 enscript = callPackage ../tools/text/enscript { }; 7825 7825 7826 - ensemble-chorus = callPackage ../applications/audio/ensemble-chorus { stdenv = gcc8Stdenv; }; 7826 + ensemble-chorus = callPackage ../applications/audio/ensemble-chorus { }; 7827 7827 7828 7828 entr = callPackage ../tools/misc/entr { }; 7829 7829