From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id bnxvJ1QHfl8IDQAA0tVLHw (envelope-from ) for ; Wed, 07 Oct 2020 18:22:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id IKGyIlQHfl/cEAAAB5/wlQ (envelope-from ) for ; Wed, 07 Oct 2020 18:22:12 +0000 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 CF6F79402A2 for ; Wed, 7 Oct 2020 18:22:11 +0000 (UTC) Received: from localhost ([::1]:48428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kQE4m-0008Ix-Oy for larch@yhetil.org; Wed, 07 Oct 2020 14:22:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQE4g-0008Il-K3 for guix-patches@gnu.org; Wed, 07 Oct 2020 14:22:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46499) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kQE4g-0007Pa-Ai for guix-patches@gnu.org; Wed, 07 Oct 2020 14:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kQE4g-0006bG-6v for guix-patches@gnu.org; Wed, 07 Oct 2020 14:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43654] [PATCH] Add perl-opengl References: <86pn67xcmn.fsf@gmail.com> In-Reply-To: <86pn67xcmn.fsf@gmail.com> Resent-From: Malte Frank Gerdes Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Oct 2020 18:22:02 +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: 43654@debbugs.gnu.org Received: via spool by 43654-submit@debbugs.gnu.org id=B43654.160209487225314 (code B ref 43654); Wed, 07 Oct 2020 18:22:02 +0000 Received: (at 43654) by debbugs.gnu.org; 7 Oct 2020 18:21:12 +0000 Received: from localhost ([127.0.0.1]:58045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQE3i-0006a5-Q5 for submit@debbugs.gnu.org; Wed, 07 Oct 2020 14:21:11 -0400 Received: from mail-ej1-f67.google.com ([209.85.218.67]:45663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQE3e-0006ZE-OZ for 43654@debbugs.gnu.org; Wed, 07 Oct 2020 14:21:02 -0400 Received: by mail-ej1-f67.google.com with SMTP id dt13so4329314ejb.12 for <43654@debbugs.gnu.org>; Wed, 07 Oct 2020 11:20:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=C8+MMHauUZgAOZ1/LOYgZED4TUWt1nK//pkkVfdteng=; b=RJcjF/ti9lhoMWo/55o80Jo+Dhk7Dko0//X9qlNizjARjVVXsVnMw8nSM7XcJ77PN0 OzDB2dmGdBsZ4Wvh5cITNhHIMVSF+Sr05V53ae/VRRXId6F4rErTiti/0CDHfzttXrhT JAjQ7qimNS4bg1JwvEgyHK88n5hmbpwQubgx7cH9X2noCXx7h0I5B7YQ5dYuF8rQl5Py dE5J4lLMCRkslI0uuzyYpILQzL65HHPcIAlQ36v2ahwuHkBMgoUEtkVlwtmYVyndjoJw IGx4STh2rNs0TNNWnesnhwmEYLJ46TULZ1VQ+sbq9JdtO/0CFQeXmALm9JKzAtCL27x8 BfIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=C8+MMHauUZgAOZ1/LOYgZED4TUWt1nK//pkkVfdteng=; b=VhjI5YjEi3qmyB4Y6THDGNDPBVv99mIB9SEbhzigiqBZmrV6Ty7D8wzT5Fm4crLY+j TDRbymCS8wkVXqEdqpzCU/JR5sdDpKwzw2SsptgAhMqgG8HvIIjKxgg+5SlMKWdF+Lt2 TVMoRuD/TSn0MdBpaw5HbgZF9fjN1YK4kObGCLBvblojflAM1qcvh1gVMRt9mw05eR3T RyDSf89EWo53VHCmrYOC1pVgfdEkAhKzMKeYqb5uwgYownehkxj0x5wpCfy/Y8HaVs45 1RVUDhCMiim/iQWc7RI4a59s93yDEYIgLyzTQYIKDe1+XEIKcxixXydqf+YFC2L9/OD6 HcMA== X-Gm-Message-State: AOAM533BiP7t0E9yM+FxbIvNhrsJCYm8MxDsGjhdJk3g/xi9qiWgniAN J4CtoOM/yfnp6e9G0JmoaDxFEVzWT2c= X-Google-Smtp-Source: ABdhPJyjyTPFBjNjNXDk2T5UWfbqQ04fyOlH20FQJsdMJ7DU5b1y4pcfxMtP6t5BkQT5oU3zdPp+yg== X-Received: by 2002:a17:906:4ec7:: with SMTP id i7mr4088416ejv.439.1602094852310; Wed, 07 Oct 2020 11:20:52 -0700 (PDT) Received: from Morphium (ip-84-118-73-55.unity-media.net. [84.118.73.55]) by smtp.gmail.com with ESMTPSA id qw1sm1576580ejb.44.2020.10.07.11.20.51 for <43654@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Oct 2020 11:20:51 -0700 (PDT) From: Malte Frank Gerdes Date: Wed, 07 Oct 2020 20:20:51 +0200 Message-ID: <86pn5t6gos.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.2 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -0.5 (/) 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=RJcjF/ti; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 0.59 X-TUID: gvjKg0rTq4ch Forgot to Cc the list... Andreas Enge writes: > On Fri, Oct 02, 2020 at 09:33:04PM +0200, Malte Frank Gerdes wrote: >> I just tried to build with those variables set to arbitrary values: >>=20 >> --8<---------------cut here---------------start------------->8--- >> GLUT=3D99999 >> VERSION=3D3.0 Mesa 99.99.99 >> VENDOR=3DNoVendor >> RENDERER=3DMesaRenderer >> --8<---------------cut here---------------end--------------->8--- > > Actually I just went further: > FREEGLUT=3D > GLUT=3D > VERSION=3D > VENDOR=3D > RENDERER=3D > EXTENSIONS=3D Nice! (I didn't even think of leaving them empty ...) > The package compiles, but running test.pl (which showed just a blank squa= re > before) now fails with this message: > Goto undefined subroutine &AutoLoader::AUTOLOAD at > /home/andreas/.guix-profile/lib/perl5/site_perl/5.30.2/x86_64-linux-threa= d-multi/OpenGL.pm > line 6178. > > However, I tried several of the examples, and they work. > > So one option would be to disable the test ("#:tests? #f") and create the > essentially empty glversion.txt file above inside a phase. There would not > even be a need to store it as a an auxiliary file; see the use of > "call-with-output-file" in guix/tests.scm, for instance. > > What do you think? > > Andreas > IMHO disabling the tests is the best solution then - it didn't /really/ test the libraries functionality it seems, because the examples do much more different things.=20 > Something like this: > (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 test, 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=3D\nGLUT=3D\nVERSION= =3D\n" > "VENDOR=3D\nRENDERER=3D\n" > "EXTENSIONS=3D\n") > port))) > #t)) >=20 > I tried to add the following instead of patching Makefile.PL: > (add-before 'configure 'fix-interface > ;; Libraries are not found in default locations, so force > ;; an interface. > (lambda _ > (substitute* "Makefile.PL" > (("die \"FreeGLUT or GLUT libraries") > "$interface_lib =3D 'FREEGLUT'; #")) > #t)) >=20 > But it fails during compilation with error messages such as this one: > /gnu/store/1qmd9achfkm1njzxf8hi86q53pmy9sxk-mesa-20.0.7/include/GL/glxext= .h:530:169: error: unknown type name =E2=80=98GLintptr=E2=80=99; did you me= an =E2=80=98GLint=E2=80=99? > From some search engine results, I surmise that I am missing the > $DEFS .=3D " -DGL_GLEXT_LEGACY"; > from line 525 of Makefile.PL. >=20 > So maybe we will have to replace the "-L/what/ever" as you do it in your > cdr/match phase; but instead of adding a patch that drops the "-L" in > favour of some "@@libpaths@@" text, only to replace the new text again > in a phase, I would use just a phase. For instance, instead of replacing > "^@@libdirs@@", just replace "-L/usr/local/freeglut/lib". Makes sense that it's pointless to replace the text twice. > On Tue, Oct 06, 2020 at 12:35:43AM +0200, Andreas Enge wrote: > > But it is already tomorrow, time to stop. >=20 > Did I mention that Guix is addictive? I feel you =F0=9F=98=82. It just makes fun to do things in Guix. > If you feel like it, you could replace "cdr" by "match", and maybe test > if all of the inputs are actually needed. After all it seems glu and mesa are not necessary as inputs because freeglut propagates them anyway. Is it ok to rely on propagated inputs? They still need to be added to the library search dir though. Attached is a updated version of your patch :) Malte > From 1fdc8885e04bdad9fee886c58dea9c8c712b5848 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 | 64 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index 1c3d999d79..9916c579e4 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Court=C3= =A8s -;;; Copyright =C2=A9 2013, 2019 Andreas Enge +;;; Copyright =C2=A9 2013, 2019, 2020 Andreas Enge ;;; Copyright =C2=A9 2015, 2016, 2017, 2019 Ricardo Wurmus ;;; Copyright =C2=A9 2015, 2016, 2017, 2019, 2020 Eric Bavier ;;; Copyright =C2=A9 2015 Eric Dvorsak @@ -27,6 +27,7 @@ ;;; Copyright =C2=A9 2020 Vincent Legoll ;;; Copyright =C2=A9 2020 Paul Garlick ;;; Copyright =C2=A9 2020 Nicolas Goaziou +;;; Copyright =C2=A9 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)) =20 ;;; ;;; Please: Try to add new module packages in alphabetic order. @@ -7870,6 +7872,64 @@ technology to store hierarchical information such as= links to other documents within a single file.") (license (package-license perl)))) =20 +(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 `(("freeglut" ,freeglut) + ("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=3D\nGLUT=3D\nVERSION=3D= \n" + "VENDOR=3D\nRENDERER=3D\n" + "EXTENSIONS=3D\n") + port))) + #t)) + (add-before 'configure 'fix-library-flags + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "Makefile.PL" + (("-L/usr/local/freeglut/lib") + (string-append "-L" (assoc-ref inputs "freeglut") "/lib\n" + "-L" (assoc-ref inputs "glu") "/lib\n" + "-L" (assoc-ref inputs "mesa") "/lib\n"))) + #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") --=20 2.28.0