diff options
author | Térence Clastres | 2020-11-29 12:55:41 +0100 |
---|---|---|
committer | Térence Clastres | 2020-11-29 13:10:55 +0100 |
commit | 6e95e3ed20f57d6bbc84e0c51b5abe7280dbe2d8 (patch) | |
tree | f4f7f3df0d2e02a0b538c780b6d6bb724cd88c29 | |
parent | 740f9ed7a0c5806c3b97f82170f53ef1fc5b0d01 (diff) | |
download | aur-6e95e3ed20f57d6bbc84e0c51b5abe7280dbe2d8.tar.gz |
Fix build
- Sync with community/giada
- Add vst2/3 support
- Remove unneeded gcc9 fix
- Allow rebuilding without --cleanbuild option
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | PKGBUILD | 80 | ||||
-rw-r--r-- | gcc9-fix.diff | 139 | ||||
-rw-r--r-- | giada-git-devendor_nlohmann_json.patch (renamed from giada-git-devendor_nlohmann-json.patch) | 24 | ||||
-rw-r--r-- | giada-git-rtmidi_cppflags.patch | 23 |
5 files changed, 102 insertions, 189 deletions
@@ -1,6 +1,6 @@ pkgbase = giada-git pkgdesc = A free, minimal, hardcore audio tool for DJs, live performers and electronic musicians - pkgver = v0.16.3.r10.g3dc97d07 + pkgver = v0.17.0.r15.g34b107f1 pkgrel = 1 url = https://www.giadamusic.com/ arch = x86_64 @@ -9,15 +9,20 @@ pkgbase = giada-git checkdepends = catch2 checkdepends = xorg-server-xvfb makedepends = alsa-lib + makedepends = cmake + makedepends = fltk makedepends = gendesk + makedepends = git makedepends = imagemagick makedepends = jack makedepends = libpulse makedepends = libsamplerate makedepends = libsndfile + makedepends = libxrandr makedepends = nlohmann-json makedepends = rtmidi - depends = fltk + makedepends = vst3sdk + makedepends = steinberg-vst depends = gcc-libs depends = glibc depends = libx11 @@ -25,23 +30,23 @@ pkgbase = giada-git conflicts = giada conflicts = giada-vst source = giada-git::git+https://github.com/monocasual/giada.git - source = giada-git-devendor_nlohmann-json.patch - source = JUCE-5.3.2.tar.gz::https://github.com/WeAreROLI/JUCE/archive/5.3.2.tar.gz - source = https://raw.githubusercontent.com/nlohmann/json/bde57124187c5732c026ffb9357c0491344c45e7/single_include/nlohmann/json.hpp - source = gcc9-fix.diff + source = giada-git-rtmidi_cppflags.patch + source = giada-git-devendor_nlohmann_json.patch + source = JUCE-6.0.4.tar.gz::https://github.com/WeAreROLI/JUCE/archive/6.0.4.tar.gz + source = https://raw.githubusercontent.com/nlohmann/json/db78ac1d7716f56fc9f1b030b715f872f93964e4/single_include/nlohmann/json.hpp sha512sums = SKIP - sha512sums = 31cf5b2b1bba29e8c97109c04c6456a98b778017ef5d48a0f020d326d8a11a5e76c8613fc232a2492d16aa48bc2faaae4aae7316252d6b887bd2187032fb83f9 - sha512sums = f968a622306e12542c0971fd4cac5c311d70304d63fef8a177e8624a3f43916254122cf5d068974bf062a59d95fd6df97400a3d2ff950b117399cc667b976b9d + sha512sums = ae222bb63b0388ef1b02ff2cda0e589545c80fae26cbf06c04e0963a661e32b4d6746eea424359a44bb20e7568dbb5335359c5226c36d9c8b86d10130e83fedc + sha512sums = 5b4b6c6c421851f4da72b6fb4ff457156d3332c5c7a795edffe05386d48864830e7b3afb4011996a8cd5284d2fdbc2e0da3d590108e04d00227d25bc3127f506 + sha512sums = 94bfb122bad5f47be018f66b118a024eb56d537aecaedc440fd1648cbecb08375a2c375e6b1e12b39621bf8c272356fab98872b6a8cab506706cdc18f215096c sha512sums = a3bdd5dc53097584bf2bbe19f296b1726b9fa751905bae22990dc9eb17015e49e1911956b1e29dbaacbe6c285100a653179c191f223b6e612be633505347c34c - sha512sums = 0b011913f031930d3540daf2bec8df66b345f59c79d1666a6447f5b1be0b0e59cfd855bd6ec581118cd6949f24aba8e4c503ad73f0fe5a4bb1882b60ed3cd41f pkgname = giada-git - depends = fltk depends = gcc-libs depends = glibc depends = libx11 depends = libxpm depends = libasound.so + depends = libfltk.so depends = libjack.so depends = libpulse.so depends = libpulse-simple.so @@ -1,28 +1,30 @@ # Maintainer: Térence Clastres <t.clastres@gmail.com> pkgname=giada-git -pkgver=v0.16.3.r10.g3dc97d07 +pkgver=v0.17.0.r15.g34b107f1 pkgrel=1 pkgdesc="A free, minimal, hardcore audio tool for DJs, live performers and electronic musicians" arch=('x86_64') url="https://www.giadamusic.com/" license=('GPL3') groups=('pro-audio') -depends=('fltk' 'gcc-libs' 'glibc' 'libx11' 'libxpm') -makedepends=('alsa-lib' 'gendesk' 'imagemagick' 'jack' 'libpulse' 'libsamplerate' 'libsndfile' 'nlohmann-json' 'rtmidi') +depends=('gcc-libs' 'glibc' 'libx11' 'libxpm') +# upstream vendors a hacked rtaudio :( +makedepends=('alsa-lib' 'cmake' 'fltk' 'gendesk' 'git' 'imagemagick' 'jack' +'libpulse' 'libsamplerate' 'libsndfile' 'libxrandr' 'nlohmann-json' 'rtmidi' 'vst3sdk' 'steinberg-vst') checkdepends=('catch2' 'xorg-server-xvfb') conflicts=('giada' 'giada-vst') source=("giada-git::git+https://github.com/monocasual/giada.git" - "$pkgname-devendor_nlohmann-json.patch" - "JUCE-5.3.2.tar.gz::https://github.com/WeAreROLI/JUCE/archive/5.3.2.tar.gz" - "https://raw.githubusercontent.com/nlohmann/json/bde57124187c5732c026ffb9357c0491344c45e7/single_include/nlohmann/json.hpp" - "gcc9-fix.diff" + "$pkgname-rtmidi_cppflags.patch" + "$pkgname-devendor_nlohmann_json.patch" + "JUCE-6.0.4.tar.gz::https://github.com/WeAreROLI/JUCE/archive/6.0.4.tar.gz" + "https://raw.githubusercontent.com/nlohmann/json/db78ac1d7716f56fc9f1b030b715f872f93964e4/single_include/nlohmann/json.hpp" ) sha512sums=('SKIP' - '31cf5b2b1bba29e8c97109c04c6456a98b778017ef5d48a0f020d326d8a11a5e76c8613fc232a2492d16aa48bc2faaae4aae7316252d6b887bd2187032fb83f9' - 'f968a622306e12542c0971fd4cac5c311d70304d63fef8a177e8624a3f43916254122cf5d068974bf062a59d95fd6df97400a3d2ff950b117399cc667b976b9d' - 'a3bdd5dc53097584bf2bbe19f296b1726b9fa751905bae22990dc9eb17015e49e1911956b1e29dbaacbe6c285100a653179c191f223b6e612be633505347c34c' - '0b011913f031930d3540daf2bec8df66b345f59c79d1666a6447f5b1be0b0e59cfd855bd6ec581118cd6949f24aba8e4c503ad73f0fe5a4bb1882b60ed3cd41f') + 'ae222bb63b0388ef1b02ff2cda0e589545c80fae26cbf06c04e0963a661e32b4d6746eea424359a44bb20e7568dbb5335359c5226c36d9c8b86d10130e83fedc' + '5b4b6c6c421851f4da72b6fb4ff457156d3332c5c7a795edffe05386d48864830e7b3afb4011996a8cd5284d2fdbc2e0da3d590108e04d00227d25bc3127f506' + '94bfb122bad5f47be018f66b118a024eb56d537aecaedc440fd1648cbecb08375a2c375e6b1e12b39621bf8c272356fab98872b6a8cab506706cdc18f215096c' + 'a3bdd5dc53097584bf2bbe19f296b1726b9fa751905bae22990dc9eb17015e49e1911956b1e29dbaacbe6c285100a653179c191f223b6e612be633505347c34c') pkgver() { cd "$pkgname" @@ -32,10 +34,12 @@ pkgver() { prepare() { cd "$pkgname" - cp -r ../JUCE-5.3.2/modules/ src/deps/juce/ - patch -p2 -i ../../../../../gcc9-fix.diff -d src/deps/juce/modules/ + cp -r ../JUCE-6.0.4/modules/ src/deps/juce/ + #vst3 support headers + cp -r /usr/include/vst3sdk/* src/deps/vst3sdk/ + #vst2 support headers + cp -r /usr/include/vst36/pluginterfaces/vst2.x/ src/deps/vst3sdk/pluginterfaces/ - autoreconf -vfi # XDG desktop file gendesk -n -f \ --pkgname ${pkgname/-git} \ @@ -43,36 +47,56 @@ prepare() { --name Giada \ --categories "AudioVideo;Audio;Midi;Sequencer" - # fixing catch2 include for system library - sed -e 's|catch\.hpp|catch2/catch\.hpp|g' -i tests/*.cpp + # remove targets for missing files: + # https://github.com/monocasual/giada/issues/431 + sed -e '/baseButton/d' -i Makefile.am + + # add rtmidi cppflags: + # https://github.com/monocasual/giada/issues/417 + patch -Np1 -i ../"$pkgname-rtmidi_cppflags.patch" + # devendor nlohmann-json - patch -Np1 -i ../"$pkgname-devendor_nlohmann-json.patch" + patch -Np1 -i ../"$pkgname-devendor_nlohmann_json.patch" + + # fixing test includes to use system catch2 + sed -e 's|catch\.hpp|catch2/catch\.hpp|g' -i tests/*.cpp src/main.cpp } build() { cd "$pkgname" + + cmake -B build \ + -DWITH_VST2=on \ + -DWITH_VST3=on \ + -DWITH_TESTS=on \ + -DWITH_SYSTEM_CATCH=on \ + -DCMAKE_BUILD_TYPE='None' \ + -Wno-dev + make -C build - ./configure --prefix=/usr \ - --target=linux \ - --enable-vst \ - --enable-system-catch - - make + # Hack to allow (re)building package without --cleanbuild + # This is because I'm copying files to those submodules instead of updating them + git submodule deinit --all -f } -check() { +check(){ cd "$pkgname" - make check + # move binary to expected directory: + # https://github.com/monocasual/giada/issues/432 + mkdir -vp build + cp -av "${pkgname}" build/ + xvfb-run -a make -k check } package() { - depends+=('libasound.so' 'libjack.so' 'libpulse.so' 'libpulse-simple.so' 'librtmidi.so' 'libsamplerate.so' 'libsndfile.so') + depends+=('libasound.so' 'libfltk.so' 'libjack.so' 'libpulse.so' + 'libpulse-simple.so' 'librtmidi.so' 'libsamplerate.so' 'libsndfile.so') cd "$pkgname" - make DESTDIR="$pkgdir/" install + install -vD "build/${pkgname/-git}" -t "${pkgdir}/usr/bin/" # XDG integration install -vDm 644 "${pkgname/-git}.desktop" -t "${pkgdir}/usr/share/applications" install -vDm 644 "extras/${pkgname/-git}-logo.png" \ - "${pkgdir}/usr/share/pixmaps/${pkgname/-git}.png" + "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname/-git}.svg" # docs install -vDm 644 {ChangeLog,README.md} \ -t "${pkgdir}/usr/share/doc/${pkgname}" diff --git a/gcc9-fix.diff b/gcc9-fix.diff deleted file mode 100644 index e38d605d248d..000000000000 --- a/gcc9-fix.diff +++ /dev/null @@ -1,139 +0,0 @@ -diff --git a/modules/juce_graphics/colour/juce_PixelFormats.h b/modules/juce_graphics/colour/juce_PixelFormats.h -index 4b1ba87da..aea0e3c8c 100644 ---- a/modules/juce_graphics/colour/juce_PixelFormats.h -+++ b/modules/juce_graphics/colour/juce_PixelFormats.h -@@ -110,20 +110,6 @@ public: - 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
--
- //==============================================================================
- /** Copies another pixel colour over this one.
-
-@@ -342,9 +328,6 @@ private: - {
- 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
-@@ -431,11 +414,7 @@ public: - forcedinline uint8 getAlpha() const noexcept { return 0xff; }
- 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.
-@@ -652,8 +631,6 @@ public: -
- //==============================================================================
- forcedinline uint8 getAlpha() const noexcept { return a; }
-- forcedinline uint8& getAlpha() noexcept { return a; }
--
- forcedinline uint8 getRed() const noexcept { return 0; }
- forcedinline uint8 getGreen() const noexcept { return 0; }
- forcedinline uint8 getBlue() const noexcept { return 0; }
-diff --git a/modules/juce_graphics/native/juce_RenderingHelpers.h b/modules/juce_graphics/native/juce_RenderingHelpers.h -index 9ac3ae20b..8c524c276 100644 ---- a/modules/juce_graphics/native/juce_RenderingHelpers.h -+++ b/modules/juce_graphics/native/juce_RenderingHelpers.h -@@ -582,18 +582,10 @@ namespace EdgeTableFillers - : 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 (int y) noexcept
-@@ -675,7 +667,6 @@ namespace EdgeTableFillers - const Image::BitmapData& destData;
- PixelType* linePixels;
- PixelARGB sourceColour;
-- PixelRGB filler[4];
- bool areRGBComponentsEqual;
-
- forcedinline PixelType* getPixel (int x) const noexcept
-@@ -690,47 +681,11 @@ namespace EdgeTableFillers -
- forcedinline void replaceLine (PixelRGB* dest, 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)
-- {
-- auto intFiller = reinterpret_cast<const int*> (filler);
-+ 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..
-
-- while (width > 8 && (((pointer_sized_int) dest) & 7) != 0)
-- {
-- dest->set (colour);
-- ++dest;
-- --width;
-- }
--
-- while (width > 4)
-- {
-- auto 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))
-- }
-+ JUCE_PERFORM_PIXEL_OP_LOOP (set (colour));
- }
-
- forcedinline void replaceLine (PixelAlpha* dest, const PixelARGB colour, int width) const noexcept
diff --git a/giada-git-devendor_nlohmann-json.patch b/giada-git-devendor_nlohmann_json.patch index 124b20c94f3e..3cc1c1248a2a 100644 --- a/giada-git-devendor_nlohmann-json.patch +++ b/giada-git-devendor_nlohmann_json.patch @@ -1,6 +1,6 @@ diff -ruN a/src/core/conf.cpp b/src/core/conf.cpp ---- a/src/core/conf.cpp 2020-02-18 22:26:06.000000000 +0100 -+++ b/src/core/conf.cpp 2020-02-20 20:00:59.845504376 +0100 +--- a/src/core/conf.cpp 2020-11-15 21:26:40.000000000 +0100 ++++ b/src/core/conf.cpp 2020-11-20 17:28:36.176616521 +0100 @@ -29,7 +29,7 @@ #include <cassert> #include <string> @@ -10,16 +10,16 @@ diff -ruN a/src/core/conf.cpp b/src/core/conf.cpp #include "utils/fs.h" #include "utils/log.h" #include "core/const.h" -@@ -314,4 +314,4 @@ +@@ -315,4 +315,4 @@ ofs << j; return true; } --}}}; // giada::m::conf:: +-}}} // giada::m::conf:: \ No newline at end of file -+}}}; // giada::m::conf:: ++}}} // giada::m::conf:: diff -ruN a/src/core/init.cpp b/src/core/init.cpp ---- a/src/core/init.cpp 2020-02-18 22:26:06.000000000 +0100 -+++ b/src/core/init.cpp 2020-02-20 19:59:55.206135824 +0100 +--- a/src/core/init.cpp 2020-11-15 21:26:40.000000000 +0100 ++++ b/src/core/init.cpp 2020-11-20 17:29:53.759248660 +0100 @@ -35,7 +35,7 @@ #include <X11/Xlib.h> // For XInitThreads #endif @@ -30,20 +30,20 @@ diff -ruN a/src/core/init.cpp b/src/core/init.cpp #include "utils/log.h" #include "utils/fs.h" diff -ruN a/src/core/midiMapConf.cpp b/src/core/midiMapConf.cpp ---- a/src/core/midiMapConf.cpp 2020-02-18 22:26:06.000000000 +0100 -+++ b/src/core/midiMapConf.cpp 2020-02-20 20:01:20.878632255 +0100 +--- a/src/core/midiMapConf.cpp 2020-11-15 21:26:40.000000000 +0100 ++++ b/src/core/midiMapConf.cpp 2020-11-20 17:28:01.216937457 +0100 @@ -30,7 +30,7 @@ #include <string> #include <cstring> - #include <dirent.h> + #include <filesystem> -#include "deps/json/single_include/nlohmann/json.hpp" +#include <nlohmann/json.hpp> #include "utils/string.h" #include "utils/log.h" #include "utils/fs.h" diff -ruN a/src/core/patch.cpp b/src/core/patch.cpp ---- a/src/core/patch.cpp 2020-02-18 22:26:06.000000000 +0100 -+++ b/src/core/patch.cpp 2020-02-20 20:00:40.602359018 +0100 +--- a/src/core/patch.cpp 2020-11-15 21:26:40.000000000 +0100 ++++ b/src/core/patch.cpp 2020-11-20 17:30:12.475748254 +0100 @@ -26,7 +26,7 @@ diff --git a/giada-git-rtmidi_cppflags.patch b/giada-git-rtmidi_cppflags.patch new file mode 100644 index 000000000000..cdd70ea3c7a2 --- /dev/null +++ b/giada-git-rtmidi_cppflags.patch @@ -0,0 +1,23 @@ +diff -ruN a/Makefile.am b/Makefile.am +--- a/Makefile.am 2020-11-15 21:26:40.000000000 +0100 ++++ b/Makefile.am 2020-11-20 18:53:06.031868664 +0100 +@@ -402,7 +402,7 @@ + if LINUX + + # Add preprocessor flags to enable ALSA, Pulse and JACK in RtAudio. +-cppFlags += -D__LINUX_ALSA__ -D__LINUX_PULSE__ -D__UNIX_JACK__ ++cppFlags += -D__LINUX_ALSA__ -D__LINUX_PULSE__ -D__UNIX_JACK__ $(RTMIDI_CFLAGS) + + ldAdd += -lsndfile -lfltk -lXext -lX11 -lXft -lXpm -lm -ljack -lasound \ + -lpthread -ldl -lpulse-simple -lpulse -lsamplerate -lrtmidi \ +diff -ruN a/configure.ac b/configure.ac +--- a/configure.ac 2020-11-15 21:26:40.000000000 +0100 ++++ b/configure.ac 2020-11-20 18:52:11.715602516 +0100 +@@ -138,6 +138,7 @@ + [], + [AC_MSG_ERROR([library 'rtMidi' not found!])] + ) ++ PKG_CHECK_MODULES([RTMIDI], [rtmidi]) + AC_LANG_POP + fi + |