From patchwork Mon Mar 28 08:26:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Trofimov X-Patchwork-Id: 38159 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 77BC727BBE9; Mon, 28 Mar 2022 09:28:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,T_PDS_PRO_TLD,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A605827BBEA for ; Mon, 28 Mar 2022 09:28:13 +0100 (BST) Received: from localhost ([::1]:47544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYkjU-0007iU-PC for patchwork@mira.cbaines.net; Mon, 28 Mar 2022 04:28:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYkjK-0007go-7f for guix-patches@gnu.org; Mon, 28 Mar 2022 04:28:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35139) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nYkjJ-0000SP-Uv for guix-patches@gnu.org; Mon, 28 Mar 2022 04:28:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nYkjJ-00068w-L9 for guix-patches@gnu.org; Mon, 28 Mar 2022 04:28: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, 28 Mar 2022 08:28: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.164845603923559 (code B ref 48909); Mon, 28 Mar 2022 08:28:01 +0000 Received: (at 48909) by debbugs.gnu.org; 28 Mar 2022 08:27:19 +0000 Received: from localhost ([127.0.0.1]:57269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYkiY-00067p-HP for submit@debbugs.gnu.org; Mon, 28 Mar 2022 04:27:19 -0400 Received: from mail-ej1-f42.google.com ([209.85.218.42]:44548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYkiW-00067d-Jq for 48909@debbugs.gnu.org; Mon, 28 Mar 2022 04:27:13 -0400 Received: by mail-ej1-f42.google.com with SMTP id lr4so18600763ejb.11 for <48909@debbugs.gnu.org>; Mon, 28 Mar 2022 01:27:12 -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=krRkL73at7quy0NapY70NtzLm0z7BTqP9O9d0CvZ5KQ=; b=efuLOXWA4WiKHL8ALYitw/nmA1LhZ8D2326sICifPO/IQmJSmGaEp9zBmgLZPgUEXB atIB98hNiigAY9MOHOhnLI2BkKXrmIzP4ydSMrmhSNQ0/jC6GbfMaG29ht8MTu3COtLe n1iUxqW1m9wYaeIzcgjOwl6om8KLIJtLIbxkQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=krRkL73at7quy0NapY70NtzLm0z7BTqP9O9d0CvZ5KQ=; b=K3FpK/ZD6uHqbHkPYmX5OBNfSnfDyESCONQ8S6+xlhgtGV9k/XJBmvDe/EpjGWoebv AYG0lTh7gaEBzNvLSV9FhnCCjeiBR3z1qzwO7aeq3P3xses98pfP+wGJ3ILe3uyhJO+D 1kNtCV5IBfRo/ZYCU0TlKD9ZWa4a/8w9OoICsOIvZ5YCCpgkdfXye9nSWyPWICXOb2bO 9E0xoyHzDujjSsDAwq/KgiytxtRysZ+GDfaUla9P2tj7z64dd2Ua/5fFYnj7fX6riNe9 6tDc7qmCs0hYtK+7E7Lr3wprrj/ZGPAdPAR5Ai9fSlyWhuLOeDCKno0S/4yHsA1RToVl PM9w== X-Gm-Message-State: AOAM531PgavyDOE8sv1DwqJGoTJ72cWHQmHlc+6591PvPjaIgqh9zC5N eTZPwVSL4WXzX+Ur1vNRYTh9bptlNtLTmQ== X-Google-Smtp-Source: ABdhPJx5PwCrJvT7C1SMFwC0ZWrojIN3Ok7J7IiqvC//5ryrNDsrkvoEmbEW7jKuS4bbkiuF9w4TeA== X-Received: by 2002:a17:907:2cc2:b0:6df:f4ec:eebd with SMTP id hg2-20020a1709072cc200b006dff4eceebdmr26498883ejc.486.1648456026314; Mon, 28 Mar 2022 01:27:06 -0700 (PDT) Received: from localhost (static.178.231.47.78.clients.your-server.de. [78.47.231.178]) by smtp.gmail.com with ESMTPSA id t19-20020a056402525300b0041952a1a764sm6799137edd.33.2022.03.28.01.27.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 01:27:05 -0700 (PDT) From: Sergey Trofimov Date: Mon, 28 Mar 2022 10:26:54 +0200 Message-Id: <20220328082654.24539-1-sarg@sarg.org.ru> X-Mailer: git-send-email 2.34.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 | 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 );