Bug 241568 - graphics/libGLU: Update to 9.0.1
Summary: graphics/libGLU: Update to 9.0.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
Depends on:
Reported: 2019-10-29 07:28 UTC by takefu
Modified: 2021-06-29 01:26 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)

libGLU-9.0.1.patch (1.31 KB, patch)
2019-10-29 07:28 UTC, takefu
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description takefu 2019-10-29 07:28:05 UTC
Created attachment 208674 [details]

  portlint(1) compliant.

Comment 1 Niclas Zeising freebsd_committer 2019-10-29 21:16:44 UTC
A similar patch has been laying around in our development repo for a while, you can find it here:


I've updated that with some of your changes as well, however, the license is not MIT, but something called SGI FREE SOFTWARE LICENSE B.
Comment 2 commit-hook freebsd_committer 2019-10-30 19:42:54 UTC
A commit references this bug:

Author: zeising
Date: Wed Oct 30 19:42:10 UTC 2019
New revision: 516102
URL: https://svnweb.freebsd.org/changeset/ports/516102

  graphics/libGLU: Update to 9.0.1

  Update graphics/libGLU to 9.0.1
  Add gl and xorg to USES.

  PR:		241568 (in part)
  Submitted by:	takefu@airport.fm
  Obtained from:	FreeBSD Graphics Team development repo

Comment 3 Niclas Zeising freebsd_committer 2019-10-30 19:47:02 UTC
Committed, thanks!
Comment 4 peter.larsen 2021-06-21 13:52:50 UTC
this have surfaced a bug here (GL related):

===>   Registering installation for libglvnd-1.3.3 as automatic
Installing libglvnd-1.3.3...
===>   libGLU-9.0.1 depends on shared library: libGL.so - not found
*** Error code 1

make: stopped in /usr/ports/graphics/libGLU

when compiled without X11 globally

I'm not sure if this is a libGLU or a libglvnd feature, please advice
Comment 5 Jan Beich freebsd_committer 2021-06-21 15:16:52 UTC
(In reply to peter.larsen from comment #4)
> I'm not sure if this is a libGLU or a libglvnd feature, please advice

libGLU seems to hardcode dependency on libGL.so (aka GLX or OpenGL on X11) when libOpenGL.so would be enough. File a bug in libGLU upstream or rebuild libglvnd with X11 enabled.

The ports/ framework doesn't support requesting dependencies built with specific options enabled/disabled. So, if you set some options globbaly its on you to resolve ensuing conflicts. libglvnd simply exposed X11-less OpenGL loader which was previously part of PLATFORM_X11 in mesa-libs with tons of other dependencies on the same bandwagon.

There's nothing to fix downstream yet.
Comment 6 Jan Beich freebsd_committer 2021-06-21 15:27:16 UTC
(In reply to Jan Beich from comment #5)
> libGLU seems to hardcode dependency on libGL.so (aka GLX or OpenGL on X11)
> when libOpenGL.so would be enough.

Nevermind, libglvnd without X11 creates opengl.pc -> gl.pc which is enough for libGLU with the following workaround:

diff --git a/graphics/libGLU/Makefile b/graphics/libGLU/Makefile
index d1f12b8e98b7..dc5f47675023 100644
--- a/graphics/libGLU/Makefile
+++ b/graphics/libGLU/Makefile
@@ -14,7 +14,7 @@ USES=		gl libtool pathfix pkgconfig tar:xz xorg
 CONFIGURE_ARGS=	--disable-static
 INSTALL_TARGET=	install-strip
-USE_GL=		gl
+USE_GL=		egl
 .include <bsd.port.mk>
Comment 7 Kevin Bowling freebsd_committer 2021-06-22 20:19:40 UTC
(In reply to peter.larsen from comment #4)
(In reply to Jan Beich from comment #6)
It seems like some of the stuff in here would dispatch to symbols that need an actual libGL, i.e. glNormal3fv is used within libGLU for nurbs stuff.  libglvnd provides the necessary headers and the generic symbols but it might explode at runtime.

It seems like libGLU would need to be built with the 'osmesa' option if X11 is unset to work w/o X11, how about this: https://reviews.freebsd.org/D30869
Comment 8 commit-hook freebsd_committer 2021-06-29 01:26:31 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=709148649962c82048858d84a29ffa4ab15a0738

commit 709148649962c82048858d84a29ffa4ab15a0738
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2021-06-24 22:41:25 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2021-06-29 01:23:57 +0000

    graphics/libGLU: Update to 9.0.2

    PR:             241568
    Approved by:    x11
    Differential Revision:  https://reviews.freebsd.org/D30869

 Mk/Uses/gl.mk             |  3 ++-
 graphics/libGLU/Makefile  | 10 +++++-----
 graphics/libGLU/distinfo  |  6 +++---
 graphics/libGLU/pkg-descr |  2 +-
 graphics/libGLU/pkg-plist |  1 -
 5 files changed, 11 insertions(+), 11 deletions(-)