summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Grozin <grozin@gentoo.org>2017-12-16 13:05:06 +0700
committerAndrey Grozin <grozin@gentoo.org>2017-12-16 13:05:06 +0700
commit8ac213f9a02c77cabda2573d393b7057d6dda41d (patch)
tree67c784a725e21ce66a758ef931c1595991928e5f /app-text
parentdev-util/diffoscope: bump to 88 (diff)
downloadgentoo-8ac213f9a02c77cabda2573d393b7057d6dda41d.tar.gz
gentoo-8ac213f9a02c77cabda2573d393b7057d6dda41d.tar.bz2
gentoo-8ac213f9a02c77cabda2573d393b7057d6dda41d.zip
app-text/getxbook: bump to 1.2
Package-Manager: Portage-2.3.18, Repoman-2.3.6
Diffstat (limited to 'app-text')
-rw-r--r--app-text/getxbook/Manifest1
-rw-r--r--app-text/getxbook/files/getxbook-1.2.patch35
-rw-r--r--app-text/getxbook/getxbook-1.2.ebuild46
3 files changed, 82 insertions, 0 deletions
diff --git a/app-text/getxbook/Manifest b/app-text/getxbook/Manifest
index d2b040192bca..57b8d5959cdf 100644
--- a/app-text/getxbook/Manifest
+++ b/app-text/getxbook/Manifest
@@ -1 +1,2 @@
DIST getxbook-1.0.tar.bz2 22314 BLAKE2B cc3b652d4c580c8a5f41a0fc58c2d7cfc9e783fe2c159fb871c0a89d8246f65f9601265e8a7b51c593ef27a726b07faa84a9d2333f2d448b1661d1dad2e48e0f SHA512 df912e67ddd823e4b1ce1539522ef0804f74758aa27baa0c568790859fac97d40dbc8f574be936fdf3ba8a1135bcc3d9af1bedf0205353d7a12f8993393fe941
+DIST getxbook-1.2.tar.xz 23776 BLAKE2B 327a35a73a5e29eefcf3f87cd8ba1237da5d045e3ef009d3ae708797fa78e6d844baa4cba2e8ff021d71951ca100e087d69a98dac3ddce953afa549b63e7e1f8 SHA512 fec397d4fd979421658f7ef9535f3c25369c8bd4ea2f9adcd719f760fd01265ed789f9eca34374b245c24acd485b951c91fa92a36d5b6401a0e0bf4db746788d
diff --git a/app-text/getxbook/files/getxbook-1.2.patch b/app-text/getxbook/files/getxbook-1.2.patch
new file mode 100644
index 000000000000..da0ac83264e1
--- /dev/null
+++ b/app-text/getxbook/files/getxbook-1.2.patch
@@ -0,0 +1,35 @@
+diff -r -U2 getxbook-1.2.orig/Makefile getxbook-1.2/Makefile
+--- getxbook-1.2.orig/Makefile 2015-07-28 21:52:40.000000000 +0600
++++ getxbook-1.2/Makefile 2017-12-16 11:27:18.554822718 +0700
+@@ -1,4 +1,13 @@
+ # See COPYING file for copyright and license details.
+-include config.mk
++VERSION = 1.2
++RELDATE = 2015-07-28
++PREFIX = /usr
++MANPREFIX = $(PREFIX)/share/man
++CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror -g -D_POSIX_C_SOURCE=200112L \
++ -DVERSION=\"$(VERSION)\"
++CC ?= cc
++LD = $(CC)
++LIBS = -lssl -lcrypto
++LDFLAGS += $(LIBS)
+
+ NAME = getxbook
+@@ -21,13 +30,13 @@
+ .o:
+ @echo LD $@
+- @$(LD) -o $@ $< util.a $(LDFLAGS)
++ $(LD) -o $@ $< util.a $(LDFLAGS)
+
+ .c.o:
+ @echo CC $<
+- @$(CC) -c $(CFLAGS) $<
++ $(CC) -c $(CFLAGS) $<
+
+ util.a: $(LIB)
+ @echo AR $@
+- @$(AR) -r -s -c $@ $(LIB)
++ $(AR) -r -s -c $@ $(LIB)
+
+ install: all
diff --git a/app-text/getxbook/getxbook-1.2.ebuild b/app-text/getxbook/getxbook-1.2.ebuild
new file mode 100644
index 000000000000..b1acfc5e944d
--- /dev/null
+++ b/app-text/getxbook/getxbook-1.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Download books from google, amazon, barnes and noble"
+HOMEPAGE="http://njw.me.uk/software/getxbook/"
+SRC_URI="http://njw.me.uk/software/getxbook/${P}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="pdf djvu ocr tk"
+
+DEPEND=""
+RDEPEND="
+ djvu? ( app-text/djvu )
+ pdf? ( media-gfx/imagemagick )
+ ocr? (
+ app-text/tesseract
+ pdf? ( media-gfx/exact-image app-text/pdftk )
+ )
+ tk? ( dev-lang/tk:0= )"
+
+src_prepare() {
+ default
+ eapply "${FILESDIR}"/${P}.patch
+ tc-export CC AR
+}
+
+src_install() {
+ DOCS=( README LEGAL )
+ default
+
+ use pdf && dobin extras/mkpdf.sh
+ use djvu && dobin extras/mkdjvu.sh
+
+ if use ocr; then
+ dobin extras/mkocrtxt.sh
+ use pdf && dobin extras/mkocrpdf.sh
+ use djvu && dobin extras/mkocrdjvu.sh
+ fi
+ use tk && dobin getxbookgui.tcl
+}