diff options
author | Cheng Sun | 2019-11-09 18:10:12 +0000 |
---|---|---|
committer | Cheng Sun | 2019-11-09 18:10:12 +0000 |
commit | e0229871d60e8b380a78a77f6d2e9ea79f407215 (patch) | |
tree | f47d86ccf2f487740db1819a350371aabe74c6fe | |
parent | d153bf886385430ced76706ff29a30b45bc1ded3 (diff) | |
download | aur-e0229871d60e8b380a78a77f6d2e9ea79f407215.tar.gz |
Fix for GCC 9; also fix share directory
helm always looks in /usr/share/helm for factory presets.
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rw-r--r-- | gcc9.patch | 150 |
3 files changed, 162 insertions, 5 deletions
@@ -1,7 +1,7 @@ pkgbase = helm-vst pkgdesc = a cross-platform, polyphonic synthesizer VST plugin pkgver = 0.9.0 - pkgrel = 1 + pkgrel = 2 url = http://tytel.org/helm/ arch = x86_64 groups = vst-plugins @@ -10,8 +10,11 @@ pkgbase = helm-vst depends = alsa-lib depends = freetype2 depends = mesa + conflicts = helm source = https://github.com/mtytel/helm/archive/v0.9.0.tar.gz + source = gcc9.patch sha256sums = 4004c11fd1d773cc2a12adb5336873bc86c5ecbd370b8da2820fed6ef5ec58ad + sha256sums = 1ffbd24a9e0b5631475eecccd0f6d5c6985a3c2100ef27f94481adae909d9869 pkgname = helm-vst @@ -4,7 +4,7 @@ pkgname='helm-vst' _pkgname='helm' pkgver=0.9.0 -pkgrel=1 +pkgrel=2 pkgdesc='a cross-platform, polyphonic synthesizer VST plugin' arch=('x86_64') url='http://tytel.org/helm/' @@ -12,12 +12,17 @@ license=('GPL') groups=('vst-plugins') depends=('alsa-lib' 'freetype2' 'mesa') makedepends=('steinberg-vst36') -source=("https://github.com/mtytel/helm/archive/v${pkgver}.tar.gz") -sha256sums=('4004c11fd1d773cc2a12adb5336873bc86c5ecbd370b8da2820fed6ef5ec58ad') +source=("https://github.com/mtytel/helm/archive/v${pkgver}.tar.gz" + gcc9.patch) +sha256sums=('4004c11fd1d773cc2a12adb5336873bc86c5ecbd370b8da2820fed6ef5ec58ad' + '1ffbd24a9e0b5631475eecccd0f6d5c6985a3c2100ef27f94481adae909d9869') +conflicts=('helm') prepare() { cd "${srcdir}/${_pkgname}-${pkgver}" + patch -p1 < "${srcdir}/gcc9.patch" + msg2 "Fixing Makefiles..." sed -i -e "s|-I ~/srcs/VST3\\\\ SDK||" \ builds/linux/VST/Makefile @@ -44,5 +49,4 @@ package() { CXXFLAGS="${CXXFLAGS} -DHAVE_LROUND -Wno-error" make DESTDIR="$pkgdir" install_patches install -D builds/linux/VST/build/helm.so "${pkgdir}/usr/lib/vst/helm.so" - mv ${pkgdir}/usr/share/helm{,-vst} } diff --git a/gcc9.patch b/gcc9.patch new file mode 100644 index 000000000000..0ead8739a76a --- /dev/null +++ b/gcc9.patch @@ -0,0 +1,150 @@ +diff -U3 -r a/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h b/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h +--- a/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h 2019-11-09 17:47:03.667336495 +0000 ++++ b/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h 2019-11-09 17:47:14.317222479 +0000 +@@ -105,22 +105,9 @@ +
+ //==============================================================================
+ forcedinline uint8 getAlpha() const noexcept { return components.a; }
+- forcedinline uint8 getRed() const noexcept { return components.r; }
++ forcedinline uint8 getRed() const noexcept { return components.r; }
+ forcedinline uint8 getGreen() const noexcept { return components.g; }
+- forcedinline uint8 getBlue() const noexcept { return components.b; }
+-
+- #if JUCE_GCC
+- // 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
++ forcedinline uint8 getBlue() const noexcept { return components.b; }
+
+ //==============================================================================
+ /** Copies another pixel colour over this one.
+@@ -340,9 +327,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
+@@ -425,13 +409,9 @@ +
+ //==============================================================================
+ forcedinline uint8 getAlpha() const noexcept { return 0xff; }
+- forcedinline uint8 getRed() const noexcept { return r; }
++ forcedinline uint8 getRed() const noexcept { return r; }
+ forcedinline uint8 getGreen() const noexcept { return g; }
+- forcedinline uint8 getBlue() const noexcept { return b; }
+-
+- forcedinline uint8& getRed() noexcept { return r; }
+- forcedinline uint8& getGreen() noexcept { return g; }
+- forcedinline uint8& getBlue() noexcept { return b; }
++ forcedinline uint8 getBlue() const noexcept { return b; }
+
+ //==============================================================================
+ /** Copies another pixel colour over this one.
+@@ -646,11 +626,9 @@ +
+ //==============================================================================
+ forcedinline uint8 getAlpha() const noexcept { return a; }
+- forcedinline uint8& getAlpha() noexcept { return a; }
+-
+- forcedinline uint8 getRed() const noexcept { return 0; }
++ forcedinline uint8 getRed() const noexcept { return 0; }
+ forcedinline uint8 getGreen() const noexcept { return 0; }
+- forcedinline uint8 getBlue() const noexcept { return 0; }
++ forcedinline uint8 getBlue() const noexcept { return 0; }
+
+ //==============================================================================
+ /** Copies another pixel colour over this one.
+diff -U3 -r a/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h b/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h +--- a/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h 2019-11-09 17:47:03.674003090 +0000 ++++ b/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h 2019-11-09 17:48:26.099788240 +0000 +@@ -581,18 +581,10 @@ + : destData (image), sourceColour (colour)
+ {
+ if (sizeof (PixelType) == 3 && destData.pixelStride == sizeof (PixelType))
+- {
+ 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
+- {
+ areRGBComponentsEqual = false;
+- }
+ }
+
+ forcedinline void setEdgeTableYPos (const int y) noexcept
+@@ -643,7 +635,6 @@ + const Image::BitmapData& destData;
+ PixelType* linePixels;
+ PixelARGB sourceColour;
+- PixelRGB filler [4];
+ bool areRGBComponentsEqual;
+
+ forcedinline PixelType* getPixel (const int x) const noexcept
+@@ -658,47 +649,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;
+- }
+- }
+- }
+- else
+- {
+- JUCE_PERFORM_PIXEL_OP_LOOP (set (colour))
+- }
++ 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));
+ }
+
+ forcedinline void replaceLine (PixelAlpha* dest, const PixelARGB colour, int width) const noexcept
|