summaryrefslogtreecommitdiff
path: root/textproc/libexttextcat
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2020-03-12 17:39:28 +0000
committerwiz <wiz@pkgsrc.org>2020-03-12 17:39:28 +0000
commitdbdef2463dd4846d6805c81d276ecc0b60262f22 (patch)
treeea876ddc1cdeee545d957ad0b2136fc0c73465fc /textproc/libexttextcat
parentf46293b536aa54ca14c34590f376d42e0268e32f (diff)
downloadpkgsrc-dbdef2463dd4846d6805c81d276ecc0b60262f22.tar.gz
libexttextcat: fix unportable test(1) operator
Diffstat (limited to 'textproc/libexttextcat')
-rw-r--r--textproc/libexttextcat/distinfo4
-rw-r--r--textproc/libexttextcat/patches/patch-src_test-primary.sh.in15
-rw-r--r--textproc/libexttextcat/patches/patch-src_test-secondary.sh.in15
3 files changed, 33 insertions, 1 deletions
diff --git a/textproc/libexttextcat/distinfo b/textproc/libexttextcat/distinfo
index a86f2eff176..f9e9d08d9e0 100644
--- a/textproc/libexttextcat/distinfo
+++ b/textproc/libexttextcat/distinfo
@@ -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 --git a/textproc/libexttextcat/patches/patch-src_test-primary.sh.in b/textproc/libexttextcat/patches/patch-src_test-primary.sh.in
new file mode 100644
index 00000000000..12c8eef1969
--- /dev/null
+++ b/textproc/libexttextcat/patches/patch-src_test-primary.sh.in
@@ -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 --git a/textproc/libexttextcat/patches/patch-src_test-secondary.sh.in b/textproc/libexttextcat/patches/patch-src_test-secondary.sh.in
new file mode 100644
index 00000000000..33c4fdf823b
--- /dev/null
+++ b/textproc/libexttextcat/patches/patch-src_test-secondary.sh.in
@@ -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