commit:     89268a0990c31627bf6c9ea4dce0d1434b871f24
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 31 19:43:20 2024 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Thu Oct 31 19:43:31 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89268a09

media-sound/chuck: bump to 1.5.3.2 + scrubbed patches

Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 media-sound/chuck/Manifest                         |  1 +
 media-sound/chuck/chuck-1.5.3.2.ebuild             | 70 ++++++++++++++++++++++
 .../chuck/files/chuck-1.4.0.0-hid-smc.patch        |  1 -
 .../chuck/files/chuck-1.4.1.1-makefile.patch       |  6 --
 .../chuck/files/chuck-1.5.3.2-makefile.patch       | 32 ++++++++++
 5 files changed, 103 insertions(+), 7 deletions(-)

diff --git a/media-sound/chuck/Manifest b/media-sound/chuck/Manifest
index 9b7723431dea..1e7775c7b44e 100644
--- a/media-sound/chuck/Manifest
+++ b/media-sound/chuck/Manifest
@@ -1 +1,2 @@
 DIST chuck-1.4.1.1.tgz 14940362 BLAKE2B 
21cd9d30d471c87e35e479dabede5a8ec5c9c8952a24636768aaabddd2bbd6fb00f45bf1394fc218a3fddd9c771473a7b52da779a9e89690cf0eb0ed2801c604
 SHA512 
8202c9275c6341f35f87fb5140b507936183f3365839f5ba240cd758b6e9b12138e4669ab37f84e218010b49cfcbed777352ba7b69e02b5efc3b800e1977a360
+DIST chuck-1.5.3.2.tgz 22275903 BLAKE2B 
e59145cc0e1f347168cbeabcd9208768559bd6caef3fdc4de6a1adf93d696f425a4ae3e0a70a59db7346e4ea5ad01c374e16b2d94e3d47cef376fd6ac2bbabe0
 SHA512 
9a853b192c01f3eab40a2d368a372950eb377a713820628cef1bb7fdd5e71221940274ce6ad8e726cf0ecc0e24919451a70d751871d0166855619c6409020fb2

diff --git a/media-sound/chuck/chuck-1.5.3.2.ebuild 
b/media-sound/chuck/chuck-1.5.3.2.ebuild
new file mode 100644
index 000000000000..70115f4d5785
--- /dev/null
+++ b/media-sound/chuck/chuck-1.5.3.2.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Strongly-timed, concurrent, and on-the-fly audio programming 
language"
+HOMEPAGE="http://chuck.cs.princeton.edu/";
+SRC_URI="http://chuck.cs.princeton.edu/release/files/${P}.tgz";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+alsa jack examples"
+REQUIRED_USE="|| ( alsa jack )"
+
+RDEPEND="app-eselect/eselect-chuck
+       media-libs/libsndfile
+       alsa? ( media-libs/alsa-lib )
+       jack? ( virtual/jack )"
+DEPEND="${RDEPEND}
+       app-alternatives/yacc
+       app-alternatives/lex"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.4.0.0-hid-smc.patch
+       "${FILESDIR}"/${PN}-1.5.3.2-makefile.patch
+)
+
+compile_backend() {
+       backend=$1
+       pushd "${S}/src" &>/dev/null || die
+       einfo "Compiling against ${backend}"
+       emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getCXX)" 
linux-${backend}
+       mv chuck{,-${backend}} || die
+       emake clean
+       popd &>/dev/null || die
+}
+
+src_compile() {
+       # when compile with athlon or athlon-xp flags
+       # chuck crashes on removing a shred with a double free or corruption
+       # it happens in Chuck_VM_Stack::shutdown() on the line
+       #   SAFE_DELETE_ARRAY( stack );
+       replace-cpu-flags athlon athlon-xp i686
+
+       use jack && compile_backend jack
+       use alsa && compile_backend alsa
+}
+
+src_install() {
+       use jack && dobin src/chuck-jack
+       use alsa && dobin src/chuck-alsa
+
+       dodoc AUTHORS DEVELOPERS QUICKSTART README.md THANKS VERSIONS
+       if use examples; then
+               dodoc -r examples
+               docompress -x /usr/share/doc/${PF}/examples
+       fi
+}
+
+pkg_postinst() {
+       if [[ -z ${REPLACING_VERSIONS} ]]; then
+               elog "Chuck now can use multiple audio engines, so you can 
specify"
+               elog "the preferred audio engine with chuck-{jack,alsa}"
+               elog "Or you can use 'eselect chuck' to set the audio engine"
+       fi
+       eselect chuck update --if-unset
+}

diff --git a/media-sound/chuck/files/chuck-1.4.0.0-hid-smc.patch 
b/media-sound/chuck/files/chuck-1.4.0.0-hid-smc.patch
index 0f608f579953..12f0091fd04c 100644
--- a/media-sound/chuck/files/chuck-1.4.0.0-hid-smc.patch
+++ b/media-sound/chuck/files/chuck-1.4.0.0-hid-smc.patch
@@ -145,4 +145,3 @@
  
  
  #endif
-Only in chuck-1.4.0.0/src/core: util_hid.cpp.orig

diff --git a/media-sound/chuck/files/chuck-1.4.1.1-makefile.patch 
b/media-sound/chuck/files/chuck-1.4.1.1-makefile.patch
index 98147cf9a81f..b5dc2f994386 100644
--- a/media-sound/chuck/files/chuck-1.4.1.1-makefile.patch
+++ b/media-sound/chuck/files/chuck-1.4.1.1-makefile.patch
@@ -1,5 +1,3 @@
-diff --git a/src/core/makefile.x/makefile.alsa 
b/src/core/makefile.x/makefile.alsa
-index 5694257..577dd91 100644
 --- a/src/core/makefile.x/makefile.alsa
 +++ b/src/core/makefile.x/makefile.alsa
 @@ -1,4 +1,4 @@
@@ -8,8 +6,6 @@ index 5694257..577dd91 100644
 +CFLAGS+= -D__LINUX_ALSA__ -D__PLATFORM_LINUX__ -fno-strict-aliasing 
-D__CK_SNDFILE_NATIVE__ -fPIC
  LDFLAGS+= -lasound -lstdc++ -ldl -lm -lsndfile -lpthread
  
-diff --git a/src/core/makefile.x/makefile.jack 
b/src/core/makefile.x/makefile.jack
-index 86b2511..442708b 100644
 --- a/src/core/makefile.x/makefile.jack
 +++ b/src/core/makefile.x/makefile.jack
 @@ -1,4 +1,4 @@
@@ -18,8 +14,6 @@ index 86b2511..442708b 100644
 +CFLAGS+= -D__UNIX_JACK__ -D__PLATFORM_LINUX__ -fno-strict-aliasing 
-D__CK_SNDFILE_NATIVE__ -fPIC
  LDFLAGS+= -lasound -ljack -lstdc++ -ldl -lm -lsndfile -lpthread
  
-diff --git a/src/makefile b/src/makefile
-index f52f0c2..310991a 100644
 --- a/src/makefile
 +++ b/src/makefile
 @@ -76,11 +76,11 @@ CK_VERSION=1.4.1.1

diff --git a/media-sound/chuck/files/chuck-1.5.3.2-makefile.patch 
b/media-sound/chuck/files/chuck-1.5.3.2-makefile.patch
new file mode 100644
index 000000000000..3a4e041bb8a5
--- /dev/null
+++ b/media-sound/chuck/files/chuck-1.5.3.2-makefile.patch
@@ -0,0 +1,32 @@
+--- a/src/makefile
++++ b/src/makefile
+@@ -90,15 +90,15 @@ win32:
+ 
+ ########################### COMPILATION TOOLS 
#################################
+ # lexer
+-LEX=flex
++LEX?=flex
+ # parser
+-YACC=bison
++YACC?=bison
+ # c compiler
+-CC=gcc
++CC?=gcc
+ # c++ compiler
+-CXX=g++
++CXX?=g++
+ # linker
+-LD=$(CXX)
++LD?=$(CXX)
+ 
+ 
+ ############################# COMPILER FLAGS 
##################################
+@@ -113,8 +113,6 @@ endif
+ # enable chuck debug macros?
+ ifneq ($(CHUCK_DEBUG),)
+ CFLAGS+= -g -D__CHUCK_DEBUG__
+-else
+-CFLAGS+= -O3
+ endif
+ 
+ # use 64-bit audio samples?

Reply via email to