From patchwork Thu Feb 27 20:09:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Smith X-Patchwork-Id: 20457 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 3ECDD27BBEA; Thu, 27 Feb 2020 20:10:11 +0000 (GMT) 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,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 ESMTP id C161F27BBE4 for ; Thu, 27 Feb 2020 20:10:10 +0000 (GMT) Received: from localhost ([::1]:37724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7PU2-0004TZ-8D for patchwork@mira.cbaines.net; Thu, 27 Feb 2020 15:10:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54215) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7PTv-0004QW-Cp for guix-patches@gnu.org; Thu, 27 Feb 2020 15:10:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7PTu-0000zT-2f for guix-patches@gnu.org; Thu, 27 Feb 2020 15:10:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:54346) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j7PTt-0000zN-W5 for guix-patches@gnu.org; Thu, 27 Feb 2020 15:10:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j7PTt-0007Ic-RE for guix-patches@gnu.org; Thu, 27 Feb 2020 15:10:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#39814] [PATCH] gnu: anki: Fix mpv audio playback Resent-From: Robert Smith Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 27 Feb 2020 20:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39814 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39814@debbugs.gnu.org Cc: Robert Smith X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158283418828031 (code B ref -1); Thu, 27 Feb 2020 20:10:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Feb 2020 20:09:48 +0000 Received: from localhost ([127.0.0.1]:60319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7PTf-0007I2-Rp for submit@debbugs.gnu.org; Thu, 27 Feb 2020 15:09:48 -0500 Received: from lists.gnu.org ([209.51.188.17]:39828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7PTd-0007Hu-1v for submit@debbugs.gnu.org; Thu, 27 Feb 2020 15:09:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54153) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7PTZ-00048f-J2 for guix-patches@gnu.org; Thu, 27 Feb 2020 15:09:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7PTX-0000qH-A0 for guix-patches@gnu.org; Thu, 27 Feb 2020 15:09:41 -0500 Received: from mout01.posteo.de ([185.67.36.65]:40247) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j7PTW-0000pF-NT for guix-patches@gnu.org; Thu, 27 Feb 2020 15:09:39 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 6474F16005E for ; Thu, 27 Feb 2020 21:09:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1582834175; bh=87ckEHLF/l6tc9JCVNEf3InxgmYkPorcaHeoW4C6nHs=; h=From:To:Cc:Subject:Date:From; b=NgbLj5Jx7RJtITdtxXKZqhjZCHaYqD8XPrS0Y6eX1hu/oTAEbA6my2wmExLOaKJxf 1NJFRneEU50iwvzFZUxjQcBNOoLQQc1Tk3CM8SChQ5PV+ckDAdkxwCC6D2LSJghGRW mSlZv69kAWdDlAZUHw5GMpowAgpu8IHTsrPddmegW3UGENU2rCCPHtGVVASltzRv6t iORv04m/BoTIlD4Ns9NbiKB9dfyT/4YqUCi1CAkAoy6xzAW+cPEiFwmXBJSu4eZfTW O2lCEbd59t3/uB2TjA5XLyHHAIsiHXEz1bIFoXf5TfXUbGXZ+eYMi/0Be2D6P79hKc f0lzE5mYmiYQw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 48T3fk4gcgz6tmK; Thu, 27 Feb 2020 21:09:34 +0100 (CET) From: Robert Smith Date: Thu, 27 Feb 2020 21:09:09 +0100 Message-Id: <20200227200909.16365-1-robertsmith@posteo.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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/patches/anki-mpv-args.patch: New file. * gnu/packages/education.scm (anki): Adjust accordingly. --- mpv now requires that the input-ipc-server argument be passed with an equals sign and without any spaces. This is a slightly out-of-date version of anki, so presumably mpv used to be more lenient with command line arguments. mpv was also added to the PATH using wrap-program to to ensure anki can find it at runtime. --- gnu/packages/education.scm | 6 ++++- gnu/packages/patches/anki-mpv-args.patch | 30 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/anki-mpv-args.patch diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm index 20fc9a3706..d8427f6eab 100644 --- a/gnu/packages/education.scm +++ b/gnu/packages/education.scm @@ -738,7 +738,8 @@ adjust the level of difficulty.") (uri (string-append "https://apps.ankiweb.net/downloads/archive/anki-" version "-source.tgz")) (sha256 - (base32 "1gfr51rnllkyzli73p4r51h5ypzfa3m7lic3m3rzpywmqwrxs07k")))) + (base32 "1gfr51rnllkyzli73p4r51h5ypzfa3m7lic3m3rzpywmqwrxs07k")) + (patches (search-patches "anki-mpv-args.patch")))) (build-system gnu-build-system) (arguments `(#:make-flags (list (string-append "PREFIX=" %output)) @@ -779,6 +780,9 @@ adjust the level of difficulty.") (wrap-program program `("QTWEBENGINEPROCESS_PATH" = (,qtwebengineprocess)) + `("PATH" prefix (,(string-append + (assoc-ref inputs "mpv") + "/bin"))) `("PYTHONPATH" = ,site-packages))) (find-files bin "."))) #t))))) diff --git a/gnu/packages/patches/anki-mpv-args.patch b/gnu/packages/patches/anki-mpv-args.patch new file mode 100644 index 0000000000..a66632c0e0 --- /dev/null +++ b/gnu/packages/patches/anki-mpv-args.patch @@ -0,0 +1,30 @@ +From 0e2c723f2b920f96937725a12e3db13c14795117 Mon Sep 17 00:00:00 2001 +From: Robert Smith +Date: Thu, 27 Feb 2020 20:07:08 +0100 +Subject: [PATCH] Fix mpv argument formatting + +--- +mpv now requires that the input-ipc-server argument be passed with an +equals sign and without any spaces. This is a slightly out-of-date +version of anki, so presumably mpv used to be more lenient with +command line arguments. +--- + anki/mpv.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/anki/mpv.py b/anki/mpv.py +index f53d9d0..c6e7dd7 100644 +--- a/anki/mpv.py ++++ b/anki/mpv.py +@@ -104,7 +104,7 @@ class MPVBase: + """ + self.argv = [self.executable] + self.argv += self.default_argv +- self.argv += ["--input-ipc-server", self._sock_filename] ++ self.argv += ["--input-ipc-server=" + self._sock_filename] + if self.window_id is not None: + self.argv += ["--wid", str(self.window_id)] + +-- +2.25.0 +