From 36b248344806e1cc0106dab71104e5fc18262f15 Mon Sep 17 00:00:00 2001 From: Didier Spaier Date: Sun, 8 Jan 2023 09:49:08 +0100 Subject: libraries/jbig2enc: Patch for the newer leptonica. Just recycled the termux-packages patches available on github Signed-off-by: Matteo Bernardini Signed-off-by: Willy Sudiarto Raharjo --- libraries/jbig2enc/configure.ac.patch | 20 +++++++++++ .../jbig2enc-2019.09.08-leptonica-1.83.0.patch | 42 ++++++++++++++++++++++ libraries/jbig2enc/jbig2enc.SlackBuild | 5 ++- 3 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 libraries/jbig2enc/configure.ac.patch create mode 100644 libraries/jbig2enc/jbig2enc-2019.09.08-leptonica-1.83.0.patch (limited to 'libraries/jbig2enc') diff --git a/libraries/jbig2enc/configure.ac.patch b/libraries/jbig2enc/configure.ac.patch new file mode 100644 index 0000000000..0f3908d931 --- /dev/null +++ b/libraries/jbig2enc/configure.ac.patch @@ -0,0 +1,20 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2,7 +2,7 @@ + AC_INIT([jbig2enc], [0.28], [agl@imperialviolet.org], [jbig2enc-0.28], + [https://github.com/agl/jbig2enc]) + AC_CONFIG_MACRO_DIR([m4]) +-AM_INIT_AUTOMAKE([-Wall -Werror foreign no-dependencies]) ++AM_INIT_AUTOMAKE([-Wall foreign no-dependencies]) + + # this should fix automake 1.12 build and compatible with automake 1.11 + m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) +@@ -73,7 +73,7 @@ + fi], + [libtool_patch_use_rpath=$enable_rpath]) + +-AC_CHECK_LIB([lept], [findFileFormatStream], [], [ ++AC_CHECK_LIB([leptonica], [findFileFormatStream], [], [ + echo "Error! Leptonica not detected." + exit -1 + ]) diff --git a/libraries/jbig2enc/jbig2enc-2019.09.08-leptonica-1.83.0.patch b/libraries/jbig2enc/jbig2enc-2019.09.08-leptonica-1.83.0.patch new file mode 100644 index 0000000000..f80d41ccdd --- /dev/null +++ b/libraries/jbig2enc/jbig2enc-2019.09.08-leptonica-1.83.0.patch @@ -0,0 +1,42 @@ +--- a/src/jbig2.cc ++++ b/src/jbig2.cc +@@ -29,6 +29,8 @@ + #endif + + #include ++#include ++#include + + #include "jbig2enc.h" + +--- a/src/jbig2enc.cc ++++ b/src/jbig2enc.cc +@@ -24,6 +24,8 @@ + #include + + #include ++#include ++#include + + #include + #if defined(sun) +@@ -206,7 +208,7 @@ + numaSetValue(ctx->classer->naclass, i, new_representant); + } + } +- pixChangeRefcount(ctx->classer->pixat->pix[new_representant],pixGetRefcount(ctx->classer->pixat->pix[second_template])); ++ ctx->classer->pixat->pix[new_representant]->refcount += ctx->classer->pixat->pix[second_template]->refcount; + } + return 0; + } +--- a/src/jbig2sym.cc ++++ b/src/jbig2sym.cc +@@ -29,6 +29,8 @@ + #include + + #include ++#include ++#include + + #include + diff --git a/libraries/jbig2enc/jbig2enc.SlackBuild b/libraries/jbig2enc/jbig2enc.SlackBuild index 91446d16e2..c095d1f88c 100644 --- a/libraries/jbig2enc/jbig2enc.SlackBuild +++ b/libraries/jbig2enc/jbig2enc.SlackBuild @@ -13,7 +13,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=jbig2enc VERSION=${VERSION:-0.29} -BUILD=${BUILD:-3} +BUILD=${BUILD:-4} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -65,6 +65,9 @@ chown -R root:root . find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ +patch -p1 < $CWD/jbig2enc-2019.09.08-leptonica-1.83.0.patch +patch -p1 < $CWD/configure.ac.patch + autoreconf -if CFLAGS="$SLKCFLAGS" \ -- cgit v1.2.3-65-gdbad