From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: [PATCH] gnu: Add guile-opengl Date: Tue, 24 Jun 2014 22:03:20 -0400 Message-ID: <87pphxd9uf.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzcYd-0006tn-Qj for guix-devel@gnu.org; Tue, 24 Jun 2014 22:03:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzcYY-0000wV-IK for guix-devel@gnu.org; Tue, 24 Jun 2014 22:03:31 -0400 Received: from na3sys009aog138.obsmtp.com ([74.125.149.19]:39596) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzcYY-0000v1-9q for guix-devel@gnu.org; Tue, 24 Jun 2014 22:03:26 -0400 Received: by mail-qa0-f44.google.com with SMTP id hw13so987219qab.17 for ; Tue, 24 Jun 2014 19:03:23 -0700 (PDT) Received: from izanagi (209-6-40-86.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com. [209.6.40.86]) by mx.google.com with ESMTPSA id b9sm3387657qae.4.2014.06.24.19.03.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jun 2014 19:03:22 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/plain Finally got around to finishing up this package. I ran the example programs shipped with guile-opengl and confirmed that they work as expected. :) How does it look? --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-guile-opengl.patch Content-Transfer-Encoding: quoted-printable >From 3368e741ce35751f050663ee58d8ea4da1afd0e0 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 24 Jun 2014 21:59:47 -0400 Subject: [PATCH] gnu: Add guile-opengl. * gnu/packages/gl.scm (guile-opengl): New variable. --- gnu/packages/gl.scm | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index 2741595..d314b03 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2013 Andreas Enge ;;; Copyright =C2=A9 2013 Guy Grant +;;; Copyright =C2=A9 2014 David Thompson ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,7 +31,8 @@ #:use-module (gnu packages python) #:use-module (gnu packages xorg) #:use-module (gnu packages xml) - #:use-module (gnu packages fontutils)) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages guile)) =20 (define-public glu (package @@ -170,3 +172,42 @@ a system for rendering interactive 3D graphics. A vari= ety of device drivers allows Mesa to be used in many different environments ranging from software emulation to complete hardware acceleration for modern GPUs.") (license l:x11))) + +(define-public guile-opengl + (package + (name "guile-opengl") + (version "0.1.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/guile-opengl/guile-opengl-" + version ".tar.gz")) + (sha256 + (base32 + "13qfx4xh8baryxqrv986l848ygd0piqwm6s2s90pxk9c0m9vklim")))) + (build-system gnu-build-system) + (native-inputs `(("pkg-config" ,pkg-config))) + (inputs `(("guile" ,guile-2.0) + ("mesa" ,mesa) + ("freeglut" ,freeglut))) + (arguments + '(#:phases (alist-cons-before + 'build 'patch-dynamic-link + (lambda* (#:key inputs outputs #:allow-other-keys) + (define (dynamic-link-substitute file lib input) + (substitute* file + (((string-append "dynamic-link \"" lib "\"")) + (string-append "dynamic-link \"" + (assoc-ref inputs input) + "/lib/" lib "\"")))) + ;; Replace dynamic-link calls for libGL, libGLU, and + ;; libglut with absolute paths to the store. + (dynamic-link-substitute "glx/runtime.scm" "libGL" "mes= a") + (dynamic-link-substitute "glu/runtime.scm" "libGLU" "me= sa") + (dynamic-link-substitute "glut/runtime.scm" "libglut" "= freeglut")) + %standard-phases))) + (home-page "http://gnu.org/s/guile-opengl") + (synopsis "OpenGL bindings for Guile") + (description + "GNU Guile-OpenGL is a library providing access to the OpenGL graphics +API from GNU Guile.") + (license l:lgpl3+))) --=20 2.0.0 --=-=-= Content-Type: text/plain -- David Thompson Web Developer - Free Software Foundation - http://fsf.org GPG Key: 0FF1D807 Support the FSF: https://fsf.org/donate --=-=-=--