summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2017-11-25 10:25:44 +0100
committerPacho Ramos <pacho@gentoo.org>2017-11-25 10:31:23 +0100
commit7587775a50aaab00ffe7d396dfc7328de1928852 (patch)
treea7602011f38bce4904f2194dca5c852907954941
parentdev-python/virtualenv: keyword for amd64-fbsd. (diff)
downloadgentoo-7587775a50aaab00ffe7d396dfc7328de1928852.tar.gz
gentoo-7587775a50aaab00ffe7d396dfc7328de1928852.tar.bz2
gentoo-7587775a50aaab00ffe7d396dfc7328de1928852.zip
app-text/apvlv: Fix building with gcc7 with Debian patch.
Package-Manager: Portage-2.3.14, Repoman-2.3.6
-rw-r--r--app-text/apvlv/Manifest2
-rw-r--r--app-text/apvlv/apvlv-0.1.5-r2.ebuild63
-rw-r--r--app-text/apvlv/files/apvlv-0.1.5-gcc7.patch22
3 files changed, 86 insertions, 1 deletions
diff --git a/app-text/apvlv/Manifest b/app-text/apvlv/Manifest
index fa048e6d7bec..e2e8e977e53f 100644
--- a/app-text/apvlv/Manifest
+++ b/app-text/apvlv/Manifest
@@ -1 +1 @@
-DIST apvlv-0.1.5.tar.gz 4254177 SHA256 dca98157e63c9fec12d6514751ea26549813dc7b87d838b0003f31a444100a8a SHA512 680b2d6e272cda34b0b9065f5fdf7b917a4e3ed4d54a6e78cb41a60cf43374c687b506d4148d6cecf87912957fbe6bc4c77e9278616fd236e49ade15774e1ccd WHIRLPOOL c254d3ca939b308dc58aadee20e33c5a6bda7495c4521d3433d2eb4a03ab4c9fd25f0589554506b08496f9024ef6d8c8648abc31b5175ad5b181272b9e6cae00
+DIST apvlv-0.1.5.tar.gz 4254177 BLAKE2B 53bb949838353e7e8387219d086b8c7efef78d4bff15196c68e3d0fe6c298be8a771ecce4e156254f1d072d1715794caff640ebe795f8da73e09d6a4fe4addc9 SHA512 680b2d6e272cda34b0b9065f5fdf7b917a4e3ed4d54a6e78cb41a60cf43374c687b506d4148d6cecf87912957fbe6bc4c77e9278616fd236e49ade15774e1ccd
diff --git a/app-text/apvlv/apvlv-0.1.5-r2.ebuild b/app-text/apvlv/apvlv-0.1.5-r2.ebuild
new file mode 100644
index 000000000000..ba041b48bf20
--- /dev/null
+++ b/app-text/apvlv/apvlv-0.1.5-r2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils cmake-utils gnome2-utils
+
+DESCRIPTION="Alf's PDF Viewer Like Vim"
+HOMEPAGE="https://naihe2010.github.com/apvlv/"
+SRC_URI="https://github.com/naihe2010/apvlv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug djvu"
+
+RDEPEND="
+ >=app-text/poppler-0.18:=[cairo,xpdf-headers(+)]
+ dev-libs/glib:2
+ x11-libs/gtk+:3
+ djvu? ( app-text/djvu:= )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ # preserve cflags
+ "${FILESDIR}/${PN}-0.1.5-cflags.patch"
+ "${FILESDIR}/${PN}-0.1.5-gcc6.patch"
+ "${FILESDIR}/${PN}-0.1.5-gcc7.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DSYSCONFDIR=/etc/${PN}
+ -DDOCDIR=/usr/share/${PN}
+ -DMANDIR=/usr/share/man
+ -DAPVLV_WITH_HTML=OFF
+ -DAPVLV_WITH_UMD=OFF
+ -DAPVLV_WITH_TXT=ON
+ $(cmake-utils_use djvu APVLV_WITH_DJVU)
+ $(cmake-utils_use debug APVLV_ENABLE_DEBUG)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc AUTHORS NEWS README THANKS TODO
+ newicon -s 32 icons/pdf.png ${PN}.png
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/app-text/apvlv/files/apvlv-0.1.5-gcc7.patch b/app-text/apvlv/files/apvlv-0.1.5-gcc7.patch
new file mode 100644
index 000000000000..e55f2771395a
--- /dev/null
+++ b/app-text/apvlv/files/apvlv-0.1.5-gcc7.patch
@@ -0,0 +1,22 @@
+--- apvlv-0.1.5+dfsg.orig/src/ApvlvCmds.cc
++++ apvlv-0.1.5+dfsg/src/ApvlvCmds.cc
+@@ -200,7 +200,7 @@ namespace apvlv
+
+ if (len >= 4
+ && *s == '<'
+- && (e = strchr ((char *) s, '>')) != '\0' && *(s + 2) != '-')
++ && (e = strchr ((char *) s, '>')) && *(s + 2) != '-')
+ {
+ e++;
+ StringKeyMap::iterator it;
+--- apvlv-0.1.5+dfsg.orig/src/ApvlvCore.cc
++++ apvlv-0.1.5+dfsg/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 ()))
+ {
+ debug ("core :%p is not needed, delete it\n", this);
+ delete this;