summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfacutuesca2017-05-08 21:45:31 -0300
committerfacutuesca2017-05-08 21:45:31 -0300
commitb37ca585f3a74c1f729610d0d5c537254317deda (patch)
tree4d62f38440777ad74abbb629be002efc84e54542
parenta0c30372f27d33e2c9f1767ff136b20ef1be29e9 (diff)
downloadaur-b37ca585f3a74c1f729610d0d5c537254317deda.tar.gz
Update to v2.41
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD60
-rw-r--r--k2pdfopt.patch36
-rw-r--r--libraries_mod.zipbin0 -> 72309 bytes
-rw-r--r--mupdf.patch12
-rw-r--r--tesseract.patch6
6 files changed, 82 insertions, 58 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 95efdbb7ff68..ef927d02084f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = k2pdfopt
pkgdesc = A tool that optimizes PDF files for viewing on mobile readers
- pkgver = 2.34a
- pkgrel = 4
+ pkgver = 2.41
+ pkgrel = 1
url = http://www.willus.com/k2pdfopt/
arch = i686
arch = x86_64
@@ -11,22 +11,24 @@ pkgbase = k2pdfopt
depends = djvulibre>=3.5.25.3
depends = netpbm>=10.61.02
depends = leptonica>=1.72
- source = http://www.willus.com/k2pdfopt/src/k2pdfopt_v2.34a_src.zip
- source = http://www.willus.com/k2pdfopt/src/k2pdfopt_v2.34_src.zip
- source = http://www.mupdf.com/downloads/archive/mupdf-1.8-source.tar.gz
- source = https://github.com/tesseract-ocr/tesseract/archive/3.04.01.tar.gz
+ source = http://www.willus.com/k2pdfopt/src/k2pdfopt_v2.41_src.zip
+ source = http://www.mupdf.com/downloads/archive/mupdf-1.10a-source.tar.gz
+ source = https://github.com/tesseract-ocr/tesseract/archive/3.05.00.tar.gz
source = http://www-e.uni-magdeburg.de/jschulen/ocr/gocr-0.49.tar.gz
source = http://downloads.sourceforge.net/project/openjpeg.mirror/2.1.0/openjpeg-2.1.0.tar.gz
source = k2pdfopt.patch
source = tesseract.patch
- md5sums = 4c074b9588d714cb7bfc7b58f22d8d0a
- md5sums = bdca1b23bb81d23e515faf5260c44599
- md5sums = 3205256d78d8524d67dd2a47c7a345fa
- md5sums = 645a21effcf2825a3473849d72a7fd90
+ source = mupdf.patch
+ source = libraries_mod.zip
+ md5sums = 549644b44b560b26ae1e634fcb2bbe59
+ md5sums = f80fbba2524d1d52f6ed09237d382411
+ md5sums = 478ba26e8e7ea8f6f466d4dfc2332d34
md5sums = 4e527bc4bdd97c2be15fdd818857507f
md5sums = f6419fcc233df84f9a81eb36633c6db6
- md5sums = 75dcbbac103eafe5374e14120ff591aa
- md5sums = 3442e31f2f6302cf17dcc3a4a8cef40a
+ md5sums = e33be836fe4fa9957db7079121b1840d
+ md5sums = 3db9d9cd3b7745af036c968dfe0ba376
+ md5sums = eb18b03abd7376a3de75824c31bd7f1a
+ md5sums = db04c31970a3f35492253f0f0e339a2f
pkgname = k2pdfopt
diff --git a/PKGBUILD b/PKGBUILD
index a851707a1332..223e8cd6974b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,13 +1,13 @@
# Maintainer: Facundo Tuesca <facutuesca at gmail dot com>
-_mupdf_version=1.8
-_tesseract_version=3.04.01
+_mupdf_version=1.10a
+_tesseract_version=3.05.00
_gocr_version=0.49
_openjpeg_version=2.1.0
pkgname=k2pdfopt
-pkgver=2.34a
-pkgrel=4
+pkgver=2.41
+pkgrel=1
pkgdesc="A tool that optimizes PDF files for viewing on mobile readers"
arch=('i686' 'x86_64')
url="http://www.willus.com/k2pdfopt/"
@@ -18,40 +18,50 @@ depends=('mupdf>=1.8'
'netpbm>=10.61.02'
'leptonica>=1.72')
source=("http://www.willus.com/k2pdfopt/src/${pkgname}_v${pkgver}_src.zip"
- "http://www.willus.com/k2pdfopt/src/${pkgname}_v2.34_src.zip"
"http://www.mupdf.com/downloads/archive/mupdf-${_mupdf_version}-source.tar.gz"
"https://github.com/tesseract-ocr/tesseract/archive/${_tesseract_version}.tar.gz"
"http://www-e.uni-magdeburg.de/jschulen/ocr/gocr-${_gocr_version}.tar.gz"
"http://downloads.sourceforge.net/project/openjpeg.mirror/${_openjpeg_version}/openjpeg-${_openjpeg_version}.tar.gz"
"k2pdfopt.patch"
- "tesseract.patch")
-md5sums=('4c074b9588d714cb7bfc7b58f22d8d0a'
- 'bdca1b23bb81d23e515faf5260c44599'
- '3205256d78d8524d67dd2a47c7a345fa'
- '645a21effcf2825a3473849d72a7fd90'
+ "tesseract.patch"
+ "mupdf.patch"
+ "libraries_mod.zip")
+md5sums=('549644b44b560b26ae1e634fcb2bbe59'
+ 'f80fbba2524d1d52f6ed09237d382411'
+ '478ba26e8e7ea8f6f466d4dfc2332d34'
'4e527bc4bdd97c2be15fdd818857507f'
'f6419fcc233df84f9a81eb36633c6db6'
- '75dcbbac103eafe5374e14120ff591aa'
- '3442e31f2f6302cf17dcc3a4a8cef40a')
+ 'e33be836fe4fa9957db7079121b1840d'
+ '3db9d9cd3b7745af036c968dfe0ba376'
+ 'eb18b03abd7376a3de75824c31bd7f1a'
+ 'db04c31970a3f35492253f0f0e339a2f')
prepare() {
-#needed for update 2.34a
- cp -r ${srcdir}/${pkgname}_v${pkgver}/* "${srcdir}/${pkgname}_v2.34/"
- rm -r "${srcdir}/${pkgname}_v${pkgver}"
- mv "${srcdir}/${pkgname}_v2.34" "${srcdir}/${pkgname}_v${pkgver}"
+#Needed to replace mupdfmod files with last version
+ rm -rf "${srcdir}/${pkgname}_v${pkgver}/mupdf_mod"
+ cp -r mupdf110a_mod/ "${srcdir}/${pkgname}_v${pkgver}/mupdf_mod"
+#Needed to add tesscapi.cpp missing from v2.41 source
+ cp -r tesseract_mod/tesscapi.cpp "${srcdir}/${pkgname}_v${pkgver}/tesseract_mod/"
#
cd "${srcdir}/${pkgname}_v${pkgver}"
rm -f "include_mod/gocr.h"
- cp mupdf_mod/font.c mupdf_mod/string.c mupdf_mod/filter-dct.c mupdf_mod/load-* "${srcdir}/mupdf-${_mupdf_version}-source/source/fitz/"
+ cp mupdf_mod/font.c mupdf_mod/font-win32.c mupdf_mod/string.c mupdf_mod/stext-device.c "${srcdir}/mupdf-${_mupdf_version}-source/source/fitz/"
cp mupdf_mod/pdf-* "${srcdir}/mupdf-${_mupdf_version}-source/source/pdf/"
- rm -rf ${srcdir}/mupdf-${_mupdf_version}-source/thirdparty/{curl,freetype,jpeg,zlib,openjpeg}
+ cp "${srcdir}/mupdf-${_mupdf_version}-source/source/fitz/font-imp.h" "${srcdir}/mupdf-${_mupdf_version}-source/source/pdf/"
+ cp "${srcdir}/mupdf-${_mupdf_version}-source/source/fitz/colorspace-imp.h" "${srcdir}/mupdf-${_mupdf_version}-source/source/pdf/"
+ rm -rf ${srcdir}/mupdf-${_mupdf_version}-source/thirdparty/{curl,freetype,harfbuzz,jpeg,zlib,openjpeg}
+ # this does not build with openssl 1.1.0, so disable checks
+ sed -i 's/pkg-config --exists \(libcrypto\|openssl\)/false/' "${srcdir}/mupdf-${_mupdf_version}-source/Makerules"
cp tesseract_mod/dawg.cpp "${srcdir}/tesseract-${_tesseract_version}/dict/"
- cp tesseract_mod/tessdatamanager.cpp "${srcdir}/tesseract-${_tesseract_version}/ccutil/"
- cp tesseract_mod/tessedit.cpp "${srcdir}/tesseract-${_tesseract_version}/ccmain/"
- cp tesseract_mod/tesscapi.cpp "${srcdir}/tesseract-${_tesseract_version}/api"
- cp include_mod/tesseract.h include_mod/leptonica.h "${srcdir}/tesseract-${_tesseract_version}/api/"
+ cp tesseract_mod/tessdatamanager.cpp tesseract_mod/ambigs.cpp tesseract_mod/ccutil.cpp tesseract_mod/ccutil.h "${srcdir}/tesseract-${_tesseract_version}/ccutil/"
+ cp tesseract_mod/tessedit.cpp tesseract_mod/thresholder.cpp "${srcdir}/tesseract-${_tesseract_version}/ccmain/"
+ cp tesseract_mod/imagedata.cpp "${srcdir}/tesseract-${_tesseract_version}/ccstruct/"
+ cp tesseract_mod/openclwrapper.h "${srcdir}/tesseract-${_tesseract_version}/opencl/"
+ cp tesseract_mod/tess_lang_mod_edge.h "${srcdir}/tesseract-${_tesseract_version}/cube/"
+ cp include_mod/tesseract.h include_mod/leptonica.h tesseract_mod/tesscapi.cpp "${srcdir}/tesseract-${_tesseract_version}/api/"
cd "${srcdir}"
patch -p0 -i "${srcdir}/tesseract.patch"
+ patch -p0 -i "${srcdir}/mupdf.patch"
patch -p1 -i "${srcdir}/k2pdfopt.patch"
mkdir -p "patched_libraries/lib"
}
@@ -65,7 +75,7 @@ build() {
cd "${srcdir}/mupdf-${_mupdf_version}-source/"
#Use the same openjpeg2 libraries as mupdf
make SYS_OPENJPEG_LIBS=-L/${srcdir}/patched_libraries/lib\ -lopenjp2 prefix="${srcdir}/patched_libraries" install
- install -Dm644 build/debug/libmujs.a "${srcdir}/patched_libraries/lib/"
+# install -Dm644 build/debug/libmujs.a "${srcdir}/patched_libraries/lib/"
cd "${srcdir}/tesseract-${_tesseract_version}/"
./autogen.sh
@@ -91,8 +101,8 @@ build() {
g++ -Ofast k2pdfopt.o -o k2pdfopt -I willuslib/ -I k2pdfoptlib/ -I include_mod/ \
-I ${srcdir}/patched_libraries/include -L ${srcdir}/patched_libraries/lib/ \
-L willuslib/ -L k2pdfoptlib/ -lk2pdfopt -lwillus -ldjvulibre -lz -lmupdf \
- -ljbig2dec -ljpeg -lopenjp2 -lpng -lfreetype -lpthread -lmujs \
- -lPgm2asc -llept -ltesseract -lcrypto
+ -ljbig2dec -ljpeg -lopenjp2 -lpng -lfreetype -lpthread \
+ -lPgm2asc -llept -ltesseract -lcrypto -lharfbuzz
}
diff --git a/k2pdfopt.patch b/k2pdfopt.patch
index c56d7d3aa121..ab705868045c 100644
--- a/k2pdfopt.patch
+++ b/k2pdfopt.patch
@@ -1,6 +1,6 @@
-diff -aur k2_old/k2pdfopt_v2.34a/willuslib/array.c k2_new/k2pdfopt_v2.34a/willuslib/array.c
---- k2_old/k2pdfopt_v2.34a/willuslib/array.c 2016-03-20 22:55:26.000000000 -0300
-+++ k2_new/k2pdfopt_v2.34a/willuslib/array.c 2016-03-20 22:56:07.839690928 -0300
+diff -aur k2_old/k2pdfopt_v2.41/willuslib/array.c k2_new/k2pdfopt_v2.41/willuslib/array.c
+--- k2_old/k2pdfopt_v2.41/willuslib/array.c 2014-12-01 13:24:26.000000000 -0300
++++ k2_new/k2pdfopt_v2.41/willuslib/array.c 2017-05-08 21:14:43.290333379 -0300
@@ -1072,7 +1072,7 @@
void arrayf_sort(float *a,int n)
@@ -10,9 +10,9 @@ diff -aur k2_old/k2pdfopt_v2.34a/willuslib/array.c k2_new/k2pdfopt_v2.34a/willus
}
-diff -aur k2_old/k2pdfopt_v2.34a/willuslib/math.c k2_new/k2pdfopt_v2.34a/willuslib/math.c
---- k2_old/k2pdfopt_v2.34a/willuslib/math.c 2016-03-20 22:55:26.000000000 -0300
-+++ k2_new/k2pdfopt_v2.34a/willuslib/math.c 2016-03-20 22:56:07.848690927 -0300
+diff -aur k2_old/k2pdfopt_v2.41/willuslib/math.c k2_new/k2pdfopt_v2.41/willuslib/math.c
+--- k2_old/k2pdfopt_v2.41/willuslib/math.c 2013-08-15 20:33:50.000000000 -0300
++++ k2_new/k2pdfopt_v2.41/willuslib/math.c 2017-05-08 21:14:43.297000046 -0300
@@ -532,7 +532,7 @@
@@ -22,9 +22,9 @@ diff -aur k2_old/k2pdfopt_v2.34a/willuslib/math.c k2_new/k2pdfopt_v2.34a/willusl
{
int top,n1;
-diff -aur k2_old/k2pdfopt_v2.34a/willuslib/ocrjocr.c k2_new/k2pdfopt_v2.34a/willuslib/ocrjocr.c
---- k2_old/k2pdfopt_v2.34a/willuslib/ocrjocr.c 2016-03-20 22:55:26.000000000 -0300
-+++ k2_new/k2pdfopt_v2.34a/willuslib/ocrjocr.c 2016-03-20 22:56:07.861690926 -0300
+diff -aur k2_old/k2pdfopt_v2.41/willuslib/ocrgocr.c k2_new/k2pdfopt_v2.41/willuslib/ocrgocr.c
+--- k2_old/k2pdfopt_v2.41/willuslib/ocrgocr.c 2016-10-29 15:12:25.000000000 -0300
++++ k2_new/k2pdfopt_v2.41/willuslib/ocrgocr.c 2017-05-08 21:14:43.313666712 -0300
@@ -29,6 +29,8 @@
#ifdef HAVE_GOCR_LIB
#include <gocr.h>
@@ -34,7 +34,7 @@ diff -aur k2_old/k2pdfopt_v2.34a/willuslib/ocrjocr.c k2_new/k2pdfopt_v2.34a/will
/*
** bmp8 must be grayscale
** (x1,y1) and (x2,y2) from top left of bitmap
-@@ -66,6 +68,7 @@
+@@ -63,6 +65,7 @@
h=y2-y1+1;
dh=h+bw*2;
job=&_job;
@@ -42,9 +42,9 @@ diff -aur k2_old/k2pdfopt_v2.34a/willuslib/ocrjocr.c k2_new/k2pdfopt_v2.34a/will
job_init(job);
job_init_image(job);
// willus_mem_alloc_warn((void **)&job->src.p.p,w*h,funcname,10);
-diff -aur k2_old/k2pdfopt_v2.34a/willuslib/string.c k2_new/k2pdfopt_v2.34a/willuslib/string.c
---- k2_old/k2pdfopt_v2.34a/willuslib/string.c 2016-03-20 22:55:26.000000000 -0300
-+++ k2_new/k2pdfopt_v2.34a/willuslib/string.c 2016-03-20 22:56:07.854690927 -0300
+diff -aur k2_old/k2pdfopt_v2.41/willuslib/string.c k2_new/k2pdfopt_v2.41/willuslib/string.c
+--- k2_old/k2pdfopt_v2.41/willuslib/string.c 2016-03-19 13:19:33.000000000 -0300
++++ k2_new/k2pdfopt_v2.41/willuslib/string.c 2017-05-08 21:14:43.303666713 -0300
@@ -81,7 +81,7 @@
** Returns NULL if EOF, otherwise returns pointer to the string.
**
@@ -54,9 +54,9 @@ diff -aur k2_old/k2pdfopt_v2.34a/willuslib/string.c k2_new/k2pdfopt_v2.34a/willu
{
int i;
-diff -aur k2_old/k2pdfopt_v2.34a/willuslib/willus.h k2_new/k2pdfopt_v2.34a/willuslib/willus.h
---- k2_old/k2pdfopt_v2.34a/willuslib/willus.h 2016-03-20 22:55:26.000000000 -0300
-+++ k2_new/k2pdfopt_v2.34a/willuslib/willus.h 2016-03-20 22:56:07.834690928 -0300
+diff -aur k2_old/k2pdfopt_v2.41/willuslib/willus.h k2_new/k2pdfopt_v2.41/willuslib/willus.h
+--- k2_old/k2pdfopt_v2.41/willuslib/willus.h 2017-02-25 05:26:34.000000000 -0300
++++ k2_new/k2pdfopt_v2.41/willuslib/willus.h 2017-05-08 21:14:43.283666712 -0300
@@ -227,9 +227,6 @@
** CMAKE handles the defines, not this source
** (Mod from Dirk Thierbach, 31-Dec-2013)
@@ -76,7 +76,7 @@ diff -aur k2_old/k2pdfopt_v2.34a/willuslib/willus.h k2_new/k2pdfopt_v2.34a/willu
/*
** Consistency check
*/
-@@ -553,7 +550,7 @@
+@@ -556,7 +553,7 @@
int *n,FILE *err);
int readxyz_ex (char *filename,double **x,double **y,double **z,
int *n,FILE *err,int ignore_after_semicolon);
@@ -85,7 +85,7 @@ diff -aur k2_old/k2pdfopt_v2.34a/willuslib/willus.h k2_new/k2pdfopt_v2.34a/willu
void sortd (double *x,int n);
void sorti (int *x,int n);
void sortxy (float *x,float *y,int n);
-@@ -622,7 +619,7 @@
+@@ -625,7 +622,7 @@
/* string.c */
void clean_line (char *buf);
void clean_line_end(char *buf);
diff --git a/libraries_mod.zip b/libraries_mod.zip
new file mode 100644
index 000000000000..99452917b565
--- /dev/null
+++ b/libraries_mod.zip
Binary files differ
diff --git a/mupdf.patch b/mupdf.patch
new file mode 100644
index 000000000000..b8ca04982483
--- /dev/null
+++ b/mupdf.patch
@@ -0,0 +1,12 @@
+diff -aur mupdf-1.10a-source/Makefile mupdf-1.10a-source.new/Makefile
+--- mupdf-1.10a-source/Makefile 2016-11-28 10:34:04.000000000 -0300
++++ mupdf-1.10a-source.new/Makefile 2017-05-08 21:29:22.913691598 -0300
+@@ -78,7 +78,7 @@
+ ALL_DIR += $(OUT)/platform/gl
+ ALL_DIR += $(OUT)/fonts
+
+-FITZ_HDR := include/mupdf/fitz.h $(wildcard include/mupdf/fitz/*.h)
++FITZ_HDR := include/mupdf/fitz.h include/mupdf/pdf.h $(wildcard include/mupdf/fitz/*.h)
+ PDF_HDR := include/mupdf/pdf.h $(wildcard include/mupdf/pdf/*.h)
+ SVG_HDR := include/mupdf/svg.h
+ HTML_HDR := include/mupdf/html.h
diff --git a/tesseract.patch b/tesseract.patch
index c3772ebb013e..11578b93266b 100644
--- a/tesseract.patch
+++ b/tesseract.patch
@@ -1,6 +1,6 @@
-diff -aur tesseract-3.04.01/api/Makefile.am tesseract-3.04.01.new/api/Makefile.am
---- tesseract-3.04.01/api/Makefile.am 2016-02-16 18:27:01.000000000 -0300
-+++ tesseract-3.04.01.new/api/Makefile.am 2016-03-20 22:04:24.928955673 -0300
+diff -aur tesseract-3.05.00/api/Makefile.am tesseract-3.05.00.new/api/Makefile.am
+--- tesseract-3.05.00/api/Makefile.am 2017-02-16 14:59:48.000000000 -0300
++++ tesseract-3.05.00.new/api/Makefile.am 2017-05-07 08:17:45.387021158 -0300
@@ -42,7 +42,7 @@
if VISIBILITY
libtesseract_api_la_CPPFLAGS += -DTESS_EXPORTS