From cabe04b8794460055c5193ee8d57da0a17ec7eadfaa37ef6c88d840d86a5675b Mon Sep 17 00:00:00 2001 From: OBS User mrdocs Date: Sat, 15 Aug 2015 05:55:28 +0000 Subject: [PATCH] Accepting request 323254 from home:badshah400:branches:Publishing Build against qt4 for openSUSE:42 (old poppler in openSUSE:42 does not support qt5 bindings). OBS-URL: https://build.opensuse.org/request/show/323254 OBS-URL: https://build.opensuse.org/package/show/Publishing/texmaker?expand=0&rev=71 --- texmaker.changes | 6 ++++++ texmaker.spec | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/texmaker.changes b/texmaker.changes index a087255..3cf02cb 100644 --- a/texmaker.changes +++ b/texmaker.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Aug 15 04:46:52 UTC 2015 - badshah400@gmail.com + +- Build against qt4 for openSUSE:42 (old poppler in openSUSE:42 + does not support qt5 bindings). + ------------------------------------------------------------------- Wed Apr 29 04:59:16 UTC 2015 - crrodriguez@opensuse.org diff --git a/texmaker.spec b/texmaker.spec index 621c5d6..963555a 100644 --- a/texmaker.spec +++ b/texmaker.spec @@ -27,8 +27,14 @@ Source: http://www.xm1math.net/texmaker/texmaker-%{version}.tar.bz2 # PATCH-FIX-UPSTREAM texmaker-correct-doc-location.patch badshah400@gmail.com -- Handle doc files in the spec file rather than placing them in %%{_datadir} during compilation Patch1: texmaker-correct-doc-location.patch BuildRequires: fdupes -BuildRequires: libpoppler-qt5-devel BuildRequires: update-desktop-files +%if 0%{?suse_version} == 1315 +BuildRequires: libQtWebKit-devel +BuildRequires: libpoppler-qt4-devel >= 0.16 +BuildRequires: libqt4-devel >= 4.6.1 +Requires: libQtWebKit4 >= 4.6.1 +%else +BuildRequires: libpoppler-qt5-devel BuildRequires: pkgconfig(Qt5Concurrent) BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Gui) @@ -38,6 +44,7 @@ BuildRequires: pkgconfig(Qt5Script) BuildRequires: pkgconfig(Qt5WebKit) BuildRequires: pkgconfig(Qt5WebKitWidgets) BuildRequires: pkgconfig(Qt5Xml) +%endif Requires: hunspell Requires: texlive-latex BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -53,13 +60,22 @@ under the GPL license . %patch1 -p1 %build +%if 0%{?suse_version} == 1315 +QTDIR=%{_libdir}/qt4 +%else QTDIR=%{_libdir}/qt5 +%endif + PATH=$QTDIR/bin:$PATH LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH DYLD_LIBRARY_PATH=$QTDIR/lib:$DYLD_LIBRARY_PATH export QTDIR PATH LD_LIBRARY_PATH DYLD_LIBRARY_PATH PREFIX=%{buildroot}%{_prefix} +%if 0%{?suse_version} == 1315 +qmake QMAKE_CXXFLAGS="%optflags -fvisibility=hidden -fvisibility-inlines-hidden" -unix texmaker.pro +%else qmake-qt5 QMAKE_CXXFLAGS="%optflags -fvisibility=hidden -fvisibility-inlines-hidden" -unix texmaker.pro +%endif make %{?_smp_mflags} INSTALL_ROOT=%{buildroot} %install