pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

espeak-ng: fix buildlink3.mk yasr: fix errno



Module Name:	pkgsrc-wip
Committed By:	adr <adr%sdf.org@localhost>
Pushed By:	adr
Date:		Thu Feb 29 23:07:20 2024 +0000
Changeset:	8808c347a0b39b6303f7d61dd02a6f39d58bba84

Modified Files:
	espeak-ng/buildlink3.mk
	yasr/distinfo
	yasr/patches/patch-yasr_main.c

Log Message:
espeak-ng: fix buildlink3.mk
yasr: fix errno

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=8808c347a0b39b6303f7d61dd02a6f39d58bba84

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 espeak-ng/buildlink3.mk        | 12 +++++++-----
 yasr/distinfo                  |  2 +-
 yasr/patches/patch-yasr_main.c | 31 +++++++++++++++++--------------
 3 files changed, 25 insertions(+), 20 deletions(-)

diffs:
diff --git a/espeak-ng/buildlink3.mk b/espeak-ng/buildlink3.mk
index d66894a448..9dd3a99754 100644
--- a/espeak-ng/buildlink3.mk
+++ b/espeak-ng/buildlink3.mk
@@ -10,11 +10,13 @@ BUILDLINK_ABI_DEPENDS.espeak-ng+=	espeak-ng>=1.51
 BUILDLINK_PKGSRCDIR.espeak-ng?=		../../audio/espeak-ng
 BUILDLINK_INCDIRS.espeak-ng?=		include/espeak-ng
 
-#.include "../../mk/pkg-build-options.mk"
-#
-#.if ${PKG_BUILD_OPTIONS.espeak-ng:Malsa}
-#.  include "../../audio/alsa-lib/buildlink3.mk"
-#.endif
+.include "../../audio/pcaudiolib/buildlink3.mk"
+
+pkgbase := espeak-ng
+.include "../../mk/pkg-build-options.mk"
+.if !empty(PKG_BUILD_OPTIONS.espeak-ng:Msonic)
+.  include "../../audio/sonic/buildlink3.mk"
+.endif
 
 .endif # ESPEAK_NG_BUILDLINK3_MK
 
diff --git a/yasr/distinfo b/yasr/distinfo
index 976f7f731f..dca86fb992 100644
--- a/yasr/distinfo
+++ b/yasr/distinfo
@@ -4,6 +4,6 @@ BLAKE2s (yasr-0.0.0.144-f60db19350542e6f4b7d268a310b9f2b9f3076c0.tar.gz) = 72d9f
 SHA512 (yasr-0.0.0.144-f60db19350542e6f4b7d268a310b9f2b9f3076c0.tar.gz) = 1a97f4d18586e9e72a01b05b0c6240a7e346b44d920771d662a0cbf9cba26467732d5681f391938d01cf0bd9e269bf0879fd7fcbf48f9678b5eafa30cbecca63
 Size (yasr-0.0.0.144-f60db19350542e6f4b7d268a310b9f2b9f3076c0.tar.gz) = 99434 bytes
 SHA1 (patch-meson.build) = 81c27075691073e33799681441e4662275e62d3a
-SHA1 (patch-yasr_main.c) = b26fcea7e5f62f528cb90cddb6e9af2e9e8cbb3e
+SHA1 (patch-yasr_main.c) = eba329640d584c260e2b31e90b3b0ae15acc3d9b
 SHA1 (patch-yasr_tts.c) = 67656ad2e02a734deb136c56bf3e2ea79989b005
 SHA1 (patch-yasr_yasr.conf) = 73157a2dec79cb39050a4617af99e59349ca9531
diff --git a/yasr/patches/patch-yasr_main.c b/yasr/patches/patch-yasr_main.c
index d143ee7ac8..fda116c47c 100644
--- a/yasr/patches/patch-yasr_main.c
+++ b/yasr/patches/patch-yasr_main.c
@@ -15,7 +15,7 @@ Fix a bug speaking a char when cursor-right is input after space
  static int cpid;
  static int size, wsize;
  static int master, slave;
-@@ -307,23 +305,10 @@ is_separator (int ch)
+@@ -307,23 +305,13 @@ is_separator (int ch)
  static int
  getkey_buf ()
  {
@@ -24,7 +24,7 @@ Fix a bug speaking a char when cursor-right is input after space
    wchar_t ch;
    int key;
    int result;
--
+ 
 -  s1 = size;
 -  s2 = sizeof (wchar_t);
 -  b1 = (char *) buf;
@@ -36,11 +36,13 @@ Fix a bug speaking a char when cursor-right is input after space
 -    if (!s1)
 -      return ch;
 -  }
-+ 
++  result = mbtowc(&ch, buf, size);
++  if (result == size && result != -1)
++    return (int)ch;
    key = (int) buf[0];
    if (size > 1)
    {
-@@ -361,6 +346,7 @@ getinput ()
+@@ -361,6 +349,7 @@ getinput ()
      finish (0);
    }
    key = getkey_buf ();
@@ -48,7 +50,7 @@ Fix a bug speaking a char when cursor-right is input after space
    if (key == ui.disable)
    {
      if (ui.disabled)
-@@ -561,8 +547,10 @@ static char *bytes_left_start;
+@@ -561,8 +550,10 @@ static char *bytes_left_start;
  static void
  read_buf (int leave)
  {
@@ -61,16 +63,14 @@ Fix a bug speaking a char when cursor-right is input after space
    if (bytes_left)
    {
      memcpy (buf, bytes_left_start, bytes_left);
-@@ -578,17 +566,16 @@ read_buf (int leave)
+@@ -578,19 +569,17 @@ read_buf (int leave)
    buf[size] = 0;
    bytes_left = 0;
    b1 = (char *) buf;
 -  b2 = (char *) (wide_buf + leave);
 +  b2 = wide_buf + leave;
    if (leave)
--    memcpy (wide_buf, wide_buf + wsize - leave,
-+    memcpy (wide_buf
-+	    , wide_buf + wsize - leave,
+     memcpy (wide_buf, wide_buf + wsize - leave,
  	    sizeof (wchar_t) * (wsize - leave));
    s1 = size;
 -  s2 = (255 - leave) * sizeof (wchar_t);
@@ -82,9 +82,12 @@ Fix a bug speaking a char when cursor-right is input after space
 +    i = mbtowc (b2, b1, s1);
 +    if (i == -1)
      {
-       if (errno == EINVAL)	/* incomplete sequence at end of buffer */
+-      if (errno == EINVAL)	/* incomplete sequence at end of buffer */
++      if (errno == EILSEQ)	/* incomplete sequence at end of buffer */
        {
-@@ -599,10 +586,13 @@ read_buf (int leave)
+ 	break;
+       }
+@@ -599,10 +588,13 @@ read_buf (int leave)
        b1++;
        s1--;
      }
@@ -99,7 +102,7 @@ Fix a bug speaking a char when cursor-right is input after space
    wide_buf[wsize] = 0;
  }
  
-@@ -1253,6 +1243,7 @@ getoutput ()
+@@ -1253,6 +1245,7 @@ getoutput ()
        tts.oflag = oldoflag;
      }
    }
@@ -107,7 +110,7 @@ Fix a bug speaking a char when cursor-right is input after space
    if (ch == 13 || ch == 10 || ch == 32)
    {
      tts_flush ();
-@@ -1268,7 +1259,8 @@ getoutput ()
+@@ -1268,7 +1261,8 @@ getoutput ()
    {
      tts_flush ();
    }
@@ -117,7 +120,7 @@ Fix a bug speaking a char when cursor-right is input after space
    {
      tts.oflag = stathit = 0;
      oldcr = win->cr;
-@@ -1470,17 +1462,6 @@ main (int argc, char *argv[])
+@@ -1470,17 +1464,6 @@ main (int argc, char *argv[])
    bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
    textdomain (GETTEXT_PACKAGE);
    strcpy (charmap, nl_langinfo (CODESET));


Home | Main Index | Thread Index | Old Index