summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-01-05 11:21:44 +0000
committerCoprDistGit <infra@openeuler.org>2025-01-05 11:21:44 +0000
commit7f280c567e5259152d861808a677df42ccfc74c6 (patch)
tree9f64232b7df1808588c0398da694fabe445175f4
parentd5821433bc80236fdc768bd5a29f5a85b58cf9c3 (diff)
automatic import of qscintilla
-rw-r--r--qscintilla.spec68
1 files changed, 8 insertions, 60 deletions
diff --git a/qscintilla.spec b/qscintilla.spec
index 387ea5d..626dba4 100644
--- a/qscintilla.spec
+++ b/qscintilla.spec
@@ -1,9 +1,5 @@
%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
@@ -17,39 +13,13 @@ 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}
@@ -64,7 +34,6 @@ Requires: %{name}-qt5%{?_isa} = %{version}-%{release} qt5-qtbase-deve
%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}
@@ -84,60 +53,42 @@ 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
+
+pushd Qt4Qt5
%{qmake_qt5} qscintilla.pro
%make_build
popd
+
QMAKEFEATURES=`pwd`/Qt5/features; export QMAKEFEATURES
-cp -a designer-Qt4Qt5 designer-Qt5/
-pushd designer-Qt5
+pushd designer-Qt4Qt5
%{qmake_qt5} designer.pro INCLUDEPATH+=../Qt5 LIBS+=-L../Qt5
%make_build
-popd
-%if 0%{?python3}
-cp -a Python Python3-qt5
-pushd Python3-qt5
+
+pushd Python
%{__python3} \
configure.py --verbose \
--pyqt=PyQt5 \
--sip=/usr/bin/sip-pyqt5 \
--qsci-incdir=../Qt5 --qsci-libdir=../Qt5
cat Makefile
-%make_build
-popd
-%endif
-%endif
+%make_build QMAKE_LFLAGS_RELEASE=%{_qt5_ldflags} QMAKE_CXXFLAGS_RELEASE=%{_qt5_cxxflags}
%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
@@ -152,7 +103,6 @@ rm -rfv %{buildroot}%{_qt5_datadir}/qsci/
%{_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/
@@ -160,8 +110,6 @@ rm -rfv %{buildroot}%{_qt5_datadir}/qsci/
%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