QScintilla: update to version 2.13.2
This commit is contained in:
@@ -4,11 +4,11 @@ _realname=qscintilla
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
||||
pkgver=2.11.6
|
||||
pkgrel=4
|
||||
pkgver=2.13.2
|
||||
pkgrel=1
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
|
||||
license=("GPL")
|
||||
license=("spdx:GPL-3.0-only")
|
||||
url="https://riverbankcomputing.com/software/qscintilla/intro"
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-sip"
|
||||
"${MINGW_PACKAGE_PREFIX}-pyqt-builder"
|
||||
@@ -17,47 +17,61 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-sip"
|
||||
"${MINGW_PACKAGE_PREFIX}-qt5-tools"
|
||||
"${MINGW_PACKAGE_PREFIX}-cc")
|
||||
options=(!strip staticlibs !buildflags)
|
||||
source=(https://www.riverbankcomputing.com/static/Downloads/QScintilla/${pkgver}/QScintilla-${pkgver}.tar.gz
|
||||
'run-command-via-sh.patch'
|
||||
'qmake-install-paths.patch'
|
||||
'designed-plugin-config-build.patch'
|
||||
'proper-module-extension.patch')
|
||||
sha256sums=('e7346057db47d2fb384467fafccfcb13aa0741373c5d593bc72b55b2f0dd20a7'
|
||||
'a517b6427006c18db816dfcd087eee36e2f08c48c5147c48971f25118ea0c149'
|
||||
'517df6924d9d10104ee57372530692457cc3d4687d98ee6222f9764f0b31024b'
|
||||
'b9de93dc99426bebcb9516942b70b0cd8b17cba62de79becceb04737a1b0a2e7'
|
||||
'd574fa11c432a08653544c914d6da75d3cbc5ca8642ea16e90ed62af8c0cda4d')
|
||||
source=(https://www.riverbankcomputing.com/static/Downloads/QScintilla/${pkgver}/QScintilla_src-${pkgver}.tar.gz)
|
||||
sha256sums=('b6c7e5f27b51d25f09fe6cf84ae9a7f0876af0d65d8ccb551109e6e7b25885f4')
|
||||
|
||||
build() {
|
||||
## Build for Qt5
|
||||
[[ -d "${srcdir}"/build-${MSYSTEM} ]] && rm -rf "${srcdir}"/build-${MSYSTEM}
|
||||
cp -r QScintilla_src-${pkgver} build-${MSYSTEM} && cd "${srcdir}"/build-${MSYSTEM}
|
||||
|
||||
# build src
|
||||
cd "${srcdir}/build-${MSYSTEM}/src"
|
||||
export QMAKEFEATURES="${srcdir}/build-${MSYSTEM}/src/features/"
|
||||
${MINGW_PREFIX}/bin/qmake
|
||||
make PREFIX=${MINGW_PREFIX}
|
||||
|
||||
# build designer
|
||||
cd "${srcdir}/build-${MSYSTEM}/designer"
|
||||
qmake INCLUDEPATH+=../src QMAKE_LIBDIR+=../src/release
|
||||
make PREFIX=${MINGW_PREFIX}
|
||||
|
||||
# build python bindings
|
||||
cd "${srcdir}/build-${MSYSTEM}/Python"
|
||||
cp pyproject{-qt5,}.toml
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="--api-dir=;" \
|
||||
${MINGW_PREFIX}/bin/sip-build \
|
||||
--no-make \
|
||||
--qsci-features-dir=../src/features \
|
||||
--qsci-include-dir=../src \
|
||||
--qsci-library-dir=../src/release \
|
||||
--api-dir=${MINGW_PREFIX}/share/qt5/qsci/api/python
|
||||
make -C build PREFIX=${MINGW_PREFIX}
|
||||
|
||||
prepare() {
|
||||
cd QScintilla-${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
|
||||
patch -p1 -i "${srcdir}"/proper-module-extension.patch
|
||||
}
|
||||
|
||||
package_qscintilla() {
|
||||
pkgdesc="A port to Qt5 of Neil Hodgson's Scintilla C++ editor class (mingw-w64)"
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-qt5-base")
|
||||
|
||||
mkdir -p ${pkgdir}${MINGW_PREFIX}/bin
|
||||
cd "${srcdir}/build-${MSYSTEM}"
|
||||
|
||||
cd ${srcdir}/QScintilla-${pkgver}
|
||||
sed -e "s|%INSTALL_PREFIX%|$(cygpath -wm ${pkgdir})|g" \
|
||||
-i Qt4Qt5/qscintilla.pro \
|
||||
-i designer-Qt4Qt5/designer.pro
|
||||
# Fix Makefiles
|
||||
local PREFIX_WIN=$(cygpath -am ${MINGW_PREFIX})
|
||||
find src designer -type f \( -name 'Makefile*' \) \
|
||||
-exec sed -i -e "s|${PREFIX_WIN:0:2}\$(INSTALL_ROOT|\$(INSTALL_ROOT|g" {} \;
|
||||
find src designer -type f \( -name 'Makefile*' \) \
|
||||
-exec sed -i -e "s|)${PREFIX_WIN:2}|)${MINGW_PREFIX}|g" {} \;
|
||||
|
||||
cd Qt4Qt5
|
||||
${MINGW_PREFIX}/bin/qmake CONFIG+=release CONFIG+=force_debug_info CONFIG+=separate_debug_info qscintilla.pro
|
||||
make install
|
||||
mv "${pkgdir}"/${MINGW_PREFIX}/lib/*.debug "${pkgdir}"/${MINGW_PREFIX}/bin/
|
||||
make -C "src" INSTALL_ROOT="${pkgdir}" install
|
||||
make -C "designer" INSTALL_ROOT="${pkgdir}" install
|
||||
|
||||
cd ../designer-Qt4Qt5
|
||||
QMAKEFEATURES=../Qt4Qt5/features \
|
||||
${MINGW_PREFIX}/bin/qmake CONFIG+=release INCLUDEPATH+=../Qt4Qt5 designer.pro
|
||||
make install
|
||||
[[ -d "${pkgdir}"/${MINGW_PREFIX}/bin/ ]] || mkdir -p "${pkgdir}"/${MINGW_PREFIX}/bin/
|
||||
mv "${pkgdir}"/${MINGW_PREFIX}/lib/*.dll "${pkgdir}"/${MINGW_PREFIX}/bin/
|
||||
|
||||
mv ${pkgdir}${MINGW_PREFIX}/lib/*.dll ${pkgdir}${MINGW_PREFIX}/bin/
|
||||
install -Dm644 "${srcdir}/build-${MSYSTEM}/LICENSE" \
|
||||
"${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
|
||||
}
|
||||
|
||||
package_python-qscintilla() {
|
||||
@@ -71,23 +85,11 @@ package_python-qscintilla() {
|
||||
replaces=("${MINGW_PACKAGE_PREFIX}-python-qscintilla-common"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-qscintilla")
|
||||
|
||||
# HACK: qmake can not find library
|
||||
cp "QScintilla-${pkgver}/Qt4Qt5/release/libqscintilla2_qt5.dll.a" \
|
||||
"QScintilla-${pkgver}/Qt4Qt5/libqscintilla2_qt5.dll.a"
|
||||
cd "${srcdir}/build-${MSYSTEM}"
|
||||
make -C "Python/build" INSTALL_ROOT="${pkgdir}" install
|
||||
|
||||
cd QScintilla-${pkgver}
|
||||
${MINGW_PREFIX}/bin/sip-build \
|
||||
--no-make \
|
||||
--qsci-features-dir=Qt4Qt5/features \
|
||||
--qsci-include-dir=Qt4Qt5 \
|
||||
--qsci-library-dir=Qt4Qt5 \
|
||||
--api-dir=${MINGW_PREFIX}/share/qt5/qsci/api/python \
|
||||
--verbose
|
||||
|
||||
cd build
|
||||
make
|
||||
MSYS2_ARG_CONV_EXCL="${MINGW_PREFIX}" \
|
||||
make INSTALL_ROOT="${pkgdir}" install -j1
|
||||
install -Dm644 "${srcdir}/build-${MSYSTEM}/LICENSE" \
|
||||
"${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
|
||||
}
|
||||
|
||||
# template start; name=mingw-w64-splitpkg-wrappers; version=1.0;
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
--- 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
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
--- QScintilla-2.11.4/Python/configure.py.orig 2020-06-08 08:33:31.457514700 +0300
|
||||
+++ QScintilla-2.11.4/Python/configure.py 2020-06-08 08:41:26.542741300 +0300
|
||||
@@ -34,6 +34,17 @@
|
||||
from sysconfig import _POSIX_BUILD
|
||||
|
||||
|
||||
+def get_module_ext():
|
||||
+ plugin_ext = sysconfig.get_config_var('EXT_SUFFIX')
|
||||
+ if not plugin_ext:
|
||||
+ plugin_ext = sysconfig.get_config_var('SO')
|
||||
+ if not plugin_ext:
|
||||
+ if sys.platform == 'win32':
|
||||
+ plugin_ext = '.pyd'
|
||||
+ else:
|
||||
+ plugin_ext = '.so'
|
||||
+ return plugin_ext
|
||||
+
|
||||
###############################################################################
|
||||
# You shouldn't need to modify anything above this line.
|
||||
###############################################################################
|
||||
@@ -1531,10 +1542,12 @@
|
||||
|
||||
pro.write('TARGET = %s\n' % mname)
|
||||
|
||||
+ module_ext = get_module_ext()
|
||||
+
|
||||
if not opts.static:
|
||||
pro.write('''
|
||||
win32 {
|
||||
- PY_MODULE = %s.pyd
|
||||
+ PY_MODULE = %s%s
|
||||
PY_MODULE_SRC = $(DESTDIR_TARGET)
|
||||
|
||||
LIBS += -L%s -l%s
|
||||
@@ -1560,17 +1572,17 @@
|
||||
|
||||
target.CONFIG = no_check_exist
|
||||
target.files = $$PY_MODULE
|
||||
-''' % (mname, quote(target_config.py_pylib_dir), quote(target_config.py_pylib_lib), mname))
|
||||
+''' % (mname, module_ext, quote(target_config.py_pylib_dir), quote(target_config.py_pylib_lib), mname))
|
||||
|
||||
pro.write('''
|
||||
target.path = %s
|
||||
INSTALLS += target
|
||||
''' % quote(target_config.module_dir))
|
||||
|
||||
- if sys.platform == 'win32':
|
||||
- fs = '{}.lib' if opts.static else '{}.pyd'
|
||||
+ if sys.platform == 'win32' and not _POSIX_BUILD:
|
||||
+ fs = '{}.lib' if opts.static else ('{}' + module_ext)
|
||||
else:
|
||||
- fs = 'lib{}.a' if opts.static else '{}.so'
|
||||
+ fs = 'lib{}.a' if opts.static else ('{}' + module_ext)
|
||||
|
||||
all_installs.append(target_config.module_dir + '/' + fs.format(mname))
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
--- 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%
|
||||
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
|
||||
|
||||
-target.path = $$[QT_INSTALL_LIBS]
|
||||
+winpath_target = $$system(cygpath -u $$[QT_INSTALL_LIBS])
|
||||
+target.path = $$PREFIX$$winpath_target
|
||||
INSTALLS += target
|
||||
|
||||
-header.path = $$[QT_INSTALL_HEADERS]
|
||||
+winpath_header = $$system(cygpath -u $$[QT_INSTALL_HEADERS])
|
||||
+header.path = $$PREFIX$$winpath_header
|
||||
header.files = Qsci
|
||||
INSTALLS += header
|
||||
|
||||
-trans.path = $$[QT_INSTALL_TRANSLATIONS]
|
||||
+winpath_trans = $$system(cygpath -u $$[QT_INSTALL_TRANSLATIONS])
|
||||
+trans.path = $$PREFIX$$winpath_trans
|
||||
trans.files = qscintilla_*.qm
|
||||
INSTALLS += trans
|
||||
|
||||
-qsci.path = $$[QT_INSTALL_DATA]
|
||||
+winpath_qsci = $$system(cygpath -u $$[QT_INSTALL_DATA])
|
||||
+qsci.path = $$PREFIX$$winpath_qsci
|
||||
qsci.files = ../qsci
|
||||
INSTALLS += qsci
|
||||
|
||||
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_feature = $$system(cygpath -u $$[QT_INSTALL_DATA]/mkspecs/features)
|
||||
+ features.path = $$PREFIX$$winpath_feature
|
||||
}
|
||||
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
|
||||
|
||||
-target.path = $$[QT_INSTALL_PLUGINS]/designer
|
||||
+PREFIX = %INSTALL_PREFIX%
|
||||
+winpath = $$system(cygpath -u $$[QT_INSTALL_PLUGINS]/designer)
|
||||
+target.path = $$PREFIX$$winpath
|
||||
INSTALLS += target
|
||||
@@ -1,120 +0,0 @@
|
||||
--- 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
|
||||
@@ -31,6 +31,7 @@
|
||||
import os
|
||||
import optparse
|
||||
import sys
|
||||
+from sysconfig import _POSIX_BUILD
|
||||
|
||||
|
||||
###############################################################################
|
||||
@@ -187,6 +189,9 @@
|
||||
else:
|
||||
target_configuration.qsci_sip_dir = target_configuration.pyqt_sip_dir
|
||||
|
||||
+ if "MSYSTEM" in os.environ:
|
||||
+ target_configuration.qsci_sip_dir = os.popen(' '.join(['cygpath', '--unix', target_configuration.qsci_sip_dir])).readline().strip()
|
||||
+
|
||||
if options.qsci_no_sip_files:
|
||||
target_configuration.qsci_sip_dir = ''
|
||||
|
||||
@@ -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:
|
||||
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'
|
||||
|
||||
+ if _POSIX_BUILD and "MSYSTEM" in os.environ:
|
||||
+ self.inc_dir = os.popen(' '.join(['cygpath', '--unix', self.inc_dir])).readline().strip()
|
||||
+ self.module_dir = os.popen(' '.join(['cygpath', '--unix', self.module_dir])).readline().strip()
|
||||
+ self.data_dir = os.popen(' '.join(['cygpath', '--unix', self.data_dir])).readline().strip()
|
||||
+ self.lib_dir = os.popen(' '.join(['cygpath', '--unix', self.lib_dir])).readline().strip()
|
||||
+
|
||||
|
||||
class _TargetQtConfiguration:
|
||||
""" A container for the target Qt configuration. """
|
||||
@@ -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
|
||||
+ py_minor = (self.py_version >> 8) & 0x0ff
|
||||
+ if sys.platform == 'win32' and not _POSIX_BUILD:
|
||||
+ pylib_lib = 'python%d%d' % (py_major, py_minor)
|
||||
+ pylib_dir = self.py_lib_dir
|
||||
+ else:
|
||||
+ abi = getattr(sys, 'abiflags', '')
|
||||
+ pylib_lib = 'python%d.%d%s' % (py_major, py_minor, abi)
|
||||
+
|
||||
+ self.py_pylib_lib = pylib_lib
|
||||
+
|
||||
# Remaining values.
|
||||
self.debug = False
|
||||
self.pyqt_sip_flags = None
|
||||
@@ -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_venv_inc_dir
|
||||
|
||||
@@ -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
|
||||
|
||||
+ if "MSYSTEM" in os.environ:
|
||||
+ self.api_dir = os.popen(' '.join(['cygpath', '--unix', self.api_dir])).readline().strip()
|
||||
+ self.qt_inc_dir = os.popen(' '.join(['cygpath', '--unix', self.qt_inc_dir])).readline().strip()
|
||||
+ self.qt_lib_dir = os.popen(' '.join(['cygpath', '--unix', self.qt_lib_dir])).readline().strip()
|
||||
+
|
||||
if self.sysroot == '':
|
||||
self.sysroot = getattr(qt_config, 'QT_SYSROOT', '')
|
||||
|
||||
@@ -1465,7 +1504,7 @@
|
||||
PY_MODULE = %s.pyd
|
||||
PY_MODULE_SRC = $(DESTDIR_TARGET)
|
||||
|
||||
- LIBS += -L%s
|
||||
+ LIBS += -L%s -l%s
|
||||
} else {
|
||||
PY_MODULE = %s.so
|
||||
|
||||
@@ -1488,7 +1527,7 @@
|
||||
|
||||
target.CONFIG = no_check_exist
|
||||
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
|
||||
@@ -1622,6 +1661,8 @@
|
||||
to run. verbose is set if the output is to be displayed.
|
||||
"""
|
||||
|
||||
+ if "MSYSTEM" in os.environ:
|
||||
+ cmd = 'sh.exe -c "%s"' % cmd.replace("\\", "/")
|
||||
if verbose:
|
||||
sys.stdout.write(cmd + "\n")
|
||||
|
||||
Reference in New Issue
Block a user