author | Andrea Scarpino
<andrea@archlinux.org> 2014-08-07 19:08:19 UTC |
committer | Andrea Scarpino
<andrea@archlinux.org> 2014-08-07 19:08:19 UTC |
parent | 071d9c918940d874f6cef9f11b8c1c869805211a |
PKGBUILD | +14 | -5 |
configure.py-objdir-support.diff | +41 | -0 |
qsci_link.patch | +16 | -0 |
diff --git a/PKGBUILD b/PKGBUILD index 111ceab..922b36d 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -5,14 +5,23 @@ pkgbase=qscintilla pkgname=('qscintilla' 'python-qscintilla' 'python2-qscintilla' 'python-qscintilla-common') pkgver=2.8.3 -pkgrel=3 +pkgrel=4 license=('GPL') arch=('i686' 'x86_64') url="http://www.riverbankcomputing.co.uk/software/qscintilla/intro" makedepends=('python2-pyqt4' 'python-pyqt4' 'chrpath') -options=('!buildflags') -source=("http://downloads.sourceforge.net/pyqt/QScintilla-gpl-${pkgver}.tar.gz") -md5sums=('bbf6944a9d3b089a79763ca4e6486b9d') +source=("http://downloads.sourceforge.net/pyqt/QScintilla-gpl-${pkgver}.tar.gz" + 'configure.py-objdir-support.diff' + 'qsci_link.patch') +md5sums=('bbf6944a9d3b089a79763ca4e6486b9d' + 'e304f8cd5e3e7ded61eda15bf56613a8' + '3bb99cf0ebbf9bea6a1d0f9067dc7124') + +prepare() { + cd QScintilla-gpl-${pkgver} + patch -p1 -i "${srcdir}"/configure.py-objdir-support.diff + patch -p1 -i "${srcdir}"/qsci_link.patch +} build() { cd QScintilla-gpl-${pkgver}/Qt4Qt5 @@ -26,7 +35,7 @@ build() { cd ../ cp -rf Python Python2 cd Python - python3 configure.py -n ../Qt4Qt5/ -o ../Qt4Qt5/ -c --qmake /usr/bin/qmake-qt4 + python configure.py -n ../Qt4Qt5/ -o ../Qt4Qt5/ -c --qmake /usr/bin/qmake-qt4 make cd ../Python2 diff --git a/configure.py-objdir-support.diff b/configure.py-objdir-support.diff new file mode 100644 index 0000000..6d2e708 --- /dev/null +++ b/configure.py-objdir-support.diff @@ -0,0 +1,41 @@ +02_configure.dpatch by Torsten Marek <shlomme@debian.org> +Updated for Qscintilla 2.8.2 configure.py changes by Scott Kitterman +<scott@kitterman.com> +patch the configure script for the Python bindings to support object dir +builds +Index: qscintilla2-2.8.3+dfsg/Python/configure.py +=================================================================== +--- qscintilla2-2.8.3+dfsg.orig/Python/configure.py 2014-07-05 10:02:02.318834374 -0400 ++++ qscintilla2-2.8.3+dfsg/Python/configure.py 2014-07-05 10:02:02.306834375 -0400 +@@ -31,6 +31,8 @@ + import glob + import optparse + ++src_dir = os.path.dirname(os.path.abspath(__file__)) ++ + try: + import sysconfig + except ImportError: +@@ -210,6 +212,8 @@ + "The QScintilla version number could not be determined by " + "reading %s." % sciglobal) + ++ return # Debian: do not check for the installed version, we're good this way. ++ + lib_dir = target_configuration.qsci_lib_dir + if lib_dir is None: + lib_dir = target_configuration.qt_lib_dir +@@ -264,7 +268,12 @@ + the target configuration. + """ + +- return 'sip/qscimod5.sip' if target_configuration.pyqt_package == 'PyQt5' else 'sip/qscimod4.sip' ++ if target_configuration.pyqt_package == 'PyQt5': ++ return os.path.join(src_dir, 'sip/qscimod5.sip') ++ else: ++ return os.path.join(src_dir, 'sip/qscimod4.sip') ++ ++ #return 'sip/qscimod5.sip' if target_configuration.pyqt_package == 'PyQt5' else 'sip/qscimod4.sip' + + def get_sip_installs(self, target_configuration): + """ Return a tuple of the installation directory of the module's .sip diff --git a/qsci_link.patch b/qsci_link.patch new file mode 100644 index 0000000..fdc82b5 --- /dev/null +++ b/qsci_link.patch @@ -0,0 +1,16 @@ +Index: qscintilla2-2.8.3+dfsg/Python/configure.py +=================================================================== +--- qscintilla2-2.8.3+dfsg.orig/Python/configure.py 2014-07-05 10:05:48.614827688 -0400 ++++ qscintilla2-2.8.3+dfsg/Python/configure.py 2014-07-05 10:05:48.610827688 -0400 +@@ -1434,7 +1434,10 @@ + + libs = qmake_config.get('LIBS') + if libs: +- pro.write('LIBS += %s\n' % libs) ++ if target_config.pyqt_package == 'PyQt5': ++ pro.write('LIBS += %s -lqt5scintilla2\n' % libs) ++ else: ++ pro.write('LIBS += %s -lqscintilla2\n' % libs) + + if not opts.static: + pro.write('''