From ba6c54c5513c0092d274b5b238895c6535045b63 Mon Sep 17 00:00:00 2001 From: Vitaly Zaitsev Date: Mon, 24 Sep 2018 20:12:40 +0200 Subject: [PATCH] - Switched to Qt5 to fix major issues with HiDPI displays. - Moved to latest snapshot to resolve issues with latest GCC compiler versions. - Major SPEC cleanup. Signed-off-by: Vitaly Zaitsev --- .gitignore | 1 + goldendict.spec | 73 ++++++++++++++++++++++++++++++------------------- sources | 3 +- 3 files changed, 47 insertions(+), 30 deletions(-) diff --git a/.gitignore b/.gitignore index a7d2a77..5886991 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ goldendict-415f35e.tar.gz /goldendict-3bd078debb7ae506e91e5d47f88f34ab847167c3.tar.gz /goldendict-eaa8e8f270bee84fbb1f73702d0b65c3f9f89efa.tar.gz /goldendict-system-qtsingleapp.patch +/goldendict-04d9dc43f67b102c7727228326c05eb82d87e4f2.tar.gz diff --git a/goldendict.spec b/goldendict.spec index d109ad4..7768ebb 100644 --- a/goldendict.spec +++ b/goldendict.spec @@ -1,28 +1,39 @@ %global owner goldendict -%global commit eaa8e8f270bee84fbb1f73702d0b65c3f9f89efa +%global commit 04d9dc43f67b102c7727228326c05eb82d87e4f2 Name: goldendict Version: 1.5 -Release: 0.16.RC2%{?dist} +Release: 0.17.RC2%{?dist} Summary: A feature-rich dictionary lookup program Group: Applications/System License: GPLv3+ URL: http://goldendict.org Source0: https://github.com/%{owner}/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz -Patch0: goldendict-system-qtsingleapp.patch -BuildRequires: qt-devel +BuildRequires: cmake(Qt5LinguistTools) +BuildRequires: cmake(Qt5XmlPatterns) +BuildRequires: cmake(Qt5Multimedia) +BuildRequires: cmake(Qt5X11Extras) +BuildRequires: cmake(Qt5Network) +BuildRequires: cmake(Qt5WebKit) +BuildRequires: cmake(Qt5Core) +BuildRequires: cmake(Qt5DBus) +BuildRequires: cmake(Qt5Help) +BuildRequires: cmake(Qt5Gui) +BuildRequires: cmake(Qt5Svg) +BuildRequires: cmake(Qt5Xml) + BuildRequires: libXtst-devel BuildRequires: hunspell-devel BuildRequires: libvorbis-devel BuildRequires: desktop-file-utils BuildRequires: phonon-devel -BuildRequires: qt-webkit-devel -BuildRequires: bzip2-devel -BuildRequires: lzo-devel -BuildRequires: libtiff-devel -BuildRequires: eb-devel -BuildRequires: qtsingleapplication-devel +BuildRequires: bzip2-devel +BuildRequires: lzo-devel +BuildRequires: libtiff-devel +BuildRequires: eb-devel +BuildRequires: qtsingleapplication-qt5-devel +BuildRequires: libappstream-glib %description Goldendict is a feature-rich dictionary lookup program. @@ -40,17 +51,17 @@ BuildArch: noarch Contain doc files of %{name}. %prep -%setup -q -n %{name}-%{commit} -%patch0 -p0 +%autosetup -n %{name}-%{commit} -p1 rm -r qtsingleapplication +sed -e '/qtsingleapplication.pri/d' -i %{name}.pro %build -%qmake_qt4 PREFIX=%{_prefix} DISABLE_INTERNAL_PLAYER=1 -make %{?_smp_mflags} +%qmake_qt5 PREFIX=%{_prefix} CONFIG+=qtsingleapplication CONFIG+=no_ffmpeg_player +%make_build %install -make install INSTALL_ROOT=%{buildroot} INSTALL="install -p" -rm -rf %{buildroot}/%{_datadir}/app-install +%make_install INSTALL_ROOT=%{buildroot} +rm -rf %{buildroot}%{_datadir}/app-install desktop-file-install %{buildroot}%{_datadir}/applications/%{name}.desktop # Register as an application to be visible in the software center @@ -60,8 +71,8 @@ desktop-file-install %{buildroot}%{_datadir}/applications/%{name}.desktop # # See http://www.freedesktop.org/software/appstream/docs/ for more details. # -mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata -cat > $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml < %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml <