Репозиторий Sisyphus
Последнее обновление: 18 ноября 2017 | Пакетов: 17921 | Посещений: 10393052
en ru br
Репозитории ALT
S:2.10.1-alt4.S1
D:2.3-alt1
5.1: 2.4-alt5
4.1: 2.3-alt0.M41.3
+backports:2.2-alt1.M41.1
www.altlinux.org/Changes

Группа :: Разработка/KDE и QT
Пакет: qscintilla2

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%def_with python
%def_without python-qt3
%def_without qt3
%def_with python3
%def_with python3qt5

Summary: QScintilla is a port to Qt of Neil Hodgson's Scintilla C++ editor class
%define oname qscintilla2
%define suff 13
Name: %oname
Version: 2.10.1
Release: alt4%ubt
License: GPL
Group: Development/KDE and QT

Source: qscintilla-gpl-%version.tar.gz
Patch1: %name-%version-alt-build.patch

Url: http://www.riverbankcomputing.co.uk/software/qscintilla/

%define libname lib%{oname}-%{suff}

BuildRequires(pre): rpm-build-ubt python-module-sip-devel
%define sipver2 %(rpm -q --qf '%%{VERSION}' python-module-sip)
BuildRequires: gcc-c++ libqt4-devel
%if_with qt3
BuildRequires: libqt3-devel python-module-qt-devel
%endif
BuildRequires: python-module-PyQt4-devel
BuildRequires: python-module-sip-devel
%if_with python3
BuildRequires(pre): rpm-build-python3 python3-module-sip-devel
%define sipver3 %(rpm -q --qf '%%{VERSION}' python3-module-sip)
BuildRequires: python3-devel python3-module-sip-devel
BuildPreReq: python3-module-PyQt4-devel
%endif
BuildRequires: chrpath qt5-base-devel python-module-PyQt5-devel
%if_with python3qt5
BuildRequires: python3-module-PyQt5-devel
%endif

%description
Qscintilla is a free source code editing component. It comes with complete
source code and a license that permits use in any free project or commercial
product. As well as features found in standard text editing components,
Scintilla includes features especially useful when editing and debugging
source code. These include support for syntax styling, error indicators, code
completion and call tips. The selection margin can contain markers like those
used in debuggers to indicate breakpoints and the current line. Styling
choices are more open than with many editors, allowing the use of proportional
fonts, bold and italics, multiple foreground and background colours and
multiple fonts.

%if_with qt3
%package -n %libname-qt3
Summary: QScintilla is a port to Qt of Neil Hodgson's Scintilla C++ editor class.
Group: Development/KDE and QT
Conflicts: libqscintilla
Provides: lib%oname-qt3 = %version-%release
Obsoletes: lib%oname-qt3
Obsoletes: lib%oname-5-qt3
Obsoletes: lib%oname-qt3-compat

%description -n %libname-qt3
Qscintilla is a free source code editing component. It comes with complete
source code and a license that permits use in any free project or commercial
product. As well as features found in standard text editing components,
Scintilla includes features especially useful when editing and debugging
source code. These include support for syntax styling, error indicators, code
completion and call tips. The selection margin can contain markers like those
used in debuggers to indicate breakpoints and the current line. Styling
choices are more open than with many editors, allowing the use of proportional
fonts, bold and italics, multiple foreground and background colours and
multiple fonts.
%endif

%package -n %libname-qt4
Summary: QScintilla is a port to Qt of Neil Hodgson's Scintilla C++ editor class.
Group: Development/KDE and QT
Provides: lib%oname-qt4 = %version-%release
Obsoletes: lib%oname-qt4
Obsoletes: lib%oname-5-qt4
Obsoletes: lib%oname-qt4-compat
Conflicts: lib%oname-11-qt4
Obsoletes: lib%oname-11-qt4
Conflicts: lib%oname-12-qt4
Obsoletes: lib%oname-12-qt4

%description -n %libname-qt4
Qscintilla is a free source code editing component. It comes with complete
source code and a license that permits use in any free project or commercial
product. As well as features found in standard text editing components,
Scintilla includes features especially useful when editing and debugging
source code. These include support for syntax styling, error indicators, code
completion and call tips. The selection margin can contain markers like those
used in debuggers to indicate breakpoints and the current line. Styling
choices are more open than with many editors, allowing the use of proportional
fonts, bold and italics, multiple foreground and background colours and
multiple fonts.

%package -n %libname-qt5
Summary: QScintilla is a port to Qt5 of Neil Hodgson's Scintilla C++ editor class.
Group: Development/KDE and QT
Provides: lib%oname-qt5 = %version-%release
Conflicts: lib%oname-11-qt5
Obsoletes: lib%oname-11-qt5
Conflicts: lib%oname-12-qt5
Obsoletes: lib%oname-12-qt5

%description -n %libname-qt5
Qscintilla is a free source code editing component. It comes with complete
source code and a license that permits use in any free project or commercial
product. As well as features found in standard text editing components,
Scintilla includes features especially useful when editing and debugging
source code. These include support for syntax styling, error indicators, code
completion and call tips. The selection margin can contain markers like those
used in debuggers to indicate breakpoints and the current line. Styling
choices are more open than with many editors, allowing the use of proportional
fonts, bold and italics, multiple foreground and background colours and
multiple fonts.

%if_with qt3
%package -n lib%oname-qt3-devel
Requires: %libname-qt3 = %version-%release
Requires: libqt3-devel
Summary: Header files for %oname
Group: Development/KDE and QT

%description -n lib%oname-qt3-devel
Header files for %oname
%endif

%package -n lib%oname-qt4-devel
Requires: %libname-qt4 = %version-%release
Requires: libqt4-devel
Summary: Header files for %oname
Group: Development/KDE and QT

%description -n lib%oname-qt4-devel
Header files for %oname

%package -n lib%oname-qt5-devel
Requires: %libname-qt5 = %version-%release
Requires: qt5-base-devel
Summary: Header files for %oname-qt5
Group: Development/KDE and QT

%description -n lib%oname-qt5-devel
Header files for %oname-qt5

%if_with qt3
%package -n lib%oname-qt3-designer
Requires: %libname-qt3 = %version-%release
Summary: QScintilla designer plugin
Group: Development/KDE and QT

%description -n lib%oname-qt3-designer
QScintillla designer plugin.
%endif

%package -n lib%oname-qt4-designer
Requires: %libname-qt4 = %version-%release
Summary: QScintilla designer plugin
Group: Development/KDE and QT

%description -n lib%oname-qt4-designer
QScintillla designer plugin.

%if_with python
%package -n python-module-%oname-qt4
Requires: %libname-qt4 = %version-%release
Summary: Python bindings for %oname
Group: Development/KDE and QT
Provides: lib%oname-qt4-python = %version-%release
Obsoletes: lib%oname-qt4-python
Requires: python-module-sip = %sipver2
%py_provides PyQt4.Qsci

%description -n python-module-%oname-qt4
Python bindings for %oname

%package -n python-module-%oname-qt4-devel
Requires: python-module-%oname-qt4 = %version-%release
Summary: Python bindings for %oname
Group: Development/KDE and QT
BuildArch: noarch
Provides: lib%oname-qt4-python-devel = %version-%release
Obsoletes: lib%oname-qt4-python-devel

%description -n python-module-%oname-qt4-devel
Devel files for Python bindings for %oname

%package -n python-module-%oname-qt5
Requires: %libname-qt5 = %version-%release
Summary: Python bindings for %oname-qt5
Group: Development/KDE and QT
Provides: lib%oname-qt5-python = %version-%release
Requires: python-module-sip = %sipver2
%py_provides PyQt5.Qsci

%description -n python-module-%oname-qt5
Python bindings for %oname-qt5

%package -n python-module-%oname-qt5-devel
Requires: python-module-%oname-qt5 = %version-%release
Summary: Python bindings for %oname-qt5
Group: Development/KDE and QT
BuildArch: noarch
Provides: lib%oname-qt5-python-devel = %version-%release

%description -n python-module-%oname-qt5-devel
Devel files for Python bindings for %oname

%if_with python3
%package -n python3-module-%oname-qt4
Requires: %libname-qt4 = %version-%release
Summary: Python 3 bindings for %oname
Group: Development/KDE and QT
Requires: python3-module-sip = %sipver3
%py3_provides PyQt4.Qsci

%description -n python3-module-%oname-qt4
Python bindings for %oname

%package -n python3-module-%oname-qt4-devel
Requires: python3-module-%oname-qt4 = %version-%release
Summary: Python 3 bindings for %oname
Group: Development/KDE and QT
BuildArch: noarch

%description -n python3-module-%oname-qt4-devel
Devel files for Python bindings for %oname

%if_with python3qt5
%package -n python3-module-%oname-qt5
Requires: %libname-qt5 = %version-%release
Summary: Python 3 bindings for %oname (Qt5)
Group: Development/KDE and QT
Requires: python3-module-sip = %sipver3
%py3_provides PyQt5.Qsci

%description -n python3-module-%oname-qt5
Python bindings for %oname

%package -n python3-module-%oname-qt5-devel
Requires: python3-module-%oname-qt5 = %version-%release
Summary: Python 3 bindings for %oname (Qt5)
Group: Development/KDE and QT
BuildArch: noarch

%description -n python3-module-%oname-qt5-devel
Devel files for Python bindings for %oname
%endif
%endif

%if_with python-qt3
%package -n python-module-%oname-qt3
Requires: %libname-qt3 = %version-%release
Summary: Python bindings for %oname
Group: Development/KDE and QT
Provides: lib%oname-qt3-python = %version-%release
Obsoletes: lib%oname-qt3-python

%description -n python-module-%oname-qt3
Python bindings for %oname

%package -n python-module-%oname-qt3-devel
Requires: python-module-%oname-qt3 = %version-%release
Summary: Python bindings for %oname
Group: Development/KDE and QT
BuildArch: noarch
Provides: lib%oname-qt3-python-devel = %version-%release
Obsoletes: lib%oname-qt3-python-devel

%description -n python-module-%oname-qt3-devel
Devel files for Python bindings for %oname
%endif
%endif

%package -n %libname-doc
Summary: Documentation for %oname
Group: Development/KDE and QT
BuildArch: noarch

%description -n %libname-doc
Documentation for %oname

%prep
%setup -n QScintilla-gpl-%version
%patch1 -p2
ln -s Qt4Qt5 Qt4
cp -fR Qt4Qt5 Qt5
cp -a Python Python-qt4
sed -i \
-e "s| at Q5CFLAGS at ||g" \
-e "s|-lQt5PrintSupport -lQt5Widgets||g" \
-e "s| at QSCINTILLALIB at |qscintilla2_qt4|g" \
Python-qt4/configure.py
cp -a Python Python-qt5
Q5CFLAGS="$(pkg-config --cflags Qt5Widgets)"
Q5CFLAGS="$Q5CFLAGS $(pkg-config --cflags Qt5PrintSupport)"
sed -i \
-e "s| at Q5CFLAGS at |$Q5CFLAGS|g" \
-e "s| at QSCINTILLALIB at |qscintilla2_qt5|g" \
Python-qt5/configure.py
%if_with python3
cp -fR Python-qt4 ../python3
%endif
%if_with python3qt5
cp -fR Python-qt5 ../python3qt5
%endif
%if_with python-qt3
mv Python Python-qt3
%endif

%build

forDebug() {
# around of bug in /usr/lib/rpm/debugedit
sed -i 's|\(QTDIR)\)/|\1|g' Makefile
}

# Qt3

%if_with qt3
pushd Qt3
qmake-qt3 QMAKE_CFLAGS_RELEASE="%optflags" \
QMAKE_CXXFLAGS_RELEASE="%optflags" qscintilla.pro
forDebug
%make_build
popd

# Designer for Qt3

pushd designer-Qt3
qmake-qt3 QMAKE_CFLAGS_RELEASE="%optflags" \
QMAKE_CXXFLAGS_RELEASE="%optflags" designer.pro
forDebug
%make_build
popd
%endif

# Qt4

pushd Qt4Qt5
qmake-qt4 QMAKE_CFLAGS_RELEASE="%optflags" \
QMAKE_CXXFLAGS_RELEASE="%optflags" qscintilla.pro
forDebug
%make_build
popd

# Qt5

pushd Qt5
qmake-qt5 QMAKE_CFLAGS_RELEASE="%optflags" \
QMAKE_CXXFLAGS_RELEASE="%optflags" qscintilla.pro
forDebug
%make_build
popd

# Designer for Qt4

pushd designer-Qt4Qt5
qmake-qt4 QMAKE_CFLAGS_RELEASE="%optflags" \
QMAKE_CXXFLAGS_RELEASE="%optflags" designer.pro
forDebug
%make_build
popd

%if_with python
# Python bindings
%if_with python-qt3
pushd Python-qt3
python configure.py -p 3 -n ../Qt3 -o ../Qt3
STR=`cat Makefile | grep "LFLAGS ="`
# add rpath for use qt3 %oname lib
sed -i "s:$STR:$STR,-rpath,%_qt3dir/lib:g" Makefile
%make
popd
%endif

cp -fR Qt4Qt5 ../
cp -fR Qt5 ../Qt5

# Python bindings for PyQt4

pushd Python-qt4
python configure.py --debug -n ../Qt4Qt5 -o ../Qt4Qt5 \
--qmake=%_qt4dir/bin/qmake
%make_build
popd

# Python bindings for PyQt5

pushd Python-qt5
python configure.py --debug -n ../Qt5 -o ../Qt5 \
--qmake=%_qt5_bindir/qmake \
--pyqt=PyQt5
%make_build
popd

%if_with python3
OLDPATH=$PATH
export PATH=$PATH:%_qt4dir/bin
pushd ../python3
python3 configure.py \
--apidir=%_datadir/qt4/qsci3 \
--sip=%_bindir/sip3 \
--pyqt-sipdir=%_datadir/sip3/PyQt4 \
--debug -n ../Qt4Qt5 -o ../Qt4Qt5
sed -i \
's|-lpython%_python3_version|-lpython%{_python3_version}m|g' \
Makefile
%make_build
popd
export PATH=$OLDPATH
%endif

%if_with python3qt5
OLDPATH=$PATH
export PATH=$PATH:%_qt5_bindir
pushd ../python3qt5
python3 configure.py --debug -n ../Qt5 -o ../Qt5 \
--apidir=%_datadir/qt5/qsci3 \
--qmake=%_qt5_bindir/qmake \
--sip=%_bindir/sip3 \
--pyqt-sipdir=%_datadir/sip3/PyQt5 \
--pyqt=PyQt5
sed -i \
's|-lpython%_python3_version|-lpython%{_python3_version}m|g' \
Makefile
%make_build
popd
export PATH=$OLDPATH
%endif

%endif

%install
%if_with python
# Python bindings
%if_with python-qt3
pushd Python-qt3
%makeinstall_std
mv %buildroot%python_sitelibdir/PyQt4/qsci.so %buildroot%python_sitelibdir
popd
%endif

# Python bindings for PyQt4

%if_with python3
pushd ../python3
mkdir -p %buildroot%python3_sitelibdir/PyQt4
%makeinstall_std INSTALL_ROOT=%buildroot
popd
%endif
pushd Python-qt4
%makeinstall_std INSTALL_ROOT=%buildroot
popd
# Python bindings for PyQt5
pushd Python-qt5
%makeinstall_std INSTALL_ROOT=%buildroot
popd
%if_with python3qt5
pushd ../python3qt5
mkdir -p %buildroot%python3_sitelibdir/PyQt5
%makeinstall_std INSTALL_ROOT=%buildroot
popd
%endif
%endif

mkdir -p %buildroot%python_sitelibdir/PyQt4
mkdir -p %buildroot%python_sitelibdir/PyQt5
mkdir -p %buildroot%python3_sitelibdir/PyQt5
mkdir -p %buildroot%python3_sitelibdir/PyQt4
mkdir -p %buildroot%_includedir/qt4/Qsci
mkdir -p %buildroot%_includedir/qt5/Qsci
mkdir -p %buildroot%_libdir/{qt4,qt5}/{lib,translations,plugins/designer}
mkdir -p %buildroot%_qt5_libdatadir
mkdir -p %buildroot%_qt5_translationdir
mkdir -p %buildroot%_datadir/sip/qsci
mkdir -p %buildroot%_datadir/{qt4,qt5}/qsci/api/python
mkdir -p %buildroot%_datadir/qt4/qsci3/api/python
%if_with qt3
mkdir -p %buildroot%_qt3dir/include/Qsci
mkdir -p %buildroot%_libdir/qt3/{lib,translations,plugins/designer}
mkdir -p %buildroot%_datadir/qt3/qsci/api/python
mkdir -p %buildroot%_datadir/qt3/qsci3/api/python
%endif

# Qt3 library

%if_with qt3
install Qt3/lib%oname.so.*.*.* %buildroot%_qt3dir/lib
install Qt3/*.qm %buildroot%_qt3dir/translations
pushd %buildroot%_qt3dir/lib
ln -s lib%oname.so.*.*.* `ls lib%oname.so.*.*.* | sed s/\.[0-9]$//`
ln -s lib%oname.so.*.*.* `ls lib%oname.so.*.*.* | sed s/\.[0-9]\.[0-9]$//`
ln -s lib%oname.so.*.*.* `ls lib%oname.so.*.*.* | sed s/\.[0-9]\.[0-9]\.[0-9]$//`
popd
%endif

# Qt4 library

install Qt4Qt5/lib%{oname}_qt4.so.*.*.* %buildroot%_libdir
install Qt4Qt5/*.qm %buildroot%_qt4dir/translations
pushd %buildroot%_libdir
ln -s lib%{oname}_qt4.so.*.*.* `ls lib%{oname}_qt4.so.*.*.* | sed s/\.[0-9]*$//`
ln -s lib%{oname}_qt4.so.*.*.* `ls lib%{oname}_qt4.so.*.*.* | sed s/\.[0-9]*\.[0-9]*$//`
ln -s lib%{oname}_qt4.so.*.*.* `ls lib%{oname}_qt4.so.*.*.* | sed s/\.[0-9]*\.[0-9]*\.[0-9]*$//`
# NOTE: add a symlink for compatibility with older branches
ln -s lib%{oname}_qt4.so.*.*.* lib%{oname}.so
popd
pushd %buildroot%_qt4dir/lib
for libname in ../../lib%{oname}_qt4.*; do
ln -s $libname ./
done
popd

# Qt5 library

install Qt5/lib%{oname}_qt5.so.*.*.* %buildroot%_libdir
install Qt5/*.qm %buildroot%_qt5_translationdir
pushd %buildroot%_libdir
ln -s lib%{oname}_qt5.so.*.*.* `ls lib%{oname}_qt5.so.*.*.* | sed s/\.[0-9]*$//`
ln -s lib%{oname}_qt5.so.*.*.* `ls lib%{oname}_qt5.so.*.*.* | sed s/\.[0-9]*\.[0-9]*$//`
ln -s lib%{oname}_qt5.so.*.*.* `ls lib%{oname}_qt5.so.*.*.* | sed s/\.[0-9]*\.[0-9]*\.[0-9]*$//`
popd
pushd %buildroot%_qt5_libdatadir
for libname in ../../../%_lib/lib%{oname}_qt5.*; do
ln -s $libname ./
done
popd

# Qt3 designer

%if_with qt3
install designer-Qt3/libqscintillaplugin.so %buildroot%_qt3dir/plugins/designer
%endif

# Qt4 designer

install designer-Qt4Qt5/libqscintillaplugin.so %buildroot%_qt4dir/plugins/designer

# Qt3 headers

%if_with qt3
install -m644 Qt3/*.h %buildroot%_qt3dir/include
install -m644 Qt3/Qsci/*.h %buildroot%_qt3dir/include/Qsci
%endif

# Qt4 headers

install -m644 Qt4Qt5/*.h %buildroot%_includedir/qt4
install -m644 Qt4Qt5/Qsci/*.h %buildroot%_includedir/qt4/Qsci

# Qt5 headers

install -m644 Qt5/*.h %buildroot%_qt5_headerdir/
install -m644 Qt5/Qsci/*.h %buildroot%_qt5_headerdir/Qsci/

# docs

mkdir -p %buildroot%_docdir/%libname-%version
cp -a doc/Scintilla %buildroot%_docdir/%libname-%version
#cp -a doc/html-Qt3 %buildroot%_docdir/%libname-%version
cp -a doc/html-Qt4Qt5 %buildroot%_docdir/%libname-%version
cp ChangeLog NEWS README %buildroot%_docdir/%libname-%version

# Quick fix RPATH

chrpath -d %buildroot%python_sitelibdir/PyQt4/Qsci.so

%if_with qt3
%files -n %libname-qt3
%_qt3dir/lib/*.so.*
%_qt3dir/translations/*
%endif

%files -n %libname-qt4
%_qt4dir/lib/*.so.*
%_libdir/*_qt4.so.*
%_qt4dir/translations/*

%files -n %libname-qt5
%_qt5_libdatadir/*.so.*
%_libdir/*_qt5.so.*
%_qt5_translationdir/*

%if_with qt3
%files -n lib%oname-qt3-devel
%_qt3dir/include/*.h
%_qt3dir/include/Qsci
%_qt3dir/lib/*.so
%endif

%files -n lib%oname-qt4-devel
%_includedir/qt4/*.h
%_includedir/qt4/Qsci
%_qt4dir/lib/*.so
%_libdir/*_qt4.so
%_libdir/lib%{oname}.so

%files -n lib%oname-qt5-devel
%_includedir/qt5/*.h
%_includedir/qt5/Qsci
%_qt5_libdatadir/*.so
%_libdir/*_qt5.so

%if_with qt3
%files -n lib%oname-qt3-designer
%_qt3dir/plugins/designer/*.so
%endif

%files -n lib%oname-qt4-designer
%_qt4dir/plugins/designer/*.so

%if_with python
%if_with python-qt3
%files -n python-module-%oname-qt3
%python_sitelibdir/qsci.so
%_qt3dir/qsci

%files -n python-module-%oname-qt3-devel
%_datadir/sip/qsci
%endif

%files -n python-module-%oname-qt4
%python_sitelibdir/PyQt4/Qsci.so
%python_sitelibdir/PyQt4/Qsci.pyi
%_datadir/qt4/qsci/api/python/*.api

%files -n python-module-%oname-qt4-devel
%_datadir/sip/PyQt4/Qsci

%files -n python-module-%oname-qt5
%python_sitelibdir/PyQt5/Qsci.so
%python_sitelibdir/PyQt5/Qsci.pyi
%_datadir/qt5/qsci/api/python/*.api

%files -n python-module-%oname-qt5-devel
%_datadir/sip/PyQt5/Qsci

%if_with python3
%files -n python3-module-%oname-qt4
%python3_sitelibdir/PyQt4/Qsci.so
%python3_sitelibdir/PyQt4/Qsci.pyi
%_datadir/qt4/qsci3/api/python/*.api

%files -n python3-module-%oname-qt4-devel
%_datadir/sip3/PyQt4/Qsci

%if_with python3qt5
%files -n python3-module-%oname-qt5
%python3_sitelibdir/PyQt5/Qsci.so
%python3_sitelibdir/PyQt5/Qsci.pyi
%_datadir/qt5/qsci3/api/python/*.api

%files -n python3-module-%oname-qt5-devel
%_datadir/sip3/PyQt5/Qsci
%endif
%endif

%endif

%files -n %libname-doc
%_docdir/%libname-%version

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin