From a7aed14e1ff359c1ac63cf5e5a21874577d877492b8091252befca8db423060a Mon Sep 17 00:00:00 2001 From: Atri Bhattacharya Date: Tue, 6 Jun 2023 09:43:03 +0000 Subject: [PATCH 1/2] Accepting request 1090975 from home:slbtongying:branches:Education I am really sorry for submitting requests consecutively on a single package. There is a major regression due to Qt6. Although it is addressed, I think more testing is needed before shipping the qt6 version. * https://build.opensuse.org/request/show/1087963?notification_id=41012894 * https://bugzilla.suse.com/show_bug.cgi?id=1211986 * And the sudden boom of alternative packages on OBS https://build.opensuse.org/search?search_text=goldendict OBS-URL: https://build.opensuse.org/request/show/1090975 OBS-URL: https://build.opensuse.org/package/show/Education/goldendict-ng?expand=0&rev=7 --- ...ct-ng-replace-version-txt-generation.patch | 19 ++++++++ goldendict-ng.changes | 5 ++ goldendict-ng.spec | 46 +++++++++++++------ 3 files changed, 56 insertions(+), 14 deletions(-) create mode 100644 goldendict-ng-replace-version-txt-generation.patch diff --git a/goldendict-ng-replace-version-txt-generation.patch b/goldendict-ng-replace-version-txt-generation.patch new file mode 100644 index 0000000..e37dbe5 --- /dev/null +++ b/goldendict-ng-replace-version-txt-generation.patch @@ -0,0 +1,19 @@ +--- ./goldendict.pro 2023-06-05 07:46:03.433741407 -0400 ++++ ./goldendict.pro.orgi 2023-06-05 08:14:30.474500795 -0400 +@@ -7,15 +7,9 @@ + # rebuilt; and doing it here is required too since any other way the RCC + # compiler would complain if version.txt wouldn't exist (fresh checkouts). + +-system(git describe --tags --always --dirty): hasGit=1 +- +-!isEmpty(hasGit){ +- GIT_HASH=$$system(git rev-parse --short=8 HEAD ) +-} +- + !exists( version.txt ) { + message( "generate version.txt...." ) +- system(echo $${VERSION}.$${GIT_HASH} on $${_DATE_} > version.txt) ++ system(echo "openSUSE" > version.txt) + } + + diff --git a/goldendict-ng.changes b/goldendict-ng.changes index d8c5ed1..e9f85e9 100644 --- a/goldendict-ng.changes +++ b/goldendict-ng.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 5 12:31:28 UTC 2023 - shenlebantongying + +- Build against Qt5 to avoid various regressions + ------------------------------------------------------------------- Sun Jun 4 00:21:23 UTC 2023 - shenlebantongying diff --git a/goldendict-ng.spec b/goldendict-ng.spec index 1ed24ae..bdf4abe 100644 --- a/goldendict-ng.spec +++ b/goldendict-ng.spec @@ -16,6 +16,7 @@ # +%define qt_version 5 Name: goldendict-ng Version: 23.05.03 Release: 0 @@ -23,7 +24,8 @@ Summary: Dictionary Lookup Program License: GPL-3.0-or-later Group: Productivity/Office/Dictionary URL: https://xiaoyifang.github.io/goldendict-ng/ -Source0: goldendict-ng-%{version}.tar.xz +Source0: %{name}-%{version}.tar.xz +Patch0: %{name}-replace-version-txt-generation.patch BuildRequires: desktop-file-utils BuildRequires: gcc-c++ BuildRequires: git @@ -38,29 +40,36 @@ BuildRequires: pkgconfig(vorbis) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xapian-core) BuildRequires: pkgconfig(xtst) -# /Section Qt 6 -BuildRequires: pkgconfig(Qt6Concurrent) -BuildRequires: pkgconfig(Qt6Core) -BuildRequires: pkgconfig(Qt6Core5Compat) -BuildRequires: pkgconfig(Qt6Gui) -BuildRequires: pkgconfig(Qt6Multimedia) -BuildRequires: pkgconfig(Qt6Svg) -BuildRequires: pkgconfig(Qt6TextToSpeech) -BuildRequires: pkgconfig(Qt6WebEngineWidgets) -BuildRequires: pkgconfig(Qt6Widgets) -BuildRequires: pkgconfig(Qt6Xml) +# /Section Qt +BuildRequires: pkgconfig(Qt%{qt_version}Concurrent) +BuildRequires: pkgconfig(Qt%{qt_version}Core) +BuildRequires: pkgconfig(Qt%{qt_version}Gui) +BuildRequires: pkgconfig(Qt%{qt_version}Multimedia) +BuildRequires: pkgconfig(Qt%{qt_version}Svg) +BuildRequires: pkgconfig(Qt%{qt_version}TextToSpeech) +BuildRequires: pkgconfig(Qt%{qt_version}WebEngineWidgets) +BuildRequires: pkgconfig(Qt%{qt_version}Widgets) +BuildRequires: pkgconfig(Qt%{qt_version}Xml) +%if %{qt_version} >= 6 BuildRequires: qt6-tools-linguist +BuildRequires: pkgconfig(Qt6Core5Compat) +%else +BuildRequires: libqt5-linguist +BuildRequires: pkgconfig(Qt5X11Extras) +%endif # /Section compresion libraries BuildRequires: pkgconfig(liblzma) +BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(libzip) BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(lzo2) -BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(zlib) # /Section ffmpeg 6 BuildRequires: pkgconfig(libavformat) BuildRequires: pkgconfig(libavutil) +%if %{qt_version} >= 6 Requires: qt6-multimedia +%endif Provides: goldendict = %{version} Obsoletes: goldendict < 1.5.1 Obsoletes: goldendict-lang < 1.5.1 @@ -71,14 +80,23 @@ The Next Generation GoldenDict: A feature-rich dictionaries lookup program, supp %lang_package %prep -%autosetup -p1 +%autosetup %build +%if %{qt_version} >= 6 %qmake6 PREFIX=%{_prefix} "CONFIG+=use_xapian" "CONFIG+=zim_support" "CONFIG+=chinese_conversion_support" goldendict.pro %qmake6_build +%else +%qmake5 PREFIX=%{_prefix} "CONFIG+=use_xapian" "CONFIG+=zim_support" "CONFIG+=chinese_conversion_support" goldendict.pro +%make_jobs +%endif %install +%if %{qt_version} >= 6 %qmake6_install +%else +%qmake5_install +%endif %suse_update_desktop_file -r org.goldendict.GoldenDict Office Dictionary %files From 6835ff342e86de51d42c96dff4a954e0b68b9514ac04cb4c1eb084ef6c2b2ade Mon Sep 17 00:00:00 2001 From: Atri Bhattacharya Date: Tue, 6 Jun 2023 16:08:14 +0000 Subject: [PATCH 2/2] Accepting request 1091111 from home:slbtongying:branches:Education - Drop the version.txt patch OBS-URL: https://build.opensuse.org/request/show/1091111 OBS-URL: https://build.opensuse.org/package/show/Education/goldendict-ng?expand=0&rev=8 --- ...ct-ng-replace-version-txt-generation.patch | 19 ------------------- goldendict-ng.changes | 5 +++++ goldendict-ng.spec | 1 - 3 files changed, 5 insertions(+), 20 deletions(-) delete mode 100644 goldendict-ng-replace-version-txt-generation.patch diff --git a/goldendict-ng-replace-version-txt-generation.patch b/goldendict-ng-replace-version-txt-generation.patch deleted file mode 100644 index e37dbe5..0000000 --- a/goldendict-ng-replace-version-txt-generation.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- ./goldendict.pro 2023-06-05 07:46:03.433741407 -0400 -+++ ./goldendict.pro.orgi 2023-06-05 08:14:30.474500795 -0400 -@@ -7,15 +7,9 @@ - # rebuilt; and doing it here is required too since any other way the RCC - # compiler would complain if version.txt wouldn't exist (fresh checkouts). - --system(git describe --tags --always --dirty): hasGit=1 -- --!isEmpty(hasGit){ -- GIT_HASH=$$system(git rev-parse --short=8 HEAD ) --} -- - !exists( version.txt ) { - message( "generate version.txt...." ) -- system(echo $${VERSION}.$${GIT_HASH} on $${_DATE_} > version.txt) -+ system(echo "openSUSE" > version.txt) - } - - diff --git a/goldendict-ng.changes b/goldendict-ng.changes index e9f85e9..9878738 100644 --- a/goldendict-ng.changes +++ b/goldendict-ng.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 6 15:03:42 UTC 2023 - slb + +- Drop the version.txt patch + ------------------------------------------------------------------- Mon Jun 5 12:31:28 UTC 2023 - shenlebantongying diff --git a/goldendict-ng.spec b/goldendict-ng.spec index bdf4abe..cc2e5ca 100644 --- a/goldendict-ng.spec +++ b/goldendict-ng.spec @@ -25,7 +25,6 @@ License: GPL-3.0-or-later Group: Productivity/Office/Dictionary URL: https://xiaoyifang.github.io/goldendict-ng/ Source0: %{name}-%{version}.tar.xz -Patch0: %{name}-replace-version-txt-generation.patch BuildRequires: desktop-file-utils BuildRequires: gcc-c++ BuildRequires: git