summaryrefslogtreecommitdiffstats
path: root/external/epoxy
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-11-25 20:25:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-12-13 11:33:18 +0000
commit482d7ce61b423600b41b459eb26a2cc221cd0acf (patch)
tree8da6edb8200889d93f0b344e61ed779c037a590f /external/epoxy
parentDon't leave WW8AnchorConvResult::m_bConverted uninitialized (diff)
downloadcore-482d7ce61b423600b41b459eb26a2cc221cd0acf.tar.gz
core-482d7ce61b423600b41b459eb26a2cc221cd0acf.zip
change from glew to epoxy
because that works under wayland out of the box and gtk3 uses it already Change-Id: Iefaac31e325534a81a5389f752804af917c1baef Reviewed-on: https://gerrit.libreoffice.org/31213 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'external/epoxy')
-rw-r--r--external/epoxy/Library_epoxy.mk63
-rw-r--r--external/epoxy/Makefile7
-rw-r--r--external/epoxy/Module_epoxy.mk17
-rw-r--r--external/epoxy/README5
-rw-r--r--external/epoxy/UnpackedTarball_epoxy.mk20
-rw-r--r--external/epoxy/epoxy.windows.api.patch90
6 files changed, 202 insertions, 0 deletions
diff --git a/external/epoxy/Library_epoxy.mk b/external/epoxy/Library_epoxy.mk
new file mode 100644
index 000000000000..28f9dab6b709
--- /dev/null
+++ b/external/epoxy/Library_epoxy.mk
@@ -0,0 +1,63 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Library_Library,epoxy))
+
+$(eval $(call gb_Library_use_unpacked,epoxy,epoxy))
+
+$(eval $(call gb_Library_set_warnings_not_errors,epoxy))
+
+$(eval $(call gb_Library_set_include,epoxy,\
+ -I$(WORKDIR)/UnpackedTarball/epoxy/include \
+ -I$(WORKDIR)/UnpackedTarball/epoxy/src \
+ $$(INCLUDE) \
+))
+
+# epoxy is riddled with warnings... let's spare use
+# the pointless spamming
+$(eval $(call gb_Library_add_cxxflags,epoxy,\
+ -w \
+))
+$(eval $(call gb_Library_add_cflags,epoxy,\
+ -w \
+))
+
+ifeq ($(OS),LINUX)
+$(eval $(call gb_Library_add_libs,epoxy,\
+ -ldl \
+))
+endif
+
+$(eval $(call gb_Library_add_generated_cobjects,epoxy,\
+ UnpackedTarball/epoxy/src/dispatch_common \
+ UnpackedTarball/epoxy/src/gl_generated_dispatch \
+))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_Library_add_generated_cobjects,epoxy,\
+ UnpackedTarball/epoxy/src/dispatch_wgl \
+ UnpackedTarball/epoxy/src/wgl_generated_dispatch \
+))
+else ifeq ($(OS),MACOSX)
+# nothing
+else ifeq ($(OS),ANDROID)
+$(eval $(call gb_Library_add_generated_cobjects,epoxy,\
+ UnpackedTarball/epoxy/src/dispatch_egl \
+ UnpackedTarball/epoxy/src/egl_generated_dispatch \
+))
+else
+$(eval $(call gb_Library_add_generated_cobjects,epoxy,\
+ UnpackedTarball/epoxy/src/dispatch_glx \
+ UnpackedTarball/epoxy/src/glx_generated_dispatch \
+ UnpackedTarball/epoxy/src/dispatch_egl \
+ UnpackedTarball/epoxy/src/egl_generated_dispatch \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/epoxy/Makefile b/external/epoxy/Makefile
new file mode 100644
index 000000000000..e4968cf85fb6
--- /dev/null
+++ b/external/epoxy/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/epoxy/Module_epoxy.mk b/external/epoxy/Module_epoxy.mk
new file mode 100644
index 000000000000..ea65176b85b3
--- /dev/null
+++ b/external/epoxy/Module_epoxy.mk
@@ -0,0 +1,17 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,epoxy))
+
+$(eval $(call gb_Module_add_targets,epoxy,\
+ Library_epoxy \
+ UnpackedTarball_epoxy \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/epoxy/README b/external/epoxy/README
new file mode 100644
index 000000000000..8bd467af5c76
--- /dev/null
+++ b/external/epoxy/README
@@ -0,0 +1,5 @@
+Epoxy is an OpenGL Extension Wrangler
+
+Epoxy is a library for handling OpenGL function pointer management for you
+
+https://github.com/anholt/libepoxy
diff --git a/external/epoxy/UnpackedTarball_epoxy.mk b/external/epoxy/UnpackedTarball_epoxy.mk
new file mode 100644
index 000000000000..76c0fdf9cee9
--- /dev/null
+++ b/external/epoxy/UnpackedTarball_epoxy.mk
@@ -0,0 +1,20 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,epoxy))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,epoxy,$(EPOXY_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_set_patchlevel,epoxy,0))
+
+$(eval $(call gb_UnpackedTarball_add_patches,epoxy, \
+ external/epoxy/epoxy.windows.api.patch \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/epoxy/epoxy.windows.api.patch b/external/epoxy/epoxy.windows.api.patch
new file mode 100644
index 000000000000..12d2afb6a6ad
--- /dev/null
+++ b/external/epoxy/epoxy.windows.api.patch
@@ -0,0 +1,90 @@
+--- include/epoxy/gl.h
++++ include/epoxy/gl.h
+@@ -59,7 +59,8 @@
+
+ #else
+ #ifndef APIENTRY
+-#define APIENTRY __stdcall
++#define WINAPI __stdcall
++#define APIENTRY WINAPI
+ #endif
+
+ #ifndef GLAPIENTRY
+--- src/egl_generated_dispatch.c
++++ src/egl_generated_dispatch.c
+@@ -128,7 +128,11 @@
+ };
+
+ #if USING_DISPATCH_TABLE
++#if defined (_MSC_VER)
++static __inline struct dispatch_table *
++#else
+ static inline struct dispatch_table *
++#endif
+ get_dispatch_table(void);
+
+ #endif
+@@ -1642,7 +1646,11 @@
+ uint32_t egl_tls_index;
+ uint32_t egl_tls_size = sizeof(struct dispatch_table);
+
++#if defined (_MSC_VER)
++static __inline struct dispatch_table *
++#else
+ static inline struct dispatch_table *
++#endif
+ get_dispatch_table(void)
+ {
+ return TlsGetValue(egl_tls_index);
+--- src/gl_generated_dispatch.c
++++ src/gl_generated_dispatch.c
+@@ -3122,7 +3122,11 @@
+ };
+
+ #if USING_DISPATCH_TABLE
++#if defined (_MSC_VER)
++static __inline struct dispatch_table *
++#else
+ static inline struct dispatch_table *
++#endif
+ get_dispatch_table(void);
+
+ #endif
+@@ -51507,7 +51511,11 @@
+ uint32_t gl_tls_index;
+ uint32_t gl_tls_size = sizeof(struct dispatch_table);
+
++#if defined (_MSC_VER)
++static __inline struct dispatch_table *
++#else
+ static inline struct dispatch_table *
++#endif
+ get_dispatch_table(void)
+ {
+ return TlsGetValue(gl_tls_index);
+--- src/wgl_generated_dispatch.c
++++ src/wgl_generated_dispatch.c
+@@ -157,7 +157,11 @@
+ };
+
+ #if USING_DISPATCH_TABLE
++#if defined (_MSC_VER)
++static __inline struct dispatch_table *
++#else
+ static inline struct dispatch_table *
++#endif
+ get_dispatch_table(void);
+
+ #endif
+@@ -1701,7 +1705,11 @@
+ uint32_t wgl_tls_index;
+ uint32_t wgl_tls_size = sizeof(struct dispatch_table);
+
++#if defined (_MSC_VER)
++static __inline struct dispatch_table *
++#else
+ static inline struct dispatch_table *
++#endif
+ get_dispatch_table(void)
+ {
+ return TlsGetValue(wgl_tls_index);