diff options
| author | NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> | 2020-10-24 08:31:00 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-23 17:31:00 -0700 |
| commit | a97e32fa2de760252ec401f21d82d0cd3dd402c1 (patch) | |
| tree | 51e9f99d4f61bc3468b1870b2cf168289263b279 | |
| parent | a3ed6c63900a5ff2f5622971682aa0a89873aa68 (diff) | |
| download | vcpkg-a97e32fa2de760252ec401f21d82d0cd3dd402c1.tar.gz vcpkg-a97e32fa2de760252ec401f21d82d0cd3dd402c1.zip | |
[netcdf-c/nvtt] Update to the latest version (#13674)
| -rw-r--r-- | ports/netcdf-c/CONTROL | 3 | ||||
| -rw-r--r-- | ports/netcdf-c/config-pkg-location.patch | 4 | ||||
| -rw-r--r-- | ports/netcdf-c/fix-dependency-libmath.patch | 4 | ||||
| -rw-r--r-- | ports/netcdf-c/mpi.patch | 14 | ||||
| -rw-r--r-- | ports/netcdf-c/no-install-deps.patch | 4 | ||||
| -rw-r--r-- | ports/netcdf-c/portfile.cmake | 7 | ||||
| -rw-r--r-- | ports/netcdf-c/use_targets.patch | 188 | ||||
| -rw-r--r-- | ports/nvtt/CONTROL | 4 | ||||
| -rw-r--r-- | ports/nvtt/add-compile-options-for-osx.patch | 15 | ||||
| -rw-r--r-- | ports/nvtt/bc6h.patch | 13 | ||||
| -rw-r--r-- | ports/nvtt/bc7.patch | 12 | ||||
| -rw-r--r-- | ports/nvtt/fix-build-error.patch | 76 | ||||
| -rw-r--r-- | ports/nvtt/portfile.cmake | 10 | ||||
| -rw-r--r-- | ports/nvtt/squish.patch | 13 |
14 files changed, 186 insertions, 181 deletions
diff --git a/ports/netcdf-c/CONTROL b/ports/netcdf-c/CONTROL index 92d0439d9..9ea0d125e 100644 --- a/ports/netcdf-c/CONTROL +++ b/ports/netcdf-c/CONTROL @@ -1,6 +1,5 @@ Source: netcdf-c -Version: 4.7.3 -Port-Version: 4 +Version: 4.7.4 Build-Depends: hdf5, curl Homepage: https://github.com/Unidata/netcdf-c Description: a set of self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. diff --git a/ports/netcdf-c/config-pkg-location.patch b/ports/netcdf-c/config-pkg-location.patch index 532082ccb..13f0aeaa6 100644 --- a/ports/netcdf-c/config-pkg-location.patch +++ b/ports/netcdf-c/config-pkg-location.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 46892ee..803ff46 100644 +index bd7c4f8..e4e92c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1742,7 +1742,9 @@ FILE(COPY ${netCDF_SOURCE_DIR}/include/netcdf_meta.h +@@ -2050,7 +2050,9 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ncdap_test/pingurl.c ${CMAKE_CURRENT_ # Create CMake package configuration files. With these, other packages using # cmake should be able to find netcdf using find_package and find_library. # The EXPORT call is paired with one in liblib. diff --git a/ports/netcdf-c/fix-dependency-libmath.patch b/ports/netcdf-c/fix-dependency-libmath.patch index 0db00ccaf..d6b4c214e 100644 --- a/ports/netcdf-c/fix-dependency-libmath.patch +++ b/ports/netcdf-c/fix-dependency-libmath.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 35c694f..e2c03e5 100644 +index bd7c4f8..03b7ccf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -839,7 +839,7 @@ ENDIF() +@@ -866,7 +866,7 @@ ENDIF() # Check for the math library so it can be explicitly linked. IF(NOT WIN32) diff --git a/ports/netcdf-c/mpi.patch b/ports/netcdf-c/mpi.patch deleted file mode 100644 index 64027e65c..000000000 --- a/ports/netcdf-c/mpi.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 101f97719..b070121b8 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -1004,6 +1004,8 @@ IF(ENABLE_PARALLEL4 AND ENABLE_NETCDF_4)
- IF(MSVC)
- FIND_PACKAGE(MPI REQUIRED)
- INCLUDE_DIRECTORIES(${MPI_C_INCLUDE_PATH})
-+ list(APPEND CMAKE_REQUIRED_LIBRARIES MPI::MPI_C)
-+ list(APPEND EXTRA_DEPS MPI::MPI_C)
- ENDIF()
- SET(HDF5_PARALLEL ON CACHE BOOL "")
- SET(USE_PARALLEL ON CACHE BOOL "")
-
diff --git a/ports/netcdf-c/no-install-deps.patch b/ports/netcdf-c/no-install-deps.patch index 3d44b383e..535a0dc08 100644 --- a/ports/netcdf-c/no-install-deps.patch +++ b/ports/netcdf-c/no-install-deps.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index e87f3de..46892ee 100644 +index bd7c4f8..95fb01c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1570,7 +1570,7 @@ ADD_SUBDIRECTORY(docs) +@@ -1830,7 +1830,7 @@ ADD_SUBDIRECTORY(docs) # install them in the binary dir. Grab all of the .libs, put them # in the libdir. ## diff --git a/ports/netcdf-c/portfile.cmake b/ports/netcdf-c/portfile.cmake index 4813aa5b8..167150530 100644 --- a/ports/netcdf-c/portfile.cmake +++ b/ports/netcdf-c/portfile.cmake @@ -1,14 +1,13 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Unidata/netcdf-c - REF b7cd387bee8c661141fabb490f4969587c008c55 # v4.7.3 - SHA512 a55391620fac61e4975fe62907ca21049911afce6190fc12d183d24133a32aae8cd223b97a3fe57fc82d8bdca1a7db451046e3be3c379051624d48b1f56c0332 + REF 26fba54a58fa02af92d84441ed90b417c1d08161 # v4.7.4 + SHA512 7144374b5bd3574ea422de07ffb30fecc4e5f560f9b46f62762cc0cce511dd33068b8df9244fe94ae3cc7b3a9bb9fe398c7e67c3e5ac2109768e5a9b984f24fb HEAD_REF master PATCHES no-install-deps.patch config-pkg-location.patch use_targets.patch - mpi.patch fix-dependency-libmath.patch ) @@ -51,4 +50,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
\ No newline at end of file diff --git a/ports/netcdf-c/use_targets.patch b/ports/netcdf-c/use_targets.patch index 99e50dc9d..d15ab7495 100644 --- a/ports/netcdf-c/use_targets.patch +++ b/ports/netcdf-c/use_targets.patch @@ -1,103 +1,99 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1ce05e0fe..7671d7b1e 100644 +index bd7c4f8..9e09cf3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -431,7 +431,6 @@ IF(NC_EXTRA_DEPS) - SET(EXTRA_DEPS ${EXTRA_DEPS} "${${_LIB}_DEP}")
- ENDFOREACH()
- MESSAGE("Extra deps: ${EXTRA_DEPS}")
-- LIST(REMOVE_DUPLICATES EXTRA_DEPS)
- SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${EXTRA_DEPS})
- ENDIF()
- ###
-@@ -599,15 +599,6 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) - # we will use a static library. This can be toggled
- # by explicitly modifying NC_FIND_SHARED_LIBS.
- ##
-- IF(NC_FIND_SHARED_LIBS)
-- SET(NC_HDF5_LINK_TYPE "shared")
-- SET(NC_HDF5_LINK_TYPE_UPPER "SHARED")
-- ADD_DEFINITIONS(-DH5_BUILT_AS_DYNAMIC_LIB)
-- ELSE(NC_FIND_SHARED_LIBS)
-- SET(NC_HDF5_LINK_TYPE "static")
-- SET(NC_HDF5_LINK_TYPE_UPPER "STATIC")
-- ADD_DEFINITIONS(-DH5_BUILT_AS_STATIC_LIB)
-- ENDIF(NC_FIND_SHARED_LIBS)
-
- #####
- # First, find the C and HL libraries.
-@@ -620,9 +620,9 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) - SET(SEARCH_PACKAGE_NAME ${HDF5_PACKAGE_NAME})
- FIND_PACKAGE(HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS C HL CONFIG REQUIRED ${NC_HDF5_LINK_TYPE})
- ELSE(MSVC)
-- FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED)
-+ FIND_PACKAGE(HDF5 COMPONENTS C HL CONFIG REQUIRED)
- ENDIF(MSVC)
--
-+
- ##
- # Next, check the HDF5 version. This will inform which
- # HDF5 variables we need to munge.
-@@ -695,6 +695,19 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) - ENDIF()
- ENDIF(HDF5_C_LIBRARY AND HDF5_HL_LIBRARY AND HDF5_INCLUDE_DIR)
-
-+ if(TARGET hdf5::hdf5-shared)
-+ set(HDF5_C_LIBRARY hdf5::hdf5-shared)
-+ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-shared)
+@@ -430,7 +430,6 @@ IF(NC_EXTRA_DEPS) + SET(EXTRA_DEPS ${EXTRA_DEPS} "${${_LIB}_DEP}") + ENDFOREACH() + MESSAGE("Extra deps: ${EXTRA_DEPS}") +- LIST(REMOVE_DUPLICATES EXTRA_DEPS) + SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${EXTRA_DEPS}) + ENDIF() + ### +@@ -598,15 +597,6 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) + # we will use a static library. This can be toggled + # by explicitly modifying NC_FIND_SHARED_LIBS. + ## +- IF(NC_FIND_SHARED_LIBS) +- SET(NC_HDF5_LINK_TYPE "shared") +- SET(NC_HDF5_LINK_TYPE_UPPER "SHARED") +- ADD_DEFINITIONS(-DH5_BUILT_AS_DYNAMIC_LIB) +- ELSE(NC_FIND_SHARED_LIBS) +- SET(NC_HDF5_LINK_TYPE "static") +- SET(NC_HDF5_LINK_TYPE_UPPER "STATIC") +- ADD_DEFINITIONS(-DH5_BUILT_AS_STATIC_LIB) +- ENDIF(NC_FIND_SHARED_LIBS) + + ##### + # First, find the C and HL libraries. +@@ -619,7 +609,7 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) + SET(SEARCH_PACKAGE_NAME ${HDF5_PACKAGE_NAME}) + FIND_PACKAGE(HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS C HL CONFIG REQUIRED ${NC_HDF5_LINK_TYPE}) + ELSE(MSVC) +- FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED) ++ FIND_PACKAGE(HDF5 COMPONENTS C HL CONFIG REQUIRED) + ENDIF(MSVC) + + ## +@@ -701,6 +691,19 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) + SET(HDF5_C_LIBRARY hdf5) + ENDIF() + ENDIF(HDF5_C_LIBRARY AND HDF5_HL_LIBRARY AND HDF5_INCLUDE_DIR) ++ ++ if(TARGET hdf5::hdf5-shared) ++ set(HDF5_C_LIBRARY hdf5::hdf5-shared) ++ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-shared) + set(HDF5_HL_LIBRARIES hdf5::hdf5_hl-shared) -+ ADD_DEFINITIONS(-DH5_BUILT_AS_DYNAMIC_LIB)
-+ else()
-+ set(HDF5_C_LIBRARY hdf5::hdf5-static)
-+ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-static)
++ ADD_DEFINITIONS(-DH5_BUILT_AS_DYNAMIC_LIB) ++ else() ++ set(HDF5_C_LIBRARY hdf5::hdf5-static) ++ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-static) + set(HDF5_HL_LIBRARIES hdf5::hdf5_hl-static) -+ ADD_DEFINITIONS(-DH5_BUILT_AS_STATIC_LIB)
-+ endif()
-+ list(APPEND CMAKE_REQUIRED_LIBRARIES ${HDF5_C_LIBRARY})
-+
- FIND_PACKAGE(Threads)
-
- # There is a missing case in the above code so default it
-@@ -721,16 +733,11 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) - CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pset_all_coll_metadata_ops "" HDF5_HAS_COLL_METADATA_OPS)
-
- #Check to see if H5Z_SZIP exists in HDF5_Libraries. If so, we must use szip.
-- CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Z_SZIP "" USE_SZIP)
-+ set(USE_SZIP ${HDF5_ENABLE_SZIP_SUPPORT})
- IF(USE_SZIP)
-- FIND_LIBRARY(SZIP NAMES szip sz)
-- IF(SZIP)
-+ #FIND_LIBRARY(SZIP NAMES szip sz)
-+ #IF(SZIP)
- SET(HAVE_H5Z_SZIP 1)
-- SET(SZIP_LIBRARY ${SZIP})
-- SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${SZIP})
-- ELSE()
-- MESSAGE(FATAL_ERROR "HDF5 Requires SZIP, but cannot find libszip or libsz.")
-- ENDIF()
- ENDIF()
-
- CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pset_libver_bounds "" HAVE_H5PSET_LIBVER_BOUNDS)
-@@ -764,8 +776,7 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) - ENDIF(USE_HDF5 OR ENABLE_NETCDF_4)
-
- # See if we have libcurl
--FIND_PACKAGE(CURL)
--ADD_DEFINITIONS(-DCURL_STATICLIB=1)
-+FIND_PACKAGE(CURL CONFIG)
- INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
-
- # Check to see if CURLOPT_USERNAME is defined.
-@@ -1890,7 +1902,6 @@ ENDIF() -
- STRING(REPLACE ";" " " LINKFLAGS "${LINKFLAGS}")
-
--LIST(REMOVE_DUPLICATES NC_LIBS)
- LIST(REMOVE_DUPLICATES LINKFLAGS)
-
- SET(LIBS ${NC_LIBS})
++ ADD_DEFINITIONS(-DH5_BUILT_AS_STATIC_LIB) ++ endif() ++ list(APPEND CMAKE_REQUIRED_LIBRARIES ${HDF5_C_LIBRARY}) + + FIND_PACKAGE(Threads) + +@@ -728,17 +731,9 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) + CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pset_all_coll_metadata_ops "" HDF5_HAS_COLL_METADATA_OPS) + + #Check to see if H5Z_SZIP exists in HDF5_Libraries. If so, we must use szip. +- CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Z_SZIP "" USE_SZIP) ++ set(USE_SZIP ${HDF5_ENABLE_SZIP_SUPPORT}) + IF(USE_SZIP) +- FIND_LIBRARY(SZIP NAMES szip sz) +- IF(SZIP) + SET(HAVE_H5Z_SZIP 1) +- SET(SZIP_LIBRARY ${SZIP}) +- SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${SZIP}) +- MESSAGE(STATUS "HDF5 has szip.") +- ELSE() +- MESSAGE(FATAL_ERROR "HDF5 Requires SZIP, but cannot find libszip or libsz.") +- ENDIF() + ENDIF() + + CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pset_libver_bounds "" HAVE_H5PSET_LIBVER_BOUNDS) +@@ -788,8 +783,7 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) + ENDIF(USE_HDF5 OR ENABLE_NETCDF_4) + + # See if we have libcurl +-FIND_PACKAGE(CURL) +-ADD_DEFINITIONS(-DCURL_STATICLIB=1) ++FIND_PACKAGE(CURL CONFIG) + INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS}) + + # Check to see if CURLOPT_USERNAME is defined. +@@ -1893,7 +1887,6 @@ ENDIF() + + STRING(REPLACE ";" " " LINKFLAGS "${LINKFLAGS}") + +-LIST(REMOVE_DUPLICATES NC_LIBS) + LIST(REMOVE_DUPLICATES LINKFLAGS) + + SET(LIBS ${NC_LIBS}) diff --git a/liblib/CMakeLists.txt b/liblib/CMakeLists.txt -index ea9b02949..ec7851f37 100644 +index ea9b029..8aeeab7 100644 --- a/liblib/CMakeLists.txt +++ b/liblib/CMakeLists.txt @@ -58,7 +58,7 @@ ENDIF() @@ -152,11 +148,11 @@ index ea9b02949..ec7851f37 100644 TARGET_LINK_LIBRARIES(netcdf ${TLL_LIBS}) diff --git a/netCDFConfig.cmake.in b/netCDFConfig.cmake.in -index c89cf3e67..b81f35a1b 100644 +index 9d68eec..b8f6113 100644 --- a/netCDFConfig.cmake.in +++ b/netCDFConfig.cmake.in @@ -12,6 +12,10 @@ set_and_check(netCDF_LIB_DIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@") - set(netCDF_LIBRARIES netcdf) + set(netCDF_LIBRARIES netCDF::netcdf) # include target information +include(CMakeFindDependencyMacro) diff --git a/ports/nvtt/CONTROL b/ports/nvtt/CONTROL index 189ff6caf..aaa388269 100644 --- a/ports/nvtt/CONTROL +++ b/ports/nvtt/CONTROL @@ -1,3 +1,5 @@ Source: nvtt
-Version: 2.1.1
+Version: 2.1.2
+Homepage: https://github.com/castano/nvidia-texture-tools
Description: Texture processing tools with support for Direct3D 10 and 11 formats.
+Supports: !x86
diff --git a/ports/nvtt/add-compile-options-for-osx.patch b/ports/nvtt/add-compile-options-for-osx.patch new file mode 100644 index 000000000..6b7d94559 --- /dev/null +++ b/ports/nvtt/add-compile-options-for-osx.patch @@ -0,0 +1,15 @@ +diff --git a/src/nvtt/CMakeLists.txt b/src/nvtt/CMakeLists.txt
+index 9688c9c..42942c0 100644
+--- a/src/nvtt/CMakeLists.txt
++++ b/src/nvtt/CMakeLists.txt
+@@ -47,6 +47,10 @@ ADD_DEFINITIONS(-DNVTT_EXPORTS)
+ #ADD_DEFINITIONS(-DHAVE_RGETC)
+ #ADD_DEFINITIONS(-DHAVE_ETCPACK)
+
++if(APPLE)
++ add_compile_options(-mbmi2 -mfma)
++endif()
++
+ IF(NVTT_SHARED)
+ ADD_LIBRARY(nvtt SHARED ${NVTT_SRCS})
+ ELSE(NVTT_SHARED)
diff --git a/ports/nvtt/bc6h.patch b/ports/nvtt/bc6h.patch index 3e68ff516..8d3339eb2 100644 --- a/ports/nvtt/bc6h.patch +++ b/ports/nvtt/bc6h.patch @@ -1,14 +1,13 @@ diff --git a/src/bc6h/CMakeLists.txt b/src/bc6h/CMakeLists.txt -index 635e0f3a..f758df43 100644 ---- a/src/bc6h/CMakeLists.txt +index fd75e74..b392d90 100644 +--- a/src/bc6h/CMakeLists.txt +++ b/src/bc6h/CMakeLists.txt -@@ -20,3 +20,8 @@ IF(NOT WIN32) - SET_TARGET_PROPERTIES(bc6h PROPERTIES COMPILE_FLAGS -fPIC) - ENDIF(CMAKE_COMPILER_IS_GNUCXX) - ENDIF(NOT WIN32) +@@ -15,3 +15,8 @@ SET(BC6H_SRCS + + ADD_LIBRARY(bc6h STATIC ${BC6H_SRCS}) + TARGET_LINK_LIBRARIES(bc6h nvcore nvmath) + +INSTALL(TARGETS bc6h + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib/static) -\ No newline at end of file diff --git a/ports/nvtt/bc7.patch b/ports/nvtt/bc7.patch index c94fcef23..5c644fece 100644 --- a/ports/nvtt/bc7.patch +++ b/ports/nvtt/bc7.patch @@ -1,11 +1,11 @@ diff --git a/src/bc7/CMakeLists.txt b/src/bc7/CMakeLists.txt -index 2eb01c06..0c36895b 100644 ---- a/src/bc7/CMakeLists.txt +index 566fe1f..d0d4e8a 100644 +--- a/src/bc7/CMakeLists.txt +++ b/src/bc7/CMakeLists.txt -@@ -28,3 +28,8 @@ IF(NOT WIN32) - SET_TARGET_PROPERTIES(bc7 PROPERTIES COMPILE_FLAGS -fPIC) - ENDIF(CMAKE_COMPILER_IS_GNUCXX) - ENDIF(NOT WIN32) +@@ -23,3 +23,8 @@ SET(BC7_SRCS + + ADD_LIBRARY(bc7 STATIC ${BC7_SRCS}) + TARGET_LINK_LIBRARIES(bc7 nvcore nvmath) + +INSTALL(TARGETS bc7 + RUNTIME DESTINATION bin diff --git a/ports/nvtt/fix-build-error.patch b/ports/nvtt/fix-build-error.patch index 7ba1c1976..5274efa31 100644 --- a/ports/nvtt/fix-build-error.patch +++ b/ports/nvtt/fix-build-error.patch @@ -1,39 +1,47 @@ -diff --git a/extern/butteraugli/butteraugli.h b/extern/butteraugli/butteraugli.h -index 31824b8..c116a73 100644 ---- a/extern/butteraugli/butteraugli.h -+++ b/extern/butteraugli/butteraugli.h -@@ -134,7 +134,14 @@ bool ButteraugliAdaptiveQuantization(size_t xsize, size_t ysize, - // The conventional syntax uint8_t* const RESTRICT is more confusing - it is - // not immediately obvious that the pointee is non-const. - template <typename T> -+#ifdef _MSC_VER -+// Due to MSVC bug: -+// https://developercommunity.visualstudio.com/content/problem/32196/msvc-cant-compile-a-templated-using-without-instan.html -+// , we cannot use __restrict now. Loss some performance instead of can't use this code. -+using ConstRestrict = T const; -+#else - using ConstRestrict = T const BUTTERAUGLI_RESTRICT; -+#endif +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 668cd7e..72d6e61 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,9 +7,17 @@ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${NV_CMAKE_DIR}") - // Functions that depend on the cache line size. - class CacheAligned { -diff --git a/src/nvthread/Atomic.h b/src/nvthread/Atomic.h -index 212b9cb..b8eaedb 100644 ---- a/src/nvthread/Atomic.h -+++ b/src/nvthread/Atomic.h -@@ -183,7 +183,6 @@ namespace nv { + # Compiler check (needs -std:c++11 flag) + include(CheckCXXCompilerFlag) ++if(MSVC) ++CHECK_CXX_COMPILER_FLAG("/std:c++14" COMPILER_SUPPORTS_CXX14) ++else() + CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) +-if(COMPILER_SUPPORTS_CXX11) ++endif() ++if(COMPILER_SUPPORTS_CXX11 OR COMPILER_SUPPORTS_CXX14) ++ if(COMPILER_SUPPORTS_CXX11) + set(CMAKE_CXX_STANDARD 11) ++ else() ++ set(CMAKE_CXX_STANDARD 14) ++ endif() + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + else() +diff --git a/extern/CMP_Core/source/cmp_math_func.h b/extern/CMP_Core/source/cmp_math_func.h +index c2f8908..b652497 100644 +--- a/extern/CMP_Core/source/cmp_math_func.h ++++ b/extern/CMP_Core/source/cmp_math_func.h +@@ -32,6 +32,7 @@ + // Core API which have have GPU equivalents, defined here for HPC_CPU usage + //============================================================================ ++#include <cmath> + #include <algorithm> + using namespace std; - #elif NV_CC_CLANG && (NV_OS_IOS || NV_OS_DARWIN) -- NV_COMPILER_CHECK(sizeof(uint32) == sizeof(long)); +diff --git a/src/nvtt/CMakeLists.txt b/src/nvtt/CMakeLists.txt +index 8285f99..9688c9c 100644 +--- a/src/nvtt/CMakeLists.txt ++++ b/src/nvtt/CMakeLists.txt +@@ -63,5 +63,5 @@ INSTALL(TARGETS nvtt + INSTALL(FILES nvtt.h nvtt_wrapper.h DESTINATION include/nvtt) - //ACS: Use Apple's atomics instead? I don't know if these are better in any way; there are non-barrier versions too. There's no OSAtomicSwap32 tho' - /* -@@ -254,7 +253,6 @@ namespace nv { - - #elif NV_CC_CLANG && POSH_CPU_STRONGARM -- NV_COMPILER_CHECK(sizeof(uint32) == sizeof(long)); - - inline uint32 atomicIncrement(uint32 * value) - { +-ADD_SUBDIRECTORY(tools) +-ADD_SUBDIRECTORY(tests) ++#ADD_SUBDIRECTORY(tools) ++#ADD_SUBDIRECTORY(tests) diff --git a/ports/nvtt/portfile.cmake b/ports/nvtt/portfile.cmake index bacdebbbc..46ea7f9b8 100644 --- a/ports/nvtt/portfile.cmake +++ b/ports/nvtt/portfile.cmake @@ -1,12 +1,12 @@ -include(vcpkg_common_functions)
+vcpkg_fail_port_install(ON_ARCH "x86")
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO castano/nvidia-texture-tools
- REF 2.1.1
- SHA512 3e6fef5977ca29daa7dc97afe11d61de57a8556c9caf30902db8c5c167d9c38f736bcb62eebdaaf7558299b39975bc269d41ab980c813b67dd1fc85064c853c9
+ REF b1a90f36013522b9e5a3a2197859b72188752e3f # 2.1.2
+ SHA512 13cf04a9856f150f7569c8c256c42fc6a5bc40586c9ca2b3ae553edf5bfcbccbba5b8538924079ed35effdd07b9e3ef4bfdb9733a2ec51f5a95f958885cc6cca
HEAD_REF master
PATCHES
001-define-value-for-HAVE_UNISTD_H-in-mac-os.patch
@@ -14,6 +14,7 @@ vcpkg_from_github( bc7.patch
squish.patch
fix-build-error.patch
+ add-compile-options-for-osx.patch
)
vcpkg_configure_cmake(
@@ -37,5 +38,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright
file(REMOVE ${CURRENT_PACKAGES_DIR}/share/doc/nvtt/LICENSE)
-file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nvtt)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/nvtt/LICENSE ${CURRENT_PACKAGES_DIR}/share/nvtt/copyright)
\ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
\ No newline at end of file diff --git a/ports/nvtt/squish.patch b/ports/nvtt/squish.patch index 36ce7be76..5f971a762 100644 --- a/ports/nvtt/squish.patch +++ b/ports/nvtt/squish.patch @@ -1,12 +1,13 @@ diff --git a/src/nvtt/squish/CMakeLists.txt b/src/nvtt/squish/CMakeLists.txt -index 832013e1..76824137 100644 ---- a/src/nvtt/squish/CMakeLists.txt +index 65a5dd3..d093ce5 100644 +--- a/src/nvtt/squish/CMakeLists.txt +++ b/src/nvtt/squish/CMakeLists.txt -@@ -33,3 +33,7 @@ IF(NOT WIN32) - ENDIF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX) - ENDIF(NOT WIN32) +@@ -21,3 +21,8 @@ SET(SQUISH_SRCS + simd_ve.h) -+INSTALL(TARGETS squish + ADD_LIBRARY(nvsquish STATIC ${SQUISH_SRCS}) ++ ++INSTALL(TARGETS nvsquish + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib/static) |
