diff options
Diffstat (limited to 'ports/shaderc')
| -rw-r--r-- | ports/shaderc/0001-Add-a-virtual-destructor.patch | 23 | ||||
| -rw-r--r-- | ports/shaderc/0001-Do-not-generate-build-version.inc.patch | 30 | ||||
| -rw-r--r-- | ports/shaderc/CONTROL | 4 | ||||
| -rw-r--r-- | ports/shaderc/build-version.inc | 8 | ||||
| -rw-r--r-- | ports/shaderc/disable-update-version.patch | 41 | ||||
| -rw-r--r-- | ports/shaderc/fix-install.patch | 26 | ||||
| -rw-r--r-- | ports/shaderc/portfile.cmake | 15 |
7 files changed, 83 insertions, 64 deletions
diff --git a/ports/shaderc/0001-Add-a-virtual-destructor.patch b/ports/shaderc/0001-Add-a-virtual-destructor.patch deleted file mode 100644 index 0fa695036..000000000 --- a/ports/shaderc/0001-Add-a-virtual-destructor.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 563bc6e87a43c38b5495469307922c768edbd191 Mon Sep 17 00:00:00 2001 -From: neil <neil@codeplay.com> -Date: Thu, 1 Feb 2018 06:49:44 +0000 -Subject: [PATCH] Add a virtual destructor, otherwise Clang 6.0complains about - delete being called on an abstract class. - ---- - libshaderc/include/shaderc/shaderc.hpp | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/libshaderc/include/shaderc/shaderc.hpp b/libshaderc/include/shaderc/shaderc.hpp -index 1c557431..335f0df9 100644 ---- a/libshaderc/include/shaderc/shaderc.hpp -+++ b/libshaderc/include/shaderc/shaderc.hpp -@@ -180,6 +180,8 @@ class CompileOptions { - - // Handles shaderc_include_result_release_fn callbacks. - virtual void ReleaseInclude(shaderc_include_result* data) = 0; -+ -+ virtual ~IncluderInterface() = default; - }; - - // Sets the includer instance for libshaderc to call during compilation, as diff --git a/ports/shaderc/0001-Do-not-generate-build-version.inc.patch b/ports/shaderc/0001-Do-not-generate-build-version.inc.patch deleted file mode 100644 index 41cc81220..000000000 --- a/ports/shaderc/0001-Do-not-generate-build-version.inc.patch +++ /dev/null @@ -1,30 +0,0 @@ -From e8e12e856cbc41f9bdcc83bc87eb5013df199ee1 Mon Sep 17 00:00:00 2001 -From: vlj <vljn.ovi@gmail.com> -Date: Fri, 2 Dec 2016 16:36:25 +0100 -Subject: [PATCH] Do not generate build-version.inc - ---- - CMakeLists.txt | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a4c2fac..5544a2d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -53,8 +53,8 @@ add_subdirectory(libshaderc) - add_subdirectory(glslc) - add_subdirectory(examples) - --add_custom_target(build-version -- ${PYTHON_EXE} -- ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py -- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} -- COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).") -+#add_custom_target(build-version -+# ${PYTHON_EXE} -+# ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py -+# ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} -+# COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).") --- -2.10.2.windows.1 - diff --git a/ports/shaderc/CONTROL b/ports/shaderc/CONTROL index 36f82852a..0878b17be 100644 --- a/ports/shaderc/CONTROL +++ b/ports/shaderc/CONTROL @@ -1,5 +1,5 @@ Source: shaderc -Version: 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da-2 +Version: 2019-06-26-1 Homepage: https://github.com/google/shaderc Description: A collection of tools, libraries and tests for shader compilation. -Build-Depends: glslang, spirv-tools +Build-Depends: glslang, spirv-tools
\ No newline at end of file diff --git a/ports/shaderc/build-version.inc b/ports/shaderc/build-version.inc index 853e89916..00c140577 100644 --- a/ports/shaderc/build-version.inc +++ b/ports/shaderc/build-version.inc @@ -1,3 +1,5 @@ -"shaderc v2016.2-dev unknown hash, 2016-12-02\n" -"spirv-tools v2016.6-dev unknown hash, 2016-12-02\n" -"glslang unknown hash, 2016-12-02\n" +"shaderc v2019.0-dev unknown hash, 2019-05-08\n" +"spirv-tools v2019.3-dev unknown hash, 2019-04-03\n" +"glslang unknown hash, 2019-03-05\n" + + diff --git a/ports/shaderc/disable-update-version.patch b/ports/shaderc/disable-update-version.patch new file mode 100644 index 000000000..5ee016bcb --- /dev/null +++ b/ports/shaderc/disable-update-version.patch @@ -0,0 +1,41 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a4e779b..dc5f1a9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -81,12 +81,6 @@ add_subdirectory(libshaderc)
+ add_subdirectory(glslc)
+ add_subdirectory(examples)
+
+-add_custom_target(build-version
+- ${PYTHON_EXECUTABLE}
+- ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py
+- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR}
+- COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).")
+-
+ function(define_pkg_config_file NAME LIBS)
+ add_custom_target(${NAME}-pkg-config ALL
+ COMMAND ${CMAKE_COMMAND}
+diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt
+index acf6fb0..d0df7db 100644
+--- a/glslc/CMakeLists.txt
++++ b/glslc/CMakeLists.txt
+@@ -26,7 +26,6 @@ shaderc_default_compile_options(glslc_exe)
+ target_include_directories(glslc_exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/.. ${spirv-tools_SOURCE_DIR}/include)
+ set_target_properties(glslc_exe PROPERTIES OUTPUT_NAME glslc)
+ target_link_libraries(glslc_exe PRIVATE glslc shaderc_util shaderc)
+-add_dependencies(glslc_exe build-version)
+
+ shaderc_add_tests(
+ TEST_PREFIX glslc
+diff --git a/spvc/CMakeLists.txt b/spvc/CMakeLists.txt
+index f465972..76f8c2e 100644
+--- a/spvc/CMakeLists.txt
++++ b/spvc/CMakeLists.txt
+@@ -3,7 +3,6 @@ shaderc_default_compile_options(spvc_exe)
+ target_include_directories(spvc_exe PRIVATE ${shaderc_SOURCE_DIR}/libshaderc/include ${spirv-tools_SOURCE_DIR}/include)
+ set_target_properties(spvc_exe PROPERTIES OUTPUT_NAME spvc)
+ target_link_libraries(spvc_exe PRIVATE shaderc_spvc shaderc_util)
+-add_dependencies(spvc_exe build-version)
+
+ shaderc_add_asciidoc(spvc_doc_README README)
+
diff --git a/ports/shaderc/fix-install.patch b/ports/shaderc/fix-install.patch new file mode 100644 index 000000000..1857ed8fe --- /dev/null +++ b/ports/shaderc/fix-install.patch @@ -0,0 +1,26 @@ +diff --git a/libshaderc/CMakeLists.txt b/libshaderc/CMakeLists.txt
+index 9d07136..0ffa06f 100644
+--- a/libshaderc/CMakeLists.txt
++++ b/libshaderc/CMakeLists.txt
+@@ -84,7 +84,7 @@ if(SHADERC_ENABLE_INSTALL)
+ # around this problem by manually substitution.
+ string(REPLACE "$(Configuration)" "\${CMAKE_INSTALL_CONFIG_NAME}"
+ install_location "${generated_location}")
+- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR})
++ install(FILES ${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ else()
+ install(FILES ${generated_location} DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ endif()
+diff --git a/libshaderc_spvc/CMakeLists.txt b/libshaderc_spvc/CMakeLists.txt
+index fae235e..b503e70 100644
+--- a/libshaderc_spvc/CMakeLists.txt
++++ b/libshaderc_spvc/CMakeLists.txt
+@@ -84,7 +84,7 @@ if(SHADERC_ENABLE_INSTALL)
+ # around this problem by manually substitution.
+ string(REPLACE "$(Configuration)" "\${CMAKE_INSTALL_CONFIG_NAME}"
+ install_location "${generated_location}")
+- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR})
++ install(FILES ${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ else()
+ install(FILES ${generated_location} DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ endif()
diff --git a/ports/shaderc/portfile.cmake b/ports/shaderc/portfile.cmake index 5f1f70572..297842296 100644 --- a/ports/shaderc/portfile.cmake +++ b/ports/shaderc/portfile.cmake @@ -3,17 +3,19 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/shaderc - REF 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da - SHA512 6fb45a0b01e6709c44a11658648b9271fe06bd94023dcc5042c47b5f2a04889c2efb0ab4c166f18728594ac9b9aa9f8b354af46d88eb7f7c39c7246f52f5a933 + REF 05c766a1f4615ee37d37d09271aaabca30ffd293 + SHA512 329697e8e23d619313440d57ef740a94c49d13533e1b8734fc8ff72fd5092c2addabb306f64cb69160fa5fee373a05ba39a5ee6d92d95e5e2e9c7ec96a51aadc HEAD_REF master - PATCHES - 0001-Do-not-generate-build-version.inc.patch - 0001-Add-a-virtual-destructor.patch + PATCHES + "disable-update-version.patch" + "fix-install.patch" ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/third_party/glslang) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_spirv.txt DESTINATION ${SOURCE_PATH}/third_party/spirv-tools) file(RENAME ${SOURCE_PATH}/third_party/spirv-tools/CMakeLists_spirv.txt ${SOURCE_PATH}/third_party/spirv-tools/CMakeLists.txt) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/build-version.inc DESTINATION ${SOURCE_PATH}/glslc/src) #Note: glslang and spir tools doesn't export symbol and need to be build as static lib for cmake to work @@ -30,7 +32,8 @@ vcpkg_add_to_path(PREPEND "${PYTHON3_EXE_PATH}") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DSHADERC_SKIP_TESTS=true ${OPTIONS} -Dglslang_SOURCE_DIR=${CURRENT_INSTALLED_DIR}/include + PREFER_NINJA + OPTIONS -DSHADERC_SKIP_TESTS=true ${OPTIONS} -Dglslang_SOURCE_DIR=${CURRENT_INSTALLED_DIR}/include -Dspirv-tools_SOURCE_DIR=${CURRENT_INSTALLED_DIR}/include OPTIONS_DEBUG -DSUFFIX_D=true OPTIONS_RELEASE -DSUFFIX_D=false ) |
