# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
# Mark /system/volatile/* paths to be removed after pkgdepend, before publishing
<transform dir link path=system/volatile.* -> set org.opensolaris.nopublish true>
set name=pkg.fmri value=pkg:/service/opengl/ogl-select@$(OSPKGVERS)
set name=pkg.summary \
value="ogl-select - boot time selection of OpenGL vendor files"
set name=pkg.description \
value="ogl-select is a SMF service that determines at boot time which vendor supplied OpenGL headers and libraries will be used, based on the hardware and drivers installed in the system."
dir path=lib/opengl
dir path=lib/opengl/ogl_select
file path=lib/opengl/ogl_select/mesa_vendor_select mode=0555
$(i386_ONLY)file path=lib/opengl/ogl_select/nvidia_vendor_select mode=0555
$(sparc_ONLY)file path=lib/opengl/ogl_select/sun_vendor_select mode=0555
dir path=lib/svc/manifest/application/opengl
file path=lib/svc/method/ogl-select
# These dirs & links in /system/volatile are used to resolve dependencies
# during the build but are not published in the packages as they're created
# at runtime by the SMF service
dir path=system/volatile/opengl
dir path=system/volatile/opengl/include
link path=system/volatile/opengl/include/gl.h \
target=../../../../usr/include/mesa/gl.h
link path=system/volatile/opengl/include/glext.h \
target=../../../../usr/include/mesa/glext.h
link path=system/volatile/opengl/include/glx.h \
target=../../../../usr/include/mesa/glx.h
link path=system/volatile/opengl/include/glxext.h \
target=../../../../usr/include/mesa/glxext.h
dir path=system/volatile/opengl/lib
dir path=system/volatile/opengl/lib/$(ARCH64)
link path=system/volatile/opengl/lib/$(ARCH64)/libGL.so.1 \
target=../../../../../usr/lib/mesa/$(ARCH64)/libGL.so.1
link path=system/volatile/opengl/lib/64 target=$(ARCH64)
link path=system/volatile/opengl/lib/libGL.so.1 \
target=../../../../usr/lib/mesa/libGL.so.1
dir path=system/volatile/opengl/server
link path=system/volatile/opengl/server/libglx.so \
target=../../../../usr/lib/mesa/modules/extensions/libglx.so
link path=usr/X11/lib/$(ARCH64)/libGL.so.1 \
target=../../../lib/GL/$(ARCH64)/libGL.so.1
link path=usr/X11/lib/64 target=$(ARCH64)
link path=usr/X11/lib/GL target=../../lib/GL
link path=usr/X11/lib/libGL.so target=libGL.so.1
link path=usr/X11/lib/libGL.so.1 target=../../lib/GL/libGL.so.1
dir path=usr/include/GL
link path=usr/include/GL/gl.h \
target=../../../system/volatile/opengl/include/gl.h
link path=usr/include/GL/glext.h \
target=../../../system/volatile/opengl/include/glext.h
link path=usr/include/GL/glx.h \
target=../../../system/volatile/opengl/include/glx.h
link path=usr/include/GL/glxext.h \
target=../../../system/volatile/opengl/include/glxext.h
dir path=usr/lib/GL
dir path=usr/lib/GL/$(ARCH64)
link path=usr/lib/GL/$(ARCH64)/libGL.so.1 \
target=../../../../system/volatile/opengl/lib/$(ARCH64)/libGL.so.1
link path=usr/lib/GL/64 target=$(ARCH64)
link path=usr/lib/GL/libGL.so target=libGL.so.1
link path=usr/lib/GL/libGL.so.1 \
target=../../../system/volatile/opengl/lib/libGL.so.1
link path=usr/lib/libGL.so target=libGL.so.1
link path=usr/lib/libGL.so.1 target=GL/libGL.so.1
dir path=usr/lib/xorg
dir path=usr/lib/xorg/modules
dir path=usr/lib/xorg/modules/extensions
link path=usr/lib/xorg/modules/extensions/libglx.so \
target=../../../../../system/volatile/opengl/server/libglx.so
file path=usr/share/man/man1/ogl-select.1
# constype is required to detect which vendor_select script to run
depend type=require fmri=pkg:/diagnostic/constype
# mesa is needed for the libraries we link to for generic versions,
# since vendor-specific GL implementations don't provide all of them
depend type=require fmri=pkg:/x11/library/mesa