summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/ccextractor-autoconf-tesseract.patch
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-17 10:09:17 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-17 10:40:02 -0400
commit2dc2722dc022974684c5f5add577d2241b0b996d (patch)
tree60bc12747d92b882e0f339ecc11a7eaa0870e7c7 /gnu/packages/patches/ccextractor-autoconf-tesseract.patch
parent8832acc24eb8996f0b26988cbe5c456751af79d7 (diff)
gnu: ccextractor: Update to 0.94 and fix build.
* gnu/packages/gstreamer.scm (ccextractor): Update to 0.94. [source]: Apply patches. Add FIXME comment. [build-system]: Switch to gnu-build-system. [arguments]: Delete #tests? argument. Delete trailing #t and use gexps. Adjust configure flags accordingly, removing WITH_SHARING (doesn't exist for Autoconf) and adding '--without-rust'. Override check phase. [native-inputs]: Remove labels. Remove python-wrapper and perl. [propagated-inputs]: Remove labels. Remove nanomsg and zlib. Replace leptonica with leptonica-1.80. replace tesseract-ocr with tesseract-ocr-4. * gnu/packages/patches/ccextractor-add-missing-header.patch: New file. * gnu/packages/patches/ccextractor-autoconf-tesseract.patch: Likewise. * gnu/packages/patches/ccextractor-fix-ocr.patch: Likewise. * gnu/local.mk (dist_patch_DATA): Register them.
Diffstat (limited to 'gnu/packages/patches/ccextractor-autoconf-tesseract.patch')
-rw-r--r--gnu/packages/patches/ccextractor-autoconf-tesseract.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/gnu/packages/patches/ccextractor-autoconf-tesseract.patch b/gnu/packages/patches/ccextractor-autoconf-tesseract.patch
new file mode 100644
index 0000000000..3ce2925acf
--- /dev/null
+++ b/gnu/packages/patches/ccextractor-autoconf-tesseract.patch
@@ -0,0 +1,37 @@
+Upstream status: https://github.com/CCExtractor/ccextractor/pull/1504
+
+From f587050c2b5805ff5feb667736381dcc9991a5d3 Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Fri, 17 Mar 2023 00:57:13 -0400
+Subject: [PATCH] linux/configure.ac: Fix tesseract conditional problem.
+
+For tesseract-ocr's stock pkg-config, it would produce an error due to
+unquoted whitespace:
+
+ $ test ! -z `pkg-config --libs-only-l --silence-errors tesseract`
+ bash: test: syntax error: `-larchive' unexpected
+
+* linux/configure.ac: Use a positive test, and double-quote the $() command
+substitution.
+---
+ linux/configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/linux/configure.ac b/linux/configure.ac
+index 45fc11f3..118ee7fa 100644
+--- a/linux/configure.ac
++++ b/linux/configure.ac
+@@ -149,7 +149,7 @@ AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test ! $HAS_LEPT -gt
+ AM_CONDITIONAL(HARDSUBX_IS_ENABLED, [ test x$hardsubx = xtrue ])
+ AM_CONDITIONAL(OCR_IS_ENABLED, [ test x$ocr = xtrue || test x$hardsubx = xtrue ])
+ AM_CONDITIONAL(FFMPEG_IS_ENABLED, [ test x$ffmpeg = xtrue ])
+-AM_CONDITIONAL(TESSERACT_PRESENT, [ test ! -z `pkg-config --libs-only-l --silence-errors tesseract` ])
++AM_CONDITIONAL(TESSERACT_PRESENT, [ test -n "$(pkg-config --libs-only-l --silence-errors tesseract)" ])
+ AM_CONDITIONAL(TESSERACT_PRESENT_RPI, [ test -d "/usr/include/tesseract" && test `ls -A /usr/include/tesseract | wc -l` -gt 0 ])
+ AM_CONDITIONAL(SYS_IS_LINUX, [ test `uname -s` = "Linux"])
+ AM_CONDITIONAL(SYS_IS_MAC, [ test `uname -s` = "Darwin"])
+
+base-commit: cb496a711923c984251483776e652ca9c027513c
+--
+2.39.1
+