--- a/open-src/lib/Makefile Wed Aug 26 10:51:12 2015 -0700
+++ b/open-src/lib/Makefile Wed Sep 09 12:46:44 2015 -0700
@@ -87,6 +87,7 @@
mesa: libdrm libX11 libXext libXdamage libXfixes libXxf86vm
libglu: mesa
freeglut: mesa libglu
+libepoxy: mesa
# pixman doesn't need these itself, but its test framework uses gtk,
# which does depend on these
@@ -145,6 +146,7 @@
libXxf86misc \
libXxf86vm \
mesa \
+ libepoxy \
libglu \
freeglut \
pixman \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libepoxy/Makefile Wed Sep 09 12:46:44 2015 -0700
@@ -0,0 +1,82 @@
+###############################################################################
+#
+# libepoxy - library for handling OpenGL function pointers
+#
+# Copyright (c) 2015, 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.
+#
+#
+
+# Package name used in tarballs
+MODULE_NAME=libepoxy
+
+# Version number (used in path names)
+MODULE_VERSION=1.2
+
+# Checksums for upstream tarball
+TARBALL_MD5 = 12d6b7621f086c0c928887c27d90bc30
+TARBALL_SHA1 = e700520711b9e4fa07c286aa36e431d8ad4133f5
+TARBALL_SHA256= 42c328440f60a5795835c5ec4bdfc1329e75bba16b6e22b3a87ed17e9679e8f6
+
+# ARC cases that covered this module
+# PSARC/2015/382 libepoxy 1.2
+MODULE_ARC_CASES = PSARC/2015/382
+
+# Package metadata
+MODULE_DESC = library for handling OpenGL function pointers
+UPSTREAM = libepoxy
+UPSTREAM_URL = https://github.com/anholt/libepoxy/
+UPSTREAM_SET = yes
+ORACLE_TPNO = 23546
+ORACLE_TPNO_SET = yes
+
+# Download site for source
+SOURCE_URL = https://github.com/anholt/$(MODULE_NAME)/archive/v$(MODULE_VERSION).tar.gz
+SOURCE_URL_SET = yes
+
+# Source tarball
+SOURCE_TARBALL_NAME = $(MODULE_NAME)-$(MODULE_VERSION).tar.gz
+SOURCE_TARBALL_NAME_SET=yes
+
+# Patches to apply to source after unpacking, in order
+SOURCE_PATCHES = disable-egl.patch
+
+# Need to build with gcc
+MODULE_COMPILER=gcc
+MODULE_COMPILER_SET=yes
+
+# regenerate configure
+AUTORECONF = yes
+
+# libtool interferes with libepoxy
+DELIBTOOLIZE = no
+
+# Library name
+LIBNAME=epoxy
+
+# Man pages to apply Sun footer to & attributes to list
+SUNTOUCHED_MANPAGES=
+MODULE_STABILITY=Pass-through Volatile
+
+# pkg-config files that need to have -R added
+FIX_PC_FILES=epoxy.pc.in
+
+include ../Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libepoxy/disable-egl.patch Wed Sep 09 12:46:44 2015 -0700
@@ -0,0 +1,29 @@
+--- configure.ac Fri Jul 10 11:23:57 2015
++++ configure.ac Fri Jul 10 11:31:10 2015
+@@ -84,6 +84,12 @@
+ has_znow=no
+ EPOXY_LINK_LIBS=""
+ ;;
++ solaris*)
++ build_egl=no
++ build_glx=yes
++ build_wgl=no
++ EPOXY_LINK_LIBS=""
++ ;;
+ *)
+ build_egl=yes
+ build_glx=yes
+--- src/dispatch_common.h Fri Jul 10 11:57:22 2015
++++ src/dispatch_common.h Fri Jul 10 11:58:48 2015
+@@ -33,6 +33,11 @@
+ #define PLATFORM_HAS_GLX 1
+ #define PLATFORM_HAS_WGL 0
+ #define EPOXY_IMPORTEXPORT
++#elif defined(__sun) && defined(__SVR4)
++#define PLATFORM_HAS_EGL 0
++#define PLATFORM_HAS_GLX 1
++#define PLATFORM_HAS_WGL 0
++#define EPOXY_IMPORTEXPORT
+ #else
+ #define PLATFORM_HAS_EGL 1
+ #define PLATFORM_HAS_GLX 1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg/manifests/x11-library-libepoxy.p5m Wed Sep 09 12:46:44 2015 -0700
@@ -0,0 +1,43 @@
+# Copyright (c) 2015, 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.
+#
+set name=pkg.fmri value=pkg:/x11/library/libepoxy@__version:libepoxy__
+set name=pkg.summary \
+ value="library for handling OpenGL function pointer management"
+set name=pkg.description \
+ value="Epoxy is a library for handling OpenGL function pointer management"
+#
+dir path=usr/include/epoxy
+file path=usr/include/epoxy/gl.h
+file path=usr/include/epoxy/gl_generated.h
+file path=usr/include/epoxy/glx.h
+file path=usr/include/epoxy/glx_generated.h
+link path=usr/lib/$(ARCH64)/libepoxy.so target=libepoxy.so.0.0.0
+link path=usr/lib/$(ARCH64)/libepoxy.so.0 target=libepoxy.so.0.0.0
+#
+file path=usr/lib/$(ARCH64)/libepoxy.so.0.0.0
+#
+file path=usr/lib/$(ARCH64)/pkgconfig/epoxy.pc
+link path=usr/lib/libepoxy.so target=libepoxy.so.0.0.0
+link path=usr/lib/libepoxy.so.0 target=libepoxy.so.0.0.0
+#
+file path=usr/lib/libepoxy.so.0.0.0
+file path=usr/lib/pkgconfig/epoxy.pc