From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: Re: [PATCH] gnu: Add guile-opengl Date: Wed, 25 Jun 2014 20:04:08 -0400 Message-ID: <8761jov8nb.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> References: <87pphxd9uf.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <87k384okj4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzxAr-0006kI-0n for guix-devel@gnu.org; Wed, 25 Jun 2014 20:04:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzxAj-0001NR-7r for guix-devel@gnu.org; Wed, 25 Jun 2014 20:04:20 -0400 Received: from na3sys009aog113.obsmtp.com ([74.125.149.209]:54435) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzxAi-0001NB-Tv for guix-devel@gnu.org; Wed, 25 Jun 2014 20:04:13 -0400 Received: by mail-qa0-f49.google.com with SMTP id w8so2160617qac.36 for ; Wed, 25 Jun 2014 17:04:11 -0700 (PDT) In-Reply-To: <87k384okj4.fsf@gnu.org> 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: >> + (define (dynamic-link-substitute file lib input) >> + (substitute* file >> + (((string-append "dynamic-link \"" lib "\"")) >> + (string-append "dynamic-link \"" >> + (assoc-ref inputs input) >> + "/lib/" lib "\"")))) > > Patterns in =E2=80=98substitute*=E2=80=99 are supposed to be literals. > > Wouldn=E2=80=99t it work to do something like: > > (substitute* file > (("dynamic-link \"lib[a-zA-Z]+\" _ libname) > (string-append ...))) > > ? > Yes, that's better. Updated patch attached. --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-guile-opengl.patch Content-Transfer-Encoding: quoted-printable >From 4e63b47f868f5eab5573e8e70c40f23545f3645a 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 | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index 2741595..36ba0bd 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,43 @@ 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 + (("dynamic-link \"lib([a-zA-Z]+)\"" _ lib) + (string-append "dynamic-link \"" + (assoc-ref inputs input) + "/lib/lib" lib "\"")))) + ;; Replace dynamic-link calls for libGL, libGLU, and + ;; libglut with absolute paths to the store. + (dynamic-link-substitute "glx/runtime.scm" "GL" "mesa") + (dynamic-link-substitute "glu/runtime.scm" "GLU" "mesa") + (dynamic-link-substitute "glut/runtime.scm" "glut" + "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 --=-=-=--