pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/textproc/libexttextcat libexttextcat: fix unportable t...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1804ffdc4630
branches:  trunk
changeset: 424594:1804ffdc4630
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Thu Mar 12 17:39:28 2020 +0000

description:
libexttextcat: fix unportable test(1) operator

diffstat:

 textproc/libexttextcat/distinfo                               |   4 ++-
 textproc/libexttextcat/patches/patch-src_test-primary.sh.in   |  15 +++++++++++
 textproc/libexttextcat/patches/patch-src_test-secondary.sh.in |  15 +++++++++++
 3 files changed, 33 insertions(+), 1 deletions(-)

diffs (52 lines):

diff -r cdd659df2e6c -r 1804ffdc4630 textproc/libexttextcat/distinfo
--- a/textproc/libexttextcat/distinfo   Thu Mar 12 17:36:35 2020 +0000
+++ b/textproc/libexttextcat/distinfo   Thu Mar 12 17:39:28 2020 +0000
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.9 2017/10/02 15:20:38 wiz Exp $
+$NetBSD: distinfo,v 1.10 2020/03/12 17:39:28 wiz Exp $
 
 SHA1 (libexttextcat-3.4.5.tar.xz) = dd6b4163c752a44384f309f8dabb830161f5f85f
 RMD160 (libexttextcat-3.4.5.tar.xz) = da7b61766ac962abb4e0b2bcb2de6555b49cefc5
 SHA512 (libexttextcat-3.4.5.tar.xz) = f05a9f08c2f2f335d0e483c024321b96fee7424bc1398d4c6acbd9c501f92e22f881bc3d6ec2c0434f9bf4604f3c4b0e880e37d3d0de410eac1a20ea6669baa6
 Size (libexttextcat-3.4.5.tar.xz) = 1041268 bytes
 SHA1 (patch-src_Makefile.in) = a023cb31a7140e59b49cf022a4a47b59b6cb96b8
+SHA1 (patch-src_test-primary.sh.in) = b8e8016e6c718f43cbad29d6b277b9c5223f180e
+SHA1 (patch-src_test-secondary.sh.in) = d74977c99a6bc9ec06973ff83badcda7a5bc3bd3
diff -r cdd659df2e6c -r 1804ffdc4630 textproc/libexttextcat/patches/patch-src_test-primary.sh.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/libexttextcat/patches/patch-src_test-primary.sh.in       Thu Mar 12 17:39:28 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_test-primary.sh.in,v 1.1 2020/03/12 17:39:28 wiz Exp $
+
+Fix unportable test(1) operator.
+
+--- src/test-primary.sh.in.orig        2017-09-20 11:10:50.000000000 +0000
++++ src/test-primary.sh.in
+@@ -6,7 +6,7 @@ fi
+ testtextcat="$testtextcat @top_builddir@/src/testtextcat"
+ #take first guess
+ res=`cat @top_srcdir@/langclass/ShortTexts/$1.txt | $testtextcat @top_srcdir@/langclass/fpdb.conf @top_srcdir@/langclass/LM/ | sed -e "s/].*/]/" | sed -e "s/zh-CN/zh-Hans/" | sed -e 
"s/zh-TW/zh-Hant/" | sed -e "s/--utf8//" | sed -e "s/-utf8//" | sed -e "s/^\[sh\]$/\[sr-Latn\]/" | sed -e "s/^\[sr\]$/\[sr-Cyrl\]/" | sed -e "s/cyrillic/Cyrl/"`
+-if [ $res == "[$1]" ]; then
++if [ $res = "[$1]" ]; then
+     exit 0
+ else
+     exit 1
diff -r cdd659df2e6c -r 1804ffdc4630 textproc/libexttextcat/patches/patch-src_test-secondary.sh.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/libexttextcat/patches/patch-src_test-secondary.sh.in     Thu Mar 12 17:39:28 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_test-secondary.sh.in,v 1.1 2020/03/12 17:39:28 wiz Exp $
+
+Fix unportable test(1) operator.
+
+--- src/test-secondary.sh.in.orig      2017-09-20 11:10:50.000000000 +0000
++++ src/test-secondary.sh.in
+@@ -6,7 +6,7 @@ fi
+ testtextcat="$testtextcat @top_builddir@/src/testtextcat"
+ #take second guess
+ res=`cat @top_srcdir@/langclass/ShortTexts/$1.txt | $testtextcat @top_srcdir@/langclass/fpdb.conf @top_srcdir@/langclass/LM/ | sed -e "s/^.[^]]*]//" | sed -e "s/].*/]/" | sed -e "s/zh-CN/zh-Hans/" 
| sed -e "s/zh-TW/zh-Hant/" | sed -e "s/--utf8//" | sed -e "s/-utf8//" | sed -e "s/^\[sh\]$/\[sr-Latn\]/" | sed -e "s/^\[sr\]$/\[sr-Cyrl\]/" | sed -e "s/cyrillic/Cyrl/"`
+-if [ $res == "[$1]" ]; then
++if [ $res = "[$1]" ]; then
+     exit 0
+ else
+     exit 1



Home | Main Index | Thread Index | Old Index