summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Arndt2020-04-04 21:17:26 +0200
committerChristopher Arndt2020-04-04 21:17:26 +0200
commit2eeec5507faeb7629f17a3aae604cf7f8f28efa9 (patch)
treeb3fd69d45b6afaf74bd0fd0d9cf8a5b7a4087c6f
parentde033cfe4c129ea6cae037379c78f6c30e0394ec (diff)
downloadaur-2eeec5507faeb7629f17a3aae604cf7f8f28efa9.tar.gz
Fix compile error with recent GCC
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD11
-rw-r--r--juce-pixel.patch106
3 files changed, 115 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index c4538fcaea9e..ce359cae9f6f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,5 +2,6 @@ src/
pkg/
RELEASE_*.tar.gz
tunefish4-*.tar.xz
+tunefish4-*.tar.zst
tunefish4-*.src.tar.gz
.AURINFO
diff --git a/PKGBUILD b/PKGBUILD
index c35859997851..0d39ae10b12b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=tunefish4
pkgver=4.1.0
-pkgrel=1
+pkgrel=2
pkgdesc="An additive wavetable-based synthesizer VST plugin"
arch=('x86_64')
url="http://www.tunefish-synth.com/"
@@ -10,8 +10,10 @@ url="http://www.tunefish-synth.com/"
license=("GPL3")
groups=('vst-plugins')
depends=('alsa-lib' 'freetype2' 'libglvnd')
-source=("https://github.com/paynebc/tunefish/archive/RELEASE_${pkgver//./_}.tar.gz")
-sha256sums=('89e549acbdc4dc1f5bf094b6ee3968d8adb651b5078da4057f814617ca307b42')
+source=("https://github.com/paynebc/tunefish/archive/RELEASE_${pkgver//./_}.tar.gz"
+ "juce-pixel.patch")
+sha256sums=('89e549acbdc4dc1f5bf094b6ee3968d8adb651b5078da4057f814617ca307b42'
+ '5569a557492a6a41bf5f0e6fa2d3ecabd02cf2e9859c96401d0a53eaefa2c7d4')
prepare() {
@@ -24,6 +26,9 @@ prepare() {
JuceLibraryCode/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp; do
sed -i -e 's|public.sdk/source/vst2.x|vst36|g' "$file"
done
+
+ msg2 "Patching JUCE graphics..."
+ patch -p0 -N -i "${srcdir}/juce-pixel.patch"
}
build() {
diff --git a/juce-pixel.patch b/juce-pixel.patch
new file mode 100644
index 000000000000..874895ed1648
--- /dev/null
+++ b/juce-pixel.patch
@@ -0,0 +1,106 @@
+diff -uNr JuceLibraryCode.orig/modules/juce_graphics/colour/juce_PixelFormats.h JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h
+--- JuceLibraryCode.orig/modules/juce_graphics/colour/juce_PixelFormats.h 2020-04-04 20:56:19.413373918 +0200
++++ JuceLibraryCode/modules/juce_graphics/colour/juce_PixelFormats.h 2020-04-04 20:58:17.006708806 +0200
+@@ -108,19 +108,6 @@
+ forcedinline uint8 getGreen() const noexcept { return components.g; }
+ forcedinline uint8 getBlue() const noexcept { return components.b; }
+
+- #if JUCE_GCC && ! JUCE_CLANG
+- // NB these are here as a workaround because GCC refuses to bind to packed values.
+- forcedinline uint8& getAlpha() noexcept { return comps [indexA]; }
+- forcedinline uint8& getRed() noexcept { return comps [indexR]; }
+- forcedinline uint8& getGreen() noexcept { return comps [indexG]; }
+- forcedinline uint8& getBlue() noexcept { return comps [indexB]; }
+- #else
+- forcedinline uint8& getAlpha() noexcept { return components.a; }
+- forcedinline uint8& getRed() noexcept { return components.r; }
+- forcedinline uint8& getGreen() noexcept { return components.g; }
+- forcedinline uint8& getBlue() noexcept { return components.b; }
+- #endif
+-
+ //==============================================================================
+ /** Copies another pixel colour over this one.
+
+@@ -339,9 +326,6 @@
+ {
+ uint32 internal;
+ Components components;
+- #if JUCE_GCC
+- uint8 comps[4]; // helper struct needed because gcc does not allow references to packed union members
+- #endif
+ };
+ }
+ #ifndef DOXYGEN
+diff -uNr JuceLibraryCode.orig/modules/juce_graphics/native/juce_RenderingHelpers.h JuceLibraryCode/modules/juce_graphics/native/juce_RenderingHelpers.h
+--- JuceLibraryCode.orig/modules/juce_graphics/native/juce_RenderingHelpers.h 2020-04-04 20:56:19.420040586 +0200
++++ JuceLibraryCode/modules/juce_graphics/native/juce_RenderingHelpers.h 2020-04-04 21:01:35.270044739 +0200
+@@ -583,10 +583,6 @@
+ {
+ areRGBComponentsEqual = sourceColour.getRed() == sourceColour.getGreen()
+ && sourceColour.getGreen() == sourceColour.getBlue();
+- filler[0].set (sourceColour);
+- filler[1].set (sourceColour);
+- filler[2].set (sourceColour);
+- filler[3].set (sourceColour);
+ }
+ else
+ {
+@@ -642,7 +638,6 @@
+ const Image::BitmapData& destData;
+ PixelType* linePixels;
+ PixelARGB sourceColour;
+- PixelRGB filler [4];
+ bool areRGBComponentsEqual;
+
+ forcedinline PixelType* getPixel (const int x) const noexcept
+@@ -657,47 +652,10 @@
+
+ forcedinline void replaceLine (PixelRGB* dest, const PixelARGB colour, int width) const noexcept
+ {
+- if (destData.pixelStride == sizeof (*dest))
+- {
+- if (areRGBComponentsEqual) // if all the component values are the same, we can cheat..
+- {
+- memset (dest, colour.getRed(), (size_t) width * 3);
+- }
+- else
+- {
+- if (width >> 5)
+- {
+- const int* const intFiller = reinterpret_cast<const int*> (filler);
+-
+- while (width > 8 && (((pointer_sized_int) dest) & 7) != 0)
+- {
+- dest->set (colour);
+- ++dest;
+- --width;
+- }
+-
+- while (width > 4)
+- {
+- int* d = reinterpret_cast<int*> (dest);
+- *d++ = intFiller[0];
+- *d++ = intFiller[1];
+- *d++ = intFiller[2];
+- dest = reinterpret_cast<PixelRGB*> (d);
+- width -= 4;
+- }
+- }
+-
+- while (--width >= 0)
+- {
+- dest->set (colour);
+- ++dest;
+- }
+- }
+- }
++ if ((size_t) destData.pixelStride == sizeof (*dest) && areRGBComponentsEqual)
++ memset ((void*) dest, colour.getRed(), (size_t) width * 3); // if all the component values are the same, we can cheat.
+ else
+- {
+- JUCE_PERFORM_PIXEL_OP_LOOP (set (colour))
+- }
++ JUCE_PERFORM_PIXEL_OP_LOOP (set (colour));
+ }
+
+ forcedinline void replaceLine (PixelAlpha* dest, const PixelARGB colour, int width) const noexcept