qscintilla: Update to 2.10.4

This commit is contained in:
Alexey Pavlov
2018-05-22 08:44:05 +03:00
parent fb5f69f5a5
commit ebcda012fc
5 changed files with 127 additions and 162 deletions

View File

@@ -6,9 +6,9 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
"${MINGW_PACKAGE_PREFIX}-python2-${_realname}"
"${MINGW_PACKAGE_PREFIX}-python3-${_realname}"
"${MINGW_PACKAGE_PREFIX}-python-${_realname}-common")
pkgver=2.9
pkgver=2.10.4
pkgrel=1
pkgdesc="A port to Qt5 of Neil Hodgson's Scintilla C++ editor class"
pkgdesc="A port to Qt5 of Neil Hodgson's Scintilla C++ editor class (mingw-w64)"
arch=('any')
license=("GPL")
url="http://www.riverbankcomputing.co.uk/software/qscintilla/intro"
@@ -17,36 +17,21 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
"${MINGW_PACKAGE_PREFIX}-python2-pyqt5"
"${MINGW_PACKAGE_PREFIX}-python3-pyqt5")
options=(!strip staticlibs !buildflags)
source=("https://downloads.sourceforge.net/pyqt/QScintilla-gpl-${pkgver}.tar.gz"
'configure.py-objdir-support.diff'
source=("https://downloads.sourceforge.net/pyqt/QScintilla_gpl-${pkgver}.tar.gz"
'run-command-via-sh.patch'
'qmake-install-paths.patch')
sha256sums=('d7c32e32582f93779de861006d87467b38b9ebc06e3d0b32e981cb24369fa417'
'aaedb6d1784438c42bdf020d3d1db50b94f4862cebab4526c46d453050da871e'
'fc91ee0acfdae14a31338715f0a59d73dbd41b934fb90b3e4d8c5ba71b05c407'
'bdf71a27b9b5590dee4cd25450f04a09e1680b3e1787ff7d392b53ba01c4e64f')
'qmake-install-paths.patch'
'designed-plugin-config-build.patch')
sha256sums=('0353e694a67081e2ecdd7c80e1a848cf79a36dbba78b2afa36009482149b022d'
'a517b6427006c18db816dfcd087eee36e2f08c48c5147c48971f25118ea0c149'
'517df6924d9d10104ee57372530692457cc3d4687d98ee6222f9764f0b31024b'
'b9de93dc99426bebcb9516942b70b0cd8b17cba62de79becceb04737a1b0a2e7')
prepare() {
cd QScintilla-gpl-${pkgver}
patch -p1 -i "${srcdir}"/configure.py-objdir-support.diff
cd QScintilla_gpl-${pkgver}
patch -p1 -i "${srcdir}"/run-command-via-sh.patch
patch -p1 -i "${srcdir}"/qmake-install-paths.patch
patch -p1 -i "${srcdir}"/designed-plugin-config-build.patch
sed -e "s|%INSTALL_PREFIX%|$(cygpath -wm ${pkgdir})|g" \
-i Qt4Qt5/qscintilla.pro \
-i designer-Qt4Qt5/designer.pro
}
build() {
cd ${srcdir}/QScintilla-gpl-${pkgver}/Qt4Qt5
${MINGW_PREFIX}/bin/qmake qscintilla.pro
make
cd ../designer-Qt4Qt5
QMAKEFEATURES=../Qt4Qt5/features ${MINGW_PREFIX}/bin/qmake designer.pro INCLUDEPATH+=../Qt4Qt5 QMAKE_LIBDIR+=../Qt4Qt5/release
make
cd ../
cp -rf Python Python2
}
@@ -54,10 +39,18 @@ package_qscintilla() {
pkgdesc="A port to Qt5 of Neil Hodgson's Scintilla C++ editor class"
depends=("${MINGW_PACKAGE_PREFIX}-qt5")
cd QScintilla-gpl-${pkgver}/Qt4Qt5
cd ${srcdir}/QScintilla_gpl-${pkgver}
sed -e "s|%INSTALL_PREFIX%|$(cygpath -wm ${pkgdir})|g" \
-i Qt4Qt5/qscintilla.pro \
-i designer-Qt4Qt5/designer.pro
cd Qt4Qt5
${MINGW_PREFIX}/bin/qmake CONFIG+=build_all qscintilla.pro
make install
cd ../designer-Qt4Qt5
QMAKEFEATURES=../Qt4Qt5/features \
${MINGW_PREFIX}/bin/qmake CONFIG+=build_all INCLUDEPATH+=../Qt4Qt5 designer.pro
make install
mkdir -p ${pkgdir}${MINGW_PREFIX}/bin
@@ -68,7 +61,7 @@ package_python-qscintilla-common() {
pkgdesc="Common python qscintilla bindings files shared between python3-qscintilla and python2-qscintilla"
depends=("${MINGW_PACKAGE_PREFIX}-qscintilla")
cd QScintilla-gpl-${pkgver}/Python
cd QScintilla_gpl-${pkgver}/Python
make DESTDIR="${pkgdir}" INSTALL_ROOT="${pkgdir}" install
# Provided by python-qscintilla
@@ -79,15 +72,15 @@ package_python3-qscintilla() {
pkgdesc="Python 3.x bindings for QScintilla2"
depends=("${MINGW_PACKAGE_PREFIX}-python-qscintilla-common" "${MINGW_PACKAGE_PREFIX}-python3-pyqt5")
cd QScintilla-gpl-${pkgver}/Python
QMAKEFEATURES=../Qt4Qt5/features \
cd QScintilla_gpl-${pkgver}/Python
${MINGW_PREFIX}/bin/python3 configure.py \
--pyqt=PyQt5 \
--qsci-incdir=../Qt4Qt5/ \
--qsci-libdir=../Qt4Qt5/release/
--qsci-featuresdir=../Qt4Qt5/features \
--qsci-incdir=../Qt4Qt5 \
--qsci-libdir=../Qt4Qt5/release
make
make INSTALL_ROOT=${pkgdir} install
make INSTALL_ROOT="${pkgdir}" install
rm -rf "${pkgdir}${MINGW_PREFIX}"/share
}
@@ -96,15 +89,15 @@ package_python2-qscintilla() {
pkgdesc="Python 2.x bindings for QScintilla2"
depends=("${MINGW_PACKAGE_PREFIX}-python-qscintilla-common" "${MINGW_PACKAGE_PREFIX}-python2-pyqt5")
cd QScintilla-gpl-${pkgver}/Python2
QMAKEFEATURES=../Qt4Qt5/features \
cd QScintilla_gpl-${pkgver}/Python2
${MINGW_PREFIX}/bin/python2 configure.py \
--pyqt=PyQt5 \
--qsci-incdir=../Qt4Qt5/ \
--qsci-libdir=../Qt4Qt5/release/
--qsci-featuresdir=../Qt4Qt5/features \
--qsci-incdir=../Qt4Qt5 \
--qsci-libdir=../Qt4Qt5/release
make
make INSTALL_ROOT=${pkgdir} install
make INSTALL_ROOT="${pkgdir}" install
rm -rf "${pkgdir}${MINGW_PREFIX}"/share
}

View File

@@ -1,40 +0,0 @@
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
@@ -32,6 +32,7 @@
import optparse
import sys
+src_dir = os.path.dirname(os.path.abspath(__file__))
###############################################################################
# You shouldn't need to modify anything above this line.
@@ -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

View File

@@ -0,0 +1,25 @@
--- a/designer-Qt4Qt5/designer.pro.orig 2018-05-21 08:09:47.055147000 +0300
+++ b/designer-Qt4Qt5/designer.pro 2018-05-21 08:10:45.768229400 +0300
@@ -2,7 +2,21 @@
TEMPLATE = lib
-TARGET = qscintillaplugin
+CONFIG(debug, debug|release) {
+ mac: {
+ TARGET = qscintillaplugin_debug
+ } else {
+ LIBS += -L$$PWD/../Qt4Qt5/debug
+ win32: {
+ TARGET = qscintillaplugind
+ } else {
+ TARGET = qscintillaplugin
+ }
+ }
+} else {
+ TARGET = qscintillaplugin
+ LIBS += -L$$PWD/../Qt4Qt5/release
+}
CONFIG += plugin qscintilla2

View File

@@ -1,59 +1,53 @@
--- QScintilla-gpl-2.8.4/Qt4Qt5/qscintilla.pro.orig 2014-12-16 16:07:45.081200000 +0300
+++ QScintilla-gpl-2.8.4/Qt4Qt5/qscintilla.pro 2014-12-16 16:11:15.116800000 +0300
@@ -32,6 +32,7 @@
CONFIG += qt warn_off release thread exceptions
INCLUDEPATH += . ../include ../lexlib ../src
--- a/Qt4Qt5/qscintilla.pro 2018-04-10 14:00:13.000000000 +0300
+++ b/Qt4Qt5/qscintilla.pro 2018-05-21 08:01:02.387948900 +0300
@@ -25,6 +25,7 @@
TEMPLATE = lib
CONFIG += qt warn_off thread exceptions hide_symbols
+PREFIX = %INSTALL_PREFIX%
DEFINES += QSCINTILLA_MAKE_DLL SCINTILLA_QT SCI_LEXER
greaterThan(QT_MAJOR_VERSION, 3) {
CONFIG(staticlib) {
@@ -55,25 +56,29 @@
CONFIG(debug, debug|release) {
mac: {
TARGET = qscintilla2_qt$${QT_MAJOR_VERSION}_debug
@@ -68,25 +69,31 @@
# Scintilla namespace rather than pollute the global namespace.
#DEFINES += SCI_NAMESPACE
# Handle both Qt v4 and v3.
-target.path = $$[QT_INSTALL_LIBS]
+winpath = $$system(cygpath -u $$[QT_INSTALL_LIBS])
+target.path = $$PREFIX$$winpath
isEmpty(target.path) {
target.path = $(QTDIR)/lib
}
+winpath_target = $$system(cygpath -u $$[QT_INSTALL_LIBS])
+target.path = $$PREFIX$$winpath_target
INSTALLS += target
-header.path = $$[QT_INSTALL_HEADERS]
+winpath = $$system(cygpath -u $$[QT_INSTALL_HEADERS])
+header.path = $$PREFIX$$winpath
+winpath_header = $$system(cygpath -u $$[QT_INSTALL_HEADERS])
+header.path = $$PREFIX$$winpath_header
header.files = Qsci
isEmpty(header.path) {
header.path = $(QTDIR)/include/Qsci
header.files = Qsci/qsci*.h
}
INSTALLS += header
-trans.path = $$[QT_INSTALL_TRANSLATIONS]
+winpath = $$system(cygpath -u $$[QT_INSTALL_TRANSLATIONS])
+trans.path = $$PREFIX$$winpath
+winpath_trans = $$system(cygpath -u $$[QT_INSTALL_TRANSLATIONS])
+trans.path = $$PREFIX$$winpath_trans
trans.files = qscintilla_*.qm
isEmpty(trans.path) {
trans.path = $(QTDIR)/translations
}
INSTALLS += trans
-qsci.path = $$[QT_INSTALL_DATA]
+winpath = $$system(cygpath -u $$[QT_INSTALL_DATA])
+qsci.path = $$PREFIX$$winpath
+winpath_qsci = $$system(cygpath -u $$[QT_INSTALL_DATA])
+qsci.path = $$PREFIX$$winpath_qsci
qsci.files = ../qsci
isEmpty(qsci.path) {
qsci.path = $(QTDIR)
@@ -82,7 +87,8 @@
INSTALLS += header trans qsci target
INSTALLS += qsci
greaterThan(QT_MAJOR_VERSION, 3) {
greaterThan(QT_MAJOR_VERSION, 4) {
- features.path = $$[QT_HOST_DATA]/mkspecs/features
+ winpath_feature = $$system(cygpath -u $$[QT_HOST_DATA]/mkspecs/features)
+ features.path = $$PREFIX$$winpath_feature
} else {
- features.path = $$[QT_INSTALL_DATA]/mkspecs/features
+ winpath = $$system(cygpath -u $$[QT_INSTALL_DATA]/mkspecs/features)
+ features.path = $$PREFIX$$winpath
features.files = $$PWD/features/qscintilla2.prf
INSTALLS += features
+ winpath_feature = $$system(cygpath -u $$[QT_INSTALL_DATA]/mkspecs/features)
+ features.path = $$PREFIX$$winpath_feature
}
--- QScintilla-gpl-2.8.4/designer-Qt4Qt5/designer.pro.orig 2014-07-11 00:03:19.000000000 +0300
+++ QScintilla-gpl-2.8.4/designer-Qt4Qt5/designer.pro 2014-12-16 16:53:40.823600000 +0300
CONFIG(staticlib) {
features.files = $$PWD/features_staticlib/qscintilla2.prf
--- a/designer-Qt4Qt5/designer.pro 2014-07-11 00:03:19.000000000 +0300
+++ b/designer-Qt4Qt5/designer.pro 2014-12-16 16:53:40.823600000 +0300
@@ -22,5 +22,7 @@
HEADERS = qscintillaplugin.h
SOURCES = qscintillaplugin.cpp

View File

@@ -1,14 +1,14 @@
--- QScintilla-gpl-2.8.4/Python/configure.py.orig 2014-12-16 11:14:41.265000000 +0300
+++ QScintilla-gpl-2.8.4/Python/configure.py 2014-12-16 13:01:42.418000000 +0300
@@ -30,6 +30,7 @@
@@ -31,6 +31,7 @@
import os
import optparse
import sys
+from sysconfig import _POSIX_BUILD
src_dir = os.path.dirname(os.path.abspath(__file__))
@@ -182,6 +183,9 @@
###############################################################################
@@ -187,6 +189,9 @@
else:
target_configuration.qsci_sip_dir = target_configuration.pyqt_sip_dir
@@ -18,15 +18,16 @@
if options.qsci_no_sip_files:
target_configuration.qsci_sip_dir = ''
@@ -639,13 +643,19 @@
self.inc_dir = sysconfig.get_python_inc(plat_specific=1)
self.module_dir = sysconfig.get_python_lib(plat_specific=1)
@@ -645,7 +657,7 @@
self.module_dir = sysconfig.get_python_lib(plat_specific=1)
self.debug = hasattr(sys, 'gettotalrefcount')
- if sys.platform == 'win32':
+ if sys.platform == 'win32' and not _POSIX_BUILD:
self.data_dir = sys.prefix
self.lib_dir = sys.prefix + '\\libs'
else:
try:
# Python v3.3 and later.
base_prefix = sys.base_prefix
@@ -666,6 +678,12 @@
self.data_dir = sys.prefix + '/share'
self.lib_dir = sys.prefix + '/lib'
@@ -39,20 +40,9 @@
class _TargetQtConfiguration:
""" A container for the target Qt configuration. """
@@ -697,7 +707,9 @@
# The default qmake spec.
if self.py_platform == 'win32':
- if self.py_version >= 0x030300:
+ if _POSIX_BUILD:
+ self.qmake_spec = "win32-g++"
+ elif self.py_version >= 0x030300:
self.qmake_spec = 'win32-msvc2010'
elif self.py_version >= 0x020600:
self.qmake_spec = 'win32-msvc2008'
@@ -709,6 +721,18 @@
# Use the Qt default. (We may update it for MacOS/X later.)
self.qmake_spec = ''
@@ -717,6 +735,18 @@
self.py_sip_dir = os.path.join(py_config.data_dir, 'sip')
self.sip_inc_dir = py_config.venv_inc_dir
+ # Get the details of the Python interpreter library.
+ py_major = self.py_version >> 16
@@ -67,18 +57,29 @@
+ self.py_pylib_lib = pylib_lib
+
# Remaining values.
self.debug = False
self.pyqt_sip_flags = None
self.pyqt_version_str = ''
@@ -797,6 +821,8 @@
self.py_inc_dir = parser.get(section, 'py_inc_dir', self.py_inc_dir)
@@ -811,6 +841,8 @@
self.py_venv_inc_dir = self.py_inc_dir
self.py_pylib_dir = parser.get(section, 'py_pylib_dir',
self.py_pylib_dir)
+ self.py_pylib_lib = parser.get(section, 'py_pylib_lib',
+ self.py_pylib_lib)
self.sip_inc_dir = self.py_inc_dir
self.sip_inc_dir = self.py_venv_inc_dir
@@ -973,6 +999,11 @@
@@ -944,7 +976,9 @@
# On Windows for Qt versions prior to v5.9.0 we need to be explicit
# about the qmake spec.
if self.qt_version < 0x050900 and self.py_platform == 'win32':
- if self.py_version >= 0x030500:
+ if _POSIX_BUILD:
+ self.qmake_spec = "win32-g++"
+ elif self.py_version >= 0x030500:
self.qmake_spec = 'win32-msvc2015'
elif self.py_version >= 0x030300:
self.qmake_spec = 'win32-msvc2010'
@@ -977,6 +1011,11 @@
self.qt_inc_dir = qt_config.QT_INSTALL_HEADERS
self.qt_lib_dir = qt_config.QT_INSTALL_LIBS
@@ -90,33 +91,25 @@
if self.sysroot == '':
self.sysroot = getattr(qt_config, 'QT_SYSROOT', '')
@@ -1121,7 +1152,7 @@
default=None, action='store', metavar="FLAGS",
help="the sip flags used to build PyQt [default: query PyQt]")
- if sys.platform != 'win32':
+ if sys.platform != 'win32' or _POSIX_BUILD:
p.add_option('--qmake', '-q', dest='qmake', type='string',
default=None, action='callback',
callback=optparser_store_abspath_exe, metavar="FILE",
@@ -1363,14 +1394,14 @@
win32 {
@@ -1465,7 +1504,7 @@
PY_MODULE = %s.pyd
target.files = %s.pyd
PY_MODULE_SRC = $(DESTDIR_TARGET)
- LIBS += -L%s
+ LIBS += -L%s -l%s
} else {
PY_MODULE = %s.so
target.files = %s.so
}
@@ -1488,7 +1527,7 @@
target.CONFIG = no_check_exist
-''' % (mname, mname, quote(target_config.py_pylib_dir), mname, mname))
+''' % (mname, mname, quote(target_config.py_pylib_dir), quote(target_config.py_pylib_lib), mname, mname))
target.files = $$PY_MODULE
-''' % (mname, quote(target_config.py_pylib_dir), mname))
+''' % (mname, quote(target_config.py_pylib_dir), quote(target_config.py_pylib_lib), mname))
pro.write('''
target.path = %s
@@ -1523,6 +1554,8 @@
@@ -1622,6 +1661,8 @@
to run. verbose is set if the output is to be displayed.
"""