aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBilly O'Neal <bion@microsoft.com>2020-10-19 19:53:20 -0700
committerGitHub <noreply@github.com>2020-10-19 19:53:20 -0700
commit0d3547275842e88330a7c4804b37d02729c1ff71 (patch)
tree81e87fc1050ff0334fec571c564a79454f0c4b90
parente93810d2ef7633e374992006af89f2b5056b04f1 (diff)
downloadvcpkg-0d3547275842e88330a7c4804b37d02729c1ff71.tar.gz
vcpkg-0d3547275842e88330a7c4804b37d02729c1ff71.zip
[itk,libsamplerate,libsndfile] Apply some Visual Studio 2019 version 16.9 preview 1 workarounds (#14056)
-rw-r--r--ports/itk/CONTROL38
-rw-r--r--ports/itk/portfile.cmake45
-rw-r--r--ports/itk/use-the-lrintf-intrinsic.patch15
-rw-r--r--ports/itk/vcpkg.json98
-rw-r--r--ports/libsamplerate/CONTROL4
-rw-r--r--ports/libsamplerate/portfile.cmake15
-rw-r--r--ports/libsamplerate/vcpkg.json7
-rw-r--r--ports/libsndfile/portfile.cmake8
-rw-r--r--ports/libsndfile/vcpkg.json1
9 files changed, 153 insertions, 78 deletions
diff --git a/ports/itk/CONTROL b/ports/itk/CONTROL
deleted file mode 100644
index 94135373e..000000000
--- a/ports/itk/CONTROL
+++ /dev/null
@@ -1,38 +0,0 @@
-Source: itk
-Version: 5.1.0
-Port-Version: 2
-Description: Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis.
-Homepage: https://github.com/InsightSoftwareConsortium/ITK
-Build-Depends: double-conversion, libjpeg-turbo, zlib, libpng, tiff, expat, eigen3, hdf5[core,cpp], openjpeg[core], fftw3[core], gtest, gdcm, icu, minc
-
-Feature: vtk
-Description: Build ITKVtkGlue module.
-Build-Depends: vtk[core]
-
-Feature: python
-Description: Python functionality for ITK
-Build-Depends: python3
-
-Feature: opencl
-Description: Use OpenCL
-Build-Depends: opencl
-
-Feature: cufftw
-Description: Use CUDA FFTW
-Build-Depends: cuda
-
-Feature: cuda
-Description: Build CUDA module
-Build-Depends: cuda, itk[core, opencl]
-
-Feature: tbb
-Description: Build TBB Module
-Build-Depends: tbb
-
-Feature: rtk
-Description: Build RTK Module
-
-Feature: tools
-Description: Build RTK with tools
-Build-Depends: itk[core, rtk]
-
diff --git a/ports/itk/portfile.cmake b/ports/itk/portfile.cmake
index b16ba194a..e5cb1383f 100644
--- a/ports/itk/portfile.cmake
+++ b/ports/itk/portfile.cmake
@@ -8,7 +8,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
hdf5.patch
- double-conversion.patch
+ double-conversion.patch
openjpeg.patch
openjpeg2.patch
var_libraries.patch
@@ -16,6 +16,7 @@ vcpkg_from_github(
python_gpu_wrapping.patch
opencl.patch
cufftw.patch
+ use-the-lrintf-intrinsic.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
@@ -27,7 +28,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
"tbb" Module_ITKTBB
"rtk" Module_RTK
"tools" RTK_BUILD_APPLICATIONS
- # There are a lot of more (remote) modules and options in ITK
+ # There are a lot of more (remote) modules and options in ITK
# feel free to add those as a feature
)
@@ -45,7 +46,7 @@ if("cufftw" IN_LIST FEATURES)
else()
message(FATAL_ERROR "Architecture ${VCPKG_TARGET_ARCHITECTURE} not supported !")
endif()
-
+
list(APPEND ADDITIONAL_OPTIONS
"-DFFTW_LIB_SEARCHPATH=${CUDA_LIB_PATH}"
"-DFFTW_INCLUDE_PATH=${CUDA_PATH}/include"
@@ -64,7 +65,7 @@ if("rtk" IN_LIST FEATURES)
)
if("cuda" IN_LIST FEATURES)
list(APPEND ADDITIONAL_OPTIONS "-DRTK_USE_CUDA=ON")
- #RTK + CUDA + PYTHON + dynamic library linkage will fail and needs upstream fixes.
+ #RTK + CUDA + PYTHON + dynamic library linkage will fail and needs upstream fixes.
endif()
endif()
file(REMOVE_RECURSE "${SOURCE_PATH}/Modules/Remote/RTK")
@@ -76,16 +77,16 @@ if("opencl" IN_LIST FEATURES)
)
endif()
if("tools" IN_LIST FEATURES)
-
+
if("rtk" IN_LIST FEATURES)
- list(APPEND TOOL_NAMES rtkadmmtotalvariation rtkadmmwavelets rtkamsterdamshroud rtkbackprojections rtkbioscangeometry rtkcheckimagequality rtkconjugategradient
- rtkdigisensgeometry rtkdrawgeometricphantom rtkdrawshepploganphantom rtkdualenergysimplexdecomposition rtkelektasynergygeometry rtkextractphasesignal
- rtkextractshroudsignal rtkfdk rtkfdktwodweights rtkfieldofview rtkforwardprojections rtkfourdconjugategradient rtkfourdfdk rtkfourdrooster rtkfourdsart
- rtkgaincorrection rtki0estimation rtkimagxgeometry rtkiterativefdk rtklagcorrection rtklastdimensionl0gradientdenoising rtklut rtkmaskcollimation rtkmcrooster
- rtkmotioncompensatedfourdconjugategradient rtkorageometry rtkosem rtkoverlayphaseandshroud rtkparkershortscanweighting rtkprojectgeometricphantom
- rtkprojectionmatrix rtkprojections rtkprojectshepploganphantom rtkramp rtkrayboxintersection rtkrayquadricintersection rtkregularizedconjugategradient
- rtksart rtkscatterglarecorrection rtksimulatedgeometry rtkspectraldenoiseprojections rtkspectralforwardmodel rtkspectralonestep rtkspectralrooster rtkspectralsimplexdecomposition
- rtksubselect rtktotalnuclearvariationdenoising rtktotalvariationdenoising rtktutorialapplication rtkvarianobigeometry rtkvarianprobeamgeometry rtkvectorconjugategradient
+ list(APPEND TOOL_NAMES rtkadmmtotalvariation rtkadmmwavelets rtkamsterdamshroud rtkbackprojections rtkbioscangeometry rtkcheckimagequality rtkconjugategradient
+ rtkdigisensgeometry rtkdrawgeometricphantom rtkdrawshepploganphantom rtkdualenergysimplexdecomposition rtkelektasynergygeometry rtkextractphasesignal
+ rtkextractshroudsignal rtkfdk rtkfdktwodweights rtkfieldofview rtkforwardprojections rtkfourdconjugategradient rtkfourdfdk rtkfourdrooster rtkfourdsart
+ rtkgaincorrection rtki0estimation rtkimagxgeometry rtkiterativefdk rtklagcorrection rtklastdimensionl0gradientdenoising rtklut rtkmaskcollimation rtkmcrooster
+ rtkmotioncompensatedfourdconjugategradient rtkorageometry rtkosem rtkoverlayphaseandshroud rtkparkershortscanweighting rtkprojectgeometricphantom
+ rtkprojectionmatrix rtkprojections rtkprojectshepploganphantom rtkramp rtkrayboxintersection rtkrayquadricintersection rtkregularizedconjugategradient
+ rtksart rtkscatterglarecorrection rtksimulatedgeometry rtkspectraldenoiseprojections rtkspectralforwardmodel rtkspectralonestep rtkspectralrooster rtkspectralsimplexdecomposition
+ rtksubselect rtktotalnuclearvariationdenoising rtktotalvariationdenoising rtktutorialapplication rtkvarianobigeometry rtkvarianprobeamgeometry rtkvectorconjugategradient
rtkwangdisplaceddetectorweighting rtkwarpedbackprojectsequence rtkwarpedforwardprojectsequence rtkwaveletsdenoising rtkxradgeometry)
endif()
endif()
@@ -122,8 +123,8 @@ if("python" IN_LIST FEATURES)
list(APPEND OPTIONS_RELEASE "-DPython3_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/libpython38m.a")
elseif(VCPKG_TARGET_IS_OSX)
#Need Python3 information on OSX within VCPKG
- endif()
- #ITK_PYTHON_SITE_PACKAGES_SUFFIX should be set to the install dir of the site-packages within vcpkg
+ endif()
+ #ITK_PYTHON_SITE_PACKAGES_SUFFIX should be set to the install dir of the site-packages within vcpkg
endif()
set(USE_64BITS_IDS OFF)
@@ -139,7 +140,7 @@ vcpkg_configure_cmake(
OPTIONS
-DBUILD_TESTING=OFF
-DBUILD_EXAMPLES=OFF
- -DBUILD_PKGCONFIG_FILES=OFF
+ -DBUILD_PKGCONFIG_FILES=OFF
-DITK_DOXYGEN_HTML=OFF
-DDO_NOT_INSTALL_ITK_TEST_DRIVER=ON
-DITK_SKIP_PATH_LENGTH_CHECKS=ON
@@ -160,7 +161,7 @@ vcpkg_configure_cmake(
-DITK_USE_SYSTEM_HDF5=ON # HDF5 was problematic in the past and still is. ITK still has not figured out how to do it correctly!
-DITK_USE_SYSTEM_GDCM=ON
-DITK_USE_SYSTEM_OpenJPEG=ON # Added by VCPKG
- -DITK_USE_SYSTEM_DCMTK=ON
+ -DITK_USE_SYSTEM_DCMTK=ON
-DDCMTK_USE_ICU=ON
-DITK_USE_SYSTEM_ICU=ON
#-DITK_USE_SYSTEM_VXL=ON
@@ -171,16 +172,16 @@ vcpkg_configure_cmake(
-DINSTALL_GTEST=OFF
-DITK_USE_SYSTEM_GOOGLETEST=ON
-DEXECUTABLE_OUTPUT_PATH=tools/${PORT}
-
+
# TODO
#-DVXL_USE_GEOTIFF=ON
-DVXL_USE_LFS=ON
-
+
-DITK_MINIMUM_COMPLIANCE_LEVEL:STRING=1 # To Display all remote modules within cmake-gui
#-DModule_IOSTL=ON # example how to turn on a non-default module
#-DModule_MorphologicalContourInterpolation=ON # example how to turn on a remote module
#-DModule_RLEImage=ON # example how to turn on a remote module
-
+
# Some additional wraping options
#-DITK_WRAP_double=ON
#-DITK_WRAP_complex_double=ON
@@ -189,11 +190,11 @@ vcpkg_configure_cmake(
${FEATURE_OPTIONS}
${ADDITIONAL_OPTIONS}
-
+
OPTIONS_DEBUG ${OPTIONS_DEBUG}
OPTIONS_RELEASE ${OPTIONS_RELEASE}
)
-if(BUILD_RTK) # Remote Modules are only downloaded on configure.
+if(BUILD_RTK) # Remote Modules are only downloaded on configure.
# TODO: In the future try to download via vcpkg_from_github and move the files. That way patching does not need this workaround
vcpkg_apply_patches(SOURCE_PATH "${SOURCE_PATH}/Modules/Remote/RTK" QUIET PATCHES rtk/already_defined.patch rtk/unresolved.patch)
endif()
diff --git a/ports/itk/use-the-lrintf-intrinsic.patch b/ports/itk/use-the-lrintf-intrinsic.patch
new file mode 100644
index 000000000..27df6cd9b
--- /dev/null
+++ b/ports/itk/use-the-lrintf-intrinsic.patch
@@ -0,0 +1,15 @@
+diff --git a/Modules/ThirdParty/OpenJPEG/src/openjpeg/opj_includes.h b/Modules/ThirdParty/OpenJPEG/src/openjpeg/opj_includes.h
+index e75a220d4d..4b13e1726a 100644
+--- a/Modules/ThirdParty/OpenJPEG/src/openjpeg/opj_includes.h
++++ b/Modules/ThirdParty/OpenJPEG/src/openjpeg/opj_includes.h
+@@ -87,8 +87,8 @@ Most compilers implement their own version of this keyword ...
+ #endif
+ #endif
+
+-/* MSVC and Borland C do not have lrintf */
+-#if defined(_MSC_VER) || defined(__BORLANDC__)
++/* MSVC pre 16.8 and Borland C do not have lrintf */
++#if (defined(_MSC_VER) && _MSC_VER < 1928) || defined(__BORLANDC__)
+
+ /* MSVC 64bits doesn't support _asm */
+ #if !defined(_WIN64)
diff --git a/ports/itk/vcpkg.json b/ports/itk/vcpkg.json
new file mode 100644
index 000000000..4231c3cdc
--- /dev/null
+++ b/ports/itk/vcpkg.json
@@ -0,0 +1,98 @@
+{
+ "name": "itk",
+ "version-string": "5.1.0",
+ "port-version": 3,
+ "description": "Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis.",
+ "homepage": "https://github.com/InsightSoftwareConsortium/ITK",
+ "dependencies": [
+ "double-conversion",
+ "eigen3",
+ "expat",
+ {
+ "name": "fftw3",
+ "default-features": false
+ },
+ "gdcm",
+ "gtest",
+ {
+ "name": "hdf5",
+ "default-features": false,
+ "features": [
+ "cpp"
+ ]
+ },
+ "icu",
+ "libjpeg-turbo",
+ "libpng",
+ "minc",
+ {
+ "name": "openjpeg",
+ "default-features": false
+ },
+ "tiff",
+ "zlib"
+ ],
+ "features": {
+ "cuda": {
+ "description": "Build CUDA module",
+ "dependencies": [
+ "cuda",
+ {
+ "name": "itk",
+ "default-features": false,
+ "features": [
+ "opencl"
+ ]
+ }
+ ]
+ },
+ "cufftw": {
+ "description": "Use CUDA FFTW",
+ "dependencies": [
+ "cuda"
+ ]
+ },
+ "opencl": {
+ "description": "Use OpenCL",
+ "dependencies": [
+ "opencl"
+ ]
+ },
+ "python": {
+ "description": "Python functionality for ITK",
+ "dependencies": [
+ "python3"
+ ]
+ },
+ "rtk": {
+ "description": "Build RTK Module"
+ },
+ "tbb": {
+ "description": "Build TBB Module",
+ "dependencies": [
+ "tbb"
+ ]
+ },
+ "tools": {
+ "description": "Build RTK with tools",
+ "dependencies": [
+ {
+ "name": "itk",
+ "default-features": false,
+ "features": [
+ "rtk"
+ ]
+ }
+ ]
+ },
+ "vtk": {
+ "description": "Build ITKVtkGlue module.",
+ "dependencies": [
+ {
+ "name": "vtk",
+ "default-features": false
+ }
+ ]
+ }
+ }
+}
diff --git a/ports/libsamplerate/CONTROL b/ports/libsamplerate/CONTROL
deleted file mode 100644
index 36e5df98c..000000000
--- a/ports/libsamplerate/CONTROL
+++ /dev/null
@@ -1,4 +0,0 @@
-Source: libsamplerate
-Version: 0.1.9.0-1
-Homepage: https://www.mega-nerd.com/SRC
-Description: Sample Rate Converter for audio
diff --git a/ports/libsamplerate/portfile.cmake b/ports/libsamplerate/portfile.cmake
index b2453f8a4..ff64c2447 100644
--- a/ports/libsamplerate/portfile.cmake
+++ b/ports/libsamplerate/portfile.cmake
@@ -1,14 +1,9 @@
-include(vcpkg_common_functions)
-
-vcpkg_download_distfile(ARCHIVE
- URLS "http://www.mega-nerd.com/SRC/libsamplerate-0.1.9.tar.gz"
- FILENAME "libsamplerate-0.1.9.tar.gz"
- SHA512 78596657963cbf06785e3e6e1190b093df71da52ca340e75bd8246a962cd79dd1c90fa5527c607cebcb296e2c1ee605015278b274e3b768f2f3fbeb0eadfb728
-)
-
-vcpkg_extract_source_archive_ex(
+vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
- ARCHIVE ${ARCHIVE}
+ REPO libsndfile/libsamplerate
+ REF f6730d03c3e7660bb6ecad8816f1b09c5825142a # v0.1.9
+ SHA512 6a349c9144d024212fc78dc0d9e39bdc1a43abaf590fcfbf84396af22834545962d5ef10176b48b21fcae2ce62d12277b682059383805d059f4dd2b9f6708478
+ HEAD_REF master
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/src)
diff --git a/ports/libsamplerate/vcpkg.json b/ports/libsamplerate/vcpkg.json
new file mode 100644
index 000000000..51fbb9e85
--- /dev/null
+++ b/ports/libsamplerate/vcpkg.json
@@ -0,0 +1,7 @@
+{
+ "name": "libsamplerate",
+ "version-string": "0.1.9.0",
+ "port-version": 2,
+ "description": "Sample Rate Converter for audio",
+ "homepage": "https://www.mega-nerd.com/SRC"
+}
diff --git a/ports/libsndfile/portfile.cmake b/ports/libsndfile/portfile.cmake
index ad7650e7f..77141fb69 100644
--- a/ports/libsndfile/portfile.cmake
+++ b/ports/libsndfile/portfile.cmake
@@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
- REPO erikd/libsndfile
- REF v1.0.30
- SHA512 2714dfbe923450a1f6f6d2a53ae0e88163170a5e0ce436bee27c1c41fc9b5526d6bc38e58918132248a9044f5b05fa29cd483c06c75ed67e6d83c961e30aaac9
+ REPO libsndfile/libsndfile
+ REF 68958f9c9199dad97dcd10700df3746b2cd9b8a3 # v1.0.30
+ SHA512 4f2af061af5d5b26106ed11e33f04930a57c79ca0e18ef5fe32255c3f555bfa7b9192db7ff0f34f782d85b2ee40662182073e1abf4a73f448c47b67c26bb5b53
HEAD_REF master
)
@@ -28,7 +28,7 @@ vcpkg_configure_cmake(
${FEATURE_OPTIONS}
)
-vcpkg_install_cmake()
+vcpkg_install_cmake()
if(WIN32 AND (NOT MINGW) AND (NOT CYGWIN))
set(CONFIG_PATH cmake)
diff --git a/ports/libsndfile/vcpkg.json b/ports/libsndfile/vcpkg.json
index b26c9f7ee..33556df7a 100644
--- a/ports/libsndfile/vcpkg.json
+++ b/ports/libsndfile/vcpkg.json
@@ -1,6 +1,7 @@
{
"name": "libsndfile",
"version-string": "1.0.30",
+ "port-version": 1,
"description": "Library to read, write and manipulate many soundfile types. Authored by Eric de Castro Lopo",
"homepage": "https://github.com/erikd/libsndfile",
"license": "LGPL-2.1",