diff --git a/qscintilla-2.10.8-designer-prepend-local-includes.patch b/qscintilla-2.10.8-designer-prepend-local-includes.patch new file mode 100644 index 0000000..e5572a2 --- /dev/null +++ b/qscintilla-2.10.8-designer-prepend-local-includes.patch @@ -0,0 +1,8 @@ +--- QScintilla_gpl-2.10.8/designer-Qt4Qt5/designer.pro.orig 2019-01-06 23:27:53.938328784 +0100 ++++ QScintilla_gpl-2.10.8/designer-Qt4Qt5/designer.pro 2019-01-06 23:29:42.925796588 +0100 +@@ -24,3 +24,5 @@ + + target.path = $$[QT_INSTALL_PLUGINS]/designer + INSTALLS += target ++ ++INCLUDEPATH = ../Qt4Qt5 diff --git a/qscintilla-2.7.2-designer-prepend-local-includes.patch b/qscintilla-2.7.2-designer-prepend-local-includes.patch deleted file mode 100644 index 84b010f..0000000 --- a/qscintilla-2.7.2-designer-prepend-local-includes.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- QScintilla-gpl-2.7.2/designer-Qt4Qt5/designer.pro.orig 2013-07-13 10:40:35.228354961 +0200 -+++ QScintilla-gpl-2.7.2/designer-Qt4Qt5/designer.pro 2013-07-13 10:44:00.804368831 +0200 -@@ -22,4 +22,5 @@ - target.path = $$[QT_INSTALL_PLUGINS]/designer - INSTALLS += target - --LIBS += -L$$[QT_INSTALL_LIBS] -lqscintilla2 -+LIBS += -L../Qt4Qt5 -L$$[QT_INSTALL_LIBS] -lqscintilla2 -+INCPATH = ../Qt4Qt5 diff --git a/qscintilla.spec b/qscintilla.spec index fa571e1..b29c046 100644 --- a/qscintilla.spec +++ b/qscintilla.spec @@ -1,16 +1,16 @@ %define pythonsip_ver %(sip -V) Name: qscintilla -Version: 2.8.4 -Release: 4mamba +Version: 2.10.8 +Release: 2mamba Summary: A port to Qt of Neil Hodgson's Scintilla C++ editor control Group: Development/Tools Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://www.riverbankcomputing.co.uk/software/qscintilla -Source: http://sourceforge.net/projects/pyqt/files/QScintilla2/QScintilla-%{version}/QScintilla-gpl-%{version}.tar.gz +Source: https://sourceforge.net/projects/pyqt/files/QScintilla2/QScintilla-%{version}/QScintilla_gpl-%{version}.tar.gz Patch0: qscintilla-2.7.2-prepend-local-includes.patch -Patch1: qscintilla-2.7.2-designer-prepend-local-includes.patch +Patch1: qscintilla-2.10.8-designer-prepend-local-includes.patch Patch2: qscintilla-2.8.4-python-build-from-objdir.patch Patch3: qscintilla-2.8.4-python-qsci-link.patch License: GPL @@ -26,9 +26,11 @@ BuildRequires: libstdc++6-devel # WARNING: do not parametrize python-sip-devel version or it will be useless for ports BuildRequires: python-sip-devel >= 4.16.4 BuildRequires: PyQt4-devel +BuildRequires: PyQt5-devel #BuildRequires: chrpath %if "%?with_pyver" BuildRequires: PyQt4-py%{with_pyver} +BuildRequires: PyQt5-py%{with_pyver} %endif Requires: python-sip = %{pythonsip_ver} Provides: QScintilla2 @@ -108,11 +110,11 @@ QScintilla is a port to Qt of the Scintilla editing component. This package contains development files for QScintilla PyQt4 bindings. %prep -%setup -q -n QScintilla-gpl-%{version} +%setup -q -n QScintilla_gpl-%{version} #-D -T #:<< _EOF #%patch0 -p1 -#%patch1 -p1 +%patch1 -p1 #%patch2 -p1 #%patch3 -p1 @@ -122,10 +124,39 @@ sed -i "s/^DESTDIR = \$(QTDIR)/DESTDIR = \$(INSTALL_ROOT)\$(QTDIR)/" */*.pro find doc example-Qt4Qt5 -type f -exec chmod 0644 {} ';' find src include -type f -exec chmod 0644 {} ';' -# fix line endings in license file(s) -sed -i 's/\r//' LICENSE.GPL2 GPL_EXCEPTION_ADDENDUM.TXT +mkdir build-qt4 +cp -a * build-qt4/ || true %build +#:<< _EOF + +cd Qt4Qt5 +#sed -i 's/INSTALLS += header trans qsci/INSTALLS += header trans qsci target/g' qscintilla.pro +%{_qt5_qmake} qscintilla.pro +%make +cd .. + +cd designer-Qt4Qt5 +%{_qt5_qmake} designer.pro +%make +#LFLAGS+="-L../Qt4Qt5 -shared -Wl,-O1" +#INCLUDEPATH+=../Qt4Qt5 QMAKE_LIBDIR+=../Qt4Qt5 +cd .. + +cd Python +%{__python} configure.py \ + -c \ + -d %{python_sitearch}/PyQt5 \ + --qsci-incdir=../Qt4Qt5 \ + --qsci-libdir=../Qt4Qt5 \ + --qmake /usr/bin/qmake-qt5 \ + --pyqt=PyQt5 + + +%make CXX="c++ -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtPrintSupport" +cd .. + +cd build-qt4 cd Qt4Qt5 #sed -i 's/INSTALLS += header trans qsci/INSTALLS += header trans qsci target/g' qscintilla.pro %{_qt4_qmake} qscintilla.pro @@ -134,24 +165,36 @@ cd .. cd designer-Qt4Qt5 %{_qt4_qmake} designer.pro -%make LFLAGS+="-L../Qt4Qt5 -shared -Wl,-O1" +%make +#LFLAGS+="-L../Qt4Qt5 -shared -Wl,-O1" #INCLUDEPATH+=../Qt4Qt5 QMAKE_LIBDIR+=../Qt4Qt5 cd .. -cd Python -%{__python} configure.py \ - -c \ - -d %{python_sitearch}/PyQt4 \ - --qsci-incdir=../Qt4Qt5 \ - --qsci-libdir=../Qt4Qt5 \ - --qmake /usr/bin/qmake-qt4 - - -%make CXX="c++ -I../Qt4Qt5" +#cd Python +#%{__python} configure.py \ +# -c \ +# -d %{python_sitearch}/PyQt5 \ +# --qsci-incdir=../Qt4Qt5 \ +# --qsci-libdir=../Qt4Qt5 \ +# --qmake /usr/bin/qmake-qt4 \ +# --pyqt=PyQt4 +# +#% make cd .. %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +cd build-qt4 +%makeinstall -C Qt4Qt5 \ + INSTALL_ROOT=%{buildroot} + +%makeinstall -C designer-Qt4Qt5 \ + INSTALL_ROOT=%{buildroot} + +#% makeinstall -C Python INSTALL_ROOT=%{buildroot} + +cd .. + %makeinstall -C Qt4Qt5 \ INSTALL_ROOT=%{buildroot} @@ -176,20 +219,28 @@ cd .. %files %defattr(-,root,root) -%{_libdir}/libqscintilla2.so.* +%{_libdir}/libqscintilla2_qt4.so.* %{_qt4_datadir}/translations/qscintilla_*.qm %dir %{_qt4_datadir}/qsci/api/python %{_qt4_datadir}/qsci/api/python/*.api -%doc GPL_EXCEPTION_ADDENDUM.TXT -%doc GPL_EXCEPTION.TXT LICENSE.GPL2 LICENSE.GPL3 -%doc OPENSOURCE-NOTICE.TXT +# qt5 +%{_libdir}/libqscintilla2_qt5.so.* +%{_qt5_datadir}/translations/qscintilla_*.qm +%dir %{_qt5_datadir}/qsci/api/python +%{_qt5_datadir}/qsci/api/python/*.api +%doc LICENSE %files devel %defattr(-,root,root) %dir %{_includedir}/qt4/Qsci %{_qt4_headerdir}/Qsci/*.h -%{_libdir}/libqscintilla2.so +%{_libdir}/libqscintilla2_qt4.so %{_datadir}/qt4/mkspecs/features/qscintilla2.prf +# qt5 +%{_qt5_headerdir}/Qsci/*.h +%{_libdir}/libqscintilla2_qt5.so +%{_libdir}/qt5/mkspecs/features/qscintilla2.prf +%{_libdir}/qt5/plugins/designer/libqscintillaplugin.so %doc NEWS README %doc doc/html-Qt4Qt5 doc/Scintilla example-Qt4Qt5 @@ -199,15 +250,24 @@ cd .. %files -n python-%{name}%{?with_pyver:-py%{pyver}} %defattr(-,root,root) -%{python_sitearch}/PyQt4/Qsci.so +%{python_sitearch}/PyQt5/Qsci.so +%{python_sitearch}/PyQt5/Qsci.pyi +%dir %{python_sitearch}/QScintilla-%{version}.dist-info +%{python_sitearch}/QScintilla-%{version}.dist-info/* %files -n python-%{name}-devel %defattr(-,root,root) -%dir %{_datadir}/sip/PyQt4/Qsci -%{_datadir}/sip/PyQt4/Qsci/*.sip +%dir %{_datadir}/sip/PyQt5/Qsci +%{_datadir}/sip/PyQt5/Qsci/*.sip #%{_datadir}/qt4/api/python/QScintilla2.api %changelog +* Sun Mar 31 2019 Silvan Calarco 2.10.8-2mamba +- rebuilt + +* Sun Jan 06 2019 Silvan Calarco 2.10.8-1mamba +- update to 2.10.8 + * Sat Nov 15 2014 Silvan Calarco 2.8.4-4mamba - added -py3 support