From patchwork Mon Oct 5 22:47:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Enge X-Patchwork-Id: 24479 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 ED74E27BBE9; Mon, 5 Oct 2020 23:48:26 +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=-1.2 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED,URIBL_SBL, URIBL_SBL_A 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 3291527BBE8 for ; Mon, 5 Oct 2020 23:48:26 +0100 (BST) Received: from localhost ([::1]:38926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPZHN-0006L4-A0 for patchwork@mira.cbaines.net; Mon, 05 Oct 2020 18:48:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPZH1-0006Kp-0u for guix-patches@gnu.org; Mon, 05 Oct 2020 18:48:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39198) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPZGz-0001wa-Om for guix-patches@gnu.org; Mon, 05 Oct 2020 18:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kPZGz-0005gz-M9 for guix-patches@gnu.org; Mon, 05 Oct 2020 18:48:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43654] [PATCH] Add perl-opengl Resent-From: Andreas Enge Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Oct 2020 22:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43654 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Malte Frank Gerdes Cc: Kei Kebreau , 43654@debbugs.gnu.org Received: via spool by 43654-submit@debbugs.gnu.org id=B43654.160193803721830 (code B ref 43654); Mon, 05 Oct 2020 22:48:01 +0000 Received: (at 43654) by debbugs.gnu.org; 5 Oct 2020 22:47:17 +0000 Received: from localhost ([127.0.0.1]:50744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPZG9-0005fu-7H for submit@debbugs.gnu.org; Mon, 05 Oct 2020 18:47:17 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:59056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPZG5-0005fj-94 for 43654@debbugs.gnu.org; Mon, 05 Oct 2020 18:47:08 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id AE32DF5; Tue, 6 Oct 2020 00:47:03 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R_dL2wkflptw; Tue, 6 Oct 2020 00:47:02 +0200 (CEST) Received: from jurong (unknown [IPv6:2001:910:103f::3f1]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 47E28D9; Tue, 6 Oct 2020 00:47:02 +0200 (CEST) Date: Tue, 6 Oct 2020 00:47:00 +0200 From: Andreas Enge Message-ID: <20201005224700.GA21768@jurong> References: <86pn67xcmn.fsf@gmail.com> <87mu15b6yw.fsf@posteo.net> <20201002182917.GB4862@jurong> <86362ws9sf.fsf@gmail.com> <20201005205129.GA13742@jurong> <20201005223543.GA19912@jurong> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201005223543.GA19912@jurong> 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 On Tue, Oct 06, 2020 at 12:35:43AM +0200, Andreas Enge wrote: > But it is already tomorrow, time to stop. Did I mention that Guix is addictive? Here is a patch that compiles and can run the examples in the subdirectory of the same name. If you feel like it, you could replace "cdr" by "match", and maybe test if all of the inputs are actually needed. Andreas From c6e00eac49ce859a53c1b00a6165c009f778885d Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Tue, 6 Oct 2020 00:43:45 +0200 Subject: [PATCH] gnu: Add perl-opengl. * gnu/packages/perl.scm (perl-opengl): New variable. Co-authored-by: Malte Frank Gerdes --- gnu/packages/perl.scm | 67 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 2 deletions(-) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index e093a63770..24de203741 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès -;;; Copyright © 2013, 2019 Andreas Enge +;;; Copyright © 2013, 2019, 2020 Andreas Enge ;;; Copyright © 2015, 2016, 2017, 2019 Ricardo Wurmus ;;; Copyright © 2015, 2016, 2017, 2019, 2020 Eric Bavier ;;; Copyright © 2015 Eric Dvorsak @@ -27,6 +27,7 @@ ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2020 Paul Garlick ;;; Copyright © 2020 Nicolas Goaziou +;;; Copyright © 2020 Malte Frank Gerdes ;;; ;;; This file is part of GNU Guix. ;;; @@ -74,7 +75,8 @@ #:use-module (gnu packages sdl) #:use-module (gnu packages textutils) #:use-module (gnu packages video) - #:use-module (gnu packages web)) + #:use-module (gnu packages web) + #:use-module (gnu packages xorg)) ;;; ;;; Please: Try to add new module packages in alphabetic order. @@ -7870,6 +7872,67 @@ technology to store hierarchical information such as links to other documents within a single file.") (license (package-license perl)))) +(define-public perl-opengl + (package + (name "perl-opengl") + (version "0.70") + (source + (origin + (method url-fetch) + (uri (string-append + "mirror://cpan/authors/id/C/CH/CHM/OpenGL-" + version + ".tar.gz")) + (sha256 + (base32 + "1q3lz168q081iwl9jg21fbzhp9la79gav9mv6nmh2jab83s2l3mj")))) + (build-system perl-build-system) + (inputs `(("mesa" ,mesa) ; TODO: needed? + ("glu" ,glu) ; TODO: needed? + ("freeglut" ,freeglut) ; TODO: needed? + ("libxi" ,libxi) + ("libxmu" ,libxmu))) + (arguments + '(#:tests? #f ; test.pl fails with our empty glversion.txt, while + ; the package still seems to work on the examples + #:phases + (modify-phases %standard-phases + (add-before 'configure 'glversion + ;; Building utils/glversion.txt fails, and is probably + ;; dependent on the graphics card in the build system. + ;; Replace it by a content-free file; while this breaks + ;; the tests, the examples in the examples/ subdirectory + ;; can be run. + (lambda _ + (substitute* "Makefile.PL" + (("unlink") "# unlink") ; prevent utils/glversion.txt + ; from being deleted once... + (("\\.\"\\$make_ver clean\"") "")) ; ...and twice... + (substitute* "utils/Makefile" + (("all: glversion.txt") "all: ")) ; ...and thrice. + (call-with-output-file "utils/glversion.txt" + (lambda (port) + (display (string-append "FREEGLUT=\nGLUT=\nVERSION=\n" + "VENDOR=\nRENDERER=\n" + "EXTENSIONS=\n") + port))) + #t)) + (add-before 'configure 'fix-library-flags + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "Makefile.PL" + (("-L/usr/local/freeglut/lib") + (string-concatenate + (map (lambda (input) + (string-append "-L" (cdr input) "/lib\n")) + inputs)))) + #t))))) + (home-page "https://metacpan.org/release/OpenGL") + (synopsis + "Perl bindings to the OpenGL API, GLU, and GLUT/FreeGLUT") + (description "The package provides Perl bindings to OpenGL, GLU +and FreeGLUT.") + (license (package-license perl)))) + (define-public perl-package-anon (package (name "perl-package-anon")