From 35ea46995b6a3b384b4a76d613ac29d7d001b51a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 16 Nov 2018 18:19:03 -0800 Subject: [PATCH] [glad] Use registry ports instead of vendored copies --- ports/egl-registry/CONTROL | 2 +- ports/egl-registry/portfile.cmake | 6 ++++++ ports/glad/CONTROL | 3 ++- ports/glad/portfile.cmake | 13 +++++++++++-- ports/opengl-registry/CONTROL | 2 +- ports/opengl-registry/portfile.cmake | 6 ++++++ 6 files changed, 27 insertions(+), 5 deletions(-) diff --git a/ports/egl-registry/CONTROL b/ports/egl-registry/CONTROL index c1187a6bf..dc7cdec79 100644 --- a/ports/egl-registry/CONTROL +++ b/ports/egl-registry/CONTROL @@ -1,3 +1,3 @@ Source: egl-registry -Version: 2018-06-30 +Version: 2018-06-30-1 Description: the EGL API and Extension Registry diff --git a/ports/egl-registry/portfile.cmake b/ports/egl-registry/portfile.cmake index 1278e2c92..ee6fc23dc 100644 --- a/ports/egl-registry/portfile.cmake +++ b/ports/egl-registry/portfile.cmake @@ -15,6 +15,12 @@ file( DESTINATION ${CURRENT_PACKAGES_DIR}/include ) +file( + COPY + ${SOURCE_PATH}/api/egl.xml + DESTINATION ${CURRENT_PACKAGES_DIR}/share/egl-registry +) + file( INSTALL ${SOURCE_PATH}/sdk/docs/man/copyright.xml DESTINATION ${CURRENT_PACKAGES_DIR}/share/egl-registry diff --git a/ports/glad/CONTROL b/ports/glad/CONTROL index e8354c205..d74a35089 100644 --- a/ports/glad/CONTROL +++ b/ports/glad/CONTROL @@ -1,3 +1,4 @@ Source: glad -Version: 0.1.28-2 +Version: 0.1.28-3 Description: Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs. +Build-Depends: egl-registry, opengl-registry diff --git a/ports/glad/portfile.cmake b/ports/glad/portfile.cmake index 432c14503..cc73b1e39 100644 --- a/ports/glad/portfile.cmake +++ b/ports/glad/portfile.cmake @@ -12,7 +12,16 @@ vcpkg_from_github( vcpkg_find_acquire_program(PYTHON2) get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PYTHON2_DIR}") +vcpkg_add_to_path("${PYTHON2_DIR}") + +file(COPY + ${CURRENT_INSTALLED_DIR}/include/KHR/khrplatform.h + ${CURRENT_INSTALLED_DIR}/share/egl-registry/egl.xml + ${CURRENT_INSTALLED_DIR}/share/opengl-registry/gl.xml + ${CURRENT_INSTALLED_DIR}/share/opengl-registry/glx.xml + ${CURRENT_INSTALLED_DIR}/share/opengl-registry/wgl.xml + DESTINATION ${SOURCE_PATH}/glad/files +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -32,5 +41,5 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/glad) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/KHR) configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/glad/copyright COPYONLY) diff --git a/ports/opengl-registry/CONTROL b/ports/opengl-registry/CONTROL index 0d9844ed7..1a3635c35 100644 --- a/ports/opengl-registry/CONTROL +++ b/ports/opengl-registry/CONTROL @@ -1,4 +1,4 @@ Source: opengl-registry -Version: 2018-06-30 +Version: 2018-06-30-1 Build-Depends: egl-registry Description: the API and Extension registries for the OpenGL family APIs diff --git a/ports/opengl-registry/portfile.cmake b/ports/opengl-registry/portfile.cmake index 5e997ac23..7b38b2c07 100644 --- a/ports/opengl-registry/portfile.cmake +++ b/ports/opengl-registry/portfile.cmake @@ -9,6 +9,12 @@ vcpkg_from_github( ) file(COPY ${SOURCE_PATH}/api/GL DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY + ${SOURCE_PATH}/xml/gl.xml + ${SOURCE_PATH}/xml/glx.xml + ${SOURCE_PATH}/xml/wgl.xml + DESTINATION ${CURRENT_PACKAGES_DIR}/share/opengl-registry +) # Using the Makefile because it is the smallest file with a complete copy of the license text file(