ports/opt (3.6): vulkan-validation-layers: build as shared not static
commit 15fe83d6c44d7ea531dd0b6b4b62fd7efb4ff300 Author: Danny Rawlins <contact@romster.me> Date: Sun Sep 26 00:02:21 2021 +1000 vulkan-validation-layers: build as shared not static diff --git a/vulkan-validation-layers/.footprint b/vulkan-validation-layers/.footprint index b4b342446..2c61499d1 100644 --- a/vulkan-validation-layers/.footprint +++ b/vulkan-validation-layers/.footprint @@ -28,7 +28,7 @@ drwxr-xr-x root/root usr/include/vulkan/ -rw-r--r-- root/root usr/include/vulkan/xxhash.h drwxr-xr-x root/root usr/lib/ -rwxr-xr-x root/root usr/lib/libVkLayer_khronos_validation.so --rw-r--r-- root/root usr/lib/libVkLayer_utils.a +-rwxr-xr-x root/root usr/lib/libVkLayer_utils.so drwxr-xr-x root/root usr/share/ drwxr-xr-x root/root usr/share/vulkan/ drwxr-xr-x root/root usr/share/vulkan/explicit_layer.d/ diff --git a/vulkan-validation-layers/.signature b/vulkan-validation-layers/.signature index eca77f021..8928514ad 100644 --- a/vulkan-validation-layers/.signature +++ b/vulkan-validation-layers/.signature @@ -1,8 +1,10 @@ untrusted comment: verify with /etc/ports/opt.pub -RWSE3ohX2g5d/b/qxTjYUZpEh0ecBRs12vCQBK+W4Jeln96/HtorK+oF002jJq1OfJ7WEWsWMchp8MmSNDhavXodE5Eb6quakgo= -SHA256 (Pkgfile) = b09ac8974fc9817445b70da6371fcabefd3dbf2cf3184b1604fcabf6437f9ffc -SHA256 (.footprint) = 66e56224031ef22f7a9d7a66474b1c11317ff7ff78775daa1763b3e360e91e01 +RWSE3ohX2g5d/ad8LK0a6YpHKumcS0v/UG8+b8jHUWuuNe/TjJQLlz8kmTNNNENCaFPUigbCgmcU2rv/s8pz/gMmxqttYX462ws= +SHA256 (Pkgfile) = 6c3f64177c6593fc9322cdbe548b4686ee216f2533747b2e3b6aae9acc4ed9a8 +SHA256 (.footprint) = cd0824869148d109d026a99a0393dd24215cedf6341979627c5b49957a634e5f SHA256 (Vulkan-ValidationLayers-1.2.189.1.tar.gz) = d169ae71ae3ba12159df355b58f86f5635062c695d1deac9b97d5653561d517d SHA256 (SPIRV-Headers-449bc986ba6f4c5e10e32828783f9daef2a77644.tar.gz) = a8156db21c4c9d956b80b4620c6fede30d44c4f3a897434c341da8991c986288 SHA256 (robin-hood-hashing-3.11.3.tar.gz) = dcf2b7fa9ef9dd0c67102d94c28e8df3effbe1845e0ed1f31f4772ca5e857fc4 SHA256 (known_good.py.in) = f5e5330201ab5686a84d9ff65fd372af510d564aa6eb2d3c332d59a6e69ce2e3 +SHA256 (add-missing-export.patch) = 6ce7222099403dea8425b1dd305b9ebc43e747c32aca2a24cfc7f67ddd34cebf +SHA256 (fix_shared.patch) = 840af33ab26638c8c29da4a7f284eae6aeb40e01d506eef9851d7e6ee4a8bed0 diff --git a/vulkan-validation-layers/Pkgfile b/vulkan-validation-layers/Pkgfile index fefcb02c9..15889b81e 100644 --- a/vulkan-validation-layers/Pkgfile +++ b/vulkan-validation-layers/Pkgfile @@ -8,11 +8,13 @@ name=vulkan-validation-layers version=1.2.189.1 _spirv_headers=449bc986ba6f4c5e10e32828783f9daef2a77644 _robin_hood=3.11.3 -release=1 +release=2 source=(https://github.com/KhronosGroup/Vulkan-ValidationLayers/archive/sdk-$version... https://github.com/KhronosGroup/SPIRV-Headers/archive/$_spirv_headers/SPIRV-... https://github.com/martinus/robin-hood-hashing/archive/$_robin_hood/robin-ho... - known_good.py.in) + known_good.py.in + add-missing-export.patch + fix_shared.patch) build() { @@ -23,6 +25,9 @@ build() { robin_hood/external/robin-hood-hashing cp -r $SRC/SPIRV-Headers-$_spirv_headers/* headers/external/spirv-headers cp -r $SRC/robin-hood-hashing-$_robin_hood/* robin_hood/external/robin-hood-hashing + + patch -p1 -i $SRC/add-missing-export.patch + patch -p1 -i $SRC/fix_shared.patch ) sed -e "s|@SRC@|$SRC/Vulkan-ValidationLayers-sdk-$version|" $SRC/known_good.py.in > $SRC/known_good.py diff --git a/vulkan-validation-layers/add-missing-export.patch b/vulkan-validation-layers/add-missing-export.patch new file mode 100644 index 000000000..7137cd4f8 --- /dev/null +++ b/vulkan-validation-layers/add-missing-export.patch @@ -0,0 +1,24 @@ +diff -up Vulkan-ValidationLayers-sdk-1.2.182.0/layers/vk_layer_config.cpp.dma Vulkan-ValidationLayers-sdk-1.2.182.0/layers/vk_layer_config.cpp +--- Vulkan-ValidationLayers-sdk-1.2.182.0/layers/vk_layer_config.cpp.dma 2021-08-07 08:13:46.344320103 +1000 ++++ Vulkan-ValidationLayers-sdk-1.2.182.0/layers/vk_layer_config.cpp 2021-08-07 08:14:22.130893289 +1000 +@@ -68,7 +68,7 @@ class ConfigFile { + + static ConfigFile layer_config; + +-string GetEnvironment(const char *variable) { ++VK_LAYER_EXPORT string GetEnvironment(const char *variable) { + #if !defined(__ANDROID__) && !defined(_WIN32) + const char *output = getenv(variable); + return output == NULL ? "" : output; +diff -up Vulkan-ValidationLayers-sdk-1.2.182.0/layers/vk_layer_config.h.dma Vulkan-ValidationLayers-sdk-1.2.182.0/layers/vk_layer_config.h +--- Vulkan-ValidationLayers-sdk-1.2.182.0/layers/vk_layer_config.h.dma 2021-08-07 08:14:04.352608540 +1000 ++++ Vulkan-ValidationLayers-sdk-1.2.182.0/layers/vk_layer_config.h 2021-08-07 08:14:15.237782885 +1000 +@@ -33,7 +33,7 @@ + #define SECONDARY_VK_REGISTRY_HIVE_STR "HKEY_CURRENT_USER" + #endif + +-std::string GetEnvironment(const char *variable); ++VK_LAYER_EXPORT std::string GetEnvironment(const char *variable); + + #ifdef __cplusplus + extern "C" { diff --git a/vulkan-validation-layers/fix_shared.patch b/vulkan-validation-layers/fix_shared.patch new file mode 100644 index 000000000..8082da82d --- /dev/null +++ b/vulkan-validation-layers/fix_shared.patch @@ -0,0 +1,12 @@ +diff -up Vulkan-ValidationLayers-sdk-1.1.92.0/CMakeLists.txt.dma Vulkan-ValidationLayers-sdk-1.1.92.0/CMakeLists.txt +--- Vulkan-ValidationLayers-sdk-1.1.92.0/CMakeLists.txt.dma 2019-02-13 09:20:44.590959278 +1000 ++++ Vulkan-ValidationLayers-sdk-1.1.92.0/CMakeLists.txt 2019-02-13 09:21:29.178151673 +1000 +@@ -294,7 +294,7 @@ set_target_properties(generate_helper_fi + # files directly in layers. + + add_library(VkLayer_utils +- STATIC ++ SHARED + layers/vk_layer_config.cpp + layers/vk_layer_extension_utils.cpp + layers/vk_layer_utils.cpp
participants (1)
-
crux@crux.nu