Dominique Leuenberger 2023-06-07 21:07:19 +00:00 committed by Git OBS Bridge
commit c5431442b7
2 changed files with 41 additions and 14 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue Jun 6 15:03:42 UTC 2023 - slb <shenlebantongying@gmail.com>
- Drop the version.txt patch
-------------------------------------------------------------------
Mon Jun 5 12:31:28 UTC 2023 - shenlebantongying <shenlebantongying@gmail.com>
- Build against Qt5 to avoid various regressions
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Jun 4 00:21:23 UTC 2023 - shenlebantongying <shenlebantongying@gmail.com> Sun Jun 4 00:21:23 UTC 2023 - shenlebantongying <shenlebantongying@gmail.com>

View File

@ -16,6 +16,7 @@
# #
%define qt_version 5
Name: goldendict-ng Name: goldendict-ng
Version: 23.05.03 Version: 23.05.03
Release: 0 Release: 0
@ -23,7 +24,7 @@ Summary: Dictionary Lookup Program
License: GPL-3.0-or-later License: GPL-3.0-or-later
Group: Productivity/Office/Dictionary Group: Productivity/Office/Dictionary
URL: https://xiaoyifang.github.io/goldendict-ng/ URL: https://xiaoyifang.github.io/goldendict-ng/
Source0: goldendict-ng-%{version}.tar.xz Source0: %{name}-%{version}.tar.xz
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: git BuildRequires: git
@ -38,29 +39,36 @@ BuildRequires: pkgconfig(vorbis)
BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xapian-core) BuildRequires: pkgconfig(xapian-core)
BuildRequires: pkgconfig(xtst) BuildRequires: pkgconfig(xtst)
# /Section Qt 6 # /Section Qt
BuildRequires: pkgconfig(Qt6Concurrent) BuildRequires: pkgconfig(Qt%{qt_version}Concurrent)
BuildRequires: pkgconfig(Qt6Core) BuildRequires: pkgconfig(Qt%{qt_version}Core)
BuildRequires: pkgconfig(Qt6Core5Compat) BuildRequires: pkgconfig(Qt%{qt_version}Gui)
BuildRequires: pkgconfig(Qt6Gui) BuildRequires: pkgconfig(Qt%{qt_version}Multimedia)
BuildRequires: pkgconfig(Qt6Multimedia) BuildRequires: pkgconfig(Qt%{qt_version}Svg)
BuildRequires: pkgconfig(Qt6Svg) BuildRequires: pkgconfig(Qt%{qt_version}TextToSpeech)
BuildRequires: pkgconfig(Qt6TextToSpeech) BuildRequires: pkgconfig(Qt%{qt_version}WebEngineWidgets)
BuildRequires: pkgconfig(Qt6WebEngineWidgets) BuildRequires: pkgconfig(Qt%{qt_version}Widgets)
BuildRequires: pkgconfig(Qt6Widgets) BuildRequires: pkgconfig(Qt%{qt_version}Xml)
BuildRequires: pkgconfig(Qt6Xml) %if %{qt_version} >= 6
BuildRequires: qt6-tools-linguist BuildRequires: qt6-tools-linguist
BuildRequires: pkgconfig(Qt6Core5Compat)
%else
BuildRequires: libqt5-linguist
BuildRequires: pkgconfig(Qt5X11Extras)
%endif
# /Section compresion libraries # /Section compresion libraries
BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(liblzma)
BuildRequires: pkgconfig(bzip2)
BuildRequires: pkgconfig(libzip) BuildRequires: pkgconfig(libzip)
BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(libzstd)
BuildRequires: pkgconfig(lzo2) BuildRequires: pkgconfig(lzo2)
BuildRequires: pkgconfig(bzip2)
BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(zlib)
# /Section ffmpeg 6 # /Section ffmpeg 6
BuildRequires: pkgconfig(libavformat) BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavutil) BuildRequires: pkgconfig(libavutil)
%if %{qt_version} >= 6
Requires: qt6-multimedia Requires: qt6-multimedia
%endif
Provides: goldendict = %{version} Provides: goldendict = %{version}
Obsoletes: goldendict < 1.5.1 Obsoletes: goldendict < 1.5.1
Obsoletes: goldendict-lang < 1.5.1 Obsoletes: goldendict-lang < 1.5.1
@ -71,14 +79,23 @@ The Next Generation GoldenDict: A feature-rich dictionaries lookup program, supp
%lang_package %lang_package
%prep %prep
%autosetup -p1 %autosetup
%build %build
%if %{qt_version} >= 6
%qmake6 PREFIX=%{_prefix} "CONFIG+=use_xapian" "CONFIG+=zim_support" "CONFIG+=chinese_conversion_support" goldendict.pro %qmake6 PREFIX=%{_prefix} "CONFIG+=use_xapian" "CONFIG+=zim_support" "CONFIG+=chinese_conversion_support" goldendict.pro
%qmake6_build %qmake6_build
%else
%qmake5 PREFIX=%{_prefix} "CONFIG+=use_xapian" "CONFIG+=zim_support" "CONFIG+=chinese_conversion_support" goldendict.pro
%make_jobs
%endif
%install %install
%if %{qt_version} >= 6
%qmake6_install %qmake6_install
%else
%qmake5_install
%endif
%suse_update_desktop_file -r org.goldendict.GoldenDict Office Dictionary %suse_update_desktop_file -r org.goldendict.GoldenDict Office Dictionary
%files %files