From patchwork Wed Jul 27 19:00:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tomasz Jeneralczyk X-Patchwork-Id: 4079 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 A077E27BBEA; Wed, 27 Jul 2022 20:02:18 +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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,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 31C7027BBE9 for ; Wed, 27 Jul 2022 20:02:18 +0100 (BST) Received: from localhost ([::1]:57482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGmIT-0005IG-76 for patchwork@mira.cbaines.net; Wed, 27 Jul 2022 15:02:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGmHG-0005Hw-Mr for guix-patches@gnu.org; Wed, 27 Jul 2022 15:01:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39028) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGmHG-0004I3-9H for guix-patches@gnu.org; Wed, 27 Jul 2022 15:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oGmHG-0005mT-4G for guix-patches@gnu.org; Wed, 27 Jul 2022 15:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56803] [PATCH 1/6] gnu: Add swftools. Resent-From: Tomasz Jeneralczyk Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Jul 2022 19:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56803 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56803@debbugs.gnu.org Cc: Tomasz Jeneralczyk Received: via spool by 56803-submit@debbugs.gnu.org id=B56803.165894844922181 (code B ref 56803); Wed, 27 Jul 2022 19:01:02 +0000 Received: (at 56803) by debbugs.gnu.org; 27 Jul 2022 19:00:49 +0000 Received: from localhost ([127.0.0.1]:57006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGmH2-0005lh-WD for submit@debbugs.gnu.org; Wed, 27 Jul 2022 15:00:49 -0400 Received: from outgoing1.lunanode.net ([172.81.176.235]:42905) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGmH0-0005lW-Us for 56803@debbugs.gnu.org; Wed, 27 Jul 2022 15:00:47 -0400 Received: from mail2.lunanode.net (mail2.lunanode.net [158.69.21.179]) by outgoing1.lunanode.net (Postfix) with ESMTPS id AEEBA4005F for <56803@debbugs.gnu.org>; Wed, 27 Jul 2022 19:00:46 +0000 (UTC) From: Tomasz Jeneralczyk Date: Wed, 27 Jul 2022 21:00:23 +0200 Message-Id: <4bf3ae305cb32d5977c99b3bc644eabfcefb245f.1658946720.git.tj@schwi.pl> X-Mailer: git-send-email 2.37.1 In-Reply-To: References: 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 This package will built all of swftools' tools but one: PDF2SWF, so I purposefuly commented it out of description. Swftools includes the source tarball of an old version of xpdf and I have not been successful in replacing it with the version distributed in guix. However I believe the near-completeness of the package warrants a release. Also updated copyright and used modules. *gnu/packages/animation.scm (swftools): Add variable. --- gnu/packages/animation.scm | 93 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/gnu/packages/animation.scm b/gnu/packages/animation.scm index c281772563..3078f586cf 100644 --- a/gnu/packages/animation.scm +++ b/gnu/packages/animation.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice ;;; Copyright © 2019 Pkill -9 ;;; Copyright © 2020, 2021 Vinicius Monego +;;; Copyright © 2022 Tomasz Jeneralczyk ;;; ;;; This file is part of GNU Guix. ;;; @@ -47,6 +48,7 @@ (define-module (gnu packages animation) #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) #:use-module (gnu packages jemalloc) + #:use-module (gnu packages mp3) #:use-module (gnu packages networking) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) @@ -496,3 +498,94 @@ (define-public pencil2d lets you create traditional hand-drawn animations (cartoons) using both bitmap and vector graphics.") (license license:gpl2))) + +(define-public swftools + ;; Last release of swftools was 0.9.2 on 2012-04-21 - it is really old and + ;; does not compile with what's available in guix, master on the other hand works. + (let ((commit "772e55a271f66818b06c6e8c9b839befa51248f4") + (revision "1")) + (package + (name "swftools") + (version (git-version "0.9.2" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/matthiaskramm/swftools") + (commit commit))) + (sha256 + (base32 "0a8a29rn7gpxnba3spnvkpdgr7mdlssvr273mzw5b2wjvbzard3w")) + (file-name (git-file-name name version)) + (modules '((guix build utils))) + (snippet + '(begin + ;; To fix a linking error I followed the workaround in: + ;; https://github.com/matthiaskramm/swftools/issues/178 + ;; and implented it as a two-step snippet because substitute* + ;; does not match multiline regexes. + (substitute* "lib/lame/quantize.c" + ;; move inline keywords to the same line as their function headers + (("^inline.*\n") "inline ")) + (substitute* "lib/lame/quantize.c" + ;; make this particular function not inline + (("inline (void bitpressure_strategy1)" _ f) f)))))) + (build-system gnu-build-system) + (arguments + (list #:tests? #f)) ; no rule for check + (inputs (list zlib freetype giflib libjpeg-turbo lame)) + (home-page "http://www.swftools.org") + (synopsis "Collection of utilities for working with Adobe Flash files") + (description "SWFTools is a collection of utilities for working with +Adobe Flash files (SWF files). The tool collection includes programs for +reading SWF files, combining them, and creating them from other content (like +images, sound files, videos or sourcecode). The current collection is + comprised of the programs detailed below: + +@itemize +@comment PDF2SWF is not currentlybeing build alongside other tools. The next +@comment two lines should be uncommented if this will ever get fixed. +@comment @item +@comment @command{PDF2SWF} A PDF to SWF Converter. + +@item +@command{SWFCombine} A multi-function tool for inserting, contatenating, +stacking and changing parameters in SWFs. + +@item +@command{SWFStrings} Scans SWFs for text data. +@item +@command{SWFDump} Prints out various informations about SWFs. + +@item +@command{JPEG2SWF} Takes one or more JPEG pictures and generates a SWF +slideshow from them. + +@item +@command{PNG2SWF} Like JPEG2SWF, only for PNGs. + +@item +@command{GIF2SWF} Converts GIFs to SWF. Also able to handle animated gifs. + +@item +@command{WAV2SWF} Converts WAV audio files to SWFs, using the L.A.M.E. MP3 + encoder library. + +@item +@command{Font2SWF} Converts font files (TTF, Type1) to SWF. + +@item +@command{SWFBBox} Allows to read out, optimize and readjust SWF bounding boxes. + +@item +@command{SWFC} A tool for creating SWF files from simple script files. Supports +both ActionScript 2.0 aand 3.0. + +@item +@command{SWFExtract} Allows to extract Movieclips, Sounds, Images etc. from SWF + files. + +@item +@command{AS3Compile} A standalone ActionScript 3.0 compiler. Mostly compatible + with Flex. +@end itemize") + (license license:gpl2)))) From patchwork Wed Jul 27 19:00:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tomasz Jeneralczyk X-Patchwork-Id: 4080 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 EF45827BBE9; Wed, 27 Jul 2022 20:02:18 +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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS 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 A2F1627BBEB for ; Wed, 27 Jul 2022 20:02:18 +0100 (BST) Received: from localhost ([::1]:57484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGmIT-0005IH-Ia for patchwork@mira.cbaines.net; Wed, 27 Jul 2022 15:02:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGmHH-0005Hx-2C for guix-patches@gnu.org; Wed, 27 Jul 2022 15:01:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGmHG-0004IA-MV for guix-patches@gnu.org; Wed, 27 Jul 2022 15:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oGmHG-0005ma-IT for guix-patches@gnu.org; Wed, 27 Jul 2022 15:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56803] [PATCH 2/6] gnu: Add python-xvfbwrapper. Resent-From: Tomasz Jeneralczyk Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Jul 2022 19:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56803 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56803@debbugs.gnu.org Cc: Tomasz Jeneralczyk Received: via spool by 56803-submit@debbugs.gnu.org id=B56803.165894845722202 (code B ref 56803); Wed, 27 Jul 2022 19:01:02 +0000 Received: (at 56803) by debbugs.gnu.org; 27 Jul 2022 19:00:57 +0000 Received: from localhost ([127.0.0.1]:57009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGmHB-0005m2-HV for submit@debbugs.gnu.org; Wed, 27 Jul 2022 15:00:57 -0400 Received: from outgoing1.lunanode.net ([172.81.176.235]:42906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGmH9-0005lu-Rz for 56803@debbugs.gnu.org; Wed, 27 Jul 2022 15:00:56 -0400 Received: from mail2.lunanode.net (mail2.lunanode.net [158.69.21.179]) by outgoing1.lunanode.net (Postfix) with ESMTPS id 9D69F4005C for <56803@debbugs.gnu.org>; Wed, 27 Jul 2022 19:00:55 +0000 (UTC) From: Tomasz Jeneralczyk Date: Wed, 27 Jul 2022 21:00:24 +0200 Message-Id: <0c2730a83a8e03fdc14b6f15cb86428bbca77308.1658946720.git.tj@schwi.pl> X-Mailer: git-send-email 2.37.1 In-Reply-To: References: 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 Also updates copyright. * gnu/packages/python-check.scm (python-xvfbwrapper): New variable. --- gnu/packages/python-check.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index af0e5be28b..e5d9600490 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2021 Bonface Munyoki Kilyungi ;;; Copyright © 2022 Malte Frank Gerdes ;;; Copyright © 2022 Felix Gruber +;;; Copyright © 2022 Tomasz Jeneralczyk ;;; ;;; This file is part of GNU Guix. ;;; @@ -2373,3 +2374,24 @@ (define-public python-pycotap attachments). @end itemize") (license license:expat))) + +(define-public python-xvfbwrapper + (package + (name "python-xvfbwrapper") + (version "0.2.9") + (source (origin + (method url-fetch) + (uri (pypi-uri "xvfbwrapper" version)) + (sha256 + (base32 + "097wxhvp01ikqpg1z3v8rqhss6f1vwr399zpz9a05d2135bsxx5w")))) + (build-system python-build-system) + (propagated-inputs (list xorg-server-for-tests)) + (home-page "https://github.com/cgoldberg/xvfbwrapper") + (synopsis "Python module for controlling virtual displays with Xvfb") + (description + "Xvfb (X virtual framebuffer) is a display server implementing +the X11 display server protocol. It runs in memory and does not require a +physical display. Only a network layer is necessary. Xvfb is useful for +running acceptance tests on headless servers.") + (license license:expat))) From patchwork Wed Jul 27 19:00:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tomasz Jeneralczyk X-Patchwork-Id: 4084 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 DF60427BBEA; Wed, 27 Jul 2022 20:12:46 +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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,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 89FDD27BBE9 for ; Wed, 27 Jul 2022 20:12:46 +0100 (BST) Received: from localhost ([::1]:37284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGmSb-0003A4-JC for patchwork@mira.cbaines.net; Wed, 27 Jul 2022 15:12:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGmIN-0005Xx-9Q for guix-patches@gnu.org; Wed, 27 Jul 2022 15:02:11 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39041) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGmIE-0004Lb-7Y for guix-patches@gnu.org; Wed, 27 Jul 2022 15:02:10 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oGmID-0005pM-VB for guix-patches@gnu.org; Wed, 27 Jul 2022 15:02:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56803] [PATCH 3/6] gnu: Add python-mpv. Resent-From: Tomasz Jeneralczyk Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Jul 2022 19:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56803 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56803@debbugs.gnu.org Cc: Tomasz Jeneralczyk Received: via spool by 56803-submit@debbugs.gnu.org id=B56803.165894846422262 (code B ref 56803); Wed, 27 Jul 2022 19:02:01 +0000 Received: (at 56803) by debbugs.gnu.org; 27 Jul 2022 19:01:04 +0000 Received: from localhost ([127.0.0.1]:57014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGmHH-0005mz-SE for submit@debbugs.gnu.org; Wed, 27 Jul 2022 15:01:04 -0400 Received: from outgoing1.lunanode.net ([172.81.176.235]:42907) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGmHG-0005mR-36 for 56803@debbugs.gnu.org; Wed, 27 Jul 2022 15:01:02 -0400 Received: from mail2.lunanode.net (mail2.lunanode.net [158.69.21.179]) by outgoing1.lunanode.net (Postfix) with ESMTPS id C5D314005F for <56803@debbugs.gnu.org>; Wed, 27 Jul 2022 19:01:01 +0000 (UTC) From: Tomasz Jeneralczyk Date: Wed, 27 Jul 2022 21:00:25 +0200 Message-Id: <8dec60b4f6d340aa63e58ef1e7628d4d8801fc0b.1658946720.git.tj@schwi.pl> X-Mailer: git-send-email 2.37.1 In-Reply-To: References: 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 Author states that the license of the library is inherited from libmpv, which can be either GPLv2 or LPGLv2.1. That's why the package's license is set to be the same as mpv's. One of the tests had to be disabled because it would neither fail or pass, blocking all other tests from running and the package from finishing its build process. I have no clue on why it happens. Rarely some tests fail without any apparent reason. This is possibly related to: https://github.com/jaseg/python-mpv/issues/209 Also add copyright. * gnu/packages/python-xyz.scm (python-mpv): Add variable. --- gnu/packages/python-xyz.scm | 62 +++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index ac7c0d6066..5bc40ecaea 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -124,6 +124,7 @@ ;;; Copyright © 2022 Artyom V. Poptsov ;;; Copyright © 2022 Paul A. Patience ;;; Copyright © 2022 Jean-Pierre De Jesus DIAZ +;;; Copyright © 2022 Tomasz Jeneralczyk ;;; ;;; This file is part of GNU Guix. ;;; @@ -30203,3 +30204,64 @@ (define-public python-bsdiff4 binary diff utility. It also provides two command-line tools, @code{bsdiff4} and @code{bspatch4}.") (license license:bsd-2))) + +(define-public python-mpv + (package + (name "python-mpv") + (version "v1.0.1") + (source + (origin + ;; python-mpv from pypi does not include the tests directory. + (method git-fetch) + (uri (git-reference + (url "https://github.com/jaseg/python-mpv") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "10w6j3n62ap45sf6q487kz8z6g58sha37i14fa2hhng794z7a8jh")) + (modules '((guix build utils))) + (snippet + (with-extensions (list mpv) + #~(begin + ;; Without an absolute path it is not able find and + ;; load the libmpv library. + (substitute* "mpv.py" + (("(sofile = )(.*)" _ pre post) + (string-append pre "\"" #$mpv "/lib/\" + " post))) + ;; One of the tests never completes, so neutering it using + ;; early return allows other test to run without issue. + (substitute* "tests/test_mpv.py" + ;; Note the typo in "prooperty" - this was fixed later in + ;; upstream but has no effect on whether the tests hangs or not. + (("test_wait_for_prooperty_event_overflow.*" line) + ;; The long whitespace between \n and return is to match the + ;; identation level, which is significant in python. + (string-append line "\n return\n")))))))) + (build-system python-build-system) + (arguments + (list #:phases + (with-imported-modules '((guix build utils)) + #~(modify-phases %standard-phases + (add-before 'check 'prepare-for-tests + (lambda _ + ;; Fontconfig throws errors when it has no cache dir to use. + (setenv "XDG_CACHE_HOME" (getcwd)) + ;; Some tests fail without a writable and readable HOME. + (setenv "HOME" (getcwd)))))))) + (native-inputs + (list python-xvfbwrapper)) ; needed for tests only + (inputs (list mpv)) + (propagated-inputs (list python-pillow)) ; for raw screenshots + (home-page "https://github.com/jaseg/python-mpv") + (synopsis "Python interface to the mpv media player") + (description + "python-mpv is a ctypes-based python interface to the mpv media player. +It gives you more or less full control of all features of the player, just +as the lua interface does.") + ;; From the project's README: + ;; python-mpv inherits the underlying libmpv's license, which can be either + ;; GPLv2 or later (default) or LGPLv2.1 or later. For details, see the mpv + ;; copyright page. + (license (package-license mpv)))) + From patchwork Wed Jul 27 19:00:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tomasz Jeneralczyk X-Patchwork-Id: 4083 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 48B3227BBEA; Wed, 27 Jul 2022 20:04:57 +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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,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 06D0527BBE9 for ; Wed, 27 Jul 2022 20:04:57 +0100 (BST) Received: from localhost ([::1]:59062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGmL2-0006V7-2O for patchwork@mira.cbaines.net; Wed, 27 Jul 2022 15:04:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGmIN-0005Xy-A7 for guix-patches@gnu.org; Wed, 27 Jul 2022 15:02:11 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39042) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGmIE-0004Lc-Ft for guix-patches@gnu.org; Wed, 27 Jul 2022 15:02:10 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oGmIE-0005pU-Bd for guix-patches@gnu.org; Wed, 27 Jul 2022 15:02:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56803] [PATCH 4/6] gnu: Add opencv-with-python. Resent-From: Tomasz Jeneralczyk Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Jul 2022 19:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56803 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56803@debbugs.gnu.org Cc: Tomasz Jeneralczyk Received: via spool by 56803-submit@debbugs.gnu.org id=B56803.165894846722278 (code B ref 56803); Wed, 27 Jul 2022 19:02:02 +0000 Received: (at 56803) by debbugs.gnu.org; 27 Jul 2022 19:01:07 +0000 Received: from localhost ([127.0.0.1]:57017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGmHL-0005nF-BR for submit@debbugs.gnu.org; Wed, 27 Jul 2022 15:01:07 -0400 Received: from outgoing1.lunanode.net ([172.81.176.235]:42908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGmHK-0005n8-Gs for 56803@debbugs.gnu.org; Wed, 27 Jul 2022 15:01:06 -0400 Received: from mail2.lunanode.net (mail2.lunanode.net [158.69.21.179]) by outgoing1.lunanode.net (Postfix) with ESMTPS id 483A54005F for <56803@debbugs.gnu.org>; Wed, 27 Jul 2022 19:01:06 +0000 (UTC) From: Tomasz Jeneralczyk Date: Wed, 27 Jul 2022 21:00:26 +0200 Message-Id: <6aa37f20d813d0849a7de27ca5fc674c73e298e9.1658946720.git.tj@schwi.pl> X-Mailer: git-send-email 2.37.1 In-Reply-To: References: 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 Also add copyright. * gnu/packages/image-processing.scm (opencv-with-python): Add variable. --- gnu/packages/image-processing.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm index bcb1d7a2f6..9496155ec7 100644 --- a/gnu/packages/image-processing.scm +++ b/gnu/packages/image-processing.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2021 Guillaume Le Vaillant ;;; Copyright © 2021 Ivan Gankevich ;;; Copyright © 2022 Maxim Cournoyer +;;; Copyright © 2022 Tomasz Jeneralczyk ;;; ;;; This file is part of GNU Guix. ;;; @@ -657,6 +658,17 @@ (define-public opencv (home-page "https://opencv.org/") (license license:bsd-3))) +(define-public opencv-with-python + (package + (inherit opencv) + (name "opencv-with-python") + (arguments + (let* ((args (package-arguments opencv))) + (assoc-set! args #:configure-flags + (append (list "-DBUILD_opencv_python3=ON") + (assoc-ref args #:configure-flags))) + args)))) + (define-public vips (package (name "vips") From patchwork Wed Jul 27 19:00:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tomasz Jeneralczyk X-Patchwork-Id: 4081 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 3171427BBEA; Wed, 27 Jul 2022 20:03:06 +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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS 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 DE0EF27BBE9 for ; Wed, 27 Jul 2022 20:03:05 +0100 (BST) Received: from localhost ([::1]:58046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGmJF-0005kA-04 for patchwork@mira.cbaines.net; Wed, 27 Jul 2022 15:03:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGmIN-0005Xw-8o for guix-patches@gnu.org; Wed, 27 Jul 2022 15:02:11 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39043) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGmIE-0004Ld-S3 for guix-patches@gnu.org; Wed, 27 Jul 2022 15:02:10 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oGmIE-0005pb-Ne for guix-patches@gnu.org; Wed, 27 Jul 2022 15:02:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56803] [PATCH 5/6] gnu: Update python-cloudscraper. Resent-From: Tomasz Jeneralczyk Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Jul 2022 19:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56803 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56803@debbugs.gnu.org Cc: Tomasz Jeneralczyk Received: via spool by 56803-submit@debbugs.gnu.org id=B56803.165894847322304 (code B ref 56803); Wed, 27 Jul 2022 19:02:02 +0000 Received: (at 56803) by debbugs.gnu.org; 27 Jul 2022 19:01:13 +0000 Received: from localhost ([127.0.0.1]:57020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGmHQ-0005nd-NQ for submit@debbugs.gnu.org; Wed, 27 Jul 2022 15:01:13 -0400 Received: from outgoing1.lunanode.net ([172.81.176.235]:42909) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGmHO-0005nP-Hx for 56803@debbugs.gnu.org; Wed, 27 Jul 2022 15:01:11 -0400 Received: from mail2.lunanode.net (mail2.lunanode.net [158.69.21.179]) by outgoing1.lunanode.net (Postfix) with ESMTPS id 5CACB4005F for <56803@debbugs.gnu.org>; Wed, 27 Jul 2022 19:01:10 +0000 (UTC) From: Tomasz Jeneralczyk Date: Wed, 27 Jul 2022 21:00:27 +0200 Message-Id: <696590f60e67256e9fd6a641b3ab6f83816be9ac.1658946720.git.tj@schwi.pl> X-Mailer: git-send-email 2.37.1 In-Reply-To: References: 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 Neither 1.2.58 nor 1.2.60 version of python-cloudscraper requires compatibility with python2 afaik. This removes possible collisions with packages that depend on the mainstream version of python-pyparsing. * gnu/packages/python-web.scm (python-cloudscraper): Update to 1.2.60 * gnu/packages/python-web.scm (python-cloudscraper)[propagated-inputs]: Change python-pyparsing to its mainstream version --- gnu/packages/python-web.scm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 7c5e5651c8..42e501d3dd 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -53,6 +53,7 @@ ;;; Copyright © 2022 Peter Polidoro ;;; Copyright © 2022 Antero Mejr ;;; Copyright © 2022 Luis Henrique Gomes Higino +;;; Copyright © 2022 Tomasz Jeneralczyk ;;; ;;; This file is part of GNU Guix. ;;; @@ -6243,17 +6244,16 @@ (define-public python-http-ece (define-public python-cloudscraper (package (name "python-cloudscraper") - (version "1.2.58") + (version "1.2.60") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/VeNoMouS/cloudscraper") - ;; Corresponds to 1.2.58 - (commit "f3a3d067ea8b5238e9a0948aed0c3fa0d9c29b96"))) + (commit "1.2.60"))) (file-name (git-file-name name version)) (sha256 - (base32 "18fbp086imabjxly04rrchbf6n6m05bpd150zxbw7z2w3mjnpsqd")) + (base32 "00cmxgwdm0x1j4a4ipwvpzih735hdzidljbijk1b3laj3dgvnvsm")) (modules '((guix build utils))) (snippet '(with-directory-excursion "cloudscraper" @@ -6293,7 +6293,7 @@ (define-public python-cloudscraper python-requests python-requests-toolbelt python-responses - python-pyparsing-2.4.7)) + python-pyparsing)) (native-inputs (list python-pytest)) (home-page "https://github.com/venomous/cloudscraper") From patchwork Wed Jul 27 19:00:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tomasz Jeneralczyk X-Patchwork-Id: 4082 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 5A91327BBEA; Wed, 27 Jul 2022 20:03:49 +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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,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 AE14727BBE9 for ; Wed, 27 Jul 2022 20:03:48 +0100 (BST) Received: from localhost ([::1]:58618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGmJv-00069Z-Bq for patchwork@mira.cbaines.net; Wed, 27 Jul 2022 15:03:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGmIN-0005Xv-80 for guix-patches@gnu.org; Wed, 27 Jul 2022 15:02:11 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39044) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGmIF-0004Le-87 for guix-patches@gnu.org; Wed, 27 Jul 2022 15:02:10 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oGmIF-0005pi-3v for guix-patches@gnu.org; Wed, 27 Jul 2022 15:02:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56803] [PATCH 6/6] gnu: Add hydrus-network. Resent-From: Tomasz Jeneralczyk Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Jul 2022 19:02:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56803 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56803@debbugs.gnu.org Cc: Tomasz Jeneralczyk Received: via spool by 56803-submit@debbugs.gnu.org id=B56803.165894847822325 (code B ref 56803); Wed, 27 Jul 2022 19:02:03 +0000 Received: (at 56803) by debbugs.gnu.org; 27 Jul 2022 19:01:18 +0000 Received: from localhost ([127.0.0.1]:57023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGmHV-0005o0-89 for submit@debbugs.gnu.org; Wed, 27 Jul 2022 15:01:17 -0400 Received: from outgoing1.lunanode.net ([172.81.176.235]:42910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGmHS-0005nq-PC for 56803@debbugs.gnu.org; Wed, 27 Jul 2022 15:01:15 -0400 Received: from mail2.lunanode.net (mail2.lunanode.net [158.69.21.179]) by outgoing1.lunanode.net (Postfix) with ESMTPS id 91A1B4005F for <56803@debbugs.gnu.org>; Wed, 27 Jul 2022 19:01:14 +0000 (UTC) From: Tomasz Jeneralczyk Date: Wed, 27 Jul 2022 21:00:28 +0200 Message-Id: <9622a5d87b172e7f9ae838da45f15eb0ba95e374.1658946720.git.tj@schwi.pl> X-Mailer: git-send-email 2.37.1 In-Reply-To: References: 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 Hydrus-network has a weekly release cycle and is meant to be used from its own directory so I artificially spread it out to comply with guix's expectations. Three binaries from inputs are copied into a directory hydrus knows about: * ffmpeg - works as expected * swftools - does not do anything neither on guix or Arch linux - possibly an unfinished feature, but I left it in, in case it gets fixed in a future version. * miniupnpc - times out on my system, but it should work otherwise. I was not able to build the program's help files. Updating python-pymdown-extensions to its latest version might be the solution, but this would require also packaging its new build system that is not present in guix yet. I decided to cut short there. Also adds copyright and new used modules. * gnu/packages/image-viewers.scm (hydrus-network): Add variable. --- gnu/packages/image-viewers.scm | 127 +++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm index 8d4d2351c3..9574384761 100644 --- a/gnu/packages/image-viewers.scm +++ b/gnu/packages/image-viewers.scm @@ -24,6 +24,7 @@ ;;; Copyright © 2021 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2021 dissent ;;; Copyright © 2022 Michael Rohleder +;;; Copyright © 2022 Tomasz Jeneralczyk ;;; ;;; This file is part of GNU Guix. ;;; @@ -54,6 +55,7 @@ (define-module (gnu packages image-viewers) #:use-module (guix build-system qt) #:use-module (gnu packages autotools) #:use-module (gnu packages algebra) + #:use-module (gnu packages animation) #:use-module (gnu packages backup) #:use-module (gnu packages base) #:use-module (gnu packages bash) @@ -84,14 +86,20 @@ (define-module (gnu packages image-viewers) #:use-module (gnu packages photo) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-check) + #:use-module (gnu packages python-compression) + #:use-module (gnu packages python-crypto) + #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages suckless) #:use-module (gnu packages terminals) + #:use-module (gnu packages upnp) #:use-module (gnu packages version-control) #:use-module (gnu packages video) #:use-module (gnu packages web) #:use-module (gnu packages xdisorg) + #:use-module (gnu packages xml) #:use-module (gnu packages xorg) #:use-module (gnu packages)) @@ -973,3 +981,122 @@ (define-public xzgv (description "xzgv is a fast image viewer that provides extensive keyboard support.") (license license:gpl2+))) + +(define-public hydrus-network + (package + (name "hydrus-network") + (version "492") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hydrusnetwork/hydrus") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0cyc499is97r8wri0y86yw6kpfcvc0a1yslr8g8sk4vhlly8gnra")))) + (build-system python-build-system) + (arguments + (list + #:phases + (with-imported-modules '((guix build utils)) + #~(let ((bin-dir "/libexec/hydrus") + (static-dir "/share/hydrus/static")) + (modify-phases %standard-phases + ;; Hydrus is a python program but does not uses setup.py or any + ;; other build system to build itself - it's delivered ready to + ;; run from the source. + (replace 'check + (lambda _ + (setenv "DISPLAY" ":0") + (setenv "XDG_CACHE_HOME" (getcwd)) + (setenv "HOME" (getcwd)) + (system "Xvfb &") + (invoke "python" "test.py"))) + (delete 'build) + (add-before 'install 'patch-variables + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "hydrus/core/HydrusConstants.py" + (("STATIC_DIR = (.*)\n") + (string-append "STATIC_DIR = \"" out static-dir "\"")) + (("BIN_DIR = (.*)\n") + (string-append "BIN_DIR = \"" out bin-dir "\"\n")))))) + (replace 'install + (lambda* (#:key outputs inputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (python (assoc-ref inputs "python")) + (client-path (string-append out "/bin/hydrus")) + (server-path (string-append out "/bin/hydrus-server"))) + (copy-recursively "static" + (string-append out static-dir)) + (copy-recursively "hydrus" + (string-append out + "/lib/python" + (python-version python) + "/site-packages/hydrus")) + (mkdir (string-append out "/bin")) + (copy-file "client.py" client-path) + (chmod client-path #o0555) + (copy-file "server.py" server-path) + (chmod server-path #o0555)))) + ;; Hydrus searches for some binaries at bin-dir so it's important + ;; to put them there so it can find and use them. + (add-after 'install 'pupulate-libexec + (lambda* (#:key outputs inputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (out/bin-dir (string-append out bin-dir))) + (mkdir-p out/bin-dir) + (copy-file + (string-append (assoc-ref inputs "swftools") "/bin/swfrender") + (string-append out/bin-dir "/swfrender_linux")) + (copy-file + (string-append (assoc-ref inputs "ffmpeg") "/bin/ffmpeg") + (string-append out/bin-dir "/ffmpeg")) + (copy-file + (string-append (assoc-ref inputs "miniupnpc") "/bin/upnpc") + (string-append out/bin-dir "/miniupnpc")))))))))) + ;; All native-inputs are only needed for the the check phase + (native-inputs + (list + python-nose + python-mock + python-httmock + xorg-server-for-tests)) + ;; All python packages were taken from static/build_files/linux/requirements.txt + (propagated-inputs + (list + python-beautifulsoup4 + python-cbor2 + python-chardet + python-cloudscraper + python-html5lib + python-lxml + python-lz4 + python-numpy + opencv-with-python ; drop-in replacement for opencv-python-headless + python-pillow + python-psutil + python-pylzma + python-pyopenssl + python-pyside-2 + python-pysocks + python-mpv + python-pyyaml + python-qtpy + python-requests + python-send2trash + python-service-identity + python-six + python-twisted)) + (inputs (list swftools ffmpeg miniupnpc)) + (synopsis "Organize your media with tags like a dektop booru") + (description + "The hydrus network client is an application written for +internet-fluent media nerds who have large image/swf/webm collections. +It browses with tags instead of folders, a little like a booru on your desktop. +Advanced users can share tags and files anonymously through custom servers that +any user may run. Everything is free and privacy is the first concern.") + (home-page "https://hydrusnetwork.github.io/hydrus/") + (license license:wtfpl2)))