From b9760b891d6c6d3f10a1e954e9e17b26a834090a Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Jul 13 2017 18:42:25 +0000 Subject: Drop unused patches --- diff --git a/0001-Add-C-guards-around-generated-headers.patch b/0001-Add-C-guards-around-generated-headers.patch deleted file mode 100644 index 6b8f8a8..0000000 --- a/0001-Add-C-guards-around-generated-headers.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 3fb4fea6743c660401b78f1f08afda731d32192e Mon Sep 17 00:00:00 2001 -From: Emmanuele Bassi -Date: Fri, 3 Mar 2017 14:41:15 +0000 -Subject: [PATCH 1/6] Add C++ guards around generated headers - -Commit 0625a74d69f762df8d411bc0451927424aee1f2c moved the C++ guards -after the inclusion of the generated headers, which was an unintended -behavioural change and now requires header guards around the inclusion -of Epoxy headers. - -Fixes: #106 ---- - include/epoxy/egl.h | 4 ++-- - include/epoxy/gl.h | 4 ++-- - include/epoxy/glx.h | 4 ++-- - include/epoxy/wgl.h | 4 ++-- - 4 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/include/epoxy/egl.h b/include/epoxy/egl.h -index d5083da..b5f8ee0 100644 ---- a/include/epoxy/egl.h -+++ b/include/epoxy/egl.h -@@ -41,10 +41,10 @@ - #define __eglext_h_ - #endif - --#include "epoxy/egl_generated.h" -- - EPOXY_BEGIN_DECLS - -+#include "epoxy/egl_generated.h" -+ - EPOXY_PUBLIC bool epoxy_has_egl_extension(EGLDisplay dpy, const char *extension); - EPOXY_PUBLIC int epoxy_egl_version(EGLDisplay dpy); - EPOXY_PUBLIC bool epoxy_has_egl(void); -diff --git a/include/epoxy/gl.h b/include/epoxy/gl.h -index 078ecee..88b9a15 100644 ---- a/include/epoxy/gl.h -+++ b/include/epoxy/gl.h -@@ -84,10 +84,10 @@ - #define GLAPIENTRYP GLAPIENTRY * - #endif - --#include "epoxy/gl_generated.h" -- - EPOXY_BEGIN_DECLS - -+#include "epoxy/gl_generated.h" -+ - EPOXY_PUBLIC bool epoxy_has_gl_extension(const char *extension); - EPOXY_PUBLIC bool epoxy_is_desktop_gl(void); - EPOXY_PUBLIC int epoxy_gl_version(void); -diff --git a/include/epoxy/glx.h b/include/epoxy/glx.h -index a06b13d..8517063 100644 ---- a/include/epoxy/glx.h -+++ b/include/epoxy/glx.h -@@ -44,10 +44,10 @@ - #define __glxext_h_ - #endif - --#include "epoxy/glx_generated.h" -- - EPOXY_BEGIN_DECLS - -+#include "epoxy/glx_generated.h" -+ - EPOXY_PUBLIC bool epoxy_has_glx_extension(Display *dpy, int screen, const char *extension); - EPOXY_PUBLIC int epoxy_glx_version(Display *dpy, int screen); - EPOXY_PUBLIC bool epoxy_has_glx(Display *dpy); -diff --git a/include/epoxy/wgl.h b/include/epoxy/wgl.h -index 503f899..7c85dec 100644 ---- a/include/epoxy/wgl.h -+++ b/include/epoxy/wgl.h -@@ -49,10 +49,10 @@ - #define wglUseFontBitmaps wglUseFontBitmapsA - #endif - --#include "epoxy/wgl_generated.h" -- - EPOXY_BEGIN_DECLS - -+#include "epoxy/wgl_generated.h" -+ - EPOXY_PUBLIC bool epoxy_has_wgl_extension(HDC hdc, const char *extension); - EPOXY_PUBLIC void epoxy_handle_external_wglMakeCurrent(void); - --- -2.12.0 - diff --git a/0002-Add-z-relro-and-z-now-to-the-GCC-linker-flags.patch b/0002-Add-z-relro-and-z-now-to-the-GCC-linker-flags.patch deleted file mode 100644 index d831207..0000000 --- a/0002-Add-z-relro-and-z-now-to-the-GCC-linker-flags.patch +++ /dev/null @@ -1,35 +0,0 @@ -From f19f943a6699d771ef85402998a56743d6dfa3d9 Mon Sep 17 00:00:00 2001 -From: Emmanuele Bassi -Date: Fri, 3 Mar 2017 16:58:46 +0000 -Subject: [PATCH 2/6] Add z,relro and z,now to the GCC linker flags - -These flags are mitigations against memory corruption bugs, and are -typically enabled by Linux distributions hardening rules. - -We only use these flags with GCC, similarly to `-Bsymbolic`. - -More information on relro is available here: - - - http://tk-blog.blogspot.co.uk/2009/02/relro-not-so-well-known-memory.html - - http://mudongliang.github.io/2016/07/11/relro-a-not-so-well-known-memory-corruption-mitigation-technique.html - - https://wiki.debian.org/Hardening#DEB_BUILD_HARDENING_RELRO_.28ld_-z_relro.29 ---- - src/meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/meson.build b/src/meson.build -index 3610af3..ecd032a 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -52,7 +52,7 @@ foreach h: headers - endforeach - - if cc.get_id() == 'gcc' -- common_ldflags = [ '-Wl,-Bsymbolic', ] -+ common_ldflags = [ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ] - else - common_ldflags = [] - endif --- -2.12.0 - diff --git a/0003-Add-explicit-version-flags-for-macOS-builds.patch b/0003-Add-explicit-version-flags-for-macOS-builds.patch deleted file mode 100644 index 22d4e32..0000000 --- a/0003-Add-explicit-version-flags-for-macOS-builds.patch +++ /dev/null @@ -1,38 +0,0 @@ -From d0a1a4e6767da8a2455b8822446978b35813161d Mon Sep 17 00:00:00 2001 -From: Emmanuele Bassi -Date: Tue, 7 Mar 2017 11:52:26 +0000 -Subject: [PATCH 3/6] Add explicit version flags for macOS builds - -Autotools automatically adds version related linker flags on macOS that -are not related to the version information. Since we want to maintain -binary compatibility, we should do the same when building on macOS. - -Fixes: #108 ---- - src/meson.build | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/src/meson.build b/src/meson.build -index ecd032a..4dbb3eb 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -51,10 +51,14 @@ foreach h: headers - epoxy_headers += join_paths(meson.source_root(), 'include/epoxy/@0@'.format(h)) - endforeach - -+common_ldflags = [] - if cc.get_id() == 'gcc' - common_ldflags = [ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ] --else -- common_ldflags = [] -+endif -+ -+# Maintain compatibility with autotools; see: https://github.com/anholt/libepoxy/issues/108 -+if host_system == 'darwin' -+ common_ldflags += [ '-compatibility_version=1', '-current_version=1.0', ] - endif - - epoxy_deps = [ dl_dep, ] --- -2.12.0 - diff --git a/0004-Use-some-linker-flags-only-on-Linux.patch b/0004-Use-some-linker-flags-only-on-Linux.patch deleted file mode 100644 index 86d43f9..0000000 --- a/0004-Use-some-linker-flags-only-on-Linux.patch +++ /dev/null @@ -1,29 +0,0 @@ -From bfd99a94218275361fc3b207e397e93042a0b1b1 Mon Sep 17 00:00:00 2001 -From: Emmanuele Bassi -Date: Tue, 7 Mar 2017 15:32:43 +0000 -Subject: [PATCH 4/6] Use some linker flags only on Linux - -Using GCC is not a guarantee of also having access to the Linux linker; -just like we use specific linker flags on macOS, the symbolic and relro -linker flags are pretty much Linux specific. ---- - src/meson.build | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/meson.build b/src/meson.build -index 4dbb3eb..a3d76db 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -52,7 +52,8 @@ foreach h: headers - endforeach - - common_ldflags = [] --if cc.get_id() == 'gcc' -+ -+if host_system == 'linux' - common_ldflags = [ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ] - endif - --- -2.12.0 - diff --git a/0005-Add-missing-visibility-compiler-flags.patch b/0005-Add-missing-visibility-compiler-flags.patch deleted file mode 100644 index c9b019e..0000000 --- a/0005-Add-missing-visibility-compiler-flags.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 4719e586c0f92fa7546fa954115b92d2ae9aee9f Mon Sep 17 00:00:00 2001 -From: Emmanuele Bassi -Date: Thu, 9 Mar 2017 21:21:09 +0000 -Subject: [PATCH 5/6] Add missing visibility compiler flags - -We have been building the shared library for Epoxy without the symbol -visibility flags for the compiler, which means we've been leaking -internal symbols all over the floor. - -Fixes: #111 ---- - meson.build | 10 ++++++---- - src/meson.build | 4 +--- - 2 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/meson.build b/meson.build -index 95aac5c..afe576b 100644 ---- a/meson.build -+++ b/meson.build -@@ -140,9 +140,11 @@ foreach cflag: test_cflags - endif - endforeach - --# Visibility compiler flags --visibility_cflags = [] --if get_option('default_library') != 'static' -+libtype = get_option('default_library') -+ -+# Visibility compiler flags; we only use this for shared libraries -+if libtype == 'shared' -+ visibility_cflags = [] - if host_system == 'windows' - conf.set('DLL_EXPORT', true) - if cc.get_id() == 'msvc' -@@ -152,7 +154,7 @@ if get_option('default_library') != 'static' - visibility_cflags += [ '-fvisibility=hidden' ] - endif - else -- conf.set('EPOXY_PUBLIC', '__attribute__((visibility("default")))') -+ conf.set('EPOXY_PUBLIC', '__attribute__((visibility("default"))) extern') - visibility_cflags += [ '-fvisibility=hidden' ] - endif - endif -diff --git a/src/meson.build b/src/meson.build -index a3d76db..ce6fe45 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -68,8 +68,6 @@ if host_system == 'windows' - endif - - # Allow building a static version of epoxy --libtype = get_option('default_library') -- - if libtype != 'shared' - libepoxy_static = static_library('epoxy', - sources: epoxy_sources + epoxy_headers, -@@ -88,7 +86,7 @@ if libtype != 'static' - install: true, - dependencies: epoxy_deps, - include_directories: libepoxy_inc, -- c_args: common_cflags, -+ c_args: common_cflags + visibility_cflags, - link_args: common_ldflags) - libepoxy = libepoxy_shared - endif --- -2.12.0 - diff --git a/0006-Prefer-using-pkg-config-files-to-find-GLES.patch b/0006-Prefer-using-pkg-config-files-to-find-GLES.patch deleted file mode 100644 index 1891c94..0000000 --- a/0006-Prefer-using-pkg-config-files-to-find-GLES.patch +++ /dev/null @@ -1,42 +0,0 @@ -From f7d3671a0fcad0f5371ce60916394e0269c5cee3 Mon Sep 17 00:00:00 2001 -From: Emmanuele Bassi -Date: Thu, 9 Mar 2017 21:28:52 +0000 -Subject: [PATCH 6/6] Prefer using pkg-config files to find GLES - -Just like we do for GL and EGL, we can use pkg-config to find the GLES -v2 and v1 dependencies. - -Fixes: #110 ---- - meson.build | 15 +++++++++++++-- - 1 file changed, 13 insertions(+), 2 deletions(-) - -diff --git a/meson.build b/meson.build -index afe576b..a513f5f 100644 ---- a/meson.build -+++ b/meson.build -@@ -166,8 +166,19 @@ egl_dep = dependency('egl', required: false) - - # Optional dependencies for tests - x11_dep = dependency('x11', required: false) --gles1_dep = cc.find_library('libGLESv1_CM', required: false) --gles2_dep = cc.find_library('libGLESv2', required: false) -+ -+# GLES v2 and v1 may have pkg-config files, courtesy of downstream -+# packagers; let's check those first, and fall back to find_library() -+# if we fail -+gles2_dep = dependency('glesv2', required: false) -+if not gles2_dep.found() -+ gles2_dep = cc.find_library('libGLESv2', required: false) -+endif -+ -+gles1_dep = dependency('glesv1_cm', required: false) -+if not gles1_dep.found() -+ gles1_dep = cc.find_library('libGLESv1_CM', required: false) -+endif - - # On windows, the DLL has to have all of its functions - # resolved at link time, so we have to link directly aginst --- -2.12.0 -