Subject: pkg/32428: Suggested opengl builtin support
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <duck@multi.fi>
List: pkgsrc-bugs
Date: 01/02/2006 07:15:41
>Number:         32428
>Category:       pkg
>Synopsis:       Suggested opengl builtin support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 02 07:15:41 +0000 2006
>Originator:     Staffan Thomén
>Release:        IRIX 6.5.27m
>Organization:
Staffan Thomen 1024D/7C7E2EF8
Sed quis custodiet ipsos Custodes?
>Environment:
System: IRIX64 halo 6.5 6.5.27m 01062343 IP30
Architecture: sgi
Machine: mipseb
>Description:
On my SGI system, where OpenGL is builtin, I don't really see the point of
using MesaGL.
>How-To-Repeat:
Build anything that requires opengl support.
>Fix:
This is wrong, but works; have packages include this instead of pulling in Mesa
directly (unless it of course is required, I understand that mesagl is somewhat
different?)

.include "../../mk/bsd.prefs.mk"

.if !empty(OPENGL_BUILDLINK3_MK:M+)

OPENGL_HEADERS?=        # /usr/include
OPENGL_LIBS?=           # /usr/lib${LIBABISUFFIX}

#
# Do some rudimentary checking for simple defaults
#
. if exists(/usr/include/GL/gl.h) && !defined(OPENGL_TYPE)
   OPENGL_TYPE= "native"
. endif

OPENGL_TYPE?=           "mesa"

. if ${OPENGL_TYPE} == "mesa"
.  include "../../graphics/Mesa/buildlink3.mk"
. elif ${OPENGL_TYPE} == "native"
.  if !empty(OPENGL_HEADERS)
    CPPFLAGS+=-I${OPENGL_HEADERS}
.  endif
.  if !empty(OPENGL_LIBS)
    LDFLAGS+=-L${OPENGL_LIBS}
.  endif
. endif

.endif  # OPENGL_BUILDLINK3_MK