app-text/getxbook: bump to 1.2
authorAndrey Grozin <grozin@gentoo.org>
Sat, 16 Dec 2017 06:05:06 +0000 (13:05 +0700)
committerAndrey Grozin <grozin@gentoo.org>
Sat, 16 Dec 2017 06:05:06 +0000 (13:05 +0700)
Package-Manager: Portage-2.3.18, Repoman-2.3.6

app-text/getxbook/Manifest
app-text/getxbook/files/getxbook-1.2.patch [new file with mode: 0644]
app-text/getxbook/getxbook-1.2.ebuild [new file with mode: 0644]

index d2b040192bca5cb36ea4ac6d109316be420bf7d7..57b8d5959cdff12c5a0ad945ebbb7b34aa6faab7 100644 (file)
@@ -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 (file)
index 0000000..da0ac83
--- /dev/null
@@ -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 (file)
index 0000000..b1acfc5
--- /dev/null
@@ -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
+}