[arch-commits] Commit in ebook-tools/repos/extra-x86_64 (3 files)

Antonio Rojas arojas at archlinux.org
Thu May 2 10:19:59 UTC 2019


    Date: Thursday, May 2, 2019 @ 10:19:58
  Author: arojas
Revision: 352378

archrelease: copy trunk to extra-x86_64

Added:
  ebook-tools/repos/extra-x86_64/PKGBUILD
    (from rev 352377, ebook-tools/trunk/PKGBUILD)
  ebook-tools/repos/extra-x86_64/crash-fix.patch
    (from rev 352377, ebook-tools/trunk/crash-fix.patch)
Deleted:
  ebook-tools/repos/extra-x86_64/PKGBUILD

-----------------+
 PKGBUILD        |   72 ++++++++++++++++++++++++++++--------------------------
 crash-fix.patch |   51 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 89 insertions(+), 34 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2019-05-02 10:19:30 UTC (rev 352377)
+++ PKGBUILD	2019-05-02 10:19:58 UTC (rev 352378)
@@ -1,34 +0,0 @@
-# Maintainer: Antonio Rojas <arojas at archlinux.org>
-# Contributor: Giovanni Scafora <giovanni at archlinux.org>
-
-pkgname=ebook-tools
-pkgver=0.2.2
-pkgrel=5
-pkgdesc="Tools for accessing and converting various ebook file formats"
-arch=(x86_64)
-url="https://sourceforge.net/projects/ebook-tools/"
-license=(custom)
-depends=(libzip libxml2 convertlit)
-makedepends=(cmake)
-source=("https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz")
-sha256sums=('cbc35996e911144fa62925366ad6a6212d6af2588f1e39075954973bbee627ae')
-
-prepare() {
-  mkdir -p build
-}
-
-build() {
-  cd build
-  cmake ../$pkgname-$pkgver \
-    -DCMAKE_BUILD_TYPE=Release \
-    -DCMAKE_INSTALL_PREFIX=/usr
-  make
-}
-
-package() {
-  cd build
-  make DESTDIR="$pkgdir" install
-
-  install -Dm644 "$srcdir"/$pkgname-$pkgver/LICENSE \
-    -t "$pkgdir"/usr/share/licenses/$pkgname/
-}

Copied: ebook-tools/repos/extra-x86_64/PKGBUILD (from rev 352377, ebook-tools/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2019-05-02 10:19:58 UTC (rev 352378)
@@ -0,0 +1,38 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Giovanni Scafora <giovanni at archlinux.org>
+
+pkgname=ebook-tools
+pkgver=0.2.2
+pkgrel=6
+pkgdesc="Tools for accessing and converting various ebook file formats"
+arch=(x86_64)
+url="https://sourceforge.net/projects/ebook-tools/"
+license=(custom)
+depends=(libzip libxml2 convertlit)
+makedepends=(cmake)
+source=("https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+        crash-fix.patch)
+sha256sums=('cbc35996e911144fa62925366ad6a6212d6af2588f1e39075954973bbee627ae'
+            'ad556ce08909727a6022c9f1632086ccb8623a81a4f39cd34722e22116e14527')
+
+prepare() {
+  mkdir -p build
+
+  cd $pkgname-$pkgver
+  patch -p2 -i ../crash-fix.patch # https://sourceforge.net/p/ebook-tools/bugs/8/
+}
+
+build() {
+  cd build
+  cmake ../$pkgname-$pkgver \
+    -DCMAKE_INSTALL_PREFIX=/usr
+  make
+}
+
+package() {
+  cd build
+  make DESTDIR="$pkgdir" install
+
+  install -Dm644 "$srcdir"/$pkgname-$pkgver/LICENSE \
+    -t "$pkgdir"/usr/share/licenses/$pkgname/
+}

Copied: ebook-tools/repos/extra-x86_64/crash-fix.patch (from rev 352377, ebook-tools/trunk/crash-fix.patch)
===================================================================
--- crash-fix.patch	                        (rev 0)
+++ crash-fix.patch	2019-05-02 10:19:58 UTC (rev 352378)
@@ -0,0 +1,51 @@
+From 93ebf942a90f9c95797838f9adab94bc0378671c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens at rwth-aachen.de>
+Date: Tue, 30 Apr 2019 16:36:09 +0200
+Subject: [PATCH] Avoid crash on toc.ncx navPoint without navLabel
+
+Althoug at least one navLabel is required per navPoint, there is no
+guarantee it actually exists.
+
+Avoid crashes due to invalid accesses of a null label in case the toc is
+broken, and spew a warning.
+
+Fixes #8 epub_tit_next crashes on navPoint without navLabel.
+---
+ ebook-tools/src/libepub/epub.c | 5 +++--
+ ebook-tools/src/libepub/opf.c  | 4 ++++
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/ebook-tools/src/libepub/epub.c b/ebook-tools/src/libepub/epub.c
+index d085503..a259d9d 100644
+--- a/ebook-tools/src/libepub/epub.c
++++ b/ebook-tools/src/libepub/epub.c
+@@ -469,8 +469,9 @@ int epub_tit_next(struct titerator *tit) {
+   case TITERATOR_NAVMAP:
+   case TITERATOR_PAGES:
+     ti = GetNodeData(curr);
+-    tit->cache.label = 
+-      (char *)_opf_label_get_by_doc_lang(tit->epub->opf, ti->label);
++    if (ti->label)
++      tit->cache.label =
++        (char *)_opf_label_get_by_doc_lang(tit->epub->opf, ti->label);
+ 
+     if (! tit->cache.label)
+       tit->cache.label = (char *)ti->id;
+diff --git a/ebook-tools/src/libepub/opf.c b/ebook-tools/src/libepub/opf.c
+index 6851db2..09bce9e 100644
+--- a/ebook-tools/src/libepub/opf.c
++++ b/ebook-tools/src/libepub/opf.c
+@@ -398,6 +398,10 @@ void _opf_parse_navmap(struct opf *opf, xmlTextReaderPtr reader) {
+      
+       } else if (xmlTextReaderNodeType(reader) == 15) {
+         if (item) {
++          if (! item->label) {
++            _epub_print_debug(opf->epub, DEBUG_WARNING, 
++                              "- missing navlabel for nav point element");
++          }
+           _epub_print_debug(opf->epub, DEBUG_INFO, 
+                             "adding nav point item->%s %s (d:%d,p:%d)", 
+                             item->id, item->src, item->depth, item->playOrder);
+-- 
+2.21.0
+



More information about the arch-commits mailing list