aboutsummaryrefslogtreecommitdiff
path: root/ports/directxtex
diff options
context:
space:
mode:
Diffstat (limited to 'ports/directxtex')
-rw-r--r--ports/directxtex/CONTROL5
-rw-r--r--ports/directxtex/enable_openexr_support.patch15
-rw-r--r--ports/directxtex/portfile.cmake31
3 files changed, 25 insertions, 26 deletions
diff --git a/ports/directxtex/CONTROL b/ports/directxtex/CONTROL
index a130f4d2f..e2611ffd5 100644
--- a/ports/directxtex/CONTROL
+++ b/ports/directxtex/CONTROL
@@ -1,8 +1,9 @@
Source: directxtex
-Version: nov2020b
+Version: jan2021
Homepage: https://walbourn.github.io/directxtex
Description: DirectXTex texture processing library
-Supports: windows
+Build-Depends: directxmath(linux), directx-headers(linux)
+Supports: windows|linux
Feature: dx12
Description: Build with DirectX12 support for Windows 10
diff --git a/ports/directxtex/enable_openexr_support.patch b/ports/directxtex/enable_openexr_support.patch
index 36d3c72c4..cb4f398ea 100644
--- a/ports/directxtex/enable_openexr_support.patch
+++ b/ports/directxtex/enable_openexr_support.patch
@@ -1,5 +1,5 @@
diff --git a/DirectXTex/DirectXTexEXR.cpp b/DirectXTex/DirectXTexEXR.cpp
-index 0cfd4db..7a6e70c 100644
+index c78f1d1..e073539 100644
--- a/DirectXTex/DirectXTexEXR.cpp
+++ b/DirectXTex/DirectXTexEXR.cpp
@@ -8,7 +8,7 @@
@@ -11,19 +11,12 @@ index 0cfd4db..7a6e70c 100644
#include "DirectXTexEXR.h"
-@@ -38,6 +38,7 @@
+@@ -55,7 +55,7 @@ using namespace DirectX;
using PackedVector::XMHALF4;
- // Comment out this first anonymous namespace if you add the include of DirectXTexP.h above
+ // Comment out this anonymous namespace if you add the include of DirectXTexP.h above
+-#ifdef WIN32
+#if 0
namespace
{
struct handle_closer { void operator()(HANDLE h) { assert(h != INVALID_HANDLE_VALUE); if (h) CloseHandle(h); } };
-@@ -70,6 +76,7 @@
- HANDLE m_handle;
- };
- }
-+#endif
-
- namespace
- {
diff --git a/ports/directxtex/portfile.cmake b/ports/directxtex/portfile.cmake
index 9b1b5cde0..9df396562 100644
--- a/ports/directxtex/portfile.cmake
+++ b/ports/directxtex/portfile.cmake
@@ -1,14 +1,14 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
-vcpkg_fail_port_install(ON_TARGET "OSX" "Linux")
+vcpkg_fail_port_install(ON_TARGET "OSX")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Microsoft/DirectXTex
- REF nov2020b
- SHA512 b32f063f838c150f0ce81f4807bb88090d9695ee9857ec198b22a06c758e905008a3e3c3a1370f89ce5ec4d7e3c66f896a915968312776e8e5ada7e53e346475
+ REF jan2021
+ SHA512 f48f05aea811b2ce04f7e82837ed8da9cd3452d0f582d933dbd8878acdc94d8dfb123fa85f5d483a9cd688d3a129d765514069c6c83c58eb1880f6e5661d61e8
HEAD_REF master
- FILE_DISAMBIGUATOR 2
+ FILE_DISAMBIGUATOR 1
)
if("openexr" IN_LIST FEATURES)
@@ -22,12 +22,13 @@ if("openexr" IN_LIST FEATURES)
vcpkg_download_distfile(
DIRECTXTEX_EXR_SOURCE
URLS "https://raw.githubusercontent.com/wiki/Microsoft/DirectXTex/DirectXTexEXR.cpp"
- FILENAME "DirectXTexEXR.cpp"
- SHA512 8bc66e102a0a163e42d428774c857271ad457a85038fd4ddfdbf083674879f9a8406a9aecd26949296b156a5c5fd08fdfba9600b71879be9affb9dabf23a497c
+ FILENAME "DirectXTexEXR-1.cpp"
+ SHA512 770fc0325b49139079b0bceb50619f93887e87a3dcf264b10dc01be16209fa51ba03d8273d4d4f84e596ac014376db96b7fed0afabe08c32394ed92495168ea6
)
file(COPY ${DIRECTXTEX_EXR_HEADER} DESTINATION ${SOURCE_PATH}/DirectXTex)
file(COPY ${DIRECTXTEX_EXR_SOURCE} DESTINATION ${SOURCE_PATH}/DirectXTex)
+ file(RENAME ${SOURCE_PATH}/DirectXTex/DirectXTexEXR-1.cpp ${SOURCE_PATH}/DirectXTex/DirectXTexEXR.cpp)
vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES enable_openexr_support.patch)
endif()
@@ -38,6 +39,10 @@ vcpkg_check_features(
openexr ENABLE_OPENEXR_SUPPORT
)
+if (VCPKG_HOST_IS_LINUX)
+ message(WARNING "Build ${PORT} requires GCC version 9 or later")
+endif()
+
if(VCPKG_TARGET_IS_UWP)
set(EXTRA_OPTIONS -DBUILD_TOOLS=OFF)
else()
@@ -57,7 +62,7 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
-if(NOT VCPKG_TARGET_IS_UWP)
+if((VCPKG_TARGET_IS_WINDOWS) AND (NOT VCPKG_TARGET_IS_UWP))
vcpkg_copy_tools(
TOOL_NAMES texassemble texconv texdiag
SEARCH_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake
@@ -65,21 +70,21 @@ if(NOT VCPKG_TARGET_IS_UWP)
elseif((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64))
vcpkg_download_distfile(texassemble
- URLS "https://github.com/Microsoft/DirectXTex/releases/download/nov2020/texassemble.exe"
+ URLS "https://github.com/Microsoft/DirectXTex/releases/download/jan2021/texassemble.exe"
FILENAME "texassemble.exe"
- SHA512 8094a4ef4a00df3d2cb4a18a1c84664f4a8bf018328751f19feef1691d1a3d9380556039b1a771728e55d94113baa0f69998f63c96a3b4a6f6c3ba9e53a29a64
+ SHA512 0def8873358234ea4cd16acd59cb1dda2a8ad132f362502d643caed43e9aef19f9c7e7248494093cbd61e7501a9b44f545d3fbd5f50972ebcee3d01598a7c3b7
)
vcpkg_download_distfile(texconv
- URLS "https://github.com/Microsoft/DirectXTex/releases/download/nov2020/texconv.exe"
+ URLS "https://github.com/Microsoft/DirectXTex/releases/download/jan2021/texconv.exe"
FILENAME "texconv.exe"
- SHA512 91555fae9fadb942e8f3bc7052888fe515b1a0efb17f5eb53ef437e06c2e50baaef6a0552c93f218b028133baf65ba6e3393042a47b210baa9692ed6f8bbed2b
+ SHA512 77559db65406ad0343901ff22f7647c4f270674f7b0c31b12d8dc26c718f410708ebe95bdc0ddba4049fa6cefd52ff856174530fc4170f9e725b30aacb78249c
)
vcpkg_download_distfile(texdiag
- URLS "https://github.com/Microsoft/DirectXTex/releases/download/nov2020/texdiag.exe"
+ URLS "https://github.com/Microsoft/DirectXTex/releases/download/jan2021/texdiag.exe"
FILENAME "texdiag.exe"
- SHA512 7ba66004228ea1830fbfe5c40f4ee6cf1023f8256136a565c28e584a71115dd2d38e5f79f862de39ee54f8b34d7d8848c656082800f2a59f5b4833aee678d4b8
+ SHA512 1b9e733050b5f92af86a9a2f415205acbff62f0708e491a3846d7b6e480a9c57086eff636be163d42a40a6d34dafc622cc53940797e7f6f77e739f3a66365f57
)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxtex/")