all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sergey Trofimov <sarg@sarg.org.ru>
To: 48909@debbugs.gnu.org
Cc: mail@brendan.scot
Subject: [bug#48909] [PATCH] gnu: Add goldendict.
Date: Tue, 08 Jun 2021 22:07:19 +0200	[thread overview]
Message-ID: <87tum8qfwo.fsf@sarg.org.ru> (raw)
In-Reply-To: <1051806061.54116.1623162973231@office.mailbox.org>

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

  reply	other threads:[~2021-06-08 20:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tum8qfwo.fsf@sarg.org.ru \
    --to=sarg@sarg.org.ru \
    --cc=48909@debbugs.gnu.org \
    --cc=mail@brendan.scot \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.