all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: mesa: Update to 10.5.4.
@ 2015-04-28 11:38 Taylan Ulrich Bayırlı/Kammer
  2015-04-28 14:39 ` David Thompson
  2015-04-29 21:06 ` Andreas Enge
  0 siblings, 2 replies; 4+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2015-04-28 11:38 UTC (permalink / raw)
  To: guix-devel

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

Note that this patch introduces some significant changes to the recipe,
and I'm unsure about their correctness.  (It builds fine, but maybe
isn't future-proof.)

AFAIUI, python, flex, bison, and gettext are all only needed (at build
time) when rebuilding parts of the build system.  Maybe they were
left-overs from before commit ce4d7ab which adds a hack to prevent the
build system from rebuilding parts of itself; however the same commit
*adds* gettext which wasn't there before.  Maybe it was an oversight,
and the commit shouldn't had added gettext and should have removed the
other three from the native inputs?

In any case, it builds fine when I remove said hack (doesn't seem
necessary anymore), and also remove all four from native inputs.

(Actually there are also some .py files in the source tree which I'm
told might be necessary at build time regardless of rebuilding the build
system, but this doesn't seem to be the case for us, maybe because
they're only needed for some optional features which we don't have
enabled.)

Input from any mesa experts or those who touched this package before is
welcome.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-mesa-Update-to-10.5.4.patch --]
[-- Type: text/x-diff, Size: 7745 bytes --]

From 919ca3b169c31c891f8c14cb615c6e7d7129d78f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <taylanbayirli@gmail.com>
Date: Sat, 25 Apr 2015 12:02:33 +0200
Subject: [PATCH 1/2] gnu: mesa: Update to 10.5.4.

* gnu/packages/gl.scm (mesa): Update version to 10.5.4.  Add libxvmc to
  inputs.  Move python from native-inputs to inputs.  Remove gettext, flex,
  and bison from native-inputs.  Remove hack that was necessary to prevent
  rebuilding parts of the build system.
---
 gnu/packages/gl.scm | 96 ++++++++++++++++++++++++-----------------------------
 1 file changed, 43 insertions(+), 53 deletions(-)

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index e640f83..a40749e 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -162,15 +162,15 @@ also known as DXTn or DXTC) for Mesa.")
 (define-public mesa
   (package
     (name "mesa")
-    (version "10.4.0")
+    (version "10.5.4")
     (source
       (origin
         (method url-fetch)
         (uri (string-append "ftp://ftp.freedesktop.org/pub/mesa/"
-                            version "/MesaLib-" version ".tar.bz2"))
+                            version "/mesa-" version ".tar.xz"))
         (sha256
          (base32
-          "069j4ck51hc70gryhw3z0rkyhhl0bnhbks4xg1wqqw56l7rxz9wq"))))
+          "00v89jna7m6r2w1yrnx09isc97r2bd1hkn4jib445n1078zp47mm"))))
     (build-system gnu-build-system)
     (propagated-inputs
       `(("glproto" ,glproto)
@@ -181,23 +181,22 @@ also known as DXTn or DXTC) for Mesa.")
         ("libxfixes" ,libxfixes)
         ("libxshmfence" ,libxshmfence)
         ("libxxf86vm" ,libxxf86vm)))
+    ;; TODO: Add vdpau.
     (inputs
       `(("udev" ,eudev)
         ("dri2proto" ,dri2proto)
         ("dri3proto" ,dri3proto)
         ("presentproto" ,presentproto)
         ("expat" ,expat)
+        ;; TODO: Solve circular dependency with libva.
+        ;; ("libva" ,libva)
         ("libxml2" ,libxml2)
-        ;; TODO: Add 'libva'
         ;; TODO: Add 'libxml2-python' for OpenGL ES 1.1 and 2.0 support
+        ("libxvmc" ,libxvmc)
         ("makedepend" ,makedepend)
         ("s2tc" ,s2tc)))
     (native-inputs
-      `(("pkg-config" ,pkg-config)
-        ("gettext" ,gnu-gettext)
-        ("flex" ,flex)
-        ("bison" ,bison)
-        ("python" ,python-2))) ; incompatible with Python 3 (print syntax)
+      `(("pkg-config" ,pkg-config)))
     (arguments
      `(#:configure-flags
        '(;; drop r300 from default gallium drivers, as it requires llvm
@@ -219,51 +218,42 @@ also known as DXTn or DXTC) for Mesa.")
              (_
               '("--with-dri-drivers=nouveau,r200,radeon,swrast"))))
        #:phases (alist-cons-after
-                 'unpack 'add-missing-m4-files
+                 'unpack 'patch-create_test_cases
                  (lambda _
-                   ;; When these files are missing, make tries to rebuild
-                   ;; several parts of the build system.
-                   (zero? (system* "touch" "--date=@0"
-                                   "m4/libtool.m4" "m4/ltoptions.m4"
-                                   "m4/ltsugar.m4" "m4/ltversion.m4"
-                                   "m4/lt~obsolete.m4")))
-                 (alist-cons-after
-                  'unpack 'patch-create_test_cases
-                  (lambda _
-                    (substitute* "src/glsl/tests/lower_jumps/create_test_cases.py"
-                      (("/usr/bin/env bash") (which "bash"))))
-                  (alist-cons-before
-                   'build 'fix-dlopen-libnames
-                   (lambda* (#:key inputs outputs #:allow-other-keys)
-                     (let ((s2tc (assoc-ref inputs "s2tc"))
-                           (udev (assoc-ref inputs "udev"))
-                           (out (assoc-ref outputs "out")))
-                       ;; Remain agnostic to .so.X.Y.Z versions while doing
-                       ;; the substitutions so we're future-safe.
-                       (substitute*
-                           '("src/gallium/auxiliary/util/u_format_s3tc.c"
-                             "src/mesa/main/texcompress_s3tc.c")
-                         (("\"libtxc_dxtn\\.so")
-                          (string-append "\"" s2tc "/lib/libtxc_dxtn.so")))
-                       (substitute* "src/gallium/targets/egl-static/egl_st.c"
-                         (("\"libglapi\"")
-                          (string-append "\"" out "/lib/libglapi\"")))
-                       (substitute* "src/loader/loader.c"
-                         (("dlopen\\(\"libudev\\.so")
-                          (string-append "dlopen(\"" udev "/lib/libudev.so")))
-                       (substitute* "src/glx/dri_common.c"
-                         (("dlopen\\(\"libGL\\.so")
-                          (string-append "dlopen(\"" out "/lib/libGL.so")))
-                       (substitute* "src/egl/drivers/dri2/egl_dri2.c"
-                         (("\"libglapi\\.so")
-                          (string-append "\"" out "/lib/libglapi.so")))
-                       (substitute* "src/gbm/main/backend.c"
-                         ;; No need to patch the gbm_gallium_drm.so reference;
-                         ;; it's never installed since Mesa removed its
-                         ;; egl_gallium support.
-                         (("\"gbm_dri\\.so")
-                          (string-append "\"" out "/lib/dri/gbm_dri.so")))))
-                   %standard-phases)))))
+                   (substitute* "src/glsl/tests/lower_jumps/create_test_cases.py"
+                     (("/usr/bin/env bash") (which "bash"))))
+                 (alist-cons-before
+                  'build 'fix-dlopen-libnames
+                  (lambda* (#:key inputs outputs #:allow-other-keys)
+                    (let ((s2tc (assoc-ref inputs "s2tc"))
+                          (udev (assoc-ref inputs "udev"))
+                          (out (assoc-ref outputs "out")))
+                      ;; Remain agnostic to .so.X.Y.Z versions while doing
+                      ;; the substitutions so we're future-safe.
+                      (substitute*
+                          '("src/gallium/auxiliary/util/u_format_s3tc.c"
+                            "src/mesa/main/texcompress_s3tc.c")
+                        (("\"libtxc_dxtn\\.so")
+                         (string-append "\"" s2tc "/lib/libtxc_dxtn.so")))
+                      (substitute* "src/gallium/targets/egl-static/egl_st.c"
+                        (("\"libglapi\"")
+                         (string-append "\"" out "/lib/libglapi\"")))
+                      (substitute* "src/loader/loader.c"
+                        (("dlopen\\(\"libudev\\.so")
+                         (string-append "dlopen(\"" udev "/lib/libudev.so")))
+                      (substitute* "src/glx/dri_common.c"
+                        (("dlopen\\(\"libGL\\.so")
+                         (string-append "dlopen(\"" out "/lib/libGL.so")))
+                      (substitute* "src/egl/drivers/dri2/egl_dri2.c"
+                        (("\"libglapi\\.so")
+                         (string-append "\"" out "/lib/libglapi.so")))
+                      (substitute* "src/gbm/main/backend.c"
+                        ;; No need to patch the gbm_gallium_drm.so reference;
+                        ;; it's never installed since Mesa removed its
+                        ;; egl_gallium support.
+                        (("\"gbm_dri\\.so")
+                         (string-append "\"" out "/lib/dri/gbm_dri.so")))))
+                  %standard-phases))))
     (home-page "http://mesa3d.org/")
     (synopsis "OpenGL implementation")
     (description "Mesa is a free implementation of the OpenGL specification -
-- 
2.2.1


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

* Re: [PATCH] gnu: mesa: Update to 10.5.4.
  2015-04-28 11:38 [PATCH] gnu: mesa: Update to 10.5.4 Taylan Ulrich Bayırlı/Kammer
@ 2015-04-28 14:39 ` David Thompson
  2015-04-29 21:06 ` Andreas Enge
  1 sibling, 0 replies; 4+ messages in thread
From: David Thompson @ 2015-04-28 14:39 UTC (permalink / raw)
  To: Taylan Ulrich Bayırlı/Kammer, guix-devel

"Taylan Ulrich Bayırlı/Kammer" <taylanbayirli@gmail.com> writes:

> Note that this patch introduces some significant changes to the recipe,
> and I'm unsure about their correctness.  (It builds fine, but maybe
> isn't future-proof.)
>
> AFAIUI, python, flex, bison, and gettext are all only needed (at build
> time) when rebuilding parts of the build system.  Maybe they were
> left-overs from before commit ce4d7ab which adds a hack to prevent the
> build system from rebuilding parts of itself; however the same commit
> *adds* gettext which wasn't there before.  Maybe it was an oversight,
> and the commit shouldn't had added gettext and should have removed the
> other three from the native inputs?
>
> In any case, it builds fine when I remove said hack (doesn't seem
> necessary anymore), and also remove all four from native inputs.
>
> (Actually there are also some .py files in the source tree which I'm
> told might be necessary at build time regardless of rebuilding the build
> system, but this doesn't seem to be the case for us, maybe because
> they're only needed for some optional features which we don't have
> enabled.)
>
> Input from any mesa experts or those who touched this package before is
> welcome.
>

This is totally unrelated to your concerns, but since we're on the topic
of making changes to the Mesa recipe: has anyone successfully used Mesa
with a nouveau (nvidia) graphics card?  Our recipe doesn't seem to build
the necessary shared library and I'm not sure how to fix it.

-- 
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] 4+ messages in thread

* Re: [PATCH] gnu: mesa: Update to 10.5.4.
  2015-04-28 11:38 [PATCH] gnu: mesa: Update to 10.5.4 Taylan Ulrich Bayırlı/Kammer
  2015-04-28 14:39 ` David Thompson
@ 2015-04-29 21:06 ` Andreas Enge
  2015-05-02 15:44   ` Taylan Ulrich Bayırlı/Kammer
  1 sibling, 1 reply; 4+ messages in thread
From: Andreas Enge @ 2015-04-29 21:06 UTC (permalink / raw)
  To: Taylan Ulrich Bayırlı/Kammer; +Cc: guix-devel

On Tue, Apr 28, 2015 at 01:38:15PM +0200, Taylan Ulrich Bayırlı/Kammer wrote:
> In any case, it builds fine when I remove said hack (doesn't seem
> necessary anymore), and also remove all four from native inputs.

This is good news.

"Said hack" was a work-around for the following bug:
   https://bugs.freedesktop.org/show_bug.cgi?id=58812
Strangely enough, the bug was not closed, but maybe it was fixed by accident
in a newer version of mesa.

Quite a few things depend on mesa:
   Building the following 130 packages would ensure 205 dependent packages are rebuilt
So it would be good to check whether it still builds on mips after the update
(Mark? my machine is so incredibly slow that I would prefer not to build
a big package). And maybe push it in a new core-update cycle then.

> (Actually there are also some .py files in the source tree which I'm
> told might be necessary at build time regardless of rebuilding the build
> system, but this doesn't seem to be the case for us, maybe because
> they're only needed for some optional features which we don't have
> enabled.)

There is the following comment:
  ;; TODO: Add 'libxml2-python' for OpenGL ES 1.1 and 2.0 support
So maybe python might be needed one day, but is not needed now?
Did you try to check that the outcome is "the same" when dropping python?
There are no missing features that are more or less silently dropped when
removing python?
The mesa install page
   http://mesa3d.org/install.html
states the following:
"1. Prerequisites for building
1.1 General
    Python - Python is required. Version 2.6.4 or later should work.
    Python Mako module - Python Mako module is required. Version 0.7.3 or later should work.
    SCons is required for building on Windows and optional for Linux (it's an alternative to autoconf/automake.)"

Andreas

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

* Re: [PATCH] gnu: mesa: Update to 10.5.4.
  2015-04-29 21:06 ` Andreas Enge
@ 2015-05-02 15:44   ` Taylan Ulrich Bayırlı/Kammer
  0 siblings, 0 replies; 4+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2015-05-02 15:44 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

Andreas Enge <andreas@enge.fr> writes:

>> (Actually there are also some .py files in the source tree which I'm
>> told might be necessary at build time regardless of rebuilding the build
>> system, but this doesn't seem to be the case for us, maybe because
>> they're only needed for some optional features which we don't have
>> enabled.)
>
> There is the following comment:
>   ;; TODO: Add 'libxml2-python' for OpenGL ES 1.1 and 2.0 support
> So maybe python might be needed one day, but is not needed now?
> Did you try to check that the outcome is "the same" when dropping python?
> There are no missing features that are more or less silently dropped when
> removing python?

I did a diff of every file in the output before and after dropping
gettext, flex, bison, and python from native-inputs, and barring for the
output's own hash, files were bit-identical.

(I copied the store items to somewhere, ran 'sed -i s/<hash>//' on every
file (via find) for each item with its hash, then did a recursive diff.)

> The mesa install page
>    http://mesa3d.org/install.html
> states the following:
> "1. Prerequisites for building
> 1.1 General
>     Python - Python is required. Version 2.6.4 or later should work.
>     Python Mako module - Python Mako module is required. Version 0.7.3 or later should work.
>     SCons is required for building on Windows and optional for Linux (it's an alternative to autoconf/automake.)"

I've been told that Python/mako are used when rebuilding parts of the
build system, which apparently many people do because they frequently
edit some grammar files (hence also bison).


I pushed the patch to core-updates now.

Taylan

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

end of thread, other threads:[~2015-05-02 15:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-28 11:38 [PATCH] gnu: mesa: Update to 10.5.4 Taylan Ulrich Bayırlı/Kammer
2015-04-28 14:39 ` David Thompson
2015-04-29 21:06 ` Andreas Enge
2015-05-02 15:44   ` Taylan Ulrich Bayırlı/Kammer

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.