aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-08-04 15:46:20 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-08-13 07:22:55 +0700
commitbb6381c8fe1b996e58e930f234633cf4c8e2cf98 (patch)
treeb5a9094642d6246f3f85db79eac73b755f417223
parent85cde4df65d09364b5227acd6fbb557df398ff31 (diff)
office/fbpdf: Updated for version 20160804.
-rw-r--r--office/fbpdf/fbpdf.SlackBuild19
-rw-r--r--office/fbpdf/fbpdf.info6
-rw-r--r--office/fbpdf/mupdf-1.7a.diff65
-rw-r--r--office/fbpdf/navigation.diff53
4 files changed, 39 insertions, 104 deletions
diff --git a/office/fbpdf/fbpdf.SlackBuild b/office/fbpdf/fbpdf.SlackBuild
index 33b522be1a67a..83a617ada2d56 100644
--- a/office/fbpdf/fbpdf.SlackBuild
+++ b/office/fbpdf/fbpdf.SlackBuild
@@ -9,13 +9,13 @@
# Source tarball made from: git clone git://repo.or.cz/fbpdf.git
PRGNAM=fbpdf
-VERSION=${VERSION:-20140822}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-20160804}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -26,8 +26,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -63,9 +63,8 @@ find -L . \
patch -p1 < $CWD/navigation.diff
# mupdf API keeps changing
-
sed -i \
- -e 's,-lmupdf -lmujs,`pkg-config --libs mupdf`,' \
+ -e 's,-lmupdf -lmujs,`pkg-config --libs mupdf` -lharfbuzz,' \
-e 's,-lopenjpeg,-lopenjp2,' \
Makefile
@@ -76,12 +75,8 @@ make ${PRGNAM}2 fbdjvu
install -s -m0755 ${PRGNAM}2 $PKG/usr/bin
install -s -m0755 fbdjvu $PKG/usr/bin
-# autodetect mupdf, apply patch if needed.
+# autodetect mupdf, build fbpdf if found (seems OK with mupdf-1.9a)
if pkg-config --exists mupdf; then
- MUPDFVER="$( pkg-config --modversion mupdf 2>/dev/null | \
- sed 's,^[0-9]*\.\([0-9][0-9]*\).*,\1,' )"
- [ "$MUPDFVER" != "" -a "$MUPDFVER" -gt "6" ] &&
- patch -p1 < $CWD/mupdf-1.7a.diff
make clean
make $PRGNAM
install -s -m0755 $PRGNAM $PKG/usr/bin
diff --git a/office/fbpdf/fbpdf.info b/office/fbpdf/fbpdf.info
index 050d17b1425e7..edeb0c450f7c9 100644
--- a/office/fbpdf/fbpdf.info
+++ b/office/fbpdf/fbpdf.info
@@ -1,8 +1,8 @@
PRGNAM="fbpdf"
-VERSION="20140822"
+VERSION="20160804"
HOMEPAGE="http://litcave.rudi.ir/"
-DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/fbpdf-20140822.tar.gz"
-MD5SUM="95cb4e7d37203285783ca5f0b9534c72"
+DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/fbpdf-20160804.tar.gz"
+MD5SUM="4acb4861f0a468ba920f41dbcc68c9a8"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/office/fbpdf/mupdf-1.7a.diff b/office/fbpdf/mupdf-1.7a.diff
deleted file mode 100644
index b51d4141c3d4d..0000000000000
--- a/office/fbpdf/mupdf-1.7a.diff
+++ /dev/null
@@ -1,65 +0,0 @@
-diff -Naur fbpdf-20140822/mupdf.c fbpdf-20140822.patched/mupdf.c
---- fbpdf-20140822/mupdf.c 2014-08-21 21:12:00.000000000 -0400
-+++ fbpdf-20140822.patched/mupdf.c 2015-09-12 03:24:40.000000000 -0400
-@@ -23,11 +23,11 @@
- int h, w;
- int x, y;
-
-- if (!(page = fz_load_page(doc->pdf, p - 1)))
-+ if (!(page = fz_load_page(doc->ctx, doc->pdf, p - 1)))
- return 1;
- fz_rotate(&ctm, rotate);
- fz_pre_scale(&ctm, (float) zoom / 10, (float) zoom / 10);
-- fz_bound_page(doc->pdf, page, &rect);
-+ fz_bound_page(doc->ctx, page, &rect);
- fz_transform_rect(&rect, &ctm);
- fz_round_rect(&bbox, &rect);
- w = MIN_(*cols, rect.x1 - rect.x0);
-@@ -37,8 +37,8 @@
- fz_clear_pixmap_with_value(doc->ctx, pix, 0xff);
-
- dev = fz_new_draw_device(doc->ctx, pix);
-- fz_run_page(doc->pdf, page, dev, &ctm, NULL);
-- fz_free_device(dev);
-+ fz_run_page(doc->ctx, page, dev, &ctm, NULL);
-+ fz_drop_device(doc->ctx, dev);
-
- for (y = 0; y < h; y++) {
- int xs = y * *cols + (*cols - w) / 2;
-@@ -50,7 +50,7 @@
- }
- }
- fz_drop_pixmap(doc->ctx, pix);
-- fz_free_page(doc->pdf, page);
-+ fz_drop_page(doc->ctx, page);
- *cols = w;
- *rows = h;
- return 0;
-@@ -58,7 +58,7 @@
-
- int doc_pages(struct doc *doc)
- {
-- return fz_count_pages(doc->pdf);
-+ return fz_count_pages(doc->ctx, doc->pdf);
- }
-
- struct doc *doc_open(char *path)
-@@ -69,7 +69,7 @@
- fz_try (doc->ctx) {
- doc->pdf = fz_open_document(doc->ctx, path);
- } fz_catch (doc->ctx) {
-- fz_free_context(doc->ctx);
-+ fz_drop_context(doc->ctx);
- free(doc);
- return NULL;
- }
-@@ -78,7 +78,7 @@
-
- void doc_close(struct doc *doc)
- {
-- fz_close_document(doc->pdf);
-- fz_free_context(doc->ctx);
-+ fz_drop_document(doc->ctx, doc->pdf);
-+ fz_drop_context(doc->ctx);
- free(doc);
- }
diff --git a/office/fbpdf/navigation.diff b/office/fbpdf/navigation.diff
index 6280062a68810..efab91be678dd 100644
--- a/office/fbpdf/navigation.diff
+++ b/office/fbpdf/navigation.diff
@@ -1,42 +1,47 @@
-diff -Naur fbpdf-20140822/README fbpdf-20140822.patched/README
---- fbpdf-20140822/README 2014-08-21 21:12:00.000000000 -0400
-+++ fbpdf-20140822.patched/README 2014-08-22 04:53:46.000000000 -0400
-@@ -28,7 +28,9 @@
- G go to page (the last page if no prefix)
+diff -Naur fbpdf-20160804/README fbpdf-20160804.patched/README
+--- fbpdf-20160804/README 2016-08-04 15:19:06.282346689 -0400
++++ fbpdf-20160804.patched/README 2016-08-04 15:07:40.384322633 -0400
+@@ -22,6 +22,9 @@
o set page number (for 'G' command only)
O set page number and go to current page
--z zoom; prefix multiplied by 10 (i.e. '15z' = 150%)
+ z zoom; prefix multiplied by 10 (i.e. '15z' = 150%)
+z/= zoom; prefix multiplied by 10 (i.e. '12z' = 120%). Default 15.
++ increase zoom by 10%
+- decrease zoom by 10%
r set rotation in degrees
- i print info
+ i print some information
q quit
-diff -Naur fbpdf-20140822/fbpdf.c fbpdf-20140822.patched/fbpdf.c
---- fbpdf-20140822/fbpdf.c 2014-08-21 21:12:00.000000000 -0400
-+++ fbpdf-20140822.patched/fbpdf.c 2014-08-22 04:53:56.000000000 -0400
-@@ -220,6 +220,7 @@
- numdiff = num - getcount(num);
+diff -Naur fbpdf-20160804/fbpdf.c fbpdf-20160804.patched/fbpdf.c
+--- fbpdf-20160804/fbpdf.c 2016-08-04 15:19:06.282346689 -0400
++++ fbpdf-20160804.patched/fbpdf.c 2016-08-04 15:18:38.618345719 -0400
+@@ -252,6 +252,7 @@
+ srow = prow;
break;
case 'z':
+ case '=':
zoom_page(getcount(zoom_def));
break;
- case 'Z':
-@@ -288,10 +289,12 @@
+ case 'w':
+@@ -301,10 +302,18 @@
case ' ':
- case CTRL('d'):
- head += fb_rows() * getcount(1) - step;
-+ if(head > prows) showpage(num + 1, 0);
+ case CTRLKEY('d'):
+ srow += srows * getcount(1) - step;
++ if(srow > prows) {
++ srow = 0;
++ loadpage(num + 1);
++ }
break;
case 127:
- case CTRL('u'):
- head -= fb_rows() * getcount(1) - step;
-+ if(head < 0) showpage(num - 1, prows - step);
+ case CTRLKEY('u'):
+ srow -= srows * getcount(1) - step;
++ if(srow < 0) {
++ srow = prows - step;
++ loadpage(num - 1);
++ }
break;
case '[':
- left = leftmost(0);
-@@ -307,6 +310,14 @@
+ scol = pcol;
+@@ -320,6 +329,14 @@
break;
case CTRLKEY('l'):
break;
@@ -48,6 +53,6 @@ diff -Naur fbpdf-20140822/fbpdf.c fbpdf-20140822.patched/fbpdf.c
+ count = 0;
+ if(zoom > 0) zoom_page(zoom - 1);
+ break;
- default:
- /* no need to redraw */
+ default: /* no need to redraw */
continue;
+ }