summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-python/python-poppler-qt4
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-python/python-poppler-qt4')
-rw-r--r--dev-python/python-poppler-qt4/Manifest1
-rw-r--r--dev-python/python-poppler-qt4/files/python-poppler-qt4-0.18.1-update_for_new_PyQt4_build.patch185
-rw-r--r--dev-python/python-poppler-qt4/metadata.xml13
-rw-r--r--dev-python/python-poppler-qt4/python-poppler-qt4-0.18.1.ebuild27
4 files changed, 226 insertions, 0 deletions
diff --git a/dev-python/python-poppler-qt4/Manifest b/dev-python/python-poppler-qt4/Manifest
new file mode 100644
index 000000000000..4fe829a9c363
--- /dev/null
+++ b/dev-python/python-poppler-qt4/Manifest
@@ -0,0 +1 @@
+DIST python-poppler-qt4-0.18.1.tar.gz 15555 SHA256 c6903c4b6ab71730ae2a1da9fb95830a83da82185b5ef6b8184b16c0cae908ba SHA512 f1451e3b60cb51eb3c07d906144ecff2a2737b68018645390441b2eb4942450e2e836a3e20d926c82a7536ae7b3963f7a869a5d7a3274befde7d01144b116a44 WHIRLPOOL 2ef090817a78baa1b55997baf4e6eb61aa21e6d064826bfc14db27e145a477d3b3ff28b6f10076cade979e9f1634cfbe43e3bee51d841d4ea4fbd72cddcd6ce4
diff --git a/dev-python/python-poppler-qt4/files/python-poppler-qt4-0.18.1-update_for_new_PyQt4_build.patch b/dev-python/python-poppler-qt4/files/python-poppler-qt4-0.18.1-update_for_new_PyQt4_build.patch
new file mode 100644
index 000000000000..ce56a780967b
--- /dev/null
+++ b/dev-python/python-poppler-qt4/files/python-poppler-qt4-0.18.1-update_for_new_PyQt4_build.patch
@@ -0,0 +1,185 @@
+From 099924f9b359b82696e3aa9f159616ff09d2da97 Mon Sep 17 00:00:00 2001
+From: Philip Lorenz <philip@bithub.de>
+Date: Tue, 8 Jul 2014 18:23:49 +0200
+Subject: [PATCH 3/3] Support PyQt's "new" build system
+
+PyQt4 ships with a configure.py and configure-ng.py script for
+configuration. The former produced the "pyqtconfig" module which was
+used to determine various flags required for compilation of
+python-poppler-qt4. The configure.py script has been causing some issues
+([1]) and upstream suggests to use configure-ng.py instead as the old
+configuration script is deprecated ([2]).
+
+This patch adapts setup.py to work without the "pyqtconfig" module by
+looking up the required config values via the new mechanisms endorsed by
+upstream. Additionally, it adds the --qt-include-dir, --pyqt-sip-dir,
+--pyqt-sip-flags command line arguments to the "build_ext" command which
+can be used to set those values manually.
+
+[1] http://www.riverbankcomputing.com/pipermail/pyqt/2014-June/034344.html
+[2] http://www.riverbankcomputing.com/pipermail/pyqt/2014-June/034354.html
+---
+ setup.py | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 94 insertions(+), 20 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 56f3e3f..c43c5e4 100644
+--- a/setup.py
++++ b/setup.py
+@@ -56,14 +56,6 @@ except ImportError:
+ pass
+ ### end
+
+-import PyQt4.pyqtconfig
+-config = PyQt4.pyqtconfig.Configuration()
+-
+-pyqt_sip_dir = config.pyqt_sip_dir
+-pyqt_sip_flags = config.pyqt_sip_flags
+-qt_inc_dir = config.qt_inc_dir
+-
+-
+ def pkg_config(package, attrs=None, include_only=False):
+ """parse the output of pkg-config for a package.
+
+@@ -107,17 +99,8 @@ def pkg_config_version(package):
+ return tuple(map(int, re.findall(r'\d+', output)))
+ except OSError:
+ sys.stderr.write("Can't determine version of %s\n" % package)
+-
+-
+-ext_args = {
+- 'include_dirs': [
+- qt_inc_dir,
+- os.path.join(qt_inc_dir, 'QtCore'),
+- os.path.join(qt_inc_dir, 'QtGui'),
+- os.path.join(qt_inc_dir, 'QtXml'),
+- ],
+-}
+
++ext_args = {}
+ pkg_config('poppler-qt4', ext_args)
+
+ if 'libraries' not in ext_args:
+@@ -131,17 +114,108 @@ class build_ext(build_ext_base):
+
+ user_options = build_ext_base.user_options + [
+ ('poppler-version=', None, "version of the poppler library"),
++ ('qmake-bin=', None, "Path to qmake binary"),
++ ('qt-include-dir=', None, "Path to Qt headers"),
++ ('pyqt-sip-dir=', None, "Path to PyQt's SIP files"),
++ ('pyqt-sip-flags=', None, "SIP flags used to generate PyQt bindings")
+ ]
+
+ def initialize_options (self):
+ build_ext_base.initialize_options(self)
+ self.poppler_version = None
+
++ self.qmake_bin = 'qmake'
++
++ self.qt_include_dir = None
++ self.pyqt_sip_dir = None
++ self.pyqt_sip_flags = None
++
+ def finalize_options (self):
+ build_ext_base.finalize_options(self)
++
++ if not self.qt_include_dir:
++ self.qt_include_dir = self.__find_qt_include_dir()
++
++ if not self.pyqt_sip_dir:
++ self.pyqt_sip_dir = self.__find_pyqt_sip_dir()
++
++ if not self.pyqt_sip_flags:
++ self.pyqt_sip_flags = self.__find_pyqt_sip_flags()
++
++ if not self.qt_include_dir:
++ raise SystemExit('Could not find Qt4 headers. '
++ 'Please specify via --qt-include-dir=')
++
++ if not self.pyqt_sip_dir:
++ raise SystemExit('Could not find PyQt SIP files. '
++ 'Please specify containing directory via '
++ '--pyqt-sip-dir=')
++
++ if not self.pyqt_sip_flags:
++ raise SystemExit('Could not find PyQt SIP flags. '
++ 'Please specify via --pyqt-sip-flags=')
++
++ self.include_dirs += (self.qt_include_dir,
++ os.path.join(self.qt_include_dir, 'QtCore'),
++ os.path.join(self.qt_include_dir, 'QtGui'),
++ os.path.join(self.qt_include_dir, 'QtXml'))
++
+ if self.poppler_version is not None:
+ self.poppler_version = tuple(map(int, re.findall(r'\d+', self.poppler_version)))
+
++ def __find_qt_include_dir(self):
++ if self.pyqtconfig:
++ return self.pyqtconfig.qt_inc_dir
++
++ try:
++ qt_version = subprocess.check_output([self.qmake_bin,
++ '-query',
++ 'QT_VERSION'])
++ qt_version = qt_version.strip().decode("ascii")
++ except (OSError, subprocess.CalledProcessError) as e:
++ raise SystemExit('Failed to determine Qt version (%s).' % e)
++
++ if not qt_version.startswith("4."):
++ raise SystemExit('Unsupported Qt version (%s). '
++ 'Try specifying the path to qmake manually via '
++ '--qmake-bin=' % qt_version)
++
++ try:
++ result = subprocess.check_output([self.qmake_bin,
++ '-query',
++ 'QT_INSTALL_HEADERS'])
++ return result.strip().decode(sys.getfilesystemencoding())
++ except (OSError, subprocess.CalledProcessError) as e:
++ raise SystemExit('Failed to determine location of Qt headers (%s).' % e)
++
++ def __find_pyqt_sip_dir(self):
++ if self.pyqtconfig:
++ return self.pyqtconfig.pyqt_sip_dir
++
++ import sipconfig
++
++ return os.path.join(sipconfig.Configuration().default_sip_dir, 'PyQt4')
++
++ def __find_pyqt_sip_flags(self):
++ if self.pyqtconfig:
++ return self.pyqtconfig.pyqt_sip_flags
++
++ from PyQt4 import QtCore
++
++ return QtCore.PYQT_CONFIGURATION.get('sip_flags', '')
++
++ @property
++ def pyqtconfig(self):
++ if not hasattr(self, '_pyqtconfig'):
++ try:
++ from PyQt4 import pyqtconfig
++
++ self._pyqtconfig = pyqtconfig.Configuration()
++ except ImportError:
++ self._pyqtconfig = None
++
++ return self._pyqtconfig
++
+ def _sip_compile(self, sip_bin, source, sbf):
+
+ # Disable features if older poppler-qt4 version is found.
+@@ -176,8 +250,8 @@ class build_ext(build_ext_base):
+ cmd += [
+ "-c", self.build_temp,
+ "-b", sbf,
+- "-I", pyqt_sip_dir] # find the PyQt4 stuff
+- cmd += shlex.split(pyqt_sip_flags) # use same SIP flags as for PyQt4
++ "-I", self.pyqt_sip_dir] # find the PyQt4 stuff
++ cmd += shlex.split(self.pyqt_sip_flags) # use same SIP flags as for PyQt4
+ cmd.append(source)
+ self.spawn(cmd)
+
+--
+2.0.2
+
diff --git a/dev-python/python-poppler-qt4/metadata.xml b/dev-python/python-poppler-qt4/metadata.xml
new file mode 100644
index 000000000000..4c8686ed7dd0
--- /dev/null
+++ b/dev-python/python-poppler-qt4/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>python</herd>
+ <maintainer>
+ <email>ssuominen@gentoo.org</email>
+ <name>Samuli Suominen</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">python-poppler-qt4</remote-id>
+ <remote-id type="github">wbsoft/python-poppler-qt4</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/python-poppler-qt4/python-poppler-qt4-0.18.1.ebuild b/dev-python/python-poppler-qt4/python-poppler-qt4-0.18.1.ebuild
new file mode 100644
index 000000000000..b607242005f7
--- /dev/null
+++ b/dev-python/python-poppler-qt4/python-poppler-qt4-0.18.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit distutils-r1 eutils
+
+DESCRIPTION="A python binding for libpoppler-qt4"
+HOMEPAGE="http://code.google.com/p/python-poppler-qt4/"
+SRC_URI="http://github.com/wbsoft/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="app-text/poppler:=[qt4]
+ dev-python/PyQt4[${PYTHON_USEDEP}]
+ >=dev-python/sip-4.9.1[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-update_for_new_PyQt4_build.patch
+ distutils-r1_src_prepare
+}