unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add libepoxy.
@ 2015-04-05 15:41 Andy Wingo
  2015-04-05 17:12 ` David Thompson
  2015-04-06 23:05 ` Mark H Weaver
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Wingo @ 2015-04-05 15:41 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 28 bytes --]

This is a new dep of GTK+.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-gnu-Add-libepoxy.patch --]
[-- Type: text/x-diff, Size: 2328 bytes --]

From 42e4d5669bd12dbe7de3e47d14f987a0f3cd7059 Mon Sep 17 00:00:00 2001
From: Andy Wingo <wingo@pobox.com>
Date: Sun, 5 Apr 2015 11:28:32 +0200
Subject: [PATCH 2/3] gnu: Add libepoxy.

* gnu/packages/gl.scm (libepoxy): New variable.
---
 gnu/packages/gl.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index dc90a12..15bc91c 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -418,3 +418,49 @@ extension functionality is exposed in a single header file.")
      "Guile-OpenGL is a library for Guile that provides bindings to the
 OpenGL graphics API.")
     (license l:lgpl3+)))
+
+(define-public libepoxy
+  (package
+    (name "libepoxy")
+    (version "1.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/anholt/libepoxy/archive/v"
+                    version
+                    ".tar.gz"))
+              (sha256
+               (base32
+                "1xp8g6b7xlbym2rj4vkbl6xpb7ijq7glpv656mc7k9b01x22ihs2"))))
+    (arguments
+     '(#:phases
+       (alist-cons-after
+        'unpack 'autoreconf
+        (lambda _
+          (zero? (system* "autoreconf" "-vif")))
+        (alist-cons-before
+         'configure 'patch-paths
+         (lambda* (#:key inputs #:allow-other-keys)
+           (let ((python (assoc-ref inputs "python"))
+                 (mesa (assoc-ref inputs "mesa")))
+             (substitute* "src/gen_dispatch.py"
+               (("/usr/bin/env python") python))
+             (substitute* (find-files "." "\\.[ch]$")
+               (("libGL.so.1") (string-append mesa "/lib/libGL.so.1"))
+               (("libEGL.so.1") (string-append mesa "/lib/libEGL.so.1")))))
+         %standard-phases))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python)))
+    (inputs
+     `(("mesa" ,mesa)))
+
+    (home-page "http://github.com/anholt/libepoxy/")
+    (synopsis "A library for handling OpenGL function pointer management")
+    (description
+     "A library for handling OpenGL function pointer management.")
+    (license l:x11)))
-- 
2.2.1


[-- Attachment #3: Type: text/plain, Size: 26 bytes --]


-- 
http://wingolog.org/

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gnu: Add libepoxy.
  2015-04-05 15:41 [PATCH] gnu: Add libepoxy Andy Wingo
@ 2015-04-05 17:12 ` David Thompson
  2015-04-06 23:05 ` Mark H Weaver
  1 sibling, 0 replies; 3+ messages in thread
From: David Thompson @ 2015-04-05 17:12 UTC (permalink / raw)
  To: Andy Wingo, guix-devel

Andy Wingo <wingo@pobox.com> writes:

> This is a new dep of GTK+.
>
> From 42e4d5669bd12dbe7de3e47d14f987a0f3cd7059 Mon Sep 17 00:00:00 2001
> From: Andy Wingo <wingo@pobox.com>
> Date: Sun, 5 Apr 2015 11:28:32 +0200
> Subject: [PATCH 2/3] gnu: Add libepoxy.
>
> * gnu/packages/gl.scm (libepoxy): New variable.
> ---
>  gnu/packages/gl.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 46 insertions(+)
>
> diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
> index dc90a12..15bc91c 100644
> --- a/gnu/packages/gl.scm
> +++ b/gnu/packages/gl.scm
> @@ -418,3 +418,49 @@ extension functionality is exposed in a single header file.")
>       "Guile-OpenGL is a library for Guile that provides bindings to the
>  OpenGL graphics API.")
>      (license l:lgpl3+)))
> +
> +(define-public libepoxy
> +  (package
> +    (name "libepoxy")
> +    (version "1.2")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> +                    "https://github.com/anholt/libepoxy/archive/v"
> +                    version
> +                    ".tar.gz"))
> +              (sha256
> +               (base32
> +                "1xp8g6b7xlbym2rj4vkbl6xpb7ijq7glpv656mc7k9b01x22ihs2"))))
> +    (arguments
> +     '(#:phases
> +       (alist-cons-after
> +        'unpack 'autoreconf
> +        (lambda _
> +          (zero? (system* "autoreconf" "-vif")))
> +        (alist-cons-before
> +         'configure 'patch-paths
> +         (lambda* (#:key inputs #:allow-other-keys)
> +           (let ((python (assoc-ref inputs "python"))
> +                 (mesa (assoc-ref inputs "mesa")))
> +             (substitute* "src/gen_dispatch.py"
> +               (("/usr/bin/env python") python))
> +             (substitute* (find-files "." "\\.[ch]$")
> +               (("libGL.so.1") (string-append mesa "/lib/libGL.so.1"))
> +               (("libEGL.so.1") (string-append mesa "/lib/libEGL.so.1")))))
> +         %standard-phases))))

It would be preferable to write this using our new 'modify-phases'
syntax.

    (modify-phases %standard-phases
      (add-after unpack autoreconf ...)
      (add-before configure patch-paths ...))

> +    (build-system gnu-build-system)
> +    (native-inputs
> +     `(("autoconf" ,autoconf)
> +       ("automake" ,automake)
> +       ("libtool" ,libtool)
> +       ("pkg-config" ,pkg-config)
> +       ("python" ,python)))
> +    (inputs
> +     `(("mesa" ,mesa)))
> +
> +    (home-page "http://github.com/anholt/libepoxy/")
> +    (synopsis "A library for handling OpenGL function pointer management")
> +    (description
> +     "A library for handling OpenGL function pointer management.")

"libepoxy is a library for..."

Expound just a bit if you can.

> +    (license l:x11)))
> -- 
> 2.2.1

Looking good!

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gnu: Add libepoxy.
  2015-04-05 15:41 [PATCH] gnu: Add libepoxy Andy Wingo
  2015-04-05 17:12 ` David Thompson
@ 2015-04-06 23:05 ` Mark H Weaver
  1 sibling, 0 replies; 3+ messages in thread
From: Mark H Weaver @ 2015-04-06 23:05 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guix-devel

Andy Wingo <wingo@pobox.com> writes:

> From 42e4d5669bd12dbe7de3e47d14f987a0f3cd7059 Mon Sep 17 00:00:00 2001
> From: Andy Wingo <wingo@pobox.com>
> Date: Sun, 5 Apr 2015 11:28:32 +0200
> Subject: [PATCH 2/3] gnu: Add libepoxy.
>
> * gnu/packages/gl.scm (libepoxy): New variable.
> ---
>  gnu/packages/gl.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 46 insertions(+)
>
>
> diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
> index dc90a12..15bc91c 100644
> --- a/gnu/packages/gl.scm
> +++ b/gnu/packages/gl.scm
> @@ -418,3 +418,49 @@ extension functionality is exposed in a single header file.")
>       "Guile-OpenGL is a library for Guile that provides bindings to the
>  OpenGL graphics API.")
>      (license l:lgpl3+)))
> +
> +(define-public libepoxy
> +  (package
> +    (name "libepoxy")
> +    (version "1.2")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> +                    "https://github.com/anholt/libepoxy/archive/v"
> +                    version
> +                    ".tar.gz"))

For source URIs like this, where the last file name component doesn't
contain the package name (in this case it is "v1.2.tar.gz"), we prefer
to add a 'file-name' field to the 'origin' form:

  (file-name (string-append name "-" version ".tar.gz"))

Otherwise, the file name of the source tarball in the store will be
/gnu/store/<HASH>-v1.2.tar.gz which is suboptimal.

> +              (sha256
> +               (base32
> +                "1xp8g6b7xlbym2rj4vkbl6xpb7ijq7glpv656mc7k9b01x22ihs2"))))
> +    (arguments
> +     '(#:phases
> +       (alist-cons-after
> +        'unpack 'autoreconf
> +        (lambda _
> +          (zero? (system* "autoreconf" "-vif")))
> +        (alist-cons-before
> +         'configure 'patch-paths
> +         (lambda* (#:key inputs #:allow-other-keys)
> +           (let ((python (assoc-ref inputs "python"))
> +                 (mesa (assoc-ref inputs "mesa")))
> +             (substitute* "src/gen_dispatch.py"
> +               (("/usr/bin/env python") python))
> +             (substitute* (find-files "." "\\.[ch]$")
> +               (("libGL.so.1") (string-append mesa "/lib/libGL.so.1"))
> +               (("libEGL.so.1") (string-append mesa "/lib/libEGL.so.1")))))

Phases are supposed to return true for success or false for failure.
Since 'substitute*'s return value is unspecified, we should add a #t to
the end.

I went ahead and pushed this to 'core-updates' with these changes.

     Thanks!
       Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-06 23:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-05 15:41 [PATCH] gnu: Add libepoxy Andy Wingo
2015-04-05 17:12 ` David Thompson
2015-04-06 23:05 ` Mark H Weaver

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).