GNU bug report logs - #48909
[PATCH] gnu: Add goldendict.

Previous Next

Package: guix-patches;

Reported by: Sergey Trofimov <sarg <at> sarg.org.ru>

Date: Mon, 7 Jun 2021 20:06:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 48909 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#48909; Package guix-patches. (Mon, 07 Jun 2021 20:06:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sergey Trofimov <sarg <at> sarg.org.ru>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 07 Jun 2021 20:06:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sergey Trofimov <sarg <at> sarg.org.ru>
To: guix-patches <at> gnu.org
Cc: Sergey Trofimov <sarg <at> sarg.org.ru>
Subject: [PATCH] gnu: Add goldendict.
Date: Mon,  7 Jun 2021 22:05:32 +0200
---
 gnu/packages/dictionaries.scm | 63 +++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 2b1f7f0ad1..74e15b884b 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -52,6 +52,12 @@
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages tcl)
+  #:use-module (gnu packages xiph)
+  #:use-module (gnu packages libreoffice)
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages video)
   #:use-module (gnu packages xml))
 
 
@@ -398,6 +404,63 @@ intelligible and easily correctable.")
     (license (list license:gpl2 ; main license
                    license:expat)))) ; utf8/*
 
+(define-public goldendict
+  (package
+    (name "goldendict")
+    (version "2020-12-09")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/goldendict/goldendict.git")
+             (commit "261e45a5d79f9df2fbc050292410bed0f4ef3132")))
+
+       (sha256
+        (base32 "01pny06d4cmwf998hpqd7xx7mccbbasb8js1bv3rkdi1ljg01f7n"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (invoke "qmake" "goldendict.pro"
+                     "CONFIG+=no_epwing_support"
+                     (string-append "QMAKE_LRELEASE="
+                                    (assoc-ref inputs "qttools")
+                                    "/bin/lrelease")
+                     (string-append "PREFIX="
+                                    (assoc-ref outputs "out"))))))))
+
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("libvorbis" ,libvorbis)
+       ("zlib" ,zlib)
+       ("hunspell" ,hunspell)
+       ("x11proto-record-x11" ,xproto)
+       ("libtiff" ,libtiff)
+       ("qtbase" ,qtbase)
+       ("qtmultimedia" ,qtmultimedia)
+       ("qtsvg" ,qtsvg)
+       ("qttools" ,qttools)
+       ("qtwebkit" ,qtwebkit)
+       ("qtwebview" ,qtwebview)
+       ("qtx11extras" ,qtx11extras)
+       ("libxtst" ,libxtst)
+       ("lzo" ,lzo)
+       ("bzip2" ,bzip2)
+       ("ao" ,ao)
+       ("ffmpeg" ,ffmpeg)))
+    (synopsis "A feature-rich dictionary lookup program")
+    (description
+     "GoldenDict is a feature-rich dictionary lookup program,
+supporting multiple dictionary formats (StarDict, Babylon, Lingvo, Dictd, AARD,
+MDict, SDict) and online dictionaries, featuring perfect article rendering with
+the complete markup, illustrations and other content retained, and allowing you
+to type in words without any accents or correct case.")
+    (home-page "http://goldendict.org/")
+    (license license:gpl3+)))
+
 (define-public sdcv
   (package
     (name "sdcv")
-- 
2.31.1





Information forwarded to guix-patches <at> gnu.org:
bug#48909; Package guix-patches. (Tue, 08 Jun 2021 14:37:01 GMT) Full text and rfc822 format available.

Message #8 received at 48909 <at> debbugs.gnu.org (full text, mbox):

From: Brendan Tildesley <mail <at> brendan.scot>
To: "48909 <at> debbugs.gnu.org" <48909 <at> debbugs.gnu.org>
Cc: Sergey Trofimov <sarg <at> sarg.org.ru>
Subject: [PATCH] gnu: Add goldendict.
Date: Tue, 8 Jun 2021 16:36:13 +0200 (CEST)
The program phones home to check for updates at this url 
http://goldendict.org/latest_release.php?current=1.5.0-RC2+git&platform=x11

Setting checkForNewReleases( false ),
in config.cc should fix it... Actually Nix has a patch to disable updates
that edits some other lines for some reason. 
Theres also a substitute fixing the hardcoded hunspell-1.6.1. Not sure if that
is needed. 

Also consider adding opencc as an input and adding
"CONFIG+=chinese_conversion_support"


I tried packaging this years ago but I got stuck figuring out how Goldendict
is supposed to find system installed dictionaries.
Ludo suggested a patch but I can't code in C/C++ so I was unable to do it.
https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00238.html

You can see that Goldendict looks in these places for dictionaries:

    #ifdef Q_OS_LINUX
    if ( QDir( "/usr/share/stardict/dic" ).exists() )
      c.paths.push_back( Path( "/usr/share/stardict/dic", true ) );

    if ( QDir( "/usr/share/dictd" ).exists() )
      c.paths.push_back( Path( "/usr/share/dictd", true ) );

    if ( QDir( "/usr/share/opendict/dictionaries" ).exists() )
      c.paths.push_back( Path( "/usr/share/opendict/dictionaries", true ) );

    if ( QDir( "/usr/share/goldendict-wordnet" ).exists() )
      c.paths.push_back( Path( "/usr/share/goldendict-wordnet", true ) );

    if ( QDir( "/usr/share/WyabdcRealPeopleTTS" ).exists() )
      c.soundDirs.push_back( SoundDir( "/usr/share/WyabdcRealPeopleTTS", "WyabdcRealPeopleTTS" ) );

    if ( QDir( "/usr/share/myspell/dicts" ).exists() )
      c.hunspell.dictionariesPath = "/usr/share/myspell/dicts";

I think Guix/Nix support should be added directly upstream, so it can look in
/run/current-system/profile/share
and $GUIX_PROFILE/share
for dictionaries.
However it would still be good to add goldendict and work on that later.




Information forwarded to guix-patches <at> gnu.org:
bug#48909; Package guix-patches. (Tue, 08 Jun 2021 20:07:01 GMT) Full text and rfc822 format available.

Message #11 received at 48909 <at> debbugs.gnu.org (full text, mbox):

From: Sergey Trofimov <sarg <at> sarg.org.ru>
To: 48909 <at> debbugs.gnu.org
Cc: mail <at> brendan.scot
Subject: Re: [PATCH] gnu: Add goldendict.
Date: Tue, 08 Jun 2021 22:07:19 +0200
[Message part 1 (text/plain, inline)]
I've reused the patch from nixpkgs and added opencc dependency.

[0001-gnu-Add-goldendict.patch (text/x-patch, inline)]
From e5c96b58f23f56da605b4ccdf3cef7d04ef379c9 Mon Sep 17 00:00:00 2001
From: Sergey Trofimov <sarg <at> sarg.org.ru>
Date: Mon, 7 Jun 2021 21:50:30 +0200
Subject: [PATCH] gnu: Add goldendict.

---
 gnu/packages/dictionaries.scm                 | 65 +++++++++++++++++++
 .../goldendict-remove-check-for-update.patch  | 49 ++++++++++++++
 2 files changed, 114 insertions(+)
 create mode 100644 gnu/packages/patches/goldendict-remove-check-for-update.patch

diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 2b1f7f0ad1..92c6d6d742 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -52,6 +52,13 @@
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages tcl)
+  #:use-module (gnu packages xiph)
+  #:use-module (gnu packages libreoffice)
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages textutils)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages video)
   #:use-module (gnu packages xml))
 
 
@@ -398,6 +405,64 @@ intelligible and easily correctable.")
     (license (list license:gpl2 ; main license
                    license:expat)))) ; utf8/*
 
+(define-public goldendict
+  (package
+    (name "goldendict")
+    (version "2020-12-09")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/goldendict/goldendict.git")
+             (commit "261e45a5d79f9df2fbc050292410bed0f4ef3132")))
+       (sha256
+        (base32 "01pny06d4cmwf998hpqd7xx7mccbbasb8js1bv3rkdi1ljg01f7n"))
+       (patches (search-patches "goldendict-remove-check-for-update.patch"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (invoke "qmake" "goldendict.pro"
+                     "CONFIG+=no_epwing_support"
+                     "CONFIG+=chinese_conversion_support"
+                     "QMAKE_LRELEASE=lrelease"
+                     (string-append "PREFIX="
+                                    (assoc-ref outputs "out"))))))))
+
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("qttools" ,qttools)))
+    (inputs
+     `(("ao" ,ao)
+       ("bzip2" ,bzip2)
+       ("hunspell" ,hunspell)
+       ("ffmpeg" ,ffmpeg)
+       ("libtiff" ,libtiff)
+       ("libvorbis" ,libvorbis)
+       ("libxtst" ,libxtst)
+       ("opencc" ,opencc)
+       ("qtx11extras" ,qtx11extras)
+       ("qtbase" ,qtbase)
+       ("qtmultimedia" ,qtmultimedia)
+       ("qtsvg" ,qtsvg)
+       ("qttools" ,qttools)
+       ("qtwebkit" ,qtwebkit)
+       ("qtwebview" ,qtwebview)
+       ("lzo" ,lzo)
+       ("x11proto-record-x11" ,xproto)
+       ("zlib" ,zlib)))
+    (synopsis "Feature-rich dictionary lookup program")
+    (description
+     "GoldenDict is a feature-rich dictionary lookup program,
+supporting multiple dictionary formats (StarDict, Babylon, Lingvo, Dictd, AARD,
+MDict, SDict) and online dictionaries, featuring perfect article rendering with
+the complete markup, illustrations and other content retained, and allowing you
+to type in words without any accents or correct case.")
+    (home-page "http://goldendict.org/")
+    (license license:gpl3+)))
+
 (define-public sdcv
   (package
     (name "sdcv")
diff --git a/gnu/packages/patches/goldendict-remove-check-for-update.patch b/gnu/packages/patches/goldendict-remove-check-for-update.patch
new file mode 100644
index 0000000000..c5984963c3
--- /dev/null
+++ b/gnu/packages/patches/goldendict-remove-check-for-update.patch
@@ -0,0 +1,49 @@
+diff --git i/config.cc w/config.cc
+index 04b63f5..7a453d9 100644
+--- i/config.cc
++++ w/config.cc
+@@ -182,7 +182,7 @@ Preferences::Preferences():
+   pronounceOnLoadPopup( false ),
+   useInternalPlayer( InternalPlayerBackend::anyAvailable() ),
+   internalPlayerBackend( InternalPlayerBackend::defaultBackend() ),
+-  checkForNewReleases( true ),
++  checkForNewReleases( false ),
+   disallowContentFromOtherSites( false ),
+   enableWebPlugins( false ),
+   hideGoldenDictHeader( false ),
+@@ -867,8 +867,8 @@ Class load() THROW_SPEC( exError )
+       c.preferences.proxyServer.systemProxyPassword = proxy.namedItem( "systemProxyPassword" ).toElement().text();
+     }
+
+-    if ( !preferences.namedItem( "checkForNewReleases" ).isNull() )
+-      c.preferences.checkForNewReleases = ( preferences.namedItem( "checkForNewReleases" ).toElement().text() == "1" );
++    //if ( !preferences.namedItem( "checkForNewReleases" ).isNull() )
++    //  c.preferences.checkForNewReleases = ( preferences.namedItem( "checkForNewReleases" ).toElement().text() == "1" );
+
+     if ( !preferences.namedItem( "disallowContentFromOtherSites" ).isNull() )
+       c.preferences.disallowContentFromOtherSites = ( preferences.namedItem( "disallowContentFromOtherSites" ).toElement().text() == "1" );
+@@ -1819,9 +1819,9 @@ void save( Class const & c ) THROW_SPEC( exError )
+       proxy.appendChild( opt );
+     }
+
+-    opt = dd.createElement( "checkForNewReleases" );
+-    opt.appendChild( dd.createTextNode( c.preferences.checkForNewReleases ? "1" : "0" ) );
+-    preferences.appendChild( opt );
++    //opt = dd.createElement( "checkForNewReleases" );
++    //opt.appendChild( dd.createTextNode( c.preferences.checkForNewReleases ? "1" : "0" ) );
++    //preferences.appendChild( opt );
+
+     opt = dd.createElement( "disallowContentFromOtherSites" );
+     opt.appendChild( dd.createTextNode( c.preferences.disallowContentFromOtherSites ? "1" : "0" ) );
+diff --git i/preferences.cc w/preferences.cc
+index 72c3147..7e48f00 100644
+--- i/preferences.cc
++++ w/preferences.cc
+@@ -314,6 +314,7 @@ Preferences::Preferences( QWidget * parent, Config::Class & cfg_ ):
+            this, SLOT( customProxyToggled( bool ) ) );
+
+   ui.checkForNewReleases->setChecked( p.checkForNewReleases );
++  ui.checkForNewReleases->setEnabled( false );
+   ui.disallowContentFromOtherSites->setChecked( p.disallowContentFromOtherSites );
+   ui.enableWebPlugins->setChecked( p.enableWebPlugins );
+   ui.hideGoldenDictHeader->setChecked( p.hideGoldenDictHeader );
-- 
2.32.0

[Message part 3 (text/plain, inline)]
Brendan Tildesley <mail <at> brendan.scot> writes:

> The program phones home to check for updates at this url
> Also consider adding opencc as an input and adding
> "CONFIG+=chinese_conversion_support"

Information forwarded to guix-patches <at> gnu.org:
bug#48909; Package guix-patches. (Sun, 13 Jun 2021 20:42:01 GMT) Full text and rfc822 format available.

Message #14 received at 48909 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Sergey Trofimov <sarg <at> sarg.org.ru>
Cc: 48909 <at> debbugs.gnu.org, mail <at> brendan.scot
Subject: Re: bug#48909: [PATCH] gnu: Add goldendict.
Date: Sun, 13 Jun 2021 22:40:52 +0200
Hi Sergey,

Sergey Trofimov <sarg <at> sarg.org.ru> skribis:

> I've reused the patch from nixpkgs and added opencc dependency.
>
>>From e5c96b58f23f56da605b4ccdf3cef7d04ef379c9 Mon Sep 17 00:00:00 2001
> From: Sergey Trofimov <sarg <at> sarg.org.ru>
> Date: Mon, 7 Jun 2021 21:50:30 +0200
> Subject: [PATCH] gnu: Add goldendict.
>
> ---
>  gnu/packages/dictionaries.scm                 | 65 +++++++++++++++++++
>  .../goldendict-remove-check-for-update.patch  | 49 ++++++++++++++
>  2 files changed, 114 insertions(+)
>  create mode 100644 gnu/packages/patches/goldendict-remove-check-for-update.patch

Overall it LGTM, and it’s great that you addressed the issue Brendan
mentioned.

Minor issues:


[...]

> +++ b/gnu/packages/patches/goldendict-remove-check-for-update.patch
> @@ -0,0 +1,49 @@
> +diff --git i/config.cc w/config.cc

Please add a line or two at the top explaining what the patch does.

Also add this file to ‘gnu/local.mk’.

Bonus points if you attempt a ChangeLog-style commit log.  :-)
(See <https://guix.gnu.org/manual/en/html_node/Submitting-Patches.html>.)

Could you send an updated patch?

Thank you!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#48909; Package guix-patches. (Mon, 14 Jun 2021 06:27:01 GMT) Full text and rfc822 format available.

Message #17 received at 48909 <at> debbugs.gnu.org (full text, mbox):

From: Sergey Trofimov <sarg <at> sarg.org.ru>
To: 48909 <at> debbugs.gnu.org
Cc: Sergey Trofimov <sarg <at> sarg.org.ru>
Subject: [PATCH] gnu: Add goldendict.
Date: Mon, 14 Jun 2021 08:26:56 +0200
* gnu/packages/dictionaries.scm (goldendict): New variable.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/dictionaries.scm                 | 70 +++++++++++++++++++
 .../goldendict-remove-check-for-update.patch  | 52 ++++++++++++++
 3 files changed, 123 insertions(+)
 create mode 100644 gnu/packages/patches/goldendict-remove-check-for-update.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 73556cc184..43765836b4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1161,6 +1161,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \
   %D%/packages/patches/gobject-introspection-cc.patch		\
   %D%/packages/patches/gobject-introspection-girepository.patch	\
+  %D%/packages/patches/goldendict-remove-check-for-update.patch	\
   %D%/packages/patches/go-skip-gc-test.patch			\
   %D%/packages/patches/gpm-glibc-2.26.patch			\
   %D%/packages/patches/gpodder-disable-updater.patch		\
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 5ca9e128ff..79b10ed9ac 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -52,6 +52,13 @@
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages tcl)
+  #:use-module (gnu packages xiph)
+  #:use-module (gnu packages libreoffice)
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages textutils)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages video)
   #:use-module (gnu packages xml))
 
 
@@ -398,6 +405,69 @@ intelligible and easily correctable.")
     (license (list license:gpl2 ; main license
                    license:expat)))) ; utf8/*
 
+(define-public goldendict
+  (package
+    (name "goldendict")
+    (version "2021-06-12")
+    (source
+     (origin
+      (method git-fetch)
+      (uri (git-reference
+            (url "https://github.com/goldendict/goldendict.git")
+            (commit "57c4c33780d1fb20156ca2f819de62bfb974b867")))
+      (sha256
+       (base32 "0d4swrkqv9q1b1zp5z7c36yv9skdsfsbyfynv2nxclhg1ra87svp"))
+      (patches (search-patches "goldendict-remove-check-for-update.patch"))
+      (modules '((guix build utils)))
+      (snippet '(begin
+                  (for-each delete-file-recursively
+                            '("winlibs" "maclibs"))
+                  #t))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (invoke "qmake" "goldendict.pro"
+                     "CONFIG+=no_epwing_support"
+                     "CONFIG+=chinese_conversion_support"
+                     "QMAKE_LRELEASE=lrelease"
+                     (string-append "PREFIX="
+                                    (assoc-ref outputs "out"))))))))
+
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("qttools" ,qttools)))
+    (inputs
+     `(("ao" ,ao)
+       ("bzip2" ,bzip2)
+       ("hunspell" ,hunspell)
+       ("ffmpeg" ,ffmpeg)
+       ("libtiff" ,libtiff)
+       ("libvorbis" ,libvorbis)
+       ("libxtst" ,libxtst)
+       ("opencc" ,opencc)
+       ("qtx11extras" ,qtx11extras)
+       ("qtbase" ,qtbase)
+       ("qtmultimedia" ,qtmultimedia)
+       ("qtsvg" ,qtsvg)
+       ("qttools" ,qttools)
+       ("qtwebkit" ,qtwebkit)
+       ("qtwebview" ,qtwebview)
+       ("lzo" ,lzo)
+       ("x11proto-record-x11" ,xproto)
+       ("zlib" ,zlib)))
+    (synopsis "Feature-rich dictionary lookup program")
+    (description
+     "GoldenDict is a feature-rich dictionary lookup program,
+supporting multiple dictionary formats (StarDict, Babylon, Lingvo, Dictd, AARD,
+MDict, SDict) and online dictionaries, featuring perfect article rendering with
+the complete markup, illustrations and other content retained, and allowing you
+to type in words without any accents or correct case.")
+    (home-page "http://goldendict.org/")
+    (license license:gpl3+)))
+
 (define-public sdcv
   (package
     (name "sdcv")
diff --git a/gnu/packages/patches/goldendict-remove-check-for-update.patch b/gnu/packages/patches/goldendict-remove-check-for-update.patch
new file mode 100644
index 0000000000..84d9b1767e
--- /dev/null
+++ b/gnu/packages/patches/goldendict-remove-check-for-update.patch
@@ -0,0 +1,52 @@
+https://github.com/NixOS/nixpkgs/blob/217b221/pkgs/applications/misc/goldendict/0001-dont-check-for-updates.patch
+Disable calling home for updates.
+
+diff --git i/config.cc w/config.cc
+index 04b63f5..7a453d9 100644
+--- i/config.cc
++++ w/config.cc
+@@ -182,7 +182,7 @@ Preferences::Preferences():
+   pronounceOnLoadPopup( false ),
+   useInternalPlayer( InternalPlayerBackend::anyAvailable() ),
+   internalPlayerBackend( InternalPlayerBackend::defaultBackend() ),
+-  checkForNewReleases( true ),
++  checkForNewReleases( false ),
+   disallowContentFromOtherSites( false ),
+   enableWebPlugins( false ),
+   hideGoldenDictHeader( false ),
+@@ -867,8 +867,8 @@ Class load() THROW_SPEC( exError )
+       c.preferences.proxyServer.systemProxyPassword = proxy.namedItem( "systemProxyPassword" ).toElement().text();
+     }
+
+-    if ( !preferences.namedItem( "checkForNewReleases" ).isNull() )
+-      c.preferences.checkForNewReleases = ( preferences.namedItem( "checkForNewReleases" ).toElement().text() == "1" );
++    //if ( !preferences.namedItem( "checkForNewReleases" ).isNull() )
++    //  c.preferences.checkForNewReleases = ( preferences.namedItem( "checkForNewReleases" ).toElement().text() == "1" );
+
+     if ( !preferences.namedItem( "disallowContentFromOtherSites" ).isNull() )
+       c.preferences.disallowContentFromOtherSites = ( preferences.namedItem( "disallowContentFromOtherSites" ).toElement().text() == "1" );
+@@ -1819,9 +1819,9 @@ void save( Class const & c ) THROW_SPEC( exError )
+       proxy.appendChild( opt );
+     }
+
+-    opt = dd.createElement( "checkForNewReleases" );
+-    opt.appendChild( dd.createTextNode( c.preferences.checkForNewReleases ? "1" : "0" ) );
+-    preferences.appendChild( opt );
++    //opt = dd.createElement( "checkForNewReleases" );
++    //opt.appendChild( dd.createTextNode( c.preferences.checkForNewReleases ? "1" : "0" ) );
++    //preferences.appendChild( opt );
+
+     opt = dd.createElement( "disallowContentFromOtherSites" );
+     opt.appendChild( dd.createTextNode( c.preferences.disallowContentFromOtherSites ? "1" : "0" ) );
+diff --git i/preferences.cc w/preferences.cc
+index 72c3147..7e48f00 100644
+--- i/preferences.cc
++++ w/preferences.cc
+@@ -314,6 +314,7 @@ Preferences::Preferences( QWidget * parent, Config::Class & cfg_ ):
+            this, SLOT( customProxyToggled( bool ) ) );
+
+   ui.checkForNewReleases->setChecked( p.checkForNewReleases );
++  ui.checkForNewReleases->setEnabled( false );
+   ui.disallowContentFromOtherSites->setChecked( p.disallowContentFromOtherSites );
+   ui.enableWebPlugins->setChecked( p.enableWebPlugins );
+   ui.hideGoldenDictHeader->setChecked( p.hideGoldenDictHeader );
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#48909; Package guix-patches. (Sat, 03 Jul 2021 14:14:02 GMT) Full text and rfc822 format available.

Message #20 received at 48909 <at> debbugs.gnu.org (full text, mbox):

From: Sergey Trofimov <sarg <at> sarg.org.ru>
To: 48909 <at> debbugs.gnu.org
Cc: Sergey Trofimov <sarg <at> sarg.org.ru>
Subject: [PATCH] gnu: Add goldendict.
Date: Sat,  3 Jul 2021 16:13:33 +0200
* gnu/packages/dictionaries.scm (goldendict): New variable.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/dictionaries.scm                 | 72 +++++++++++++++++++
 .../goldendict-remove-check-for-update.patch  | 52 ++++++++++++++
 3 files changed, 125 insertions(+)
 create mode 100644 gnu/packages/patches/goldendict-remove-check-for-update.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 509970f044..bcac89c79c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1170,6 +1170,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \
   %D%/packages/patches/gobject-introspection-cc.patch		\
   %D%/packages/patches/gobject-introspection-girepository.patch	\
+  %D%/packages/patches/goldendict-remove-check-for-update.patch	\
   %D%/packages/patches/go-skip-gc-test.patch			\
   %D%/packages/patches/gpm-glibc-2.26.patch			\
   %D%/packages/patches/gpodder-disable-updater.patch		\
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 5ca9e128ff..03cf1f3a5d 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -52,6 +52,13 @@
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages tcl)
+  #:use-module (gnu packages xiph)
+  #:use-module (gnu packages libreoffice)
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages textutils)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages video)
   #:use-module (gnu packages xml))
 
 
@@ -398,6 +405,71 @@ intelligible and easily correctable.")
     (license (list license:gpl2 ; main license
                    license:expat)))) ; utf8/*
 
+(define-public goldendict
+  (let ((commit "baff02a14b3f70f0d0a55bef550dbb74dcbf0ce8")
+        (revision "0"))
+    (package
+      (name "goldendict")
+      (version (git-version "1.5.0-RC2" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/goldendict/goldendict")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1l5ymxl34pw01vfq721wfgzvq4zw4iwvb73nhsb94m3l2za5k5j2"))
+         (patches (search-patches "goldendict-remove-check-for-update.patch"))
+         (modules '((guix build utils)))
+         (snippet '(begin
+                     (for-each delete-file-recursively
+                               '("winlibs" "maclibs"))
+                     #t))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (replace 'configure
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (invoke "qmake" "goldendict.pro"
+                       "CONFIG+=no_epwing_support"
+                       "CONFIG+=chinese_conversion_support"
+                       "QMAKE_LRELEASE=lrelease"
+                       (string-append "PREFIX="
+                                      (assoc-ref outputs "out"))))))))
+
+      (native-inputs
+       `(("pkg-config" ,pkg-config)
+         ("qttools" ,qttools)))
+      (inputs
+       `(("ao" ,ao)
+         ("bzip2" ,bzip2)
+         ("hunspell" ,hunspell)
+         ("ffmpeg" ,ffmpeg)
+         ("libtiff" ,libtiff)
+         ("libvorbis" ,libvorbis)
+         ("libxtst" ,libxtst)
+         ("opencc" ,opencc)
+         ("qtx11extras" ,qtx11extras)
+         ("qtbase" ,qtbase-5)
+         ("qtmultimedia" ,qtmultimedia)
+         ("qtsvg" ,qtsvg)
+         ("qtwebkit" ,qtwebkit)
+         ("qtwebview" ,qtwebview)
+         ("lzo" ,lzo)
+         ("x11proto-record-x11" ,xproto)
+         ("zlib" ,zlib)))
+      (synopsis "Feature-rich dictionary lookup program")
+      (description
+       "GoldenDict is a feature-rich dictionary lookup program,
+supporting multiple dictionary formats (StarDict, Babylon, Lingvo, Dictd, AARD,
+MDict, SDict) and online dictionaries, featuring perfect article rendering with
+the complete markup, illustrations and other content retained, and allowing you
+to type in words without any accents or correct case.")
+      (home-page "http://goldendict.org/")
+      (license license:gpl3+))))
+
 (define-public sdcv
   (package
     (name "sdcv")
diff --git a/gnu/packages/patches/goldendict-remove-check-for-update.patch b/gnu/packages/patches/goldendict-remove-check-for-update.patch
new file mode 100644
index 0000000000..84d9b1767e
--- /dev/null
+++ b/gnu/packages/patches/goldendict-remove-check-for-update.patch
@@ -0,0 +1,52 @@
+https://github.com/NixOS/nixpkgs/blob/217b221/pkgs/applications/misc/goldendict/0001-dont-check-for-updates.patch
+Disable calling home for updates.
+
+diff --git i/config.cc w/config.cc
+index 04b63f5..7a453d9 100644
+--- i/config.cc
++++ w/config.cc
+@@ -182,7 +182,7 @@ Preferences::Preferences():
+   pronounceOnLoadPopup( false ),
+   useInternalPlayer( InternalPlayerBackend::anyAvailable() ),
+   internalPlayerBackend( InternalPlayerBackend::defaultBackend() ),
+-  checkForNewReleases( true ),
++  checkForNewReleases( false ),
+   disallowContentFromOtherSites( false ),
+   enableWebPlugins( false ),
+   hideGoldenDictHeader( false ),
+@@ -867,8 +867,8 @@ Class load() THROW_SPEC( exError )
+       c.preferences.proxyServer.systemProxyPassword = proxy.namedItem( "systemProxyPassword" ).toElement().text();
+     }
+
+-    if ( !preferences.namedItem( "checkForNewReleases" ).isNull() )
+-      c.preferences.checkForNewReleases = ( preferences.namedItem( "checkForNewReleases" ).toElement().text() == "1" );
++    //if ( !preferences.namedItem( "checkForNewReleases" ).isNull() )
++    //  c.preferences.checkForNewReleases = ( preferences.namedItem( "checkForNewReleases" ).toElement().text() == "1" );
+
+     if ( !preferences.namedItem( "disallowContentFromOtherSites" ).isNull() )
+       c.preferences.disallowContentFromOtherSites = ( preferences.namedItem( "disallowContentFromOtherSites" ).toElement().text() == "1" );
+@@ -1819,9 +1819,9 @@ void save( Class const & c ) THROW_SPEC( exError )
+       proxy.appendChild( opt );
+     }
+
+-    opt = dd.createElement( "checkForNewReleases" );
+-    opt.appendChild( dd.createTextNode( c.preferences.checkForNewReleases ? "1" : "0" ) );
+-    preferences.appendChild( opt );
++    //opt = dd.createElement( "checkForNewReleases" );
++    //opt.appendChild( dd.createTextNode( c.preferences.checkForNewReleases ? "1" : "0" ) );
++    //preferences.appendChild( opt );
+
+     opt = dd.createElement( "disallowContentFromOtherSites" );
+     opt.appendChild( dd.createTextNode( c.preferences.disallowContentFromOtherSites ? "1" : "0" ) );
+diff --git i/preferences.cc w/preferences.cc
+index 72c3147..7e48f00 100644
+--- i/preferences.cc
++++ w/preferences.cc
+@@ -314,6 +314,7 @@ Preferences::Preferences( QWidget * parent, Config::Class & cfg_ ):
+            this, SLOT( customProxyToggled( bool ) ) );
+
+   ui.checkForNewReleases->setChecked( p.checkForNewReleases );
++  ui.checkForNewReleases->setEnabled( false );
+   ui.disallowContentFromOtherSites->setChecked( p.disallowContentFromOtherSites );
+   ui.enableWebPlugins->setChecked( p.enableWebPlugins );
+   ui.hideGoldenDictHeader->setChecked( p.hideGoldenDictHeader );
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#48909; Package guix-patches. (Sat, 03 Jul 2021 17:31:02 GMT) Full text and rfc822 format available.

Message #23 received at 48909 <at> debbugs.gnu.org (full text, mbox):

From: Sergey Trofimov <sarg <at> sarg.org.ru>
To: 48909 <at> debbugs.gnu.org
Subject: Rebased on the latest commit in master.
Date: Sat,  3 Jul 2021 19:30:18 +0200



Information forwarded to guix-patches <at> gnu.org:
bug#48909; Package guix-patches. (Sat, 03 Jul 2021 17:32:01 GMT) Full text and rfc822 format available.

Message #26 received at 48909 <at> debbugs.gnu.org (full text, mbox):

From: Sergey Trofimov <sarg <at> sarg.org.ru>
To: 48909 <at> debbugs.gnu.org
Cc: Sergey Trofimov <sarg <at> sarg.org.ru>
Subject: [PATCH] gnu: Add goldendict.
Date: Sat,  3 Jul 2021 19:32:22 +0200
* gnu/packages/dictionaries.scm (goldendict): New variable.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/dictionaries.scm                 | 72 +++++++++++++++++++
 .../goldendict-remove-check-for-update.patch  | 52 ++++++++++++++
 3 files changed, 125 insertions(+)
 create mode 100644 gnu/packages/patches/goldendict-remove-check-for-update.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index b197ec55f9..e27af238c7 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1169,6 +1169,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \
   %D%/packages/patches/gobject-introspection-cc.patch		\
   %D%/packages/patches/gobject-introspection-girepository.patch	\
+  %D%/packages/patches/goldendict-remove-check-for-update.patch	\
   %D%/packages/patches/go-fix-script-tests.patch			\
   %D%/packages/patches/go-skip-gc-test.patch			\
   %D%/packages/patches/gpm-glibc-2.26.patch			\
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 5ca9e128ff..03cf1f3a5d 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -52,6 +52,13 @@
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages tcl)
+  #:use-module (gnu packages xiph)
+  #:use-module (gnu packages libreoffice)
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages textutils)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages video)
   #:use-module (gnu packages xml))
 
 
@@ -398,6 +405,71 @@ intelligible and easily correctable.")
     (license (list license:gpl2 ; main license
                    license:expat)))) ; utf8/*
 
+(define-public goldendict
+  (let ((commit "baff02a14b3f70f0d0a55bef550dbb74dcbf0ce8")
+        (revision "0"))
+    (package
+      (name "goldendict")
+      (version (git-version "1.5.0-RC2" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/goldendict/goldendict")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1l5ymxl34pw01vfq721wfgzvq4zw4iwvb73nhsb94m3l2za5k5j2"))
+         (patches (search-patches "goldendict-remove-check-for-update.patch"))
+         (modules '((guix build utils)))
+         (snippet '(begin
+                     (for-each delete-file-recursively
+                               '("winlibs" "maclibs"))
+                     #t))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (replace 'configure
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (invoke "qmake" "goldendict.pro"
+                       "CONFIG+=no_epwing_support"
+                       "CONFIG+=chinese_conversion_support"
+                       "QMAKE_LRELEASE=lrelease"
+                       (string-append "PREFIX="
+                                      (assoc-ref outputs "out"))))))))
+
+      (native-inputs
+       `(("pkg-config" ,pkg-config)
+         ("qttools" ,qttools)))
+      (inputs
+       `(("ao" ,ao)
+         ("bzip2" ,bzip2)
+         ("hunspell" ,hunspell)
+         ("ffmpeg" ,ffmpeg)
+         ("libtiff" ,libtiff)
+         ("libvorbis" ,libvorbis)
+         ("libxtst" ,libxtst)
+         ("opencc" ,opencc)
+         ("qtx11extras" ,qtx11extras)
+         ("qtbase" ,qtbase-5)
+         ("qtmultimedia" ,qtmultimedia)
+         ("qtsvg" ,qtsvg)
+         ("qtwebkit" ,qtwebkit)
+         ("qtwebview" ,qtwebview)
+         ("lzo" ,lzo)
+         ("x11proto-record-x11" ,xproto)
+         ("zlib" ,zlib)))
+      (synopsis "Feature-rich dictionary lookup program")
+      (description
+       "GoldenDict is a feature-rich dictionary lookup program,
+supporting multiple dictionary formats (StarDict, Babylon, Lingvo, Dictd, AARD,
+MDict, SDict) and online dictionaries, featuring perfect article rendering with
+the complete markup, illustrations and other content retained, and allowing you
+to type in words without any accents or correct case.")
+      (home-page "http://goldendict.org/")
+      (license license:gpl3+))))
+
 (define-public sdcv
   (package
     (name "sdcv")
diff --git a/gnu/packages/patches/goldendict-remove-check-for-update.patch b/gnu/packages/patches/goldendict-remove-check-for-update.patch
new file mode 100644
index 0000000000..84d9b1767e
--- /dev/null
+++ b/gnu/packages/patches/goldendict-remove-check-for-update.patch
@@ -0,0 +1,52 @@
+https://github.com/NixOS/nixpkgs/blob/217b221/pkgs/applications/misc/goldendict/0001-dont-check-for-updates.patch
+Disable calling home for updates.
+
+diff --git i/config.cc w/config.cc
+index 04b63f5..7a453d9 100644
+--- i/config.cc
++++ w/config.cc
+@@ -182,7 +182,7 @@ Preferences::Preferences():
+   pronounceOnLoadPopup( false ),
+   useInternalPlayer( InternalPlayerBackend::anyAvailable() ),
+   internalPlayerBackend( InternalPlayerBackend::defaultBackend() ),
+-  checkForNewReleases( true ),
++  checkForNewReleases( false ),
+   disallowContentFromOtherSites( false ),
+   enableWebPlugins( false ),
+   hideGoldenDictHeader( false ),
+@@ -867,8 +867,8 @@ Class load() THROW_SPEC( exError )
+       c.preferences.proxyServer.systemProxyPassword = proxy.namedItem( "systemProxyPassword" ).toElement().text();
+     }
+
+-    if ( !preferences.namedItem( "checkForNewReleases" ).isNull() )
+-      c.preferences.checkForNewReleases = ( preferences.namedItem( "checkForNewReleases" ).toElement().text() == "1" );
++    //if ( !preferences.namedItem( "checkForNewReleases" ).isNull() )
++    //  c.preferences.checkForNewReleases = ( preferences.namedItem( "checkForNewReleases" ).toElement().text() == "1" );
+
+     if ( !preferences.namedItem( "disallowContentFromOtherSites" ).isNull() )
+       c.preferences.disallowContentFromOtherSites = ( preferences.namedItem( "disallowContentFromOtherSites" ).toElement().text() == "1" );
+@@ -1819,9 +1819,9 @@ void save( Class const & c ) THROW_SPEC( exError )
+       proxy.appendChild( opt );
+     }
+
+-    opt = dd.createElement( "checkForNewReleases" );
+-    opt.appendChild( dd.createTextNode( c.preferences.checkForNewReleases ? "1" : "0" ) );
+-    preferences.appendChild( opt );
++    //opt = dd.createElement( "checkForNewReleases" );
++    //opt.appendChild( dd.createTextNode( c.preferences.checkForNewReleases ? "1" : "0" ) );
++    //preferences.appendChild( opt );
+
+     opt = dd.createElement( "disallowContentFromOtherSites" );
+     opt.appendChild( dd.createTextNode( c.preferences.disallowContentFromOtherSites ? "1" : "0" ) );
+diff --git i/preferences.cc w/preferences.cc
+index 72c3147..7e48f00 100644
+--- i/preferences.cc
++++ w/preferences.cc
+@@ -314,6 +314,7 @@ Preferences::Preferences( QWidget * parent, Config::Class & cfg_ ):
+            this, SLOT( customProxyToggled( bool ) ) );
+
+   ui.checkForNewReleases->setChecked( p.checkForNewReleases );
++  ui.checkForNewReleases->setEnabled( false );
+   ui.disallowContentFromOtherSites->setChecked( p.disallowContentFromOtherSites );
+   ui.enableWebPlugins->setChecked( p.enableWebPlugins );
+   ui.hideGoldenDictHeader->setChecked( p.hideGoldenDictHeader );
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#48909; Package guix-patches. (Sat, 22 Jan 2022 21:07:02 GMT) Full text and rfc822 format available.

Message #29 received at 48909 <at> debbugs.gnu.org (full text, mbox):

From: Pāladhammika <paladhammika <at> protonmail.com>
To: "48909 <at> debbugs.gnu.org" <48909 <at> debbugs.gnu.org>
Subject: [PATCH] gnu: Add goldendict.
Date: Sat, 22 Jan 2022 21:06:03 +0000
Whatever happened with this patch?

All the best,
Pāladhammika




Information forwarded to guix-patches <at> gnu.org:
bug#48909; Package guix-patches. (Sun, 27 Mar 2022 16:18:01 GMT) Full text and rfc822 format available.

Message #32 received at 48909 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: 48909 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add goldendict
Date: Sun, 27 Mar 2022 18:09:46 +0200
[Message part 1 (text/plain, inline)]
Hi,

> +  (let ((commit "baff02a14b3f70f0d0a55bef550dbb74dcbf0ce8")
> +      (version (git-version "1.5.0-RC2" revision commit))
> +               (commit commit)))

Is this an actual upstream version?  If so, 'git-version' is not
necessary here.  Also, do we want to package release candidates, or
only regular releases?

> +                     #t))))

Not necessary anymore.

> +                     (for-each delete-file-recursively
> +                               '("winlibs" "maclibs"))

What is the reason for removal?  (bundling, nonfree, broken, ...?)

> +                       "CONFIG+=no_epwing_support"

Why not support 'epwing', whatever that is? 

> +
https://github.com/NixOS/nixpkgs/blob/217b221/pkgs/applications/misc/goldendict/0001-dont-check-for-updates.patch

This will do, but ideally upstream would just have some kind of
configuration flag that distributions could set.

> + "Feature-rich dictionary lookup program")
+      (description
+       "GoldenDict is a feature-rich dictionary lookup program,
+supporting multiple dictionary formats (StarDict, Babylon, Lingvo,
Dictd, AARD,
+MDict, SDict) and online dictionaries, featuring perfect article
renderin

This is leaning a bit against the ‘no marketing phrases rule’ from
(guix)Synopses and Descriptions.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#48909; Package guix-patches. (Mon, 28 Mar 2022 08:28:01 GMT) Full text and rfc822 format available.

Message #35 received at 48909 <at> debbugs.gnu.org (full text, mbox):

From: Sergey Trofimov <sarg <at> sarg.org.ru>
To: 48909 <at> debbugs.gnu.org
Cc: Sergey Trofimov <sarg <at> sarg.org.ru>
Subject: [PATCH] gnu: Add goldendict.
Date: Mon, 28 Mar 2022 10:26:54 +0200
* gnu/packages/dictionaries.scm (goldendict): New variable.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/dictionaries.scm                 | 53 +++++++++++++++++++
 .../goldendict-remove-check-for-update.patch  | 52 ++++++++++++++++++
 3 files changed, 106 insertions(+)
 create mode 100644 gnu/packages/patches/goldendict-remove-check-for-update.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 4f60046a5e..c1fe54d514 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1204,6 +1204,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \
   %D%/packages/patches/gobject-introspection-cc.patch		\
   %D%/packages/patches/gobject-introspection-girepository.patch	\
+  %D%/packages/patches/goldendict-remove-check-for-update.patch	\
   %D%/packages/patches/go-fix-script-tests.patch			\
   %D%/packages/patches/go-github-com-golang-snappy-32bit-test.patch \
   %D%/packages/patches/go-github-com-urfave-cli-fix-tests.patch \
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index f9d6e57877..fd4172ebb6 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -38,6 +38,7 @@ (define-module (gnu packages dictionaries)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages education)
   #:use-module (gnu packages emacs)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fribidi)
@@ -52,6 +53,13 @@ (define-module (gnu packages dictionaries)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages tcl)
+  #:use-module (gnu packages xiph)
+  #:use-module (gnu packages libreoffice)
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages textutils)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages video)
   #:use-module (gnu packages xml))
 
 
@@ -389,6 +397,51 @@ (define-public apertium
     (license (list license:gpl2 ; main license
                    license:expat)))) ; utf8/*
 
+(define-public goldendict
+  (let ((commit "8acb288c9e9bdb3c6bf2e803954dd3b6ac273c05")
+        (revision "0"))
+    (package
+      (name "goldendict")
+      (version (git-version "1.5.0-RC2" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/goldendict/goldendict")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0lhpmrsglqmwz9d6hr29ncm163hvdqqnxmw9frhgyrblw977wzni"))
+         (patches (search-patches "goldendict-remove-check-for-update.patch"))
+         (modules '((guix build utils)))
+         (snippet '(begin
+                     ;; Remove bundled libraries.
+                     (for-each delete-file-recursively
+                               '("winlibs" "maclibs"))))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (replace 'configure
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (invoke "qmake" "goldendict.pro"
+                       "CONFIG+=chinese_conversion_support"
+                       "QMAKE_LRELEASE=lrelease"
+                       (string-append "PREFIX="
+                                      (assoc-ref outputs "out"))))))))
+
+      (native-inputs (list pkg-config qttools))
+      (inputs (list ao bzip2 hunspell ffmpeg libeb libtiff libvorbis libxtst
+                    opencc qtx11extras qtbase-5 qtmultimedia qtsvg qtwebkit
+                    qtwebview lzo xorgproto zlib))
+      (synopsis "Feature-rich dictionary lookup program")
+      (description
+       "GoldenDict is a dictionary lookup program,
+supporting multiple dictionary formats (StarDict, Babylon, Lingvo, Dictd, AARD,
+MDict, SDict) and online dictionaries.")
+      (home-page "http://goldendict.org/")
+      (license license:gpl3+))))
+
 (define-public sdcv
   (package
     (name "sdcv")
diff --git a/gnu/packages/patches/goldendict-remove-check-for-update.patch b/gnu/packages/patches/goldendict-remove-check-for-update.patch
new file mode 100644
index 0000000000..84d9b1767e
--- /dev/null
+++ b/gnu/packages/patches/goldendict-remove-check-for-update.patch
@@ -0,0 +1,52 @@
+https://github.com/NixOS/nixpkgs/blob/217b221/pkgs/applications/misc/goldendict/0001-dont-check-for-updates.patch
+Disable calling home for updates.
+
+diff --git i/config.cc w/config.cc
+index 04b63f5..7a453d9 100644
+--- i/config.cc
++++ w/config.cc
+@@ -182,7 +182,7 @@ Preferences::Preferences():
+   pronounceOnLoadPopup( false ),
+   useInternalPlayer( InternalPlayerBackend::anyAvailable() ),
+   internalPlayerBackend( InternalPlayerBackend::defaultBackend() ),
+-  checkForNewReleases( true ),
++  checkForNewReleases( false ),
+   disallowContentFromOtherSites( false ),
+   enableWebPlugins( false ),
+   hideGoldenDictHeader( false ),
+@@ -867,8 +867,8 @@ Class load() THROW_SPEC( exError )
+       c.preferences.proxyServer.systemProxyPassword = proxy.namedItem( "systemProxyPassword" ).toElement().text();
+     }
+
+-    if ( !preferences.namedItem( "checkForNewReleases" ).isNull() )
+-      c.preferences.checkForNewReleases = ( preferences.namedItem( "checkForNewReleases" ).toElement().text() == "1" );
++    //if ( !preferences.namedItem( "checkForNewReleases" ).isNull() )
++    //  c.preferences.checkForNewReleases = ( preferences.namedItem( "checkForNewReleases" ).toElement().text() == "1" );
+
+     if ( !preferences.namedItem( "disallowContentFromOtherSites" ).isNull() )
+       c.preferences.disallowContentFromOtherSites = ( preferences.namedItem( "disallowContentFromOtherSites" ).toElement().text() == "1" );
+@@ -1819,9 +1819,9 @@ void save( Class const & c ) THROW_SPEC( exError )
+       proxy.appendChild( opt );
+     }
+
+-    opt = dd.createElement( "checkForNewReleases" );
+-    opt.appendChild( dd.createTextNode( c.preferences.checkForNewReleases ? "1" : "0" ) );
+-    preferences.appendChild( opt );
++    //opt = dd.createElement( "checkForNewReleases" );
++    //opt.appendChild( dd.createTextNode( c.preferences.checkForNewReleases ? "1" : "0" ) );
++    //preferences.appendChild( opt );
+
+     opt = dd.createElement( "disallowContentFromOtherSites" );
+     opt.appendChild( dd.createTextNode( c.preferences.disallowContentFromOtherSites ? "1" : "0" ) );
+diff --git i/preferences.cc w/preferences.cc
+index 72c3147..7e48f00 100644
+--- i/preferences.cc
++++ w/preferences.cc
+@@ -314,6 +314,7 @@ Preferences::Preferences( QWidget * parent, Config::Class & cfg_ ):
+            this, SLOT( customProxyToggled( bool ) ) );
+
+   ui.checkForNewReleases->setChecked( p.checkForNewReleases );
++  ui.checkForNewReleases->setEnabled( false );
+   ui.disallowContentFromOtherSites->setChecked( p.disallowContentFromOtherSites );
+   ui.enableWebPlugins->setChecked( p.enableWebPlugins );
+   ui.hideGoldenDictHeader->setChecked( p.hideGoldenDictHeader );
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#48909; Package guix-patches. (Mon, 28 Mar 2022 09:48:01 GMT) Full text and rfc822 format available.

Message #38 received at 48909 <at> debbugs.gnu.org (full text, mbox):

From: Sergey Trofimov <sarg <at> sarg.org.ru>
To: 48909 <at> debbugs.gnu.org
Subject: Package definition updated.
Date: Mon, 28 Mar 2022 11:46:28 +0200
Dear guix maintainers,
I've updated the goldendict package according to the latest guidelines.

Regarding versioning - goldendict team neglects proper versioning for
a long time, not sure that would change any time soon. Here is a
discussion around that:
https://github.com/goldendict/goldendict/issues/953




Information forwarded to guix-patches <at> gnu.org:
bug#48909; Package guix-patches. (Tue, 23 Jan 2024 22:31:02 GMT) Full text and rfc822 format available.

Message #41 received at 48909 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 48909 <at> debbugs.gnu.org
Subject: [PATCH] gnu: Add goldendict.
Date: Tue, 23 Jan 2024 22:30:00 +0000
[Message part 1 (text/plain, inline)]
Hi,

QtWebKit was removed https://issues.guix.gnu.org/53289.
Porting to QtWebEngine is not initiated yet https://github.com/goldendict/goldendict/issues/1081.

Review in some time when there would be option to build the project
without QtWebKit.

Thanks,
Oleg
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 94 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.