unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#48909] [PATCH] gnu: Add goldendict.
@ 2021-06-07 20:05 Sergey Trofimov
  2021-06-08 14:36 ` Brendan Tildesley
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Sergey Trofimov @ 2021-06-07 20:05 UTC (permalink / raw)
  To: 48909; +Cc: Sergey Trofimov

---
 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





^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#48909] [PATCH] gnu: Add goldendict.
  2021-06-07 20:05 [bug#48909] [PATCH] gnu: Add goldendict Sergey Trofimov
@ 2021-06-08 14:36 ` Brendan Tildesley
  2021-06-08 20:07   ` Sergey Trofimov
  2021-06-14  6:26 ` Sergey Trofimov
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 13+ messages in thread
From: Brendan Tildesley @ 2021-06-08 14:36 UTC (permalink / raw)
  To: 48909@debbugs.gnu.org; +Cc: Sergey Trofimov

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.




^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#48909] [PATCH] gnu: Add goldendict.
  2021-06-08 14:36 ` Brendan Tildesley
@ 2021-06-08 20:07   ` Sergey Trofimov
  2021-06-13 20:40     ` Ludovic Courtès
  0 siblings, 1 reply; 13+ messages in thread
From: Sergey Trofimov @ 2021-06-08 20:07 UTC (permalink / raw)
  To: 48909; +Cc: mail

[-- Attachment #1: Type: text/plain, Size: 66 bytes --]


I've reused the patch from nixpkgs and added opencc dependency.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-goldendict.patch --]
[-- Type: text/x-patch, Size: 6277 bytes --]

From e5c96b58f23f56da605b4ccdf3cef7d04ef379c9 Mon Sep 17 00:00:00 2001
From: Sergey Trofimov <sarg@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


[-- Attachment #3: Type: text/plain, Size: 199 bytes --]


Brendan Tildesley <mail@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"

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#48909] [PATCH] gnu: Add goldendict.
  2021-06-08 20:07   ` Sergey Trofimov
@ 2021-06-13 20:40     ` Ludovic Courtès
  0 siblings, 0 replies; 13+ messages in thread
From: Ludovic Courtès @ 2021-06-13 20:40 UTC (permalink / raw)
  To: Sergey Trofimov; +Cc: 48909, mail

Hi Sergey,

Sergey Trofimov <sarg@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@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’.




^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#48909] [PATCH] gnu: Add goldendict.
  2021-06-07 20:05 [bug#48909] [PATCH] gnu: Add goldendict Sergey Trofimov
  2021-06-08 14:36 ` Brendan Tildesley
@ 2021-06-14  6:26 ` Sergey Trofimov
  2021-07-03 14:13 ` Sergey Trofimov
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Sergey Trofimov @ 2021-06-14  6:26 UTC (permalink / raw)
  To: 48909; +Cc: Sergey Trofimov

* 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





^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#48909] [PATCH] gnu: Add goldendict.
  2021-06-07 20:05 [bug#48909] [PATCH] gnu: Add goldendict Sergey Trofimov
  2021-06-08 14:36 ` Brendan Tildesley
  2021-06-14  6:26 ` Sergey Trofimov
@ 2021-07-03 14:13 ` Sergey Trofimov
  2021-07-03 17:30 ` [bug#48909] Rebased on the latest commit in master Sergey Trofimov
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Sergey Trofimov @ 2021-07-03 14:13 UTC (permalink / raw)
  To: 48909; +Cc: Sergey Trofimov

* 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





^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#48909] Rebased on the latest commit in master.
  2021-06-07 20:05 [bug#48909] [PATCH] gnu: Add goldendict Sergey Trofimov
                   ` (2 preceding siblings ...)
  2021-07-03 14:13 ` Sergey Trofimov
@ 2021-07-03 17:30 ` Sergey Trofimov
  2021-07-03 17:32 ` [bug#48909] [PATCH] gnu: Add goldendict Sergey Trofimov
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Sergey Trofimov @ 2021-07-03 17:30 UTC (permalink / raw)
  To: 48909





^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#48909] [PATCH] gnu: Add goldendict.
  2021-06-07 20:05 [bug#48909] [PATCH] gnu: Add goldendict Sergey Trofimov
                   ` (3 preceding siblings ...)
  2021-07-03 17:30 ` [bug#48909] Rebased on the latest commit in master Sergey Trofimov
@ 2021-07-03 17:32 ` Sergey Trofimov
  2022-01-22 21:06 ` Pāladhammika via Guix-patches via
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Sergey Trofimov @ 2021-07-03 17:32 UTC (permalink / raw)
  To: 48909; +Cc: Sergey Trofimov

* 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





^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#48909] [PATCH] gnu: Add goldendict.
  2021-06-07 20:05 [bug#48909] [PATCH] gnu: Add goldendict Sergey Trofimov
                   ` (4 preceding siblings ...)
  2021-07-03 17:32 ` [bug#48909] [PATCH] gnu: Add goldendict Sergey Trofimov
@ 2022-01-22 21:06 ` Pāladhammika via Guix-patches via
  2022-03-27 16:09 ` Maxime Devos
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Pāladhammika via Guix-patches via @ 2022-01-22 21:06 UTC (permalink / raw)
  To: 48909@debbugs.gnu.org

Whatever happened with this patch?

All the best,
Pāladhammika




^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#48909] [PATCH] gnu: Add goldendict
  2021-06-07 20:05 [bug#48909] [PATCH] gnu: Add goldendict Sergey Trofimov
                   ` (5 preceding siblings ...)
  2022-01-22 21:06 ` Pāladhammika via Guix-patches via
@ 2022-03-27 16:09 ` Maxime Devos
  2022-03-28  8:26 ` Sergey Trofimov
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Maxime Devos @ 2022-03-27 16:09 UTC (permalink / raw)
  To: 48909

[-- Attachment #1: Type: text/plain, Size: 1352 bytes --]

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.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#48909] [PATCH] gnu: Add goldendict.
  2021-06-07 20:05 [bug#48909] [PATCH] gnu: Add goldendict Sergey Trofimov
                   ` (6 preceding siblings ...)
  2022-03-27 16:09 ` Maxime Devos
@ 2022-03-28  8:26 ` Sergey Trofimov
  2022-03-28  9:46 ` [bug#48909] Package definition updated Sergey Trofimov
  2024-01-23 22:30 ` [bug#48909] [PATCH] gnu: Add goldendict Sharlatan Hellseher
  9 siblings, 0 replies; 13+ messages in thread
From: Sergey Trofimov @ 2022-03-28  8:26 UTC (permalink / raw)
  To: 48909; +Cc: Sergey Trofimov

* 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





^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#48909] Package definition updated.
  2021-06-07 20:05 [bug#48909] [PATCH] gnu: Add goldendict Sergey Trofimov
                   ` (7 preceding siblings ...)
  2022-03-28  8:26 ` Sergey Trofimov
@ 2022-03-28  9:46 ` Sergey Trofimov
  2024-01-23 22:30 ` [bug#48909] [PATCH] gnu: Add goldendict Sharlatan Hellseher
  9 siblings, 0 replies; 13+ messages in thread
From: Sergey Trofimov @ 2022-03-28  9:46 UTC (permalink / raw)
  To: 48909

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




^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#48909] [PATCH] gnu: Add goldendict.
  2021-06-07 20:05 [bug#48909] [PATCH] gnu: Add goldendict Sergey Trofimov
                   ` (8 preceding siblings ...)
  2022-03-28  9:46 ` [bug#48909] Package definition updated Sergey Trofimov
@ 2024-01-23 22:30 ` Sharlatan Hellseher
  9 siblings, 0 replies; 13+ messages in thread
From: Sharlatan Hellseher @ 2024-01-23 22:30 UTC (permalink / raw)
  To: 48909

[-- Attachment #1: Type: text/plain, Size: 261 bytes --]


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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-01-23 22:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07 20:05 [bug#48909] [PATCH] gnu: Add goldendict Sergey Trofimov
2021-06-08 14:36 ` Brendan Tildesley
2021-06-08 20:07   ` Sergey Trofimov
2021-06-13 20:40     ` Ludovic Courtès
2021-06-14  6:26 ` Sergey Trofimov
2021-07-03 14:13 ` Sergey Trofimov
2021-07-03 17:30 ` [bug#48909] Rebased on the latest commit in master Sergey Trofimov
2021-07-03 17:32 ` [bug#48909] [PATCH] gnu: Add goldendict Sergey Trofimov
2022-01-22 21:06 ` Pāladhammika via Guix-patches via
2022-03-27 16:09 ` Maxime Devos
2022-03-28  8:26 ` Sergey Trofimov
2022-03-28  9:46 ` [bug#48909] Package definition updated Sergey Trofimov
2024-01-23 22:30 ` [bug#48909] [PATCH] gnu: Add goldendict Sharlatan Hellseher

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).