summaryrefslogtreecommitdiff
path: root/app-text/pdfshuffler
diff options
context:
space:
mode:
Diffstat (limited to 'app-text/pdfshuffler')
-rw-r--r--app-text/pdfshuffler/Manifest4
-rw-r--r--app-text/pdfshuffler/files/pdfshuffler-PyPDF2.patch18
-rw-r--r--app-text/pdfshuffler/metadata.xml11
-rw-r--r--app-text/pdfshuffler/pdfshuffler-0.6.0-r1.ebuild39
4 files changed, 72 insertions, 0 deletions
diff --git a/app-text/pdfshuffler/Manifest b/app-text/pdfshuffler/Manifest
new file mode 100644
index 000000000000..65e71e7937cd
--- /dev/null
+++ b/app-text/pdfshuffler/Manifest
@@ -0,0 +1,4 @@
+AUX pdfshuffler-PyPDF2.patch 701 BLAKE2B a8ee95b415f121bf7c450a80e9d01c3349ed685146fd375d6aa10bcc7cc3684e1b75ad9986504aeb10d039e897750e7f304f32af8ebe12aaf24b5236f79fe62c SHA512 8496ebb9656e1f9e5ee99184a5d8cf0493ebacedc9f936804aedd784930457d39390b577683e77b6b5264ba50f7e2b202404c40ae426ba42b6f612d7ca193433
+DIST pdfshuffler-0.6.0.tar.gz 48071 BLAKE2B 8bcb513f1dd18cf9d6e17315a7a2ec5bbf5240176acd6deb6ec803900174a39927998210ab5e4aab9a7330821ce7d1ab266e1ae677e03fd51df305ceec9f5836 SHA512 e2563e9b5faf3ebac56f3840017ad9279a5e8e096c9f44ec053c617894910b1d0531457bc37d8fb9bc1db13ae25b94d55ca0b4ec26fbddeb9e51e6b4d75293fe
+EBUILD pdfshuffler-0.6.0-r1.ebuild 877 BLAKE2B cb8ecf84a7cd7895b9f13e044bace9c094cd8ff4cc650a116c5b87862b465f30aba38cd5babba1bcc86a6a6b1b86a6f16169fa366dd5d28b39200046d6c019fe SHA512 0b508ebc13b85bbdab0c74a212f06128755bbcbf9f8969f5dc7f7a81defe3fa428af5f1b891adc8a84f6fdcf6235f8cd31b8114733e4379bf952d5d289f2e01b
+MISC metadata.xml 317 BLAKE2B 1fe689819b8e7ec92564b27c15595add2e7e52bd5c04b8ce3d24ac933461d50fe468e630a65c6525e2afcd42f9019b7e7198a7bf64b9ace99ee0c31ddc47ac6f SHA512 1e710aa1ddf91651f987d6fdf7ae15bb4ad58190c374b72bb9198e19262a4c3e1e4faedc8647a50060e113a32f38994bc0ac8393455b4ceeedf2973e310b7992
diff --git a/app-text/pdfshuffler/files/pdfshuffler-PyPDF2.patch b/app-text/pdfshuffler/files/pdfshuffler-PyPDF2.patch
new file mode 100644
index 000000000000..8228c1765143
--- /dev/null
+++ b/app-text/pdfshuffler/files/pdfshuffler-PyPDF2.patch
@@ -0,0 +1,18 @@
+diff -r -U2 pdfshuffler-0.6.0.orig/pdfshuffler/pdfshuffler.py pdfshuffler-0.6.0/pdfshuffler/pdfshuffler.py
+--- pdfshuffler-0.6.0.orig/pdfshuffler/pdfshuffler.py 2012-04-28 21:15:17.000000000 +0700
++++ pdfshuffler-0.6.0/pdfshuffler/pdfshuffler.py 2015-01-11 02:10:02.952809411 +0600
+@@ -72,5 +72,13 @@
+
+ import poppler #for the rendering of pdf pages
+-from pyPdf import PdfFileWriter, PdfFileReader
++
++try:
++ from PyPDF2 import PdfFileWriter, PdfFileReader
++except ImportError:
++ try:
++ from pyPdf import PdfFileWriter, PdfFileReader
++ except ImportError:
++ print('Neither PyPDF2 nor pyPdf found')
++ sys.exit(1)
+
+ from pdfshuffler_iconview import CellRendererImage
diff --git a/app-text/pdfshuffler/metadata.xml b/app-text/pdfshuffler/metadata.xml
new file mode 100644
index 000000000000..1449934ed1ee
--- /dev/null
+++ b/app-text/pdfshuffler/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+</maintainer>
+<upstream>
+ <remote-id type="sourceforge">pdfshuffler</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/app-text/pdfshuffler/pdfshuffler-0.6.0-r1.ebuild b/app-text/pdfshuffler/pdfshuffler-0.6.0-r1.ebuild
new file mode 100644
index 000000000000..1f2948029b4f
--- /dev/null
+++ b/app-text/pdfshuffler/pdfshuffler-0.6.0-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 gnome2-utils xdg-utils
+
+DESCRIPTION="GUI app that can merge or split pdfs and rotate, crop and rearrange their pages"
+HOMEPAGE="https://sourceforge.net/projects/pdfshuffler/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="|| ( dev-python/PyPDF2 dev-python/pyPdf )
+ dev-python/python-poppler"
+RDEPEND="${DEPEND}"
+
+DOCS="ChangeLog README TODO AUTHORS"
+PATCHES=( "${FILESDIR}"/${PN}-PyPDF2.patch )
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+ gnome2_icon_cache_update
+}