commit:     40b3df6fe90f4f9fbf5b02325b63e1a20d992028
Author:     Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
AuthorDate: Sat Jul  4 18:15:24 2020 +0000
Commit:     Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
CommitDate: Sat Jul  4 18:15:48 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40b3df6f

app-text/cwtext: Fix compilation

Closes: https://bugs.gentoo.org/729534
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>

 app-text/cwtext/cwtext-0.96-r1.ebuild       | 10 +++++++---
 app-text/cwtext/files/cwtext-0.96-pcm.patch | 11 +++++++++++
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/app-text/cwtext/cwtext-0.96-r1.ebuild 
b/app-text/cwtext/cwtext-0.96-r1.ebuild
index d95b65bce48..25b8dac1a7a 100644
--- a/app-text/cwtext/cwtext-0.96-r1.ebuild
+++ b/app-text/cwtext/cwtext-0.96-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -13,11 +13,15 @@ SLOT="0"
 KEYWORDS="amd64 ~mips ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos"
 IUSE=""
 
-PATCHES=( "${FILESDIR}"/${PN}-0.94-asneeded.patch )
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.96-pcm.patch
+       "${FILESDIR}"/${PN}-0.94-asneeded.patch
+)
+
 DOCS=( Changes README TODO )
 
 src_prepare() {
-       eapply -p0 "${PATCHES}"
+       eapply -p0 "${PATCHES[@]}"
        # change install directory to ${S}
        sed -i -e "/^PREFIX/ s:=.*:=\"${S}\":" makefile || \
                die "sed makefile failed"

diff --git a/app-text/cwtext/files/cwtext-0.96-pcm.patch 
b/app-text/cwtext/files/cwtext-0.96-pcm.patch
new file mode 100644
index 00000000000..f14a1d06182
--- /dev/null
+++ b/app-text/cwtext/files/cwtext-0.96-pcm.patch
@@ -0,0 +1,11 @@
+--- pcm.c.orig
++++ pcm.c
+@@ -60,7 +60,7 @@ int mStoSamples(int hVox, int time) {
+   float samples;
+   float fsr;
+   
+-  if (!valid(hVox)) return;
++  if (!valid(hVox)) return 0;
+ 
+   timelen = (float) time;
+   fsr = (float) voxref(hVox).samplerate;

Reply via email to