0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-01-31 21:22:27 +00:00
termux-packages/packages/k2pdfopt/0009-CMakeLists.txt-use-system-gocr.patch
Leonid Pliushch 606c265a4c k2pdfopt: update to 2.53
Use new patches from http://archive.ubuntu.com/ubuntu/pool/universe/k/k2pdfopt/.

Added ghostscript as dependency as it is required according to readme
if OCR support is not compiled in.

Closes https://github.com/termux/termux-packages/issues/11089
2022-07-02 19:28:25 +03:00

31 lines
784 B
Diff

From 0bf96f4ccb5e0ef9e947a728a97cd23274a7a8eb Mon Sep 17 00:00:00 2001
From: yangfl <yangfl@users.noreply.github.com>
Date: Sun, 14 Jun 2020 13:32:54 +0800
Subject: [PATCH 09/10] CMakeLists.txt: use system gocr
---
CMakeLists.txt | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 98094d5..67e9d14 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,7 +80,12 @@ if(DJVU_FOUND)
set(K2PDFOPT_LIB ${K2PDFOPT_LIB} ${DJVU_LDFLAGS})
endif(DJVU_FOUND)
-# HAVE_GOCR_LIB
+find_library(GOCR NAMES gocr)
+if(GOCR_FOUND)
+ set(HAVE_GOCR_LIB 1)
+ set(K2PDFOPT_LIB ${K2PDFOPT_LIB} ${GOCR_LIB})
+ include_directories(SYSTEM ${GOCR_INCLUDEDIR})
+endif(GOCR_FOUND)
pkg_check_modules(LEPT lept)
if(LEPT_FOUND)
--
2.28.0