From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [do not merge] cabbage: fix build for gcc 12
Date: Sat, 03 Dec 2022 13:01:29 +0100 [thread overview]
Message-ID: <20221203120129.PRNDgkGso78TXpxfr_TuE4NZ7QnehTIAFBeHlB8EPK4@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-40885@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]
There is an updated pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages gcc-12
https://github.com/void-linux/void-packages/pull/40885
[do not merge] cabbage: fix build for gcc 12
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/40885.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gcc-12-40885.patch --]
[-- Type: text/x-diff, Size: 6413 bytes --]
From f8fc0909bf6ca36b40c3e35002f639b18015e01e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Sat, 3 Dec 2022 17:23:29 +0700
Subject: [PATCH] cabbage: patch for gcc-11
---
srcpkgs/cabbage/patches/fix-include.patch | 13 ++++++++
srcpkgs/cabbage/patches/plugin-path.patch | 13 ++++++++
srcpkgs/cabbage/template | 39 ++++++++++-------------
3 files changed, 43 insertions(+), 22 deletions(-)
create mode 100644 srcpkgs/cabbage/patches/fix-include.patch
create mode 100644 srcpkgs/cabbage/patches/plugin-path.patch
diff --git a/srcpkgs/cabbage/patches/fix-include.patch b/srcpkgs/cabbage/patches/fix-include.patch
new file mode 100644
index 000000000000..07e0dd181815
--- /dev/null
+++ b/srcpkgs/cabbage/patches/fix-include.patch
@@ -0,0 +1,13 @@
+Index: cabbage-2.5.0/JUCE/modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp
+===================================================================
+--- cabbage-2.5.0.orig/JUCE/modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp
++++ cabbage-2.5.0/JUCE/modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp
+@@ -24,6 +24,8 @@
+ ==============================================================================
+ */
+
++#include <array>
++
+ namespace juce
+ {
+
diff --git a/srcpkgs/cabbage/patches/plugin-path.patch b/srcpkgs/cabbage/patches/plugin-path.patch
new file mode 100644
index 000000000000..5ab69e044836
--- /dev/null
+++ b/srcpkgs/cabbage/patches/plugin-path.patch
@@ -0,0 +1,13 @@
+Index: cabbage-2.5.0/cabbage/Source/Utilities/CabbageExportPlugin.cpp
+===================================================================
+--- cabbage-2.5.0.orig/cabbage/Source/Utilities/CabbageExportPlugin.cpp
++++ cabbage-2.5.0/cabbage/Source/Utilities/CabbageExportPlugin.cpp
+@@ -84,7 +84,7 @@ void PluginExporter::exportPlugin (Strin
+ }
+ else if (type == "Standalone")
+ {
+- pluginFilename = currentApplicationDirectory + "/CabbagePlugin." + fileExtension;
++ pluginFilename = currentApplicationDirectory + "/../lib/vst/CabbagePlugin." + fileExtension;
+ }
+
+ File VSTData (pluginFilename);
diff --git a/srcpkgs/cabbage/template b/srcpkgs/cabbage/template
index 23931ba7d7f2..f8cb9a31c2d8 100644
--- a/srcpkgs/cabbage/template
+++ b/srcpkgs/cabbage/template
@@ -1,16 +1,15 @@
# Template file for 'cabbage'
pkgname=cabbage
version=2.5.0
-revision=1
+revision=2
# specified in buildLinux.sh
_jucever=5.4.7
_vstsdkver=3611_22_10_2018_build_34
-create_wrksrc=yes
-build_wrksrc="${pkgname}-${version}"
+build_wrksrc="cabbage"
hostmakedepends="pkg-config xorg-server-xvfb"
makedepends="libfreeglut-devel libcurl-devel jack-devel libXcomposite-devel
libXrandr-devel libXcursor-devel libX11-devel libXinerama-devel MesaLib-devel
- gtk+3-devel webkit2gtk-devel csound alsa-lib-devel libsndfile-devel"
+ gtk+3-devel webkit2gtk-devel csound alsa-lib-devel libsndfile-devel xvfb-run"
depends="csound"
short_desc="Framework for audio software development"
maintainer="Olga U <me@laserbat.pw>"
@@ -65,17 +64,17 @@ Projucer() {
# ~/SDKs/ (path hardcoded)
# TODO: use xvfb-run script for testing
- Xvfb :999 &
- XVFB_PID=$!
- HOME=${wrksrc} DISPLAY=":999" "${wrksrc}/JUCE-${_jucever}/extras/Projucer/Builds/LinuxMakefile/build/Projucer" "$@"
- kill $XVFB_PID || true
+ xvfb-run \
+ "${wrksrc}/JUCE/extras/Projucer/Builds/LinuxMakefile/build/Projucer" "$@"
}
post_extract() {
mkdir SDKs
mv VST_SDK SDKs
mv vst2.x SDKs/VST_SDK/VST3_SDK/pluginterfaces
- cd "${wrksrc}/cabbage-${version}"
+ mv cabbage-${version} cabbage
+ mv JUCE-${_jucever} JUCE
+ cd "${wrksrc}/cabbage"
# There are lots of hardcoded paths that need to be rewritten
vsed -e 's@sourcecode/@@' -i CabbageLite.jucer
@@ -83,7 +82,6 @@ post_extract() {
for f in *jucer; do
vsed -e "s@/usr/local/include/csound@/usr/include/csound@g" \
-e "s@/usr/local/lib@/usr/lib@g" \
- -e "s@../JUCE@../JUCE-${_jucever}@" \
-i "$f"
done
@@ -93,48 +91,45 @@ post_extract() {
vsed -e '/opcodeFile\ +=/s#/#/../share/doc/cabbage/#' \
-i Source/CodeEditor/CabbageCodeEditor.cpp
- vsed -e '/CabbagePlugin\(Synth\|Effect\)/s#"/#"/../lib/vst/#' \
- -i Source/Utilities/CabbageExportPlugin.cpp
-
# Fix compilation on i686
vsed -e 's/__sigemptyset/sigemptyset/' \
- -i ../JUCE-${_jucever}/modules/juce_audio_formats/codecs/flac/libFLAC/cpu.c
+ -i ../JUCE/modules/juce_audio_formats/codecs/flac/libFLAC/cpu.c
vsed -e "s/JUCER_ENABLE_GPL_MODE 0/JUCER_ENABLE_GPL_MODE 1/" \
- -i ../JUCE-${_jucever}/extras/Projucer/JuceLibraryCode/AppConfig.h
+ -i ../JUCE/extras/Projucer/JuceLibraryCode/AppConfig.h
}
do_build() {
- cd "${wrksrc}/JUCE-${_jucever}/extras/Projucer/Builds/LinuxMakefile/"
+ local oldhome=$HOME
+ HOME=$wrksrc
+ cd "${wrksrc}/JUCE/extras/Projucer/Builds/LinuxMakefile/"
make ${makejobs} TARGET_ARCH="${_tarch}"
- cd "${wrksrc}/cabbage-${version}/Builds/LinuxMakefile"
+ cd "${wrksrc}/cabbage/Builds/LinuxMakefile"
Projucer --resave ../../CabbageIDE.jucer
mv Makefile MakeCabbageIDE
- vsed -i MakeCabbageIDE -e "s@\$(HOME)@${wrksrc}@"
make -f MakeCabbageIDE ${makejobs} CONFIG=Release TARGET_ARCH="${_tarch}"
Projucer --resave ../../CabbagePlugin.jucer
mv Makefile MakePluginEffect
- vsed -i MakePluginEffect -e "s@\$(HOME)@${wrksrc}@"
make -f MakePluginEffect ${makejobs} CONFIG=Release TARGET_ARCH="${_tarch}"
mv ./build/CabbagePlugin.so ./build/CabbagePluginEffect.so
Projucer --resave ../../CabbagePluginSynth.jucer
mv Makefile MakePluginSynth
- vsed -i MakePluginSynth -e "s@\$(HOME)@${wrksrc}@"
make -f MakePluginSynth ${makejobs} CONFIG=Release TARGET_ARCH="${_tarch}"
mv ./build/CabbagePlugin.so ./build/CabbagePluginSynth.so
Projucer --resave ../../CabbageLite.jucer
- cp -r ../../../JUCE-${_jucever}/modules/juce_audio_plugin_client/ ../../JuceLibraryCode/modules/
+ cp -r ../../../JUCE/modules/juce_audio_plugin_client/ ../../JuceLibraryCode/modules/
mv Makefile MakeCabbageLite
make -f MakeCabbageLite ${makejobs} CONFIG=Release TARGET_ARCH="${_tarch}"
+ HOME=$oldhome
}
do_install() {
- cd "${wrksrc}/cabbage-${version}/Builds/LinuxMakefile"
+ cd "${wrksrc}/cabbage/Builds/LinuxMakefile"
find ../../Examples -name '.DS_Store' -delete
find ../../Examples -name '*_Log.txt' -delete
next prev parent reply other threads:[~2022-12-03 12:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-03 7:31 [PR PATCH] [do not merge] " sgn
2022-12-03 10:25 ` [PR PATCH] [Updated] " sgn
2022-12-03 12:01 ` sgn [this message]
2022-12-03 12:07 ` [PR PATCH] [Updated] [do not merge] cabbage: " sgn
2022-12-03 17:32 ` sgn
2022-12-03 17:37 ` [PR PATCH] [Merged]: " sgn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221203120129.PRNDgkGso78TXpxfr_TuE4NZ7QnehTIAFBeHlB8EPK4@z \
--to=sgn@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).