diff options
author | CoprDistGit <infra@openeuler.org> | 2025-01-05 10:57:14 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2025-01-05 10:57:14 +0000 |
commit | 64c7efdae40182d09c67509fee352ce1ad1f214f (patch) | |
tree | a4cfbabca679c7ff232587a7036744bc1e840555 | |
parent | 088eeedca632c8650ed49dd48c5595bfe7925510 (diff) |
automatic import of qscintilla
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | QScintilla_gpl-2_10_7-sip_check.patch | 20 | ||||
-rw-r--r-- | QScintilla_gpl-2_11-QUrl.patch | 11 | ||||
-rw-r--r-- | fix-build-error.patch | 57 | ||||
-rw-r--r-- | qscintilla.spec | 173 | ||||
-rw-r--r-- | sources | 1 |
6 files changed, 263 insertions, 0 deletions
@@ -0,0 +1 @@ +/v2.11.6.tar.gz diff --git a/QScintilla_gpl-2_10_7-sip_check.patch b/QScintilla_gpl-2_10_7-sip_check.patch new file mode 100644 index 0000000..48fa763 --- /dev/null +++ b/QScintilla_gpl-2_10_7-sip_check.patch @@ -0,0 +1,20 @@ +diff -up QScintilla_gpl-2.10.7/Python/configure.py.sip-check QScintilla_gpl-2.10.7/Python/configure.py +--- QScintilla_gpl-2.10.7/Python/configure.py.sip-check 2018-06-29 06:57:42.000000000 -0500 ++++ QScintilla_gpl-2.10.7/Python/configure.py 2018-07-22 11:48:43.271510206 -0500 +@@ -875,14 +875,14 @@ class _TargetConfiguration: + try: + from PyQt5 import QtCore + except ImportError: +- error( ++ inform( + "Unable to import PyQt5.QtCore. Make sure PyQt5 is " + "installed.") + else: + try: + from PyQt4 import QtCore + except ImportError: +- error( ++ inform( + "Unable to import PyQt4.QtCore. Make sure PyQt4 is " + "installed.") + diff --git a/QScintilla_gpl-2_11-QUrl.patch b/QScintilla_gpl-2_11-QUrl.patch new file mode 100644 index 0000000..0588f33 --- /dev/null +++ b/QScintilla_gpl-2_11-QUrl.patch @@ -0,0 +1,11 @@ +diff -up QScintilla_gpl-2.11/Qt4Qt5/Qsci/qsciscintillabase.h.qurl QScintilla_gpl-2.11/Qt4Qt5/Qsci/qsciscintillabase.h +--- QScintilla_gpl-2.11/Qt4Qt5/Qsci/qsciscintillabase.h.qurl 2019-02-04 09:25:37.000000000 -0600 ++++ QScintilla_gpl-2.11/Qt4Qt5/Qsci/qsciscintillabase.h 2019-02-11 15:26:08.397657288 -0600 +@@ -27,6 +27,7 @@ + #include <QByteArray> + #include <QPoint> + #include <QTimer> ++#include <QUrl> + + #include <Qsci/qsciglobal.h> + diff --git a/fix-build-error.patch b/fix-build-error.patch new file mode 100644 index 0000000..2e87efb --- /dev/null +++ b/fix-build-error.patch @@ -0,0 +1,57 @@ +diff -Nur qscintilla-2.11.6/Qt4Qt5/Qsci/qsciglobal.h qscintilla-2.11.6/Qt4Qt5/Qsci/qsciglobal.h +--- qscintilla-2.11.6/Qt4Qt5/Qsci/qsciglobal.h 2019-06-27 13:40:05.000000000 +0800 ++++ qscintilla-2.11.6/Qt4Qt5/Qsci/qsciglobal.h 2019-06-25 20:49:27.000000000 +0800 +@@ -28,11 +28,15 @@ + #define QSCINTILLA_VERSION_STR "2.11.6" + + +-// Define QSCINTILLA_MAKE_DLL to create a QScintilla shared library. +-#ifdef QSCINTILLA_MAKE_DLL +- #define QSCINTILLA_EXPORT Q_DECL_EXPORT ++// Define QSCINTILLA_MAKE_DLL to create a QScintilla shared library, or ++// define QSCINTILLA_DLL to link against a QScintilla shared library, or define ++// neither to either build or link against a static QScintilla library. ++#if defined(QSCINTILLA_DLL) ++#define QSCINTILLA_EXPORT Q_DECL_IMPORT ++#elif defined(QSCINTILLA_MAKE_DLL) ++#define QSCINTILLA_EXPORT Q_DECL_EXPORT + #else +- #define QSCINTILLA_EXPORT Q_DECL_IMPORT ++#define QSCINTILLA_EXPORT + #endif + + +diff -Nur qscintilla-2.11.6/Qt4Qt5/qscintilla.pro qscintilla-2.11.6/Qt4Qt5/qscintilla.pro +--- qscintilla-2.11.6/Qt4Qt5/qscintilla.pro 2021-01-06 10:52:53.000000000 +0800 ++++ qscintilla-2.11.6/Qt4Qt5/qscintilla.pro 2025-01-05 18:47:19.443415100 +0800 +@@ -72,18 +72,20 @@ + # Scintilla namespace rather than pollute the global namespace. + #DEFINES += SCI_NAMESPACE + +-target.path = $$INSTALL_DIR/lib ++target.path = $$[QT_INSTALL_LIBS] + INSTALLS += target + +-header.path = $$INSTALL_DIR/include ++header.path = $$[QT_INSTALL_HEADERS] + header.files = Qsci + INSTALLS += header + + trans.path = $$[QT_INSTALL_TRANSLATIONS] + trans.files = qscintilla_*.qm ++INSTALLS += trans + + qsci.path = $$[QT_INSTALL_DATA] + qsci.files = ../qsci ++INSTALLS += qsci + + greaterThan(QT_MAJOR_VERSION, 4) { + features.path = $$[QT_HOST_DATA]/mkspecs/features +@@ -95,6 +97,7 @@ + } else { + features.files = $$PWD/features/qscintilla2.prf + } ++INSTALLS += features + + HEADERS = \ + ./Qsci/qsciglobal.h \ diff --git a/qscintilla.spec b/qscintilla.spec new file mode 100644 index 0000000..d1c6a11 --- /dev/null +++ b/qscintilla.spec @@ -0,0 +1,173 @@ +%global scintilla_ver 3.10.1 +%global sip_ver 4.19.7 +%if ! 0%{?bootstrap} +%global python3 1 +%endif +%global qt5 1 +%global py3_sipdir %{_datadir}/sip +%global py3_sip %{_bindir}/sip +Name: qscintilla +Version: 2.11.6 +Release: 1 +License: GPL-3.0-only +Summary: A Scintilla port to Qt +Url: https://github.com/opencor/qscintilla +Source0: https://github.com/opencor/qscintilla/archive/refs/tags/v%{version}.tar.gz +Patch100: QScintilla_gpl-2_10_7-sip_check.patch +Patch101: QScintilla_gpl-2_11-QUrl.patch +Patch102: fix-build-error.patch +BuildRequires: gcc-c++ +BuildRequires: pkgconfig(QtDesigner) pkgconfig(QtGui) pkgconfig(QtScript) pkgconfig(QtXml) +%if 0%{?qt5} +BuildRequires: pkgconfig(Qt5Designer) pkgconfig(Qt5Gui) pkgconfig(Qt5Widgets) +%endif +Provides: bundled(scintilla) = %{scintilla_ver} + +%description +QScintilla is a port of Scintilla to the Qt GUI toolkit. +%{?scintilla_ver:This version of QScintilla is based on Scintilla v%{scintilla_ver}.} + +%if 0%{?python3} +%package -n python3-qscintilla +Summary: QScintilla python3 bindings +BuildRequires: python3-devel python3-PyQt4-devel +Provides: %{name}-python3 = %{version}-%{release} +Provides: python3-PyQt5-Qsci = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} python3-PyQt4 +%{?_sip_api:Requires: python3-pyqt4-sip-api(%{_sip_api_major}) >= %{_sip_api}} + +%description -n python3-qscintilla +%{summary}. + +%package -n python3-qscintilla-devel +Summary: Development files for QScintilla python3 bindings +Provides: %{name}-python3-devel = %{version}-%{release} +Requires: python3-PyQt4-devel +BuildArch: noarch + +%description -n python3-qscintilla-devel +%{summary}. +%endif + +%if 0%{?qt5} +%package qt5 +Summary: A Scintilla port to Qt5 +Provides: bundled(scintilla) = %{scintilla_ver} + +%description qt5 +%{summary}. + +%package qt5-devel +Summary: QScintilla Development Files +Requires: %{name}-qt5%{?_isa} = %{version}-%{release} qt5-qtbase-devel + +%description qt5-devel +%{summary}. + +%if 0%{?python3} +%package -n python3-qscintilla-qt5 +Summary: QScintilla-qt5 python3 bindings +BuildRequires: python3-qt5 python3-qt5-devel python3-sip-devel >= %{sip_ver} +Provides: %{name}-qt5-python3 = %{version}-%{release} +Requires: %{name}-qt5%{?_isa} = %{version}-%{release} +Requires: python3-qt5%{?pyqt5_version: >= %{pyqt5_version}} +%{?_sip_api:Requires: python3-pyqt5-sip-api(%{_sip_api_major}) >= %{_sip_api}} + +%description -n python3-qscintilla-qt5 +%{summary}. + +%package -n python3-qscintilla-qt5-devel +Summary: Development files for QScintilla-qt5 python3 bindings +Provides: %{name}-qt5-python3-devel = %{version}-%{release} +Requires: python3-qt5-devel +BuildArch: noarch + +%description -n python3-qscintilla-qt5-devel +%{summary}. +%endif +%endif + +%prep +%autosetup -p1 -n qscintilla-%{version} + +%build +%if 0%{?qt5} +PATH=%{_qt5_bindir}:$PATH; export PATH +cp -a Qt4Qt5 Qt5/ +pushd Qt5 +%{qmake_qt5} qscintilla.pro +%make_build +popd +QMAKEFEATURES=`pwd`/Qt5/features; export QMAKEFEATURES +cp -a designer-Qt4Qt5 designer-Qt5/ +pushd designer-Qt5 +%{qmake_qt5} designer.pro INCLUDEPATH+=../Qt5 LIBS+=-L../Qt5 +%make_build +popd +%if 0%{?python3} +cp -a Python Python3-qt5 +pushd Python3-qt5 +%{__python3} \ + configure.py --verbose \ + --pyqt=PyQt5 \ + --sip=/usr/bin/sip-pyqt5 \ + --qsci-incdir=../Qt5 --qsci-libdir=../Qt5 +%make_build +popd +%endif +%endif + +%install +%if 0%{?qt5} +make -C Qt5 install INSTALL_ROOT=%{buildroot} +ln -s libqscintilla2_qt5.so %{buildroot}%{_qt5_libdir}/libqscintilla2-qt5.so +make -C designer-Qt5 install INSTALL_ROOT=%{buildroot} +%if 0%{?python3} +make -C Python3-qt5 install DESTDIR=%{buildroot} INSTALL_ROOT=%{buildroot} +test -x %{buildroot}%{python3_sitearch}/PyQt5/Qsci.so || \ +chmod a+x %{buildroot}%{python3_sitearch}/PyQt5/Qsci.so +%endif +%endif +%find_lang qscintilla --with-qt +%if 0%{?qt5} +grep "%{_qt5_translationdir}" qscintilla.lang > qscintilla-qt5.lang +%endif +%if ! ( 0%{?qt5} && 0%{?python3}) +rm -rfv %{buildroot}%{_qt5_datadir}/qsci/ +%endif + +%if 0%{?qt5} + +%files qt5 -f qscintilla-qt5.lang +%doc NEWS README +%license LICENSE +%{_qt5_libdir}/libqscintilla2_qt5.so.15* +%{_qt5_plugindir}/designer/libqscintillaplugin.so + +%files qt5-devel +%doc doc/html-Qt4Qt5 doc/Scintilla example-Qt4Qt5 +%{_qt5_headerdir}/Qsci/ +%{_qt5_libdir}/libqscintilla2_qt5.so +%{_qt5_archdatadir}/mkspecs/features/qscintilla2.prf +%{_qt5_libdir}/libqscintilla2-qt5.so + +%if 0%{?python3} +%files -n python3-qscintilla-qt5 +%{python3_sitearch}/PyQt5/Qsci.* +%{_qt5_datadir}/qsci/ +%{python3_sitearch}/QScintilla-%{version}.dist-info/ + +%files -n python3-qscintilla-qt5-devel +%{py3_sipdir}/PyQt5/Qsci/ +%endif +%endif + +%changelog +* Sun Jan 05 2025 Funda Wang <fundawang@yeah.net> - 2.11.6-1 +- update to 2.11.6 + +* Fri Feb 18 2022 liwu <liwu13@huawei.com> - 2.11.2-2 +- Fix build error of qscintilla + +* Mon Jan 11 2021 leiju <leiju4@huawei.com> - 2.11.2-1 +- package init @@ -0,0 +1 @@ +bdf60588261a51a58f200ad0b97887ff v2.11.6.tar.gz |