From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 9k28JZtxQWK24gAAgWs5BA (envelope-from ) for ; Mon, 28 Mar 2022 10:28:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id mO4QIptxQWLd5wAA9RJhRA (envelope-from ) for ; Mon, 28 Mar 2022 10:28:11 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BE1985A96 for ; Mon, 28 Mar 2022 10:28:10 +0200 (CEST) Received: from localhost ([::1]:47544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYkjR-0007iU-HZ for larch@yhetil.org; Mon, 28 Mar 2022 04:28:09 -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 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648456091; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=krRkL73at7quy0NapY70NtzLm0z7BTqP9O9d0CvZ5KQ=; b=EJlTVxoCgW/aAnVzzyTb/K9subauaPtYoSQRn3k1a2qMRN32MO8cEv/K5/w3HQPSkcJQcY FDUlNaQO7/lbXwyONf0xkQrptaWVCX4bu3/4hVWPiF6GrHiVgje5U7qJmroNpBMiBhI0Iy EtFZq2ZnAagcoFntDnry1o3FNFP3uV9Xs/Awagum4u/PLE9e+aYbmLEtUbMOcoIHXIjph1 kw5/kivsqtD/DvH77WXg8DDPFHKJOrf7YX80rmmmHdam9xbVaHFillta1/xa9bnCwBYUk4 pIbVd7jaU0nlXwy3yss33JL1lda6o1fHl5qdq4iYrsl5Oktl25YvQ15UEryQ3Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648456091; a=rsa-sha256; cv=none; b=c8cawwQAx1bwlFu+9qnXDxfKjMbAUklrMbbBjN9okuICN38pb6rDzkBAo/WYXOXqthv34F ZE7buNR5jnkqJnXYB0j2TNvA6UvdZ4hSoDoQXyVPpJT9e/obj9Niu3PH/FnxDqiQJE1tVf T/8kARSwE3iklMJvHUNHquEwoBO+CMPlZyTY5h8+rCgETy39oMUI4rrdWUkFnMrvpStrEu VpWPIye1KEvKSPSEV3UpUUWkg9uyVLbbcATtqBRDZGEvszJPxdIoJDDeR3oKqHZVGIXZr3 5bmQGy61BDXbcpKRE7t8B2rowrFI5q5j8XNSBS2iwUvjQ3Cx4/chAfJZojxdog== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=sarg.org.ru header.s=google header.b=efuLOXWA; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 1.63 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=sarg.org.ru header.s=google header.b=efuLOXWA; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: BE1985A96 X-Spam-Score: 1.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: CzIVM8V1/Rsz * 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