From 985ac1bddf33b0a748f7bfff9c8c6050987e9ff594b357507f15ddcc58c415fd Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Fri, 25 Oct 2019 19:20:10 +0000 Subject: [PATCH] - 0001-include-install-GL-headers-when-GL-is-enabled.patch * A typo made it depend on EGL instead. - 0002-Add-a-configure-option-to-disable-glesv1-or-glesv2.patch * Because mesa can be built without glesv1 so it breaks autodetection. Fixes: https://bugs.archlinux.org/task/64032 ('mesa-demos doesn't build, unable to find GLES/gl.h') - 0003-egl-Sync-with-Khronos.patch * Reserve enums 0x34A0..0x34AF for ANGLE project. (#93) Closes: https://gitlab.freedesktop.org/glvnd/libglvnd/issues/193 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/libglvnd?expand=0&rev=42 --- ...nstall-GL-headers-when-GL-is-enabled.patch | 28 ++++ ...e-option-to-disable-glesv1-or-glesv2.patch | 122 ++++++++++++++++++ 0003-egl-Sync-with-Khronos.patch | 62 +++++++++ libglvnd.changes | 13 ++ libglvnd.spec | 6 + 5 files changed, 231 insertions(+) create mode 100644 0001-include-install-GL-headers-when-GL-is-enabled.patch create mode 100644 0002-Add-a-configure-option-to-disable-glesv1-or-glesv2.patch create mode 100644 0003-egl-Sync-with-Khronos.patch diff --git a/0001-include-install-GL-headers-when-GL-is-enabled.patch b/0001-include-install-GL-headers-when-GL-is-enabled.patch new file mode 100644 index 0000000..7ed4584 --- /dev/null +++ b/0001-include-install-GL-headers-when-GL-is-enabled.patch @@ -0,0 +1,28 @@ +From 6f52473dac08c44b081b792874b4ce73122096da Mon Sep 17 00:00:00 2001 +From: Eric Engestrom +Date: Mon, 30 Sep 2019 16:06:42 +0100 +Subject: [PATCH 1/3] include: install GL headers when GL is enabled + +A typo made it depend on EGL instead. + +Fixes: ab9b5fcc3bf90064418f ("Install the GL/GLES/GLX/EGL header files.") +--- + include/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/Makefile.am b/include/Makefile.am +index 1e33d2d..3d81d17 100644 +--- a/include/Makefile.am ++++ b/include/Makefile.am +@@ -39,7 +39,7 @@ EGL_HEADER_FILES = \ + EGL/eglext.h \ + EGL/eglplatform.h + +-if ENABLE_EGL_HEADERS ++if ENABLE_GL_HEADERS + nobase_include_HEADERS += $(GL_HEADER_FILES) + else + noinst_HEADERS += $(GL_HEADER_FILES) +-- +2.16.4 + diff --git a/0002-Add-a-configure-option-to-disable-glesv1-or-glesv2.patch b/0002-Add-a-configure-option-to-disable-glesv1-or-glesv2.patch new file mode 100644 index 0000000..0806667 --- /dev/null +++ b/0002-Add-a-configure-option-to-disable-glesv1-or-glesv2.patch @@ -0,0 +1,122 @@ +From 3a1fb32c3b2ba0bc28952759c33dc98bb5260125 Mon Sep 17 00:00:00 2001 +From: Laurent Carlier +Date: Tue, 8 Oct 2019 16:34:16 +0000 +Subject: [PATCH 2/3] Add a configure option to disable glesv1 or glesv2 + +Because mesa can be built without glesv1 so it breaks autodetection. + +Fixes: https://bugs.archlinux.org/task/64032 ('mesa-demos doesn't build, unable to find GLES/gl.h') +--- + configure.ac | 23 +++++++++++++++-------- + include/Makefile.am | 24 ++++++++++++++++++------ + src/Makefile.am | 4 +++- + 3 files changed, 36 insertions(+), 15 deletions(-) + +diff --git a/configure.ac b/configure.ac +index faa0379..eb68d3b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -70,13 +70,19 @@ if test "x$enable_x11" != "xyes" -a "x$enable_glx" = "xyes" ; then + AC_MSG_ERROR([Can't build GLX without X11.]) + fi + +-AC_ARG_ENABLE([gles], +- [AS_HELP_STRING([--disable-gles], +- [Do not build the libGLES*.so libraries @<:@default=enabled@:>@])], +- [enable_gles="$enableval"], +- [enable_gles=yes] +-) +-AM_CONDITIONAL([ENABLE_GLES], [test "x$enable_gles" = "xyes"]) ++AC_ARG_ENABLE([gles1], ++ [AS_HELP_STRING([--disable-gles1], ++ [disable support for OpenGL ES 1.x API @<:@default=enabled@:>@])], ++ [enable_gles1="$enableval"], ++ [enable_gles1=yes]) ++AM_CONDITIONAL([ENABLE_GLES1], [test "x$enable_gles1" = "xyes"]) ++ ++AC_ARG_ENABLE([gles2], ++ [AS_HELP_STRING([--disable-gles2], ++ [disable support for OpenGL ES 2.x and 3.x API @<:@default=enabled@:>@])], ++ [enable_gles2="$enableval"], ++ [enable_gles2=yes]) ++AM_CONDITIONAL([ENABLE_GLES2], [test "x$enable_gles2" = "xyes"]) + + AC_ARG_ENABLE([headers], + [AS_HELP_STRING([--disable-headers], +@@ -87,7 +93,8 @@ AC_ARG_ENABLE([headers], + AM_CONDITIONAL([ENABLE_GL_HEADERS], [test "x$enable_headers" = "xyes"]) + AM_CONDITIONAL([ENABLE_EGL_HEADERS], [test "x$enable_headers" = "xyes" -a "x$enable_egl" = "xyes"]) + AM_CONDITIONAL([ENABLE_GLX_HEADERS], [test "x$enable_headers" = "xyes" -a "x$enable_glx" = "xyes"]) +-AM_CONDITIONAL([ENABLE_GLES_HEADERS], [test "x$enable_headers" = "xyes" -a "x$enable_gles" = "xyes"]) ++AM_CONDITIONAL([ENABLE_GLES1_HEADERS], [test "x$enable_headers" = "xyes" -a "x$enable_gles1" = "xyes"]) ++AM_CONDITIONAL([ENABLE_GLES2_HEADERS], [test "x$enable_headers" = "xyes" -a "x$enable_gles2" = "xyes"]) + + dnl + dnl Arch/platform-specific settings. Copied from mesa +diff --git a/include/Makefile.am b/include/Makefile.am +index 3d81d17..0c41dc7 100644 +--- a/include/Makefile.am ++++ b/include/Makefile.am +@@ -17,14 +17,18 @@ GL_HEADER_FILES = \ + GL/glext.h \ + KHR/khrplatform.h + +-GLES_HEADER_FILES = \ ++GLES1_HEADER_FILES = \ + GLES/egl.h \ + GLES/gl.h \ + GLES/glext.h \ +- GLES/glplatform.h \ ++ GLES/glplatform.h ++ ++GLES2_HEADER_FILES = \ + GLES2/gl2ext.h \ + GLES2/gl2.h \ +- GLES2/gl2platform.h \ ++ GLES2/gl2platform.h ++ ++GLES3_HEADER_FILES = \ + GLES3/gl31.h \ + GLES3/gl32.h \ + GLES3/gl3.h \ +@@ -45,10 +49,18 @@ else + noinst_HEADERS += $(GL_HEADER_FILES) + endif + +-if ENABLE_GLES_HEADERS +-nobase_include_HEADERS += $(GLES_HEADER_FILES) ++if ENABLE_GLES1_HEADERS ++nobase_include_HEADERS += $(GLES1_HEADER_FILES) ++else ++noinst_HEADERS += $(GLES1_HEADER_FILES) ++endif ++ ++if ENABLE_GLES2_HEADERS ++nobase_include_HEADERS += $(GLES2_HEADER_FILES) ++nobase_include_HEADERS += $(GLES3_HEADER_FILES) + else +-noinst_HEADERS += $(GLES_HEADER_FILES) ++noinst_HEADERS += $(GLES2_HEADER_FILES) ++noinst_HEADERS += $(GLES3_HEADER_FILES) + endif + + if ENABLE_GLX_HEADERS +diff --git a/src/Makefile.am b/src/Makefile.am +index 5f7ce79..821346f 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -12,8 +12,10 @@ SUBDIRS += GLX + SUBDIRS += GL + endif + +-if ENABLE_GLES ++if ENABLE_GLES1 + SUBDIRS += GLESv1 ++endif ++if ENABLE_GLES2 + SUBDIRS += GLESv2 + endif + +-- +2.16.4 + diff --git a/0003-egl-Sync-with-Khronos.patch b/0003-egl-Sync-with-Khronos.patch new file mode 100644 index 0000000..4ed5949 --- /dev/null +++ b/0003-egl-Sync-with-Khronos.patch @@ -0,0 +1,62 @@ +From 51233cc52cbcbe25f8461830913c06f5b5bc9508 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Thu, 17 Oct 2019 11:51:37 -0400 +Subject: [PATCH 3/3] egl: Sync with Khronos + + commit de3a5e867d906a04a5c37ee0d89e7f01d3598eb9 + Author: Ken Russell + Date: Sat Oct 12 05:44:43 2019 -0700 + + Reserve enums 0x34A0..0x34AF for ANGLE project. (#93) + +Closes: https://gitlab.freedesktop.org/glvnd/libglvnd/issues/193 +--- + include/EGL/eglplatform.h | 6 ++++++ + src/generate/xml/egl.xml | 7 +++++-- + 2 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h +index 29ab288..5ab49c1 100644 +--- a/include/EGL/eglplatform.h ++++ b/include/EGL/eglplatform.h +@@ -116,6 +116,12 @@ typedef intptr_t EGLNativeDisplayType; + typedef intptr_t EGLNativePixmapType; + typedef intptr_t EGLNativeWindowType; + ++#elif defined(__unix__) && defined(EGL_NO_X11) ++ ++typedef void *EGLNativeDisplayType; ++typedef khronos_uintptr_t EGLNativePixmapType; ++typedef khronos_uintptr_t EGLNativeWindowType; ++ + #elif defined(__unix__) || defined(USE_X11) + + /* X11 (tentative) */ +diff --git a/src/generate/xml/egl.xml b/src/generate/xml/egl.xml +index c27f172..6bc2ea2 100644 +--- a/src/generate/xml/egl.xml ++++ b/src/generate/xml/egl.xml +@@ -1002,6 +1002,9 @@ + + + ++ ++ ++ + + +- +- ++ ++ + + + +-- +2.16.4 + diff --git a/libglvnd.changes b/libglvnd.changes index 51d31a6..d08dc56 100644 --- a/libglvnd.changes +++ b/libglvnd.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Fri Oct 25 19:13:21 UTC 2019 - Stefan Dirsch + +- 0001-include-install-GL-headers-when-GL-is-enabled.patch + * A typo made it depend on EGL instead. +- 0002-Add-a-configure-option-to-disable-glesv1-or-glesv2.patch + * Because mesa can be built without glesv1 so it breaks + autodetection. Fixes: https://bugs.archlinux.org/task/64032 + ('mesa-demos doesn't build, unable to find GLES/gl.h') +- 0003-egl-Sync-with-Khronos.patch + * Reserve enums 0x34A0..0x34AF for ANGLE project. (#93) + Closes: https://gitlab.freedesktop.org/glvnd/libglvnd/issues/193 + ------------------------------------------------------------------- Mon Oct 7 21:32:25 UTC 2019 - Stefan Dirsch diff --git a/libglvnd.spec b/libglvnd.spec index 2850d3a..95e80b4 100644 --- a/libglvnd.spec +++ b/libglvnd.spec @@ -30,6 +30,9 @@ Url: https://github.com/NVIDIA/libglvnd Source: %name-%version.tar.gz Source1: baselibs.conf Patch0: n_0001-GL-Bump-GL-version-to-9-2.patch +Patch1: 0001-include-install-GL-headers-when-GL-is-enabled.patch +Patch2: 0002-Add-a-configure-option-to-disable-glesv1-or-glesv2.patch +Patch3: 0003-egl-Sync-with-Khronos.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool @@ -62,6 +65,9 @@ development. %prep %setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 # fix env shebang to call py3 directly sed -i -e "1s|#!.*|#!/usr/bin/python3|" src/generate/*.py