From patchwork Mon Jun 14 06:26:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Trofimov X-Patchwork-Id: 30228 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8D31E27BC81; Mon, 14 Jun 2021 07:27:41 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id EFA9F27BC78 for ; Mon, 14 Jun 2021 07:27:40 +0100 (BST) Received: from localhost ([::1]:46900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsg4S-0005mn-0T for patchwork@mira.cbaines.net; Mon, 14 Jun 2021 02:27:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54066) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsg3q-0005md-D6 for guix-patches@gnu.org; Mon, 14 Jun 2021 02:27:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33218) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lsg3q-0001kG-5K for guix-patches@gnu.org; Mon, 14 Jun 2021 02:27:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lsg3p-0008Ea-T9 for guix-patches@gnu.org; Mon, 14 Jun 2021 02:27:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48909] [PATCH] gnu: Add goldendict. References: <20210607200532.27565-1-sarg@sarg.org.ru> In-Reply-To: <20210607200532.27565-1-sarg@sarg.org.ru> Resent-From: Sergey Trofimov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 14 Jun 2021 06:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48909 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48909@debbugs.gnu.org Cc: Sergey Trofimov Received: via spool by 48909-submit@debbugs.gnu.org id=B48909.162365199631620 (code B ref 48909); Mon, 14 Jun 2021 06:27:01 +0000 Received: (at 48909) by debbugs.gnu.org; 14 Jun 2021 06:26:36 +0000 Received: from localhost ([127.0.0.1]:44764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsg3L-0008Dq-P8 for submit@debbugs.gnu.org; Mon, 14 Jun 2021 02:26:36 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:41798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsg3J-0008DY-7S for 48909@debbugs.gnu.org; Mon, 14 Jun 2021 02:26:30 -0400 Received: by mail-wr1-f50.google.com with SMTP id o3so13158440wri.8 for <48909@debbugs.gnu.org>; Sun, 13 Jun 2021 23:26:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1m93hh1TF/sXXR8C7Ix2Fl5Zb3pGjJnSXxmUd8D8FTU=; b=lcXN9fxjYAq0BmgY/VzJplps3umOMiYQ88htQQRqzmTDCHq8wEItPntax2bt9JmjoN 964rrpHIGZ/u7/v0uXwI4fNyE3XsCtksTiZZLT+aCr73GjtQc1qZzsUaulQ7oF21f7Jk J9usxe/JXiP20Zr2qdVPdDEr4PqN4vCH99wzQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1m93hh1TF/sXXR8C7Ix2Fl5Zb3pGjJnSXxmUd8D8FTU=; b=EBlke3UCIl3HWKcaZ9Ed+gXQ8vs9EMoH0wzvGQHfi0G3t3n9ISGDuS0HQH9sF+BJw/ N/r4WQ9LFNxTFv5cf5rdWTS8Y+FvbG8fqUrQcDFQ5+h/xZdOCTyntOqeYJTdgVzfuX/w 4kXqUsS+oDAPWhIDgFqH+6CaFzwlgj1ptx/ihHUN2RF4crr8oGqriPnovxHICGnFxoAD z0IBD0q64+zpOQkNZc06JYWChdjM/D+qyQHn5pX+uNd3HmjbNuwl4PR92hM9QnstHZrg rqLVm86Y97V/zpMDYnsP5ilzgDGfpK6JgkHF9M1lw78/tufgHtKhvBtmI1mJ8zudFOL8 xNlg== X-Gm-Message-State: AOAM532Cf7gUBGqMuFkPW6PHB8mCXSaEj0UnJd1R5ZuM1lyrEcydrNF9 bjcpUZbuNaPEhwJEvZt4A83Hb/V6ltInHNOn X-Google-Smtp-Source: ABdhPJwwBkO9MLwXInukTnhHM644Bpf8i5RvG5jljnIyLFCK7oWdmTwQQ8bJihBKJj5nbcOi5JvqyQ== X-Received: by 2002:adf:a193:: with SMTP id u19mr17100419wru.9.1623651982632; Sun, 13 Jun 2021 23:26:22 -0700 (PDT) Received: from localhost ([92.206.237.187]) by smtp.gmail.com with ESMTPSA id p15sm7673254wmq.43.2021.06.13.23.26.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Jun 2021 23:26:21 -0700 (PDT) From: Sergey Trofimov Date: Mon, 14 Jun 2021 08:26:56 +0200 Message-Id: <20210614062656.4499-1-sarg@sarg.org.ru> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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 );