summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartłomiej Piotrowski2018-01-05 21:06:14 +0100
committerBartłomiej Piotrowski2018-01-05 21:06:14 +0100
commit83252c44e720bdde471cebc9706c31c62e4ea056 (patch)
tree1b3a1809ee08471bee1f7e683a5aeb73de08fa38
downloadaur-83252c44e720bdde471cebc9706c31c62e4ea056.tar.gz
Import from official repositories
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD50
-rw-r--r--gcc6.patch12
-rw-r--r--gcc7.patch47
4 files changed, 130 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..92fa0a369d7d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = apvlv
+ pkgdesc = PDF/DJVU/TXT viewer which behaves like Vim
+ pkgver = 0.1.5
+ pkgrel = 5
+ url = http://naihe2010.github.com/apvlv/
+ arch = x86_64
+ license = GPL2
+ makedepends = cmake
+ depends = gtk3
+ depends = poppler-glib
+ depends = djvulibre
+ backup = etc/apvlvrc
+ source = apvlv-0.1.5.tar.gz::https://github.com/naihe2010/apvlv/archive/v0.1.5.tar.gz
+ source = gcc6.patch
+ source = gcc7.patch
+ md5sums = e200e1f8ad7e765399d08845d6de2c9b
+ md5sums = a0cb038ddb3c3e0c8a0e991f1deb2ad3
+ md5sums = dd9713d10716c43dab7722d8b6107ea8
+
+pkgname = apvlv
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e011d96d2cdf
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+# $Id: PKGBUILD 266875 2017-11-15 14:29:11Z foutrelis $
+# Maintainer: Jonathan Steel <jsteel at archlinux.org>
+# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
+# Contributor: Brad Fanella <bradfanella@archlinux.us>
+# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
+# Contributor: tocer.deng <tocer.deng@gmail.com>
+
+pkgname=apvlv
+pkgver=0.1.5
+pkgrel=5
+pkgdesc='PDF/DJVU/TXT viewer which behaves like Vim'
+arch=('x86_64')
+url="http://naihe2010.github.com/apvlv/"
+license=('GPL2')
+depends=('gtk3' 'poppler-glib' 'djvulibre')
+makedepends=('cmake')
+source=($pkgname-$pkgver.tar.gz::https://github.com/naihe2010/apvlv/archive/v$pkgver.tar.gz
+ gcc6.patch
+ gcc7.patch)
+backup=('etc/apvlvrc')
+md5sums=('e200e1f8ad7e765399d08845d6de2c9b'
+ 'a0cb038ddb3c3e0c8a0e991f1deb2ad3'
+ 'dd9713d10716c43dab7722d8b6107ea8')
+
+prepare() {
+ cd $pkgname-$pkgver
+
+ # Fix build
+ patch -Np1 -i ../gcc6.patch
+ patch -Np1 -i ../gcc7.patch
+}
+
+build() {
+ cd $pkgname-$pkgver
+
+ mkdir -p build
+ cd build
+
+ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \
+ -DAPVLV_WITH_DJVU=yes -DAPVLV_WITH_TXT=yes \
+ -DAPVLV_WITH_UMD=no ..
+
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver/build
+
+ make DESTDIR="$pkgdir" install
+}
diff --git a/gcc6.patch b/gcc6.patch
new file mode 100644
index 000000000000..0ffe3659d6d7
--- /dev/null
+++ b/gcc6.patch
@@ -0,0 +1,12 @@
+diff -Naur apvlv-0.1.5.orig/src/ApvlvParams.cc apvlv-0.1.5/src/ApvlvParams.cc
+--- apvlv-0.1.5.orig/src/ApvlvParams.cc 2015-01-10 15:04:24.000000000 +0100
++++ apvlv-0.1.5/src/ApvlvParams.cc 2017-02-09 20:03:08.655402750 +0100
+@@ -90,7 +90,7 @@
+ return false;
+ }
+
+- while ((getline (os, str)) != NULL)
++ while (getline (os, str))
+ {
+ string argu, data, crap;
+ stringstream is (str);
diff --git a/gcc7.patch b/gcc7.patch
new file mode 100644
index 000000000000..3f254711487d
--- /dev/null
+++ b/gcc7.patch
@@ -0,0 +1,47 @@
+From 9da539016cb6c317388020f4ebce1793077aa126 Mon Sep 17 00:00:00 2001
+From: Ryan Reno <ryan.reno@outlook.com>
+Date: Fri, 23 Jun 2017 21:56:22 -0700
+Subject: [PATCH] Changed comparions to remove compiler errors. In one case
+ changed to compare against a NULL pointer and another, the pointer was
+ dereferenced to compare against a char
+
+---
+ src/ApvlvCmds.cc | 4 ++--
+ src/ApvlvCore.cc | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/ApvlvCmds.cc b/src/ApvlvCmds.cc
+index c7422f7..d4c40dd 100644
+--- a/src/ApvlvCmds.cc
++++ b/src/ApvlvCmds.cc
+@@ -192,7 +192,7 @@ namespace apvlv
+ const char *ApvlvCmd::append (const char *s)
+ {
+ size_t len;
+- char *e;
++ char *e = strchr((char *)s, '>');
+
+ len = strlen (s);
+
+@@ -200,7 +200,7 @@ namespace apvlv
+
+ if (len >= 4
+ && *s == '<'
+- && (e = strchr ((char *) s, '>')) != '\0' && *(s + 2) != '-')
++ && (*e != '\0' && *(s + 2) != '-'))
+ {
+ e++;
+ StringKeyMap::iterator it;
+diff --git a/src/ApvlvCore.cc b/src/ApvlvCore.cc
+index 672e5ef..e6e34f7 100644
+--- a/src/ApvlvCore.cc
++++ b/src/ApvlvCore.cc
+@@ -90,7 +90,7 @@ namespace apvlv
+ {
+ mInuse = use;
+
+- if (mInuse == false && gView->hasloaded (filename (), type ()) == false)
++ if (mInuse == false && gView->hasloaded (filename (), type ()) == NULL)
+ {
+ debug ("core :%p is not needed, delete it\n", this);
+ delete this;