From 87a7640f85d5fb3b6ff5cc9564e7dada519127c0 Mon Sep 17 00:00:00 2001 From: Frank <65999885+FrankXie05@users.noreply.github.com> Date: Thu, 9 May 2024 20:05:16 +0000 Subject: [PATCH] [gl3w] Support to include GL extensions in header file (#38605) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix https://github.com/microsoft/vcpkg/issues/38588 Include the GL extension in the header file by adding the parameter `--ext`. Note: This method only adds GL extension and does not delete any original method implementation. Upstream: ``` The generator script optionally takes the arguments: --ext to include the GL Extensions in output header. ``` https://github.com/skaslev/gl3w?tab=readme-ov-file#options - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [ ] ~~SHA512s are updated for each updated download.~~ - [ ] ~~The "supports" clause reflects platforms that may be fixed by this new version.~~ - [ ] ~~Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~~ - [ ] ~~Any patches that are no longer applied are deleted from the port's directory.~~ - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file. --- ports/gl3w/portfile.cmake | 6 +++++- ports/gl3w/vcpkg.json | 9 +++++++-- versions/baseline.json | 2 +- versions/g-/gl3w.json | 5 +++++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ports/gl3w/portfile.cmake b/ports/gl3w/portfile.cmake index 2633bf05a4..741ad862d7 100644 --- a/ports/gl3w/portfile.cmake +++ b/ports/gl3w/portfile.cmake @@ -14,8 +14,12 @@ file(COPY "${CURRENT_INSTALLED_DIR}/include/KHR/khrplatform.h" DESTINATION "${SO vcpkg_find_acquire_program(PYTHON3) +if("ext" IN_LIST FEATURES) + set(EXT "--ext") +endif() + vcpkg_execute_required_process( - COMMAND "${PYTHON3}" "${SOURCE_PATH}/gl3w_gen.py" + COMMAND "${PYTHON3}" "${SOURCE_PATH}/gl3w_gen.py" "${EXT}" WORKING_DIRECTORY "${SOURCE_PATH}" LOGNAME gl3w-gen ) diff --git a/ports/gl3w/vcpkg.json b/ports/gl3w/vcpkg.json index 0963571711..dedfee6795 100644 --- a/ports/gl3w/vcpkg.json +++ b/ports/gl3w/vcpkg.json @@ -1,7 +1,7 @@ { "name": "gl3w", "version-date": "2018-05-31", - "port-version": 4, + "port-version": 5, "description": "Simple OpenGL core profile loading", "homepage": "https://github.com/skaslev/gl3w", "dependencies": [ @@ -15,5 +15,10 @@ "name": "vcpkg-cmake-config", "host": true } - ] + ], + "features": { + "ext": { + "description": "include the GL Extensions in output header" + } + } } diff --git a/versions/baseline.json b/versions/baseline.json index 3b89319341..f76316bdf0 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3042,7 +3042,7 @@ }, "gl3w": { "baseline": "2018-05-31", - "port-version": 4 + "port-version": 5 }, "glad": { "baseline": "0.1.36", diff --git a/versions/g-/gl3w.json b/versions/g-/gl3w.json index a5cb2544dc..c2a8e61c21 100644 --- a/versions/g-/gl3w.json +++ b/versions/g-/gl3w.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "a79b7a69f540bf9cd71464cabdfdd5cd67e72072", + "version-date": "2018-05-31", + "port-version": 5 + }, { "git-tree": "618626b6f1118dc2c80fa7bd2aae497c0d83b7c1", "version-date": "2018-05-31",