GNU bug report logs - #43654
[PATCH] Add perl-opengl

Previous Next

Package: guix-patches;

Reported by: Malte Frank Gerdes <malte.f.gerdes <at> gmail.com>

Date: Sun, 27 Sep 2020 19:08:02 UTC

Severity: normal

Tags: patch

Done: Andreas Enge <andreas <at> enge.fr>

Bug is archived. No further changes may be made.

Full log


Message #44 received at 43654 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: Malte Frank Gerdes <malte.f.gerdes <at> gmail.com>
Cc: Kei Kebreau <kkebreau <at> posteo.net>, 43654 <at> debbugs.gnu.org
Subject: Re: [bug#43654] [PATCH] Add perl-opengl
Date: Tue, 6 Oct 2020 00:35:43 +0200
On Mon, Oct 05, 2020 at 10:51:29PM +0200, Andreas Enge wrote:
> So one option would be to disable the test ("#:tests? #f") and create the
> essentially empty glversion.txt file above inside a phase. There would not
> even be a need to store it as a an auxiliary file; see the use of
> "call-with-output-file" in guix/tests.scm, for instance.

Something like this:
         (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 test, 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))

I tried to add the following instead of patching Makefile.PL:
         (add-before 'configure 'fix-interface
           ;; Libraries are not found in default locations, so force
           ;; an interface.
           (lambda _
             (substitute* "Makefile.PL"
               (("die \"FreeGLUT or GLUT libraries")
                "$interface_lib = 'FREEGLUT'; #"))
             #t))

But it fails during compilation with error messages such as this one:
/gnu/store/1qmd9achfkm1njzxf8hi86q53pmy9sxk-mesa-20.0.7/include/GL/glxext.h:530:169: error: unknown type name ‘GLintptr’; did you mean ‘GLint’?
From some search engine results, I surmise that I am missing the
  $DEFS .= " -DGL_GLEXT_LEGACY";
from line 525 of Makefile.PL.

So maybe we will have to replace the "-L/what/ever" as you do it in your
cdr/match phase; but instead of adding a patch that drops the "-L" in
favour of some "@@libpaths@@" text, only to replace the new text again
in a phase, I would use just a phase. For instance, instead of replacing
"^@@libdirs@@", just replace "-L/usr/local/freeglut/lib".

But it is already tomorrow, time to stop.

Andreas





This bug report was last modified 4 years and 229 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.