]> git.pld-linux.org Git - packages/qscintilla2.git/commitdiff
- updated to 2.8.4
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 8 Nov 2014 09:59:48 +0000 (10:59 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 8 Nov 2014 09:59:48 +0000 (10:59 +0100)
- added multiqt,make,outoftree patches
- build qt4/qt5 and python2/python3 variants
- NFY, saving work (to be continued)

qscintilla2-internal_build.patch
qscintilla2-make.patch [new file with mode: 0644]
qscintilla2-multiqt.patch [new file with mode: 0644]
qscintilla2-outoftree.patch [new file with mode: 0644]
qscintilla2.spec

index a613abad91033fbebc5ae5f122ec1f56669b10e6..f43824288bfec1921facd5a844f5665c1576fff4 100644 (file)
@@ -9,3 +9,14 @@
  
  CONFIG += designer release plugin
  
+--- QScintilla-gpl-2.8.4/Python/configure.py.orig      2014-09-11 19:15:17.000000000 +0200
++++ QScintilla-gpl-2.8.4/Python/configure.py   2014-11-02 14:41:09.187039766 +0100
+@@ -1418,7 +1418,7 @@
+     includepath = qmake_config.get('INCLUDEPATH')
+     if includepath:
+-        pro.write('INCLUDEPATH += %s\n' % includepath)
++        pro.write('INCLUDEPATH = %s $$INCLUDEPATH\n' % includepath)
+     # Make sure the SIP include directory is searched before the Python include
+     # directory if they are different.
diff --git a/qscintilla2-make.patch b/qscintilla2-make.patch
new file mode 100644 (file)
index 0000000..245656e
--- /dev/null
@@ -0,0 +1,11 @@
+--- QScintilla-gpl-2.8.4/Qt4Qt5/qscintilla.pro.orig    2014-11-03 21:10:56.232432440 +0100
++++ QScintilla-gpl-2.8.4/Qt4Qt5/qscintilla.pro 2014-11-03 21:24:33.329064817 +0100
+@@ -285,7 +285,7 @@
+       ../lexers/LexInno.cpp \
+       ../lexers/LexKix.cpp \
+       ../lexers/LexKVIrc.cpp \
+-      ../lexers/LexLaTex.cpp \
++      ../lexers/LexLaTeX.cpp \
+       ../lexers/LexLisp.cpp \
+       ../lexers/LexLout.cpp \
+       ../lexers/LexLua.cpp \
diff --git a/qscintilla2-multiqt.patch b/qscintilla2-multiqt.patch
new file mode 100644 (file)
index 0000000..c795551
--- /dev/null
@@ -0,0 +1,40 @@
+--- QScintilla-gpl-2.8.4/Qt4Qt5/qscintilla.pro.orig    2014-09-11 19:15:15.000000000 +0200
++++ QScintilla-gpl-2.8.4/Qt4Qt5/qscintilla.pro 2014-11-03 20:11:22.685915741 +0100
+@@ -28,7 +28,7 @@
+ !win32:VERSION = 11.3.0
+ TEMPLATE = lib
+-TARGET = qscintilla2
++TARGET = qscintilla2-qt$$QT_MAJOR_VERSION
+ CONFIG += qt warn_off release thread exceptions
+ INCLUDEPATH += . ../include ../lexlib ../src
+--- QScintilla-gpl-2.8.4/Qt4Qt5/features/qscintilla2.prf.orig  2014-09-11 19:15:15.000000000 +0200
++++ QScintilla-gpl-2.8.4/Qt4Qt5/features/qscintilla2.prf       2014-11-03 20:35:52.655854645 +0100
+@@ -6,20 +6,22 @@
+     }
+ }
++QTSUF = -qt$QT_MAJOR_VERSION
++
+ INCLUDEPATH += $$[QT_INSTALL_HEADERS]
+ LIBS += -L$$[QT_INSTALL_LIBS]
+ CONFIG(debug, debug|release) {
+     mac: {
+-        LIBS += -lqscintilla2_debug
++        LIBS += -lqscintilla2$$[QTSUF]_debug
+     } else {
+         win32: {
+-            LIBS += -lqscintilla2d
++            LIBS += -lqscintilla2$$[QTSUF]d
+         } else {
+-            LIBS += -lqscintilla2
++            LIBS += -lqscintilla2$$[QTSUF]
+         }
+     }
+ } else {
+-    LIBS += -lqscintilla2
++    LIBS += -lqscintilla2$$[QTSUF]
+ }
diff --git a/qscintilla2-outoftree.patch b/qscintilla2-outoftree.patch
new file mode 100644 (file)
index 0000000..fe3c21c
--- /dev/null
@@ -0,0 +1,32 @@
+--- ../BUILD/QScintilla-gpl-2.8.4/Python/configure.py.orig     2014-11-04 16:22:47.229532126 +0100
++++ ../BUILD/QScintilla-gpl-2.8.4/Python/configure.py  2014-11-07 22:03:55.811128882 +0100
+@@ -278,7 +278,7 @@
+             return None
+         path = os.path.join(target_configuration.qsci_sip_dir, 'Qsci')
+-        files = glob.glob('sip/*.sip')
++        files = glob.glob(os.path.join(target_configuration.src_dir, 'sip/*.sip'))
+         return path, files
+@@ -1257,7 +1257,7 @@
+     argv.append('-c')
+     argv.append('.')
+-    argv.append(module_config.get_sip_file(target_config))
++    argv.append(os.path.join(target_config.src_dir, module_config.get_sip_file(target_config)))
+     check_file = 'sipAPI%s.h' % module_config.name
+     _remove_file(check_file)
+@@ -1611,8 +1611,11 @@
+     line arguments.  module_config is the module configuration.
+     """
++    src_dir = os.path.dirname(os.path.abspath(__file__))
++
+     # Create the default target configuration.
+     target_config = _TargetConfiguration(module_config)
++    target_config.src_dir = src_dir
+     # Parse the command line.
+     p = _create_optparser(target_config, module_config)
index af3fd1e48c704ab9a00ce29a2f6cb7e560061b1c..7573ba14740f1dc4017331705c074cf1e6396a62 100644 (file)
@@ -1,30 +1,55 @@
 #
 # TODO:
 # - fix building with qscintilla2(-devel) installed, remove BC
+#   - how to successfully prepend -I../Qt4Qt5 before system qt include in qmake?
 # - QScintilla2 for Qt3 (does it make any sense nowadays?)
 # - QScintilla2 for Qt5
 #
-%define                scintilla_ver   3.2.3
+# Conditonal build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+%bcond_without qt4     # Qt4 library and modules
+%bcond_without qt5     # Qt5 library and modules
+
+%define                scintilla_ver   3.3.6
+%define                sip_ver         4.16
 Summary:       QScintilla2 - a port to Qt of the Scintilla editing component
 Summary(pl.UTF-8):     QScintilla2 - port komponentu edytora Scintilla dla biblioteki Qt
 Name:          qscintilla2
-Version:       2.8
-Release:       2
+Version:       2.8.4
+Release:       1
 License:       GPL v2 or GPL v3 with Riverbank GPL Exception v1.1
 Group:         X11/Libraries
 Source0:       http://downloads.sourceforge.net/pyqt/QScintilla-gpl-%{version}.tar.gz
-# Source0-md5: 02c406d8cd5db661f127303e91775c0b
+# Source0-md5: 28aec903ff48ae541295a4fb9c96f8ea
 Patch0:                %{name}-internal_build.patch
+Patch1:                %{name}-multiqt.patch
+Patch2:                %{name}-make.patch
+Patch3:                %{name}-outoftree.patch
 URL:           http://www.riverbankcomputing.co.uk/software/qscintilla/
-BuildRequires: QtDesigner-devel
-BuildRequires: QtGui-devel
+%if %{with python2}
 BuildRequires: python-PyQt4-devel >= 4.8.2
-BuildRequires:  python-sip-devel >= 2:4.14
-BuildRequires: qt4-build >= 4.8
-BuildRequires: qt4-qmake >= 4.8
+BuildRequires: python-sip-devel >= 2:%{sip_ver}
+%endif
+%if %{with python3}
+BuildRequires: python3-PyQt4-devel >= 4.8.2
+BuildRequires: python3-sip-devel >= 2:%{sip_ver}
+%endif
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.558
-BuildConflicts:        qscintilla2
+%if %{with qt4}
+BuildRequires: QtDesigner-devel >= 4.8
+BuildRequires: QtGui-devel >= 4.8
+BuildRequires: qt4-build >= 4.8
+BuildRequires: qt4-qmake >= 4.8
+%endif
+%if %{with qt5}
+BuildRequires: Qt5Designer-devel >= 5
+BuildRequires: Qt5Gui-devel >= 5
+BuildRequires: qt5-build >= 5
+BuildRequires: qt5-qmake >= 5
+%endif
+BuildConflicts:        qscintilla2-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sipfilesdir    %{_datadir}/sip
@@ -73,7 +98,7 @@ Summary:      Python bindings for the QScintilla2
 Summary(pl.UTF-8):     Wiązania Pythona dla komponentu QScintilla2
 Group:         Libraries/Python
 Requires:      %{name} = %{version}-%{release}
-%requires_ge  python-PyQt4
+%requires_ge   python-PyQt4
 
 %description -n python-%{name}
 Python bindings for the QScintilla2.
@@ -97,40 +122,68 @@ Wiązania Pythona dla komponentu QScintilla2 - pliki programistyczne.
 %prep
 %setup -q -n QScintilla-gpl-%{version}
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
-cd Qt4Qt5
-qmake-qt4 qscintilla.pro
+for qt in %{?with_qt4:qt4} %{?with_qt5:qt5} ; do
+install -d build-${qt}/{Qt4Qt5,designer-Qt4Qt5,Python2,Python3}
+cd build-${qt}/Qt4Qt5
+qmake-${qt} ../../Qt4Qt5/qscintilla.pro
 %{__make}
-cd -
-
-cd designer-Qt4Qt5
-qmake-qt4 designer.pro
+cd ../designer-Qt4Qt5
+qmake-${qt} ../../designer-Qt4Qt5/designer.pro
 %{__make}
-cd -
+cd ..
 
-cd Python
+%if %{with python2}
+cd Python2
 # setup PATH to get proper qmake
 # pass --apidir because configure.py default is inconsistent with sources (no /qsci subdir)
-PATH=%{_libdir}/qt4/bin:$PATH \
-%{__python} configure.py \
+PATH=%{_libdir}/${qt}/bin:$PATH \
+%{__python} ../../Python/configure.py \
+       --verbose \
        -c -j 3 \
-       -n ../Qt4Qt5 \
+       -n ../../Qt4Qt5 \
        -o ../Qt4Qt5 \
-       --apidir=%{_datadir}/qt4/qsci
+       --apidir=%{_datadir}/${qt}/qsci
 %{__make}
-cd -
+cd ..
+%endif
+%if %{with python3}
+cd Python3
+PATH=%{_libdir}/${qt}/bin:$PATH \
+%{__python3} ../../Python/configure.py \
+       --verbose \
+       -c -j 3 \
+       -n ../../Qt4Qt5 \
+       -o ../Qt4Qt5 \
+       --apidir=%{_datadir}/${qt}/qsci
+%{__make}
+cd ..
+%endif
+cd ..
+done
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_datadir}/qt5/qsci/api
+#install -d $RPM_BUILD_ROOT%{_datadir}/qt5/qsci/api
 
-%{__make} -C Qt4Qt5 install \
+for qt in %{?with_qt4:qt4} %{?with_qt5:qt5} ; do
+%{__make} -C build-${qt}/Qt4Qt5 install \
        INSTALL_ROOT=$RPM_BUILD_ROOT
-%{__make} -C designer-Qt4Qt5 install \
+%{__make} -C build-${qt}/designer-Qt4Qt5 install \
        INSTALL_ROOT=$RPM_BUILD_ROOT
-%{__make} -C Python install \
+%if %{with python3}
+%{__make} -C build-${qt}/Python3 install \
        INSTALL_ROOT=$RPM_BUILD_ROOT
+%endif
+%if %{with python2}
+%{__make} -C build-${qt}/Python2 install \
+       INSTALL_ROOT=$RPM_BUILD_ROOT
+%endif
+done
 
 for file in $RPM_BUILD_ROOT%{_datadir}/locale/*.qm
 do
@@ -141,7 +194,7 @@ do
 done
 
 # unnecessary symlink
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libqscintilla2.so.11.0
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libqscintilla2.so.11.3
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -159,7 +212,6 @@ rm -rf $RPM_BUILD_ROOT
 %lang(es) %{_datadir}/locale/es/LC_MESSAGES/qscintilla2.qm
 %lang(fr) %{_datadir}/locale/fr/LC_MESSAGES/qscintilla2.qm
 %lang(pt_BR) %{_datadir}/locale/pt_BR/LC_MESSAGES/qscintilla2.qm
-%lang(ru) %{_datadir}/locale/ru/LC_MESSAGES/qscintilla2.qm
 %dir %{_datadir}/qt4/qsci
 %dir %{_datadir}/qt4/qsci/api
 %dir %{_datadir}/qt5/qsci
@@ -170,6 +222,7 @@ rm -rf $RPM_BUILD_ROOT
 %doc doc/Scintilla/*
 %attr(755,root,root) %{_libdir}/libqscintilla2.so
 %{_includedir}/qt4/Qsci
+%{_datadir}/qt4/mkspecs/features/qscintilla2.prf
 
 %files -n QtDesigner-plugin-%{name}
 %defattr(644,root,root,755)
This page took 0.153353 seconds and 4 git commands to generate.