Message ID | 20210607200532.27565-1-sarg@sarg.org.ru |
---|---|
State | New |
Headers | show |
Series | [bug#48909] gnu: Add goldendict. | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
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.
Whatever happened with this patch? All the best, Pāladhammika
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.
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
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
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")