guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: Add perl-opengl.


From: guix-commits
Subject: branch master updated: gnu: Add perl-opengl.
Date: Sat, 10 Oct 2020 09:04:02 -0400

This is an automated email from the git hooks/post-receive script.

andreas pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 4ec2190  gnu: Add perl-opengl.
4ec2190 is described below

commit 4ec2190b9f3d111e3be0d69679f8d5ff05f59926
Author: Andreas Enge <andreas@enge.fr>
AuthorDate: Tue Oct 6 00:43:45 2020 +0200

    gnu: Add perl-opengl.
    
    * gnu/packages/perl.scm (perl-opengl): New variable.
    
    Co-authored-by: Malte Frank Gerdes <malte.f.gerdes@gmail.com>
---
 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 dd201d8..d91e336 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 
<ludo@gnu.org>
-;;; Copyright © 2013, 2019 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2019, 2020 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015, 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015, 2016, 2017, 2019, 2020 Eric Bavier <bavier@posteo.net>
 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
@@ -27,6 +27,7 @@
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;; Copyright © 2020 Paul Garlick <pgarlick@tourbillion-technology.com>
 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
 ;;;
 ;;; 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.
@@ -7861,6 +7863,64 @@ 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 `(("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=\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-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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]