Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [do not merge] fix build for gcc 12
@ 2022-12-03  7:31 sgn
  2022-12-03 10:25 ` [PR PATCH] [Updated] " sgn
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: sgn @ 2022-12-03  7:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]

There is a new 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] 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: 2400 bytes --]

From 25bf478d5b2f4adedd42e06495feb0b084540ff5 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 14:07:47 +0700
Subject: [PATCH 1/2] mtd-utils: update to 2.1.5.

---
 srcpkgs/mtd-utils/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/mtd-utils/template b/srcpkgs/mtd-utils/template
index 0cbb7f1e70f1..00cd85f6df52 100644
--- a/srcpkgs/mtd-utils/template
+++ b/srcpkgs/mtd-utils/template
@@ -1,7 +1,7 @@
 # Template file for 'mtd-utils'
 pkgname=mtd-utils
-version=2.1.2
-revision=2
+version=2.1.5
+revision=1
 build_style=gnu-configure
 hostmakedepends="autoconf automake libtool pkg-config"
 makedepends="acl-devel liblzma-devel libuuid-devel lzo-devel
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://www.linux-mtd.infradead.org/"
 distfiles="https://github.com/sigma-star/mtd-utils/archive/v${version}.tar.gz"
-checksum=060a0c4fdcdebf7cf5a753d9e3f082b7c360c49a02a53fde2bda140abaf75c3a
+checksum=76f56daba7e56b1341b4c7494ba865553e52ded66acaf0e83c88489cc47dd3c9
 
 pre_configure() {
 	autoreconf -fi

From 72454d76dd53296aaa39db2adcfb9a8ecd4efa90 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 14:30:03 +0700
Subject: [PATCH 2/2] libstatgrab: update to 0.92.1.

---
 srcpkgs/libstatgrab/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libstatgrab/template b/srcpkgs/libstatgrab/template
index 0b9ce3b0b57b..2b106879a66f 100644
--- a/srcpkgs/libstatgrab/template
+++ b/srcpkgs/libstatgrab/template
@@ -1,6 +1,6 @@
 # Template file for 'libstatgrab'
 pkgname=libstatgrab
-version=0.92
+version=0.92.1
 revision=1
 build_style=gnu-configure
 configure_args="--disable-static"
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="LGPL-2.1-or-later, GPL-2.0-or-later"
 homepage="http://www.i-scream.org/libstatgrab"
 distfiles="http://www.mirrorservice.org/sites/ftp.i-scream.org/pub/i-scream/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=5bf1906aff9ffc3eeacf32567270f4d819055d8386d98b9c8c05519012d5a196
+checksum=5688aa4a685547d7174a8a373ea9d8ee927e766e3cc302bdee34523c2c5d6c11
 
 case "$XBPS_TARGET_MACHINE" in
 	*-musl)	CFLAGS="-DLINUX -DHAVE_PROCFS" ;;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] [do not merge] fix build for gcc 12
  2022-12-03  7:31 [PR PATCH] [do not merge] fix build for gcc 12 sgn
@ 2022-12-03 10:25 ` sgn
  2022-12-03 12:01 ` [PR PATCH] [Updated] [do not merge] cabbage: " sgn
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: sgn @ 2022-12-03 10:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1262 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] 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: 3809 bytes --]

From a3c80fd63b00056d07adbcac8d574a379f9d395f 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/template                  | 19 ++++++++++---------
 2 files changed, 23 insertions(+), 9 deletions(-)
 create mode 100644 srcpkgs/cabbage/patches/fix-include.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/template b/srcpkgs/cabbage/template
index 23931ba7d7f2..c4cdc7979658 100644
--- a/srcpkgs/cabbage/template
+++ b/srcpkgs/cabbage/template
@@ -6,7 +6,7 @@ revision=1
 _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
@@ -75,7 +75,9 @@ 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 +85,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
 
@@ -98,17 +99,17 @@ post_extract() {
 
 	# 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/"
+	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
@@ -128,13 +129,13 @@ do_build() {
 	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}"
 }
 
 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] [do not merge] cabbage: fix build for gcc 12
  2022-12-03  7:31 [PR PATCH] [do not merge] fix build for gcc 12 sgn
  2022-12-03 10:25 ` [PR PATCH] [Updated] " sgn
@ 2022-12-03 12:01 ` sgn
  2022-12-03 12:07 ` sgn
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: sgn @ 2022-12-03 12:01 UTC (permalink / raw)
  To: ml

[-- 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] [do not merge] cabbage: fix build for gcc 12
  2022-12-03  7:31 [PR PATCH] [do not merge] fix build for gcc 12 sgn
  2022-12-03 10:25 ` [PR PATCH] [Updated] " sgn
  2022-12-03 12:01 ` [PR PATCH] [Updated] [do not merge] cabbage: " sgn
@ 2022-12-03 12:07 ` sgn
  2022-12-03 17:32 ` sgn
  2022-12-03 17:37 ` [PR PATCH] [Merged]: " sgn
  4 siblings, 0 replies; 6+ messages in thread
From: sgn @ 2022-12-03 12:07 UTC (permalink / raw)
  To: ml

[-- 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: 6431 bytes --]

From 2799be72c9124ed524200cd0748e8c07a03f4ebf 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, fix plugins path

---
 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] [do not merge] cabbage: fix build for gcc 12
  2022-12-03  7:31 [PR PATCH] [do not merge] fix build for gcc 12 sgn
                   ` (2 preceding siblings ...)
  2022-12-03 12:07 ` sgn
@ 2022-12-03 17:32 ` sgn
  2022-12-03 17:37 ` [PR PATCH] [Merged]: " sgn
  4 siblings, 0 replies; 6+ messages in thread
From: sgn @ 2022-12-03 17:32 UTC (permalink / raw)
  To: ml

[-- 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: 5303 bytes --]

From 70a3b1dca48a9f10110b2b2807054b4d2c1693b1 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: Sun, 4 Dec 2022 00:31:25 +0700
Subject: [PATCH] Cataclysm-DDA: fix build with gcc-12

---
 srcpkgs/Cataclysm-DDA/patches/gcc-12.patch    | 37 +++++++++++++++++
 srcpkgs/Cataclysm-DDA/patches/no-werror.patch | 13 ++++++
 srcpkgs/Cataclysm-DDA/template                | 41 +++++++++++++------
 3 files changed, 78 insertions(+), 13 deletions(-)
 create mode 100644 srcpkgs/Cataclysm-DDA/patches/gcc-12.patch
 create mode 100644 srcpkgs/Cataclysm-DDA/patches/no-werror.patch

diff --git a/srcpkgs/Cataclysm-DDA/patches/gcc-12.patch b/srcpkgs/Cataclysm-DDA/patches/gcc-12.patch
new file mode 100644
index 000000000000..06d4e855d6fc
--- /dev/null
+++ b/srcpkgs/Cataclysm-DDA/patches/gcc-12.patch
@@ -0,0 +1,37 @@
+Index: Cataclysm-DDA-0.E/src/sdltiles.cpp
+===================================================================
+--- Cataclysm-DDA-0.E.orig/src/sdltiles.cpp
++++ Cataclysm-DDA-0.E/src/sdltiles.cpp
+@@ -3246,7 +3246,7 @@ static void font_folder_list( std::ostre
+             }
+ 
+             // Add font family
+-            char *fami = TTF_FontFaceFamilyName( fnt.get() );
++            const char *fami = TTF_FontFaceFamilyName( fnt.get() );
+             if( fami != nullptr ) {
+                 fout << fami;
+             } else {
+@@ -3254,7 +3254,7 @@ static void font_folder_list( std::ostre
+             }
+ 
+             // Add font style
+-            char *style = TTF_FontFaceStyleName( fnt.get() );
++            const char *style = TTF_FontFaceStyleName( fnt.get() );
+             bool isbitmap = ends_with( f, ".fon" );
+             if( style != nullptr && !isbitmap && strcasecmp( style, "Regular" ) != 0 ) {
+                 fout << " " << style;
+@@ -3365,12 +3365,12 @@ static int test_face_size( const std::st
+ {
+     const TTF_Font_Ptr fnt( TTF_OpenFontIndex( f.c_str(), size, faceIndex ) );
+     if( fnt ) {
+-        char *style = TTF_FontFaceStyleName( fnt.get() );
++        const char *style = TTF_FontFaceStyleName( fnt.get() );
+         if( style != nullptr ) {
+             int faces = TTF_FontFaces( fnt.get() );
+             for( int i = faces - 1; i >= 0; i-- ) {
+                 const TTF_Font_Ptr tf( TTF_OpenFontIndex( f.c_str(), size, i ) );
+-                char *ts = nullptr;
++                const char *ts = nullptr;
+                 if( tf ) {
+                     if( nullptr != ( ts = TTF_FontFaceStyleName( tf.get() ) ) ) {
+                         if( 0 == strcasecmp( ts, style ) && TTF_FontHeight( tf.get() ) <= size ) {
diff --git a/srcpkgs/Cataclysm-DDA/patches/no-werror.patch b/srcpkgs/Cataclysm-DDA/patches/no-werror.patch
new file mode 100644
index 000000000000..2855c96db62c
--- /dev/null
+++ b/srcpkgs/Cataclysm-DDA/patches/no-werror.patch
@@ -0,0 +1,13 @@
+Index: Cataclysm-DDA-0.E/CMakeLists.txt
+===================================================================
+--- Cataclysm-DDA-0.E.orig/CMakeLists.txt
++++ Cataclysm-DDA-0.E/CMakeLists.txt
+@@ -222,7 +222,7 @@ IF(MSVC)
+     endif()
+ ELSE()
+     SET(CATA_WARNINGS
+-      "-Werror -Wall -Wextra \
++      "-Wall -Wextra \
+        -Wformat-signedness \
+        -Wlogical-op \
+        -Wmissing-declarations \
diff --git a/srcpkgs/Cataclysm-DDA/template b/srcpkgs/Cataclysm-DDA/template
index bbe66b9f29b9..b5044e01f092 100644
--- a/srcpkgs/Cataclysm-DDA/template
+++ b/srcpkgs/Cataclysm-DDA/template
@@ -13,8 +13,12 @@ short_desc="Turn-based survival game set in a post-apocalyptic world"
 maintainer="John <me@johnnynator.dev>"
 license="CC-BY-SA-3.0, CC-BY-3.0"
 homepage="https://cataclysmdda.org/"
-distfiles="https://github.com/CleverRaven/Cataclysm-DDA/archive/${version}.tar.gz"
-checksum=b0af9a9292929e17332edcea770bca9a91f1d08ea47726d78a47e09281a42fa3
+distfiles="https://github.com/CleverRaven/Cataclysm-DDA/archive/${version}.tar.gz
+ https://github.com/catchorg/Catch2/releases/download/v2.13.10/catch.hpp"
+checksum="b0af9a9292929e17332edcea770bca9a91f1d08ea47726d78a47e09281a42fa3
+ 3725c0f0a75f376a5005dde31ead0feb8f7da7507644c201b814443de8355170"
+skip_extraction="catch.hpp"
+make_check=no # needs tap++.h
 
 build_options="tiles backtrace"
 build_options_default="tiles"
@@ -29,26 +33,37 @@ esac
 subpackages=""
 if [ "$build_option_tiles" ]; then
 	subpackages+=" Cataclysm-DDA-tiles"
-	post_configure() {
+fi
+subpackages+=" Cataclysm-DDA-data"
+
+post_extract() {
+	_srcdir="${XBPS_SRCDISTDIR}/${pkgname}-${version}"
+	cp ${_srcdir}/catch.hpp tests/catch/catch.hpp
+}
+
+post_configure() {
+	if [ "$build_option_tiles" ]; then
 		local cmake_builddir=build-tiles
+		local fprefix=$wrksrc/build-tiles/build
+		CFLAGS="${CFLAGS} -ffile-prefix-map=$fprefix=."
+		CXXFLAGS="${CXXFLAGS} -ffile-prefix-map=$fprefix=."
 		configure_args+=" -DTILES=ON -DSOUND=ON"
 		do_configure
-	}
+	fi
+}
 
-	post_build() {
+post_build() {
+	if [ "$build_option_tiles" ]; then
 		local cmake_builddir=build-tiles
 		do_build
-	}
+	fi
+}
 
-	post_install() {
+post_install() {
+	if [ "$build_option_tiles" ]; then
 		local cmake_builddir=build-tiles
 		do_install
-	}
-fi
-subpackages+=" Cataclysm-DDA-data"
-
-do_check() {
-	: #needs tap++.h
+	fi
 }
 
 Cataclysm-DDA-tiles_package() {

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Merged]: [do not merge] cabbage: fix build for gcc 12
  2022-12-03  7:31 [PR PATCH] [do not merge] fix build for gcc 12 sgn
                   ` (3 preceding siblings ...)
  2022-12-03 17:32 ` sgn
@ 2022-12-03 17:37 ` sgn
  4 siblings, 0 replies; 6+ messages in thread
From: sgn @ 2022-12-03 17:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1124 bytes --]

There's a merged pull request on the void-packages repository

[do not merge] cabbage: fix build for gcc 12
https://github.com/void-linux/void-packages/pull/40885

Description:
<!-- 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
-->


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-12-03 17:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-03  7:31 [PR PATCH] [do not merge] fix build for gcc 12 sgn
2022-12-03 10:25 ` [PR PATCH] [Updated] " sgn
2022-12-03 12:01 ` [PR PATCH] [Updated] [do not merge] cabbage: " sgn
2022-12-03 12:07 ` sgn
2022-12-03 17:32 ` sgn
2022-12-03 17:37 ` [PR PATCH] [Merged]: " sgn

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).