mirror of
https://github.com/SlackBuildsOrg/slackbuilds
synced 2024-09-28 15:21:00 +02:00
libraries/jbig2enc: Patch for the newer leptonica.
Just recycled the termux-packages patches available on github Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
93de8c0762
commit
36b2483448
3 changed files with 66 additions and 1 deletions
20
libraries/jbig2enc/configure.ac.patch
Normal file
20
libraries/jbig2enc/configure.ac.patch
Normal file
|
@ -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
|
||||
])
|
|
@ -0,0 +1,42 @@
|
|||
--- a/src/jbig2.cc
|
||||
+++ b/src/jbig2.cc
|
||||
@@ -29,6 +29,8 @@
|
||||
#endif
|
||||
|
||||
#include <leptonica/allheaders.h>
|
||||
+#include <leptonica/array_internal.h>
|
||||
+#include <leptonica/pix_internal.h>
|
||||
|
||||
#include "jbig2enc.h"
|
||||
|
||||
--- a/src/jbig2enc.cc
|
||||
+++ b/src/jbig2enc.cc
|
||||
@@ -24,6 +24,8 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <leptonica/allheaders.h>
|
||||
+#include <leptonica/array_internal.h>
|
||||
+#include <leptonica/pix_internal.h>
|
||||
|
||||
#include <math.h>
|
||||
#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 <stdio.h>
|
||||
|
||||
#include <leptonica/allheaders.h>
|
||||
+#include <leptonica/array_internal.h>
|
||||
+#include <leptonica/pix_internal.h>
|
||||
|
||||
#include <math.h>
|
||||
|
|
@ -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" \
|
||||
|
|
Loading…
Reference in a new issue