diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /external/epoxy | |
parent | Initial commit. (diff) | |
download | libreoffice-upstream.tar.xz libreoffice-upstream.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | external/epoxy/Library_epoxy.mk | 65 | ||||
-rw-r--r-- | external/epoxy/Makefile | 7 | ||||
-rw-r--r-- | external/epoxy/Module_epoxy.mk | 17 | ||||
-rw-r--r-- | external/epoxy/README | 5 | ||||
-rw-r--r-- | external/epoxy/UnpackedTarball_epoxy.mk | 37 | ||||
-rw-r--r-- | external/epoxy/clang-cl.patch | 14 | ||||
-rw-r--r-- | external/epoxy/epoxy.noegl.by.default.patch | 28 | ||||
-rw-r--r-- | external/epoxy/epoxy.visibility.patch | 5 | ||||
-rw-r--r-- | external/epoxy/epoxy.windows.api.patch | 12 |
9 files changed, 190 insertions, 0 deletions
diff --git a/external/epoxy/Library_epoxy.mk b/external/epoxy/Library_epoxy.mk new file mode 100644 index 000000000..81c35d695 --- /dev/null +++ b/external/epoxy/Library_epoxy.mk @@ -0,0 +1,65 @@ +# -*- 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_disabled,epoxy)) + +$(eval $(call gb_Library_set_include,epoxy,\ + -I$(call gb_UnpackedTarball_get_dir,epoxy)/include \ + -I$(call gb_UnpackedTarball_get_dir,epoxy)/src \ + $$(INCLUDE) \ +)) + +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 ifneq ($(filter iOS MACOSX,$(OS)),) +# 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 \ +)) +ifeq ($(ENABLE_GTK3),TRUE) +$(eval $(call gb_Library_add_cflags,epoxy,\ + -DPLATFORM_HAS_EGL=1 \ +)) +$(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_cflags,epoxy,\ + -DPLATFORM_HAS_EGL=0 \ +)) +endif +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/epoxy/Makefile b/external/epoxy/Makefile new file mode 100644 index 000000000..e4968cf85 --- /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 000000000..ea65176b8 --- /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 000000000..8bd467af5 --- /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 000000000..b8508c6b9 --- /dev/null +++ b/external/epoxy/UnpackedTarball_epoxy.mk @@ -0,0 +1,37 @@ +# -*- 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))) + +$(call gb_UnpackedTarball_get_target,epoxy) :| $(call gb_ExternalExecutable_get_dependencies,python) + +epoxy_PYTHON := $(call gb_ExternalExecutable_get_command,python) + +# previous versions of epoxy bundled the output, but now it has to be generated +$(eval $(call gb_UnpackedTarball_set_pre_action,epoxy,\ + $(epoxy_PYTHON) ./src/gen_dispatch.py --srcdir src --includedir include/epoxy registry/gl.xml && \ + $(epoxy_PYTHON) ./src/gen_dispatch.py --srcdir src --includedir include/epoxy registry/glx.xml && \ + $(epoxy_PYTHON) ./src/gen_dispatch.py --srcdir src --includedir include/epoxy registry/egl.xml && \ + $(epoxy_PYTHON) ./src/gen_dispatch.py --srcdir src --includedir include/epoxy registry/wgl.xml \ +)) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,epoxy,0)) + +# * external/external/epoxy/epoxy.android.patch upstream at +# <https://github.com/anholt/libepoxy/pull/263> "fix error: use of undeclared identifier 'OPENGL_LIB'": +$(eval $(call gb_UnpackedTarball_add_patches,epoxy, \ + external/epoxy/epoxy.visibility.patch \ + external/epoxy/epoxy.windows.api.patch \ + external/epoxy/epoxy.noegl.by.default.patch \ + external/epoxy/clang-cl.patch \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/epoxy/clang-cl.patch b/external/epoxy/clang-cl.patch new file mode 100644 index 000000000..0e0232cea --- /dev/null +++ b/external/epoxy/clang-cl.patch @@ -0,0 +1,14 @@ +--- src/dispatch_common.c ++++ src/dispatch_common.c +@@ -272,7 +272,11 @@ + #endif + }; + ++#if defined _MSC_VER && defined __clang__ ++static bool library_initialized = true; ++#else + static bool library_initialized; ++#endif + + static bool epoxy_current_context_is_glx(void); + diff --git a/external/epoxy/epoxy.noegl.by.default.patch b/external/epoxy/epoxy.noegl.by.default.patch new file mode 100644 index 000000000..bf8945336 --- /dev/null +++ b/external/epoxy/epoxy.noegl.by.default.patch @@ -0,0 +1,28 @@ +--- src/dispatch_common.h ++++ src/dispatch_common.h +@@ -24,20 +24,19 @@ + #include "config.h" + + #ifdef _WIN32 +-#define PLATFORM_HAS_EGL ENABLE_EGL +-#define PLATFORM_HAS_GLX ENABLE_GLX ++#define PLATFORM_HAS_EGL 0 ++#define PLATFORM_HAS_GLX 0 + #define PLATFORM_HAS_WGL 1 + #elif defined(__APPLE__) + #define PLATFORM_HAS_EGL 0 +-#define PLATFORM_HAS_GLX ENABLE_GLX ++#define PLATFORM_HAS_GLX 0 + #define PLATFORM_HAS_WGL 0 + #elif defined(ANDROID) +-#define PLATFORM_HAS_EGL ENABLE_EGL ++#define PLATFORM_HAS_EGL 1 + #define PLATFORM_HAS_GLX 0 + #define PLATFORM_HAS_WGL 0 + #else +-#define PLATFORM_HAS_EGL ENABLE_EGL +-#define PLATFORM_HAS_GLX ENABLE_GLX ++#define PLATFORM_HAS_GLX 1 + #define PLATFORM_HAS_WGL 0 + #endif + diff --git a/external/epoxy/epoxy.visibility.patch b/external/epoxy/epoxy.visibility.patch new file mode 100644 index 000000000..12297b5e2 --- /dev/null +++ b/external/epoxy/epoxy.visibility.patch @@ -0,0 +1,5 @@ +--- src/config.h 2018-08-28 13:19:40.699141662 +0100 ++++ src/config.h 2018-08-28 13:21:51.942139881 +0100 +@@ -0,0 +1,2 @@ ++#include <sal/types.h> ++#define EPOXY_PUBLIC SAL_DLLPUBLIC_EXPORT extern diff --git a/external/epoxy/epoxy.windows.api.patch b/external/epoxy/epoxy.windows.api.patch new file mode 100644 index 000000000..985f2d880 --- /dev/null +++ b/external/epoxy/epoxy.windows.api.patch @@ -0,0 +1,12 @@ +--- 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 |