From 458429b0be5a82cfb294b9cccfb289ead8f1a416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Thu, 30 Jan 2020 21:24:17 +0700 Subject: [PATCH] Carla: add patch for gcc 9 Bump revision to trigger rebuild for platform that were cross-compiled. --- srcpkgs/Carla/patches/gcc-9.2.0.patch | 29 +++++++++++++++++++++++++++ srcpkgs/Carla/patches/libmagic.patch | 14 +++++++++++++ srcpkgs/Carla/template | 10 ++++----- 3 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/Carla/patches/gcc-9.2.0.patch create mode 100644 srcpkgs/Carla/patches/libmagic.patch diff --git a/srcpkgs/Carla/patches/gcc-9.2.0.patch b/srcpkgs/Carla/patches/gcc-9.2.0.patch new file mode 100644 index 00000000000..b20cc9a6852 --- /dev/null +++ b/srcpkgs/Carla/patches/gcc-9.2.0.patch @@ -0,0 +1,29 @@ +--- source/bridges-ui/CarlaBridgeToolkitQt.cpp ++++ source/bridges-ui/CarlaBridgeToolkitQt.cpp +@@ -256,12 +256,6 @@ + #endif + }; + +-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) +-# include "CarlaBridgeToolkitQt5.moc" +-#else +-# include "CarlaBridgeToolkitQt4.moc" +-#endif +- + // ------------------------------------------------------------------------- + + CarlaBridgeToolkit* CarlaBridgeToolkit::createNew(CarlaBridgeFormat* const format) +@@ -279,9 +273,13 @@ + int qInitResources(); + int qCleanupResources(); + ++CARLA_BRIDGE_UI_USE_NAMESPACE ++ + #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) ++# include "CarlaBridgeToolkitQt5.moc" + # include "resources.qt5.cpp" + #else ++# include "CarlaBridgeToolkitQt4.moc" + # include "resources.qt4.cpp" + #endif + diff --git a/srcpkgs/Carla/patches/libmagic.patch b/srcpkgs/Carla/patches/libmagic.patch new file mode 100644 index 00000000000..d53a7c56887 --- /dev/null +++ b/srcpkgs/Carla/patches/libmagic.patch @@ -0,0 +1,14 @@ +--- source/Makefile.mk ++++ source/Makefile.mk +@@ -233,10 +233,7 @@ + # Check for optional libs (special non-pkgconfig tests) + + ifneq ($(WIN32),true) +- +-# libmagic doesn't have a pkg-config file, so we need to call the compiler to test it +-HAVE_LIBMAGIC = $(shell echo '\#include ' | $(CC) $(CFLAGS) -x c -w -c - -o .libmagic-tmp 2>/dev/null && echo true) +- ++HAVE_LIBMAGIC = true + endif + + # --------------------------------------------------------------------------------------------------------------------- diff --git a/srcpkgs/Carla/template b/srcpkgs/Carla/template index d4d36a4923d..5cc433c57f3 100644 --- a/srcpkgs/Carla/template +++ b/srcpkgs/Carla/template @@ -1,15 +1,13 @@ # Template file for 'Carla' pkgname=Carla version=2.0.0 -revision=2 +revision=3 archs="x86_64* i686* aarch64* arm*" build_style=gnu-makefile -make_build_args="DEFAULT_QT=5" -make_install_args="DEFAULT_QT=5" pycompile_module="carla_utils.py carla_backend.py" pycompile_dirs="usr/share/carla" -hostmakedepends="pkg-config python3" -makedepends="python3-PyQt5-devel-tools python3-PyQt5 libmagic file-devel +hostmakedepends="pkg-config python3-PyQt5-devel-tools which" +makedepends="python3-PyQt5 libmagic file-devel liblo-devel alsa-lib-devel pulseaudio-devel libX11-devel gtk+3-devel gtk+-devel qt5-devel fluidsynth-devel fftw-devel zlib-devel python3-rdflib" @@ -27,7 +25,7 @@ case $XBPS_TARGET_MACHINE in make_install_args+=" NOOPT=true";; esac -if [ "$CROSS_BUILD" ]; then +if [ -n "$CROSS_BUILD" ]; then hostmakedepends+=" Carla-devel" fi