[arch-commits] Commit in (6 files)

Evgeniy Alekseev arcanis at archlinux.org
Wed Dec 31 18:15:17 UTC 2014


    Date: Wednesday, December 31, 2014 @ 19:15:16
  Author: arcanis
Revision: 125084

add qscintilla-qt5

Added:
  qscintilla-qt5/
  qscintilla-qt5/repos/
  qscintilla-qt5/trunk/
  qscintilla-qt5/trunk/PKGBUILD
  qscintilla-qt5/trunk/configure.py.patch
  qscintilla-qt5/trunk/libname.patch

--------------------+
 PKGBUILD           |   89 +++++++++++++++++++++++++++++++++++++++++++++++++++
 configure.py.patch |   53 ++++++++++++++++++++++++++++++
 libname.patch      |   50 ++++++++++++++++++++++++++++
 3 files changed, 192 insertions(+)

Added: qscintilla-qt5/trunk/PKGBUILD
===================================================================
--- qscintilla-qt5/trunk/PKGBUILD	                        (rev 0)
+++ qscintilla-qt5/trunk/PKGBUILD	2014-12-31 18:15:16 UTC (rev 125084)
@@ -0,0 +1,89 @@
+# $Id$
+# Maintainer: Evgeniy Alekseev <arcanis at archlinux dot org>
+# Maintainer: Ilya87 <yast4ik at yahoo dot com>
+
+pkgbase=qscintilla-qt5
+pkgname=('qscintilla-qt5' 'python-qscintilla-qt5' 'python2-qscintilla-qt5'
+         'python-qscintilla-qt5-common')
+pkgver=2.8.4
+pkgrel=1
+license=('GPL')
+arch=('i686' 'x86_64')
+url="http://www.riverbankcomputing.co.uk/software/qscintilla/intro"
+makedepends=('python2-pyqt5' 'python-pyqt5' 'qt5-tools' 'chrpath')
+options=('!buildflags')
+source=("http://downloads.sourceforge.net/pyqt/QScintilla-gpl-${pkgver}.tar.gz"
+        'configure.py.patch'
+        'libname.patch')
+md5sums=('28aec903ff48ae541295a4fb9c96f8ea'
+         'ea1d11d0a87341d2e55ebef6beeb5663'
+         '1ac0fea53f72b0146e0820912ae8c48c')
+
+prepare() {
+  cd "QScintilla-gpl-${pkgver}"
+
+  patch -Np1 -i "${srcdir}/configure.py.patch"
+  patch -Np1 -i "${srcdir}/libname.patch"
+
+  cp -r Python{,2}
+  find "Python2" -name '*.py' -type f -exec \
+       sed -i 's|env python|env python2|' {} \;
+}
+
+build() {
+  cd "QScintilla-gpl-${pkgver}/Qt4Qt5"
+  qmake qscintilla.pro
+  make
+
+  cd "../designer-Qt4Qt5"
+  qmake designer.pro INCLUDEPATH+=../Qt4Qt5 QMAKE_LIBDIR+=../Qt4Qt5
+  make
+
+  cd "../Python"
+  python3 configure.py -n ../Qt4Qt5/ -o ../Qt4Qt5/ -c --pyqt=PyQt5 --pyqt-sipdir=/usr/share/sip/PyQt5 --qsci-sipdir=/usr/share/sip/PyQt5  --qmake /usr/bin/qmake
+  make
+
+  cd "../Python2"
+  python2 configure.py -n ../Qt4Qt5/ -o ../Qt4Qt5/ -c --pyqt=PyQt5 --pyqt-sipdir=/usr/share/sip/PyQt5 --qsci-sipdir=/usr/share/sip/PyQt5 --qmake /usr/bin/qmake
+  make
+}
+
+package_qscintilla-qt5() {
+  pkgdesc="A port to Qt5 of Neil Hodgson's Scintilla C++ editor class"
+  depends=('qt5-base')
+  conflicts=('qscintilla')
+
+  cd "QScintilla-gpl-${pkgver}/Qt4Qt5"
+  make DESTDIR="${pkgdir}" INSTALL_ROOT="${pkgdir}" install
+
+  cd "../designer-Qt4Qt5"
+  make DESTDIR="${pkgdir}" INSTALL_ROOT="${pkgdir}" install
+}
+
+package_python-qscintilla-qt5-common() {
+  pkgdesc="Common python qscintilla bindings files shared between python-qscintilla-qt5 and python2-qscintilla-qt5"
+  arch=('any')
+  depends=('qscintilla-qt5')
+
+  cd "QScintilla-gpl-${pkgver}/Python"
+  make DESTDIR="${pkgdir}" INSTALL_ROOT="${pkgdir}" install
+
+  # provided by python-qscintilla
+  rm -r "${pkgdir}/usr/lib/python3.4/site-packages/PyQt5/"
+}
+
+package_python-qscintilla-qt5() {
+  pkgdesc="Python 3.x bindings for QScintilla2"
+  depends=('python-qscintilla-qt5-common' 'python-pyqt5')
+
+  cd "QScintilla-gpl-${pkgver}/Python"
+  install -Dm755 Qsci.so "${pkgdir}/usr/lib/python3.4/site-packages/PyQt5/Qsci.so"
+}
+
+package_python2-qscintilla-qt5() {
+  pkgdesc="Python 2.x bindings for QScintilla2"
+  depends=('python-qscintilla-qt5-common' 'python2-pyqt5')
+
+  cd "QScintilla-gpl-${pkgver}/Python2"
+  install -Dm755 Qsci.so "${pkgdir}/usr/lib/python2.7/site-packages/PyQt5/Qsci.so"
+}


Property changes on: qscintilla-qt5/trunk/PKGBUILD
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: qscintilla-qt5/trunk/configure.py.patch
===================================================================
--- qscintilla-qt5/trunk/configure.py.patch	                        (rev 0)
+++ qscintilla-qt5/trunk/configure.py.patch	2014-12-31 18:15:16 UTC (rev 125084)
@@ -0,0 +1,53 @@
+--- QScintilla-gpl-2.8.3/Python/configure.py~	2013-08-11 08:09:00.678704222 +0000
++++ QScintilla-gpl-2.8.3/Python/configure.py	2013-08-11 08:11:48.860880852 +0000
+@@ -30,6 +30,7 @@
+ import os
+ import glob
+ import optparse
++src_dir = os.path.dirname(os.path.abspath(__file__))
+ 
+ try:
+     import sysconfig
+@@ -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 +265,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
+@@ -1413,6 +1423,7 @@
+     includepath = qmake_config.get('INCLUDEPATH')
+     if includepath:
+         pro.write('INCLUDEPATH += %s\n' % includepath)
++        pro.write('INCLUDEPATH += %s\n' % '/usr/include/qt/QtWidgets /usr/include/qt/QtPrintSupport')
+ 
+     # Make sure the SIP include directory is searched before the Python include
+     # directory if they are different.
+@@ -1422,7 +1433,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('''

Added: qscintilla-qt5/trunk/libname.patch
===================================================================
--- qscintilla-qt5/trunk/libname.patch	                        (rev 0)
+++ qscintilla-qt5/trunk/libname.patch	2014-12-31 18:15:16 UTC (rev 125084)
@@ -0,0 +1,50 @@
+--- QScintilla-gpl-2.8.3/Qt4Qt5/features/qscintilla2.prf~	2014-07-03 14:15:46.000000000 +0400
++++ QScintilla-gpl-2.8.3/Qt4Qt5/features/qscintilla2.prf	2014-08-11 18:04:44.371414609 +0400
+@@ -17,9 +17,18 @@
+         win32: {
+             LIBS += -lqscintilla2d
+         } else {
+-            LIBS += -lqscintilla2
++            greaterThan(QT_MAJOR_VERSION, 4) {
++                LIBS += -lqt5scintilla2
++            } else {
++                LIBS += -lqscintilla2
++            }
+         }
+     }
+ } else {
++    greaterThan(QT_MAJOR_VERSION, 4) {
++        LIBS += -lqt5scintilla2
++        }
++        else {
+     LIBS += -lqscintilla2
++        }
+ }
+--- QScintilla-gpl-2.8.3/Qt4Qt5/qscintilla.pro~	2014-07-03 14:15:46.000000000 +0400
++++ QScintilla-gpl-2.8.3/Qt4Qt5/qscintilla.pro	2014-08-11 18:00:05.598079386 +0400
+@@ -41,6 +41,7 @@
+ 
+ greaterThan(QT_MAJOR_VERSION, 4) {
+ 	QT += widgets printsupport
++	TARGET = qt5scintilla2
+ 
+     greaterThan(QT_MINOR_VERSION, 1) {
+ 	    macx:QT += macextras
+--- QScintilla-gpl-2.8.3/Qt4Qt5/designer-Qt4Qt5/designer.pro~	2014-07-03 14:15:46.000000000 +0400
++++ QScintilla-gpl-2.8.3/designer-Qt4Qt5/designer.pro	2014-08-11 18:00:05.598079386 +0400
+@@ -8,11 +8,14 @@
+ 
+ greaterThan(QT_MAJOR_VERSION, 4) {
+     QT += designer
++    TARGET = qt5scintillaplugin
++    LIBS += -lqt5scintilla2
+ 
+     # Work around QTBUG-39300.
+     CONFIG -= android_install
+ } else {
+     CONFIG += designer
++    LIBS += -lqscintilla2
+ }
+ 
+ macx {
+ 
\ No newline at end of file



More information about the arch-commits mailing list