From e3f2a5e4da703f20f8b578ba74a8ccd03ccd2802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Wed, 24 Jan 2024 15:18:39 +0100 Subject: [PATCH] Add egl-headers and opengl-headers packages (#3160) --- packages/e/egl-headers/xmake.lua | 22 ++++++++++++++++++++++ packages/o/opengl-headers/xmake.lua | 23 +++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 packages/e/egl-headers/xmake.lua create mode 100644 packages/o/opengl-headers/xmake.lua diff --git a/packages/e/egl-headers/xmake.lua b/packages/e/egl-headers/xmake.lua new file mode 100644 index 00000000000..f12a7841a0c --- /dev/null +++ b/packages/e/egl-headers/xmake.lua @@ -0,0 +1,22 @@ +package("egl-headers") + set_kind("library", {headeronly = true}) + set_homepage("https://github.com/KhronosGroup/EGL-Registry") + set_description("EGL API and Extension Registry") + set_license("MIT") + + add_urls("https://github.com/KhronosGroup/EGL-Registry.git") + + add_versions("2023.12.16", "a03692eea13514d9aef01822b2bc6575fcabfac2") + + on_install(function (package) + os.vcp("api/EGL", package:installdir("include")) + os.vcp("api/KHR", package:installdir("include")) + end) + + on_test(function (package) + assert(package:check_csnippets({test = [[ + void test() { + int version = EGL_VERSION; + } + ]]}, {includes = "EGL/egl.h"})) + end) diff --git a/packages/o/opengl-headers/xmake.lua b/packages/o/opengl-headers/xmake.lua new file mode 100644 index 00000000000..b294cc66854 --- /dev/null +++ b/packages/o/opengl-headers/xmake.lua @@ -0,0 +1,23 @@ +package("opengl-headers") + set_kind("library", {headeronly = true}) + set_homepage("https://github.com/KhronosGroup/OpenGL-Registry/") + set_description("OpenGL, OpenGL ES, and OpenGL ES-SC API and Extension Registry") + set_license("MIT") + + add_urls("https://github.com/KhronosGroup/OpenGL-Registry.git") + + add_versions("2024.01.04", "ca491a0576d5c026f06ebe29bfac7cbbcf1e8332") + + add_deps("egl-headers") + + on_install(function (package) + os.vcp("api/*", package:installdir("include")) + end) + + on_test(function (package) + assert(package:check_csnippets({test = [[ + void test() { + int version = GL_VERSION; + } + ]]}, {includes = "GLES3/gl3.h"})) + end)