aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-10-16 17:17:28 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-10-16 17:17:28 -0700
commitee2831c548b54cdccf064663b3fffda5d6a4c6b8 (patch)
tree70390dc6e2e22877cb6ede677076c8005fab8a1c
parentd88f53de9c284cfc67ba21707d60a44ba41ede8a (diff)
parent374253cb1b12a60925693130132f1a6ab6c3a83a (diff)
downloadvcpkg-ee2831c548b54cdccf064663b3fffda5d6a4c6b8.tar.gz
vcpkg-ee2831c548b54cdccf064663b3fffda5d6a4c6b8.zip
Merge from master
-rw-r--r--CHANGELOG.md173
-rw-r--r--docs/about/faq.md4
-rw-r--r--docs/maintainers/control-files.md4
-rw-r--r--docs/maintainers/portfile-functions.md2
-rw-r--r--docs/maintainers/vcpkg_acquire_msys.md2
-rw-r--r--docs/maintainers/vcpkg_build_cmake.md31
-rw-r--r--docs/maintainers/vcpkg_find_acquire_program.md2
-rw-r--r--docs/maintainers/vcpkg_from_bitbucket.md53
-rw-r--r--docs/maintainers/vcpkg_from_github.md6
-rw-r--r--docs/maintainers/vcpkg_install_cmake.md8
-rw-r--r--ports/abseil/CMakeLists.txt93
-rw-r--r--ports/abseil/CONTROL7
-rw-r--r--ports/abseil/portfile.cmake32
-rw-r--r--ports/ace/CONTROL2
-rw-r--r--ports/ace/portfile.cmake6
-rw-r--r--ports/alembic/CONTROL2
-rw-r--r--ports/allegro5/CONTROL4
-rw-r--r--ports/anax/CONTROL2
-rw-r--r--ports/anax/portfile.cmake18
-rw-r--r--ports/angle/CONTROL2
-rw-r--r--ports/angle/portfile.cmake2
-rw-r--r--ports/antlr4/portfile.cmake4
-rw-r--r--ports/apr-util/CONTROL2
-rw-r--r--ports/apr/CONTROL2
-rw-r--r--ports/arrow/CONTROL4
-rw-r--r--ports/arrow/all.patch130
-rw-r--r--ports/arrow/portfile.cmake26
-rw-r--r--ports/assimp/CONTROL2
-rw-r--r--ports/atk/CONTROL2
-rw-r--r--ports/aubio/CONTROL2
-rw-r--r--ports/aws-sdk-cpp/CONTROL2
-rw-r--r--ports/aws-sdk-cpp/portfile.cmake43
-rw-r--r--ports/azure-storage-cpp/CONTROL4
-rw-r--r--ports/benchmark/CONTROL4
-rw-r--r--ports/benchmark/fix-cmakelists.patch27
-rw-r--r--ports/benchmark/portfile.cmake18
-rw-r--r--ports/bigint/CMakeLists.txt40
-rw-r--r--ports/bigint/CONTROL3
-rw-r--r--ports/bigint/portfile.cmake27
-rw-r--r--ports/blaze/portfile.cmake12
-rw-r--r--ports/bond/CONTROL2
-rw-r--r--ports/bond/portfile.cmake4
-rw-r--r--ports/boost/CONTROL4
-rw-r--r--ports/boost/portfile.cmake19
-rw-r--r--ports/box2d/portfile.cmake2
-rw-r--r--ports/brotli/CONTROL2
-rw-r--r--ports/bullet3/CONTROL2
-rw-r--r--ports/butteraugli/CMakeLists.txt37
-rw-r--r--ports/butteraugli/CONTROL4
-rw-r--r--ports/butteraugli/missing_header.patch12
-rw-r--r--ports/butteraugli/portfile.cmake30
-rw-r--r--ports/bzip2/CONTROL2
-rw-r--r--ports/c-ares/CONTROL4
-rw-r--r--ports/c-ares/portfile.cmake4
-rw-r--r--ports/caffe2/CONTROL4
-rw-r--r--ports/caffe2/msvc-fixes.patch396
-rw-r--r--ports/caffe2/portfile.cmake118
-rw-r--r--ports/cairo/CONTROL2
-rw-r--r--ports/cairo/Initialize-mutexes-for-static-builds-for-win32.patch16
-rw-r--r--ports/cairo/portfile.cmake7
-rw-r--r--ports/cairomm/CONTROL4
-rw-r--r--ports/ccd/CONTROL2
-rw-r--r--ports/ccfits/CONTROL4
-rw-r--r--ports/cctz/CMakeLists.txt36
-rw-r--r--ports/cctz/CONTROL3
-rw-r--r--ports/cctz/portfile.cmake24
-rw-r--r--ports/celero/CONTROL3
-rw-r--r--ports/celero/portfile.cmake29
-rw-r--r--ports/cereal/CONTROL2
-rw-r--r--ports/ceres/CONTROL4
-rw-r--r--ports/cfitsio/CONTROL2
-rw-r--r--ports/charls/CONTROL4
-rw-r--r--ports/chmlib/CONTROL2
-rw-r--r--ports/chmlib/chm.vcxproj14
-rw-r--r--ports/chmlib/enum_chmLib.vcxproj109
-rw-r--r--ports/chmlib/enumdir_chmLib.vcxproj100
-rw-r--r--ports/chmlib/extract_chmLib.vcxproj100
-rw-r--r--ports/chmlib/portfile.cmake69
-rw-r--r--ports/clapack/CONTROL2
-rw-r--r--ports/clockutils/CONTROL2
-rw-r--r--ports/console-bridge/CONTROL3
-rw-r--r--ports/console-bridge/License.txt31
-rw-r--r--ports/console-bridge/portfile.cmake24
-rw-r--r--ports/corrade/CONTROL2
-rw-r--r--ports/corrade/portfile.cmake4
-rw-r--r--ports/cpp-redis/CONTROL2
-rw-r--r--ports/cppcms/CONTROL2
-rw-r--r--ports/cpprestsdk/0003_openssl_110.patch14
-rw-r--r--ports/cpprestsdk/CONTROL4
-rw-r--r--ports/cpprestsdk/portfile.cmake3
-rw-r--r--ports/cppwinrt/CONTROL2
-rw-r--r--ports/cppwinrt/portfile.cmake12
-rw-r--r--ports/cpr/CONTROL2
-rw-r--r--ports/cryptopp/CONTROL2
-rw-r--r--ports/ctemplate/CONTROL2
-rw-r--r--ports/ctemplate/portfile.cmake15
-rw-r--r--ports/cunit/CONTROL2
-rw-r--r--ports/curl/CONTROL2
-rw-r--r--ports/date/CMakeLists.txt30
-rw-r--r--ports/date/CONTROL3
-rw-r--r--ports/date/portfile.cmake38
-rw-r--r--ports/dimcli/CONTROL2
-rw-r--r--ports/dlfcn-win32/CONTROL2
-rw-r--r--ports/dlib/CONTROL2
-rw-r--r--ports/double-conversion/CONTROL2
-rw-r--r--ports/draco/CONTROL4
-rw-r--r--ports/duktape/CONTROL2
-rw-r--r--ports/eastl/CONTROL4
-rw-r--r--ports/eastl/portfile.cmake29
-rw-r--r--ports/ecm/CONTROL2
-rw-r--r--ports/eigen3/CONTROL2
-rw-r--r--ports/embree/CONTROL2
-rw-r--r--ports/enet/CMakeLists.txt81
-rw-r--r--ports/enet/CONTROL4
-rw-r--r--ports/enet/portfile.cmake38
-rw-r--r--ports/entityx/CONTROL2
-rw-r--r--ports/evpp/CONTROL2
-rw-r--r--ports/exiv2/CONTROL4
-rw-r--r--ports/exiv2/portfile.cmake29
-rw-r--r--ports/expat/CONTROL2
-rw-r--r--ports/fadbad/CONTROL3
-rw-r--r--ports/fadbad/portfile.cmake18
-rw-r--r--ports/fastlz/CONTROL2
-rw-r--r--ports/fcl/CONTROL4
-rw-r--r--ports/ffmpeg/build.sh7
-rw-r--r--ports/fftw3/CONTROL2
-rw-r--r--ports/flann/CONTROL2
-rw-r--r--ports/flatbuffers/CONTROL4
-rw-r--r--ports/fltk/CONTROL4
-rw-r--r--ports/fmt/CONTROL2
-rw-r--r--ports/folly/CONTROL2
-rw-r--r--ports/folly/portfile.cmake2
-rw-r--r--ports/fontconfig/CONTROL2
-rw-r--r--ports/freeglut/CONTROL4
-rw-r--r--ports/freeimage/CMakeLists.txt6
-rw-r--r--ports/freeimage/CONTROL2
-rw-r--r--ports/freerdp/CONTROL4
-rw-r--r--ports/freerdp/portfile.cmake4
-rw-r--r--ports/freetype/CONTROL4
-rw-r--r--ports/freexl/CONTROL5
-rw-r--r--ports/freexl/fix-makefiles.patch43
-rw-r--r--ports/freexl/fix-sources.patch35
-rw-r--r--ports/freexl/portfile.cmake82
-rw-r--r--ports/fuzzylite/CONTROL2
-rw-r--r--ports/g2o/CONTROL2
-rw-r--r--ports/gdal/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch70
-rw-r--r--ports/gdal/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch (renamed from ports/gdal/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch)25
-rw-r--r--ports/gdal/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch14
-rw-r--r--ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch26
-rw-r--r--ports/gdal/0003-Fix-openjpeg-include.patch20
-rw-r--r--ports/gdal/0004-Fix-openjpeg-include.patch19
-rw-r--r--ports/gdal/CONTROL4
-rw-r--r--ports/gdal/portfile.cmake23
-rw-r--r--ports/gdcm2/CONTROL2
-rw-r--r--ports/gdk-pixbuf/CONTROL2
-rw-r--r--ports/geogram/CONTROL2
-rw-r--r--ports/geographiclib/CONTROL2
-rw-r--r--ports/geos/CONTROL2
-rw-r--r--ports/geos/geos_c-static-support.patch110
-rw-r--r--ports/geos/portfile.cmake34
-rw-r--r--ports/gettext/CONTROL2
-rw-r--r--ports/gflags/CONTROL2
-rw-r--r--ports/giflib/CONTROL2
-rw-r--r--ports/gl2ps/CONTROL2
-rw-r--r--ports/glbinding/CONTROL2
-rw-r--r--ports/glew/CONTROL4
-rw-r--r--ports/glew/portfile.cmake5
-rw-r--r--ports/glfw3/CONTROL4
-rw-r--r--ports/glib/CONTROL2
-rw-r--r--ports/glm/CONTROL2
-rw-r--r--ports/globjects/CONTROL2
-rw-r--r--ports/glog/CONTROL2
-rw-r--r--ports/glslang/CONTROL2
-rw-r--r--ports/glslang/portfile.cmake30
-rw-r--r--ports/graphicsmagick/CONTROL2
-rw-r--r--ports/grpc/CONTROL4
-rw-r--r--ports/grpc/disable-csharp-ext.patch22
-rw-r--r--ports/grpc/portfile.cmake15
-rw-r--r--ports/grpc/revert-c019e05.patch18
-rw-r--r--ports/gsl/CONTROL2
-rw-r--r--ports/gtest/CONTROL4
-rw-r--r--ports/gtest/portfile.cmake2
-rw-r--r--ports/gtk/CONTROL2
-rw-r--r--ports/gts/CONTROL4
-rw-r--r--ports/gts/portfile.cmake36
-rw-r--r--ports/guetzli/CMakeLists.txt46
-rw-r--r--ports/guetzli/CONTROL4
-rw-r--r--ports/guetzli/portfile.cmake24
-rw-r--r--ports/gumbo/CMakeLists.txt32
-rw-r--r--ports/gumbo/CONTROL3
-rw-r--r--ports/gumbo/portfile.cmake24
-rw-r--r--ports/harfbuzz/CONTROL2
-rw-r--r--ports/hdf5/CONTROL4
-rw-r--r--ports/hpx/CONTROL2
-rw-r--r--ports/http-parser/CONTROL4
-rw-r--r--ports/hunspell/CONTROL2
-rw-r--r--ports/hwloc/CONTROL2
-rw-r--r--ports/hypre/CONTROL4
-rw-r--r--ports/ilmbase/CONTROL2
-rw-r--r--ports/imgui/CMakeLists.txt43
-rw-r--r--ports/imgui/CONTROL4
-rw-r--r--ports/imgui/portfile.cmake33
-rw-r--r--ports/jansson/CONTROL2
-rw-r--r--ports/jasper/CONTROL2
-rw-r--r--ports/jbigkit/CONTROL2
-rw-r--r--ports/jemalloc/CONTROL2
-rw-r--r--ports/jsoncpp/CONTROL2
-rw-r--r--ports/jsonnet/CMakeLists.txt53
-rw-r--r--ports/jsonnet/CONTROL3
-rw-r--r--ports/jsonnet/portfile.cmake29
-rw-r--r--ports/jxrlib/CONTROL2
-rw-r--r--ports/kf5plotting/CONTROL4
-rw-r--r--ports/kf5plotting/portfile.cmake24
-rw-r--r--ports/kinectsdk1/CONTROL2
-rw-r--r--ports/kinectsdk1/portfile.cmake35
-rw-r--r--ports/kinectsdk2/CONTROL3
-rw-r--r--ports/kinectsdk2/portfile.cmake72
-rw-r--r--ports/lcms/CONTROL4
-rw-r--r--ports/lcms/portfile.cmake2
-rw-r--r--ports/leptonica/CONTROL4
-rw-r--r--ports/leptonica/fix-cmakelists.patch34
-rw-r--r--ports/leptonica/portfile.cmake36
-rw-r--r--ports/libarchive/CONTROL2
-rw-r--r--ports/libbson/CONTROL4
-rw-r--r--ports/libconfig/CONTROL2
-rw-r--r--ports/libepoxy/CONTROL2
-rw-r--r--ports/libevent/CONTROL4
-rw-r--r--ports/libexif/CMakeLists.txt142
-rw-r--r--ports/libexif/CONTROL3
-rw-r--r--ports/libexif/config.h.cmake96
-rw-r--r--ports/libexif/libexif.def130
-rw-r--r--ports/libexif/portfile.cmake31
-rw-r--r--ports/libffi/CONTROL2
-rw-r--r--ports/libflac/CONTROL2
-rw-r--r--ports/libfreenect2/CONTROL4
-rw-r--r--ports/libfreenect2/portfile.cmake41
-rw-r--r--ports/libgd/CONTROL2
-rw-r--r--ports/libharu/CONTROL2
-rw-r--r--ports/libiconv/CONTROL2
-rw-r--r--ports/libidn2/CMakeLists.txt105
-rw-r--r--ports/libidn2/CONTROL4
-rw-r--r--ports/libidn2/config.h995
-rw-r--r--ports/libidn2/portfile.cmake48
-rw-r--r--ports/libidn2/string.h10
-rw-r--r--ports/libjpeg-turbo/CONTROL2
-rw-r--r--ports/libjpeg-turbo/portfile.cmake15
-rw-r--r--ports/libkml/CONTROL2
-rw-r--r--ports/liblzma/CONTROL2
-rw-r--r--ports/libmad/CONTROL2
-rw-r--r--ports/libmariadb/CONTROL2
-rw-r--r--ports/libmicrohttpd/CMakeLists.txt78
-rw-r--r--ports/libmicrohttpd/CONTROL3
-rw-r--r--ports/libmicrohttpd/portfile.cmake23
-rw-r--r--ports/libmikmod/CONTROL4
-rw-r--r--ports/libmodplug/CONTROL2
-rw-r--r--ports/libmysql/CONTROL4
-rw-r--r--ports/libmysql/portfile.cmake2
-rw-r--r--ports/libnice/CMakeLists.txt2
-rw-r--r--ports/libnice/CONTROL4
-rw-r--r--ports/libodb-pgsql/CONTROL4
-rw-r--r--ports/libodb-sqlite/CONTROL2
-rw-r--r--ports/libodb/CONTROL2
-rw-r--r--ports/libogg/CONTROL2
-rw-r--r--ports/libopusenc/CONTROL2
-rw-r--r--ports/libp7-baical/CONTROL2
-rw-r--r--ports/libpng/CONTROL2
-rw-r--r--ports/libpopt/CONTROL2
-rw-r--r--ports/libpq/CONTROL2
-rw-r--r--ports/libraw/CONTROL2
-rw-r--r--ports/librtmp/CMakeLists.txt57
-rw-r--r--ports/librtmp/CONTROL4
-rw-r--r--ports/librtmp/fix_strncasecmp.patch16
-rw-r--r--ports/librtmp/hide_netstackdump.patch22
-rw-r--r--ports/librtmp/librtmp.def105
-rw-r--r--ports/librtmp/portfile.cmake36
-rw-r--r--ports/libsigcpp/CONTROL2
-rw-r--r--ports/libsndfile/CONTROL2
-rw-r--r--ports/libspatialite/CONTROL5
-rw-r--r--ports/libspatialite/fix-makefiles.patch61
-rw-r--r--ports/libspatialite/fix-sources.patch32
-rw-r--r--ports/libspatialite/portfile.cmake105
-rw-r--r--ports/libssh/CONTROL2
-rw-r--r--ports/libssh2/CONTROL4
-rw-r--r--ports/libstemmer/CMakeLists.txt22
-rw-r--r--ports/libstemmer/CONTROL3
-rw-r--r--ports/libstemmer/LICENSE19
-rw-r--r--ports/libstemmer/portfile.cmake24
-rw-r--r--ports/libtheora/CMakeLists.txt2
-rw-r--r--ports/libtheora/CONTROL2
-rw-r--r--ports/libtorrent/CONTROL2
-rw-r--r--ports/libunibreak/CMakeLists.txt35
-rw-r--r--ports/libunibreak/CONTROL3
-rw-r--r--ports/libunibreak/portfile.cmake24
-rw-r--r--ports/libusb-win32/CONTROL2
-rw-r--r--ports/libuv/CONTROL4
-rw-r--r--ports/libuv/portfile.cmake4
-rw-r--r--ports/libvorbis/CONTROL2
-rw-r--r--ports/libwebm/CONTROL2
-rw-r--r--ports/libwebp/CONTROL2
-rw-r--r--ports/libwebsockets/CONTROL4
-rw-r--r--ports/libxml2/CONTROL2
-rw-r--r--ports/libxmp-lite/0001-msvc-buildfix.patch23
-rw-r--r--ports/libxmp-lite/0002-fix-symbols.patch44
-rw-r--r--ports/libxmp-lite/CMakeLists.txt65
-rw-r--r--ports/libxmp-lite/CONTROL3
-rw-r--r--ports/libxmp-lite/portfile.cmake27
-rw-r--r--ports/libzip/CONTROL2
-rw-r--r--ports/live555/CONTROL2
-rw-r--r--ports/llvm/CONTROL2
-rw-r--r--ports/llvm/portfile.cmake8
-rw-r--r--ports/lmdb/CONTROL4
-rw-r--r--ports/lodepng/CMakeLists.txt41
-rw-r--r--ports/lodepng/CONTROL3
-rw-r--r--ports/lodepng/portfile.cmake28
-rw-r--r--ports/log4cplus/CONTROL2
-rw-r--r--ports/lpeg/CONTROL2
-rw-r--r--ports/lua/CMakeLists.txt5
-rw-r--r--ports/lua/CONTROL2
-rw-r--r--ports/luafilesystem/CONTROL2
-rw-r--r--ports/luafilesystem/lfs-def-fix.patch23
-rw-r--r--ports/luafilesystem/portfile.cmake6
-rw-r--r--ports/lz4/CONTROL2
-rw-r--r--ports/lzfse/CONTROL2
-rw-r--r--ports/lzo/CONTROL2
-rw-r--r--ports/magnum-plugins/CONTROL2
-rw-r--r--ports/magnum-plugins/portfile.cmake4
-rw-r--r--ports/magnum/CONTROL2
-rw-r--r--ports/matio/CONTROL2
-rw-r--r--ports/meschach/CMakeLists.txt89
-rw-r--r--ports/meschach/CONTROL3
-rw-r--r--ports/meschach/portfile.cmake21
-rw-r--r--ports/metis/CONTROL2
-rw-r--r--ports/minizip/CONTROL2
-rw-r--r--ports/mongo-c-driver/CONTROL4
-rw-r--r--ports/mongo-cxx-driver/CONTROL4
-rw-r--r--ports/mozjpeg/CONTROL3
-rw-r--r--ports/mozjpeg/portfile.cmake54
-rw-r--r--ports/mpfr/CONTROL4
-rw-r--r--ports/mpfr/portfile.cmake8
-rw-r--r--ports/msgpack/CONTROL2
-rw-r--r--ports/msmpi/portfile.cmake10
-rw-r--r--ports/nana/CONTROL2
-rw-r--r--ports/nanodbc/CONTROL4
-rw-r--r--ports/netcdf-c/CONTROL2
-rw-r--r--ports/netcdf-cxx4/CONTROL2
-rw-r--r--ports/nlohmann-json/CONTROL2
-rw-r--r--ports/nlopt/0001_export_symbols.patch25
-rw-r--r--ports/nlopt/CONTROL3
-rw-r--r--ports/nlopt/portfile.cmake30
-rw-r--r--ports/octomap/CONTROL2
-rw-r--r--ports/ogre/CONTROL2
-rw-r--r--ports/openal-soft/CONTROL2
-rw-r--r--ports/openblas/CONTROL2
-rw-r--r--ports/openblas/install-openblas.patch37
-rw-r--r--ports/openblas/portfile.cmake14
-rw-r--r--ports/openblas/whitespace.patch64
-rw-r--r--ports/opencv/002-fix-uwp.patch13
-rw-r--r--ports/opencv/CONTROL7
-rw-r--r--ports/opencv/portfile.cmake140
-rw-r--r--ports/openexr/CONTROL2
-rw-r--r--ports/opengl/portfile.cmake12
-rw-r--r--ports/openimageio/CONTROL4
-rw-r--r--ports/openjpeg/CONTROL2
-rw-r--r--ports/openni2/CONTROL3
-rw-r--r--ports/openni2/inherit_from_parent_or_project_defaults.patch41
-rw-r--r--ports/openni2/portfile.cmake45
-rw-r--r--ports/openni2/replace_environment_variable.patch76
-rw-r--r--ports/openni2/upgrade_projects.patch11
-rw-r--r--ports/openssl/CONTROL2
-rw-r--r--ports/openssl/EmbedSymbolsInStaticLibsZ7.patch25
-rw-r--r--ports/openssl/portfile.cmake7
-rw-r--r--ports/opusfile/CONTROL2
-rw-r--r--ports/osg/CONTROL2
-rw-r--r--ports/paho-mqtt/CONTROL2
-rw-r--r--ports/paho-mqtt/disable_tests.patch16
-rw-r--r--ports/paho-mqtt/portfile.cmake75
-rw-r--r--ports/paho-mqtt/remove_compiler_options.patch13
-rw-r--r--ports/pango/CONTROL2
-rw-r--r--ports/pangolin/CONTROL6
-rw-r--r--ports/pangolin/portfile.cmake32
-rw-r--r--ports/parmetis/CONTROL2
-rw-r--r--ports/pcl/CONTROL4
-rw-r--r--ports/pcl/portfile.cmake2
-rw-r--r--ports/pcre/CONTROL2
-rw-r--r--ports/pcre2/CONTROL2
-rw-r--r--ports/physfs/CONTROL2
-rw-r--r--ports/picosha2/CONTROL3
-rw-r--r--ports/picosha2/portfile.cmake11
-rw-r--r--ports/piex/CMakeLists.txt43
-rw-r--r--ports/piex/CONTROL3
-rw-r--r--ports/piex/portfile.cmake28
-rw-r--r--ports/pixman/CONTROL2
-rw-r--r--ports/plibsys/CONTROL2
-rw-r--r--ports/poco/CONTROL2
-rw-r--r--ports/podofo/CONTROL4
-rw-r--r--ports/portaudio/CONTROL2
-rw-r--r--ports/pqp/CONTROL2
-rw-r--r--ports/proj/CONTROL5
-rw-r--r--ports/proj/portfile.cmake58
-rw-r--r--ports/proj4/0001-CMake-add-detection-of-recent-visual-studio-versions.patch (renamed from ports/proj/0001-CMake-add-detection-of-recent-visual-studio-versions.patch)0
-rw-r--r--ports/proj4/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch (renamed from ports/proj/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch)0
-rw-r--r--ports/proj4/0003-CMake-configurable-cmake-config-install-location.patch (renamed from ports/proj/0003-CMake-configurable-cmake-config-install-location.patch)0
-rw-r--r--ports/proj4/CONTROL3
-rw-r--r--ports/proj4/portfile.cmake68
-rw-r--r--ports/protobuf/0001-fix-missing-export.patch13
-rw-r--r--ports/protobuf/001-add-compiler-flag.patch23
-rw-r--r--ports/protobuf/CONTROL4
-rw-r--r--ports/protobuf/portfile.cmake33
-rw-r--r--ports/ptex/CONTROL2
-rw-r--r--ports/pthreads/CONTROL2
-rw-r--r--ports/pugixml/CONTROL2
-rw-r--r--ports/pybind11/CONTROL4
-rw-r--r--ports/pybind11/portfile.cmake4
-rw-r--r--ports/pystring/CONTROL2
-rw-r--r--ports/qca/CONTROL2
-rw-r--r--ports/qhull/CONTROL2
-rw-r--r--ports/qt5/CONTROL2
-rw-r--r--ports/qt5/fixcmake.py12
-rw-r--r--ports/qt5/portfile.cmake49
-rw-r--r--ports/ragel/CONTROL2
-rw-r--r--ports/readosm/CONTROL4
-rw-r--r--ports/readosm/fix-makefiles.patch49
-rw-r--r--ports/readosm/fix-version-macro.patch13
-rw-r--r--ports/readosm/portfile.cmake78
-rw-r--r--ports/rhash/CONTROL2
-rw-r--r--ports/rocksdb/CONTROL2
-rw-r--r--ports/rtmidi/CONTROL2
-rw-r--r--ports/rttr/CONTROL2
-rw-r--r--ports/sciter/CONTROL2
-rw-r--r--ports/sciter/portfile.cmake6
-rw-r--r--ports/sdl2-gfx/CONTROL2
-rw-r--r--ports/sdl2-image/CONTROL2
-rw-r--r--ports/sdl2-mixer/CONTROL2
-rw-r--r--ports/sdl2-net/CONTROL2
-rw-r--r--ports/sdl2-ttf/CONTROL2
-rw-r--r--ports/sdl2/CONTROL2
-rw-r--r--ports/sdl2/dont-ignore-default-libs.patch22
-rw-r--r--ports/sdl2/export-symbols-only-in-shared-build.patch28
-rw-r--r--ports/sdl2/portfile.cmake22
-rw-r--r--ports/sery/CONTROL2
-rw-r--r--ports/sfml/CONTROL2
-rw-r--r--ports/sfml/portfile.cmake19
-rw-r--r--ports/shaderc/CMakeLists.txt60
-rw-r--r--ports/shaderc/CMakeLists_spirv.txt2
-rw-r--r--ports/shaderc/CONTROL2
-rw-r--r--ports/shaderc/portfile.cmake43
-rw-r--r--ports/shapelib/CONTROL3
-rw-r--r--ports/shapelib/portfile.cmake41
-rw-r--r--ports/signalrclient/CONTROL4
-rw-r--r--ports/signalrclient/portfile.cmake4
-rw-r--r--ports/smpeg2/CONTROL2
-rw-r--r--ports/snappy/CONTROL2
-rw-r--r--ports/sobjectizer/CONTROL2
-rw-r--r--ports/soci/CONTROL2
-rw-r--r--ports/sophus/CONTROL2
-rw-r--r--ports/spatialite-tools/CONTROL4
-rw-r--r--ports/spatialite-tools/fix-makefiles.patch128
-rw-r--r--ports/spatialite-tools/portfile.cmake118
-rw-r--r--ports/spdlog/CONTROL2
-rw-r--r--ports/speex/CONTROL2
-rw-r--r--ports/speexdsp/CONTROL2
-rw-r--r--ports/spirit-po/CONTROL4
-rw-r--r--ports/spirit-po/portfile.cmake16
-rw-r--r--ports/spirv-tools/CONTROL2
-rw-r--r--ports/spirv-tools/portfile.cmake80
-rw-r--r--ports/sqlite3/CONTROL6
-rw-r--r--ports/sqlite3/portfile.cmake4
-rw-r--r--ports/string-theory/CONTROL3
-rw-r--r--ports/string-theory/portfile.cmake42
-rw-r--r--ports/suitesparse/CONTROL2
-rw-r--r--ports/sundials/CONTROL2
-rw-r--r--ports/szip/CONTROL2
-rw-r--r--ports/tacopie/CONTROL2
-rw-r--r--ports/taglib/CONTROL4
-rw-r--r--ports/tbb/portfile.cmake2
-rw-r--r--ports/telnetpp/CONTROL4
-rw-r--r--ports/telnetpp/portfile.cmake47
-rw-r--r--ports/tesseract/CONTROL4
-rw-r--r--ports/tesseract/portfile.cmake49
-rw-r--r--ports/tesseract/use-vcpkg-icu.patch11
-rw-r--r--ports/theia/CONTROL4
-rw-r--r--ports/theia/portfile.cmake2
-rw-r--r--ports/thor/CONTROL2
-rw-r--r--ports/thrift/CONTROL2
-rw-r--r--ports/thrift/portfile.cmake2
-rw-r--r--ports/tiff/CONTROL2
-rw-r--r--ports/tiny-dnn/CONTROL3
-rw-r--r--ports/tiny-dnn/portfile.cmake15
-rw-r--r--ports/tinyexr/portfile.cmake2
-rw-r--r--ports/tinythread/CMakeLists.txt25
-rw-r--r--ports/tinythread/CONTROL3
-rw-r--r--ports/tinythread/portfile.cmake21
-rw-r--r--ports/tinyxml/0001_use_stl.patch27
-rw-r--r--ports/tinyxml/CMakeLists.txt25
-rw-r--r--ports/tinyxml/CONTROL3
-rw-r--r--ports/tinyxml/License.txt20
-rw-r--r--ports/tinyxml/portfile.cmake30
-rw-r--r--ports/tinyxml2/CONTROL2
-rw-r--r--ports/units/CONTROL3
-rw-r--r--ports/units/portfile.cmake25
-rw-r--r--ports/urdfdom-headers/CONTROL3
-rw-r--r--ports/urdfdom-headers/portfile.cmake25
-rw-r--r--ports/urdfdom/0001_use_math_defines.patch26
-rw-r--r--ports/urdfdom/0002_fix_exports.patch29
-rw-r--r--ports/urdfdom/CONTROL4
-rw-r--r--ports/urdfdom/portfile.cmake51
-rw-r--r--ports/uriparser/CONTROL2
-rw-r--r--ports/utf8proc/CONTROL2
-rw-r--r--ports/utfz/CONTROL2
-rw-r--r--ports/uwebsockets/CONTROL2
-rw-r--r--ports/vtk/CONTROL4
-rw-r--r--ports/vtk/FindGDAL.cmake127
-rw-r--r--ports/vtk/fix-find-libharu.patch18
-rw-r--r--ports/vtk/fix-find-mysql.patch10
-rw-r--r--ports/vtk/fix-find-odbc.patch11
-rw-r--r--ports/vtk/portfile.cmake162
-rw-r--r--ports/websocketpp/CONTROL2
-rw-r--r--ports/websocketpp/openssl_110.patch19
-rw-r--r--ports/websocketpp/portfile.cmake6
-rw-r--r--ports/wildmidi/0001-add-install-target.patch30
-rw-r--r--ports/wildmidi/0002-use-ansi.patch22
-rw-r--r--ports/wildmidi/CONTROL3
-rw-r--r--ports/wildmidi/portfile.cmake51
-rw-r--r--ports/wincrypt/CONTROL3
-rw-r--r--ports/wincrypt/portfile.cmake40
-rw-r--r--ports/winpcap/CONTROL3
-rw-r--r--ports/winpcap/create_bin.bat20
-rw-r--r--ports/winpcap/create_lib.patch19
-rw-r--r--ports/winpcap/packetNtx.patch.in725
-rw-r--r--ports/winpcap/portfile.cmake186
-rw-r--r--ports/winpcap/wpcap.patch.in414
-rw-r--r--ports/winsock2/CONTROL3
-rw-r--r--ports/winsock2/portfile.cmake40
-rw-r--r--ports/wt/CONTROL2
-rw-r--r--ports/xlnt/CONTROL3
-rw-r--r--ports/xlnt/portfile.cmake10
-rw-r--r--ports/xxhash/CONTROL2
-rw-r--r--ports/xxhash/portfile.cmake25
-rw-r--r--ports/yaml-cpp/CONTROL2
-rw-r--r--ports/yaml-cpp/portfile.cmake2
-rw-r--r--ports/zeromq/CONTROL2
-rw-r--r--ports/zeromq/portfile.cmake99
-rw-r--r--ports/zlib/CONTROL4
-rw-r--r--ports/zlib/cmake_dont_build_more_than_needed.patch42
-rw-r--r--ports/zlib/portfile.cmake14
-rw-r--r--ports/zstd/CONTROL2
-rw-r--r--ports/zziplib/CMakeLists.txt2
-rw-r--r--ports/zziplib/CONTROL2
-rw-r--r--scripts/buildsystems/vcpkg.cmake267
-rw-r--r--scripts/cmake/vcpkg_acquire_depot_tools.cmake2
-rw-r--r--scripts/cmake/vcpkg_build_cmake.cmake75
-rw-r--r--scripts/cmake/vcpkg_common_functions.cmake1
-rw-r--r--scripts/cmake/vcpkg_configure_cmake.cmake110
-rw-r--r--scripts/cmake/vcpkg_configure_meson.cmake16
-rw-r--r--scripts/cmake/vcpkg_download_distfile.cmake2
-rw-r--r--scripts/cmake/vcpkg_find_acquire_program.cmake60
-rw-r--r--scripts/cmake/vcpkg_from_bitbucket.cmake190
-rw-r--r--scripts/cmake/vcpkg_install_cmake.cmake48
-rw-r--r--scripts/fetchDependency.ps163
-rw-r--r--scripts/findAnyMSBuildWithCppPlatformToolset.ps1172
-rw-r--r--scripts/findVisualStudioInstallationInstances.ps149
-rw-r--r--scripts/getWindowsSDK.ps19
-rw-r--r--scripts/get_triplet_environment.cmake3
-rw-r--r--scripts/ifw/maintenance.qs46
-rw-r--r--scripts/internalCI.ps12
-rw-r--r--scripts/posh-vcpkg/0.0.1/posh-vcpkg.psd131
-rw-r--r--scripts/posh-vcpkg/0.0.1/posh-vcpkg.psm139
-rw-r--r--toolsrc/VERSION.txt2
-rw-r--r--toolsrc/include/CStringView.h54
-rw-r--r--toolsrc/include/Span.h38
-rw-r--r--toolsrc/include/filesystem_fs.h16
-rw-r--r--toolsrc/include/pch.h23
-rw-r--r--toolsrc/include/vcpkg/base/checks.h (renamed from toolsrc/include/vcpkg_Checks.h)27
-rw-r--r--toolsrc/include/vcpkg/base/chrono.h (renamed from toolsrc/include/vcpkg_Chrono.h)2
-rw-r--r--toolsrc/include/vcpkg/base/cofffilereader.h (renamed from toolsrc/include/coff_file_reader.h)8
-rw-r--r--toolsrc/include/vcpkg/base/cstringview.h69
-rw-r--r--toolsrc/include/vcpkg/base/enums.h (renamed from toolsrc/include/vcpkg_Enums.h)4
-rw-r--r--toolsrc/include/vcpkg/base/expected.h (renamed from toolsrc/include/vcpkg_expected.h)9
-rw-r--r--toolsrc/include/vcpkg/base/files.h (renamed from toolsrc/include/vcpkg_Files.h)32
-rw-r--r--toolsrc/include/vcpkg/base/graphs.h (renamed from toolsrc/include/vcpkg_Graphs.h)8
-rw-r--r--toolsrc/include/vcpkg/base/lazy.h (renamed from toolsrc/include/lazy.h)0
-rw-r--r--toolsrc/include/vcpkg/base/lineinfo.h (renamed from toolsrc/include/LineInfo.h)0
-rw-r--r--toolsrc/include/vcpkg/base/machinetype.h (renamed from toolsrc/include/MachineType.h)1
-rw-r--r--toolsrc/include/vcpkg/base/optional.h (renamed from toolsrc/include/vcpkg_optional.h)7
-rw-r--r--toolsrc/include/vcpkg/base/sortedvector.h (renamed from toolsrc/include/SortedVector.h)0
-rw-r--r--toolsrc/include/vcpkg/base/span.h60
-rw-r--r--toolsrc/include/vcpkg/base/strings.h (renamed from toolsrc/include/vcpkg_Strings.h)53
-rw-r--r--toolsrc/include/vcpkg/base/system.h (renamed from toolsrc/include/vcpkg_System.h)25
-rw-r--r--toolsrc/include/vcpkg/base/util.h (renamed from toolsrc/include/vcpkg_Util.h)53
-rw-r--r--toolsrc/include/vcpkg/binaryparagraph.h (renamed from toolsrc/include/BinaryParagraph.h)5
-rw-r--r--toolsrc/include/vcpkg/build.h (renamed from toolsrc/include/vcpkg_Build.h)37
-rw-r--r--toolsrc/include/vcpkg/commands.h135
-rw-r--r--toolsrc/include/vcpkg/dependencies.h (renamed from toolsrc/include/vcpkg_Dependencies.h)21
-rw-r--r--toolsrc/include/vcpkg/export.h10
-rw-r--r--toolsrc/include/vcpkg/export.ifw.h26
-rw-r--r--toolsrc/include/vcpkg/globalstate.h (renamed from toolsrc/include/vcpkg_GlobalState.h)8
-rw-r--r--toolsrc/include/vcpkg/help.h19
-rw-r--r--toolsrc/include/vcpkg/input.h (renamed from toolsrc/include/vcpkg_Input.h)3
-rw-r--r--toolsrc/include/vcpkg/install.h71
-rw-r--r--toolsrc/include/vcpkg/metrics.h (renamed from toolsrc/include/metrics.h)7
-rw-r--r--toolsrc/include/vcpkg/packagespec.h (renamed from toolsrc/include/PackageSpec.h)39
-rw-r--r--toolsrc/include/vcpkg/packagespecparseresult.h (renamed from toolsrc/include/PackageSpecParseResult.h)5
-rw-r--r--toolsrc/include/vcpkg/paragraphparseresult.h (renamed from toolsrc/include/ParagraphParseResult.h)12
-rw-r--r--toolsrc/include/vcpkg/paragraphs.h (renamed from toolsrc/include/Paragraphs.h)14
-rw-r--r--toolsrc/include/vcpkg/parse.h (renamed from toolsrc/include/vcpkg_Parse.h)8
-rw-r--r--toolsrc/include/vcpkg/postbuildlint.buildtype.h (renamed from toolsrc/include/PostBuildLint_BuildType.h)6
-rw-r--r--toolsrc/include/vcpkg/postbuildlint.h (renamed from toolsrc/include/PostBuildLint.h)7
-rw-r--r--toolsrc/include/vcpkg/remove.h26
-rw-r--r--toolsrc/include/vcpkg/sourceparagraph.h (renamed from toolsrc/include/SourceParagraph.h)16
-rw-r--r--toolsrc/include/vcpkg/statusparagraph.h (renamed from toolsrc/include/StatusParagraph.h)3
-rw-r--r--toolsrc/include/vcpkg/statusparagraphs.h (renamed from toolsrc/include/StatusParagraphs.h)3
-rw-r--r--toolsrc/include/vcpkg/triplet.h (renamed from toolsrc/include/triplet.h)15
-rw-r--r--toolsrc/include/vcpkg/update.h21
-rw-r--r--toolsrc/include/vcpkg/vcpkgcmdarguments.h (renamed from toolsrc/include/VcpkgCmdArguments.h)24
-rw-r--r--toolsrc/include/vcpkg/vcpkglib.h (renamed from toolsrc/include/vcpkglib.h)21
-rw-r--r--toolsrc/include/vcpkg/vcpkgpaths.h (renamed from toolsrc/include/VcpkgPaths.h)30
-rw-r--r--toolsrc/include/vcpkg/versiont.h (renamed from toolsrc/include/VersionT.h)0
-rw-r--r--toolsrc/include/vcpkg_Commands.h215
-rw-r--r--toolsrc/include/vcpkg_Maps.h30
-rw-r--r--toolsrc/src/VcpkgPaths.cpp417
-rw-r--r--toolsrc/src/commands_build.cpp102
-rw-r--r--toolsrc/src/commands_ci.cpp98
-rw-r--r--toolsrc/src/commands_hash.cpp55
-rw-r--r--toolsrc/src/commands_version.cpp38
-rw-r--r--toolsrc/src/tests.arguments.cpp (renamed from toolsrc/src/tests_arguments.cpp)4
-rw-r--r--toolsrc/src/tests.dependencies.cpp (renamed from toolsrc/src/tests_dependencies.cpp)6
-rw-r--r--toolsrc/src/tests.installplan.cpp (renamed from toolsrc/src/test_install_plan.cpp)7
-rw-r--r--toolsrc/src/tests.packagespec.cpp (renamed from toolsrc/src/tests_package_spec.cpp)11
-rw-r--r--toolsrc/src/tests.paragraph.cpp (renamed from toolsrc/src/tests_paragraph.cpp)9
-rw-r--r--toolsrc/src/vcpkg.cpp109
-rw-r--r--toolsrc/src/vcpkg/base/checks.cpp (renamed from toolsrc/src/vcpkg_Checks.cpp)41
-rw-r--r--toolsrc/src/vcpkg/base/chrono.cpp (renamed from toolsrc/src/vcpkg_Chrono.cpp)24
-rw-r--r--toolsrc/src/vcpkg/base/cofffilereader.cpp (renamed from toolsrc/src/coff_file_reader.cpp)13
-rw-r--r--toolsrc/src/vcpkg/base/enums.cpp (renamed from toolsrc/src/vcpkg_Enums.cpp)4
-rw-r--r--toolsrc/src/vcpkg/base/files.cpp (renamed from toolsrc/src/vcpkg_Files.cpp)20
-rw-r--r--toolsrc/src/vcpkg/base/lineinfo.cpp (renamed from toolsrc/src/LineInfo.cpp)4
-rw-r--r--toolsrc/src/vcpkg/base/machinetype.cpp (renamed from toolsrc/src/MachineType.cpp)6
-rw-r--r--toolsrc/src/vcpkg/base/strings.cpp (renamed from toolsrc/src/vcpkg_Strings.cpp)84
-rw-r--r--toolsrc/src/vcpkg/base/system.cpp (renamed from toolsrc/src/vcpkg_System.cpp)215
-rw-r--r--toolsrc/src/vcpkg/binaryparagraph.cpp (renamed from toolsrc/src/BinaryParagraph.cpp)10
-rw-r--r--toolsrc/src/vcpkg/build.cpp (renamed from toolsrc/src/vcpkg_Build.cpp)235
-rw-r--r--toolsrc/src/vcpkg/commands.autocomplete.cpp141
-rw-r--r--toolsrc/src/vcpkg/commands.buildexternal.cpp (renamed from toolsrc/src/commands_build_external.cpp)17
-rw-r--r--toolsrc/src/vcpkg/commands.cache.cpp (renamed from toolsrc/src/commands_cache.cpp)17
-rw-r--r--toolsrc/src/vcpkg/commands.ci.cpp62
-rw-r--r--toolsrc/src/vcpkg/commands.contact.cpp (renamed from toolsrc/src/commands_contact.cpp)8
-rw-r--r--toolsrc/src/vcpkg/commands.cpp (renamed from toolsrc/src/commands_available_commands.cpp)18
-rw-r--r--toolsrc/src/vcpkg/commands.create.cpp (renamed from toolsrc/src/commands_create.cpp)22
-rw-r--r--toolsrc/src/vcpkg/commands.dependinfo.cpp (renamed from toolsrc/src/commands_depends.cpp)15
-rw-r--r--toolsrc/src/vcpkg/commands.edit.cpp (renamed from toolsrc/src/commands_edit.cpp)72
-rw-r--r--toolsrc/src/vcpkg/commands.env.cpp (renamed from toolsrc/src/commands_env.cpp)13
-rw-r--r--toolsrc/src/vcpkg/commands.exportifw.cpp490
-rw-r--r--toolsrc/src/vcpkg/commands.hash.cpp50
-rw-r--r--toolsrc/src/vcpkg/commands.import.cpp (renamed from toolsrc/src/commands_import.cpp)27
-rw-r--r--toolsrc/src/vcpkg/commands.integrate.cpp (renamed from toolsrc/src/commands_integrate.cpp)131
-rw-r--r--toolsrc/src/vcpkg/commands.list.cpp (renamed from toolsrc/src/commands_list.cpp)17
-rw-r--r--toolsrc/src/vcpkg/commands.owns.cpp (renamed from toolsrc/src/commands_owns.cpp)13
-rw-r--r--toolsrc/src/vcpkg/commands.portsdiff.cpp (renamed from toolsrc/src/commands_portsdiff.cpp)82
-rw-r--r--toolsrc/src/vcpkg/commands.search.cpp (renamed from toolsrc/src/commands_search.cpp)40
-rw-r--r--toolsrc/src/vcpkg/commands.version.cpp76
-rw-r--r--toolsrc/src/vcpkg/dependencies.cpp (renamed from toolsrc/src/vcpkg_Dependencies.cpp)50
-rw-r--r--toolsrc/src/vcpkg/export.cpp (renamed from toolsrc/src/commands_export.cpp)380
-rw-r--r--toolsrc/src/vcpkg/globalstate.cpp13
-rw-r--r--toolsrc/src/vcpkg/help.cpp (renamed from toolsrc/src/commands_help.cpp)14
-rw-r--r--toolsrc/src/vcpkg/input.cpp (renamed from toolsrc/src/vcpkg_Input.cpp)15
-rw-r--r--toolsrc/src/vcpkg/install.cpp (renamed from toolsrc/src/commands_install.cpp)246
-rw-r--r--toolsrc/src/vcpkg/metrics.cpp (renamed from toolsrc/src/metrics.cpp)198
-rw-r--r--toolsrc/src/vcpkg/packagespec.cpp (renamed from toolsrc/src/PackageSpec.cpp)10
-rw-r--r--toolsrc/src/vcpkg/packagespecparseresult.cpp (renamed from toolsrc/src/PackageSpecParseResult.cpp)5
-rw-r--r--toolsrc/src/vcpkg/paragraphparseresult.cpp (renamed from toolsrc/src/ParagraphParseResult.cpp)4
-rw-r--r--toolsrc/src/vcpkg/paragraphs.cpp (renamed from toolsrc/src/Paragraphs.cpp)28
-rw-r--r--toolsrc/src/vcpkg/parse.cpp (renamed from toolsrc/src/vcpkg_Parse.cpp)15
-rw-r--r--toolsrc/src/vcpkg/postbuildlint.buildtype.cpp (renamed from toolsrc/src/PostBuildLint_BuildType.cpp)4
-rw-r--r--toolsrc/src/vcpkg/postbuildlint.cpp (renamed from toolsrc/src/PostBuildLint.cpp)86
-rw-r--r--toolsrc/src/vcpkg/remove.cpp (renamed from toolsrc/src/commands_remove.cpp)152
-rw-r--r--toolsrc/src/vcpkg/sourceparagraph.cpp (renamed from toolsrc/src/SourceParagraph.cpp)85
-rw-r--r--toolsrc/src/vcpkg/statusparagraph.cpp (renamed from toolsrc/src/StatusParagraph.cpp)6
-rw-r--r--toolsrc/src/vcpkg/statusparagraphs.cpp (renamed from toolsrc/src/StatusParagraphs.cpp)7
-rw-r--r--toolsrc/src/vcpkg/triplet.cpp (renamed from toolsrc/src/triplet.cpp)24
-rw-r--r--toolsrc/src/vcpkg/update.cpp (renamed from toolsrc/src/commands_update.cpp)40
-rw-r--r--toolsrc/src/vcpkg/vcpkgcmdarguments.cpp (renamed from toolsrc/src/VcpkgCmdArguments.cpp)31
-rw-r--r--toolsrc/src/vcpkg/vcpkglib.cpp (renamed from toolsrc/src/vcpkglib.cpp)38
-rw-r--r--toolsrc/src/vcpkg/vcpkgpaths.cpp528
-rw-r--r--toolsrc/src/vcpkg/versiont.cpp (renamed from toolsrc/src/VersionT.cpp)4
-rw-r--r--toolsrc/src/vcpkg_Build_BuildPolicy.cpp40
-rw-r--r--toolsrc/src/vcpkg_GlobalState.cpp13
-rw-r--r--toolsrc/src/vcpkgmetricsuploader.cpp (renamed from toolsrc/src/vcpkg_metrics_uploader.cpp)8
-rw-r--r--toolsrc/vcpkglib/vcpkglib.vcxproj194
-rw-r--r--toolsrc/vcpkglib/vcpkglib.vcxproj.filters408
-rw-r--r--toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj2
-rw-r--r--toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj.filters2
-rw-r--r--toolsrc/vcpkgtest/vcpkgtest.vcxproj10
-rw-r--r--toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters10
-rw-r--r--triplets/arm64-uwp.cmake6
694 files changed, 14802 insertions, 4490 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f591f4bae..5a2b0e336 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,176 @@
+vcpkg (0.0.91)
+--------------
+ * Add ports:
+ - abseil 2017-09-28
+ - enet 1.3.13
+ - exiv2 4f4add2cdcbe73af7098122a509dff0739d15908
+ - freexl 1.0.4
+ - gts 0.7.6
+ - kinectsdk2 2.0
+ - libexif 0.6.21-1
+ - libfreenect2 0.2.0
+ - librtmp 2.3
+ - libspatialite 4.3.0a
+ - libxmp-lite 4.4.1
+ - proj4 4.9.3-1
+ - readosm 1.1.0
+ - spirit-po 1.1.2
+ - telnetpp 1.2.4
+ - wildmidi 0.4.1
+ * Update ports:
+ - anax 2.1.0-2 -> 2.1.0-3
+ - aws-sdk-cpp 1.0.61-1 -> 1.2.4
+ - geos 3.5.0-1 -> 3.6.2-2
+ - kinectsdk1 1.8-1 -> 1.8-2
+ - lua 5.3.4-1 -> 5.3.4-2
+ - openni2 2.2.0.33 -> 2.2.0.33-2
+ - openssl 1.0.2l-2 -> 1.0.2l-3
+ - pangolin 0.5-1 -> 0.5-2
+ - proj 4.9.3-1 -> 0
+ - sdl2 2.0.5-4 -> 2.0.6-1
+ - zlib 1.2.11-2 -> 1.2.11-3
+ * `vcpkg export`: Add new option `--ifw` which creates a standalone GUI installer for the exported packages. More information and screenshots [here](https://github.com/Microsoft/vcpkg/pull/1734)
+ * Complete rework of Visual Studio detection & selection:
+ - Use [`vswhere.exe`](https://github.com/Microsoft/vswhere) to detect Visual Studio installation instances
+ - Add the ability to specify the Visual Studio instance to use in the triplet file with the `VCPKG_VISUAL_STUDIO_PATH` variable
+ - Automatic selection now picks instances in order: stable, prerelease, legacy. Within each group, newer versions are preferred over old versions
+ - Fix issue where v140 toolset would not work if VS2017 (with v140) was installed but VS2015 was not installed
+ * Add message when downloading a `vcpkg` dependency (e.g. `cmake`)
+
+-- vcpkg team <vcpkg@microsoft.com> THU, 05 Oct 2017 19:00:00 -0800
+
+
+vcpkg (0.0.90)
+--------------
+ * Add ports:
+ - caffe2 0.8.1
+ - date 2.2
+ - jsonnet 2017-09-02-11cf9fa9f2fe8acbb14b096316006082564ca580
+ - kf5plotting 5.37.0
+ - units 2.3.0
+ - winpcap 4.1.3-1
+ * Update ports:
+ - arrow apache-arrow-0.4.0-2 -> 0.6.0
+ - benchmark 1.1.0-1 -> 1.2.0
+ - cppwinrt feb2017_refresh-14393 -> spring_2017_creators_update_for_vs_15.3
+ - llvm 4.0.0-1 -> 5.0.0-1
+ - luafilesystem 1.6.3-1 -> 1.7.0.2
+ - opencv 3.2.0-4 -> 3.3.0-4
+ - paho-mqtt 1.2.0-1 -> 1.2.0-2
+ - protobuf 3.4.0-2 -> 3.4.1-1
+ - qt5 5.8-5 -> 5.8-6
+ - sfml 2.4.2-1 -> 2.4.2-2
+ - xlnt 0.9.4-1 -> 1.1.0-1
+ - zlib 1.2.11-1 -> 1.2.11-2
+ * Bump required version & auto-downloaded version of `cmake` to 3.9.3 (was 3.9.1). Noteable changes:
+ - Fix codepage issues
+ - FindBoost: Add support for Boost 1.65.0 and 1.65.1
+ * `vcpkg edit`: Fix inspected locations for VSCode
+
+-- vcpkg team <vcpkg@microsoft.com> SUN, 24 Sep 2017 03:30:00 -0800
+
+
+vcpkg (0.0.89)
+--------------
+ * Update ports:
+ - boost 1.65-1 -> 1.65.1
+ - chmlib 0.40 -> 0.40-1
+ - pybind11 2.1.0-2 -> 2.2.0
+ - sciter 4.0.2-1 -> 4.0.3
+ - sqlite3 3.19.1-2 -> 3.20.1
+ * `vcpkg` now warns if the built version of the `vcpkg.exe` itself is outdated
+ * Update to latest python 3.5
+ * `vcpkg install` improvements:
+ - Add `--keep-going` option to keep going if a package fails to install
+ - Add elapsed time to each invidial package as well as total time
+ - Add a counter to the install (e.g. Starting package 3/12: <name>)
+ * `vcpkg edit` now checks more location for VSCode Insiders
+
+-- vcpkg team <vcpkg@microsoft.com> WED, 14 Sep 2017 16:00:00 -0800
+
+
+vcpkg (0.0.88)
+--------------
+ * `vcpkg_configure_cmake` has been modified to embed debug symbols within static libraries (using the /Z7 option). Most of the libraries in `vcpkg` had their versions bumped due to this.
+ * `vcpkg_configure_meson` has been modified in the same manner.
+
+-- vcpkg team <vcpkg@microsoft.com> SAT, 09 Sep 2017 00:30:00 -0800
+
+
+vcpkg (0.0.87)
+--------------
+ * Add ports:
+ - console-bridge 0.3.2-1
+ - leptonica 1.74.4
+ - tesseract 3.05.01
+ - urdfdom 1.0.0-1
+ - urdfdom-headers 1.0.0-1
+ * Update ports:
+ - ace 6.4.4 -> 6.4.5
+ - c-ares 1.12.1-dev-40eb41f-1 -> 1.13.0
+ - glslang 1c573fbcfba6b3d631008b1babc838501ca925d3-2 -> 3a21c880500eac21cdf79bef5b80f970a55ac6af
+ - grpc 1.4.1 -> 1.6.0
+ - libuv 1.14.0 -> 1.14.1
+ - meschach -> 1.2b
+ - openblas v0.2.20 -> v0.2.20-1
+ - openssl 1.0.2l-1 -> 1.0.2l-2
+ - protobuf 3.3.0-3 -> 3.4.0-1
+ - qt5 5.8-4 -> 5.8-5
+ - shaderc 2df47b51d83ad83cbc2e7f8ff2b56776293e8958-1 -> 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da
+ - spirv-tools 1.1-f72189c249ba143c6a89a4cf1e7d53337b2ddd40 -> v2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23
+ - xxhash 0.6.2 -> 0.6.3
+ - zeromq 4.2.2 -> 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2
+ * Add new function `vcpkg_from_bitbucket` which the Bitbucket equivalent of `vcpkg_from_github`
+
+-- vcpkg team <vcpkg@microsoft.com> FRI, 08 Sep 2017 22:00:00 -0800
+
+
+vcpkg (0.0.86)
+--------------
+ * Add ports:
+ - bigint 2010.04.30
+ - butteraugli 2017-09-02-8c60a2aefa19adb
+ - ccd 2.0.0-1 (Renamed from libccd)
+ - fadbad 2.1.0
+ - fcl 0.5.0-1
+ - guetzli 2017-09-02-cb5e4a86f69628
+ - gumbo 0.10.1
+ - libmicrohttpd 0.9.55
+ - libstemmer 2017-9-02
+ - libunibreak 4.0
+ - lodepng 2017-09-01-8a0f16afe74a6a
+ - meschach
+ - nlopt 2.4.2-c43afa08d~vcpkg1
+ - picosha2 2017-09-01-c5ff159b6
+ - piex 2017-09-01-473434f2dd974978b
+ - pthreads 2.9.1
+ - tinythread 1.1
+ - tinyxml 2.6.2-1
+ * Removed ports:
+ - libccd 2.0.0 (Renamed to ccd)
+ * Update ports:
+ - ace 6.4.3 -> 6.4.4
+ - boost 1.65 -> 1.65-1
+ - cairo 1.15.6 -> 1.15.8
+ - gdk-pixbuf 2.36.6 -> 2.36.9
+ - glib 2.52.2 -> 2.52.3
+ - gtk 3.22.15 -> 3.22.19
+ - jxrlib 1.1-2 -> 1.1-3
+ - paho-mqtt Version 1.1.0 (Paho 1.2) -> 1.2.0
+ - pango 1.40.6 -> 1.40.11
+ - shaderc 2df47b51d83ad83cbc2e7f8ff2b56776293e8958 -> 2df47b51d83ad83cbc2e7f8ff2b56776293e8958-1
+ * Fix warnings in bootstrap-vcpkg.ps1
+ * Fix codepage related issues with ninja/cmake
+ * Improve handling for non-ascii environments
+ * Configurations names are now more tolerant:
+ - If a configuration name is prefixed with "Release", then it is compatible with "Release"
+ - If a configuration name is prefixed with "Debug", then it is compatible with "Debug"
+ * `vcpkg edit`: Improve detection of VSCode and add better messages when no path is found
+ * Fixes and improvements in the `vcpkg` tool itself
+
+-- vcpkg team <vcpkg@microsoft.com> MON, 04 Sep 2017 02:00:00 -0800
+
+
vcpkg (0.0.85)
--------------
* Add ports:
diff --git a/docs/about/faq.md b/docs/about/faq.md
index 8234216e0..88f88bad0 100644
--- a/docs/about/faq.md
+++ b/docs/about/faq.md
@@ -50,7 +50,9 @@ By saving the changes to the portfile (and checking them in), you'll get the sam
Yes. While Vcpkg will only produce the standard "Release" and "Debug" configurations when building a library, you can get integration support for your projects' custom configurations, in addition to your project's standard configurations.
-The MSBuild $(VcpkgConfiguration) macro, if not set in your project, will identify either the "Release" or the "Debug" configuration. You only need to override this macro in your project file (.vcxproj) to declare the compatibility between your configuration, and the target standard configuration.
+First of all, Vcpkg will automatically assume any custom configuration starting with "Release" (resp. "Debug") as a configuration that is compatible with the standard "Release" (resp. "Debug") configuration and will act accordingly.
+
+For other configurations, you only need to override the MSBuild `$(VcpkgConfiguration)` macro in your project file (.vcxproj) to declare the compatibility between your configuration, and the target standard configuration.
For example, you can add support for your "MyRelease" configuration by adding in your project file:
```
diff --git a/docs/maintainers/control-files.md b/docs/maintainers/control-files.md
index e446fe6fa..17cb50311 100644
--- a/docs/maintainers/control-files.md
+++ b/docs/maintainers/control-files.md
@@ -42,10 +42,10 @@ Unlike dpkg, Vcpkg does not distinguish between build-only dependencies and runt
*For example: websocketpp is a header only library, and thus does not require any dependencies at install time. However, downstream users need boost and openssl to make use of the library. Therefore, websocketpp lists boost and openssl as dependencies*
-Dependencies can be filtered based on the target triplet to support different requirements on Windows Desktop versus the Universal Windows Platform. Currently, the string inside brackets is substring-compared against the triplet name. __This will change in a future version to not depend on the triplet name.__
+Dependencies can be filtered based on the target triplet to support different requirements on Windows Desktop versus the Universal Windows Platform. Currently, the string inside parentheses is substring-compared against the triplet name. __This will change in a future version to not depend on the triplet name.__
Example:
```no-highlight
-Build-Depends: zlib [windows], openssl [windows], boost [windows], websocketpp [windows]
+Build-Depends: zlib (windows), openssl (windows), boost (windows), websocketpp (windows)
```
diff --git a/docs/maintainers/portfile-functions.md b/docs/maintainers/portfile-functions.md
index 705d65b7e..e16147f7d 100644
--- a/docs/maintainers/portfile-functions.md
+++ b/docs/maintainers/portfile-functions.md
@@ -3,6 +3,7 @@
# Portfile helper functions
- [vcpkg\_acquire\_msys](vcpkg_acquire_msys.md)
- [vcpkg\_apply\_patches](vcpkg_apply_patches.md)
+- [vcpkg\_build\_cmake](vcpkg_build_cmake.md)
- [vcpkg\_build\_msbuild](vcpkg_build_msbuild.md)
- [vcpkg\_configure\_cmake](vcpkg_configure_cmake.md)
- [vcpkg\_copy\_pdbs](vcpkg_copy_pdbs.md)
@@ -11,5 +12,6 @@
- [vcpkg\_execute\_required\_process](vcpkg_execute_required_process.md)
- [vcpkg\_extract\_source\_archive](vcpkg_extract_source_archive.md)
- [vcpkg\_find\_acquire\_program](vcpkg_find_acquire_program.md)
+- [vcpkg\_from\_bitbucket](vcpkg_from_bitbucket.md)
- [vcpkg\_from\_github](vcpkg_from_github.md)
- [vcpkg\_install\_cmake](vcpkg_install_cmake.md)
diff --git a/docs/maintainers/vcpkg_acquire_msys.md b/docs/maintainers/vcpkg_acquire_msys.md
index 46cda81fd..53aa6532e 100644
--- a/docs/maintainers/vcpkg_acquire_msys.md
+++ b/docs/maintainers/vcpkg_acquire_msys.md
@@ -32,7 +32,7 @@ message(STATUS "Installing MSYS Packages")
vcpkg_execute_required_process(
COMMAND
${BASH} --noprofile --norc -c
- "pacman -Sy --noconfirm --needed make"
+ 'PATH=/usr/bin:\$PATH pacman -Sy --noconfirm --needed make'
WORKING_DIRECTORY ${MSYS_ROOT}
LOGNAME pacman-${TARGET_TRIPLET})
```
diff --git a/docs/maintainers/vcpkg_build_cmake.md b/docs/maintainers/vcpkg_build_cmake.md
new file mode 100644
index 000000000..ddfa46f6b
--- /dev/null
+++ b/docs/maintainers/vcpkg_build_cmake.md
@@ -0,0 +1,31 @@
+# vcpkg_build_cmake
+
+Build a cmake project.
+
+## Usage:
+```cmake
+vcpkg_build_cmake([DISABLE_PARALLEL] [TARGET <target>])
+```
+
+## Parameters:
+### DISABLE_PARALLEL
+The underlying buildsystem will be instructed to not parallelize
+
+### TARGET
+The target passed to the cmake build command (`cmake --build . --target <target>`). If not specified, no target will
+be passed.
+
+## Notes:
+This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md).
+You can use the alias [`vcpkg_install_cmake()`](vcpkg_configure_cmake.md) function if your CMake script supports the
+"install" target
+
+## Examples:
+
+* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake)
+* [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake)
+* [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake)
+* [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake)
+
+## Source
+[scripts/cmake/vcpkg_build_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_cmake.cmake)
diff --git a/docs/maintainers/vcpkg_find_acquire_program.md b/docs/maintainers/vcpkg_find_acquire_program.md
index bc50ef4c8..8107c8dd2 100644
--- a/docs/maintainers/vcpkg_find_acquire_program.md
+++ b/docs/maintainers/vcpkg_find_acquire_program.md
@@ -16,6 +16,7 @@ The current list of programs includes:
- 7Z
- BISON
- FLEX
+- GASPREPROCESSOR
- PERL
- PYTHON2
- PYTHON3
@@ -24,7 +25,6 @@ The current list of programs includes:
- NASM
- NINJA
- YASM
-- GASPREPROCESSOR
Note that msys2 has a dedicated helper function: [`vcpkg_acquire_msys`](vcpkg_acquire_msys.md).
diff --git a/docs/maintainers/vcpkg_from_bitbucket.md b/docs/maintainers/vcpkg_from_bitbucket.md
new file mode 100644
index 000000000..c8850b725
--- /dev/null
+++ b/docs/maintainers/vcpkg_from_bitbucket.md
@@ -0,0 +1,53 @@
+# vcpkg_from_bitbucket
+
+Download and extract a project from Bitbucket.
+Enables support for installing HEAD `vcpkg.exe install --head <port>`.
+
+## Usage:
+```cmake
+vcpkg_from_bitbucket(
+ OUT_SOURCE_PATH <SOURCE_PATH>
+ REPO <Microsoft/cpprestsdk>
+ [REF <v2.0.0>]
+ [SHA512 <45d0d7f8cc350...>]
+ [HEAD_REF <master>]
+)
+```
+
+## Parameters:
+### OUT_SOURCE_PATH
+Specifies the out-variable that will contain the extracted location.
+
+This should be set to `SOURCE_PATH` by convention.
+
+### REPO
+The organization or user and repository on GitHub.
+
+### REF
+A stable git commit-ish (ideally a tag) that will not change contents. **This should not be a branch.**
+
+For repositories without official releases, this can be set to the full commit id of the current latest master.
+
+If `REF` is specified, `SHA512` must also be specified.
+
+### SHA512
+The SHA512 hash that should match the archive (https://bitbucket.com/${REPO}/get/${REF}.tar.gz).
+
+This is most easily determined by first setting it to `1`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile.
+
+### HEAD_REF
+The unstable git commit-ish (ideally a branch) to pull for `--head` builds.
+
+For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms.
+
+## Notes:
+At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present.
+
+This exports the `VCPKG_HEAD_VERSION` variable during head builds.
+
+## Examples:
+
+* [blaze](https://github.com/Microsoft/vcpkg/blob/master/ports/blaze/portfile.cmake)
+
+## Source
+[scripts/cmake/vcpkg_from_bitbucket.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_bitbucket.cmake)
diff --git a/docs/maintainers/vcpkg_from_github.md b/docs/maintainers/vcpkg_from_github.md
index cb7849fcc..cf50dc445 100644
--- a/docs/maintainers/vcpkg_from_github.md
+++ b/docs/maintainers/vcpkg_from_github.md
@@ -23,7 +23,9 @@ This should be set to `SOURCE_PATH` by convention.
The organization or user and repository on GitHub.
### REF
-A stable git commit-ish (ideally a tag) that will not change contents.
+A stable git commit-ish (ideally a tag) that will not change contents. **This should not be a branch.**
+
+For repositories without official releases, this can be set to the full commit id of the current latest master.
If `REF` is specified, `SHA512` must also be specified.
@@ -38,7 +40,7 @@ The unstable git commit-ish (ideally a branch) to pull for `--head` builds.
For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms.
## Notes:
-At least one of `REF` and `HEAD_REF` must be specified.
+At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present.
This exports the `VCPKG_HEAD_VERSION` variable during head builds.
diff --git a/docs/maintainers/vcpkg_install_cmake.md b/docs/maintainers/vcpkg_install_cmake.md
index e199d1292..1b132b4f1 100644
--- a/docs/maintainers/vcpkg_install_cmake.md
+++ b/docs/maintainers/vcpkg_install_cmake.md
@@ -4,15 +4,15 @@ Build and install a cmake project.
## Usage:
```cmake
-vcpkg_install_cmake([MSVC_64_TOOLSET])
+vcpkg_install_cmake(...)
```
## Parameters:
-### MSVC_64_TOOLSET
-This adds the `/p:PreferredToolArchitecture=x64` switch if the underlying buildsystem is MSBuild. Some large projects can run out of memory when linking if they use the 32-bit hosted tools.
+See [`vcpkg_build_cmake()`](vcpkg_build_cmake.md).
## Notes:
-This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md).
+This command transparently forwards to [`vcpkg_build_cmake()`](vcpkg_build_cmake.md), adding a `TARGET install`
+parameter.
## Examples:
diff --git a/ports/abseil/CMakeLists.txt b/ports/abseil/CMakeLists.txt
new file mode 100644
index 000000000..4a96b3fde
--- /dev/null
+++ b/ports/abseil/CMakeLists.txt
@@ -0,0 +1,93 @@
+cmake_minimum_required(VERSION 3.8)
+project(abseil CXX)
+
+add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN)
+
+set(CMAKE_DEBUG_POSTFIX d)
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
+if(CMAKE_BUILD_TYPE STREQUAL "Release")
+ option(INSTALL_HEADERS "Install header files" ON)
+else()
+ option(INSTALL_HEADERS "Install header files" OFF)
+endif()
+
+function(add_sublibrary LIB)
+ file(GLOB_RECURSE SOURCES "absl/${LIB}/*.cc")
+ list(FILTER SOURCES EXCLUDE REGEX "_test(_.+)?.cc$|_nonprod.cc$")
+ file(GLOB HEADERS "absl/${LIB}/*.h")
+ file(GLOB INTERNAL_HEADERS "absl/${LIB}/internal/*.h")
+
+ if(SOURCES)
+ if("STATIC" IN_LIST ARGN)
+ add_library(${LIB} STATIC ${SOURCES})
+ else()
+ add_library(${LIB} ${SOURCES})
+ endif()
+ set_target_properties(${LIB} PROPERTIES OUTPUT_NAME "absl_${LIB}")
+ target_include_directories(${LIB} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include>)
+ else()
+ add_library(${LIB} INTERFACE)
+ target_include_directories(${LIB} INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include>)
+ endif()
+
+
+ install(TARGETS ${LIB} EXPORT unofficial-abseil-targets
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ )
+
+ if(INSTALL_HEADERS)
+ if(HEADERS)
+ install(FILES ${HEADERS} DESTINATION "include/absl/${LIB}")
+ endif()
+ if(INTERNAL_HEADERS)
+ install(FILES ${INTERNAL_HEADERS} DESTINATION "include/absl/${LIB}/internal")
+ endif()
+ endif()
+endfunction()
+
+function(target_link_public_libraries A)
+ get_target_property(A_TYPE ${A} TYPE)
+ if(A_TYPE STREQUAL INTERFACE_LIBRARY)
+ target_link_libraries(${A} INTERFACE ${ARGN})
+ else()
+ target_link_libraries(${A} PUBLIC ${ARGN})
+ endif()
+endfunction()
+
+add_sublibrary(algorithm)
+add_sublibrary(base)
+add_sublibrary(container)
+add_sublibrary(debugging)
+add_sublibrary(memory)
+add_sublibrary(meta)
+add_sublibrary(numeric)
+add_sublibrary(strings)
+add_sublibrary(synchronization STATIC)
+# Time must be static because there are global variables intended for export
+add_sublibrary(time STATIC)
+add_sublibrary(types)
+add_sublibrary(utility)
+
+target_link_public_libraries(algorithm base meta)
+target_link_public_libraries(container algorithm base memory)
+target_link_public_libraries(memory meta)
+target_link_public_libraries(meta base)
+target_link_public_libraries(numeric base)
+target_link_public_libraries(strings base memory meta numeric)
+target_link_public_libraries(types base utility meta algorithm strings)
+target_link_public_libraries(utility base meta)
+target_link_public_libraries(time base numeric)
+target_link_public_libraries(synchronization base time)
+
+find_package(unofficial-cctz REQUIRED)
+targeT_link_libraries(time PUBLIC unofficial::cctz)
+
+install(
+ EXPORT unofficial-abseil-targets
+ FILE unofficial-abseil-config.cmake
+ NAMESPACE unofficial::abseil::
+ DESTINATION share/unofficial-abseil
+) \ No newline at end of file
diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL
new file mode 100644
index 000000000..44684b6b8
--- /dev/null
+++ b/ports/abseil/CONTROL
@@ -0,0 +1,7 @@
+Source: abseil
+Version: 2017-10-14
+Description: an open-source collection designed to augment the C++ standard library.
+ Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.
+ In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.
+ Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole.
+Build-Depends: cctz
diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake
new file mode 100644
index 000000000..d74369951
--- /dev/null
+++ b/ports/abseil/portfile.cmake
@@ -0,0 +1,32 @@
+include(vcpkg_common_functions)
+
+if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ message(FATAL_ERROR "Abseil currently only supports being built for desktop")
+endif()
+
+message("NOTE: THIS PORT IS USING AN UNOFFICIAL BUILDSYSTEM. THE BINARY LAYOUT AND CMAKE INTEGRATION WILL CHANGE IN THE FUTURE.")
+message("To use from cmake:\n find_package(unofficial-abseil REQUIRED)\n link_libraries(unofficial::abseil::strings)")
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO abseil/abseil-cpp
+ REF 1a9ba5e2e5a14413704f0c913fac53359576d3b6
+ SHA512 756e494c30324c937ca655d91afdee9acb923c7ee837a7c685441305bea2d54a75b3b21be7355abe416660984ba51ace9d234d70168fb029c601b7442397e8ff
+ HEAD_REF master
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-abseil)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/abseil ${CURRENT_PACKAGES_DIR}/share/unofficial-abseil)
+
+vcpkg_copy_pdbs()
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/abseil RENAME copyright)
diff --git a/ports/ace/CONTROL b/ports/ace/CONTROL
index 7a620f3c6..80af89d8a 100644
--- a/ports/ace/CONTROL
+++ b/ports/ace/CONTROL
@@ -1,3 +1,3 @@
Source: ace
-Version: 6.4.3
+Version: 6.4.5
Description: The ADAPTIVE Communication Environment
diff --git a/ports/ace/portfile.cmake b/ports/ace/portfile.cmake
index 6763cc370..fece3ebcc 100644
--- a/ports/ace/portfile.cmake
+++ b/ports/ace/portfile.cmake
@@ -5,9 +5,9 @@ endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ACE_wrappers/ace)
vcpkg_download_distfile(ARCHIVE
- URLS "http://download.dre.vanderbilt.edu/previous_versions/ACE-6.4.4.zip"
- FILENAME "ACE-6.4.4.zip"
- SHA512 82628a73b736a14b3ee33fb859e26370ffd7df88bda4890fe490736160d3ce393f7e61183cd8cd7a91a83bc31c4bd263aa887168543f9f89fde080dc3650a4ed
+ URLS "http://download.dre.vanderbilt.edu/previous_versions/ACE-6.4.5.zip"
+ FILENAME "ACE-6.4.5.zip"
+ SHA512 cce1681fc35efdefb8b88a49b743ffcaecfe8f146dcf6c78393aed29c8853e77b062bced4a2fb457eba74bf5834511611cc40da2320c6094793cb8c2b6df3d2a
)
vcpkg_extract_source_archive(${ARCHIVE})
diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL
index c12a59217..b9d6ed50d 100644
--- a/ports/alembic/CONTROL
+++ b/ports/alembic/CONTROL
@@ -1,4 +1,4 @@
Source: alembic
-Version: 1.7.1-3
+Version: 1.7.1-4
Build-Depends: ilmbase, hdf5
Description: Alembic is an open framework for storing and sharing scene data that includes a C++ library, a file format, and client plugins and applications. http://alembic.io/
diff --git a/ports/allegro5/CONTROL b/ports/allegro5/CONTROL
index 4bb51ae4e..8f078909a 100644
--- a/ports/allegro5/CONTROL
+++ b/ports/allegro5/CONTROL
@@ -1,4 +1,4 @@
Source: allegro5
-Version: 5.2.2.0
+Version: 5.2.2.0-1
Description: Allegro is a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform. However, Allegro is not a game engine: you are free to design and structure your program as you like.
-Build-Depends: opengl, zlib, freetype, libogg, libvorbis, libflac, openal-soft, libpng, bzip2, physfs, libtheora, opus, opusfile \ No newline at end of file
+Build-Depends: opengl, zlib, freetype, libogg, libvorbis, libflac, openal-soft, libpng, bzip2, physfs, libtheora, opus, opusfile
diff --git a/ports/anax/CONTROL b/ports/anax/CONTROL
index ce3da2f57..12be38d11 100644
--- a/ports/anax/CONTROL
+++ b/ports/anax/CONTROL
@@ -1,3 +1,3 @@
Source: anax
-Version: 2.1.0-1
+Version: 2.1.0-3
Description: An open source C++ entity system. <https://github.com/miguelmartin75/anax>
diff --git a/ports/anax/portfile.cmake b/ports/anax/portfile.cmake
index ef14f7264..8881957fc 100644
--- a/ports/anax/portfile.cmake
+++ b/ports/anax/portfile.cmake
@@ -8,13 +8,13 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/anax-2.1.0)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/miguelmartin75/anax/archive/v2.1.0.zip"
- FILENAME "anax-2.1.0.zip"
- SHA512 89f2df64add676ab48a19953b95d8eae1da9c8c5f3c0f6bc757a3bc99af6e4360c56c12d27d12c672ccd754b1f53a5e271533b381641f20e8cf3ca8ddda6cd1a
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO miguelmartin75/anax
+ REF v2.1.0
+ SHA512 b573733b5f9634bf8cfc5b0715074f9a8ee29ecb48dc981d9371254a1f6ff8afbbb9ba6aa0877d53e518e5486ecc398a6d331fb9b5dbfd17d8707679216e11a3
+ HEAD_REF master
)
-vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
@@ -23,8 +23,8 @@ vcpkg_apply_patches(
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
- OPTIONS
- -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
+ OPTIONS
+ -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
)
vcpkg_install_cmake()
@@ -34,3 +34,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/anax)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/anax/LICENSE ${CURRENT_PACKAGES_DIR}/share/anax/copyright)
+
+vcpkg_copy_pdbs() \ No newline at end of file
diff --git a/ports/angle/CONTROL b/ports/angle/CONTROL
index a7e261bb1..38f8c7c60 100644
--- a/ports/angle/CONTROL
+++ b/ports/angle/CONTROL
@@ -1,4 +1,4 @@
Source: angle
-Version: 2017-06-14-8d471f-1
+Version: 2017-06-14-8d471f-2
Description: A conformant OpenGL ES implementation for Windows, Mac and Linux.
The goal of ANGLE is to allow users of multiple operating systems to seamlessly run WebGL and other OpenGL ES content by translating OpenGL ES API calls to one of the hardware-supported APIs available for that platform. ANGLE currently provides translation from OpenGL ES 2.0 and 3.0 to desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Support for translation from OpenGL ES to Vulkan is underway, and future plans include compute shader support (ES 3.1) and MacOS support.
diff --git a/ports/angle/portfile.cmake b/ports/angle/portfile.cmake
index aebf528dd..ab7ebd828 100644
--- a/ports/angle/portfile.cmake
+++ b/ports/angle/portfile.cmake
@@ -13,7 +13,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/angle
REF 8d471f907d8d4ec1d46bc9366493bd76c11c1870
- SHA512 b9235d2a98330bc8533c3fe871129e7235c680420eac16610eae4ca7224c5284313ab6377f30ddfb8a2da39b69f3ef0d16023fe1e7cec3fc2198f4eb4bdccb26
+ SHA512 b4670caeeaa5d662bc82702eb5f620123812ea6b5d82f57a65df54ae25cdaa5c9ff0fdb592448b07569d9c09af3d3c51b0b2f135c5800d1845b425009656bf18
HEAD_REF master
)
vcpkg_apply_patches(
diff --git a/ports/antlr4/portfile.cmake b/ports/antlr4/portfile.cmake
index 78266b6eb..868efcdbe 100644
--- a/ports/antlr4/portfile.cmake
+++ b/ports/antlr4/portfile.cmake
@@ -24,7 +24,7 @@ vcpkg_apply_patches(
${CMAKE_CURRENT_LIST_DIR}/Fix-building-in-Visual-Studio-2017.patch
)
-if (${VCPKG_LIBRARY_LINKAGE} STREQUAL static)
+if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
set(DEBUG_CONFIG "Debug Static")
set(RELEASE_CONFIG "Release Static")
else()
@@ -53,7 +53,7 @@ file(COPY ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${DEBUG_CONFIG
file(COPY ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${RELEASE_CONFIG}/antlr4-runtime.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
-if (${VCPKG_LIBRARY_LINKAGE} STREQUAL static)
+if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
vcpkg_apply_patches(
SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
PATCHES ${CMAKE_CURRENT_LIST_DIR}/static.patch
diff --git a/ports/apr-util/CONTROL b/ports/apr-util/CONTROL
index e61eb3653..81814a2ca 100644
--- a/ports/apr-util/CONTROL
+++ b/ports/apr-util/CONTROL
@@ -1,4 +1,4 @@
Source: apr-util
-Version: 1.6.0
+Version: 1.6.0-1
Description: Apache Portable Runtime (APR) project mission is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementation
Build-Depends: expat, apr, openssl
diff --git a/ports/apr/CONTROL b/ports/apr/CONTROL
index ac1b7d5c3..94581eab0 100644
--- a/ports/apr/CONTROL
+++ b/ports/apr/CONTROL
@@ -1,3 +1,3 @@
Source: apr
-Version: 1.6.2
+Version: 1.6.2-1
Description: The Apache Portable Runtime (APR) is a C library that forms a system portability layer that covers many operating systems.
diff --git a/ports/arrow/CONTROL b/ports/arrow/CONTROL
index 717360d12..78cbf2a18 100644
--- a/ports/arrow/CONTROL
+++ b/ports/arrow/CONTROL
@@ -1,4 +1,4 @@
Source: arrow
-Version: apache-arrow-0.4.0-1
-Build-Depends: boost
+Version: 0.6.0
+Build-Depends: boost, flatbuffers, rapidjson, zlib, lz4, brotli, zstd, snappy, gflags
Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations.
diff --git a/ports/arrow/all.patch b/ports/arrow/all.patch
new file mode 100644
index 000000000..6e0d175c3
--- /dev/null
+++ b/ports/arrow/all.patch
@@ -0,0 +1,130 @@
+diff --git a/cmake_modules/FindBrotli.cmake b/cmake_modules/FindBrotli.cmake
+index f2e714c..2e475dc 100644
+--- a/cmake_modules/FindBrotli.cmake
++++ b/cmake_modules/FindBrotli.cmake
+@@ -65,16 +65,13 @@ if (BROTLI_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR BROTLI_LIBRARIES))
+ set(BROTLI_FOUND TRUE)
+ get_filename_component( BROTLI_LIBS ${BROTLI_LIBRARY_ENC} PATH )
+ set(BROTLI_LIB_NAME brotli)
+- if (MSVC AND NOT BROTLI_MSVC_STATIC_LIB_SUFFIX)
+- set(BROTLI_MSVC_STATIC_LIB_SUFFIX _static)
+- endif()
+ set(BROTLI_STATIC_LIB
+- ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc${BROTLI_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
+- ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}dec${BROTLI_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
+- ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}common${BROTLI_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
+- set(BROTLI_STATIC_LIBRARY_ENC ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc${BROTLI_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
+- set(BROTLI_STATIC_LIBRARY_DEC ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}dec${BROTLI_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
+- set(BROTLI_STATIC_LIBRARY_COMMON ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}common${BROTLI_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
++ ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc${CMAKE_STATIC_LIBRARY_SUFFIX}
++ ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}dec${CMAKE_STATIC_LIBRARY_SUFFIX}
++ ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}common${CMAKE_STATIC_LIBRARY_SUFFIX})
++ set(BROTLI_STATIC_LIBRARY_ENC ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc${CMAKE_STATIC_LIBRARY_SUFFIX})
++ set(BROTLI_STATIC_LIBRARY_DEC ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}dec${CMAKE_STATIC_LIBRARY_SUFFIX})
++ set(BROTLI_STATIC_LIBRARY_COMMON ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}common${CMAKE_STATIC_LIBRARY_SUFFIX})
+ set(BROTLI_SHARED_LIB
+ ${BROTLI_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc${CMAKE_SHARED_LIBRARY_SUFFIX}
+ ${BROTLI_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${BROTLI_LIB_NAME}dec${CMAKE_SHARED_LIBRARY_SUFFIX}
+diff --git a/cmake_modules/FindFlatbuffers.cmake b/cmake_modules/FindFlatbuffers.cmake
+index 804f479..ff9bde1 100644
+--- a/cmake_modules/FindFlatbuffers.cmake
++++ b/cmake_modules/FindFlatbuffers.cmake
+@@ -53,6 +53,7 @@ endif ()
+
+ find_program(FLATBUFFERS_COMPILER flatc
+ "${FLATBUFFERS_HOME}/bin"
++ "${FLATBUFFERS_HOME}/tools"
+ /usr/local/bin
+ /usr/bin
+ NO_DEFAULT_PATH
+diff --git a/cmake_modules/FindLz4.cmake b/cmake_modules/FindLz4.cmake
+index 07707cf..9cbf67d 100644
+--- a/cmake_modules/FindLz4.cmake
++++ b/cmake_modules/FindLz4.cmake
+@@ -29,15 +29,7 @@ elseif ( Lz4_HOME )
+ list( APPEND _lz4_roots ${Lz4_HOME} )
+ endif()
+
+-if (MSVC AND NOT LZ4_MSVC_STATIC_LIB_SUFFIX)
+- set(LZ4_MSVC_STATIC_LIB_SUFFIX "_static")
+-endif()
+-
+-set(LZ4_STATIC_LIB_SUFFIX
+- "${LZ4_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
+-
+-set(LZ4_STATIC_LIB_NAME
+- ${CMAKE_STATIC_LIBRARY_PREFIX}lz4${LZ4_STATIC_LIB_SUFFIX})
++set(LZ4_STATIC_LIB_NAME lz4)
+
+ find_path(LZ4_INCLUDE_DIR NAMES lz4.h
+ PATHS ${_lz4_roots}
+diff --git a/cmake_modules/FindSnappy.cmake b/cmake_modules/FindSnappy.cmake
+index 867963c..8a432db 100644
+--- a/cmake_modules/FindSnappy.cmake
++++ b/cmake_modules/FindSnappy.cmake
+@@ -55,7 +55,7 @@ if (SNAPPY_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR SNAPPY_LIBRARIES))
+ set(SNAPPY_HEADER_NAME snappy.h)
+ set(SNAPPY_HEADER ${SNAPPY_INCLUDE_DIR}/${SNAPPY_HEADER_NAME})
+ set(SNAPPY_LIB_NAME snappy)
+- set(SNAPPY_STATIC_LIB ${SNAPPY_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${SNAPPY_LIB_NAME}${SNAPPY_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
++ set(SNAPPY_STATIC_LIB ${SNAPPY_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${SNAPPY_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX})
+ set(SNAPPY_SHARED_LIB ${SNAPPY_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${SNAPPY_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
+ else ()
+ set(SNAPPY_FOUND FALSE)
+diff --git a/cmake_modules/FindZLIB.cmake b/cmake_modules/FindZLIB.cmake
+index 78b84f2..eb09001 100644
+--- a/cmake_modules/FindZLIB.cmake
++++ b/cmake_modules/FindZLIB.cmake
+@@ -62,11 +62,11 @@ if (ZLIB_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR ZLIB_LIBRARIES))
+ set(ZLIB_LIB_NAME z)
+ if (MSVC)
+ if (NOT ZLIB_MSVC_STATIC_LIB_SUFFIX)
+- set(ZLIB_MSVC_STATIC_LIB_SUFFIX libstatic)
++ set(ZLIB_MSVC_STATIC_LIB_SUFFIX lib)
+ endif()
+ set(ZLIB_MSVC_SHARED_LIB_SUFFIX lib)
+ endif()
+- set(ZLIB_STATIC_LIB ${ZLIB_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${ZLIB_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
++ set(ZLIB_STATIC_LIB ${ZLIB_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${ZLIB_MSVC_SHARED_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
+ set(ZLIB_SHARED_LIB ${ZLIB_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${ZLIB_MSVC_SHARED_LIB_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX})
+ else ()
+ set(ZLIB_FOUND FALSE)
+diff --git a/cmake_modules/FindZSTD.cmake b/cmake_modules/FindZSTD.cmake
+index 02a0c39..73c61b5 100644
+--- a/cmake_modules/FindZSTD.cmake
++++ b/cmake_modules/FindZSTD.cmake
+@@ -29,21 +29,11 @@ elseif ( ZStd_HOME )
+ list( APPEND _zstd_roots ${ZStd_HOME} )
+ endif()
+
+-if (MSVC AND NOT ZSTD_MSVC_STATIC_LIB_SUFFIX)
+- set(ZSTD_MSVC_STATIC_LIB_SUFFIX "_static")
+-endif()
+-
+-set(ZSTD_STATIC_LIB_SUFFIX
+- "${ZSTD_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
+-
+-set(ZSTD_STATIC_LIB_NAME
+- ${CMAKE_STATIC_LIBRARY_PREFIX}zstd${ZSTD_STATIC_LIB_SUFFIX})
+-
+ find_path(ZSTD_INCLUDE_DIR NAMES zstd.h
+ PATHS ${_zstd_roots}
+ NO_DEFAULT_PATH
+ PATH_SUFFIXES "include" )
+-find_library(ZSTD_STATIC_LIB NAMES ${ZSTD_STATIC_LIB_NAME} lib${ZSTD_STATIC_LIB_NAME}
++find_library(ZSTD_STATIC_LIB NAMES libzstd libzstd_static zstd zstd_static
+ PATHS ${_zstd_roots}
+ NO_DEFAULT_PATH
+ PATH_SUFFIXES "lib" )
+diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake
+index a888e92..0fe3629 100644
+--- a/cmake_modules/ThirdpartyToolchain.cmake
++++ b/cmake_modules/ThirdpartyToolchain.cmake
+@@ -119,6 +119,7 @@ endif()
+ set(Boost_DEBUG TRUE)
+ set(Boost_USE_MULTITHREADED ON)
+ set(Boost_ADDITIONAL_VERSIONS
++ "1.65.0" "1.65"
+ "1.64.0" "1.64"
+ "1.63.0" "1.63"
+ "1.62.0" "1.61"
diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake
index f5cdb1ae4..c70a3cdc3 100644
--- a/ports/arrow/portfile.cmake
+++ b/ports/arrow/portfile.cmake
@@ -7,17 +7,39 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO apache/arrow
- REF apache-arrow-0.4.0
- SHA512 cdd67a884528b088688d88c0627b9c13077215e234dd0772797f0bf63319ffc18533276d52110a37a0938d32f006023b74dce93e71d34b1e0003a86761cea6ee
+ REF apache-arrow-0.6.0
+ SHA512 c0e89b959dfe75e895a3427edd4eee663be5ee542e9ea13f7311d0775fe7a00188eafa07ba524e3d3c0a71fc8e11213f10fe4ebfdf451754816062249ffa7f3d
HEAD_REF master
)
set(CPP_SOURCE_PATH "${SOURCE_PATH}/cpp")
+vcpkg_apply_patches(
+ SOURCE_PATH ${CPP_SOURCE_PATH}
+ PATCHES
+ "${CMAKE_CURRENT_LIST_DIR}/all.patch"
+)
+
+
+string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" ARROW_BUILD_SHARED)
+string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" ARROW_BUILD_STATIC)
+
vcpkg_configure_cmake(
SOURCE_PATH ${CPP_SOURCE_PATH}
OPTIONS -DARROW_BUILD_TESTS=off
+ -DRAPIDJSON_HOME=${CURRENT_INSTALLED_DIR}
+ -DFLATBUFFERS_HOME=${CURRENT_INSTALLED_DIR}
+ -DARROW_ZLIB_VENDORED=ON
+ -DBROTLI_HOME=${CURRENT_INSTALLED_DIR}
+ -DLZ4_HOME=${CURRENT_INSTALLED_DIR}
+ -DZSTD_HOME=${CURRENT_INSTALLED_DIR}
+ -DSNAPPY_HOME=${CURRENT_INSTALLED_DIR}
+ -DBOOST_ROOT=${CURRENT_INSTALLED_DIR}
+ -DGFLAGS_HOME=${CURRENT_INSTALLED_DIR}
+ -DZLIB_HOME=${CURRENT_INSTALLED_DIR}
+ -DARROW_BUILD_STATIC=${ARROW_BUILD_STATIC}
+ -DARROW_BUILD_SHARED=${ARROW_BUILD_SHARED}
)
vcpkg_install_cmake()
diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL
index 9e036df33..f13d2ee20 100644
--- a/ports/assimp/CONTROL
+++ b/ports/assimp/CONTROL
@@ -1,4 +1,4 @@
Source: assimp
-Version: 4.0.0-1
+Version: 4.0.0-2
Description: The Open Asset import library
Build-Depends: zlib
diff --git a/ports/atk/CONTROL b/ports/atk/CONTROL
index 149c564a7..0af45eab4 100644
--- a/ports/atk/CONTROL
+++ b/ports/atk/CONTROL
@@ -1,4 +1,4 @@
Source: atk
-Version: 2.24.0
+Version: 2.24.0-1
Description: GNOME Accessibility Toolkit
Build-Depends: glib, gettext
diff --git a/ports/aubio/CONTROL b/ports/aubio/CONTROL
index 55b20f655..34fcaa495 100644
--- a/ports/aubio/CONTROL
+++ b/ports/aubio/CONTROL
@@ -1,4 +1,4 @@
Source: aubio
-Version: 0.46~alpha-2
+Version: 0.46~alpha-3
Description: Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio.
Build-Depends: ffmpeg, libsndfile, libogg, libflac, libvorbis
diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL
index 18de04d46..a36263e7a 100644
--- a/ports/aws-sdk-cpp/CONTROL
+++ b/ports/aws-sdk-cpp/CONTROL
@@ -1,3 +1,3 @@
Source: aws-sdk-cpp
-Version: 1.0.61
+Version: 1.2.4
Description: AWS SDK for C++
diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake
index 93c7a7265..4e0e8bdfe 100644
--- a/ports/aws-sdk-cpp/portfile.cmake
+++ b/ports/aws-sdk-cpp/portfile.cmake
@@ -1,11 +1,12 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aws-sdk-cpp-1.0.61)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/aws/aws-sdk-cpp/archive/1.0.61.tar.gz"
- FILENAME "aws-sdk-cpp-1.0.61.tar.gz"
- SHA512 aef0a85a32db24dc4fba0fc49c2533074580f3df628e787ff0808f03deea5dac42e19b1edc966706784e98cfed17a350c3eff4f222df7cc756065be56d1fc6a6
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO aws/aws-sdk-cpp
+ REF 1.2.4
+ SHA512 dc96e40fe72e4b115607245f536cd13414e33a8f754153fd137f1391af14b9793fc8a07f9f984490e0783e385c2c7b9a421878b63ea793012f53fefe7ec4d368
+ HEAD_REF master
)
-vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
@@ -30,6 +31,34 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
+file(GLOB CMAKE_FILES ${CURRENT_PACKAGES_DIR}/lib/cmake/*)
+
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
+
+file(COPY ${CMAKE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/share)
+
+vcpkg_copy_pdbs()
+
+file(GLOB AWS_TARGETS "${CURRENT_PACKAGES_DIR}/share/aws-cpp-sdk-*/aws-cpp-sdk-*targets.cmake")
+foreach(AWS_TARGETS ${AWS_TARGETS})
+ file(READ ${AWS_TARGETS} _contents)
+ string(REGEX REPLACE
+ "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*"
+ "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)"
+ _contents "${_contents}")
+ file(WRITE ${AWS_TARGETS} "${_contents}")
+endforeach()
+
+file(GLOB AWS_TARGETS_RELEASE "${CURRENT_PACKAGES_DIR}/share/aws-cpp-sdk-*/aws-cpp-sdk-*targets-release.cmake")
+foreach(AWS_TARGETS_RELEASE ${AWS_TARGETS_RELEASE})
+ file(READ ${AWS_TARGETS_RELEASE} _contents)
+ string(REGEX REPLACE
+ "bin\\/([A-Za-z0-9_.-]+lib)"
+ "lib/\\1"
+ _contents "${_contents}")
+ file(WRITE ${AWS_TARGETS_RELEASE} "${_contents}")
+endforeach()
+
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/lib/cmake
@@ -50,4 +79,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
endif()
# Handle copyright
-file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aws-sdk-cpp RENAME copyright) \ No newline at end of file
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aws-sdk-cpp RENAME copyright)
diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL
index 94126a366..1917bad6d 100644
--- a/ports/azure-storage-cpp/CONTROL
+++ b/ports/azure-storage-cpp/CONTROL
@@ -1,5 +1,5 @@
Source: azure-storage-cpp
-Version: 3.0.0-2
+Version: 3.0.0-3
Build-Depends: cpprestsdk, atlmfc
Description: Microsoft Azure Storage Client SDK for C++
- A client library for working with Microsoft Azure storage services including blobs, files, tables, and queues. This client library enables working with the Microsoft Azure storage services which include the blob service for storing binary and text data, the file service for storing binary and text data, the table service for storing structured non-relational data, and the queue service for storing messages that may be accessed by a client. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/ \ No newline at end of file
+ A client library for working with Microsoft Azure storage services including blobs, files, tables, and queues. This client library enables working with the Microsoft Azure storage services which include the blob service for storing binary and text data, the file service for storing binary and text data, the table service for storing structured non-relational data, and the queue service for storing messages that may be accessed by a client. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/
diff --git a/ports/benchmark/CONTROL b/ports/benchmark/CONTROL
index 21f36fe43..03052ce7f 100644
--- a/ports/benchmark/CONTROL
+++ b/ports/benchmark/CONTROL
@@ -1,3 +1,3 @@
Source: benchmark
-Version: 1.1.0
-Description: A library to support the benchmarking of functions, similar to unit-tests. \ No newline at end of file
+Version: 1.2.0
+Description: A library to support the benchmarking of functions, similar to unit-tests.
diff --git a/ports/benchmark/fix-cmakelists.patch b/ports/benchmark/fix-cmakelists.patch
deleted file mode 100644
index f1d72fdc3..000000000
--- a/ports/benchmark/fix-cmakelists.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 4038875..94d2aea 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -28,17 +28,20 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
- endif()
-
- # Expose public API
--target_include_directories(benchmark PUBLIC ${PROJECT_SOURCE_DIR}/include)
-+target_include_directories(benchmark PRIVATE ${PROJECT_SOURCE_DIR}/include)
-
- # Install target (will install the library to specified CMAKE_INSTALL_PREFIX variable)
- install(
- TARGETS benchmark
-+ EXPORT benchmarkTargets
- ARCHIVE DESTINATION lib
- LIBRARY DESTINATION lib
- RUNTIME DESTINATION bin
-- COMPONENT library)
-+ INCLUDES DESTINATION include)
-
- install(
- DIRECTORY "${PROJECT_SOURCE_DIR}/include/benchmark"
- DESTINATION include
- FILES_MATCHING PATTERN "*.*h")
-+
-+install(EXPORT benchmarkTargets NAMESPACE benchmark:: DESTINATION share/benchmark)
diff --git a/ports/benchmark/portfile.cmake b/ports/benchmark/portfile.cmake
index d8fc98a7e..c3159ef8b 100644
--- a/ports/benchmark/portfile.cmake
+++ b/ports/benchmark/portfile.cmake
@@ -12,30 +12,38 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/benchmark
- REF v1.1.0
- SHA512 533061531e6a37723a626addc9e779018c4c2cfc8634ae45860eec0d3800103b5b562f865ac1dc0c8dbe045579b81e59de887e1c48318cebf160f03c18321831
+ REF v1.2.0
+ SHA512 859063669fd84e847f04624013f0b2b734d75d90cada247682eaf345b86c88a9bc2320250e128f2361e37f402b3fb56a18c493ec6038973744a005a452d693ba
HEAD_REF master
)
+vcpkg_download_distfile(PATCH
+ URLS "https://github.com/efcs/benchmark/commit/536b0b82b8ec12fc7e17e6d243633618f294a739.diff"
+ FILENAME google-benchmark-1.2.0-536b0b82.patch
+ SHA512 ed42cc0014741c8039c0fca5b4317b2ed09d06a25c91f49a48be6dce921e39469b002c088794c1ea73dc759166e20cb685b47f809ba28dddd95b5f3263be03cd
+)
+
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
- PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch"
+ PATCHES
+ "${PATCH}"
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
- -DBENCHMARK_ENABLE_TESTING=OFF
+ -DBENCHMARK_ENABLE_TESTING=OFF
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
-vcpkg_fixup_cmake_targets()
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/benchmark)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/benchmark)
diff --git a/ports/bigint/CMakeLists.txt b/ports/bigint/CMakeLists.txt
new file mode 100644
index 000000000..cb62597ef
--- /dev/null
+++ b/ports/bigint/CMakeLists.txt
@@ -0,0 +1,40 @@
+cmake_minimum_required(VERSION 3.8.0)
+project(bigint)
+
+if(MSVC)
+ add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
+endif()
+
+include_directories(".")
+
+set(
+ bigint_srcs
+ BigUnsigned.cc
+ BigInteger.cc
+ BigIntegerAlgorithms.cc
+ BigUnsignedInABase.cc
+ BigIntegerUtils.cc
+)
+
+set(
+ bigint_hh
+ NumberlikeArray.hh
+ BigUnsigned.hh
+ BigInteger.hh
+ BigIntegerAlgorithms.hh
+ BigUnsignedInABase.hh
+ BigIntegerLibrary.hh
+)
+
+add_library(bigint ${bigint_srcs})
+
+install(
+ TARGETS bigint
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES ${bigint_hh} DESTINATION include/bigint)
+endif()
diff --git a/ports/bigint/CONTROL b/ports/bigint/CONTROL
new file mode 100644
index 000000000..4079363f1
--- /dev/null
+++ b/ports/bigint/CONTROL
@@ -0,0 +1,3 @@
+Source: bigint
+Version: 2010.04.30-1
+Description: C++ Big Integer Library
diff --git a/ports/bigint/portfile.cmake b/ports/bigint/portfile.cmake
new file mode 100644
index 000000000..8a710aa54
--- /dev/null
+++ b/ports/bigint/portfile.cmake
@@ -0,0 +1,27 @@
+include(vcpkg_common_functions)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(WARNING "Dynamic not supported building static")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/bigint-2010.04.30)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://mattmccutchen.net/bigint/bigint-2010.04.30.tar.bz2"
+ FILENAME "bigint-2010.04.30.tar.bz2"
+ SHA512 bb64380e51991f97a2489c04801ab4372f795b5e23870ad12d71087f1a2afba9b32f74dcdbdcb5228ebf0dd74a37185285bac7653dd3c62d6118d63c298689af
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+
+file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/bigint RENAME copyright)
diff --git a/ports/blaze/portfile.cmake b/ports/blaze/portfile.cmake
index 3225e99d4..a8fc5ab1e 100644
--- a/ports/blaze/portfile.cmake
+++ b/ports/blaze/portfile.cmake
@@ -1,13 +1,13 @@
#header-only library
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/blaze-3.2)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://bitbucket.org/blaze-lib/blaze/downloads/blaze-3.2.tar.gz"
- FILENAME "blaze-3.2.tar.gz"
- SHA512 33d2bb0a49a33e71c88a45ab9e8418160c09b877b3ebe5ff7aa48ec0973e28e8a282374604d56f1b5cf2722946e4ca84aa2b401a341240a2ab9debd72505148e
+vcpkg_from_bitbucket(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO blaze-lib/blaze
+ REF v3.2
+ SHA512 f9a50c454125fe194f0d1fb259c5440c82068d41880a228fbd15fe383b6ef4198557daa406a08809065eedf223fc0c55d2309cc00ef549a3fc1a2a89e6d4b445
+ HEAD_REF master
)
-vcpkg_extract_source_archive(${ARCHIVE})
# Copy the blaze header files
file(COPY "${SOURCE_PATH}/blaze"
diff --git a/ports/bond/CONTROL b/ports/bond/CONTROL
index 9007113f3..e69c925d6 100644
--- a/ports/bond/CONTROL
+++ b/ports/bond/CONTROL
@@ -1,5 +1,5 @@
Source: bond
Maintainer: bond@microsoft.com
-Version: 6.0.0
+Version: 6.0.0-1
Description: Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services. <https://github.com/Microsoft/bond>
Build-Depends: boost, rapidjson
diff --git a/ports/bond/portfile.cmake b/ports/bond/portfile.cmake
index f3664da8c..147ebeea8 100644
--- a/ports/bond/portfile.cmake
+++ b/ports/bond/portfile.cmake
@@ -1,4 +1,4 @@
-if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
message(STATUS "Warning: Dynamic building not supported yet. Building static.")
set(VCPKG_LIBRARY_LINKAGE static)
endif()
@@ -23,7 +23,7 @@ vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_extract_source_archive(${GBC_ARCHIVE} ${CURRENT_BUILDTREES_DIR}/tools/)
set(FETCHED_GBC_PATH ${CURRENT_BUILDTREES_DIR}/tools/gbc-6.0.0-amd64.exe)
-if (NOT EXISTS ${FETCHED_GBC_PATH})
+if (NOT EXISTS "${FETCHED_GBC_PATH}")
message(FATAL_ERROR "Fetching GBC failed. Expected '${FETCHED_GBC_PATH}' to exists, but it doesn't.")
endif()
diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL
index 1743379fb..7001c968a 100644
--- a/ports/boost/CONTROL
+++ b/ports/boost/CONTROL
@@ -1,4 +1,8 @@
Source: boost
+<<<<<<< HEAD
Version: 1.65-2
+=======
+Version: 1.65.1
+>>>>>>> master
Description: Peer-reviewed portable C++ source libraries
Build-Depends: zlib, bzip2, icu [windows], python3 [windows]
diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake
index 530351c7e..4d2d06aae 100644
--- a/ports/boost/portfile.cmake
+++ b/ports/boost/portfile.cmake
@@ -1,26 +1,19 @@
include(vcpkg_common_functions)
set(VERSION 1_65)
-set(VERSION2 1.65.0)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/boost_${VERSION}_0)
+set(VERSION_FULL 1_65_1)
+set(VERSION2 1.65.1)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/boost_${VERSION_FULL})
######################
# Acquire and arrange sources
######################
vcpkg_download_distfile(ARCHIVE_FILE
- URLS "https://sourceforge.net/projects/boost/files/boost/${VERSION2}/boost_${VERSION}_0.7z" "http://dl.bintray.com/boostorg/release/${VERSION2}/source/boost_${VERSION}_0.7z"
- FILENAME "boost_${VERSION}_0.7z"
- SHA512 41909136371b3aac53fc06ae92404bd52adde4cbda9337886433d197059105208b67331abf6ca8dc45e4d28679733b5c01fc701cba17516c7134c97785cc5f7e
+ URLS "https://sourceforge.net/projects/boost/files/boost/${VERSION2}/boost_${VERSION_FULL}.7z" "http://dl.bintray.com/boostorg/release/${VERSION2}/source/boost_${VERSION_FULL}.7z"
+ FILENAME "boost_${VERSION_FULL}.7z"
+ SHA512 b1d9264ec74dd75c68176f5a2d2da33a2c1e3162842cc61a07ac8ed1ebb953855cece4faf72ce99b490b665e813b839e35c7fc8026f2f9cb31b106fb8bab2a9c
)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
-# apply boost combined hotfix
-vcpkg_download_distfile(HOTFIX_PATCH
- URLS "https://raw.githubusercontent.com/boostorg/website/6c3b630f2c621b78d983e882cefae7ffdf8383b8/patches/1_65_0/boost_1_65_0.patch"
- FILENAME "boost_1_65_0.patch"
- SHA512 8f9e654d0ee4d30b38b62b99ebfbbdeccd156c168656e1256b846bd21a3cb36d675396bd48d3f7a18d6cffba80932d40590d12e7ca1a4b51db343b3a0a39a3fd
-)
-vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${HOTFIX_PATCH})
-
# apply boost range hotfix
vcpkg_download_distfile(DIFF
URLS "https://github.com/boostorg/range/commit/e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff"
diff --git a/ports/box2d/portfile.cmake b/ports/box2d/portfile.cmake
index c84c33387..122290251 100644
--- a/ports/box2d/portfile.cmake
+++ b/ports/box2d/portfile.cmake
@@ -21,7 +21,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO erincatto/Box2D
REF 374664b2a4ce2e7c24fbad6e1ed34bebcc9ab6bc
- SHA512 ae2bbee66644eea91d0e92156a4bece44053dfa8fd6b8630712a73b92210d4c75153df94e3386c64c49796b001af1ad7dee44868c16368b114567e1f6931d242
+ SHA512 39074bab01b36104aa685bfe39b40eb903d9dfb54cc3ba8098125db5291f55a8a9e578fc59563b2e8743abbbb26f419be7ae1524e235e7bd759257f99ff96bda
HEAD_REF master
)
diff --git a/ports/brotli/CONTROL b/ports/brotli/CONTROL
index 75a2973a0..25bc036a8 100644
--- a/ports/brotli/CONTROL
+++ b/ports/brotli/CONTROL
@@ -1,3 +1,3 @@
Source: brotli
-Version: 0.6.0
+Version: 0.6.0-1
Description: a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling.
diff --git a/ports/bullet3/CONTROL b/ports/bullet3/CONTROL
index 6320c6578..92b55db2e 100644
--- a/ports/bullet3/CONTROL
+++ b/ports/bullet3/CONTROL
@@ -1,3 +1,3 @@
Source: bullet3
-Version: 2.86.1
+Version: 2.86.1-1
Description: Bullet Physics is a professional collision detection, rigid body, and soft body dynamics library
diff --git a/ports/butteraugli/CMakeLists.txt b/ports/butteraugli/CMakeLists.txt
new file mode 100644
index 000000000..0b5373c5a
--- /dev/null
+++ b/ports/butteraugli/CMakeLists.txt
@@ -0,0 +1,37 @@
+cmake_minimum_required(VERSION 3.8.0)
+project(butteraugli CXX)
+
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+add_compile_options(-D_CRT_SECURE_NO_WARNINGS -DNOMINMAX)
+if(MSVC)
+ add_compile_options(/W3 /wd4005 /wd4996 /wd4018)
+endif()
+
+find_package(JPEG REQUIRED)
+find_package(PNG REQUIRED)
+
+include_directories(".")
+
+add_library(butteraugli_lib butteraugli/butteraugli.cc)
+
+install(
+ TARGETS butteraugli_lib
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT DISABLE_INSTALL_TOOLS)
+ add_executable(butteraugli butteraugli/butteraugli_main.cc)
+ target_include_directories(butteraugli PRIVATE ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIRS})
+ target_link_libraries(butteraugli PRIVATE butteraugli_lib ${JPEG_LIBRARIES} ${PNG_LIBRARIES})
+
+ install (
+ TARGETS butteraugli
+ RUNTIME DESTINATION tools/butteraugli
+ )
+endif()
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES butteraugli/butteraugli.h DESTINATION include/butteraugli)
+endif()
diff --git a/ports/butteraugli/CONTROL b/ports/butteraugli/CONTROL
new file mode 100644
index 000000000..fe951714b
--- /dev/null
+++ b/ports/butteraugli/CONTROL
@@ -0,0 +1,4 @@
+Source: butteraugli
+Version: 2017-09-02-8c60a2aefa19adb-1
+Description: butteraugli estimates the psychovisual difference between two images
+Build-Depends: libpng, libjpeg-turbo
diff --git a/ports/butteraugli/missing_header.patch b/ports/butteraugli/missing_header.patch
new file mode 100644
index 000000000..11d314fad
--- /dev/null
+++ b/ports/butteraugli/missing_header.patch
@@ -0,0 +1,12 @@
+diff --git "a/butteraugli/butteraugli_main.cc" "b/butteraugli/butteraugli_main.cc"
+index f38af1d..ebf3197 100644
+--- "a/butteraugli/butteraugli_main.cc"
++++ "b/butteraugli/butteraugli_main.cc"
+@@ -2,6 +2,7 @@
+ #include <cstdint>
+ #include <cstdio>
+ #include <vector>
++#include <algorithm>
+ #include "butteraugli/butteraugli.h"
+
+ extern "C" {
diff --git a/ports/butteraugli/portfile.cmake b/ports/butteraugli/portfile.cmake
new file mode 100644
index 000000000..a4b6fcfdd
--- /dev/null
+++ b/ports/butteraugli/portfile.cmake
@@ -0,0 +1,30 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO google/butteraugli
+ REF 8c60a2aefa19adb40e457be5358d7cc93205c72f
+ SHA512 ff3d8fd952d291b51dab60cef6fa46b723c4a7b649c3df70f89c63febce865dc6a2e5f95ca165ea4424fed52a57c2d76c918eb31646c44ba34a0fa51a003c9dd
+ HEAD_REF master
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ "${CMAKE_CURRENT_LIST_DIR}/missing_header.patch"
+ )
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/butteraugli)
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/butteraugli RENAME copyright)
diff --git a/ports/bzip2/CONTROL b/ports/bzip2/CONTROL
index 1c7303c22..613d3f251 100644
--- a/ports/bzip2/CONTROL
+++ b/ports/bzip2/CONTROL
@@ -1,3 +1,3 @@
Source: bzip2
-Version: 1.0.6-1
+Version: 1.0.6-2
Description: High-quality data compressor.
diff --git a/ports/c-ares/CONTROL b/ports/c-ares/CONTROL
index db04bd3fa..6b729a5d9 100644
--- a/ports/c-ares/CONTROL
+++ b/ports/c-ares/CONTROL
@@ -1,4 +1,4 @@
Source: c-ares
-Version: 1.12.1-dev-40eb41f-1
+Version: 1.13.0-1
Description: A C library for asynchronous DNS requests
-Build-Depends: \ No newline at end of file
+Build-Depends:
diff --git a/ports/c-ares/portfile.cmake b/ports/c-ares/portfile.cmake
index 86c4ba442..d78878857 100644
--- a/ports/c-ares/portfile.cmake
+++ b/ports/c-ares/portfile.cmake
@@ -3,8 +3,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO c-ares/c-ares
- REF 40eb41f522eb9a86f9397352f10d1e63c89f2c54
- SHA512 901d7da97098f79d13ae8d72c85936bd15fbd6b65399c247462ad5367ac85ff32c90325998c21364f959e1bde2c8b7dbc9d9d7524ea34e6bc48dfb3854c199e1
+ REF cares-1_13_0
+ SHA512 0ee8a45772c64701d0e860cd84925cef8938a319b3004e02e86af900cbd9e07609940bc474a46bf4252b9b7e3815e1951de8f0eb16718074ec1d39c2105a2abe
HEAD_REF master
)
diff --git a/ports/caffe2/CONTROL b/ports/caffe2/CONTROL
new file mode 100644
index 000000000..d09de8e6d
--- /dev/null
+++ b/ports/caffe2/CONTROL
@@ -0,0 +1,4 @@
+Source: caffe2
+Version: 0.8.1
+Build-Depends: lmdb, gflags, glog, eigen3, protobuf
+Description: Caffe2 is a lightweight, modular, and scalable deep learning framework.
diff --git a/ports/caffe2/msvc-fixes.patch b/ports/caffe2/msvc-fixes.patch
new file mode 100644
index 000000000..446dbd44e
--- /dev/null
+++ b/ports/caffe2/msvc-fixes.patch
@@ -0,0 +1,396 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8054d98..35934f5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -56,6 +56,14 @@ option(USE_ROCKSDB "Use RocksDB" ON)
+ option(USE_SNPE "Use Qualcomm's SNPE library" OFF)
+ option(USE_THREADS "Use Threads" ON)
+ option(USE_ZMQ "Use ZMQ" OFF)
++if(MSVC)
++ if(BUILD_BUILD_SHARED_LIBS)
++ set(USE_STATIC_RUNTIME_DEFAULT OFF)
++ else()
++ set(USE_STATIC_RUNTIME_DEFAULT ON)
++ endif()
++ option(USE_STATIC_RUNTIME "Link to the static runtime (/MT) instead of dynamic (/MD)" ${USE_STATIC_RUNTIME_DEFAULT})
++endif()
+
+ # External projects
+ include(ExternalProject)
+@@ -99,7 +107,7 @@ else()
+ foreach(flag_var
+ CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
+ CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
+- if (NOT ${BUILD_SHARED_LIBS})
++ if (USE_STATIC_RUNTIME)
+ if(${flag_var} MATCHES "/MD")
+ string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
+ endif(${flag_var} MATCHES "/MD")
+diff --git a/caffe2/core/logging.cc b/caffe2/core/logging.cc
+index 1b4468e..1379f3a 100644
+--- a/caffe2/core/logging.cc
++++ b/caffe2/core/logging.cc
+@@ -117,7 +117,7 @@ using fLB::FLAGS_logtostderr;
+
+ #endif // CAFFE2_USE_GFLAGS
+
+-CAFFE2_DEFINE_int(caffe2_log_level, google::ERROR,
++CAFFE2_DEFINE_int(caffe2_log_level, google::GLOG_ERROR,
+ "The minimum log level that caffe2 will output.");
+
+ // Google glog's api does not have an external function that allows one to check
+@@ -134,15 +134,23 @@ bool IsGoogleLoggingInitialized();
+ namespace caffe2 {
+ bool InitCaffeLogging(int* argc, char** argv) {
+ if (*argc == 0) return true;
+- if (!::google::glog_internal_namespace_::IsGoogleLoggingInitialized()) {
++#if !(defined(_MSC_VER) && defined(GLOG_IS_A_DLL))
++ // IsGoogleLoggingInitialized is not exported from the glog DLL
++ // so we can't call it. If our program calls InitGoogleLogging twice glog will
++ // abort it.
++ if (!::google::glog_internal_namespace_::IsGoogleLoggingInitialized())
++#endif
++ {
+ ::google::InitGoogleLogging(argv[0]);
++#if !defined(_MSC_VER)
+ ::google::InstallFailureSignalHandler();
++#endif
+ }
+ // If caffe2_log_level is set and is lower than the min log level by glog,
+ // we will transfer the caffe2_log_level setting to glog to override that.
+ FLAGS_minloglevel = std::min(FLAGS_caffe2_log_level, FLAGS_minloglevel);
+ // If caffe2_log_level is explicitly set, let's also turn on logtostderr.
+- if (FLAGS_caffe2_log_level < google::ERROR) {
++ if (FLAGS_caffe2_log_level < google::GLOG_ERROR) {
+ FLAGS_logtostderr = 1;
+ }
+ // Also, transfer the caffe2_log_level verbose setting to glog.
+@@ -154,7 +162,7 @@ bool InitCaffeLogging(int* argc, char** argv) {
+
+ void ShowLogInfoToStderr() {
+ FLAGS_logtostderr = 1;
+- FLAGS_minloglevel = std::min(FLAGS_minloglevel, google::INFO);
++ FLAGS_minloglevel = std::min(FLAGS_minloglevel, google::GLOG_INFO);
+ }
+ } // namespace caffe2
+
+diff --git a/caffe2/core/logging_is_google_glog.h b/caffe2/core/logging_is_google_glog.h
+index 7dd2b4f..2df4435 100644
+--- a/caffe2/core/logging_is_google_glog.h
++++ b/caffe2/core/logging_is_google_glog.h
+@@ -8,7 +8,7 @@
+ // it. Some mobile platforms do not like stl_logging, so we add an
+ // overload in that case as well.
+
+-#if !defined(__CUDACC__) && !defined(CAFFE2_USE_MINIMAL_GOOGLE_GLOG)
++#if !defined(__CUDARCH__) && !defined(CAFFE2_USE_MINIMAL_GOOGLE_GLOG)
+ #include <glog/stl_logging.h>
+ #else // !defined(__CUDACC__) && !!defined(CAFFE2_USE_MINIMAL_GOOGLE_GLOG)
+
+diff --git a/caffe2/image/image_input_op.h b/caffe2/image/image_input_op.h
+index 9604e98..7d90014 100644
+--- a/caffe2/image/image_input_op.h
++++ b/caffe2/image/image_input_op.h
+@@ -214,13 +214,13 @@ ImageInputOp<Context>::ImageInputOp(
+
+ // hard-coded PCA eigenvectors and eigenvalues, based on RBG channel order
+ color_lighting_eigvecs_.push_back(
+- std::vector<float>{-144.7125, 183.396, 102.2295});
++ std::vector<float>{-144.7125f, 183.396f, 102.2295f});
+ color_lighting_eigvecs_.push_back(
+- std::vector<float>{-148.104, -1.1475, -207.57});
++ std::vector<float>{-148.104f, -1.1475f, -207.57f});
+ color_lighting_eigvecs_.push_back(
+- std::vector<float>{-148.818, -177.174, 107.1765});
++ std::vector<float>{-148.818f, -177.174f, 107.1765f});
+
+- color_lighting_eigvals_ = std::vector<float>{0.2175, 0.0188, 0.0045};
++ color_lighting_eigvals_ = std::vector<float>{0.2175f, 0.0188f, 0.0045f};
+
+ CAFFE_ENFORCE_GT(batch_size_, 0, "Batch size should be nonnegative.");
+ if (use_caffe_datum_) {
+diff --git a/caffe2/operators/batch_matmul_op.cc b/caffe2/operators/batch_matmul_op.cc
+index c2e578d..28cf030 100644
+--- a/caffe2/operators/batch_matmul_op.cc
++++ b/caffe2/operators/batch_matmul_op.cc
+@@ -34,7 +34,7 @@ size (C x K x N) where C is the batch size and i ranges from 0 to C-1.
+ b_dim1 = in[1].dims(2);
+ }
+ return vector<TensorShape> {
+- CreateTensorShape(vector<int> {
++ CreateTensorShape(vector<TIndex> {
+ in[0].dims(0), a_dim0, b_dim1},
+ in[0].data_type())
+ };
+diff --git a/caffe2/operators/layer_norm_op.cu b/caffe2/operators/layer_norm_op.cu
+index df13fc3..68bbc97 100644
+--- a/caffe2/operators/layer_norm_op.cu
++++ b/caffe2/operators/layer_norm_op.cu
+@@ -252,8 +252,8 @@ bool LayerNormGradientOp<CUDAContext>::DoRunWithType<float>() {
+ auto* ginput = Output(0);
+
+ const auto canonical_axis = norm_inputs.canonical_axis_index(axis_);
+- const int left = norm_inputs.size_to_dim(canonical_axis);
+- const int right = norm_inputs.size_from_dim(canonical_axis);
++ const TIndex left = norm_inputs.size_to_dim(canonical_axis);
++ const TIndex right = norm_inputs.size_from_dim(canonical_axis);
+
+ ginput->ResizeLike(norm_inputs);
+ std::vector<TIndex> stats_dims(
+@@ -261,7 +261,7 @@ bool LayerNormGradientOp<CUDAContext>::DoRunWithType<float>() {
+ stats_dims.push_back(1);
+ dmean_.Resize(stats_dims);
+ dstdev_.Resize(stats_dims);
+- gscratch_.Resize(std::vector<size_t>{left, right});
++ gscratch_.Resize(std::vector<TIndex>{left, right});
+
+ std::vector<int> segs(left + 1);
+ std::iota(segs.begin(), segs.end(), 0);
+@@ -291,7 +291,7 @@ bool LayerNormGradientOp<CUDAContext>::DoRunWithType<float>() {
+ dout.data<float>(),
+ gscratch_.mutable_data<float>());
+
+- dstdev_.Resize(vector<size_t>{left, 1});
++ dstdev_.Resize(vector<TIndex>{left, 1});
+ // dstdev = reduce(temp1)
+ allocScratchAndReduce(
+ gscratch_.data<float>(),
+diff --git a/caffe2/operators/lengths_top_k_op.cc b/caffe2/operators/lengths_top_k_op.cc
+index c871d53..bad741a 100644
+--- a/caffe2/operators/lengths_top_k_op.cc
++++ b/caffe2/operators/lengths_top_k_op.cc
+@@ -14,7 +14,7 @@ bool LengthsTopKOp<T, Context>::RunOnDevice() {
+
+ output_topk_values->Resize(N * k_);
+ output_topk_indices->Resize(N * k_);
+- std::vector<int> output_dims = std::vector<int>({N, k_});
++ std::vector<TIndex> output_dims = std::vector<TIndex>({N, k_});
+ output_topk_values->Reshape(output_dims);
+ output_topk_indices->Reshape(output_dims);
+ T* output_topk_values_data = output_topk_values->template mutable_data<T>();
+diff --git a/caffe2/operators/pool_op_cudnn.cu b/caffe2/operators/pool_op_cudnn.cu
+index a380d8d..b0cd326 100644
+--- a/caffe2/operators/pool_op_cudnn.cu
++++ b/caffe2/operators/pool_op_cudnn.cu
+@@ -467,6 +467,15 @@ class CuDNNPoolGradientOp : public ConvPoolOpBase<CUDAContext> {
+ cudnnPoolingDescriptor_t pooling_desc_;
+ cudnnPoolingMode_t mode_;
+
++// MSVC defines IN and OUT in minwindef.h
++#ifdef IN
++#undef IN
++#endif
++
++#ifdef OUT
++#undef OUT
++#endif
++
+ // Input: X, Y, dY
+ // Output: dX
+ INPUT_TAGS(IN, OUT, OUT_GRAD);
+diff --git a/caffe2/operators/recurrent_op_cudnn.cc b/caffe2/operators/recurrent_op_cudnn.cc
+index 7777813..58bc8c3 100644
+--- a/caffe2/operators/recurrent_op_cudnn.cc
++++ b/caffe2/operators/recurrent_op_cudnn.cc
+@@ -115,10 +115,11 @@ void RecurrentBaseOp<T>::initialize(
+
+ // RNN setup
+ {
+- CUDNN_ENFORCE(cudnnSetRNNDescriptor(
++// Do not use #if condition inside CUDNN_ENFORCE
++// to avoid macro expansion errors.
+ #if CUDNN_MAJOR >= 7
++CUDNN_ENFORCE(cudnnSetRNNDescriptor(
+ cudnn_wrapper_.inline_cudnn_handle(),
+-#endif
+ rnnDesc_,
+ hiddenSize,
+ numLayers,
+@@ -126,10 +127,19 @@ void RecurrentBaseOp<T>::initialize(
+ rnnInput,
+ rnnDirection,
+ rnnMode,
+-#if CUDNN_MAJOR >= 7
+ CUDNN_RNN_ALGO_STANDARD, // TODO: verify correctness / efficiency.
+-#endif
+ cudnnTypeWrapper<T>::type));
++#else
++ CUDNN_ENFORCE(cudnnSetRNNDescriptor(
++ rnnDesc_,
++ hiddenSize,
++ numLayers,
++ dropoutDesc_,
++ rnnInput,
++ rnnDirection,
++ rnnMode,
++ cudnnTypeWrapper<T>::type));
++#endif // CUDNN_MAJOR >= 7
+ }
+ // X setup
+ {
+diff --git a/caffe2/utils/CMakeLists.txt b/caffe2/utils/CMakeLists.txt
+index f90af5a..919a638 100644
+--- a/caffe2/utils/CMakeLists.txt
++++ b/caffe2/utils/CMakeLists.txt
+@@ -27,6 +27,10 @@ exclude(Caffe2_CPU_SRCS "${Caffe2_CPU_SRCS}" ${Caffe2_GPU_SRCS})
+ # will directly link nnpack pthreadpool.
+ file(GLOB_RECURSE tmp pthreadpool*)
+ exclude(Caffe2_CPU_SRCS "${Caffe2_CPU_SRCS}" ${tmp})
++if(MSVC)
++ file(GLOB_RECURSE tmp *ThreadPool.cc)
++ exclude(Caffe2_CPU_SRCS "${Caffe2_CPU_SRCS}" ${tmp})
++endif()
+
+ # ---[ GPU test files
+ file(GLOB_RECURSE tmp *_gpu_test.cc)
+diff --git a/caffe2/utils/GpuBitonicSort.cuh b/caffe2/utils/GpuBitonicSort.cuh
+index f52bb50..a199bcb 100644
+--- a/caffe2/utils/GpuBitonicSort.cuh
++++ b/caffe2/utils/GpuBitonicSort.cuh
+@@ -39,9 +39,11 @@ __device__ inline void bitonicSort(K* keys,
+ // Assume the sort is taking place in shared memory
+ // static_assert(Power2SortSize * (sizeof(K) + sizeof(V)) < 32768,
+ // "sort data too large (>32768 bytes)");
+- static_assert(math::integerIsPowerOf2(Power2SortSize),
++ static_assert(math::integerIsPowerOf2(
++ std::integral_constant<int, Power2SortSize>::value),
+ "sort size must be power of 2");
+- static_assert(math::integerIsPowerOf2(ThreadsPerBlock),
++ static_assert(math::integerIsPowerOf2(
++ std::integral_constant<int, ThreadsPerBlock>::value),
+ "threads in block must be power of 2");
+
+ // If what we are sorting is too small, then not all threads
+@@ -107,7 +109,8 @@ __device__ inline void warpBitonicSort(K* keys,
+ // Smaller sorts should use a warp shuffle sort
+ static_assert(Power2SortSize > kWarpSize,
+ "sort not large enough");
+- static_assert(math::integerIsPowerOf2(Power2SortSize),
++ static_assert(math::integerIsPowerOf2(
++ std::integral_constant<int, Power2SortSize>::value),
+ "sort size must be power of 2");
+ static_assert(Power2SortSize <= kMaxBitonicSortSize,
+ "sort size <= 4096 only supported");
+diff --git a/caffe2/utils/math.h b/caffe2/utils/math.h
+index 6c352dc..a1eda9d 100644
+--- a/caffe2/utils/math.h
++++ b/caffe2/utils/math.h
+@@ -426,18 +426,10 @@ constexpr T roundUp(T a, T b) {
+ return divUp<T>(a, b) * b;
+ }
+
+-// Returns true if the given integer type is a power-of-2 (positive only)
+-// Note(jiayq): windows reported an error per
+-// https://github.com/caffe2/caffe2/issues/997
+-// and as a result will make it a macro.
+-#ifdef _MSC_VER
+-#define integerIsPowerOf2(v) ((v) && !((v) & ((v) - 1)))
+-#else // _MSC_VER
+ template <typename T>
+ constexpr bool integerIsPowerOf2(T v) {
+ return (v && !(v & (v - 1)));
+ }
+-#endif // _MSC_VER
+
+ // Returns log2(n) for a positive integer type
+ template <typename T>
+diff --git a/cmake/Cuda.cmake b/cmake/Cuda.cmake
+index df70e2f..ca1b123 100644
+--- a/cmake/Cuda.cmake
++++ b/cmake/Cuda.cmake
+@@ -37,6 +37,10 @@ function(caffe2_detect_installed_gpus out_variable)
+ ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ if(__nvcc_res EQUAL 0)
++ # nvcc outputs text containing line breaks when building with MSVC.
++ # The line below prevents CMake from inserting a variable with line
++ # breaks in the cache
++ string(REGEX MATCH "([1-9].[0-9])" __nvcc_out "${__nvcc_out}")
+ string(REPLACE "2.1" "2.1(2.0)" __nvcc_out "${__nvcc_out}")
+ set(CUDA_gpu_detect_output ${__nvcc_out} CACHE INTERNAL "Returned GPU architetures from caffe_detect_gpus tool" FORCE)
+ endif()
+@@ -249,7 +253,7 @@ endif()
+ # Debug and Release symbol support
+ if (MSVC)
+ if (${CMAKE_BUILD_TYPE} MATCHES "Release")
+- if (${BUILD_SHARED_LIBS})
++ if (NOT USE_STATIC_RUNTIME)
+ list(APPEND CUDA_NVCC_FLAGS "-Xcompiler -MD")
+ else()
+ list(APPEND CUDA_NVCC_FLAGS "-Xcompiler -MT")
+@@ -259,7 +263,7 @@ if (MSVC)
+ "Caffe2 currently does not support the combination of MSVC, Cuda "
+ "and Debug mode. Either set USE_CUDA=OFF or set the build type "
+ "to Release")
+- if (${BUILD_SHARED_LIBS})
++ if (NOT USE_STATIC_RUNTIME)
+ list(APPEND CUDA_NVCC_FLAGS "-Xcompiler -MDd")
+ else()
+ list(APPEND CUDA_NVCC_FLAGS "-Xcompiler -MTd")
+diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
+index afb6b68..bdad8b6 100644
+--- a/cmake/Dependencies.cmake
++++ b/cmake/Dependencies.cmake
+@@ -182,6 +182,15 @@ if(USE_OPENCV)
+ message(WARNING "Not compiling with OpenCV. Suppress this warning with -DUSE_OPENCV=OFF")
+ set(USE_OPENCV OFF)
+ endif()
++ if(USE_OPENCV AND VCPKG_TARGET_TRIPLET MATCHES static)
++ find_package(LibLZMA QUIET)
++ if(LIBLZMA_FOUND)
++ list(APPEND Caffe2_DEPENDENCY_LIBS ${LIBLZMA_LIBRARIES})
++ else()
++ message(WARNING "Not compiling with OpenCV. Could not find liblzma. Suppress this warning with -DUSE_OPENCV=OFF")
++ set(USE_OPENCV OFF)
++ endif()
++ endif()
+ endif()
+
+ # ---[ FFMPEG
+diff --git a/cmake/Modules/FindGlog.cmake b/cmake/Modules/FindGlog.cmake
+index 1167532..9780ba5 100644
+--- a/cmake/Modules/FindGlog.cmake
++++ b/cmake/Modules/FindGlog.cmake
+@@ -27,6 +27,10 @@ if(MSVC)
+ endif()
+ if(TARGET ${GLOG_LIBRARY})
+ get_target_property(GLOG_INCLUDE_DIR ${GLOG_LIBRARY} INTERFACE_INCLUDE_DIRECTORIES)
++ get_target_property(GLOG_TYPE ${GLOG_LIBRARY} TYPE)
++ if("${GLOG_TYPE}" STREQUAL "SHARED_LIBRARY")
++ add_definitions(-DGLOG_IS_A_DLL=1)
++ endif()
+ endif()
+ else()
+ find_library(GLOG_LIBRARY glog
+diff --git a/cmake/ProtoBuf.cmake b/cmake/ProtoBuf.cmake
+index 89975c8..e37d6da 100644
+--- a/cmake/ProtoBuf.cmake
++++ b/cmake/ProtoBuf.cmake
+@@ -13,6 +13,9 @@ function(custom_protobuf_find)
+ # so we turn it off here.
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations" PARENT_SCOPE)
+ endif()
++ if(MSVC)
++ set(protobuf_MSVC_STATIC_RUNTIME ${USE_STATIC_RUNTIME})
++ endif()
+ add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/protobuf/cmake)
+ caffe2_include_directories(${PROJECT_SOURCE_DIR}/third_party/protobuf/src)
+ list(APPEND Caffe2_DEPENDENCY_LIBS libprotobuf)
+diff --git a/cmake/Summary.cmake b/cmake/Summary.cmake
+index b7423a6..2996484 100644
+--- a/cmake/Summary.cmake
++++ b/cmake/Summary.cmake
+@@ -19,6 +19,13 @@ function (Caffe2_print_configuration_summary)
+ message(STATUS " System : ${CMAKE_SYSTEM_NAME}")
+ message(STATUS " C++ compiler : ${CMAKE_CXX_COMPILER}")
+ message(STATUS " C++ compiler version : ${CMAKE_CXX_COMPILER_VERSION}")
++ if(MSVC)
++ if(USE_STATIC_RUNTIME)
++ message(STATUS " Runtime : static (/MT)")
++ else()
++ message(STATUS " Runtime : dynamic (/MD)")
++ endif()
++ endif()
+ message(STATUS " Protobuf compiler : ${PROTOBUF_PROTOC_EXECUTABLE}")
+ message(STATUS " CXX flags : ${CMAKE_CXX_FLAGS}")
+ message(STATUS " Build type : ${CMAKE_BUILD_TYPE}")
diff --git a/ports/caffe2/portfile.cmake b/ports/caffe2/portfile.cmake
new file mode 100644
index 000000000..d2770f338
--- /dev/null
+++ b/ports/caffe2/portfile.cmake
@@ -0,0 +1,118 @@
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(STATUS "Warning: Dynamic building not supported yet. Building static.")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+
+if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
+ message(FATAL_ERROR "Caffe2 cannot be built for the x86 architecture")
+endif()
+
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO caffe2/caffe2
+ REF eab13a2d5c807bf5d49efd4584787b639a981b79
+ SHA512 505a8540b0c28329c4e2ce443ac8e198c1ee613eb6b932927ee9d04c8afdc95081f3c4581408b7097d567840427b31f6d7626ea80f27e56532f2f2e6acd87023
+ HEAD_REF master
+)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/msvc-fixes.patch
+)
+
+if(VCPKG_CRT_LINKAGE STREQUAL static)
+ set(USE_STATIC_RUNTIME ON)
+else()
+ set(USE_STATIC_RUNTIME OFF)
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DBUILD_SHARED_LIBS=OFF
+ # Set to ON to use python
+ -DBUILD_PYTHON=OFF
+ -DUSE_STATIC_RUNTIME=${USE_STATIC_RUNTIME}
+ -DUSE_GFLAGS=ON
+ -DUSE_GLOG=ON
+ # Cannot use OpenCV without USE_CUDA=ON right now
+ -DUSE_OPENCV=OFF
+ -DUSE_THREADS=ON
+ # Uncomment to use MKL
+ # -DBLAS=MKL
+ -DUSE_CUDA=OFF
+ -DUSE_FFMPEG=OFF
+ -DUSE_GLOO=OFF
+ -DUSE_LEVELDB=OFF
+ -DUSE_LITE_PROTO=OFF
+ -DUSE_METAL=OFF
+ -DUSE_MOBILE_OPENGL=OFF
+ -DUSE_MPI=OFF
+ -DUSE_NCCL=OFF
+ -DUSE_NERVANA_GPU=OFF
+ -DUSE_NNPACK=OFF
+ -DUSE_OBSERVERS=OFF
+ -DUSE_OPENMP=ON
+ -DUSE_REDIS=OFF
+ -DUSE_ROCKSDB=OFF
+ -DUSE_SNPE=OFF
+ -DUSE_ZMQ=OFF
+ -DBUILD_TEST=OFF
+ -DPROTOBUF_PROTOC_EXECUTABLE:FILEPATH=${CURRENT_INSTALLED_DIR}/tools/protoc.exe
+)
+
+vcpkg_install_cmake()
+
+# Remove folders from install
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/caffe)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/caffe2)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/caffe)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/caffe2)
+
+# Remove empty directories from include (should probably fix or
+# patch caffe2 install script)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/test)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/python)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/experiments/python)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/contrib/opengl)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/contrib/nnpack)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/contrib/libopencl-stub)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/contrib/docker-ubuntu-14.04)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/binaries)
+
+# Move bin to tools
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools)
+file(GLOB BINARIES ${CURRENT_PACKAGES_DIR}/bin/*.exe)
+foreach(binary ${BINARIES})
+ get_filename_component(binary_name ${binary} NAME)
+ file(RENAME ${binary} ${CURRENT_PACKAGES_DIR}/tools/${binary_name})
+endforeach()
+
+# Remove bin directory
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+endif()
+
+# Remove headers and tools from debug build
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+file(GLOB BINARIES ${CURRENT_PACKAGES_DIR}/bin/*.exe)
+foreach(binary ${BINARIES})
+ get_filename_component(binary_name ${binary} NAME)
+ file(REMOVE ${binary})
+endforeach()
+
+# Remove bin directory
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
+# install license
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/caffe2)
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/caffe2 RENAME copyright)
+
+vcpkg_copy_pdbs()
diff --git a/ports/cairo/CONTROL b/ports/cairo/CONTROL
index 9a6a550a6..80269f5a7 100644
--- a/ports/cairo/CONTROL
+++ b/ports/cairo/CONTROL
@@ -1,4 +1,4 @@
Source: cairo
-Version: 1.15.6
+Version: 1.15.8-1
Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
Build-Depends: zlib, libpng, pixman, glib, freetype, fontconfig
diff --git a/ports/cairo/Initialize-mutexes-for-static-builds-for-win32.patch b/ports/cairo/Initialize-mutexes-for-static-builds-for-win32.patch
deleted file mode 100644
index 420d91e28..000000000
--- a/ports/cairo/Initialize-mutexes-for-static-builds-for-win32.patch
+++ /dev/null
@@ -1,16 +0,0 @@
- src/win32/cairo-win32-device.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/win32/cairo-win32-device.c b/src/win32/cairo-win32-device.c
-index 741e49e..c60c494 100644
---- a/src/win32/cairo-win32-device.c
-+++ b/src/win32/cairo-win32-device.c
-@@ -131,6 +131,8 @@ _cairo_win32_device_get (void)
- {
- cairo_win32_device_t *device;
-
-+ CAIRO_MUTEX_INITIALIZE ();
-+
- if (__cairo_win32_device)
- return cairo_device_reference (__cairo_win32_device);
-
diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake
index 0ccf0c470..6fb0e7ce8 100644
--- a/ports/cairo/portfile.cmake
+++ b/ports/cairo/portfile.cmake
@@ -7,19 +7,18 @@
#
include(vcpkg_common_functions)
-set(CAIRO_VERSION 1.15.6)
+set(CAIRO_VERSION 1.15.8)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cairo-${CAIRO_VERSION})
vcpkg_download_distfile(ARCHIVE
URLS "http://cairographics.org/snapshots/cairo-${CAIRO_VERSION}.tar.xz"
FILENAME "cairo-${CAIRO_VERSION}.tar.xz"
- SHA512 e4eccba745a03545001ebd6f1a7b87bee4b932f80a2d877a764500ad5c18011a5bac585f31eec6d0b65ccaa818de0df2b3b99f0792111363bd3554cfa7f688b6
+ SHA512 5af1eebf432201dae0efaa5b6766b151d8273ea00dae48e104d56477005b4d423d64b5d11c512736a4cb076632fb2a572ec35becd922825a68d933bb5ff96ca1
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
- PATCHES "${CMAKE_CURRENT_LIST_DIR}/Initialize-mutexes-for-static-builds-for-win32.patch"
- "${CMAKE_CURRENT_LIST_DIR}/export-only-in-shared-build.patch"
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/export-only-in-shared-build.patch"
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/src)
diff --git a/ports/cairomm/CONTROL b/ports/cairomm/CONTROL
index d8eda4a53..c92877435 100644
--- a/ports/cairomm/CONTROL
+++ b/ports/cairomm/CONTROL
@@ -1,4 +1,4 @@
Source: cairomm
-Version: 1.15.3-1
+Version: 1.15.3-2
Description: A C++ wrapper for the cairo graphics library
-Build-Depends: cairo, libsigcpp \ No newline at end of file
+Build-Depends: cairo, libsigcpp
diff --git a/ports/ccd/CONTROL b/ports/ccd/CONTROL
index 16f16ea0b..9246cec90 100644
--- a/ports/ccd/CONTROL
+++ b/ports/ccd/CONTROL
@@ -1,3 +1,3 @@
Source: ccd
-Version: 2.0.0-1
+Version: 2.0.0-2
Description: Library for collision detection between two convex shapes
diff --git a/ports/ccfits/CONTROL b/ports/ccfits/CONTROL
index 17083f9b2..16b36bc8a 100644
--- a/ports/ccfits/CONTROL
+++ b/ports/ccfits/CONTROL
@@ -1,4 +1,4 @@
Source: ccfits
-Version: 2.5
+Version: 2.5-1
Description: CCfits is an object oriented interface to the cfitsio library. It is designed to make the capabilities of cfitsio available to programmers working in C++.
-Build-Depends: cfitsio \ No newline at end of file
+Build-Depends: cfitsio
diff --git a/ports/cctz/CMakeLists.txt b/ports/cctz/CMakeLists.txt
new file mode 100644
index 000000000..99322d05e
--- /dev/null
+++ b/ports/cctz/CMakeLists.txt
@@ -0,0 +1,36 @@
+cmake_minimum_required(VERSION 3.8)
+project(cctz CXX)
+
+set(CMAKE_DEBUG_POSTFIX d)
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
+if(CMAKE_BUILD_TYPE STREQUAL "Release")
+ option(INSTALL_HEADERS "Install header files" ON)
+else()
+ option(INSTALL_HEADERS "Install header files" OFF)
+endif()
+
+file(GLOB SOURCES src/*.cc)
+list(FILTER SOURCES EXCLUDE REGEX "_test.cc$|benchmarks|_tool.cc$")
+
+file(GLOB HEADERS include/cctz/*.h)
+
+add_library(cctz ${SOURCES})
+target_include_directories(cctz PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
+
+if(INSTALL_HEADERS)
+ install(FILES ${HEADERS} DESTINATION "include/cctz")
+endif()
+
+install(TARGETS cctz EXPORT unofficial-cctz-targets
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+install(
+ EXPORT unofficial-cctz-targets
+ FILE unofficial-cctz-config.cmake
+ NAMESPACE unofficial::
+ DESTINATION share/unofficial-cctz
+)
diff --git a/ports/cctz/CONTROL b/ports/cctz/CONTROL
new file mode 100644
index 000000000..fb125fa13
--- /dev/null
+++ b/ports/cctz/CONTROL
@@ -0,0 +1,3 @@
+Source: cctz
+Version: v2.1
+Description: two libraries that cooperate with <chrono> to give C++ programmers all the necessary tools for computing with dates, times, and time zones in a simple and correct manner.
diff --git a/ports/cctz/portfile.cmake b/ports/cctz/portfile.cmake
new file mode 100644
index 000000000..11955b365
--- /dev/null
+++ b/ports/cctz/portfile.cmake
@@ -0,0 +1,24 @@
+include(vcpkg_common_functions)
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO google/cctz
+ REF v2.1
+ SHA512 b6531ce64fdd8581944457cdeff7f9ff9c00958af51ddb262c74e08fcc076466c59c7bef1ce7edccc9512a7f4cb204e04581d287c4a9a684057fe39421c3fbc6
+ HEAD_REF master
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-cctz)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/cctz ${CURRENT_PACKAGES_DIR}/share/unofficial-cctz)
+
+vcpkg_copy_pdbs()
+
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cctz RENAME copyright)
diff --git a/ports/celero/CONTROL b/ports/celero/CONTROL
new file mode 100644
index 000000000..d40c93783
--- /dev/null
+++ b/ports/celero/CONTROL
@@ -0,0 +1,3 @@
+Source: celero
+Version: 2.1.0-1
+Description: Celero is a modern cross-platform (Windows, Linux, MacOS) Microbenchmarking library for C++.
diff --git a/ports/celero/portfile.cmake b/ports/celero/portfile.cmake
new file mode 100644
index 000000000..c942ca5d8
--- /dev/null
+++ b/ports/celero/portfile.cmake
@@ -0,0 +1,29 @@
+include(vcpkg_common_functions)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ message(STATUS "Celero currently can only be built statically")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO DigitalInBlue/Celero
+ REF v2.1.0
+ SHA512 30563567255b09a2c810d97896839589ed99d45b6c8d075fd16d1a0068457d70195a199f5c982c84784c2e03284c1eaac565253fa72b81d9e2d4102721b80221
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ OPTIONS
+ -DCELERO_ENABLE_EXPERIMENTS=OFF
+ -DCELERO_ENABLE_TESTS=OFF
+ -DCELERO_RUN_EXAMPLE_ON_BUILD=OFF
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/celero RENAME copyright)
diff --git a/ports/cereal/CONTROL b/ports/cereal/CONTROL
index 77ca17835..fc3c7921a 100644
--- a/ports/cereal/CONTROL
+++ b/ports/cereal/CONTROL
@@ -1,3 +1,3 @@
Source: cereal
-Version: 1.2.2
+Version: 1.2.2-1
Description: a header-only C++11 serialization library (built in support for binary, XML and JSon)
diff --git a/ports/ceres/CONTROL b/ports/ceres/CONTROL
index e323c4593..4dde8c0bd 100644
--- a/ports/ceres/CONTROL
+++ b/ports/ceres/CONTROL
@@ -1,4 +1,4 @@
Source: ceres
-Version: 1.13.0
+Version: 1.13.0-1
Build-Depends:suitesparse, eigen3, clapack, gflags, glog
-Description: non-linear optimization package \ No newline at end of file
+Description: non-linear optimization package
diff --git a/ports/cfitsio/CONTROL b/ports/cfitsio/CONTROL
index e45b8a8c2..b25eb8026 100644
--- a/ports/cfitsio/CONTROL
+++ b/ports/cfitsio/CONTROL
@@ -1,3 +1,3 @@
Source: cfitsio
-Version: 3.410
+Version: 3.410-1
Description: Library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format
diff --git a/ports/charls/CONTROL b/ports/charls/CONTROL
index 8be1a5027..562a6f688 100644
--- a/ports/charls/CONTROL
+++ b/ports/charls/CONTROL
@@ -1,3 +1,3 @@
Source: charls
-Version: 2.0.0
-Description: CharLS, a C++ JPEG-LS library implementation. \ No newline at end of file
+Version: 2.0.0-1
+Description: CharLS, a C++ JPEG-LS library implementation.
diff --git a/ports/chmlib/CONTROL b/ports/chmlib/CONTROL
index 22680db33..226a3be92 100644
--- a/ports/chmlib/CONTROL
+++ b/ports/chmlib/CONTROL
@@ -1,3 +1,3 @@
Source: chmlib
-Version: 0.40
+Version: 0.40-1
Description: CHMLIB is a library for dealing with Microsoft ITSS/CHM format files. Right now, it is a very simple library, but sufficient for dealing with all of the .chm files I've come across. Due to the fairly well-designed indexing built into this particular file format, even a small library is able to gain reasonably good performance indexing into ITSS archives. \ No newline at end of file
diff --git a/ports/chmlib/chm.vcxproj b/ports/chmlib/chm.vcxproj
index 61955291e..0cc2606fe 100644
--- a/ports/chmlib/chm.vcxproj
+++ b/ports/chmlib/chm.vcxproj
@@ -69,22 +69,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<!--Overriden at build time.-->
<OutDir>..\..\..\x86-windows-static-dbg\</OutDir>
- <IntDir>..\..\..\x86-windows-static-dbg\</IntDir>
+ <IntDir>..\..\..\x86-windows-static-dbg\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<!--Overriden at build time.-->
<OutDir>..\..\..\x86-windows-static-rel\</OutDir>
- <IntDir>..\..\..\x86-windows-static-rel\</IntDir>
+ <IntDir>..\..\..\x86-windows-static-rel\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<!--Overriden at build time.-->
<OutDir>..\..\..\x64-windows-static-dbg\</OutDir>
- <IntDir>..\..\..\x64-windows-static-dbg\</IntDir>
+ <IntDir>..\..\..\x64-windows-static-dbg\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<!--Overriden at build time.-->
<OutDir>..\..\..\x64-windows-static-rel\</OutDir>
- <IntDir>..\..\..\x64-windows-static-rel\</IntDir>
+ <IntDir>..\..\..\x64-windows-static-rel\$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -98,6 +98,7 @@
<CompileAs>CompileAsC</CompileAs>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<MinimalRebuild>false</MinimalRebuild>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
</ClCompile>
<Link>
<AdditionalDependencies>
@@ -112,6 +113,7 @@
<SubSystem>Windows</SubSystem>
<Verbose>true</Verbose>
<IgnoreSpecificDefaultLibraries>libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib</IgnoreSpecificDefaultLibraries>
+ <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -126,6 +128,7 @@
<CompileAs>CompileAsC</CompileAs>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<MinimalRebuild>false</MinimalRebuild>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
</ClCompile>
<Link>
<AdditionalDependencies>
@@ -138,6 +141,7 @@
<SubSystem>Windows</SubSystem>
<Verbose>true</Verbose>
<IgnoreSpecificDefaultLibraries>libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib</IgnoreSpecificDefaultLibraries>
+ <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -150,6 +154,7 @@
<DisableSpecificWarnings>4018;4057;4127;4189;4244;4267;4295;4324;4458;4477;4701;4706;4800;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<CompileAs>CompileAsC</CompileAs>
+ <Optimization>Full</Optimization>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@@ -176,6 +181,7 @@
<DisableSpecificWarnings>4018;4057;4127;4189;4244;4267;4295;4324;4458;4477;4701;4706;4800;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<CompileAs>CompileAsC</CompileAs>
+ <Optimization>Full</Optimization>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
diff --git a/ports/chmlib/enum_chmLib.vcxproj b/ports/chmlib/enum_chmLib.vcxproj
new file mode 100644
index 000000000..1b847a409
--- /dev/null
+++ b/ports/chmlib/enum_chmLib.vcxproj
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="enum_chmLib.c" />
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>15.0</VCProjectVersion>
+ <ProjectGuid>{2c833145-059b-47d5-b0fe-b3ac6ff1ccb0}</ProjectGuid>
+ <RootNamespace>enum_chmLib</RootNamespace>
+ <WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>..\..\..\x86-windows-static-rel\</OutDir>
+ <IntDir>..\..\..\x86-windows-static-rel\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>..\..\..\x64-windows-static-rel\</OutDir>
+ <IntDir>..\..\..\x64-windows-static-rel\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <MultiProcessorCompilation>false</MultiProcessorCompilation>
+ <PreprocessorDefinitions>WIN32;_UNICODE;UNICODE;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
+ <ShowIncludes>true</ShowIncludes>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>$(OutputPath)chm.lib</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <ShowProgress>LinkVerbose</ShowProgress>
+ <IgnoreSpecificDefaultLibraries>libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib</IgnoreSpecificDefaultLibraries>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <MultiProcessorCompilation>false</MultiProcessorCompilation>
+ <PreprocessorDefinitions>WIN32;_UNICODE;UNICODE;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
+ <ShowIncludes>true</ShowIncludes>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>$(OutputPath)chm.lib</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <ShowProgress>LinkVerbose</ShowProgress>
+ <IgnoreSpecificDefaultLibraries>libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib</IgnoreSpecificDefaultLibraries>
+ </Link>
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/ports/chmlib/enumdir_chmLib.vcxproj b/ports/chmlib/enumdir_chmLib.vcxproj
new file mode 100644
index 000000000..8b7d552c5
--- /dev/null
+++ b/ports/chmlib/enumdir_chmLib.vcxproj
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="enumdir_chmLib.c" />
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>15.0</VCProjectVersion>
+ <ProjectGuid>{bb0bfe9a-7d13-44a0-b2b5-3b69a07a77e8}</ProjectGuid>
+ <RootNamespace>enumdir_chmLib</RootNamespace>
+ <WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>..\..\..\x86-windows-static-rel\</OutDir>
+ <IntDir>..\..\..\x86-windows-static-rel\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>..\..\..\x64-windows-static-rel\</OutDir>
+ <IntDir>..\..\..\x64-windows-static-rel\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <MultiProcessorCompilation>false</MultiProcessorCompilation>
+ <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>$(OutputPath)chm.lib</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <ShowProgress>LinkVerbose</ShowProgress>
+ <IgnoreSpecificDefaultLibraries>libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib</IgnoreSpecificDefaultLibraries>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <MultiProcessorCompilation>false</MultiProcessorCompilation>
+ <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>$(OutputPath)chm.lib</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <ShowProgress>LinkVerbose</ShowProgress>
+ <IgnoreSpecificDefaultLibraries>libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib</IgnoreSpecificDefaultLibraries>
+ </Link>
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/ports/chmlib/extract_chmLib.vcxproj b/ports/chmlib/extract_chmLib.vcxproj
new file mode 100644
index 000000000..a4666ed64
--- /dev/null
+++ b/ports/chmlib/extract_chmLib.vcxproj
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>15.0</VCProjectVersion>
+ <ProjectGuid>{8F41248C-8E62-4822-9A85-4CAF00AACEEE}</ProjectGuid>
+ <RootNamespace>extract_chmLib</RootNamespace>
+ <WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>..\..\..\x86-windows-static-rel\</OutDir>
+ <IntDir>..\..\..\x86-windows-static-rel\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>..\..\..\x64-windows-static-rel\</OutDir>
+ <IntDir>..\..\..\x64-windows-static-rel\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <MultiProcessorCompilation>false</MultiProcessorCompilation>
+ <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>$(OutputPath)chm.lib</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <ShowProgress>LinkVerbose</ShowProgress>
+ <IgnoreSpecificDefaultLibraries>libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib</IgnoreSpecificDefaultLibraries>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <MultiProcessorCompilation>false</MultiProcessorCompilation>
+ <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>$(OutputPath)chm.lib</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <ShowProgress>LinkVerbose</ShowProgress>
+ <IgnoreSpecificDefaultLibraries>libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib</IgnoreSpecificDefaultLibraries>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="extract_chmLib.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/ports/chmlib/portfile.cmake b/ports/chmlib/portfile.cmake
index cb2f2cf96..60381bb1a 100644
--- a/ports/chmlib/portfile.cmake
+++ b/ports/chmlib/portfile.cmake
@@ -1,26 +1,6 @@
-# Common Ambient Variables:
-# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
-# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
-# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
-# PORT = current port name (zlib, etc)
-# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
-# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
-# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
-# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
-# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
-#
-
-#message("VCPKG_TARGET_ARCHITECTURE" ${VCPKG_TARGET_ARCHITECTURE})
-#if(NOT ${VCPKG_TARGET_ARCHITECTURE} STREQUAL "x86")
-# message(FATAL_ERROR "chmlib only supports x86")
-#endif()
-
-if(${VCPKG_CRT_LINKAGE} STREQUAL "dynamic")
- message(FATAL_ERROR "chmlib supports static linking only.")
-endif()
-
-if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic")
- message(FATAL_ERROR "chmlib supports static linking only.")
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(STATUS "Warning: Dynamic building not supported. Building static.")
+ set(VCPKG_LIBRARY_LINKAGE static)
endif()
set(CHMLIB_VERSION chmlib-0.40)
@@ -37,21 +17,50 @@ vcpkg_download_distfile(
)
vcpkg_extract_source_archive(${ARCHIVE})
-file(COPY "${VCPKG_ROOT_DIR}/ports/${PORT}/chm.vcxproj"
- DESTINATION ${CHMLIB_SRC})
+file(GLOB VCXPROJS "${VCPKG_ROOT_DIR}/ports/${PORT}/*.vcxproj")
+file(COPY ${VCXPROJS} DESTINATION ${CHMLIB_SRC})
vcpkg_build_msbuild(
PROJECT_PATH ${CHMLIB_SRC}/chm.vcxproj
RELEASE_CONFIGURATION Release
DEBUG_CONFIGURATION Debug
- OPTIONS_DEBUG /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel"
- OPTIONS_RELEASE /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"
- OPTIONS /v:diagnostic /p:SkipInvalidConfigurations=true
+ TARGET Build
+ OPTIONS /v:diagnostic
+)
+
+#enum_chmLib RELEASE only
+vcpkg_build_msbuild(
+ PROJECT_PATH ${CHMLIB_SRC}/enum_chmLib.vcxproj
+ RELEASE_CONFIGURATION Release
+ DEBUG_CONFIGURATION Release
+ TARGET Build
+ OPTIONS /v:diagnostic
+)
+
+#enumdir_chmLib RELEASE only
+vcpkg_build_msbuild(
+ PROJECT_PATH ${CHMLIB_SRC}/enumdir_chmLib.vcxproj
+ RELEASE_CONFIGURATION Release
+ DEBUG_CONFIGURATION Release
+ TARGET Build
+ OPTIONS /v:diagnostic
+)
+
+#extract_chmLib RELEASE only
+vcpkg_build_msbuild(
+ PROJECT_PATH ${CHMLIB_SRC}/extract_chmLib.vcxproj
+ RELEASE_CONFIGURATION Release
+ DEBUG_CONFIGURATION Release
+ TARGET Build
+ OPTIONS /v:diagnostic
)
file(INSTALL ${CHMLIB_SRC}/chm_lib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
-file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/chm.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
-file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/chm.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+file(INSTALL ${CURRENT_BUILDTREES_DIR}/${VCPKG_TARGET_ARCHITECTURE}-windows-static-rel/chm.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+file(INSTALL ${CURRENT_BUILDTREES_DIR}/${VCPKG_TARGET_ARCHITECTURE}-windows-static-dbg/chm.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+file(INSTALL ${CURRENT_BUILDTREES_DIR}/${VCPKG_TARGET_ARCHITECTURE}-windows-static-rel/enum_chmLib.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
+file(INSTALL ${CURRENT_BUILDTREES_DIR}/${VCPKG_TARGET_ARCHITECTURE}-windows-static-rel/enumdir_chmLib.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
+file(INSTALL ${CURRENT_BUILDTREES_DIR}/${VCPKG_TARGET_ARCHITECTURE}-windows-static-rel/extract_chmLib.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
file(COPY ${CURRENT_BUILDTREES_DIR}/src/chmlib-0.40/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/chmlib)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/chmlib/COPYING ${CURRENT_PACKAGES_DIR}/share/chmlib/copyright) \ No newline at end of file
diff --git a/ports/clapack/CONTROL b/ports/clapack/CONTROL
index cb470e4cd..503ddbac5 100644
--- a/ports/clapack/CONTROL
+++ b/ports/clapack/CONTROL
@@ -1,4 +1,4 @@
Source: clapack
-Version: 3.2.1
+Version: 3.2.1-1
Description: CLAPACK (f2c'ed version of LAPACK)
Build-Depends: openblas
diff --git a/ports/clockutils/CONTROL b/ports/clockutils/CONTROL
index 8f88e71ec..59950365d 100644
--- a/ports/clockutils/CONTROL
+++ b/ports/clockutils/CONTROL
@@ -1,3 +1,3 @@
Source: clockutils
-Version: 1.1.1-3651f232c27074c4ceead169e223edf5f00247c5
+Version: 1.1.1-3651f232c27074c4ceead169e223edf5f00247c5-1
Description: A lightweight c++ library for commonly needed tasks. Optimized for simplicity and speed.
diff --git a/ports/console-bridge/CONTROL b/ports/console-bridge/CONTROL
new file mode 100644
index 000000000..ea6ebf3ba
--- /dev/null
+++ b/ports/console-bridge/CONTROL
@@ -0,0 +1,3 @@
+Source: console-bridge
+Version: 0.3.2-2
+Description: a ROS-independent package for logging that seamlessly pipes into rosconsole/rosout for ROS-dependent packages.
diff --git a/ports/console-bridge/License.txt b/ports/console-bridge/License.txt
new file mode 100644
index 000000000..affcb8568
--- /dev/null
+++ b/ports/console-bridge/License.txt
@@ -0,0 +1,31 @@
+Software License Agreement (BSD License)
+
+Copyright (c) 2008, Willow Garage, Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+* Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+* Neither the name of the Willow Garage nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file
diff --git a/ports/console-bridge/portfile.cmake b/ports/console-bridge/portfile.cmake
new file mode 100644
index 000000000..d88308e5c
--- /dev/null
+++ b/ports/console-bridge/portfile.cmake
@@ -0,0 +1,24 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO ros/console_bridge
+ REF 0.3.2
+ SHA512 41fa5340d7ba79c887ef73eb4fda7b438ed91febd224934ae4658697e4c9e43357207e1b3e191ecce3c97cb9a87b0556372832735a268261bc798cc7683aa207
+ HEAD_REF master
+ )
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake")
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/console-bridge ${CURRENT_PACKAGES_DIR}/share/console_bridge)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/console-bridge RENAME copyright)
diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL
index d8fb3681a..2d262a0e0 100644
--- a/ports/corrade/CONTROL
+++ b/ports/corrade/CONTROL
@@ -1,3 +1,3 @@
Source: corrade
-Version: jun2017-2
+Version: jun2017-3
Description: C++11/C++14 multiplatform utility library http://mosra.cz/blog/corrade.php
diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake
index 3ae3710f6..88b27ab62 100644
--- a/ports/corrade/portfile.cmake
+++ b/ports/corrade/portfile.cmake
@@ -3,7 +3,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mosra/corrade
REF c182fe636894a998f241212d0205d0c126b7926f
- SHA512 e62486368eab9c5f90ef9f4af91500f465d9e3baa6e5f6e9f2a49844d09676faefcb965a9d5b27a54eda19436af6b23dcda19504be6cd0dcd52dfad2ad4bfa21
+ SHA512 d664c7884c0c6c7977261a851948b2b591ac0fbdbcfddab1d8e578e629a252f48fa786cf9f96525e10aa76c95919dfc3452ccbe5e930aa4a69e61269e4ee07ee
HEAD_REF master
)
@@ -44,4 +44,4 @@ endif()
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/corrade)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/corrade/COPYING ${CURRENT_PACKAGES_DIR}/share/corrade/copyright)
-vcpkg_copy_pdbs() \ No newline at end of file
+vcpkg_copy_pdbs()
diff --git a/ports/cpp-redis/CONTROL b/ports/cpp-redis/CONTROL
index 36b2e8b55..554755b57 100644
--- a/ports/cpp-redis/CONTROL
+++ b/ports/cpp-redis/CONTROL
@@ -1,4 +1,4 @@
Source: cpp-redis
-Version: 3.5.2-1
+Version: 3.5.2-2
Build-Depends: tacopie
Description: cpp-redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations and pipelining.
diff --git a/ports/cppcms/CONTROL b/ports/cppcms/CONTROL
index 74deb6633..8f8726ddc 100644
--- a/ports/cppcms/CONTROL
+++ b/ports/cppcms/CONTROL
@@ -1,4 +1,4 @@
Source: cppcms
-Version: 1.1.0
+Version: 1.1.0-1
Description: CppCMS is a Free High Performance Web Development Framework (not a CMS) aimed at Rapid Web Application Development
Build-Depends: icu, pcre, openssl, zlib
diff --git a/ports/cpprestsdk/0003_openssl_110.patch b/ports/cpprestsdk/0003_openssl_110.patch
new file mode 100644
index 000000000..b2b361187
--- /dev/null
+++ b/ports/cpprestsdk/0003_openssl_110.patch
@@ -0,0 +1,14 @@
+diff --git a/Release/src/websockets/client/ws_client_wspp.cpp b/Release/src/websockets/client/ws_client_wspp.cpp
+index 9f91d68..4b5d506 100644
+--- a/Release/src/websockets/client/ws_client_wspp.cpp
++++ b/Release/src/websockets/client/ws_client_wspp.cpp
+@@ -76,7 +76,9 @@ static struct ASIO_SSL_memory_leak_suppress
+ {
+ ~ASIO_SSL_memory_leak_suppress()
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ ::SSL_COMP_free_compression_methods();
++#endif
+ }
+ } ASIO_SSL_memory_leak_suppressor;
+
diff --git a/ports/cpprestsdk/CONTROL b/ports/cpprestsdk/CONTROL
index f34f1ad4a..9831af585 100644
--- a/ports/cpprestsdk/CONTROL
+++ b/ports/cpprestsdk/CONTROL
@@ -1,5 +1,5 @@
Source: cpprestsdk
-Version: 2.9.0-2
+Version: 2.9.0-4
Build-Depends: zlib (windows), openssl (windows), boost (windows), websocketpp (windows)
Description: C++11 JSON, REST, and OAuth library
- The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services. \ No newline at end of file
+ The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
diff --git a/ports/cpprestsdk/portfile.cmake b/ports/cpprestsdk/portfile.cmake
index ea7d8d201..83b38a92d 100644
--- a/ports/cpprestsdk/portfile.cmake
+++ b/ports/cpprestsdk/portfile.cmake
@@ -4,7 +4,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Microsoft/cpprestsdk
REF v2.9.0
- SHA512 c75de6ad33b3e8d2c6ba7c0955ed851d557f78652fb38a565de0cfbc99e7db89cb6fa405857512e5149df80356c51ae9335abd914c3c593fa6658ac50adf4e29
+ SHA512 7f6af05e2aaf49fb5ba24f4fac43b7787345d46913831504925cefc60d1b62e38457e1d628d5de8b0db891b59716d2bfe63a494ca0b337d67fc9ca5447a5ba9b
HEAD_REF master
)
if(NOT VCPKG_USE_HEAD_VERSION)
@@ -13,6 +13,7 @@ if(NOT VCPKG_USE_HEAD_VERSION)
PATCHES
${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch
${CMAKE_CURRENT_LIST_DIR}/0002_no_websocketpp_in_uwp.patch
+ ${CMAKE_CURRENT_LIST_DIR}/0003_openssl_110.patch
)
endif()
diff --git a/ports/cppwinrt/CONTROL b/ports/cppwinrt/CONTROL
index e49eefe99..e470b2458 100644
--- a/ports/cppwinrt/CONTROL
+++ b/ports/cppwinrt/CONTROL
@@ -1,3 +1,3 @@
Source: cppwinrt
-Version: feb2017_refresh-14393
+Version: spring_2017_creators_update_for_vs_15.3
Description: C++/WinRT is a standard C++ language projection for the Windows Runtime.
diff --git a/ports/cppwinrt/portfile.cmake b/ports/cppwinrt/portfile.cmake
index b0e808c84..c83465efe 100644
--- a/ports/cppwinrt/portfile.cmake
+++ b/ports/cppwinrt/portfile.cmake
@@ -1,18 +1,18 @@
include(vcpkg_common_functions)
find_program(GIT git)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppwinrt-february_2017_refresh)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppwinrt-spring_2017_creators_update_for_vs_15.3)
vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/Microsoft/cppwinrt/archive/february_2017_refresh.tar.gz"
- FILENAME "cppwinrt-february_2017_refresh.tar.gz"
- SHA512 0e2ed94d65ae4c7297ae4d82d64a43fa59fac7b35fbe42ea939f135f0f6eb867f57fac70b6a9cc9a78912de75aa4482d48007f83a3781b147d237ae637fdaa0e
+ URLS "https://github.com/Microsoft/cppwinrt/archive/spring_2017_creators_update_for_vs_15.3.tar.gz"
+ FILENAME "cppwinrt-spring_2017_creators_update_for_vs_15.3.tar.gz"
+ SHA512 779586122552e49a79aff08f4476905e00c3b4ad3dbc502240e9a7cc59ec0e4ab6304149a66505923ab84d2b334059de9e18c84a5b0ed6bde106d19119ef911f
)
vcpkg_extract_source_archive(${ARCHIVE})
# Put the licence file where vcpkg expects it
-file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt)
+file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt ${CURRENT_PACKAGES_DIR}/share/cppwinrt/copyright)
# Copy the cppwinrt header files
-file(GLOB HEADER_FILES ${SOURCE_PATH}/10.0.14393.0/winrt/*)
+file(GLOB HEADER_FILES ${SOURCE_PATH}/10.0.15063.0/winrt/*)
file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/winrt)
diff --git a/ports/cpr/CONTROL b/ports/cpr/CONTROL
index 417850b75..f79ef823c 100644
--- a/ports/cpr/CONTROL
+++ b/ports/cpr/CONTROL
@@ -1,4 +1,4 @@
Source: cpr
-Version: 1.3.0
+Version: 1.3.0-1
Description: C++ Requests is a simple wrapper around libcurl inspired by the excellent Python Requests project.
Build-Depends: curl
diff --git a/ports/cryptopp/CONTROL b/ports/cryptopp/CONTROL
index 2a38d8910..00d14756a 100644
--- a/ports/cryptopp/CONTROL
+++ b/ports/cryptopp/CONTROL
@@ -1,3 +1,3 @@
Source: cryptopp
-Version: 5.6.5
+Version: 5.6.5-1
Description: Crypto++ is a free C++ class library of cryptographic schemes.
diff --git a/ports/ctemplate/CONTROL b/ports/ctemplate/CONTROL
index 5e9e69753..1125efc18 100644
--- a/ports/ctemplate/CONTROL
+++ b/ports/ctemplate/CONTROL
@@ -1,3 +1,3 @@
Source: ctemplate
-Version: 2017-06-23-44b7c5-2
+Version: 2017-06-23-44b7c5-3
Description: C++ CTemplate system
diff --git a/ports/ctemplate/portfile.cmake b/ports/ctemplate/portfile.cmake
index af1f0532c..d22c3afa4 100644
--- a/ports/ctemplate/portfile.cmake
+++ b/ports/ctemplate/portfile.cmake
@@ -1,27 +1,20 @@
include(vcpkg_common_functions)
-set(GIT_REF 44b7c5b918a08ad561c63e9d28beecb40c10ebca)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO OlafvdSpek/ctemplate
- REF 44b7c5b918a08ad561c63e9d28beecb40c10ebca
- SHA512 b572f6d0d182e977d3a459e68bde6244dad7196c44c16407990dc1fb6a7a93bcd8d6851e515d50b6051c1d011f71695f895f6ab233664baadae0bf6a3d464305
+ REF 4b7e6c52dc7cbb4d51c9abcebcbac91ec256a62b
+ SHA512 9317fb26f22892b0bc2ca17cbccb5b084091050aa88766b4ed673a690bc4cdb9cd882134fbcd7ed3ee156f6a6937218717765143796d7e98b532355867ed042b
HEAD_REF master
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
-vcpkg_find_acquire_program(PYTHON2)
-
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/fix-msvc.patch
-)
+vcpkg_find_acquire_program(PYTHON3)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
- OPTIONS -DPYTHON_EXECUTABLE=${PYTHON2}
+ OPTIONS -DPYTHON_EXECUTABLE=${PYTHON3}
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
)
diff --git a/ports/cunit/CONTROL b/ports/cunit/CONTROL
index 3ef430092..4b43a0159 100644
--- a/ports/cunit/CONTROL
+++ b/ports/cunit/CONTROL
@@ -1,3 +1,3 @@
Source: cunit
-Version: 2.1.3-1
+Version: 2.1.3-2
Description: CUnit is a lightweight system for writing, administering, and running unit tests in C. It provides C programmers a basic testing functionality with a flexible variety of user interfaces
diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL
index d7da6511c..1193e114f 100644
--- a/ports/curl/CONTROL
+++ b/ports/curl/CONTROL
@@ -1,4 +1,4 @@
Source: curl
-Version: 7.55.1
+Version: 7.55.1-1
Build-Depends: zlib, openssl, libssh2
Description: A library for transferring data with URLs
diff --git a/ports/date/CMakeLists.txt b/ports/date/CMakeLists.txt
new file mode 100644
index 000000000..91fcab1c7
--- /dev/null
+++ b/ports/date/CMakeLists.txt
@@ -0,0 +1,30 @@
+cmake_minimum_required(VERSION 3.5.1)
+project(tz CXX)
+
+if(MSVC)
+ add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
+endif()
+
+add_definitions(-DNOMINMAX)
+
+
+include_directories(".")
+
+add_library(tz tz.cpp)
+
+if(BUILD_SHARED_LIBS)
+ target_compile_definitions(tz PRIVATE -DDATE_BUILD_DLL)
+else()
+ target_compile_definitions(tz PRIVATE -DDATE_BUILD_LIB)
+endif()
+
+install(
+ TARGETS tz
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES date.h tz.h julian.h iso_week.h islamic.h DESTINATION include)
+endif()
diff --git a/ports/date/CONTROL b/ports/date/CONTROL
new file mode 100644
index 000000000..8eab618c2
--- /dev/null
+++ b/ports/date/CONTROL
@@ -0,0 +1,3 @@
+Source: date
+Version: 2.2
+Description: A date and time library based on the C++11/14/17 <chrono> header
diff --git a/ports/date/portfile.cmake b/ports/date/portfile.cmake
new file mode 100644
index 000000000..f73c72b52
--- /dev/null
+++ b/ports/date/portfile.cmake
@@ -0,0 +1,38 @@
+include(vcpkg_common_functions)
+
+message(WARNING
+ "You will need to also install http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml into your install location"
+ "See https://howardhinnant.github.io/date/tz.html"
+)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO HowardHinnant/date
+ REF 272d487b3d490126e520b67fe76bbb2e67226c07
+ SHA512 59e8ff642d3eb82cb6116a77d4c5e14bbc2ae6bd4019e64a49609b6e46d679c2cb4ccae74807b72223aed18ae015596193919cdb58b011bfb774ff3e29a1d43b
+ HEAD_REF master
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+
+vcpkg_copy_pdbs()
+
+set(HEADER "${CURRENT_PACKAGES_DIR}/include/tz.h")
+file(READ "${HEADER}" _contents)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ string(REPLACE "DATE_BUILD_DLL" "1" _contents "${_contents}")
+else()
+ string(REPLACE "DATE_BUILD_LIB" "1" _contents "${_contents}")
+endif()
+file(WRITE "${HEADER}" "${_contents}")
+
+
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/date RENAME copyright)
diff --git a/ports/dimcli/CONTROL b/ports/dimcli/CONTROL
index 295c1ecda..2b108239d 100644
--- a/ports/dimcli/CONTROL
+++ b/ports/dimcli/CONTROL
@@ -1,3 +1,3 @@
Source: dimcli
-Version: 2.0.0
+Version: 2.0.0-1
Description: C++ command line parser toolkit
diff --git a/ports/dlfcn-win32/CONTROL b/ports/dlfcn-win32/CONTROL
index 2d73fc36c..c8fd02dce 100644
--- a/ports/dlfcn-win32/CONTROL
+++ b/ports/dlfcn-win32/CONTROL
@@ -1,3 +1,3 @@
Source: dlfcn-win32
-Version: 1.1.1
+Version: 1.1.1-1
Description: dlfcn-win32 is an implementation of dlfcn for Windows.
diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL
index d9db5b99d..ce39fcb1b 100644
--- a/ports/dlib/CONTROL
+++ b/ports/dlib/CONTROL
@@ -1,4 +1,4 @@
Source: dlib
-Version: 19.4-4
+Version: 19.4-5
Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3
Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++
diff --git a/ports/double-conversion/CONTROL b/ports/double-conversion/CONTROL
index 2ab2391e7..8ef2de918 100644
--- a/ports/double-conversion/CONTROL
+++ b/ports/double-conversion/CONTROL
@@ -1,3 +1,3 @@
Source: double-conversion
-Version: 3.0.0
+Version: 3.0.0-1
Description: Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles.
diff --git a/ports/draco/CONTROL b/ports/draco/CONTROL
index f8ce4ba96..44fbde429 100644
--- a/ports/draco/CONTROL
+++ b/ports/draco/CONTROL
@@ -1,4 +1,4 @@
Source: draco
-Version: 0.10.0
+Version: 0.10.0-1
Description: A library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.
-Build-Depends: \ No newline at end of file
+Build-Depends:
diff --git a/ports/duktape/CONTROL b/ports/duktape/CONTROL
index 74b01d4cf..b0f599dd8 100644
--- a/ports/duktape/CONTROL
+++ b/ports/duktape/CONTROL
@@ -1,4 +1,4 @@
Source: duktape
-Version: 2.0.3-3
+Version: 2.0.3-4
Description: Embeddable Javascript engine with a focus on portability and compact footprint.
Build-Depends:
diff --git a/ports/eastl/CONTROL b/ports/eastl/CONTROL
new file mode 100644
index 000000000..d43d7203e
--- /dev/null
+++ b/ports/eastl/CONTROL
@@ -0,0 +1,4 @@
+Source: eastl
+Version: 3.05.08
+Description: Electronic Arts Standard Template Library.
+ It is a C++ template library of containers, algorithms, and iterators useful for runtime and tool development across multiple platforms. It is a fairly extensive and robust implementation of such a library and has an emphasis on high performance above all other considerations.
diff --git a/ports/eastl/portfile.cmake b/ports/eastl/portfile.cmake
new file mode 100644
index 000000000..19fb6e51c
--- /dev/null
+++ b/ports/eastl/portfile.cmake
@@ -0,0 +1,29 @@
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(STATUS "Warning: Dynamic building not supported by EASTL. Building static.")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/eastl)
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO electronicarts/EASTL
+ REF 3.05.08
+ SHA512 7b9e87d967252026a660a648688a19e7b88d4eca7f373ba7427b315103a6f8cea555a85b2ef74557cf7e8a486b847589cac4b622b4ab88cab7c0f0a22355ab66
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+vcpkg_copy_pdbs()
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/eastl RENAME copyright)
+file(INSTALL ${SOURCE_PATH}/3RDPARTYLICENSES.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/eastl)
diff --git a/ports/ecm/CONTROL b/ports/ecm/CONTROL
index e124c960e..12a9fd8a9 100644
--- a/ports/ecm/CONTROL
+++ b/ports/ecm/CONTROL
@@ -1,3 +1,3 @@
Source: ecm
-Version: 5.37.0
+Version: 5.37.0-1
Description: Extra CMake Modules (ECM), extra modules and scripts for CMake
diff --git a/ports/eigen3/CONTROL b/ports/eigen3/CONTROL
index 9920801cf..1e61ce95f 100644
--- a/ports/eigen3/CONTROL
+++ b/ports/eigen3/CONTROL
@@ -1,3 +1,3 @@
Source: eigen3
-Version: 3.3.4
+Version: 3.3.4-1
Description: C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.
diff --git a/ports/embree/CONTROL b/ports/embree/CONTROL
index 3f4ff53a1..3c9ac0c7c 100644
--- a/ports/embree/CONTROL
+++ b/ports/embree/CONTROL
@@ -1,4 +1,4 @@
Source: embree
-Version: 2.16.4-1
+Version: 2.16.4-2
Description: High Performance Ray Tracing Kernels.
Build-Depends: tbb
diff --git a/ports/enet/CMakeLists.txt b/ports/enet/CMakeLists.txt
new file mode 100644
index 000000000..012e21d64
--- /dev/null
+++ b/ports/enet/CMakeLists.txt
@@ -0,0 +1,81 @@
+cmake_minimum_required(VERSION 2.6)
+
+project(enet)
+
+# The "configure" step.
+include(CheckFunctionExists)
+include(CheckStructHasMember)
+include(CheckTypeSize)
+check_function_exists("fcntl" HAS_FCNTL)
+check_function_exists("poll" HAS_POLL)
+check_function_exists("getaddrinfo" HAS_GETADDRINFO)
+check_function_exists("getnameinfo" HAS_GETNAMEINFO)
+check_function_exists("gethostbyname_r" HAS_GETHOSTBYNAME_R)
+check_function_exists("gethostbyaddr_r" HAS_GETHOSTBYADDR_R)
+check_function_exists("inet_pton" HAS_INET_PTON)
+check_function_exists("inet_ntop" HAS_INET_NTOP)
+check_struct_has_member("struct msghdr" "msg_flags" "sys/types.h;sys/socket.h" HAS_MSGHDR_FLAGS)
+set(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h" "sys/socket.h")
+check_type_size("socklen_t" HAS_SOCKLEN_T BUILTIN_TYPES_ONLY)
+unset(CMAKE_EXTRA_INCLUDE_FILES)
+if(MSVC)
+ add_definitions(-W3)
+else()
+ add_definitions(-Wno-error)
+endif()
+
+if(HAS_FCNTL)
+ add_definitions(-DHAS_FCNTL=1)
+endif()
+if(HAS_POLL)
+ add_definitions(-DHAS_POLL=1)
+endif()
+if(HAS_GETNAMEINFO)
+ add_definitions(-DHAS_GETNAMEINFO=1)
+endif()
+if(HAS_GETADDRINFO)
+ add_definitions(-DHAS_GETADDRINFO=1)
+endif()
+if(HAS_GETHOSTBYNAME_R)
+ add_definitions(-DHAS_GETHOSTBYNAME_R=1)
+endif()
+if(HAS_GETHOSTBYADDR_R)
+ add_definitions(-DHAS_GETHOSTBYADDR_R=1)
+endif()
+if(HAS_INET_PTON)
+ add_definitions(-DHAS_INET_PTON=1)
+endif()
+if(HAS_INET_NTOP)
+ add_definitions(-DHAS_INET_NTOP=1)
+endif()
+if(HAS_MSGHDR_FLAGS)
+ add_definitions(-DHAS_MSGHDR_FLAGS=1)
+endif()
+if(HAS_SOCKLEN_T)
+ add_definitions(-DHAS_SOCKLEN_T=1)
+endif()
+
+include_directories(${PROJECT_SOURCE_DIR}/include)
+
+add_library(enet STATIC
+ callbacks.c
+ compress.c
+ host.c
+ list.c
+ packet.c
+ peer.c
+ protocol.c
+ unix.c
+ win32.c
+ )
+
+if (WIN32)
+ target_link_libraries(enet winmm ws2_32)
+endif()
+
+install(TARGETS enet ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin)
+
+install(DIRECTORY include/
+ DESTINATION include) \ No newline at end of file
diff --git a/ports/enet/CONTROL b/ports/enet/CONTROL
new file mode 100644
index 000000000..f75b49de9
--- /dev/null
+++ b/ports/enet/CONTROL
@@ -0,0 +1,4 @@
+Source: enet
+Version: 1.3.13
+Description: Reliable UDP networking library
+
diff --git a/ports/enet/portfile.cmake b/ports/enet/portfile.cmake
new file mode 100644
index 000000000..2a7fa4585
--- /dev/null
+++ b/ports/enet/portfile.cmake
@@ -0,0 +1,38 @@
+# Common Ambient Variables:
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
+# PORT = current port name (zlib, etc)
+# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
+# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
+# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
+#
+
+include(vcpkg_common_functions)
+vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
+ REPO "lsalzman/enet"
+ REF f7c46f03fd8d883ac2811948aa71c7623069d070
+ HEAD_REF master
+ SHA512 2d5593ea56473b38479921fd0849318bf3ecb233f92fa487ba395a0bb7e6a3997109287867a67c66721f761a30cceab4ba4709080a93ed977b7650b10cab1936
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
+ # OPTIONS_RELEASE -DOPTIMIZE=1
+ # OPTIONS_DEBUG -DDEBUGGABLE=1
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/enet RENAME copyright)
+
+vcpkg_copy_pdbs() \ No newline at end of file
diff --git a/ports/entityx/CONTROL b/ports/entityx/CONTROL
index f522fe702..cbf618e0a 100644
--- a/ports/entityx/CONTROL
+++ b/ports/entityx/CONTROL
@@ -1,3 +1,3 @@
Source: entityx
-Version: 1.2.0
+Version: 1.2.0-1
Description: EntityX - A fast, type-safe C++ Entity-Component system. <https://github.com/alecthomas/entityx>
diff --git a/ports/evpp/CONTROL b/ports/evpp/CONTROL
index 1f9f3a443..163052ae0 100644
--- a/ports/evpp/CONTROL
+++ b/ports/evpp/CONTROL
@@ -1,4 +1,4 @@
Source: evpp
-Version: 0.6.1
+Version: 0.6.1-1
Description: A modern C++ network library based on libevent for developing high performance network services in TCP/UDP/HTTP protocols.
Build-Depends: glog, libevent
diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL
new file mode 100644
index 000000000..4db8e73ee
--- /dev/null
+++ b/ports/exiv2/CONTROL
@@ -0,0 +1,4 @@
+Source: exiv2
+Version: 4f4add2cdcbe73af7098122a509dff0739d15908
+Build-Depends:zlib, expat
+Description: Image metadata library and tools http://www.exiv2.org
diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake
new file mode 100644
index 000000000..f9aff3e93
--- /dev/null
+++ b/ports/exiv2/portfile.cmake
@@ -0,0 +1,29 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO Exiv2/exiv2
+ REF 4f4add2cdcbe73af7098122a509dff0739d15908
+ SHA512 32207cfd7ac932942562e062e851d7ba9be5586f33c2d924fb2a908a78f0c53f0d2973108c49bc865a3e7697a04a4b65d991441e4b89baca82b51b61affd4fa3
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+)
+
+vcpkg_install_cmake()
+
+vcpkg_copy_pdbs()
+
+# Clean
+file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe)
+file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
+file(REMOVE ${EXE})
+file(REMOVE ${DEBUG_EXE})
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/ABOUT-NLS DESTINATION ${CURRENT_PACKAGES_DIR}/share/exiv2)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/exiv2/ABOUT-NLS ${CURRENT_PACKAGES_DIR}/share/exiv2/copyright)
diff --git a/ports/expat/CONTROL b/ports/expat/CONTROL
index f833c3cf0..450b8e61d 100644
--- a/ports/expat/CONTROL
+++ b/ports/expat/CONTROL
@@ -1,3 +1,3 @@
Source: expat
-Version: 2.2.4-1
+Version: 2.2.4-2
Description: XML parser library written in C
diff --git a/ports/fadbad/CONTROL b/ports/fadbad/CONTROL
new file mode 100644
index 000000000..ebf987962
--- /dev/null
+++ b/ports/fadbad/CONTROL
@@ -0,0 +1,3 @@
+Source: fadbad
+Version: 2.1.0
+Description: FADBAD++ Templates for Automatic Differentiation
diff --git a/ports/fadbad/portfile.cmake b/ports/fadbad/portfile.cmake
new file mode 100644
index 000000000..af9721962
--- /dev/null
+++ b/ports/fadbad/portfile.cmake
@@ -0,0 +1,18 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FADBAD++)
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://www.fadbad.com/download/FADBAD++-2.1.tar.gz"
+ FILENAME "FADBAD++-2.1.tar.gz"
+ SHA512 7a82c51c03acb0806d673853f391379ea974e304c831ee15ef05a90c30661736ff572481b5b8254b2646c63968043ee90a06cba88261b87fc34d01f92403360a
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(INSTALL
+ ${SOURCE_PATH}/tadiff.h
+ ${SOURCE_PATH}/fadbad.h
+ ${SOURCE_PATH}/fadiff.h
+ ${SOURCE_PATH}/badiff.h
+ DESTINATION ${CURRENT_PACKAGES_DIR}/include
+)
+
+file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/fadbad RENAME copyright)
diff --git a/ports/fastlz/CONTROL b/ports/fastlz/CONTROL
index 089ba333e..51c95cec8 100644
--- a/ports/fastlz/CONTROL
+++ b/ports/fastlz/CONTROL
@@ -1,3 +1,3 @@
Source: fastlz
-Version: 1.0
+Version: 1.0-1
Description: A lightning-fast lossless compression library
diff --git a/ports/fcl/CONTROL b/ports/fcl/CONTROL
index c83593cb3..daadff075 100644
--- a/ports/fcl/CONTROL
+++ b/ports/fcl/CONTROL
@@ -1,4 +1,4 @@
Source: fcl
-Version: 0.5.0-1
+Version: 0.5.0-2
Description: a library for performing three types of proximity queries on a pair of geometric models composed of triangles
-Build-Depends: boost, ccd, octomap \ No newline at end of file
+Build-Depends: boost, ccd, octomap
diff --git a/ports/ffmpeg/build.sh b/ports/ffmpeg/build.sh
index 3474a111e..eea05c959 100644
--- a/ports/ffmpeg/build.sh
+++ b/ports/ffmpeg/build.sh
@@ -1,6 +1,13 @@
#!/usr/bin/bash
set -e
export PATH=/usr/bin:$PATH
+# Export HTTP(S)_PROXY as http(s)_proxy:
+if [ "$HTTP_PROXY" ]; then
+ export http_proxy=$HTTP_PROXY
+fi
+if [ "$HTTPS_PROXY" ]; then
+ export https_proxy=$HTTPS_PROXY
+fi
pacman -Sy --noconfirm --needed diffutils make
PATH_TO_BUILD_DIR="`cygpath "$1"`"
diff --git a/ports/fftw3/CONTROL b/ports/fftw3/CONTROL
index b4fba283d..50513df27 100644
--- a/ports/fftw3/CONTROL
+++ b/ports/fftw3/CONTROL
@@ -1,3 +1,3 @@
Source: fftw3
-Version: 3.3.6-p12
+Version: 3.3.6-p12-1
Description: FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST).
diff --git a/ports/flann/CONTROL b/ports/flann/CONTROL
index f4a062981..b70472913 100644
--- a/ports/flann/CONTROL
+++ b/ports/flann/CONTROL
@@ -1,3 +1,3 @@
Source: flann
-Version: 1.9.1-5
+Version: 1.9.1-6
Description: Fast Library for Approximate Nearest Neighbors
diff --git a/ports/flatbuffers/CONTROL b/ports/flatbuffers/CONTROL
index e68024e91..5611e4945 100644
--- a/ports/flatbuffers/CONTROL
+++ b/ports/flatbuffers/CONTROL
@@ -1,4 +1,4 @@
Source: flatbuffers
-Version: 1.7.1
+Version: 1.7.1-1
Description: Memory Efficient Serialization Library http://google.github.io/flatbuffers/
- FlatBuffers is an efficient cross platform serialization library for games and other memory constrained apps. It allows you to directly access serialized data without unpacking/parsing it first, while still having great forwards/backwards compatibility. \ No newline at end of file
+ FlatBuffers is an efficient cross platform serialization library for games and other memory constrained apps. It allows you to directly access serialized data without unpacking/parsing it first, while still having great forwards/backwards compatibility.
diff --git a/ports/fltk/CONTROL b/ports/fltk/CONTROL
index 2b4f00629..8261b63a5 100644
--- a/ports/fltk/CONTROL
+++ b/ports/fltk/CONTROL
@@ -1,4 +1,4 @@
Source: fltk
-Version: 1.3.4-4
+Version: 1.3.4-5
Description: FLTK (pronounced fulltick) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL and its built-in GLUT emulation.
-Build-Depends: zlib, libpng, libjpeg-turbo \ No newline at end of file
+Build-Depends: zlib, libpng, libjpeg-turbo
diff --git a/ports/fmt/CONTROL b/ports/fmt/CONTROL
index c4fd79f76..c0fd45c63 100644
--- a/ports/fmt/CONTROL
+++ b/ports/fmt/CONTROL
@@ -1,3 +1,3 @@
Source: fmt
-Version: 4.0.0
+Version: 4.0.0-1
Description: Formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams.
diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL
index 489465d74..d8652e657 100644
--- a/ports/folly/CONTROL
+++ b/ports/folly/CONTROL
@@ -1,4 +1,4 @@
Source: folly
-Version: v2017.07.17.01
+Version: v2017.07.17.01-1
Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows
Build-Depends: zlib, openssl, boost, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy
diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake
index 919e799d5..1b30ad86c 100644
--- a/ports/folly/portfile.cmake
+++ b/ports/folly/portfile.cmake
@@ -38,7 +38,7 @@ vcpkg_configure_cmake(
# Folly runs built executables during the build, so they need access to the installed DLLs.
set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin")
-vcpkg_install_cmake(MSVC_64_TOOLSET)
+vcpkg_install_cmake()
vcpkg_copy_pdbs()
diff --git a/ports/fontconfig/CONTROL b/ports/fontconfig/CONTROL
index 5fc4fcff2..f81a2ddd6 100644
--- a/ports/fontconfig/CONTROL
+++ b/ports/fontconfig/CONTROL
@@ -1,4 +1,4 @@
Source: fontconfig
-Version: 2.12.4
+Version: 2.12.4-1
Description: Library for configuring and customizing font access.
Build-Depends: freetype, expat, libiconv, dirent
diff --git a/ports/freeglut/CONTROL b/ports/freeglut/CONTROL
index 775f98938..82f0dc1f1 100644
--- a/ports/freeglut/CONTROL
+++ b/ports/freeglut/CONTROL
@@ -1,3 +1,3 @@
Source: freeglut
-Version: 3.0.0-1
-Description: Open source implementation of GLUT with source and binary backwards compatibility. \ No newline at end of file
+Version: 3.0.0-2
+Description: Open source implementation of GLUT with source and binary backwards compatibility.
diff --git a/ports/freeimage/CMakeLists.txt b/ports/freeimage/CMakeLists.txt
index f385f508c..9f4f1677b 100644
--- a/ports/freeimage/CMakeLists.txt
+++ b/ports/freeimage/CMakeLists.txt
@@ -72,7 +72,7 @@ set(SRCS ${DEPRECATION_SRCS}
# define (to nothing instead of _declspec(dllimport) ) the DLL_API macro.
# For this purpouse we include (depending on the BUILD_SHARED_LIBS )
# the appropriate FreeImageConfig.h .
-if(${BUILD_SHARED_LIBS})
+if(BUILD_SHARED_LIBS)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FreeImageConfig-dynamic.h ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h)
else()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FreeImageConfig-static.h ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h)
@@ -81,7 +81,7 @@ list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h)
add_library(FreeImage ${SRCS} ${PRIVATE_HEADERS} ${PUBLIC_HEADERS})
-if(${BUILD_SHARED_LIBS})
+if(BUILD_SHARED_LIBS)
target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_EXPORTS)
else()
target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_LIB)
@@ -119,7 +119,7 @@ add_library(FreeImagePlus
${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.h
${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.rc)
-if(${BUILD_SHARED_LIBS})
+if(BUILD_SHARED_LIBS)
target_compile_definitions(FreeImagePlus PRIVATE -DFIP_EXPORTS)
else()
target_compile_definitions(FreeImagePlus PRIVATE -DFREEIMAGE_LIB)
diff --git a/ports/freeimage/CONTROL b/ports/freeimage/CONTROL
index 2d9fa1523..9d7c65b6f 100644
--- a/ports/freeimage/CONTROL
+++ b/ports/freeimage/CONTROL
@@ -1,4 +1,4 @@
Source: freeimage
-Version: 3.17.0-2
+Version: 3.17.0-3
Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp, libraw, jxrlib, openexr
Description: Support library for graphics image formats
diff --git a/ports/freerdp/CONTROL b/ports/freerdp/CONTROL
index 849fd740b..5a730efb7 100644
--- a/ports/freerdp/CONTROL
+++ b/ports/freerdp/CONTROL
@@ -1,4 +1,4 @@
Source: freerdp
-Version: 2.0.0-rc0~vcpkg1
+Version: 2.0.0-rc0~vcpkg1-1
Description: A free implementation of the Remote Desktop Protocol (RDP)
-Build-Depends: openssl \ No newline at end of file
+Build-Depends: openssl
diff --git a/ports/freerdp/portfile.cmake b/ports/freerdp/portfile.cmake
index 8ac9df315..6805c5a69 100644
--- a/ports/freerdp/portfile.cmake
+++ b/ports/freerdp/portfile.cmake
@@ -2,7 +2,7 @@ include(vcpkg_common_functions)
set(FREERDP_VERSION 2.0.0-rc0)
set(FREERDP_REVISION 2.0.0-rc0)
-set(FREERDP_HASH 9bc9ee976c73f274a4258613409e242088bd077bcd1cc43f7941170374fc0f9deda7f2f7644506d0cdc2e029b6037abb21d848810dcce6aefa3c5f1642f19cb3)
+set(FREERDP_HASH d3eb0d5d23aa2a4d0277414f13a984d40aba051102c5af1e5ade975cdb469ef3549b145cd4339415fc33f056044929cfac71884512ea77a1e718d70d5b21b9dd)
string(REGEX REPLACE "\\+" "-" FREERDP_VERSION_ESCAPED ${FREERDP_VERSION})
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FreeRDP-${FREERDP_VERSION_ESCAPED})
@@ -76,4 +76,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
endif()
-file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/freerdp/cmake) \ No newline at end of file
+file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/freerdp/cmake)
diff --git a/ports/freetype/CONTROL b/ports/freetype/CONTROL
index 541f8b024..bf65eb28f 100644
--- a/ports/freetype/CONTROL
+++ b/ports/freetype/CONTROL
@@ -1,4 +1,4 @@
Source: freetype
-Version: 2.8
+Version: 2.8-1
Build-Depends: zlib, bzip2, libpng
-Description: A library to render fonts. \ No newline at end of file
+Description: A library to render fonts.
diff --git a/ports/freexl/CONTROL b/ports/freexl/CONTROL
new file mode 100644
index 000000000..8e0c8da93
--- /dev/null
+++ b/ports/freexl/CONTROL
@@ -0,0 +1,5 @@
+Source: freexl
+Version: 1.0.4
+Description: FreeXL is an open source library to extract valid data from within an Excel (.xls) spreadsheet
+Build-Depends: libiconv
+
diff --git a/ports/freexl/fix-makefiles.patch b/ports/freexl/fix-makefiles.patch
new file mode 100644
index 000000000..5cf2c470f
--- /dev/null
+++ b/ports/freexl/fix-makefiles.patch
@@ -0,0 +1,43 @@
+diff --git a/makefile.vc b/makefile.vc
+index 0aacbc7..d95d859 100644
+--- a/makefile.vc
++++ b/makefile.vc
+@@ -7,7 +7,7 @@
+ LIBOBJ = freexl.obj
+ FREEXL_DLL = freexl$(VERSION).dll
+
+-CFLAGS = /nologo -IC:\OSGeo4W\include -I. -Iheaders $(OPTFLAGS)
++CFLAGS = /nologo -I$(INSTALLED_ROOT)\include -I. -Iheaders $(OPTFLAGS)
+
+ default: all
+
+@@ -23,9 +23,9 @@ freexl.lib: $(LIBOBJ)
+ $(FREEXL_DLL): freexl_i.lib
+
+ freexl_i.lib: $(LIBOBJ)
+- link /debug /dll /out:$(FREEXL_DLL) \
++ link $(LINK_FLAGS) /dll /out:$(FREEXL_DLL) \
+ /implib:freexl_i.lib $(LIBOBJ) \
+- C:\OSGeo4w\lib\iconv.lib
++ $(LIBS_ALL)
+ if exist $(FREEXL_DLL).manifest mt -manifest \
+ $(FREEXL_DLL).manifest -outputresource:$(FREEXL_DLL);2
+
+diff --git a/nmake.opt b/nmake.opt
+index 35f9242..efb6f77 100644
+--- a/nmake.opt
++++ b/nmake.opt
+@@ -1,10 +1,10 @@
+ # Directory tree where FreeXL will be installed.
+-INSTDIR=C:\OSGeo4W
++INSTDIR=$(INST_DIR)
+
+ # Uncomment the first for an optimized build, or the second for debug.
+-OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \
++OPTFLAGS= /nologo /fp:precise /W3 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \
+ /DDLL_EXPORT
+-#OPTFLAGS= /nologo /Zi /MD /Fdfreexl.pdb /DDLL_EXPORT
++#OPTFLAGS= /nologo $(CL_FLAGS) /Fdfreexl.pdb /DDLL_EXPORT
+
+ # Set the version number for the DLL. Normally we leave this blank since
+ # we want software that is dynamically loading the DLL to have no problem
diff --git a/ports/freexl/fix-sources.patch b/ports/freexl/fix-sources.patch
new file mode 100644
index 000000000..89a36f3b3
--- /dev/null
+++ b/ports/freexl/fix-sources.patch
@@ -0,0 +1,35 @@
+diff --git a/config-msvc.h b/config-msvc.h
+index a39d4e7..37f1c0b 100644
+--- a/config-msvc.h
++++ b/config-msvc.h
+@@ -66,7 +66,7 @@
+ #define HAVE_SYS_TYPES_H 1
+
+ /* Define to 1 if you have the <unistd.h> header file. */
+-#define HAVE_UNISTD_H 1
++#undef HAVE_UNISTD_H
+
+ /* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+ slash. */
+diff --git a/src/freexl.c b/src/freexl.c
+index a0b255a..92163a9 100644
+--- a/src/freexl.c
++++ b/src/freexl.c
+@@ -92,7 +92,7 @@ freexl_version (void)
+ #if defined(_WIN32) && !defined(__MINGW32__)
+ /* MSVC compiler doesn't support lround() at all */
+ static double
+-round (double num)
++round_old (double num)
+ {
+ double integer = ceil (num);
+ if (num > 0)
+@@ -101,7 +101,7 @@ round (double num)
+ }
+
+ static long
+-lround (double num)
++lround_old (double num)
+ {
+ long integer = (long) round (num);
+ return integer;
diff --git a/ports/freexl/portfile.cmake b/ports/freexl/portfile.cmake
new file mode 100644
index 000000000..b808d2a60
--- /dev/null
+++ b/ports/freexl/portfile.cmake
@@ -0,0 +1,82 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freexl-1.0.4)
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://www.gaia-gis.it/gaia-sins/freexl-1.0.4.tar.gz"
+ FILENAME "freexl-1.0.4.tar.gz"
+ SHA512 d72561f7b82e0281cb211fbf249e5e45411a7cdd009cfb58da3696f0a0341ea7df210883bfde794be28738486aeb4ffc67ec2c98fd2acde5280e246e204ce788
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/fix-makefiles.patch
+ ${CMAKE_CURRENT_LIST_DIR}/fix-sources.patch
+)
+find_program(NMAKE nmake)
+
+set(LIBS_ALL_DBG
+ "\"${CURRENT_INSTALLED_DIR}/debug/lib/libiconv.lib\" \
+ \"${CURRENT_INSTALLED_DIR}/debug/lib/libcharset.lib\""
+ )
+set(LIBS_ALL_REL
+ "\"${CURRENT_INSTALLED_DIR}/lib/libiconv.lib\" \
+ \"${CURRENT_INSTALLED_DIR}/lib/libcharset.lib\""
+ )
+
+
+if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
+ set(CL_FLAGS_DBG "/MDd /Zi")
+ set(CL_FLAGS_REL "/MD /Ox")
+else()
+ set(CL_FLAGS_DBG "/MTd /Zi")
+ set(CL_FLAGS_REL "/MT /Ox")
+endif()
+
+
+################
+# Debug build
+################
+message(STATUS "Building ${TARGET_TRIPLET}-dbg")
+
+file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG)
+vcpkg_execute_required_process(
+ COMMAND ${NMAKE} -f makefile.vc clean install
+ INST_DIR="${INST_DIR_DBG}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}"
+ WORKING_DIRECTORY ${SOURCE_PATH}
+ LOGNAME nmake-build-${TARGET_TRIPLET}-debug
+)
+message(STATUS "Building ${TARGET_TRIPLET}-dbg done")
+vcpkg_copy_pdbs()
+
+################
+# Release build
+################
+message(STATUS "Building ${TARGET_TRIPLET}-rel")
+
+file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL)
+vcpkg_execute_required_process(
+ COMMAND ${NMAKE} -f makefile.vc clean install
+ INST_DIR="${INST_DIR_REL}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=" "CL_FLAGS=${CL_FLAGS_REL}" "LIBS_ALL=${LIBS_ALL_REL}"
+ WORKING_DIRECTORY ${SOURCE_PATH}
+ LOGNAME nmake-build-${TARGET_TRIPLET}-release
+)
+message(STATUS "Building ${TARGET_TRIPLET}-rel done")
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freexl RENAME copyright)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib)
+else()
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/freexl.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/lib/freexl.lib)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib)
+endif()
+
+
+message(STATUS "Packaging ${TARGET_TRIPLET} done")
diff --git a/ports/fuzzylite/CONTROL b/ports/fuzzylite/CONTROL
index b278a1b8f..422a8af2e 100644
--- a/ports/fuzzylite/CONTROL
+++ b/ports/fuzzylite/CONTROL
@@ -1,3 +1,3 @@
Source: fuzzylite
-Version: 6.0
+Version: 6.0-1
Description: A fuzzy logic control library in C++
diff --git a/ports/g2o/CONTROL b/ports/g2o/CONTROL
index 00ec4d963..81e2b045d 100644
--- a/ports/g2o/CONTROL
+++ b/ports/g2o/CONTROL
@@ -1,4 +1,4 @@
Source: g2o
-Version: 20170730_git-1
+Version: 20170730_git-2
Build-Depends: suitesparse, eigen3, clapack, ceres
Description: g2o: A General Framework for Graph Optimization http://openslam.org/g2o.html
diff --git a/ports/gdal/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch b/ports/gdal/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch
deleted file mode 100644
index e29cc5b8e..000000000
--- a/ports/gdal/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 823171a129401d226ac4821fb997ce585045170c Mon Sep 17 00:00:00 2001
-From: Manuel Massing <m.massing@warped-space.de>
-Date: Wed, 23 Nov 2016 23:50:12 +0100
-Subject: [PATCH] Add support for MSVC1900 (backported from GDAL2)
-
----
- nmake.opt | 6 ++++++
- port/cpl_config.h.vc | 8 +++++---
- 2 files changed, 11 insertions(+), 3 deletions(-)
-
-diff --git a/nmake.opt b/nmake.opt
-index 8900135..4d1c4fa 100644
---- a/nmake.opt
-+++ b/nmake.opt
-@@ -31,6 +31,7 @@
- # Check version of Visual C++ compiler:
- # nmake -f makefile.vc MSVC_VER=xxxx
- # where xxxx is one of following:
-+# 1900 = 14.0(2015)
- # 1800 = 12.0(2013)
- # 1700 = 11.0(2012)
- # 1600 = 10.0(2010)
-@@ -627,8 +628,13 @@ GDALLIB = $(GDAL_ROOT)/gdal.lib
- !ENDIF
-
- !IFDEF ODBC_SUPPORTED
-+!IF $(MSVC_VER) >= 1900
-+# legacy_stdio_definitions.lib : https://connect.microsoft.com/VisualStudio/feedback/details/1134693/vs-2015-ctp-5-c-vsnwprintf-s-and-other-functions-are-not-exported-in-appcrt140-dll-breaking-linkage-of-static-libraries
-+ODBCLIB = legacy_stdio_definitions.lib odbc32.lib odbccp32.lib user32.lib
-+!ELSE
- ODBCLIB = odbc32.lib odbccp32.lib user32.lib
- !ENDIF
-+!ENDIF
-
- !IF DEFINED(MRSID_DIR) || DEFINED(MRSID_RASTER_DIR) || DEFINED(MRSID_LIDAR_DIR)
- !IF "$(MRSID_PLUGIN)" != "YES"
-diff --git a/port/cpl_config.h.vc b/port/cpl_config.h.vc
-index bfff8f6..fe7b82a 100644
---- a/port/cpl_config.h.vc
-+++ b/port/cpl_config.h.vc
-@@ -1,5 +1,5 @@
-
--/* We define this here in general so that a VC++ build will publically
-+/* We define this here in general so that a VC++ build will publicly
- declare STDCALL interfaces even if an application is built against it
- using MinGW */
-
-@@ -17,7 +17,9 @@
- #if defined(_MSC_VER) && (_MSC_VER < 1500)
- # define vsnprintf _vsnprintf
- #endif
--#define snprintf _snprintf
-+#if defined(_MSC_VER) && (_MSC_VER < 1900)
-+# define snprintf _snprintf
-+#endif
-
- #define HAVE_GETCWD 1
- /* gmt_notunix.h from GMT project also redefines getcwd. See #3138 */
-@@ -86,7 +88,7 @@
- /* Set the native cpu bit order */
- #define HOST_FILLORDER FILLORDER_LSB2MSB
-
--/* Define as 0 or 1 according to the floating point format suported by the
-+/* Define as 0 or 1 according to the floating point format supported by the
- machine */
- #define HAVE_IEEEFP 1
-
---
-2.10.1.windows.1
-
diff --git a/ports/gdal/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch b/ports/gdal/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch
index 0ffcac5fb..7817c4a38 100644
--- a/ports/gdal/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch
+++ b/ports/gdal/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch
@@ -1,18 +1,8 @@
-From b25c3dc49ca1bcf9a789cf64c9fa8694e35127f0 Mon Sep 17 00:00:00 2001
-From: Manuel Massing <m.massing@warped-space.de>
-Date: Sun, 27 Nov 2016 09:57:04 +0100
-Subject: [PATCH 2/2] Add variable CXX_CRT_FLAGS to allow for selection of C
- runtime linkage in nmake build.
-
----
- nmake.opt | 18 ++++++++++++++----
- 1 file changed, 14 insertions(+), 4 deletions(-)
-
diff --git a/nmake.opt b/nmake.opt
-index 4d1c4fa..47c2df8 100644
+index bd5719c2d1..f6101ccd59 100644
--- a/nmake.opt
+++ b/nmake.opt
-@@ -125,18 +125,28 @@ CXX_PDB_FLAGS=/Zi /Fd$(GDAL_ROOT)\gdal$(VERSION).pdb
+@@ -127,18 +127,28 @@ CXX_PDB_FLAGS=/Zi /Fd$(GDAL_ROOT)\gdal$(VERSION).pdb
CXX_PDB_FLAGS=
!ENDIF
@@ -29,22 +19,19 @@ index 4d1c4fa..47c2df8 100644
!IFNDEF OPTFLAGS
!IF $(MSVC_VER) >= 1400
!IFNDEF DEBUG
--OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MD /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG
+-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG
+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG
!ELSE
--OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MD /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG
+-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG
+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG
!ENDIF
!ELSE
!IFNDEF DEBUG
--OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /Ox /DNDEBUG
+-OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /Ox /FC /DNDEBUG
+OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /Ox /DNDEBUG
!ELSE
--OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /DDEBUG
+-OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /FC /DDEBUG
+OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /DDEBUG
!ENDIF
!ENDIF #MSVC_VER
!ENDIF # OPTFLAGS
---
-2.10.1.windows.1
-
diff --git a/ports/gdal/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch b/ports/gdal/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch
new file mode 100644
index 000000000..57030b99b
--- /dev/null
+++ b/ports/gdal/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch
@@ -0,0 +1,14 @@
+diff --git a/nmake.opt b/nmake.opt
+index bd5719c2d1..c0ca442cbe 100644
+--- a/nmake.opt
++++ b/nmake.opt
+@@ -195,6 +205,9 @@ SOFTWARNFLAGS= /wd4244 /wd4702 /wd4701 /wd4013 /wd4706 /wd4057 /wd4210 /wd4305
+ # Linker debug options
+ !IFDEF DEBUG
+ LDEBUG= /debug
++!ELSEIFDEF WITH_PDB
++# Ensures that PDB is included in release DLL if so requested
++LDEBUG= /debug /opt:ref /opt:icf
+ !ENDIF
+
+ # Uncomment the following if you are building for 64-bit windows
diff --git a/ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch b/ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch
deleted file mode 100644
index 1065a2982..000000000
--- a/ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 9da0cb6eed442ebf3eea232cd85e26c155c963ef Mon Sep 17 00:00:00 2001
-From: Manuel Massing <m.massing@warped-space.de>
-Date: Tue, 29 Nov 2016 12:43:58 +0100
-Subject: [PATCH 3/4] - Ensures inclusion of PDB in release dll if so requested
-
----
- gdal/nmake.opt | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/nmake.opt b/nmake.opt
-index 47c2df8..4844d22 100644
---- a/nmake.opt
-+++ b/nmake.opt
-@@ -174,6 +174,9 @@ SOFTWARNFLAGS= /wd4244 /wd4702 /wd4701 /wd4013 /wd4706 /wd4057 /wd4210 /wd4305
- # Linker debug options
- !IFDEF DEBUG
- LDEBUG= /debug
-+!ELSEIFDEF WITH_PDB
-+# Ensures that PDB is included in release DLL if so requested
-+LDEBUG= /debug /opt:ref /opt:icf
- !ENDIF
-
- # Uncomment the following if you are building for 64-bit windows
---
-2.10.1.windows.1
-
diff --git a/ports/gdal/0003-Fix-openjpeg-include.patch b/ports/gdal/0003-Fix-openjpeg-include.patch
new file mode 100644
index 000000000..4ea72690c
--- /dev/null
+++ b/ports/gdal/0003-Fix-openjpeg-include.patch
@@ -0,0 +1,20 @@
+diff --git a/frmts/openjpeg/openjpegdataset.cpp b/frmts/openjpeg/openjpegdataset.cpp
+index 5978882bc9..72cc7b9559 100644
+--- a/frmts/openjpeg/openjpegdataset.cpp
++++ b/frmts/openjpeg/openjpegdataset.cpp
+@@ -34,14 +34,8 @@
+ #pragma clang diagnostic ignored "-Wdocumentation"
+ #endif
+
+-#if defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20200
+-#include <openjpeg-2.2/openjpeg.h>
+-#elif defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20100
+-#include <openjpeg-2.1/openjpeg.h>
+-#else
+ #include <stdio.h> /* openjpeg.h needs FILE* */
+-#include <openjpeg-2.0/openjpeg.h>
+-#endif
++#include <openjpeg.h>
+
+ #ifdef __clang__
+ #pragma clang diagnostic pop
diff --git a/ports/gdal/0004-Fix-openjpeg-include.patch b/ports/gdal/0004-Fix-openjpeg-include.patch
deleted file mode 100644
index 2865455d8..000000000
--- a/ports/gdal/0004-Fix-openjpeg-include.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff --git a/frmts/openjpeg/openjpegdataset.cpp b/frmts/openjpeg/openjpegdataset.cpp
-index 1fd4f4f..417f7a8 100644
---- a/frmts/openjpeg/openjpegdataset.cpp
-+++ b/frmts/openjpeg/openjpegdataset.cpp
-@@ -29,12 +29,8 @@
-
- /* This file is to be used with openjpeg 2.0 */
-
--#if defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20100
--#include <openjpeg-2.1/openjpeg.h>
--#else
--#include <stdio.h> /* openjpeg.h needs FILE* */
--#include <openjpeg-2.0/openjpeg.h>
--#endif
-+#include <stdio.h>
-+#include <openjpeg.h>
- #include <vector>
-
- #include "gdaljp2abstractdataset.h"
diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL
index 868a5e929..b84dc29e1 100644
--- a/ports/gdal/CONTROL
+++ b/ports/gdal/CONTROL
@@ -1,4 +1,4 @@
Source: gdal
-Version: 1.11.3-5
+Version: 2.2.2
Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data.
-Build-Depends: proj, libpng, geos, sqlite3, curl, expat, libpq, libmysql, openjpeg, libwebp, libxml2, liblzma
+Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, libmysql, openjpeg, libwebp, libxml2, liblzma
diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake
index 214ec2024..9bfb92362 100644
--- a/ports/gdal/portfile.cmake
+++ b/ports/gdal/portfile.cmake
@@ -5,25 +5,24 @@ endif()
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URLS "http://download.osgeo.org/gdal/1.11.3/gdal1113.zip"
- FILENAME "gdal1113.zip"
- SHA512 42feb98a54019d3b6ac54f598f299a57e117db500c662d39faa9d5f5090f03c1b8d7680242e1abd8035738edc4fc3197ae118a0ce50733691a76a5cf377bcd46
-)
+ URLS "http://download.osgeo.org/gdal/2.2.2/gdal222.zip"
+ FILENAME "gdal222.zip"
+ SHA512 b886238a7915c97f4acec5920dabe959d1ab15a8be0bc31ba0d05ad69d1d7d96f864faf0aa82921fa1a1b40b733744202b86f2f45ff63d6518cd18a53f3544a8
+ )
# Extract source into archictecture specific directory, because GDALs' nmake based build currently does not
# support out of source builds.
-set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-1.11.3)
-set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-1.11.3)
+set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-2.2.2)
+set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-2.2.2)
foreach(BUILD_TYPE debug release)
vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE})
vcpkg_apply_patches(
- SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-1.11.3
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-2.2.2
PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch
- ${CMAKE_CURRENT_LIST_DIR}/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch
- ${CMAKE_CURRENT_LIST_DIR}/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch
- ${CMAKE_CURRENT_LIST_DIR}/0004-Fix-openjpeg-include.patch
+ ${CMAKE_CURRENT_LIST_DIR}/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch
+ ${CMAKE_CURRENT_LIST_DIR}/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch
+ ${CMAKE_CURRENT_LIST_DIR}/0003-Fix-openjpeg-include.patch
)
endforeach()
@@ -211,7 +210,7 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
else()
file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe)
file(REMOVE ${EXE_FILES} ${CURRENT_PACKAGES_DIR}/lib/gdal.lib)
- file(COPY ${SOURCE_PATH_DEBUG}/gdal111.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(COPY ${SOURCE_PATH_DEBUG}/gdal202.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
file(COPY ${SOURCE_PATH_DEBUG}/gdal_i.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/lib/gdal.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib)
diff --git a/ports/gdcm2/CONTROL b/ports/gdcm2/CONTROL
index 32b92aca0..b39b3e19f 100644
--- a/ports/gdcm2/CONTROL
+++ b/ports/gdcm2/CONTROL
@@ -1,4 +1,4 @@
Source: gdcm2
-Version: 2.6.8
+Version: 2.6.8-1
Description: Grassroots DICOM library
Build-Depends: zlib, expat
diff --git a/ports/gdk-pixbuf/CONTROL b/ports/gdk-pixbuf/CONTROL
index c12f67583..2a0fbfaf3 100644
--- a/ports/gdk-pixbuf/CONTROL
+++ b/ports/gdk-pixbuf/CONTROL
@@ -1,4 +1,4 @@
Source: gdk-pixbuf
-Version: 2.36.9
+Version: 2.36.9-1
Description: Image loading library.
Build-Depends: gettext, zlib, libpng, glib
diff --git a/ports/geogram/CONTROL b/ports/geogram/CONTROL
index 95690395b..f79aa5997 100644
--- a/ports/geogram/CONTROL
+++ b/ports/geogram/CONTROL
@@ -1,4 +1,4 @@
Source: geogram
-Version: 1.4.9
+Version: 1.4.9-1
Description: Geogram is a programming library of geometric algorithms.
Build-Depends: glfw3, openblas, clapack
diff --git a/ports/geographiclib/CONTROL b/ports/geographiclib/CONTROL
index 836049a66..993239b96 100644
--- a/ports/geographiclib/CONTROL
+++ b/ports/geographiclib/CONTROL
@@ -1,3 +1,3 @@
Source: geographiclib
-Version: 1.47-patch1-3
+Version: 1.47-patch1-4
Description: a small set of C++ classes for performing conversions between geographic, UTM, UPS, MGRS, geocentric, and local cartesian coordinates, for gravity (e.g., EGM2008), geoid height, and geomagnetic field (e.g., WMM2010) calculations, and for solving geodesic problems.
diff --git a/ports/geos/CONTROL b/ports/geos/CONTROL
index c0ec7b134..2b192d088 100644
--- a/ports/geos/CONTROL
+++ b/ports/geos/CONTROL
@@ -1,3 +1,3 @@
Source: geos
-Version: 3.5.0
+Version: 3.6.2-2
Description: Geometry Engine Open Source
diff --git a/ports/geos/geos_c-static-support.patch b/ports/geos/geos_c-static-support.patch
new file mode 100644
index 000000000..148e63057
--- /dev/null
+++ b/ports/geos/geos_c-static-support.patch
@@ -0,0 +1,110 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 927a0fe..8e6c3ea 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -66,11 +66,7 @@ if(NOT MSVC)
+ "Set to ON|OFF (default) to build GEOS with assert() macro enabled" OFF)
+ endif()
+
+-option(GEOS_BUILD_STATIC
+- "Set to OFF|ON (default) to build GEOS static libraries" ON)
+-
+-option(GEOS_BUILD_SHARED
+- "Set to OFF|ON (default) to build GEOS shared libraries" ON)
++option(BUILD_SHARED_LIBS "Build GEOS as a shared library" ON)
+
+ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+ option(GEOS_ENABLE_FLOATSTORE
+diff --git a/capi/CMakeLists.txt b/capi/CMakeLists.txt
+index 859722b..b6e44b6 100644
+--- a/capi/CMakeLists.txt
++++ b/capi/CMakeLists.txt
+@@ -23,15 +23,23 @@ file(GLOB geos_capi_HEADERS ${CMAKE_BINARY_DIR}/capi/*.h) # fix source_group iss
+
+ if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK)
+ # if building OS X framework, CAPI built into C++ library
+- add_library(geos_c SHARED ${geos_c_SOURCES})
++ add_library(geos_c ${geos_c_SOURCES})
+
+ target_link_libraries(geos_c geos)
+
+ if (WIN32)
+- set_target_properties(geos_c
+- PROPERTIES
+- VERSION ${CAPI_VERSION}
+- CLEAN_DIRECT_OUTPUT 1)
++ if(BUILD_SHARED_LIBS)
++ set_target_properties(geos_c
++ PROPERTIES
++ VERSION ${CAPI_VERSION}
++ CLEAN_DIRECT_OUTPUT 1)
++ else()
++ set_target_properties(geos_c
++ PROPERTIES
++ OUTPUT_NAME "geos_c"
++ PREFIX "lib"
++ CLEAN_DIRECT_OUTPUT 1)
++ endif()
+ else()
+ set_target_properties(geos_c
+ PROPERTIES
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 4a1e688..a33b5f6 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -23,7 +23,7 @@ if(GEOS_ENABLE_MACOSX_FRAMEWORK)
+ ${CMAKE_CURRENT_SOURCE_DIR}/../capi/geos_c.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/../capi/geos_ts_c.cpp)
+
+- add_library(GEOS SHARED ${geos_SOURCES} ${geos_c_SOURCES})
++ add_library(GEOS ${geos_SOURCES} ${geos_c_SOURCES})
+
+ math(EXPR CVERSION "${VERSION_MAJOR} + 1")
+ # VERSION = current version, SOVERSION = compatibility version
+@@ -61,37 +61,27 @@ if(GEOS_ENABLE_MACOSX_FRAMEWORK)
+
+ else()
+
+- if(GEOS_BUILD_SHARED)
+- add_library(geos SHARED ${geos_SOURCES} ${geos_ALL_HEADERS})
++ add_library(geos ${geos_SOURCES} ${geos_ALL_HEADERS})
+
++ if(BUILD_SHARED_LIBS)
+ set_target_properties(geos
+ PROPERTIES
+ DEFINE_SYMBOL GEOS_DLL_EXPORT
+ VERSION ${VERSION}
+ CLEAN_DIRECT_OUTPUT 1)
+-
+- install(TARGETS geos
+- RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib)
+- endif()
+-
+- if(GEOS_BUILD_STATIC)
+- add_library(geos-static STATIC ${geos_SOURCES} ${geos_ALL_HEADERS})
+-
+- set_target_properties(geos-static
++ else()
++ set_target_properties(geos
+ PROPERTIES
+ OUTPUT_NAME "geos"
+ PREFIX "lib"
+ CLEAN_DIRECT_OUTPUT 1)
+-
+- install(TARGETS geos-static
+- RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib)
+-
+ endif()
+
++ install(TARGETS geos
++ RUNTIME DESTINATION bin
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib)
++
+ endif() # (GEOS_ENABLE_MACOSX_FRAMEWORK)
+
+ # if(APPLE)
diff --git a/ports/geos/portfile.cmake b/ports/geos/portfile.cmake
index 7cd50db58..68b4ab9f7 100644
--- a/ports/geos/portfile.cmake
+++ b/ports/geos/portfile.cmake
@@ -7,28 +7,32 @@
#
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/3.5)
-#downloading 3.5 from their SVN repo and not the release tarball
-#because the 3.5 release did not build on windows, and fixes were backported
-#without generating a new release tarball (I don't think very many GIS people use win)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/geos-3.6.2)
+
vcpkg_download_distfile(ARCHIVE
- URLS "https://trac.osgeo.org/geos/browser/branches/3.5?rev=4261&format=zip"
- FILENAME "geos-3.5.0.zip"
- SHA512 3b91e8992f60b99a3f01069d955b71bce425ae5e5c599252fa26a337494e1a5a8ea796be124766d054710d6c03806f56dc1c63539b4660e2bb894d7ef779d4b9
+ URLS "http://download.osgeo.org/geos/geos-3.6.2.tar.bz2"
+ FILENAME "geos-3.6.2.tar.bz2"
+ SHA512 515d8700b8a28282678e481faee355e3a43d7b70160472a63335b8d7225d9ba10437be782378f18f31a15288118126d411a2d862f01ce35d27c96f6bc0a73016
)
vcpkg_extract_source_archive(${ARCHIVE})
+vcpkg_apply_patches(
+
+SOURCE_PATH ${SOURCE_PATH}
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/geos_c-static-support.patch
+)
+
+# NOTE: GEOS provides CMake as optional build configuration, it might not be actively
+# maintained, so CMake build issues may happen between releases.
+
+# Pull modules referred in the main CMakeLists.txt but missing from the released package.
+# TODO: GEOS 3.6.3 or later will include the missing script in release package.
+file(DOWNLOAD http://svn.osgeo.org/geos/branches/3.6/cmake/modules/GenerateSourceGroups.cmake
+ ${SOURCE_PATH}/cmake/modules/GenerateSourceGroups.cmake)
-#we need to do this because GEOS deploy process is totally broken for cmake
-#file(DOWNLOAD http://svn.osgeo.org/geos/tags/3.5.0/cmake/modules/GenerateSourceGroups.cmake
-# ${SOURCE_PATH}/cmake/modules/GenerateSourceGroups.cmake)
-file(WRITE ${SOURCE_PATH}/geos_svn_revision.h "#define GEOS_SVN_REVISION 4261")
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS -DGEOS_ENABLE_TESTS=False
- -DBUILD_TESTING=False
)
-
-vcpkg_build_cmake()
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
@@ -43,4 +47,4 @@ else()
endif()
-vcpkg_copy_pdbs() \ No newline at end of file
+vcpkg_copy_pdbs()
diff --git a/ports/gettext/CONTROL b/ports/gettext/CONTROL
index fad410359..882eb725f 100644
--- a/ports/gettext/CONTROL
+++ b/ports/gettext/CONTROL
@@ -1,3 +1,3 @@
Source: gettext
-Version: 0.19-1
+Version: 0.19-2
Description: The GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages
diff --git a/ports/gflags/CONTROL b/ports/gflags/CONTROL
index 9fab690ce..c673815f9 100644
--- a/ports/gflags/CONTROL
+++ b/ports/gflags/CONTROL
@@ -1,3 +1,3 @@
Source: gflags
-Version: 2.2.0-4
+Version: 2.2.0-5
Description: A C++ library that implements commandline flags processing
diff --git a/ports/giflib/CONTROL b/ports/giflib/CONTROL
index abac8f1cf..a79a8b0d4 100644
--- a/ports/giflib/CONTROL
+++ b/ports/giflib/CONTROL
@@ -1,3 +1,3 @@
Source: giflib
-Version: 5.1.4
+Version: 5.1.4-1
Description: A library for reading and writing gif images.
diff --git a/ports/gl2ps/CONTROL b/ports/gl2ps/CONTROL
index 16c52f64a..052835a34 100644
--- a/ports/gl2ps/CONTROL
+++ b/ports/gl2ps/CONTROL
@@ -1,4 +1,4 @@
Source: gl2ps
-Version: 1.4.0
+Version: 1.4.0-1
Description: OpenGL to PostScript Printing Library
Build-Depends: freeglut, zlib, libpng
diff --git a/ports/glbinding/CONTROL b/ports/glbinding/CONTROL
index 5e7ec029c..b6eaf06bd 100644
--- a/ports/glbinding/CONTROL
+++ b/ports/glbinding/CONTROL
@@ -1,3 +1,3 @@
Source: glbinding
-Version: 2.1.1-1
+Version: 2.1.1-2
Description: glbinding is an MIT licensed, cross-platform C++ binding for the OpenGL API
diff --git a/ports/glew/CONTROL b/ports/glew/CONTROL
index 1d7fc62f5..ecf948c5d 100644
--- a/ports/glew/CONTROL
+++ b/ports/glew/CONTROL
@@ -1,3 +1,3 @@
Source: glew
-Version: 2.1.0
-Description: The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library. \ No newline at end of file
+Version: 2.1.0-1
+Description: The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library.
diff --git a/ports/glew/portfile.cmake b/ports/glew/portfile.cmake
index 30f55451a..a18a8ceeb 100644
--- a/ports/glew/portfile.cmake
+++ b/ports/glew/portfile.cmake
@@ -36,6 +36,11 @@ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/visualinfo.exe)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+ foreach(FILE ${CURRENT_PACKAGES_DIR}/include/GL/glew.h ${CURRENT_PACKAGES_DIR}/include/GL/wglew.h ${CURRENT_PACKAGES_DIR}/include/GL/glxew.h)
+ file(READ ${FILE} _contents)
+ string(REPLACE "#ifdef GLEW_STATIC" "#if 1" _contents "${_contents}")
+ file(WRITE ${FILE} "${_contents}")
+ endforeach()
endif()
vcpkg_copy_pdbs()
diff --git a/ports/glfw3/CONTROL b/ports/glfw3/CONTROL
index d6493c968..9cb0cbdc6 100644
--- a/ports/glfw3/CONTROL
+++ b/ports/glfw3/CONTROL
@@ -1,3 +1,3 @@
Source: glfw3
-Version: 3.2.1-1
-Description: GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platform-independent API for creating windows, contexts and surfaces, reading input, handling events, etc. \ No newline at end of file
+Version: 3.2.1-2
+Description: GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platform-independent API for creating windows, contexts and surfaces, reading input, handling events, etc.
diff --git a/ports/glib/CONTROL b/ports/glib/CONTROL
index 2d67cd26d..a4e467bbc 100644
--- a/ports/glib/CONTROL
+++ b/ports/glib/CONTROL
@@ -1,4 +1,4 @@
Source: glib
-Version: 2.52.3
+Version: 2.52.3-1
Description: Portable, general-purpose utility library.
Build-Depends: zlib, pcre, libffi, gettext, libiconv
diff --git a/ports/glm/CONTROL b/ports/glm/CONTROL
index 2f7355c30..36a40e32d 100644
--- a/ports/glm/CONTROL
+++ b/ports/glm/CONTROL
@@ -1,3 +1,3 @@
Source: glm
-Version: 0.9.8.4
+Version: 0.9.8.4-1
Description: OpenGL Mathematics (GLM) https://glm.g-truc.net
diff --git a/ports/globjects/CONTROL b/ports/globjects/CONTROL
index 7917bacac..df9c862dc 100644
--- a/ports/globjects/CONTROL
+++ b/ports/globjects/CONTROL
@@ -1,5 +1,5 @@
Source: globjects
Maintainer: mattias@mattiascibien.net
-Version: 1.0.0
+Version: 1.0.0-1
Build-Depends: glbinding, glm
Description: C++ library strictly wrapping OpenGL objects. <https://github.com/cginternals/globjects>
diff --git a/ports/glog/CONTROL b/ports/glog/CONTROL
index 74653e8bc..fad754f7c 100644
--- a/ports/glog/CONTROL
+++ b/ports/glog/CONTROL
@@ -1,4 +1,4 @@
Source: glog
-Version: 0.3.5
+Version: 0.3.5-1
Description: C++ implementation of the Google logging module
Build-Depends: gflags
diff --git a/ports/glslang/CONTROL b/ports/glslang/CONTROL
index ac6e6810b..03668b10a 100644
--- a/ports/glslang/CONTROL
+++ b/ports/glslang/CONTROL
@@ -1,3 +1,3 @@
Source: glslang
-Version: 1c573fbcfba6b3d631008b1babc838501ca925d3-2
+Version: 3a21c880500eac21cdf79bef5b80f970a55ac6af-1
Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator
diff --git a/ports/glslang/portfile.cmake b/ports/glslang/portfile.cmake
index 8dabcb390..e663d768d 100644
--- a/ports/glslang/portfile.cmake
+++ b/ports/glslang/portfile.cmake
@@ -7,8 +7,8 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KhronosGroup/glslang
- REF 1c573fbcfba6b3d631008b1babc838501ca925d3
- SHA512 4f04dc39d9a70959ded1f4fe05ca5c7b0413c05bc3f049c11b5be7c8e1a70675f4221c9d8c712e7695f30eadb9bd7d0f1e71f431a6c9d4fea2cd2abbc73bd49a
+ REF 3a21c880500eac21cdf79bef5b80f970a55ac6af
+ SHA512 a6b2f589d432015d3830027dee377350529bec9c339a8de24aa52bab5ca52b3e17e2163d3bd1a7d91f7a08c446ebfe86d64bbbbae5a23af831d2e0cb724f7418
HEAD_REF master
)
@@ -19,29 +19,9 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
-file(COPY "${SOURCE_PATH}/glslang/Public" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang)
-file(COPY "${SOURCE_PATH}/glslang/Include" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang)
-file(COPY "${SOURCE_PATH}/glslang/MachineIndependent/Versions.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang/MachineIndependent)
-file(COPY "${SOURCE_PATH}/SPIRV/Logger.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV)
-file(COPY "${SOURCE_PATH}/SPIRV/spirv.hpp" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV)
-file(COPY "${SOURCE_PATH}/SPIRV/GlslangToSpv.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV)
-file(COPY "${CURRENT_PACKAGES_DIR}/bin/glslangValidator.exe" DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
-file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/glslangValidator.exe")
-file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/glslangValidator.exe")
-file(COPY "${CURRENT_PACKAGES_DIR}/bin/spirv-remap.exe" DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
-file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/spirv-remap.exe")
-file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/spirv-remap.exe")
-
-file(GLOB BIN_DIR "${CURRENT_PACKAGES_DIR}/bin/*")
-list(LENGTH BIN_DIR BIN_DIR_SIZE)
-if(${BIN_DIR_SIZE} EQUAL 0)
- file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
-endif()
-file(GLOB DEBUG_BIN_DIR "${CURRENT_PACKAGES_DIR}/debug/bin/*")
-list(LENGTH DEBUG_BIN_DIR DEBUG_BIN_DIR_SIZE)
-if(${DEBUG_BIN_DIR_SIZE} EQUAL 0)
- file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
-endif()
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
# Handle copyright
file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/glslang)
diff --git a/ports/graphicsmagick/CONTROL b/ports/graphicsmagick/CONTROL
index 13770197d..17f2a635d 100644
--- a/ports/graphicsmagick/CONTROL
+++ b/ports/graphicsmagick/CONTROL
@@ -1,4 +1,4 @@
Source: graphicsmagick
-Version: 1.3.26-1
+Version: 1.3.26-2
Build-Depends: zlib, bzip2, freetype, libjpeg-turbo, libpng, tiff
Description: Image processing library
diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL
index d9654cddf..449d58b6c 100644
--- a/ports/grpc/CONTROL
+++ b/ports/grpc/CONTROL
@@ -1,4 +1,4 @@
Source: grpc
-Version: 1.4.1
+Version: 1.6.0-1
Build-Depends: zlib, openssl, protobuf, c-ares
-Description: An RPC library and framework \ No newline at end of file
+Description: An RPC library and framework
diff --git a/ports/grpc/disable-csharp-ext.patch b/ports/grpc/disable-csharp-ext.patch
index 6cb9090ab..3b887c8b4 100644
--- a/ports/grpc/disable-csharp-ext.patch
+++ b/ports/grpc/disable-csharp-ext.patch
@@ -1,31 +1,29 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c85a20a..99b2897 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -3694,6 +3694,7 @@ target_link_libraries(qps
+--- a/CMakeLists.txt Tue Aug 29 22:24:15 2017
++++ b/CMakeLists.txt Mon Sep 04 00:43:56 2017
+@@ -4574,6 +4574,8 @@
endif (gRPC_BUILD_TESTS)
+option(gRPC_INSTALL_CSHARP_EXT "" ON)
++
add_library(grpc_csharp_ext SHARED
src/csharp/ext/grpc_csharp_ext.c
)
-@@ -3702,7 +3703,7 @@ if(WIN32 AND MSVC)
+@@ -4582,7 +4584,7 @@
set_target_properties(grpc_csharp_ext PROPERTIES COMPILE_PDB_NAME "grpc_csharp_ext"
COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
)
- if (gRPC_INSTALL)
+ if (gRPC_INSTALL AND gRPC_INSTALL_CSHARP_EXT)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_csharp_ext.pdb
- DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL
+ DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
)
-@@ -3728,8 +3729,7 @@ target_link_libraries(grpc_csharp_ext
- )
+@@ -4613,7 +4615,7 @@
+
--
-if (gRPC_INSTALL)
+if (gRPC_INSTALL AND gRPC_INSTALL_CSHARP_EXT)
install(TARGETS grpc_csharp_ext EXPORT gRPCTargets
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake
index e26c758d0..49d64b909 100644
--- a/ports/grpc/portfile.cmake
+++ b/ports/grpc/portfile.cmake
@@ -12,17 +12,24 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO grpc/grpc
- REF v1.4.1
- SHA512 5028e4f881a41e4c4ddf770bd824d1d5de825f86d68dbbfab22e2a34ec0e46b27754b0f5b40cfc02b0d22a756b08056b100837b590745b5fdbdce9a803e59f8d
+ REF v1.6.0
+ SHA512 70a68fecca43cfe8c94206fd39ad8f86e055eb2185ae8c90040cc35928f1102016775c66e83c3cc76690e44598764b215d884a206f8466d45b00e2c54593e682
HEAD_REF master
)
+# fix from PR https://github.com/grpc/grpc/pull/12411
+vcpkg_download_distfile(CMAKE_ERROR_FIX_DIFF
+ URLS "https://github.com/grpc/grpc/commit/74c139a83987087f9e2d2e6b5d44c240d719061d.diff"
+ FILENAME "grpc-cmake-error-fix.diff"
+ SHA512 38cdff0e6db12276400cf4eec66aafdbfe34912a78a0604ced3b216d3a60e5b87464f9083fa5e5dfb4df1490ef10565cbe04d3f750f59c7e7e1a05334c0b528e
+)
+
# Issue: https://github.com/grpc/grpc/issues/10759
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/revert-c019e05.patch
${CMAKE_CURRENT_LIST_DIR}/disable-csharp-ext.patch
+ ${CMAKE_ERROR_FIX_DIFF}
)
if(VCPKG_CRT_LINKAGE STREQUAL static)
@@ -52,7 +59,7 @@ vcpkg_configure_cmake(
set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin")
vcpkg_install_cmake()
-vcpkg_fixup_cmake_targets()
+vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/grpc")
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/grpc RENAME copyright)
diff --git a/ports/grpc/revert-c019e05.patch b/ports/grpc/revert-c019e05.patch
deleted file mode 100644
index afb5cfa71..000000000
--- a/ports/grpc/revert-c019e05.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b7555b1bc3..edbffea76c 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -14204,6 +14204,13 @@ endif (gRPC_BUILD_TESTS)
-
-
-
-+if (gRPC_INSTALL)
-+ install(EXPORT gRPCTargets
-+ DESTINATION ${CMAKE_INSTALL_CMAKEDIR}
-+ NAMESPACE gRPC::
-+ )
-+endif()
-+
- foreach(_config gRPCConfig gRPCConfigVersion)
- configure_file(tools/cmake/${_config}.cmake.in
- ${_config}.cmake @ONLY)
diff --git a/ports/gsl/CONTROL b/ports/gsl/CONTROL
index 8ea4fdedd..b6dc858dc 100644
--- a/ports/gsl/CONTROL
+++ b/ports/gsl/CONTROL
@@ -1,3 +1,3 @@
Source: gsl
-Version: 2.4-1
+Version: 2.4-2
Description: The GNU Scientific Library is a numerical library for C and C++ programmers
diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL
index 07336b978..77082f5cb 100644
--- a/ports/gtest/CONTROL
+++ b/ports/gtest/CONTROL
@@ -1,3 +1,3 @@
Source: gtest
-Version: 1.8
-Description: GoogleTest and GoogleMock testing frameworks. \ No newline at end of file
+Version: 1.8-1
+Description: GoogleTest and GoogleMock testing frameworks.
diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake
index 0bfe4e60c..333dc8ae3 100644
--- a/ports/gtest/portfile.cmake
+++ b/ports/gtest/portfile.cmake
@@ -28,6 +28,8 @@ vcpkg_configure_cmake(
OPTIONS -Dgtest_force_shared_crt=${gtest_force_shared_crt}
)
+set(ENV{_CL_} "/D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING")
+
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
diff --git a/ports/gtk/CONTROL b/ports/gtk/CONTROL
index a668ff3f5..e5931156d 100644
--- a/ports/gtk/CONTROL
+++ b/ports/gtk/CONTROL
@@ -1,4 +1,4 @@
Source: gtk
-Version: 3.22.19
+Version: 3.22.19-1
Description: Portable library for creating graphical user interfaces.
Build-Depends: glib, atk, gdk-pixbuf, pango, cairo, libepoxy, gettext
diff --git a/ports/gts/CONTROL b/ports/gts/CONTROL
new file mode 100644
index 000000000..faa409619
--- /dev/null
+++ b/ports/gts/CONTROL
@@ -0,0 +1,4 @@
+Source: gts
+Version: 0.7.6
+Description: A Library intended to provide a set of useful functions to deal with 3D surfaces meshed with interconnected triangles
+Build-Depends: glib
diff --git a/ports/gts/portfile.cmake b/ports/gts/portfile.cmake
new file mode 100644
index 000000000..d55f5dc66
--- /dev/null
+++ b/ports/gts/portfile.cmake
@@ -0,0 +1,36 @@
+# Common Ambient Variables:
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
+# PORT = current port name (zlib, etc)
+# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
+# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
+# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
+#
+
+include(vcpkg_common_functions)
+vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
+ REPO "finetjul/gts"
+ REF c4da61ae075f355d9ecc9f2d4767acf777f54c2b
+ HEAD_REF master
+ SHA512 e53d11213c26cbda08ae62e6388aee0a14d2884de72268ad25d10a23e77baa53a2b1151c5cc7643b059ded82b8edf0da79144c3108949fdc515168cac13ffca9
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
+ # OPTIONS_RELEASE -DOPTIMIZE=1
+ # OPTIONS_DEBUG -DDEBUGGABLE=1
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gts RENAME copyright)
+
+vcpkg_copy_pdbs() \ No newline at end of file
diff --git a/ports/guetzli/CMakeLists.txt b/ports/guetzli/CMakeLists.txt
new file mode 100644
index 000000000..5d594aabd
--- /dev/null
+++ b/ports/guetzli/CMakeLists.txt
@@ -0,0 +1,46 @@
+cmake_minimum_required(VERSION 3.8.0)
+project(guetzli)
+
+if(MSVC)
+ add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX)
+endif()
+
+if(BUILD_SHARED_LIBS)
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+endif()
+
+find_path(butteraugli_include butteraugli/butteraugli.h)
+find_library(butteraugli_library NAMES butteraugli_lib)
+find_package(PNG REQUIRED)
+
+include_directories("." ${PNG_INCLUDE_DIRS} ${butteraugli_include})
+
+file(GLOB guetzli_srcs "guetzli/*.cc")
+file(GLOB guetzli_includes "guetzli/*.h")
+list(REMOVE_ITEM guetzli_srcs "guetzli/guetzli.cc")
+
+add_library(guetzli_lib ${guetzli_srcs})
+
+add_executable(guetzli guetzli/guetzli.cc)
+
+target_link_libraries(guetzli_lib ${butteraugli_library} ${PNG_LIBRARIES})
+target_link_libraries(guetzli guetzli_lib ${butteraugli_library} ${PNG_LIBRARIES})
+
+
+install(
+ TARGETS guetzli_lib
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT DISABLE_INSTALL_TOOLS)
+ install (
+ TARGETS guetzli
+ RUNTIME DESTINATION tools/guetzli
+ )
+endif()
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES ${guetzli_includes} DESTINATION include/guetzli)
+endif()
diff --git a/ports/guetzli/CONTROL b/ports/guetzli/CONTROL
new file mode 100644
index 000000000..2ce631a2a
--- /dev/null
+++ b/ports/guetzli/CONTROL
@@ -0,0 +1,4 @@
+Source: guetzli
+Version: 2017-09-02-cb5e4a86f69628-1
+Description: Perceptual JPEG encoder
+Build-Depends: libpng, butteraugli
diff --git a/ports/guetzli/portfile.cmake b/ports/guetzli/portfile.cmake
new file mode 100644
index 000000000..4fb0402ba
--- /dev/null
+++ b/ports/guetzli/portfile.cmake
@@ -0,0 +1,24 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO google/guetzli
+ REF cb5e4a86f69628f685f2b78d7429e248ab83d8d7
+ SHA512 695a87dc27573b8df74a7e7924e9b96a7bd375b1aae02e7b0fad800428d973cf17947d46ec7afefade2a86ebe3d39f3c3178aad1137b9dd013f5f85ee6569a75
+ HEAD_REF master
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/guetzli)
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/guetzli RENAME copyright)
diff --git a/ports/gumbo/CMakeLists.txt b/ports/gumbo/CMakeLists.txt
new file mode 100644
index 000000000..fe239cb8a
--- /dev/null
+++ b/ports/gumbo/CMakeLists.txt
@@ -0,0 +1,32 @@
+cmake_minimum_required(VERSION 3.8.0)
+
+project(gumbo)
+
+set(gumbo_srcs
+ src/attribute.c
+ src/char_ref.c
+ src/error.c
+ src/parser.c
+ src/string_buffer.c
+ src/string_piece.c
+ src/tag.c
+ src/tokenizer.c
+ src/utf8.c
+ src/util.c
+ src/vector.c
+)
+
+
+include_directories(visualc/include src)
+
+add_library(gumbo ${gumbo_srcs})
+
+install(
+ TARGETS gumbo
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES src/gumbo.h src/tag_enum.h DESTINATION include)
+endif()
diff --git a/ports/gumbo/CONTROL b/ports/gumbo/CONTROL
new file mode 100644
index 000000000..ceee95b5d
--- /dev/null
+++ b/ports/gumbo/CONTROL
@@ -0,0 +1,3 @@
+Source: gumbo
+Version: 0.10.1-1
+Description: An HTML5 parsing library in pure C99
diff --git a/ports/gumbo/portfile.cmake b/ports/gumbo/portfile.cmake
new file mode 100644
index 000000000..a4b0ded72
--- /dev/null
+++ b/ports/gumbo/portfile.cmake
@@ -0,0 +1,24 @@
+include(vcpkg_common_functions)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(WARNING "Dynamic not supported building static")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO google/gumbo-parser
+ REF v0.10.1
+ SHA512 bb1fb55cd07076ab6a9f38dc14db50397dbdca9a04ace4895dfba8b8cbc09038a96e26070c09c75fa929ada2e815affe233c1e2ecd8afe2aba6201647cf277d1
+ HEAD_REF master
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gumbo RENAME copyright)
diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL
index acc0b6c7d..a99477b37 100644
--- a/ports/harfbuzz/CONTROL
+++ b/ports/harfbuzz/CONTROL
@@ -1,4 +1,4 @@
Source: harfbuzz
-Version: 1.4.6-1
+Version: 1.4.6-2
Description: HarfBuzz OpenType text shaping engine
Build-Depends: freetype, glib (windows)
diff --git a/ports/hdf5/CONTROL b/ports/hdf5/CONTROL
index 70d1f9979..38a0b8382 100644
--- a/ports/hdf5/CONTROL
+++ b/ports/hdf5/CONTROL
@@ -1,4 +1,4 @@
Source: hdf5
-Version: 1.10.0-patch1-1
+Version: 1.10.0-patch1-2
Description: HDF5 is a data model, library, and file format for storing and managing data
-Build-Depends: zlib, szip, msmpi \ No newline at end of file
+Build-Depends: zlib, szip, msmpi
diff --git a/ports/hpx/CONTROL b/ports/hpx/CONTROL
index cfb599e51..a7f31fc42 100644
--- a/ports/hpx/CONTROL
+++ b/ports/hpx/CONTROL
@@ -1,5 +1,5 @@
Source: hpx
-Version: 1.0.0-4
+Version: 1.0.0-5
Build-Depends: boost, hwloc
Description: The C++ Standards Library for Concurrency and Parallelism
HPX is a C++ Standards Library for Concurrency and Parallelism. It implements all of the corresponding facilities as defined by the C++ Standard. Additionally, in HPX we implement functionalities proposed as part of the ongoing C++ standardization process. We also extend the C++ Standard APIs to the distributed case.
diff --git a/ports/http-parser/CONTROL b/ports/http-parser/CONTROL
index 605f3354c..a9edf4071 100644
--- a/ports/http-parser/CONTROL
+++ b/ports/http-parser/CONTROL
@@ -1,3 +1,3 @@
Source: http-parser
-Version: 2.7.1-1
-Description: HTTP Parser. \ No newline at end of file
+Version: 2.7.1-2
+Description: HTTP Parser.
diff --git a/ports/hunspell/CONTROL b/ports/hunspell/CONTROL
index ec7979e35..da62f205b 100644
--- a/ports/hunspell/CONTROL
+++ b/ports/hunspell/CONTROL
@@ -1,3 +1,3 @@
Source: hunspell
-Version: 1.6.1-1
+Version: 1.6.1-2
Description: The most popular spellchecking library.
diff --git a/ports/hwloc/CONTROL b/ports/hwloc/CONTROL
index 1bd3af628..ef2564050 100644
--- a/ports/hwloc/CONTROL
+++ b/ports/hwloc/CONTROL
@@ -1,4 +1,4 @@
Source: hwloc
-Version: 1.11.7-1
+Version: 1.11.7-2
Description: Portable Hardware Locality (hwloc)
The Portable Hardware Locality (hwloc) software package provides a portable abstraction (across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various system attributes such as cache and memory information as well as the locality of I/O devices such as network interfaces, InfiniBand HCAs or GPUs.
diff --git a/ports/hypre/CONTROL b/ports/hypre/CONTROL
index 9a96cb4d4..c41f30930 100644
--- a/ports/hypre/CONTROL
+++ b/ports/hypre/CONTROL
@@ -1,4 +1,4 @@
Source: hypre
-Version: 2.11.2
+Version: 2.11.2-1
Description: SCALABLE LINEAR SOLVERS AND MULTIGRID METHODS
-Build-Depends: msmpi \ No newline at end of file
+Build-Depends: msmpi
diff --git a/ports/ilmbase/CONTROL b/ports/ilmbase/CONTROL
index 8bb022905..2060d94d5 100644
--- a/ports/ilmbase/CONTROL
+++ b/ports/ilmbase/CONTROL
@@ -1,3 +1,3 @@
Source: ilmbase
-Version: 2.2.0
+Version: 2.2.0-1
Description: Base libraries from ILM for OpenEXR
diff --git a/ports/imgui/CMakeLists.txt b/ports/imgui/CMakeLists.txt
new file mode 100644
index 000000000..a4c49a337
--- /dev/null
+++ b/ports/imgui/CMakeLists.txt
@@ -0,0 +1,43 @@
+cmake_minimum_required(VERSION 3.8)
+project(imgui CXX)
+
+set(CMAKE_DEBUG_POSTFIX d)
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
+find_path(STB_INCLUDE_DIR stb_rect_pack.h stb_textedit.h stb_truetype.h)
+
+set(IMGUI_INCLUDES_PUBLIC
+ imgui.h
+ imconfig.h
+)
+
+set(IMGUI_INCLUDES_PRIVATE
+ imgui_internal.h
+)
+
+set(IMGUI_SOURCES
+ imgui.cpp
+ imgui_demo.cpp
+ imgui_draw.cpp
+)
+
+add_library(imgui
+ ${IMGUI_INCLUDES_PUBLIC}
+ ${IMGUI_INCLUDES_PRIVATE}
+ ${IMGUI_SOURCES}
+)
+
+target_include_directories(imgui PUBLIC ${STB_INCLUDE_DIR})
+
+install(TARGETS imgui
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT IMGUI_SKIP_HEADERS)
+ install(
+ FILES ${IMGUI_INCLUDES_PUBLIC}
+ DESTINATION include
+ )
+endif()
diff --git a/ports/imgui/CONTROL b/ports/imgui/CONTROL
new file mode 100644
index 000000000..35e041de1
--- /dev/null
+++ b/ports/imgui/CONTROL
@@ -0,0 +1,4 @@
+Source: imgui
+Version: 1.51-1
+Build-Depends: stb
+Description: Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies.
diff --git a/ports/imgui/portfile.cmake b/ports/imgui/portfile.cmake
new file mode 100644
index 000000000..587a4cf19
--- /dev/null
+++ b/ports/imgui/portfile.cmake
@@ -0,0 +1,33 @@
+include(vcpkg_common_functions)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(STATUS "Warning: Dynamic building not supported yet. Building static.")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO ocornut/imgui
+ REF v1.51
+ SHA512 33aea46d0ab8419fcd4af765c9f1a88dfb1b80ad466276b655a67f40ffedabe399db6b0d76a2ece74e551928bd6f842ae3fa42998e0b1a2206157a3852e002d6
+ HEAD_REF master
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+file(GLOB STB_HEADERS ${SOURCE_PATH}/stb_*.h)
+if(STB_HEADERS)
+ file(REMOVE ${STB_HEADERS})
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG
+ -DIMGUI_SKIP_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/imgui)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/imgui/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/imgui/copyright)
diff --git a/ports/jansson/CONTROL b/ports/jansson/CONTROL
index c14e7d7d8..0cf311912 100644
--- a/ports/jansson/CONTROL
+++ b/ports/jansson/CONTROL
@@ -1,3 +1,3 @@
Source: jansson
-Version: v2.10
+Version: v2.10-1
Description: Jansson is a C library for encoding, decoding and manipulating JSON data
diff --git a/ports/jasper/CONTROL b/ports/jasper/CONTROL
index 682501e49..70f3eda3c 100644
--- a/ports/jasper/CONTROL
+++ b/ports/jasper/CONTROL
@@ -1,4 +1,4 @@
Source: jasper
-Version: 2.0.13
+Version: 2.0.13-1
Description: Open source implementation of the JPEG-2000 Part-1 standard
Build-Depends: libjpeg-turbo
diff --git a/ports/jbigkit/CONTROL b/ports/jbigkit/CONTROL
index 01a9921e1..f0a7cc426 100644
--- a/ports/jbigkit/CONTROL
+++ b/ports/jbigkit/CONTROL
@@ -1,3 +1,3 @@
Source: jbigkit
-Version: 2.1
+Version: 2.1-1
Description: A software implementation of the JBIG1 data compression standard (ITU-T T.82)
diff --git a/ports/jemalloc/CONTROL b/ports/jemalloc/CONTROL
index c867b4573..5bdca6c43 100644
--- a/ports/jemalloc/CONTROL
+++ b/ports/jemalloc/CONTROL
@@ -1,4 +1,4 @@
Source: jemalloc
-Version: 4.3.1-1
+Version: 4.3.1-2
Description: jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support
Build-Depends:
diff --git a/ports/jsoncpp/CONTROL b/ports/jsoncpp/CONTROL
index 19f3e054a..f04c231f8 100644
--- a/ports/jsoncpp/CONTROL
+++ b/ports/jsoncpp/CONTROL
@@ -1,3 +1,3 @@
Source: jsoncpp
-Version: 1.8.1
+Version: 1.8.1-1
Description: jsoncpp is an implementation of a JSON reader and writer in C++. JSON (JavaScript Object Notation) is a lightweight data-interchange format that it is easy to parse and redeable for human.
diff --git a/ports/jsonnet/CMakeLists.txt b/ports/jsonnet/CMakeLists.txt
new file mode 100644
index 000000000..4f749e5b8
--- /dev/null
+++ b/ports/jsonnet/CMakeLists.txt
@@ -0,0 +1,53 @@
+cmake_minimum_required(VERSION 3.5.1)
+project(jsonnet)
+
+if(MSVC)
+ add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
+endif()
+
+if(BUILD_SHARED_LIBS)
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+endif()
+
+set( jsonnet_sources
+ core/desugarer.cpp
+ core/formatter.cpp
+ core/lexer.cpp
+ core/libjsonnet.cpp
+ core/parser.cpp
+ core/pass.cpp
+ core/static_analysis.cpp
+ core/string_utils.cpp
+ core/vm.cpp
+)
+
+include_directories(third_party/md5 include cpp core stdlib)
+
+add_library(md5 STATIC third_party/md5/md5.cpp)
+
+add_library(libjsonnet ${jsonnet_sources})
+target_link_libraries(libjsonnet md5)
+
+add_library(libjsonnet++ cpp/libjsonnet++.cpp)
+target_link_libraries(libjsonnet++ libjsonnet)
+
+add_executable(jsonnet cmd/jsonnet.cpp)
+target_link_libraries(jsonnet libjsonnet)
+
+
+install(
+ TARGETS libjsonnet libjsonnet++
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+if(NOT DISABLE_INSTALL_TOOLS)
+ install (
+ TARGETS jsonnet
+ RUNTIME DESTINATION tools/jsonnet
+ )
+endif()
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES include/libjsonnet++.h include/libjsonnet.h DESTINATION include)
+endif()
diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL
new file mode 100644
index 000000000..0254fc14c
--- /dev/null
+++ b/ports/jsonnet/CONTROL
@@ -0,0 +1,3 @@
+Source: jsonnet
+Version: 2017-09-02-11cf9fa9f2fe8acbb14b096316006082564ca580
+Description: Jsonnet - The data templating language
diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake
new file mode 100644
index 000000000..0fa1bf14d
--- /dev/null
+++ b/ports/jsonnet/portfile.cmake
@@ -0,0 +1,29 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO google/jsonnet
+ REF 11cf9fa9f2fe8acbb14b096316006082564ca580
+ SHA512 77d9c9e86c4c6501a00f089c72dea522dd818ac0c810b603d18bea111f8f8cf9a25039600a9ba158c5f02142e24d49074e7fe0ddf113665eedf4c3ef66bf421a
+ HEAD_REF master
+)
+
+vcpkg_execute_required_process(
+ COMMAND Powershell -Command "((Get-Content -Encoding Byte ${SOURCE_PATH}/stdlib/std.jsonnet) -join ',') + ',0' > ${SOURCE_PATH}/core/std.jsonnet.h"
+ WORKING_DIRECTORY ${SOURCE_PATH}
+ LOGNAME "std.jsonnet"
+)
+
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/jsonnet)
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jsonnet RENAME copyright)
diff --git a/ports/jxrlib/CONTROL b/ports/jxrlib/CONTROL
index a125cb176..9fcc36254 100644
--- a/ports/jxrlib/CONTROL
+++ b/ports/jxrlib/CONTROL
@@ -1,3 +1,3 @@
Source: jxrlib
-Version: 1.1-3
+Version: 1.1-4
Description: Open source implementation of the jpegxr image format standard.
diff --git a/ports/kf5plotting/CONTROL b/ports/kf5plotting/CONTROL
new file mode 100644
index 000000000..a24b8e352
--- /dev/null
+++ b/ports/kf5plotting/CONTROL
@@ -0,0 +1,4 @@
+Source: kf5plotting
+Version: 5.37.0
+Description: Lightweight plotting framework
+Build-Depends: ecm, qt5
diff --git a/ports/kf5plotting/portfile.cmake b/ports/kf5plotting/portfile.cmake
new file mode 100644
index 000000000..39d6e8893
--- /dev/null
+++ b/ports/kf5plotting/portfile.cmake
@@ -0,0 +1,24 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/kplotting-5.37.0)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://download.kde.org/stable/frameworks/5.37/kplotting-5.37.0.zip"
+ FILENAME "kplotting-5.37.0.zip"
+ SHA512 3a1b3f993123dea7141d280cd53ae1b5e49b859e9df39a188bac216758576106efd8b744e8f10f96fac158f980d79ae94d2b27f3d85a48fcd5673263ffce3c4e
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS -DBUILD_HTML_DOCS=OFF
+ -DBUILD_MAN_DOCS=OFF
+ -DBUILD_QTHELP_DOCS=OFF
+ -DBUILD_TESTING=OFF
+)
+
+vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5Plotting)
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/KF5plotting RENAME copyright)
diff --git a/ports/kinectsdk1/CONTROL b/ports/kinectsdk1/CONTROL
index 3d4c83fd2..9764fb69a 100644
--- a/ports/kinectsdk1/CONTROL
+++ b/ports/kinectsdk1/CONTROL
@@ -1,3 +1,3 @@
Source: kinectsdk1
-Version: 1.8-1
+Version: 1.8-2
Description: Kinect for Windows SDK for Kinect v1 sensor.
diff --git a/ports/kinectsdk1/portfile.cmake b/ports/kinectsdk1/portfile.cmake
index aef4cd1c2..5aec50119 100644
--- a/ports/kinectsdk1/portfile.cmake
+++ b/ports/kinectsdk1/portfile.cmake
@@ -1,10 +1,39 @@
include(vcpkg_common_functions)
-get_filename_component(KINECTSDK10_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Kinect;SDKInstallPath]" ABSOLUTE CACHE)
-if(NOT EXISTS "${KINECTSDK10_DIR}")
- message(FATAL_ERROR "Error: Could not find Kinect for Windows SDK v1.x. It can be downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=40278.")
+if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
+ message(FATAL_ERROR "This port does not currently support architecture: ${VCPKG_TARGET_ARCHITECTURE}")
endif()
+set(KINECTSDK10_VERSION "v1.8")
+vcpkg_download_distfile(KINECTSDK10_INSTALLER
+ URLS "https://download.microsoft.com/download/E/1/D/E1DEC243-0389-4A23-87BF-F47DE869FC1A/KinectSDK-${KINECTSDK10_VERSION}-Setup.exe"
+ FILENAME "KinectSDK-${KINECTSDK10_VERSION}-Setup.exe"
+ SHA512 ee8a0f70c86aad80fe214108e315e4550a90ed39f278ce00a7137532174ee5bf3bdeb1d0b499fc5ffdb5e176adecfd68963ee3731e1d2f00d69d32d1b8a3c555
+)
+
+vcpkg_find_acquire_program(DARK)
+
+set(KINECTSDK10_WIX_INSTALLER "${KINECTSDK10_INSTALLER}")
+set(KINECTSDK10_WIX_EXTRACT_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/wix")
+vcpkg_execute_required_process(
+ COMMAND ${DARK} -x ${KINECTSDK10_WIX_EXTRACT_DIR} ${KINECTSDK10_WIX_INSTALLER}
+ WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}
+ LOGNAME extract_wix_installer
+)
+
+file(TO_NATIVE_PATH "${KINECTSDK10_WIX_EXTRACT_DIR}/AttachedContainer/KinectSDK-${KINECTSDK10_VERSION}-${VCPKG_TARGET_ARCHITECTURE}.msi" KINECTSDK10_MSI_INSTALLER)
+file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/src/installer/msi/${VCPKG_TARGET_ARCHITECTURE}" KINECTSDK10_MSI_EXTRACT_DIR)
+file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/msiexec.log" MSIEXEC_LOG_PATH)
+set(BATCH_FILE ${CURRENT_BUILDTREES_DIR}/msiextract-msmpi.bat)
+file(WRITE ${BATCH_FILE} "msiexec.exe /a \"${KINECTSDK10_MSI_INSTALLER}\" /qn /log \"${MSIEXEC_LOG_PATH}\" TARGETDIR=\"${KINECTSDK10_MSI_EXTRACT_DIR}\"")
+vcpkg_execute_required_process(
+ COMMAND ${BATCH_FILE}
+ WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}
+ LOGNAME extract_msi_installer_${VCPKG_TARGET_ARCHITECTURE}
+)
+
+set(KINECTSDK10_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/msi/${VCPKG_TARGET_ARCHITECTURE}/Microsoft SDKs/Kinect/${KINECTSDK10_VERSION}")
+
file(
INSTALL
"${KINECTSDK10_DIR}/inc/NuiApi.h"
diff --git a/ports/kinectsdk2/CONTROL b/ports/kinectsdk2/CONTROL
new file mode 100644
index 000000000..85ccd7f0b
--- /dev/null
+++ b/ports/kinectsdk2/CONTROL
@@ -0,0 +1,3 @@
+Source: kinectsdk2
+Version: 2.0
+Description: Kinect for Windows SDK for Kinect v2 sensor.
diff --git a/ports/kinectsdk2/portfile.cmake b/ports/kinectsdk2/portfile.cmake
new file mode 100644
index 000000000..05aa1fd2e
--- /dev/null
+++ b/ports/kinectsdk2/portfile.cmake
@@ -0,0 +1,72 @@
+# Common Ambient Variables:
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
+# PORT = current port name (zlib, etc)
+# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
+# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
+# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
+#
+
+include(vcpkg_common_functions)
+
+if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
+ message(FATAL_ERROR "This port does not currently support architecture: ${VCPKG_TARGET_ARCHITECTURE}")
+endif()
+
+set(KINECTSDK20_VERSION "v2.0_1409")
+vcpkg_download_distfile(KINECTSDK20_INSTALLER
+ URLS "https://download.microsoft.com/download/F/2/D/F2D1012E-3BC6-49C5-B8B3-5ACFF58AF7B8/KinectSDK-${KINECTSDK20_VERSION}-Setup.exe"
+ FILENAME "KinectSDK-${KINECTSDK20_VERSION}-Setup.exe"
+ SHA512 ae3b00f45282ab2ed6ea36c09e42e1b274074f41546ecfbe00facf1fffa2e5a762ffeffb9ba2194f716e8122e0fbd9a8ef63c62be68d2b50a40e4f8c5a821f5f
+)
+
+vcpkg_find_acquire_program(DARK)
+
+set(KINECTSDK20_WIX_INSTALLER "${KINECTSDK20_INSTALLER}")
+set(KINECTSDK20_WIX_EXTRACT_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/wix")
+vcpkg_execute_required_process(
+ COMMAND ${DARK} -x ${KINECTSDK20_WIX_EXTRACT_DIR} ${KINECTSDK20_WIX_INSTALLER}
+ WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}
+ LOGNAME extract_wix_installer
+)
+
+file(TO_NATIVE_PATH "${KINECTSDK20_WIX_EXTRACT_DIR}/AttachedContainer/KinectSDK-${KINECTSDK20_VERSION}-x64.msi" KINECTSDK20_MSI_INSTALLER)
+file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/src/installer/msi" KINECTSDK20_MSI_EXTRACT_DIR)
+file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/msiexec.log" MSIEXEC_LOG_PATH)
+set(BATCH_FILE ${CURRENT_BUILDTREES_DIR}/msiextract-msmpi.bat)
+file(WRITE ${BATCH_FILE} "msiexec.exe /a \"${KINECTSDK20_MSI_INSTALLER}\" /qn /log \"${MSIEXEC_LOG_PATH}\" TARGETDIR=\"${KINECTSDK20_MSI_EXTRACT_DIR}\"")
+vcpkg_execute_required_process(
+ COMMAND ${BATCH_FILE}
+ WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}
+ LOGNAME extract_msi_installer
+)
+
+set(KINECTSDK20_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/msi/Microsoft SDKs/Kinect/${KINECTSDK20_VERSION}")
+
+file(
+ INSTALL
+ "${KINECTSDK20_DIR}/inc/Kinect.h"
+ DESTINATION
+ ${CURRENT_PACKAGES_DIR}/include
+)
+
+file(
+ INSTALL
+ "${KINECTSDK20_DIR}/Lib/${VCPKG_TARGET_ARCHITECTURE}/Kinect20.lib"
+ DESTINATION
+ ${CURRENT_PACKAGES_DIR}/lib
+)
+
+file(
+ INSTALL
+ "${KINECTSDK20_DIR}/Lib/${VCPKG_TARGET_ARCHITECTURE}/Kinect20.lib"
+ DESTINATION
+ ${CURRENT_PACKAGES_DIR}/debug/lib
+)
+
+# Handle copyright
+file(COPY "${KINECTSDK20_DIR}/SDKEula.rtf" DESTINATION ${CURRENT_PACKAGES_DIR}/share/kinectsdk2)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/kinectsdk2/SDKEula.rtf ${CURRENT_PACKAGES_DIR}/share/kinectsdk2/copyright)
diff --git a/ports/lcms/CONTROL b/ports/lcms/CONTROL
index b8c222333..03efca607 100644
--- a/ports/lcms/CONTROL
+++ b/ports/lcms/CONTROL
@@ -1,4 +1,4 @@
Source: lcms
-Version: 2.8-2
+Version: 2.8-3
Build-Depends:
-Description: Little CMS. \ No newline at end of file
+Description: Little CMS.
diff --git a/ports/lcms/portfile.cmake b/ports/lcms/portfile.cmake
index 7a043d1f2..eeb12243c 100644
--- a/ports/lcms/portfile.cmake
+++ b/ports/lcms/portfile.cmake
@@ -4,7 +4,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mm2/Little-CMS
REF lcms2.8
- SHA512 ad904ce8acead6c8e255feb8386c1ab3fa432c3b36a3b521bc5c50993cb47ce4d42be0ad240dd8dd3bfeb3c0e884d8184f58797da5ef297b2f9a0e7da9788644
+ SHA512 22ee94aa3333db4248607d8aa84343d324e04b30c154c46672c6f668e14a369b9b72f2557b8465218b6e9a2676cf8fa37d617b4aa13a013dc2337197a599e63a
HEAD_REF master
)
diff --git a/ports/leptonica/CONTROL b/ports/leptonica/CONTROL
new file mode 100644
index 000000000..cd1c44cb4
--- /dev/null
+++ b/ports/leptonica/CONTROL
@@ -0,0 +1,4 @@
+Source: leptonica
+Version: 1.74.4-1
+Description: An open source library containing software that is broadly useful for image processing and image analysis applications
+Build-Depends: libjpeg-turbo, zlib, libpng, tiff, giflib
diff --git a/ports/leptonica/fix-cmakelists.patch b/ports/leptonica/fix-cmakelists.patch
new file mode 100644
index 000000000..18eb8cde5
--- /dev/null
+++ b/ports/leptonica/fix-cmakelists.patch
@@ -0,0 +1,34 @@
+--- a/src/CMakeLists.txt Sun Jun 11 23:04:50 2017
++++ b/src/CMakeLists.txt Wed Aug 16 17:29:56 2017
+@@ -27,24 +27,31 @@
+ endif()
+
+ if (GIF_LIBRARY)
++ target_include_directories (leptonica PUBLIC ${GIF_INCLUDE_DIR})
+ target_link_libraries (leptonica ${GIF_LIBRARY})
+ endif()
+ if (JPEG_LIBRARY)
++ target_include_directories (leptonica PUBLIC ${JPEG_INCLUDE_DIR})
+ target_link_libraries (leptonica ${JPEG_LIBRARY})
+ endif()
+ if (JP2K_FOUND)
++ target_include_directories (leptonica PUBLIC ${JP2K_INCLUDE_DIR})
+ target_link_libraries (leptonica ${JP2K_LIBRARIES})
+ endif()
+ if (PNG_LIBRARY)
++ target_include_directories (leptonica PUBLIC ${PNG_INCLUDE_DIRS})
+ target_link_libraries (leptonica ${PNG_LIBRARY})
+ endif()
+ if (TIFF_LIBRARY)
++ target_include_directories (leptonica PUBLIC ${TIFF_INCLUDE_DIR})
+ target_link_libraries (leptonica ${TIFF_LIBRARY})
+ endif()
+ if (WEBP_FOUND)
++ target_include_directories (leptonica PUBLIC ${WEBP_INCLUDE_DIR})
+ target_link_libraries (leptonica ${WEBP_LIBRARIES})
+ endif()
+ if (ZLIB_LIBRARY)
++ target_include_directories (leptonica PUBLIC ${ZLIB_INCLUDE_DIR})
+ target_link_libraries (leptonica ${ZLIB_LIBRARY})
+ endif()
+
diff --git a/ports/leptonica/portfile.cmake b/ports/leptonica/portfile.cmake
new file mode 100644
index 000000000..a5d4330fd
--- /dev/null
+++ b/ports/leptonica/portfile.cmake
@@ -0,0 +1,36 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO DanBloomberg/leptonica
+ REF 1.74.4
+ SHA512 3b9d0be937883f733f72cbdf0b624ec245d9256a8b4622997f437d309efd7ad9695ad1cbe2224d543eb3ef8c44833567b3cc9a95e9a774ef9046b7acaf0ae744
+ HEAD_REF master
+)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DCMAKE_REQUIRED_INCLUDES=${CURRENT_INSTALLED_DIR}/include # for check_include_file()
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake")
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/leptonica-license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/leptonica)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/leptonica/leptonica-license.txt ${CURRENT_PACKAGES_DIR}/share/leptonica/copyright)
diff --git a/ports/libarchive/CONTROL b/ports/libarchive/CONTROL
index 3cd81ee5c..c17693807 100644
--- a/ports/libarchive/CONTROL
+++ b/ports/libarchive/CONTROL
@@ -1,4 +1,4 @@
Source: libarchive
-Version: 3.3.2
+Version: 3.3.2-1
Description: Library for reading and writing streaming archives
Build-Depends: zlib, bzip2, libxml2, lz4, liblzma, openssl
diff --git a/ports/libbson/CONTROL b/ports/libbson/CONTROL
index 141221ba4..263608bf6 100644
--- a/ports/libbson/CONTROL
+++ b/ports/libbson/CONTROL
@@ -1,3 +1,3 @@
Source: libbson
-Version: 1.6.2-1
-Description: libbson is a library providing useful routines related to building, parsing, and iterating BSON documents. \ No newline at end of file
+Version: 1.6.2-2
+Description: libbson is a library providing useful routines related to building, parsing, and iterating BSON documents.
diff --git a/ports/libconfig/CONTROL b/ports/libconfig/CONTROL
index 45bf1db9b..cd0469369 100644
--- a/ports/libconfig/CONTROL
+++ b/ports/libconfig/CONTROL
@@ -1,4 +1,4 @@
Source: libconfig
-Version: 1.6.0
+Version: 1.6.0-1
Description: C/C++ library for processing configuration files
Build-Depends: dirent
diff --git a/ports/libepoxy/CONTROL b/ports/libepoxy/CONTROL
index 95bc19474..79ffdbf46 100644
--- a/ports/libepoxy/CONTROL
+++ b/ports/libepoxy/CONTROL
@@ -1,3 +1,3 @@
Source: libepoxy
-Version: 1.4.3
+Version: 1.4.3-1
Description: Epoxy is a library for handling OpenGL function pointer management for you
diff --git a/ports/libevent/CONTROL b/ports/libevent/CONTROL
index 87c0d0a64..f260b6d01 100644
--- a/ports/libevent/CONTROL
+++ b/ports/libevent/CONTROL
@@ -1,4 +1,4 @@
Source: libevent
-Version: 2.1.8-2
+Version: 2.1.8-3
Build-Depends: openssl
-Description: An event notification library \ No newline at end of file
+Description: An event notification library
diff --git a/ports/libexif/CMakeLists.txt b/ports/libexif/CMakeLists.txt
new file mode 100644
index 000000000..ac32e82eb
--- /dev/null
+++ b/ports/libexif/CMakeLists.txt
@@ -0,0 +1,142 @@
+cmake_minimum_required(VERSION 3.0)
+project(libexif LANGUAGES C)
+
+set(PACKAGE "libexif")
+
+option(ENABLE_NLS "Enable NLS" OFF)
+
+set(HEADERS
+ libexif/_stdint.h
+ libexif/exif.h
+ libexif/exif-byte-order.h
+ libexif/exif-content.h
+ libexif/exif-data.h
+ libexif/exif-data-type.h
+ libexif/exif-entry.h
+ libexif/exif-format.h
+ libexif/exif-ifd.h
+ libexif/exif-loader.h
+ libexif/exif-log.h
+ libexif/exif-mem.h
+ libexif/exif-mnote-data.h
+ libexif/exif-mnote-data-priv.h
+ libexif/exif-system.h
+ libexif/exif-tag.h
+ libexif/exif-utils.h
+)
+
+set(SOURCES
+ libexif/exif-byte-order.c
+ libexif/exif-content.c
+ libexif/exif-data.c
+ libexif/exif-entry.c
+ libexif/exif-format.c
+ libexif/exif-ifd.c
+ libexif/exif-loader.c
+ libexif/exif-log.c
+ libexif/exif-mem.c
+ libexif/exif-mnote-data.c
+ libexif/exif-tag.c
+ libexif/exif-utils.c
+)
+
+set(HEADERS_CANON
+ libexif/canon/exif-mnote-data-canon.h
+ libexif/canon/mnote-canon-entry.h
+ libexif/canon/mnote-canon-tag.h
+)
+
+set(SOURCES_CANON
+ libexif/canon/exif-mnote-data-canon.c
+ libexif/canon/mnote-canon-entry.c
+ libexif/canon/mnote-canon-tag.c
+)
+
+set(HEADERS_FUJI
+ libexif/fuji/exif-mnote-data-fuji.h
+ libexif/fuji/mnote-fuji-entry.h
+ libexif/fuji/mnote-fuji-tag.h
+)
+
+set(SOURCES_FUJI
+ libexif/fuji/exif-mnote-data-fuji.c
+ libexif/fuji/mnote-fuji-entry.c
+ libexif/fuji/mnote-fuji-tag.c
+)
+
+set(HEADERS_OLYMPUS
+ libexif/olympus/exif-mnote-data-olympus.h
+ libexif/olympus/mnote-olympus-entry.h
+ libexif/olympus/mnote-olympus-tag.h
+)
+
+set(SOURCES_OLYMPUS
+ libexif/olympus/exif-mnote-data-olympus.c
+ libexif/olympus/mnote-olympus-entry.c
+ libexif/olympus/mnote-olympus-tag.c
+)
+
+set(HEADERS_PENTAX
+ libexif/pentax/exif-mnote-data-pentax.h
+ libexif/pentax/mnote-pentax-entry.h
+ libexif/pentax/mnote-pentax-tag.h
+)
+
+set(SOURCES_PENTAX
+ libexif/pentax/exif-mnote-data-pentax.c
+ libexif/pentax/mnote-pentax-entry.c
+ libexif/pentax/mnote-pentax-tag.c
+)
+
+if(MSVC)
+ set(SOURCES_MSVC "libexif.def")
+endif()
+
+add_library(libexif
+ ${SOURCES}
+ ${SOURCES_CANON}
+ ${SOURCES_FUJI}
+ ${SOURCES_OLYMPUS}
+ ${SOURCES_PENTAX}
+ ${SOURCES_MSVC}
+)
+
+target_include_directories(libexif PRIVATE .)
+target_include_directories(libexif PRIVATE ${CMAKE_BINARY_DIR})
+target_compile_definitions(libexif PRIVATE -D_CRT_SECURE_NO_WARNINGS)
+target_compile_definitions(libexif PRIVATE -DGETTEXT_PACKAGE="${PACKAGE}")
+
+include(CheckFunctionExists)
+include(CheckIncludeFile)
+
+check_function_exists(dcgettext HAVE_DCGETTEXT)
+check_function_exists(gettext HAVE_DCGETTEXT)
+check_function_exists(iconv HAVE_DCGETTEXT)
+check_function_exists(localtime_r HAVE_DCGETTEXT)
+
+check_include_file(dlfcn.h HAVE_DLFCN_H)
+check_include_file(inttypes.h HAVE_INTTYPES_H)
+check_include_file(memory.h HAVE_MEMORY_H)
+check_include_file(stdint.h HAVE_STDINT_H)
+check_include_file(stdlib.h HAVE_STDLIB_H)
+check_include_file(strings.h HAVE_STRINGS_H)
+check_include_file(string.h HAVE_STRING_H)
+check_include_file(sys/stat.h HAVE_SYS_STAT_H)
+check_include_file(sys/stat.h HAVE_SYS_STAT_H)
+check_include_file(sys/types.h HAVE_SYS_TYPES_H)
+check_include_file(unistd.h HAVE_UNISTD_H)
+
+configure_file(config.h.cmake config.h)
+
+install(
+ TARGETS libexif
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+)
+
+install(FILES ${HEADERS} DESTINATION include/libexif)
+install(FILES ${HEADERS_CANON} DESTINATION include/libexif/canon)
+install(FILES ${HEADERS_FUJI} DESTINATION include/libexif/fuji)
+install(FILES ${HEADERS_OLYMPUS} DESTINATION include/libexif/olympus)
+install(FILES ${HEADERS_PENTAX} DESTINATION include/libexif/pentax)
diff --git a/ports/libexif/CONTROL b/ports/libexif/CONTROL
new file mode 100644
index 000000000..427d907f2
--- /dev/null
+++ b/ports/libexif/CONTROL
@@ -0,0 +1,3 @@
+Source: libexif
+Version: 0.6.21-1
+Description: a library for parsing, editing, and saving EXIF data
diff --git a/ports/libexif/config.h.cmake b/ports/libexif/config.h.cmake
new file mode 100644
index 000000000..4dfbdb1b0
--- /dev/null
+++ b/ports/libexif/config.h.cmake
@@ -0,0 +1,96 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
+#cmakedefine ENABLE_NLS
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+ */
+#cmakedefine HAVE_DCGETTEXT
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#cmakedefine HAVE_DLFCN_H
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#cmakedefine HAVE_GETTEXT
+
+/* Define if you have the iconv() function. */
+#cmakedefine HAVE_ICONV
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#cmakedefine HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `localtime_r' function. */
+#cmakedefine HAVE_LOCALTIME_R
+
+/* Define to 1 if you have the <memory.h> header file. */
+#cmakedefine HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#cmakedefine HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#cmakedefine HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#cmakedefine HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#cmakedefine HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#cmakedefine HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#cmakedefine HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#cmakedefine HAVE_UNISTD_H
+
+/* Define as const if the declaration of iconv() needs const. */
+#cmakedefine ICONV_CONST
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#cmakedefine LT_OBJDIR
+
+/* Name of package */
+#cmakedefine PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#cmakedefine PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#cmakedefine PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#cmakedefine PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#cmakedefine PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#cmakedefine PACKAGE_URL
+
+/* Define to the version of this package. */
+#cmakedefine PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#cmakedefine STDC_HEADERS
+
+/* Version number of package */
+#cmakedefine VERSION
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#cmakedefine const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+#cmakedefine inline
+#endif
+
+#ifdef _MSC_VER
+#include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+#endif \ No newline at end of file
diff --git a/ports/libexif/libexif.def b/ports/libexif/libexif.def
new file mode 100644
index 000000000..6bd0ca424
--- /dev/null
+++ b/ports/libexif/libexif.def
@@ -0,0 +1,130 @@
+EXPORTS
+ exif_array_set_byte_order
+ exif_byte_order_get_name
+ exif_content_add_entry
+ exif_content_dump
+ exif_content_fix
+ exif_content_foreach_entry
+ exif_content_free
+ exif_content_get_entry
+ exif_content_get_ifd
+ exif_content_log
+ exif_content_new
+ exif_content_new_mem
+ exif_content_ref
+ exif_content_remove_entry
+ exif_content_unref
+ exif_data_dump
+ exif_data_fix
+ exif_data_foreach_content
+ exif_data_free
+ exif_data_get_byte_order
+ exif_data_get_data_type
+ exif_data_get_log
+ exif_data_get_mnote_data
+ exif_data_load_data
+ exif_data_log
+ exif_data_new
+ exif_data_new_from_data
+ exif_data_new_from_file
+ exif_data_new_mem
+ exif_data_option_get_description
+ exif_data_option_get_name
+ exif_data_ref
+ exif_data_save_data
+ exif_data_set_byte_order
+ exif_data_set_data_type
+ exif_data_set_option
+ exif_data_unref
+ exif_data_unset_option
+ exif_entry_dump
+ exif_entry_fix
+ exif_entry_free
+ exif_entry_get_value
+ exif_entry_initialize
+ exif_entry_new
+ exif_entry_new_mem
+ exif_entry_ref
+ exif_entry_unref
+ exif_format_get_name
+ exif_format_get_size
+ exif_get_long
+ exif_get_rational
+ exif_get_short
+ exif_get_slong
+ exif_get_srational
+ exif_get_sshort
+ exif_ifd_get_name
+ exif_loader_get_buf
+ exif_loader_get_data
+ exif_loader_log
+ exif_loader_new
+ exif_loader_new_mem
+ exif_loader_ref
+ exif_loader_reset
+ exif_loader_unref
+ exif_loader_write
+ exif_loader_write_file
+ exif_log
+ exif_log_code_get_message
+ exif_log_code_get_title
+ exif_log_free
+ exif_log_new
+ exif_log_new_mem
+ exif_log_ref
+ exif_log_set_func
+ exif_log_unref
+ exif_logv
+ exif_mem_alloc
+ exif_mem_free
+ exif_mem_new
+ exif_mem_new_default
+ exif_mem_realloc
+ exif_mem_ref
+ exif_mem_unref
+ exif_mnote_data_canon_new
+ exif_mnote_data_construct
+ exif_mnote_data_count
+ exif_mnote_data_get_description
+ exif_mnote_data_get_id
+ exif_mnote_data_get_name
+ exif_mnote_data_get_title
+ exif_mnote_data_get_value
+ exif_mnote_data_load
+ exif_mnote_data_log
+ exif_mnote_data_olympus_new
+ exif_mnote_data_pentax_new
+ exif_mnote_data_ref
+ exif_mnote_data_save
+ exif_mnote_data_set_byte_order
+ exif_mnote_data_set_offset
+ exif_mnote_data_unref
+ exif_set_long
+ exif_set_rational
+ exif_set_short
+ exif_set_slong
+ exif_set_srational
+ exif_set_sshort
+ exif_tag_from_name
+ exif_tag_get_description
+ exif_tag_get_description_in_ifd
+ exif_tag_get_name
+ exif_tag_get_name_in_ifd
+ exif_tag_get_support_level_in_ifd
+ exif_tag_get_title
+ exif_tag_get_title_in_ifd
+ exif_tag_table_count
+ exif_tag_table_get_name
+ exif_tag_table_get_tag
+ mnote_canon_entry_get_value
+ mnote_canon_tag_get_description
+ mnote_canon_tag_get_name
+ mnote_canon_tag_get_title
+ mnote_olympus_entry_get_value
+ mnote_olympus_tag_get_description
+ mnote_olympus_tag_get_name
+ mnote_olympus_tag_get_title
+ mnote_pentax_entry_get_value
+ mnote_pentax_tag_get_description
+ mnote_pentax_tag_get_name
+ mnote_pentax_tag_get_title \ No newline at end of file
diff --git a/ports/libexif/portfile.cmake b/ports/libexif/portfile.cmake
new file mode 100644
index 000000000..0442d8c15
--- /dev/null
+++ b/ports/libexif/portfile.cmake
@@ -0,0 +1,31 @@
+include(vcpkg_common_functions)
+
+if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ message(FATAL_ERROR "libexif currently only supports being built for desktop")
+endif()
+
+set(LIBEXIF_VERSION 0.6.21)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libexif-${LIBEXIF_VERSION})
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://freefr.dl.sourceforge.net/project/libexif/libexif/${LIBEXIF_VERSION}/libexif-${LIBEXIF_VERSION}.tar.bz2"
+ FILENAME "libexif-${LIBEXIF_VERSION}.tar.bz2"
+ SHA512 4e0fe2abe85d1c95b41cb3abe1f6333dc3a9eb69dba106a674a78d74a4d5b9c5a19647118fa1cc2d72b98a29853394f1519eda9e2889eb28d3be26b21c7cfc35
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.cmake DESTINATION ${SOURCE_PATH})
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/libexif.def DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libexif RENAME copyright)
diff --git a/ports/libffi/CONTROL b/ports/libffi/CONTROL
index 83725f49c..ee1f0de9e 100644
--- a/ports/libffi/CONTROL
+++ b/ports/libffi/CONTROL
@@ -1,3 +1,3 @@
Source: libffi
-Version: 3.1
+Version: 3.1-1
Description: Portable, high level programming interface to various calling conventions
diff --git a/ports/libflac/CONTROL b/ports/libflac/CONTROL
index b81ec3cd1..2a0572d2a 100644
--- a/ports/libflac/CONTROL
+++ b/ports/libflac/CONTROL
@@ -1,4 +1,4 @@
Source: libflac
-Version: 1.3.2-2
+Version: 1.3.2-3
Description: Library for manipulating FLAC files
Build-Depends: libogg
diff --git a/ports/libfreenect2/CONTROL b/ports/libfreenect2/CONTROL
new file mode 100644
index 000000000..90c53db6d
--- /dev/null
+++ b/ports/libfreenect2/CONTROL
@@ -0,0 +1,4 @@
+Source: libfreenect2
+Version: 0.2.0
+Build-Depends:libusb
+Description: Open source drivers for the Kinect for Windows v2 device
diff --git a/ports/libfreenect2/portfile.cmake b/ports/libfreenect2/portfile.cmake
new file mode 100644
index 000000000..ba41bb904
--- /dev/null
+++ b/ports/libfreenect2/portfile.cmake
@@ -0,0 +1,41 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO OpenKinect/libfreenect2
+ REF v0.2.0
+ SHA512 3525e3f21462cecd3b198f64545786ffddc2cafdfd8146e5a46f0300b83f29f1ad0739618a07ab195c276149d7e2e909f7662e2d379a2880593cac75942b0666
+ HEAD_REF master
+)
+
+file(READ ${SOURCE_PATH}/cmake_modules/FindLibUSB.cmake FINDLIBUSB)
+string(REPLACE "(WIN32)"
+ "(WIN32_DISABLE)" FINDLIBUSB "${FINDLIBUSB}")
+file(WRITE ${SOURCE_PATH}/cmake_modules/FindLibUSB.cmake "${FINDLIBUSB}")
+
+file(READ ${SOURCE_PATH}/examples/CMakeLists.txt EXAMPLECMAKE)
+string(REPLACE "(WIN32)"
+ "(WIN32_DISABLE)" EXAMPLECMAKE "${EXAMPLECMAKE}")
+file(WRITE ${SOURCE_PATH}/examples/CMakeLists.txt "${EXAMPLECMAKE}")
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DENABLE_CUDA=OFF
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/freenect2")
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# The cmake config is actually called freenect2Config.cmake instead of libfreenect2Config.cmake ...
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/libfreenect2 ${CURRENT_PACKAGES_DIR}/share/freenect2)
+
+# license file needs to be in share/libfreenect2 otherwise vcpkg will complain
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/libfreenect2/)
+file(COPY ${SOURCE_PATH}/GPL2 DESTINATION ${CURRENT_PACKAGES_DIR}/share/libfreenect2/)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/libfreenect2/GPL2 ${CURRENT_PACKAGES_DIR}/share/libfreenect2/copyright)
diff --git a/ports/libgd/CONTROL b/ports/libgd/CONTROL
index 4d9d5bd24..f86afe90f 100644
--- a/ports/libgd/CONTROL
+++ b/ports/libgd/CONTROL
@@ -1,4 +1,4 @@
Source: libgd
-Version: 2.2.4-2
+Version: 2.2.4-3
Description: Open source code library for the dynamic creation of images by programmers.
Build-Depends: freetype, libjpeg-turbo, libpng, libwebp, tiff, fontconfig
diff --git a/ports/libharu/CONTROL b/ports/libharu/CONTROL
index b32612433..4ca6f8c26 100644
--- a/ports/libharu/CONTROL
+++ b/ports/libharu/CONTROL
@@ -1,4 +1,4 @@
Source: libharu
-Version: 2017-08-15-d84867ebf9f-1
+Version: 2017-08-15-d84867ebf9f-2
Description: libharu - free PDF library
Build-Depends: zlib,libpng
diff --git a/ports/libiconv/CONTROL b/ports/libiconv/CONTROL
index c79f06bb8..851c8dd01 100644
--- a/ports/libiconv/CONTROL
+++ b/ports/libiconv/CONTROL
@@ -1,3 +1,3 @@
Source: libiconv
-Version: 1.14
+Version: 1.14-1
Description: GNU Unicode text conversion
diff --git a/ports/libidn2/CMakeLists.txt b/ports/libidn2/CMakeLists.txt
new file mode 100644
index 000000000..9fbe1bcdd
--- /dev/null
+++ b/ports/libidn2/CMakeLists.txt
@@ -0,0 +1,105 @@
+cmake_minimum_required(VERSION 3.8)
+
+project(libidn2 C)
+
+find_path(ICONV_INCLUDE_DIR iconv.h)
+find_library(ICONV NAMES libiconv)
+find_library(ICONV_CHARSET NAMES libcharset)
+
+set(CMAKE_DEBUG_POSTFIX "d")
+
+if(MSVC)
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
+ add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
+endif()
+
+add_definitions(-DIDN2_BUILDING)
+
+if(NOT BUILD_SHARED_LIBS)
+ add_definitions(-DIDN2_STATIC)
+endif()
+
+# List the source files
+set(LIB_SRC lib/bidi.c
+ lib/context.c
+ lib/data.c
+ lib/decode.c
+ lib/error.c
+ lib/free.c
+ lib/idna.c
+ lib/lookup.c
+ lib/puny_decode.c
+ lib/puny_encode.c
+ lib/register.c
+ lib/tables.c
+ lib/tr46map.c
+ lib/tr46map_data.c
+ lib/version.c
+)
+
+# List the libunistring source files
+set(UNISTR_SRC unistring/c-ctype.c
+ unistring/c-strcasecmp.c
+ unistring/c-strncasecmp.c
+ unistring/malloca.c
+ unistring/striconveh.c
+ unistring/striconveha.c
+ unistring/uniconv/u8-conv-from-enc.c
+ unistring/uniconv/u8-strconv-from-enc.c
+ unistring/uniconv/u8-strconv-from-locale.c
+ unistring/uniconv/u8-strconv-to-enc.c
+ unistring/uniconv/u8-strconv-to-locale.c
+ unistring/unistr/u32-cpy.c
+ unistring/unistr/u32-cpy-alloc.c
+ unistring/unistr/u32-mbtouc-unsafe.c
+ unistring/unistr/u32-strlen.c
+ unistring/unistr/u32-to-u8.c
+ unistring/unistr/u32-uctomb.c
+ unistring/unistr/u8-check.c
+ unistring/unistr/u8-mblen.c
+ unistring/unistr/u8-mbtouc.c
+ unistring/unistr/u8-mbtouc-aux.c
+ unistring/unistr/u8-mbtouc-unsafe.c
+ unistring/unistr/u8-mbtouc-unsafe-aux.c
+ unistring/unistr/u8-mbtoucr.c
+ unistring/unistr/u8-prev.c
+ unistring/unistr/u8-strlen.c
+ unistring/unistr/u8-to-u32.c
+ unistring/unistr/u8-uctomb.c
+ unistring/unistr/u8-uctomb-aux.c
+ unistring/uninorm/canonical-decomposition.c
+ unistring/uninorm/composition.c
+ unistring/uninorm/decompose-internal.c
+ unistring/uninorm/decomposition-table.c
+ unistring/uninorm/nfc.c
+ unistring/uninorm/nfd.c
+ unistring/uninorm/u32-normalize.c
+ unistring/unictype/bidi_of.c
+ unistring/unictype/categ_M.c
+ unistring/unictype/categ_none.c
+ unistring/unictype/categ_of.c
+ unistring/unictype/categ_test.c
+ unistring/unictype/combiningclass.c
+ unistring/unictype/joiningtype_of.c
+ unistring/unictype/scripts.c
+)
+
+# List the gnulib source files
+set(GL_SRC gl/rawmemchr.c
+ gl/strchrnul.c
+ gl/strverscmp.c
+ gl/msvc-inval.c
+ gl/msvc-nothrow.c
+)
+
+add_library(libidn2 ${LIB_SRC} ${UNISTR_SRC} ${GL_SRC})
+
+target_include_directories(libidn2 PRIVATE . ./unistring ./gl ${ICONV_INCLUDE_DIR})
+target_link_libraries(libidn2 PRIVATE ${ICONV} ${ICONV_CHARSET})
+
+install(TARGETS libidn2
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
+
+install(FILES lib/idn2.h DESTINATION include)
diff --git a/ports/libidn2/CONTROL b/ports/libidn2/CONTROL
new file mode 100644
index 000000000..46e81c7bf
--- /dev/null
+++ b/ports/libidn2/CONTROL
@@ -0,0 +1,4 @@
+Source: libidn2
+Version: 2.0.4
+Build-Depends: libiconv
+Description: GNU Libidn is an implementation of the Stringprep, Punycode and IDNA 2003 specifications. Libidn's purpose is to encode and decode internationalized domain names.
diff --git a/ports/libidn2/config.h b/ports/libidn2/config.h
new file mode 100644
index 000000000..9e61bc8f2
--- /dev/null
+++ b/ports/libidn2/config.h
@@ -0,0 +1,995 @@
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to the number of bits in type 'ptrdiff_t'. */
+/* #undef BITSIZEOF_PTRDIFF_T */
+
+/* Define to the number of bits in type 'sig_atomic_t'. */
+/* #undef BITSIZEOF_SIG_ATOMIC_T */
+
+/* Define to the number of bits in type 'size_t'. */
+/* #undef BITSIZEOF_SIZE_T */
+
+/* Define to the number of bits in type 'wchar_t'. */
+/* #undef BITSIZEOF_WCHAR_T */
+
+/* Define to the number of bits in type 'wint_t'. */
+/* #undef BITSIZEOF_WINT_T */
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+/* #undef CRAY_STACKSEG_END */
+
+/* Define to 1 if using `alloca.c'. */
+/* #undef C_ALLOCA */
+
+/* Define to 1 if // is a file system root distinct from /. */
+/* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */
+
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
+/* #undef ENABLE_NLS */
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module fscanf shall be considered present. */
+#define GNULIB_FSCANF 1
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module msvc-nothrow shall be considered present. */
+#define GNULIB_MSVC_NOTHROW 1
+
+/* Define to 1 if printf and friends should be labeled with attribute
+ "__gnu_printf__" instead of "__printf__" */
+#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module scanf shall be considered present. */
+#define GNULIB_SCANF 1
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module strerror shall be considered present. */
+#define GNULIB_STRERROR 1
+
+/* Define to 1 when the gnulib module getdelim should be tested. */
+/* #undef GNULIB_TEST_GETDELIM */
+
+/* Define to 1 when the gnulib module getline should be tested. */
+/* #undef GNULIB_TEST_GETLINE */
+
+/* Define to 1 when the gnulib module malloc-posix should be tested. */
+/* #undef GNULIB_TEST_MALLOC_POSIX */
+
+/* Define to 1 when the gnulib module rawmemchr should be tested. */
+/* #undef GNULIB_TEST_RAWMEMCHR */
+
+/* Define to 1 when the gnulib module strchrnul should be tested. */
+/* #undef GNULIB_TEST_STRCHRNUL */
+
+/* Define to 1 when the gnulib module strerror should be tested. */
+/* #undef GNULIB_TEST_STRERROR */
+
+/* Define to 1 when the gnulib module strverscmp should be tested. */
+/* #undef GNULIB_TEST_STRVERSCMP */
+
+/* Define to 1 when the gnulib module uninorm/u32-normalize should be tested.
+ */
+/* #undef GNULIB_TEST_UNINORM_U32_NORMALIZE */
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module unistr/u32-mbtouc-unsafe shall be considered
+ present. */
+#define GNULIB_UNISTR_U32_MBTOUC_UNSAFE 1
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module unistr/u32-uctomb shall be considered present. */
+#define GNULIB_UNISTR_U32_UCTOMB 1
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module unistr/u8-mbtouc shall be considered present. */
+#define GNULIB_UNISTR_U8_MBTOUC 1
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module unistr/u8-mbtoucr shall be considered present. */
+#define GNULIB_UNISTR_U8_MBTOUCR 1
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module unistr/u8-mbtouc-unsafe shall be considered
+ present. */
+#define GNULIB_UNISTR_U8_MBTOUC_UNSAFE 1
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module unistr/u8-uctomb shall be considered present. */
+#define GNULIB_UNISTR_U8_UCTOMB 1
+
+/* Define to 1 if you have 'alloca' after including <alloca.h>, a header that
+ may be supplied by this distribution. */
+#define HAVE_ALLOCA 1
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
+/* #undef HAVE_ALLOCA_H */
+
+/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
+ CoreFoundation framework. */
+/* #undef HAVE_CFLOCALECOPYCURRENT */
+
+/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
+ the CoreFoundation framework. */
+/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+ */
+#define HAVE_DCGETTEXT 1
+
+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
+ don't. */
+#define HAVE_DECL_GETC_UNLOCKED 0
+
+/* Define to 1 if you have the declaration of `getdelim', and to 0 if you
+ don't. */
+#define HAVE_DECL_GETDELIM 0
+
+/* Define to 1 if you have the declaration of `getline', and to 0 if you
+ don't. */
+#define HAVE_DECL_GETLINE 0
+
+/* Define to 1 if you have the declaration of `program_invocation_name', and
+ to 0 if you don't. */
+#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0
+
+/* Define to 1 if you have the declaration of `program_invocation_short_name',
+ and to 0 if you don't. */
+#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0
+
+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
+ don't. */
+#define HAVE_DECL_STRERROR_R 0
+
+/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't.
+ */
+#define HAVE_DECL___ARGV 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+/* #undef HAVE_DLFCN_H */
+
+/* Define to 1 if you have the `flockfile' function. */
+/* #undef HAVE_FLOCKFILE */
+
+/* Define to 1 if you have the `funlockfile' function. */
+/* #undef HAVE_FUNLOCKFILE */
+
+/* Define to 1 if you have the 'getdelim' function. */
+/* #undef HAVE_GETDELIM */
+
+/* Define to 1 if you have the 'getexecname' function. */
+/* #undef HAVE_GETEXECNAME */
+
+/* Define to 1 if you have the 'getprogname' function. */
+/* #undef HAVE_GETPROGNAME */
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#define HAVE_GETTEXT 1
+
+/* Define if you have the iconv() function and it works. */
+#define HAVE_ICONV 1
+
+/* Define to 1 if you have the <iconv.h> header file. */
+#define HAVE_ICONV_H 1
+
+/* Define to 1 if the compiler supports one of the keywords 'inline',
+ '__inline__', '__inline' and effectively inlines functions marked as such.
+ */
+#define HAVE_INLINE 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+/* #undef HAVE_LANGINFO_CODESET */
+
+/* Define if you have the libunistring library. */
+/* #undef HAVE_LIBUNISTRING */
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if the system has the type 'long long int'. */
+#define HAVE_LONG_LONG_INT 1
+
+/* Define if the 'malloc' function is POSIX compliant. */
+/* #undef HAVE_MALLOC_POSIX */
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 on MSVC platforms that have the "invalid parameter handler"
+ concept. */
+#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1
+
+/* Define to 1 if you have the `rawmemchr' function. */
+/* #undef HAVE_RAWMEMCHR */
+
+/* Define to 1 if atoll is declared even after undefining macros. */
+#define HAVE_RAW_DECL_ATOLL 1
+
+/* Define to 1 if canonicalize_file_name is declared even after undefining
+ macros. */
+/* #undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME */
+
+/* Define to 1 if chdir is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_CHDIR */
+
+/* Define to 1 if chown is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_CHOWN */
+
+/* Define to 1 if dprintf is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_DPRINTF */
+
+/* Define to 1 if dup is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_DUP */
+
+/* Define to 1 if dup2 is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_DUP2 */
+
+/* Define to 1 if dup3 is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_DUP3 */
+
+/* Define to 1 if endusershell is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_ENDUSERSHELL */
+
+/* Define to 1 if environ is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_ENVIRON */
+
+/* Define to 1 if euidaccess is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_EUIDACCESS */
+
+/* Define to 1 if faccessat is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_FACCESSAT */
+
+/* Define to 1 if fchdir is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_FCHDIR */
+
+/* Define to 1 if fchownat is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_FCHOWNAT */
+
+/* Define to 1 if fdatasync is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_FDATASYNC */
+
+/* Define to 1 if ffsl is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_FFSL */
+
+/* Define to 1 if ffsll is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_FFSLL */
+
+/* Define to 1 if fpurge is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_FPURGE */
+
+/* Define to 1 if fseeko is declared even after undefining macros. */
+#define HAVE_RAW_DECL_FSEEKO 1
+
+/* Define to 1 if fsync is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_FSYNC */
+
+/* Define to 1 if ftello is declared even after undefining macros. */
+#define HAVE_RAW_DECL_FTELLO 1
+
+/* Define to 1 if ftruncate is declared even after undefining macros. */
+#define HAVE_RAW_DECL_FTRUNCATE 1
+
+/* Define to 1 if getcwd is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_GETCWD */
+
+/* Define to 1 if getdelim is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_GETDELIM */
+
+/* Define to 1 if getdomainname is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_GETDOMAINNAME */
+
+/* Define to 1 if getdtablesize is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_GETDTABLESIZE */
+
+/* Define to 1 if getgroups is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_GETGROUPS */
+
+/* Define to 1 if gethostname is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_GETHOSTNAME */
+
+/* Define to 1 if getline is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_GETLINE */
+
+/* Define to 1 if getloadavg is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_GETLOADAVG */
+
+/* Define to 1 if getlogin is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_GETLOGIN */
+
+/* Define to 1 if getlogin_r is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_GETLOGIN_R */
+
+/* Define to 1 if getpagesize is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_GETPAGESIZE */
+
+/* Define to 1 if gets is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_GETS */
+
+/* Define to 1 if getsubopt is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_GETSUBOPT */
+
+/* Define to 1 if getusershell is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_GETUSERSHELL */
+
+/* Define to 1 if grantpt is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_GRANTPT */
+
+/* Define to 1 if group_member is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_GROUP_MEMBER */
+
+/* Define to 1 if initstate is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_INITSTATE */
+
+/* Define to 1 if initstate_r is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_INITSTATE_R */
+
+/* Define to 1 if isatty is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_ISATTY */
+
+/* Define to 1 if lchown is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_LCHOWN */
+
+/* Define to 1 if link is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_LINK */
+
+/* Define to 1 if linkat is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_LINKAT */
+
+/* Define to 1 if lseek is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_LSEEK */
+
+/* Define to 1 if memmem is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_MEMMEM */
+
+/* Define to 1 if mempcpy is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_MEMPCPY */
+
+/* Define to 1 if memrchr is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_MEMRCHR */
+
+/* Define to 1 if mkdtemp is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_MKDTEMP */
+
+/* Define to 1 if mkostemp is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_MKOSTEMP */
+
+/* Define to 1 if mkostemps is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_MKOSTEMPS */
+
+/* Define to 1 if mkstemp is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_MKSTEMP */
+
+/* Define to 1 if mkstemps is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_MKSTEMPS */
+
+/* Define to 1 if pclose is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_PCLOSE */
+
+/* Define to 1 if pipe is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_PIPE */
+
+/* Define to 1 if pipe2 is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_PIPE2 */
+
+/* Define to 1 if popen is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_POPEN */
+
+/* Define to 1 if posix_openpt is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_POSIX_OPENPT */
+
+/* Define to 1 if pread is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_PREAD */
+
+/* Define to 1 if ptsname is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_PTSNAME */
+
+/* Define to 1 if ptsname_r is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_PTSNAME_R */
+
+/* Define to 1 if pwrite is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_PWRITE */
+
+/* Define to 1 if qsort_r is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_QSORT_R */
+
+/* Define to 1 if random is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_RANDOM */
+
+/* Define to 1 if random_r is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_RANDOM_R */
+
+/* Define to 1 if rawmemchr is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_RAWMEMCHR */
+
+/* Define to 1 if readlink is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_READLINK */
+
+/* Define to 1 if readlinkat is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_READLINKAT */
+
+/* Define to 1 if realpath is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_REALPATH */
+
+/* Define to 1 if renameat is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_RENAMEAT */
+
+/* Define to 1 if rmdir is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_RMDIR */
+
+/* Define to 1 if rpmatch is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_RPMATCH */
+
+/* Define to 1 if secure_getenv is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_SECURE_GETENV */
+
+/* Define to 1 if setenv is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_SETENV */
+
+/* Define to 1 if sethostname is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_SETHOSTNAME */
+
+/* Define to 1 if setstate is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_SETSTATE */
+
+/* Define to 1 if setstate_r is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_SETSTATE_R */
+
+/* Define to 1 if setusershell is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_SETUSERSHELL */
+
+/* Define to 1 if sleep is declared even after undefining macros. */
+#define HAVE_RAW_DECL_SLEEP 1
+
+/* Define to 1 if snprintf is declared even after undefining macros. */
+#define HAVE_RAW_DECL_SNPRINTF 1
+
+/* Define to 1 if srandom is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_SRANDOM */
+
+/* Define to 1 if srandom_r is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_SRANDOM_R */
+
+/* Define to 1 if stpcpy is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_STPCPY */
+
+/* Define to 1 if stpncpy is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_STPNCPY */
+
+/* Define to 1 if strcasestr is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_STRCASESTR */
+
+/* Define to 1 if strchrnul is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_STRCHRNUL */
+
+/* Define to 1 if strdup is declared even after undefining macros. */
+#define HAVE_RAW_DECL_STRDUP 1
+
+/* Define to 1 if strerror_r is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_STRERROR_R */
+
+/* Define to 1 if strncat is declared even after undefining macros. */
+#define HAVE_RAW_DECL_STRNCAT 1
+
+/* Define to 1 if strndup is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_STRNDUP */
+
+/* Define to 1 if strnlen is declared even after undefining macros. */
+#define HAVE_RAW_DECL_STRNLEN 1
+
+/* Define to 1 if strpbrk is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_STRPBRK */
+
+/* Define to 1 if strsep is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_STRSEP */
+
+/* Define to 1 if strsignal is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_STRSIGNAL */
+
+/* Define to 1 if strtod is declared even after undefining macros. */
+#define HAVE_RAW_DECL_STRTOD 1
+
+/* Define to 1 if strtok_r is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_STRTOK_R */
+
+/* Define to 1 if strtoll is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_STRTOLL */
+
+/* Define to 1 if strtoull is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_STRTOULL */
+
+/* Define to 1 if strverscmp is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_STRVERSCMP */
+
+/* Define to 1 if symlink is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_SYMLINK */
+
+/* Define to 1 if symlinkat is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_SYMLINKAT */
+
+/* Define to 1 if tmpfile is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_TMPFILE */
+
+/* Define to 1 if truncate is declared even after undefining macros. */
+#define HAVE_RAW_DECL_TRUNCATE 1
+
+/* Define to 1 if ttyname_r is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_TTYNAME_R */
+
+/* Define to 1 if unlink is declared even after undefining macros. */
+#define HAVE_RAW_DECL_UNLINK 1
+
+/* Define to 1 if unlinkat is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_UNLINKAT */
+
+/* Define to 1 if unlockpt is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_UNLOCKPT */
+
+/* Define to 1 if unsetenv is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_UNSETENV */
+
+/* Define to 1 if usleep is declared even after undefining macros. */
+#define HAVE_RAW_DECL_USLEEP 1
+
+/* Define to 1 if vdprintf is declared even after undefining macros. */
+/* #undef HAVE_RAW_DECL_VDPRINTF */
+
+/* Define to 1 if vsnprintf is declared even after undefining macros. */
+#define HAVE_RAW_DECL_VSNPRINTF 1
+
+/* Define to 1 if _Exit is declared even after undefining macros. */
+#define HAVE_RAW_DECL__EXIT 1
+
+/* Define to 1 if 'sig_atomic_t' is a signed integer type. */
+/* #undef HAVE_SIGNED_SIG_ATOMIC_T */
+
+/* Define to 1 if 'wchar_t' is a signed integer type. */
+/* #undef HAVE_SIGNED_WCHAR_T */
+
+/* Define to 1 if 'wint_t' is a signed integer type. */
+/* #undef HAVE_SIGNED_WINT_T */
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strchrnul' function. */
+/* #undef HAVE_STRCHRNUL */
+
+/* Define to 1 if you have the `strerror_r' function. */
+/* #undef HAVE_STRERROR_R */
+
+/* Define to 1 if you have the <strings.h> header file. */
+/* #undef HAVE_STRINGS_H */
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strverscmp' function. */
+/* #undef HAVE_STRVERSCMP */
+
+/* Define to 1 if you have the 'symlink' function. */
+/* #undef HAVE_SYMLINK */
+
+/* Define to 1 if you have the <sys/bitypes.h> header file. */
+/* #undef HAVE_SYS_BITYPES_H */
+
+/* Define to 1 if you have the <sys/inttypes.h> header file. */
+/* #undef HAVE_SYS_INTTYPES_H */
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+/* #undef HAVE_SYS_SOCKET_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+/* #undef HAVE_UNISTD_H */
+
+/* Define to 1 if the system has the type 'unsigned long long int'. */
+#define HAVE_UNSIGNED_LONG_LONG_INT 1
+
+/* Define if you have a global __progname variable */
+/* #undef HAVE_VAR___PROGNAME */
+
+/* Define to 1 or 0, depending whether the compiler supports simple visibility
+ declarations. */
+/* #undef HAVE_VISIBILITY */
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#define HAVE_WCHAR_H 1
+
+/* Define if you have the 'wchar_t' type. */
+#define HAVE_WCHAR_T 1
+
+/* Define to 1 if you have the <winsock2.h> header file. */
+#define HAVE_WINSOCK2_H 1
+
+/* Define if you have the 'wint_t' type. */
+#define HAVE_WINT_T 1
+
+/* Define to 1 if O_NOATIME works. */
+#define HAVE_WORKING_O_NOATIME 0
+
+/* Define to 1 if O_NOFOLLOW works. */
+#define HAVE_WORKING_O_NOFOLLOW 0
+
+/* Define to 1 if the system has the type `_Bool'. */
+#define HAVE__BOOL 1
+
+/* Define to 1 if you have the '_set_invalid_parameter_handler' function. */
+#define HAVE__SET_INVALID_PARAMETER_HANDLER 1
+
+/* Define as const if the declaration of iconv() needs const. */
+#define ICONV_CONST
+
+/* Define to a symbolic name denoting the flavor of iconv_open()
+ implementation. */
+/* #undef ICONV_FLAVOR */
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#define LT_OBJDIR ".libs/"
+
+/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */
+#define MALLOC_0_IS_NONNULL 1
+
+/* Use GNU style printf and scanf. */
+#ifndef __USE_MINGW_ANSI_STDIO
+# define __USE_MINGW_ANSI_STDIO 1
+#endif
+
+
+/* Name of package */
+#define PACKAGE "libidn2"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "help-libidn@gnu.org"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "libidn2"
+
+/* String identifying the packager of this software */
+/* #undef PACKAGE_PACKAGER */
+
+/* Packager info for bug reports (URL/e-mail/...) */
+/* #undef PACKAGE_PACKAGER_BUG_REPORTS */
+
+/* Packager-specific version information */
+/* #undef PACKAGE_PACKAGER_VERSION */
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "libidn2 2.0.4"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "libidn2"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL "https://www.gnu.org/software/libidn/#libidn2"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "2.0.4"
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ 'ptrdiff_t'. */
+/* #undef PTRDIFF_T_SUFFIX */
+
+/* Define to 1 if strerror(0) does not return a message implying success. */
+/* #undef REPLACE_STRERROR_0 */
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ 'sig_atomic_t'. */
+/* #undef SIG_ATOMIC_T_SUFFIX */
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ 'size_t'. */
+/* #undef SIZE_T_SUFFIX */
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at runtime.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+/* #undef STACK_DIRECTION */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if strerror_r returns char *. */
+/* #undef STRERROR_R_CHAR_P */
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# define _ALL_SOURCE 1
+#endif
+/* Enable general extensions on macOS. */
+#ifndef _DARWIN_C_SOURCE
+# define _DARWIN_C_SOURCE 1
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+# define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
+# define __STDC_WANT_IEC_60559_DFP_EXT__ 1
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
+# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
+#endif
+/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
+#ifndef __STDC_WANT_LIB_EXT2__
+# define __STDC_WANT_LIB_EXT2__ 1
+#endif
+/* Enable extensions specified by ISO/IEC 24747:2009. */
+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
+# define __STDC_WANT_MATH_SPEC_FUNCS__ 1
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE 1
+#endif
+/* Enable X/Open extensions if necessary. HP-UX 11.11 defines
+ mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
+ whether compiling with -Ae or -D_HPUX_SOURCE=1. */
+#ifndef _XOPEN_SOURCE
+/* # undef _XOPEN_SOURCE */
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+
+
+/* Version number of package */
+#define VERSION "2.0.4"
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ 'wchar_t'. */
+/* #undef WCHAR_T_SUFFIX */
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ 'wint_t'. */
+/* #undef WINT_T_SUFFIX */
+
+/* Define to 1 if on MINIX. */
+/* #undef _MINIX */
+
+/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */
+/* #undef _NETBSD_SOURCE */
+
+/* The _Noreturn keyword of C11. */
+#if ! (defined _Noreturn \
+ || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
+# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
+ || 0x5110 <= __SUNPRO_C)
+# define _Noreturn __attribute__ ((__noreturn__))
+# elif defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn
+# endif
+#endif
+
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+/* #undef _POSIX_1_SOURCE */
+
+/* Define to 1 if you need to in order for 'stat' and other things to work. */
+/* #undef _POSIX_SOURCE */
+
+/* For standard stat data types on VMS. */
+#define _USE_STD_STAT 1
+
+/* Define to 1 if the system <stdint.h> predates C++11. */
+/* #undef __STDC_CONSTANT_MACROS */
+
+/* Define to 1 if the system <stdint.h> predates C++11. */
+/* #undef __STDC_LIMIT_MACROS */
+
+/* Please see the Gnulib manual for how to use these macros.
+
+ Suppress extern inline with HP-UX cc, as it appears to be broken; see
+ <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
+
+ Suppress extern inline with Sun C in standards-conformance mode, as it
+ mishandles inline functions that call each other. E.g., for 'inline void f
+ (void) { } inline void g (void) { f (); }', c99 incorrectly complains
+ 'reference to static identifier "f" in extern inline function'.
+ This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
+
+ Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
+ on configurations that mistakenly use 'static inline' to implement
+ functions or macros in standard C headers like <ctype.h>. For example,
+ if isdigit is mistakenly implemented via a static inline function,
+ a program containing an extern inline function that calls isdigit
+ may not work since the C standard prohibits extern inline functions
+ from calling static functions. This bug is known to occur on:
+
+ OS X 10.8 and earlier; see:
+ http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html
+
+ DragonFly; see
+ http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
+
+ FreeBSD; see:
+ http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html
+
+ OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
+ for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
+ Assume DragonFly and FreeBSD will be similar. */
+#if (((defined __APPLE__ && defined __MACH__) \
+ || defined __DragonFly__ || defined __FreeBSD__) \
+ && (defined __header_inline \
+ ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
+ && ! defined __clang__) \
+ : ((! defined _DONT_USE_CTYPE_INLINE_ \
+ && (defined __GNUC__ || defined __cplusplus)) \
+ || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
+ && defined __GNUC__ && ! defined __cplusplus))))
+# define _GL_EXTERN_INLINE_STDHEADER_BUG
+#endif
+#if ((__GNUC__ \
+ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+ : (199901L <= __STDC_VERSION__ \
+ && !defined __HP_cc \
+ && !defined __PGI \
+ && !(defined __SUNPRO_C && __STDC__))) \
+ && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
+# define _GL_INLINE inline
+# define _GL_EXTERN_INLINE extern inline
+# define _GL_EXTERN_INLINE_IN_USE
+#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
+ && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
+# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
+ /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
+# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
+# else
+# define _GL_INLINE extern inline
+# endif
+# define _GL_EXTERN_INLINE extern
+# define _GL_EXTERN_INLINE_IN_USE
+#else
+# define _GL_INLINE static _GL_UNUSED
+# define _GL_EXTERN_INLINE static _GL_UNUSED
+#endif
+
+/* In GCC 4.6 (inclusive) to 5.1 (exclusive),
+ suppress bogus "no previous prototype for 'FOO'"
+ and "no previous declaration for 'FOO'" diagnostics,
+ when FOO is an inline function in the header; see
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>. */
+#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
+# define _GL_INLINE_HEADER_CONST_PRAGMA
+# else
+# define _GL_INLINE_HEADER_CONST_PRAGMA \
+ _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
+# endif
+# define _GL_INLINE_HEADER_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
+ _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
+ _GL_INLINE_HEADER_CONST_PRAGMA
+# define _GL_INLINE_HEADER_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define _GL_INLINE_HEADER_BEGIN
+# define _GL_INLINE_HEADER_END
+#endif
+
+/* A replacement for va_copy, if needed. */
+#define gl_va_copy(a,b) ((a) = (b))
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
+ the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
+ earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
+ __APPLE__ && __MACH__ test for Mac OS X.
+ __APPLE_CC__ tests for the Apple compiler and its version.
+ __STDC_VERSION__ tests for the C99 mode. */
+#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
+# define __GNUC_STDC_INLINE__ 1
+#endif
+
+/* Define to `int' if <sys/types.h> does not define. */
+/* #undef mode_t */
+
+/* Define to `int' if <sys/types.h> does not define. */
+/* #undef pid_t */
+
+/* Define to the equivalent of the C99 'restrict' keyword, or to
+ nothing if this is not supported. Do not define if restrict is
+ supported directly. */
+#define restrict __restrict
+/* Work around a bug in Sun C++: it does not support _Restrict or
+ __restrict__, even though the corresponding Sun C compiler ends up with
+ "#define restrict _Restrict" or "#define restrict __restrict__" in the
+ previous line. Perhaps some future version of Sun C++ will work with
+ restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+# define __restrict__
+#endif
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+/* Define as a signed type of the same size as size_t. */
+#define ssize_t intptr_t
+
+/* Define as a marker that can be attached to declarations that might not
+ be used. This helps to reduce warnings, such as from
+ GCC -Wunused-parameter. */
+#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_UNUSED __attribute__ ((__unused__))
+#else
+# define _GL_UNUSED
+#endif
+/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
+ is a misnomer outside of parameter lists. */
+#define _UNUSED_PARAMETER_ _GL_UNUSED
+
+/* gcc supports the "unused" attribute on possibly unused labels, and
+ g++ has since version 4.5. Note to support C++ as well as C,
+ _GL_UNUSED_LABEL should be used with a trailing ; */
+#if !defined __cplusplus || __GNUC__ > 4 \
+ || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
+# define _GL_UNUSED_LABEL _GL_UNUSED
+#else
+# define _GL_UNUSED_LABEL
+#endif
+
+/* The __pure__ attribute was added in gcc 2.96. */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
+
+/* The __const__ attribute was added in gcc 2.95. */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
+#else
+# define _GL_ATTRIBUTE_CONST /* empty */
+#endif
+
+
+/* Define as a macro for copying va_list variables. */
+/* #undef va_copy */
diff --git a/ports/libidn2/portfile.cmake b/ports/libidn2/portfile.cmake
new file mode 100644
index 000000000..bbe8f7bbe
--- /dev/null
+++ b/ports/libidn2/portfile.cmake
@@ -0,0 +1,48 @@
+include(vcpkg_common_functions)
+
+set(IDN2_VERSION 2.0.4)
+set(IDN2_FILENAME libidn2-${IDN2_VERSION}.tar.gz)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libidn2-${IDN2_VERSION})
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://ftp.gnu.org/gnu/libidn/${IDN2_FILENAME}"
+ FILENAME "${IDN2_FILENAME}"
+ SHA512 1e51bd4b8f8907531576291f1c2a8865d17429b4105418b4c98754eb982cd1cbb3adbeab4ec0c1c561d2dba11d876c7c09e5dc5b315c55a2c24986d7a2a3b4d2
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH})
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/string.h DESTINATION ${SOURCE_PATH}/gl)
+
+function(simple_copy_template_header FILE_PATH BASE_NAME)
+ if(NOT EXISTS ${FILE_PATH}/${BASE_NAME}.h)
+ if(EXISTS ${FILE_PATH}/${BASE_NAME}.in.h)
+ configure_file(${FILE_PATH}/${BASE_NAME}.in.h ${FILE_PATH}/${BASE_NAME}.h)
+ endif()
+ endif()
+endfunction()
+
+# There seems to be no difference between source and destination files after 'configure'
+# apart from auto-generated notification at the top. So why not just do a simple copy.
+simple_copy_template_header(${SOURCE_PATH}/unistring uniconv)
+simple_copy_template_header(${SOURCE_PATH}/unistring unictype)
+simple_copy_template_header(${SOURCE_PATH}/unistring uninorm)
+simple_copy_template_header(${SOURCE_PATH}/unistring unistr)
+simple_copy_template_header(${SOURCE_PATH}/unistring unitypes)
+simple_copy_template_header(${SOURCE_PATH}/unistring alloca)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# License and man
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libidn2 RENAME copyright)
+file(INSTALL ${SOURCE_PATH}/doc/libidn2.pdf DESTINATION ${CURRENT_PACKAGES_DIR}/share/libidn2)
+
+vcpkg_copy_pdbs()
diff --git a/ports/libidn2/string.h b/ports/libidn2/string.h
new file mode 100644
index 000000000..7ed5f5fdc
--- /dev/null
+++ b/ports/libidn2/string.h
@@ -0,0 +1,10 @@
+#ifndef _GL_STRING_H
+#define _GL_STRING_H
+
+char * strchrnul (const char *s, int c_in);
+int strverscmp (const char *s1, const char *s2);
+void * rawmemchr (const void *s, int c_in);
+
+#include <../ucrt/string.h>
+
+#endif /* _GL_STRING_H */
diff --git a/ports/libjpeg-turbo/CONTROL b/ports/libjpeg-turbo/CONTROL
index 14dd8ad9b..bf642bd1b 100644
--- a/ports/libjpeg-turbo/CONTROL
+++ b/ports/libjpeg-turbo/CONTROL
@@ -1,3 +1,3 @@
Source: libjpeg-turbo
-Version: 1.5.2
+Version: 1.5.2-1
Description: libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems.
diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake
index d1138dbbf..a5d09fda2 100644
--- a/ports/libjpeg-turbo/portfile.cmake
+++ b/ports/libjpeg-turbo/portfile.cmake
@@ -16,12 +16,12 @@ vcpkg_find_acquire_program(NASM)
get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}")
-if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- set(BUILD_STATIC OFF)
- set(NOT_BUILD_STATIC ON)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ set(ENABLE_STATIC OFF)
+ set(ENABLE_SHARED ON)
else()
- set(BUILD_STATIC ON)
- set(NOT_BUILD_STATIC OFF)
+ set(ENABLE_STATIC ON)
+ set(ENABLE_SHARED OFF)
endif()
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
@@ -32,9 +32,8 @@ vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
- -DENABLE_STATIC=${BUILD_STATIC}
- -DENABLE_SHARED=${NOT_BUILD_STATIC}
- -DWITH_CRT_DLL=ON
+ -DENABLE_STATIC=${ENABLE_STATIC}
+ -DENABLE_SHARED=${ENABLE_SHARED}
-DENABLE_EXECUTABLES=OFF
-DINSTALL_DOCS=OFF
${LIBJPEGTURBO_SIMD}
diff --git a/ports/libkml/CONTROL b/ports/libkml/CONTROL
index 1fe7086af..bc054e036 100644
--- a/ports/libkml/CONTROL
+++ b/ports/libkml/CONTROL
@@ -1,4 +1,4 @@
Source: libkml
-Version: 1.3.0
+Version: 1.3.0-1
Description: Reference implementation of OGC KML 2.2
Build-Depends: zlib, boost, expat, minizip, uriparser
diff --git a/ports/liblzma/CONTROL b/ports/liblzma/CONTROL
index 3c4cbfb2b..c29002b9c 100644
--- a/ports/liblzma/CONTROL
+++ b/ports/liblzma/CONTROL
@@ -1,3 +1,3 @@
Source: liblzma
-Version: 5.2.3-1
+Version: 5.2.3-2
Description: Compression library with an API similar to that of zlib.
diff --git a/ports/libmad/CONTROL b/ports/libmad/CONTROL
index 04cec21bf..daf25faa1 100644
--- a/ports/libmad/CONTROL
+++ b/ports/libmad/CONTROL
@@ -1,3 +1,3 @@
Source: libmad
-Version: 0.15.1
+Version: 0.15.1-1
Description: high-quality MPEG audio decoder
diff --git a/ports/libmariadb/CONTROL b/ports/libmariadb/CONTROL
index 26e23810a..89f5647a7 100644
--- a/ports/libmariadb/CONTROL
+++ b/ports/libmariadb/CONTROL
@@ -1,3 +1,3 @@
Source: libmariadb
-Version: 2.3.2
+Version: 2.3.2-1
Description: MariaDB Connector/C is used to connect C/C++ applications to MariaDB and MySQL databases
diff --git a/ports/libmicrohttpd/CMakeLists.txt b/ports/libmicrohttpd/CMakeLists.txt
new file mode 100644
index 000000000..d76c09122
--- /dev/null
+++ b/ports/libmicrohttpd/CMakeLists.txt
@@ -0,0 +1,78 @@
+cmake_minimum_required(VERSION 3.8)
+project(libmicrohttpd C)
+
+if(MSVC)
+ add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
+endif()
+
+set(MIN_SRC contrib/libmicrohttpd)
+
+
+set(SRC
+ src/microhttpd/base64.c
+ src/microhttpd/basicauth.c
+ src/microhttpd/connection.c
+ src/microhttpd/daemon.c
+ src/microhttpd/digestauth.c
+ src/microhttpd/internal.c
+ src/microhttpd/md5.c
+ src/microhttpd/memorypool.c
+ src/microhttpd/mhd_mono_clock.c
+ src/microhttpd/postprocessor.c
+ src/microhttpd/reason_phrase.c
+ src/microhttpd/response.c
+ src/microhttpd/tsearch.c
+ src/microhttpd/sysfdsetsize.c
+ src/microhttpd/mhd_str.c
+ src/microhttpd/mhd_threads.c
+ src/microhttpd/mhd_sockets.c
+ src/microhttpd/mhd_itc.c
+ src/microhttpd/mhd_compat.c
+)
+set(HEADERS
+ src/microhttpd/base64.h
+ src/microhttpd/connection.h
+ src/microhttpd/internal.h
+ src/microhttpd/md5.h
+ src/microhttpd/memorypool.h
+ src/microhttpd/mhd_byteorder.h
+ src/microhttpd/mhd_limits.h
+ src/microhttpd/mhd_mono_clock.h
+ src/microhttpd/response.h
+ src/microhttpd/tsearch.h
+ src/microhttpd/sysfdsetsize.h
+ src/microhttpd/mhd_str.h
+ src/microhttpd/mhd_threads.h
+ src/microhttpd/mhd_locks.h
+ src/microhttpd/mhd_sockets.h
+ src/microhttpd/mhd_itc.h
+ src/microhttpd/mhd_itc_types.h
+ src/microhttpd/mhd_compat.h
+)
+
+if(BUILD_SHARED_LIBS)
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+endif()
+
+include_directories(${HEADERS} src/include w32/common)
+
+add_library(libmicrohttpd ${SRC})
+
+if(BUILD_SHARED_LIBS)
+ target_compile_definitions(libmicrohttpd PRIVATE -DMHD_W32DLL)
+else()
+ target_compile_definitions(libmicrohttpd PRIVATE -DMHD_W32LIB)
+endif()
+
+ target_link_libraries(libmicrohttpd ws2_32)
+
+install(
+ TARGETS libmicrohttpd
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES src/include/microhttpd.h DESTINATION include)
+endif()
diff --git a/ports/libmicrohttpd/CONTROL b/ports/libmicrohttpd/CONTROL
new file mode 100644
index 000000000..2c5815aed
--- /dev/null
+++ b/ports/libmicrohttpd/CONTROL
@@ -0,0 +1,3 @@
+Source: libmicrohttpd
+Version: 0.9.55-1
+Description: GNU libmicrohttpd is a small C library that is supposed to make it easy to run an HTTP server as part of another application
diff --git a/ports/libmicrohttpd/portfile.cmake b/ports/libmicrohttpd/portfile.cmake
new file mode 100644
index 000000000..8b11e3e9c
--- /dev/null
+++ b/ports/libmicrohttpd/portfile.cmake
@@ -0,0 +1,23 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libmicrohttpd-0.9.55)
+vcpkg_download_distfile(ARCHIVE
+ URLS "ftp://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.55.tar.gz"
+ FILENAME "libmicrohttpd-0.9.55.tar.gz"
+ SHA512 b410e7253d7c98c40b5e8b8dcd1f93bcbb05c88717190e8dae73073d36465e8e5cfa53c6c5098de60051a5ec64dc423fd94f4b06537d8146b744aa99f5a0b173
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+
+vcpkg_copy_pdbs()
+
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmicrohttpd RENAME copyright)
diff --git a/ports/libmikmod/CONTROL b/ports/libmikmod/CONTROL
index b9f970959..c1dc45c3e 100644
--- a/ports/libmikmod/CONTROL
+++ b/ports/libmikmod/CONTROL
@@ -1,4 +1,4 @@
Source: libmikmod
-Version: 3.3.11.1
+Version: 3.3.11.1-1
Description: Mikmod is a module player and library supporting many formats, including mod, s3m, it, and xm.
-Build-Depends: openal-soft \ No newline at end of file
+Build-Depends: openal-soft
diff --git a/ports/libmodplug/CONTROL b/ports/libmodplug/CONTROL
index 60614602a..e0cc81a3b 100644
--- a/ports/libmodplug/CONTROL
+++ b/ports/libmodplug/CONTROL
@@ -1,3 +1,3 @@
Source: libmodplug
-Version: 0.8.9.0
+Version: 0.8.9.0-1
Description: The ModPlug mod file playing library.
diff --git a/ports/libmysql/CONTROL b/ports/libmysql/CONTROL
index 906249936..0c772e04e 100644
--- a/ports/libmysql/CONTROL
+++ b/ports/libmysql/CONTROL
@@ -1,3 +1,3 @@
Source: libmysql
-Version: 5.7.17-1
-Description: A MySQL client library for C development. \ No newline at end of file
+Version: 5.7.17-2
+Description: A MySQL client library for C development.
diff --git a/ports/libmysql/portfile.cmake b/ports/libmysql/portfile.cmake
index 530732b71..81ffdfb98 100644
--- a/ports/libmysql/portfile.cmake
+++ b/ports/libmysql/portfile.cmake
@@ -8,7 +8,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mysql-server-mysql-5.7.17)
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/mysql/mysql-server/archive/mysql-5.7.17.tar.gz"
FILENAME "mysql-server-mysql-5.7.17.tar.gz"
- SHA512 511027f28f0705f59a08ec369b1ebe5d9a77eb839d545898631f1ebbcb6b4b800f5b88511d3ae5d231c04e09a2d7b2b2d178264d36aeb2bc602cc1b0b248cfba
+ SHA512 31488972e08a6b83f88e6e3f7923aca91e01eac702f4942fdae92e13f66d92ac86c24dfe7a65a001db836c900147d1c3871b36af8cbb281a0e6c555617cac12c
)
vcpkg_extract_source_archive(${ARCHIVE})
diff --git a/ports/libnice/CMakeLists.txt b/ports/libnice/CMakeLists.txt
index c631d3317..7454a0046 100644
--- a/ports/libnice/CMakeLists.txt
+++ b/ports/libnice/CMakeLists.txt
@@ -119,7 +119,7 @@ RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib)
-if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
+if (CMAKE_BUILD_TYPE STREQUAL "Release")
install(FILES agent/address.h DESTINATION include/nice)
install(FILES agent/agent.h DESTINATION include/nice)
install(FILES agent/candidate.h DESTINATION include/nice)
diff --git a/ports/libnice/CONTROL b/ports/libnice/CONTROL
index 7d16f4262..de7b0b67e 100644
--- a/ports/libnice/CONTROL
+++ b/ports/libnice/CONTROL
@@ -1,4 +1,4 @@
Source: libnice
-Version: 0.1.13
+Version: 0.1.13-1
Description: Libnice is an implementation of the IETF's Interactive Connectivity Establishment (ICE) standard (RFC 5245) and the Session Traversal Utilities for NAT (STUN) standard (RFC 5389).
-Build-Depends: glib \ No newline at end of file
+Build-Depends: glib
diff --git a/ports/libodb-pgsql/CONTROL b/ports/libodb-pgsql/CONTROL
index a2daa777a..f89d1f37c 100644
--- a/ports/libodb-pgsql/CONTROL
+++ b/ports/libodb-pgsql/CONTROL
@@ -1,4 +1,4 @@
Source: libodb-pgsql
-Version: 2.4.0
+Version: 2.4.0-1
Description: Description: PostgreSQL support for the ODB ORM library
-Build-Depends: libodb, libpq \ No newline at end of file
+Build-Depends: libodb, libpq
diff --git a/ports/libodb-sqlite/CONTROL b/ports/libodb-sqlite/CONTROL
index 5a87fb847..89be9ee88 100644
--- a/ports/libodb-sqlite/CONTROL
+++ b/ports/libodb-sqlite/CONTROL
@@ -1,4 +1,4 @@
Source: libodb-sqlite
-Version: 2.4.0
+Version: 2.4.0-1
Description: Sqlite support for the ODB ORM library
Build-Depends: libodb, sqlite3
diff --git a/ports/libodb/CONTROL b/ports/libodb/CONTROL
index f9645d098..3d502effe 100644
--- a/ports/libodb/CONTROL
+++ b/ports/libodb/CONTROL
@@ -1,3 +1,3 @@
Source: libodb
-Version: 2.4.0
+Version: 2.4.0-1
Description: ODB library, base runtime for the ODB ORM solution
diff --git a/ports/libogg/CONTROL b/ports/libogg/CONTROL
index 47fd8faab..39205bd71 100644
--- a/ports/libogg/CONTROL
+++ b/ports/libogg/CONTROL
@@ -1,3 +1,3 @@
Source: libogg
-Version: 1.3.2-cab46b1-2
+Version: 1.3.2-cab46b1-3
Description: Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs.
diff --git a/ports/libopusenc/CONTROL b/ports/libopusenc/CONTROL
index 8f1ebb9ed..93b2a7544 100644
--- a/ports/libopusenc/CONTROL
+++ b/ports/libopusenc/CONTROL
@@ -1,4 +1,4 @@
Source: libopusenc
-Version: 0.1
+Version: 0.1-1
Description: Library for encoding .opus audio files and live streams.
Build-Depends: opus
diff --git a/ports/libp7-baical/CONTROL b/ports/libp7-baical/CONTROL
index e117adea5..215810511 100644
--- a/ports/libp7-baical/CONTROL
+++ b/ports/libp7-baical/CONTROL
@@ -1,3 +1,3 @@
Source: libp7-baical
-Version: 4.4-1
+Version: 4.4-2
Description: P7 is a library for high-speed sending telemetry & trace data from application
diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL
index 3238eec3b..7899cbc8e 100644
--- a/ports/libpng/CONTROL
+++ b/ports/libpng/CONTROL
@@ -1,4 +1,4 @@
Source: libpng
-Version: 1.6.32
+Version: 1.6.32-1
Build-Depends: zlib
Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files.
diff --git a/ports/libpopt/CONTROL b/ports/libpopt/CONTROL
index 0065bf323..5ba1451b6 100644
--- a/ports/libpopt/CONTROL
+++ b/ports/libpopt/CONTROL
@@ -1,3 +1,3 @@
Source: libpopt
-Version: 1.16-10~vcpkg1
+Version: 1.16-10~vcpkg1-1
Description: Library for parsing command line parameters
diff --git a/ports/libpq/CONTROL b/ports/libpq/CONTROL
index 580a06857..b91e08526 100644
--- a/ports/libpq/CONTROL
+++ b/ports/libpq/CONTROL
@@ -1,4 +1,4 @@
Source: libpq
-Version: 9.6.1
+Version: 9.6.1-1
Description: The official database access API of postgresql
Build-Depends: openssl
diff --git a/ports/libraw/CONTROL b/ports/libraw/CONTROL
index 9d23b7740..4860b0a6b 100644
--- a/ports/libraw/CONTROL
+++ b/ports/libraw/CONTROL
@@ -1,4 +1,4 @@
Source: libraw
-Version: 0.18.2-3
+Version: 0.18.2-4
Build-Depends: lcms, jasper
Description: raw image decoder library
diff --git a/ports/librtmp/CMakeLists.txt b/ports/librtmp/CMakeLists.txt
new file mode 100644
index 000000000..c12ddc0ef
--- /dev/null
+++ b/ports/librtmp/CMakeLists.txt
@@ -0,0 +1,57 @@
+cmake_minimum_required(VERSION 3.8)
+
+project(librtmp C)
+
+find_package(zlib REQUIRED)
+find_package(openssl REQUIRED)
+
+include_directories(${ZLIB_INCLUDE_DIRS})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+
+set(CMAKE_DEBUG_POSTFIX "d")
+
+if(MSVC)
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
+ add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
+ add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS)
+endif()
+
+add_definitions(-DLIBRTMP_ONLY)
+
+# List the header files
+set(HEADERS librtmp/amf.h
+ librtmp/bytes.h
+ librtmp/dh.h
+ librtmp/dhgroups.h
+ librtmp/handshake.h
+ librtmp/http.h
+ librtmp/log.h
+ librtmp/rtmp.h
+ librtmp/rtmp_sys.h
+)
+
+# List the source files
+set(SRCS librtmp/amf.c
+ librtmp/hashswf.c
+ librtmp/log.c
+ librtmp/parseurl.c
+ librtmp/rtmp.c
+ librtmp/librtmp.def
+)
+
+if(MSVC)
+ set(SRCS_MSVC "librtmp/librtmp.def")
+endif()
+
+add_library(librtmp ${SRCS} ${HEADERS} ${SRCS_MSVC})
+
+target_include_directories(librtmp PRIVATE ./librtmp)
+target_link_libraries(librtmp PRIVATE ${ZLIB_LIBRARIES} ${OPENSSL_LIBRARIES})
+target_link_libraries(librtmp PRIVATE Ws2_32.lib Winmm.lib)
+
+install(TARGETS librtmp
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
+
+install(FILES librtmp/rtmp.h librtmp/amf.h DESTINATION include/librtmp) \ No newline at end of file
diff --git a/ports/librtmp/CONTROL b/ports/librtmp/CONTROL
new file mode 100644
index 000000000..d26541d91
--- /dev/null
+++ b/ports/librtmp/CONTROL
@@ -0,0 +1,4 @@
+Source: librtmp
+Version: 2.3
+Build-Depends: zlib, openssl
+Description: RTMPDump Real-Time Messaging Protocol API
diff --git a/ports/librtmp/fix_strncasecmp.patch b/ports/librtmp/fix_strncasecmp.patch
new file mode 100644
index 000000000..c1cadc4ac
--- /dev/null
+++ b/ports/librtmp/fix_strncasecmp.patch
@@ -0,0 +1,16 @@
+diff --git a/librtmp/rtmp_sys.h b/librtmp/rtmp_sys.h
+index 0874cbe..b43d587 100644
+--- a/librtmp/rtmp_sys.h
++++ b/librtmp/rtmp_sys.h
+@@ -37,6 +37,11 @@
+ #include <ws2tcpip.h>
+ #endif
+
++#ifdef _MSC_VER
++#define strncasecmp _strnicmp
++#define strcasecmp _stricmp
++#endif
++
+ #define GetSockError() WSAGetLastError()
+ #define SetSockError(e) WSASetLastError(e)
+ #define setsockopt(a,b,c,d,e) (setsockopt)(a,b,c,(const char *)d,(int)e)
diff --git a/ports/librtmp/hide_netstackdump.patch b/ports/librtmp/hide_netstackdump.patch
new file mode 100644
index 000000000..e2a5e4207
--- /dev/null
+++ b/ports/librtmp/hide_netstackdump.patch
@@ -0,0 +1,22 @@
+diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c
+index f152648..0bf3f7d 100644
+--- a/librtmp/rtmp.c
++++ b/librtmp/rtmp.c
+@@ -1316,7 +1316,7 @@ ReadN(RTMP *r, char *buffer, int n)
+ SendBytesReceived(r);
+ }
+ /*RTMP_Log(RTMP_LOGDEBUG, "%s: %d bytes\n", __FUNCTION__, nBytes); */
+-#ifdef _DEBUG
++#if defined(_DEBUG) && !defined(LIBRTMP_ONLY)
+ fwrite(ptr, 1, nBytes, netstackdump_read);
+ #endif
+
+@@ -3527,7 +3527,7 @@ RTMPSockBuf_Send(RTMPSockBuf *sb, const char *buf, int len)
+ {
+ int rc;
+
+-#ifdef _DEBUG
++#if defined(_DEBUG) && !defined(LIBRTMP_ONLY)
+ fwrite(buf, 1, len, netstackdump);
+ #endif
+
diff --git a/ports/librtmp/librtmp.def b/ports/librtmp/librtmp.def
new file mode 100644
index 000000000..d9f8b9136
--- /dev/null
+++ b/ports/librtmp/librtmp.def
@@ -0,0 +1,105 @@
+EXPORTS
+ AMF_AddProp
+ AMF_CountProp
+ AMF_Decode
+ AMF_DecodeArray
+ AMF_DecodeBoolean
+ AMF_DecodeInt16
+ AMF_DecodeInt24
+ AMF_DecodeInt32
+ AMF_DecodeLongString
+ AMF_DecodeNumber
+ AMF_DecodeString
+ AMF_Dump
+ AMF_Encode
+ AMF_EncodeBoolean
+ AMF_EncodeInt16
+ AMF_EncodeInt24
+ AMF_EncodeInt32
+ AMF_EncodeNamedBoolean
+ AMF_EncodeNamedNumber
+ AMF_EncodeNamedString
+ AMF_EncodeNumber
+ AMF_EncodeString
+ AMF_GetProp
+ AMF_Reset
+
+ AMF3_Decode
+ AMF3CD_AddProp
+ AMF3CD_GetProp
+ AMF3Prop_Decode
+ AMF3ReadInteger
+ AMF3ReadString
+
+ AMFProp_Decode
+ AMFProp_Dump
+ AMFProp_Encode
+ AMFProp_GetBoolean
+ AMFProp_GetName
+ AMFProp_GetNumber
+ AMFProp_GetObject
+ AMFProp_GetString
+ AMFProp_GetType
+ AMFProp_IsValid
+ AMFProp_Reset
+ AMFProp_SetName
+
+ RTMP_Alloc
+ RTMP_ClientPacket
+ RTMP_Close
+ RTMP_Connect
+ RTMP_Connect0
+ RTMP_Connect1
+ RTMP_ConnectStream
+ RTMP_ctrlC
+ RTMP_debuglevel
+ RTMP_DefaultFlashVer
+ RTMP_DeleteStream
+ RTMP_DropRequest
+ RTMP_EnableWrite
+ RTMP_FindFirstMatchingProperty
+ RTMP_FindPrefixProperty
+ RTMP_Free
+ RTMP_GetDuration
+ RTMP_GetNextMediaPacket
+ RTMP_GetTime
+ RTMP_HashSWF
+ RTMP_Init
+ RTMP_IsConnected
+ RTMP_IsTimedout
+ RTMP_LibVersion
+ RTMP_Log
+ RTMP_LogGetLevel
+ RTMP_LogHex
+ RTMP_LogHexString
+ RTMP_LogPrintf
+ RTMP_LogSetCallback
+ RTMP_LogSetLevel
+ RTMP_LogSetOutput
+ RTMP_LogStatus
+ RTMP_ParsePlaypath
+ RTMP_ParseURL
+ RTMP_Pause
+ RTMP_Read
+ RTMP_ReadPacket
+ RTMP_ReconnectStream
+ RTMP_SendChunk
+ RTMP_SendClientBW
+ RTMP_SendCreateStream
+ RTMP_SendCtrl
+ RTMP_SendPacket
+ RTMP_SendPause
+ RTMP_SendSeek
+ RTMP_SendServerBW
+ RTMP_Serve
+ RTMP_SetBufferMS
+ RTMP_SetOpt
+ RTMP_SetupStream
+ RTMP_SetupURL
+ RTMP_Socket
+ RTMP_TLS_ctx
+ RTMP_TLS_Init
+ RTMP_ToggleStream
+ RTMP_UpdateBufferMS
+ RTMP_UserInterrupt
+ RTMP_Write
diff --git a/ports/librtmp/portfile.cmake b/ports/librtmp/portfile.cmake
new file mode 100644
index 000000000..18423f152
--- /dev/null
+++ b/ports/librtmp/portfile.cmake
@@ -0,0 +1,36 @@
+include(vcpkg_common_functions)
+
+set(RTMPDUMP_VERSION 2.3)
+set(RTMPDUMP_FILENAME rtmpdump-${RTMPDUMP_VERSION}.tgz)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/rtmpdump-${RTMPDUMP_VERSION})
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://rtmpdump.mplayerhq.hu/download/${RTMPDUMP_FILENAME}"
+ FILENAME "${RTMPDUMP_FILENAME}"
+ SHA512 d8240ba372a704231286b81bbf75716d8b76874840538c4e1527f7f8b6ca66eeaba6b03167fe6fab06bf80f20f07d89ecb84cc428b3196234174a43f3328ec2a
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/librtmp.def DESTINATION ${SOURCE_PATH}/librtmp)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/fix_strncasecmp.patch
+ ${CMAKE_CURRENT_LIST_DIR}/hide_netstackdump.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# License and man
+file(INSTALL ${SOURCE_PATH}/librtmp/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/librtmp RENAME copyright)
+file(INSTALL ${SOURCE_PATH}/librtmp/librtmp.3.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/librtmp)
+
+vcpkg_copy_pdbs()
diff --git a/ports/libsigcpp/CONTROL b/ports/libsigcpp/CONTROL
index da2338200..97667dd7d 100644
--- a/ports/libsigcpp/CONTROL
+++ b/ports/libsigcpp/CONTROL
@@ -1,3 +1,3 @@
Source: libsigcpp
-Version: 2.99
+Version: 2.99-1
Description: Typesafe callback framework for C++
diff --git a/ports/libsndfile/CONTROL b/ports/libsndfile/CONTROL
index c1949d8fc..9d3d9b423 100644
--- a/ports/libsndfile/CONTROL
+++ b/ports/libsndfile/CONTROL
@@ -1,4 +1,4 @@
Source: libsndfile
-Version: libsndfile-1.0.29-6830c42
+Version: libsndfile-1.0.29-6830c42-1
Description: Library to read, write and manipulate many soundfile types. Authored by Eric de Castro Lopo
Build-Depends: libogg, libflac, libvorbis
diff --git a/ports/libspatialite/CONTROL b/ports/libspatialite/CONTROL
new file mode 100644
index 000000000..1f7917a36
--- /dev/null
+++ b/ports/libspatialite/CONTROL
@@ -0,0 +1,5 @@
+Source: libspatialite
+Version: 4.3.0a
+Description: SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities.
+Build-Depends: libxml2, sqlite3, geos, proj4, zlib, freexl, libiconv
+
diff --git a/ports/libspatialite/fix-makefiles.patch b/ports/libspatialite/fix-makefiles.patch
new file mode 100644
index 000000000..9372739bb
--- /dev/null
+++ b/ports/libspatialite/fix-makefiles.patch
@@ -0,0 +1,61 @@
+diff --git a/makefile.vc b/makefile.vc
+index 9b9e8ee..b524a27 100644
+--- a/makefile.vc
++++ b/makefile.vc
+@@ -59,7 +59,7 @@ LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \
+ src\versioninfo\version.obj src\virtualtext\virtualtext.obj
+ SPATIALITE_DLL = spatialite$(VERSION).dll
+
+-CFLAGS = /nologo -I.\src\headers -I. -IC:\OSGeo4W\include $(OPTFLAGS)
++CFLAGS = /nologo -I.\src\headers -I. -I$(INSTALLED_ROOT)\include $(OPTFLAGS)
+
+ default: all
+
+@@ -73,12 +73,9 @@ spatialite.lib: $(LIBOBJ)
+ $(SPATIALITE_DLL): spatialite_i.lib
+
+ spatialite_i.lib: $(LIBOBJ)
+- link /debug /dll /out:$(SPATIALITE_DLL) \
++ link $(LINK_FLAGS) /dll /out:$(SPATIALITE_DLL) \
+ /implib:spatialite_i.lib $(LIBOBJ) \
+- C:\OSGeo4W\lib\proj_i.lib C:\OSGeo4W\lib\geos_c.lib \
+- C:\OSGeo4w\lib\freexl_i.lib C:\OSGeo4w\lib\iconv.lib \
+- C:\OSGeo4W\lib\sqlite3_i.lib C:\OSGeo4W\lib\zlib.lib \
+- C:\OSGeo4W\lib\libxml2.lib
++ $(LIBS_ALL)
+ if exist $(SPATIALITE_DLL).manifest mt -manifest \
+ $(SPATIALITE_DLL).manifest -outputresource:$(SPATIALITE_DLL);2
+
+@@ -90,16 +87,7 @@ clean:
+ del *.exp
+ del *.manifest
+ del *.lib
+- del src\gaiaaux\*.obj
+- del src\gaiaexif\*.obj
+- del src\gaiageo\*.obj
+- del src\spatialite\*.obj
+- del src\srsinit\*.obj
+- del src\versioninfo\*.obj
+- del src\virtualtext\*.obj
+- del src\wfs\*.obj
+- del src\dxf\*.obj
+- del src\md5\*.obj
++ forfiles /m *.obj* /s /c "cmd /c del @path" & exit 0
+ del *.pdb
+
+ install: all
+diff --git a/nmake.opt b/nmake.opt
+index 0960ec1..276bc84 100644
+--- a/nmake.opt
++++ b/nmake.opt
+@@ -1,8 +1,8 @@
+ # Directory tree where SpatiaLite will be installed.
+-INSTDIR=C:\OSGeo4W
++INSTDIR=$(INST_DIR)
+
+ # Uncomment the first for an optimized build, or the second for debug.
+-OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \
++OPTFLAGS= /nologo /fp:precise /W3 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \
+ /DDLL_EXPORT /DYY_NO_UNISTD_H
+ #OPTFLAGS= /nologo /Zi /MD /Fdspatialite.pdb /DDLL_EXPORT
+
diff --git a/ports/libspatialite/fix-sources.patch b/ports/libspatialite/fix-sources.patch
new file mode 100644
index 000000000..63def0d3c
--- /dev/null
+++ b/ports/libspatialite/fix-sources.patch
@@ -0,0 +1,32 @@
+diff --git a/config-msvc.h b/config-msvc.h
+index 9c7f477..a812546 100644
+--- a/config-msvc.h
++++ b/config-msvc.h
+@@ -143,7 +143,7 @@
+ #define HAVE_SYS_TYPES_H 1
+
+ /* Define to 1 if you have the <unistd.h> header file. */
+-#define HAVE_UNISTD_H 1
++#undef HAVE_UNISTD_H
+
+ /* Define to 1 if you have the <zlib.h> header file. */
+ #define HAVE_ZLIB_H 1
+diff --git a/src/gaiageo/gg_extras.c b/src/gaiageo/gg_extras.c
+index ff3dd7c..49ec986 100644
+--- a/src/gaiageo/gg_extras.c
++++ b/src/gaiageo/gg_extras.c
+@@ -59,14 +59,6 @@ the terms of any one of the MPL, the GPL or the LGPL.
+ #include <spatialite/sqlite.h>
+ #include <spatialite/gaiageo.h>
+
+-#if defined(_WIN32) && !defined(__MINGW32__)
+-static double
+-rint (double x)
+-{
+- return floor (x + 0.5);
+-}
+-#endif
+-
+ static void
+ auxGridSnapPoint (int dimension_model, gaiaPointPtr pt, gaiaGeomCollPtr result,
+ double origin_x, double origin_y, double origin_z,
diff --git a/ports/libspatialite/portfile.cmake b/ports/libspatialite/portfile.cmake
new file mode 100644
index 000000000..6517c1d55
--- /dev/null
+++ b/ports/libspatialite/portfile.cmake
@@ -0,0 +1,105 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libspatialite-4.3.0a)
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://www.gaia-gis.it/gaia-sins/libspatialite-4.3.0a.tar.gz"
+ FILENAME "libspatialite-4.3.0a.tar.gz"
+ SHA512 adfd63e8dde0f370b07e4e7bb557647d2bfb5549205b60bdcaaca69ff81298a3d885e7c1ca515ef56dd0aca152ae940df8b5dbcb65bb61ae0a9337499895c3c0
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+find_program(NMAKE nmake)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/fix-makefiles.patch
+ ${CMAKE_CURRENT_LIST_DIR}/fix-sources.patch
+)
+
+# fix most of the problems when spacebar is in the path
+set(CURRENT_INSTALLED_DIR "\"${CURRENT_INSTALLED_DIR}\"")
+
+if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
+ set(CL_FLAGS_DBG "/MDd /Zi")
+ set(CL_FLAGS_REL "/MD /Ox")
+ set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib")
+ set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_c.lib")
+ set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib")
+ set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib")
+else()
+ set(CL_FLAGS_DBG "/MTd /Zi")
+ set(CL_FLAGS_REL "/MT /Ox")
+ set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libgeos_c.lib ${CURRENT_INSTALLED_DIR}/lib/libgeos.lib")
+ set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libgeos_c.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libgeos.lib")
+ set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/lib/lzma.lib ws2_32.lib")
+ set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/debug/lib/lzma.lib ws2_32.lib")
+endif()
+
+set(LIBS_ALL_DBG
+ "${CURRENT_INSTALLED_DIR}/debug/lib/libiconv.lib \
+ ${CURRENT_INSTALLED_DIR}/debug/lib/libcharset.lib \
+ ${CURRENT_INSTALLED_DIR}/debug/lib/sqlite3.lib \
+ ${CURRENT_INSTALLED_DIR}/debug/lib/freexl.lib \
+ ${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib \
+ ${LIBXML2_LIBS_DBG} \
+ ${GEOS_LIBS_DBG} \
+ ${CURRENT_INSTALLED_DIR}/debug/lib/projd.lib"
+ )
+set(LIBS_ALL_REL
+ "${CURRENT_INSTALLED_DIR}/lib/libiconv.lib \
+ ${CURRENT_INSTALLED_DIR}/lib/libcharset.lib \
+ ${CURRENT_INSTALLED_DIR}/lib/sqlite3.lib \
+ ${CURRENT_INSTALLED_DIR}/lib/freexl.lib \
+ ${CURRENT_INSTALLED_DIR}/lib/zlib.lib \
+ ${LIBXML2_LIBS_REL} \
+ ${GEOS_LIBS_REL} \
+ ${CURRENT_INSTALLED_DIR}/lib/proj.lib"
+ )
+
+################
+# Debug build
+################
+message(STATUS "Building ${TARGET_TRIPLET}-dbg")
+
+file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG)
+
+vcpkg_execute_required_process(
+ COMMAND ${NMAKE} -f makefile.vc clean install
+ "INST_DIR=\"${INST_DIR_DBG}\"" INSTALLED_ROOT=${CURRENT_INSTALLED_DIR} "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}"
+ WORKING_DIRECTORY ${SOURCE_PATH}
+ LOGNAME nmake-build-${TARGET_TRIPLET}-debug
+)
+message(STATUS "Building ${TARGET_TRIPLET}-dbg done")
+vcpkg_copy_pdbs()
+
+################
+# Release build
+################
+message(STATUS "Building ${TARGET_TRIPLET}-rel")
+
+file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL)
+vcpkg_execute_required_process(
+ COMMAND ${NMAKE} -f makefile.vc clean install
+ "INST_DIR=\"${INST_DIR_REL}\"" INSTALLED_ROOT=${CURRENT_INSTALLED_DIR} "LINK_FLAGS=" "CL_FLAGS=${CL_FLAGS_REL}" "LIBS_ALL=${LIBS_ALL_REL}"
+ WORKING_DIRECTORY ${SOURCE_PATH}
+ LOGNAME nmake-build-${TARGET_TRIPLET}-release
+)
+message(STATUS "Building ${TARGET_TRIPLET}-rel done")
+
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libspatialite RENAME copyright)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/spatialite_i.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib)
+else()
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib)
+endif()
+
+message(STATUS "Packaging ${TARGET_TRIPLET} done")
diff --git a/ports/libssh/CONTROL b/ports/libssh/CONTROL
index 284d44091..9ae256937 100644
--- a/ports/libssh/CONTROL
+++ b/ports/libssh/CONTROL
@@ -1,4 +1,4 @@
Source: libssh
-Version: 0.7.5
+Version: 0.7.5-1
Description:libssh is a multiplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side
Build-Depends: zlib, openssl
diff --git a/ports/libssh2/CONTROL b/ports/libssh2/CONTROL
index 715ffa0bd..5c68d2693 100644
--- a/ports/libssh2/CONTROL
+++ b/ports/libssh2/CONTROL
@@ -1,4 +1,4 @@
Source: libssh2
-Version: 1.8.0-1
+Version: 1.8.0-2
Build-Depends: zlib, openssl
-Description: The SSH library \ No newline at end of file
+Description: The SSH library
diff --git a/ports/libstemmer/CMakeLists.txt b/ports/libstemmer/CMakeLists.txt
new file mode 100644
index 000000000..787bb26ec
--- /dev/null
+++ b/ports/libstemmer/CMakeLists.txt
@@ -0,0 +1,22 @@
+cmake_minimum_required(VERSION 3.8.0)
+
+project(libstemmer)
+
+file(GLOB SNOWBALL_SOURCES
+ src_c/*.c
+ runtime/api.c
+ runtime/utilities.c
+ libstemmer/libstemmer.c
+)
+
+add_library(stemmer ${SNOWBALL_SOURCES})
+
+install(
+ TARGETS stemmer
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES include/libstemmer.h DESTINATION include)
+endif()
diff --git a/ports/libstemmer/CONTROL b/ports/libstemmer/CONTROL
new file mode 100644
index 000000000..c09295b62
--- /dev/null
+++ b/ports/libstemmer/CONTROL
@@ -0,0 +1,3 @@
+Source: libstemmer
+Version: 2017-9-3
+Description: Snowball is a small string processing language designed for creating stemming algorithms for use in Information Retrieval
diff --git a/ports/libstemmer/LICENSE b/ports/libstemmer/LICENSE
new file mode 100644
index 000000000..0c9e7c008
--- /dev/null
+++ b/ports/libstemmer/LICENSE
@@ -0,0 +1,19 @@
+Snowball - License
+Except where explicitly noted, all the software given out on this Snowball site is covered by the 3-clause BSD License:
+
+Copyright (c) 2001, Dr Martin Porter,
+Copyright (c) 2002, Richard Boulton.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+Essentially, all this means is that you can do what you like with the code, except claim another Copyright for it, or claim that it is issued under a different license. The software is also issued without warranties, which means that if anyone suffers through its use, they cannot come back and sue you. You also have to alert anyone to whom you give the Snowball software to the fact that it is covered by the BSD license.
+
+We have not bothered to insert the licensing arrangement into the text of the Snowball software.
diff --git a/ports/libstemmer/portfile.cmake b/ports/libstemmer/portfile.cmake
new file mode 100644
index 000000000..9a76c3a94
--- /dev/null
+++ b/ports/libstemmer/portfile.cmake
@@ -0,0 +1,24 @@
+include(vcpkg_common_functions)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(WARNING "Dynamic not supported building static")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libstemmer_c)
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://snowball.tartarus.org/dist/libstemmer_c.tgz"
+ FILENAME "libstemmer_c.tgz"
+ SHA512 9ab5b8bfd5b4071dbbd63d769e09fae3971b49ee441ad970aa95d90b3297f5ffc9deed1613d99974d1485bf3b69292663591957f52bbeddcadbf9d9a4af432f2
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+
+file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libstemmer RENAME copyright)
diff --git a/ports/libtheora/CMakeLists.txt b/ports/libtheora/CMakeLists.txt
index 24ecbccf4..cf8799e5d 100644
--- a/ports/libtheora/CMakeLists.txt
+++ b/ports/libtheora/CMakeLists.txt
@@ -66,7 +66,7 @@ if(USE_X86)
add_definitions(-DOC_X86_ASM)
endif()
-if (${BUILD_SHARED_LIBS})
+if (BUILD_SHARED_LIBS)
add_definitions(-DLIBTHEORA_EXPORTS)
endif()
diff --git a/ports/libtheora/CONTROL b/ports/libtheora/CONTROL
index b964eb8ef..7324f0526 100644
--- a/ports/libtheora/CONTROL
+++ b/ports/libtheora/CONTROL
@@ -1,4 +1,4 @@
Source: libtheora
-Version: 1.2.0alpha1-20170719~vcpkg1
+Version: 1.2.0alpha1-20170719~vcpkg1-1
Description: Theora is a free and open video compression format from the Xiph.org Foundation.
Build-Depends: libogg
diff --git a/ports/libtorrent/CONTROL b/ports/libtorrent/CONTROL
index 3e2294cee..f2618a4ef 100644
--- a/ports/libtorrent/CONTROL
+++ b/ports/libtorrent/CONTROL
@@ -1,4 +1,4 @@
Source: libtorrent
-Version: 1.1.4
+Version: 1.1.4-1
Description: An efficient feature complete C++ BitTorrent implementation
Build-Depends: boost, openssl
diff --git a/ports/libunibreak/CMakeLists.txt b/ports/libunibreak/CMakeLists.txt
new file mode 100644
index 000000000..9ee5437d3
--- /dev/null
+++ b/ports/libunibreak/CMakeLists.txt
@@ -0,0 +1,35 @@
+cmake_minimum_required(VERSION 3.8.0)
+
+project(libunibreak)
+
+set(libunibreak_srcs
+ src/linebreakdata.c
+ src/linebreakdef.c
+ src/wordbreak.c
+ src/graphemebreak.c
+ src/unibreakbase.c
+ src/unibreakdef.c
+)
+
+
+include_directories(src)
+
+add_library(libunibreak ${libunibreak_srcs})
+
+install(
+ TARGETS libunibreak
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(
+ FILES
+ src/linebreak.h
+ src/linebreakdef.h
+ src/wordbreak.h
+ src/wordbreakdef.h
+ DESTINATION include
+ )
+endif()
diff --git a/ports/libunibreak/CONTROL b/ports/libunibreak/CONTROL
new file mode 100644
index 000000000..a8df4119f
--- /dev/null
+++ b/ports/libunibreak/CONTROL
@@ -0,0 +1,3 @@
+Source: libunibreak
+Version: 4.0-1
+Description: an implementation of the line breaking and word breaking algorithms as described in [Unicode Standard Annex 14] 1 and [Unicode Standard Annex 29] 2. Check the project's [home page] 3 for up-to-date information.
diff --git a/ports/libunibreak/portfile.cmake b/ports/libunibreak/portfile.cmake
new file mode 100644
index 000000000..6ec8bdd74
--- /dev/null
+++ b/ports/libunibreak/portfile.cmake
@@ -0,0 +1,24 @@
+include(vcpkg_common_functions)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(WARNING "Dynamic not supported building static")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO adah1972/libunibreak
+ REF libunibreak_4_0
+ SHA512 f11295133a1c65f365a5287f7377f69ac7998f19b06d44818fb55c8a5ba3edabc36de8d1b7c0d38db9d982f0e443d0a751f6d51841865094122df4cd74c9af3b
+ HEAD_REF master
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+
+file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libunibreak RENAME copyright)
diff --git a/ports/libusb-win32/CONTROL b/ports/libusb-win32/CONTROL
index f95a959f3..eba6e283d 100644
--- a/ports/libusb-win32/CONTROL
+++ b/ports/libusb-win32/CONTROL
@@ -1,3 +1,3 @@
Source: libusb-win32
-Version: 1.2.6.0
+Version: 1.2.6.0-1
Description: Allows user space applications to access many USB device on Windows.
diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL
index 61f5711d1..ba5d7e85e 100644
--- a/ports/libuv/CONTROL
+++ b/ports/libuv/CONTROL
@@ -1,3 +1,3 @@
Source: libuv
-Version: 1.14.0
-Description: libuv is a multi-platform support library with a focus on asynchronous I/O. \ No newline at end of file
+Version: 1.14.1-1
+Description: libuv is a multi-platform support library with a focus on asynchronous I/O.
diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake
index a75385132..2e07ff607 100644
--- a/ports/libuv/portfile.cmake
+++ b/ports/libuv/portfile.cmake
@@ -2,8 +2,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libuv/libuv
- REF v1.14.0
- SHA512 a838f2e97250a78861b72458d9278935d9e8151d69de21de19499dfe9d7304d65ce578c007356b75cd4ce2c17735292d93cdb2fcc206d4e2430ee3f9a2fc7222
+ REF v1.14.1
+ SHA512 de78909e92757ce024a48d5a12a1aedd8015d7135cee374965dc38c07c29352ea411a31921910653728b3f73aca0275382cbf2130144da65e50a472b17849ade
HEAD_REF v1.x)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
diff --git a/ports/libvorbis/CONTROL b/ports/libvorbis/CONTROL
index dec9363b2..20f8c6e29 100644
--- a/ports/libvorbis/CONTROL
+++ b/ports/libvorbis/CONTROL
@@ -1,4 +1,4 @@
Source: libvorbis
-Version: 1.3.5-143caf4-2
+Version: 1.3.5-143caf4-3
Description: Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format.
Build-Depends: libogg
diff --git a/ports/libwebm/CONTROL b/ports/libwebm/CONTROL
index ca76af460..eb19cf16a 100644
--- a/ports/libwebm/CONTROL
+++ b/ports/libwebm/CONTROL
@@ -1,3 +1,3 @@
Source: libwebm
-Version: 1.0.0.27-1
+Version: 1.0.0.27-2
Description: WebM File Parser
diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL
index 2b3c36554..e042390f4 100644
--- a/ports/libwebp/CONTROL
+++ b/ports/libwebp/CONTROL
@@ -1,3 +1,3 @@
Source: libwebp
-Version: 0.6.0-1
+Version: 0.6.0-2
Description: Lossy compression of digital photographic images.
diff --git a/ports/libwebsockets/CONTROL b/ports/libwebsockets/CONTROL
index 61a9cc449..816253a2c 100644
--- a/ports/libwebsockets/CONTROL
+++ b/ports/libwebsockets/CONTROL
@@ -1,4 +1,4 @@
Source: libwebsockets
-Version: 2.0.0-1
+Version: 2.0.0-2
Build-Depends: zlib, openssl
-Description: Libwebsockets is a lightweight pure C library built to use minimal CPU and memory resources, and provide fast throughput in both directions as client or server. \ No newline at end of file
+Description: Libwebsockets is a lightweight pure C library built to use minimal CPU and memory resources, and provide fast throughput in both directions as client or server.
diff --git a/ports/libxml2/CONTROL b/ports/libxml2/CONTROL
index 9f1564226..ce430ceff 100644
--- a/ports/libxml2/CONTROL
+++ b/ports/libxml2/CONTROL
@@ -1,4 +1,4 @@
Source: libxml2
-Version: 2.9.4-1
+Version: 2.9.4-2
Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform)
Build-Depends: zlib, libiconv, liblzma
diff --git a/ports/libxmp-lite/0001-msvc-buildfix.patch b/ports/libxmp-lite/0001-msvc-buildfix.patch
new file mode 100644
index 000000000..dfd548186
--- /dev/null
+++ b/ports/libxmp-lite/0001-msvc-buildfix.patch
@@ -0,0 +1,23 @@
+diff -Naur .\libxmp-lite-4.4.1/src/common.h .\libxmp-lite-4.4.1-orig/src/common.h
+--- a/src/common.h 2016-07-16 13:37:36 +0200
++++ b/src/common.h 2017-05-23 00:52:17 +0200
+@@ -77,19 +77,12 @@
+ #ifndef CLIB_DECL
+ #define CLIB_DECL
+ #endif
+-#ifdef DEBUG
+-#ifndef ATTR_PRINTF
+-#define ATTR_PRINTF(x,y)
+-#endif
+-void CLIB_DECL D_(const char *text, ...) ATTR_PRINTF(1,2);
+-#else
+ // VS prior to VC7.1 does not support variadic macros. VC8.0 does not optimize unused parameters passing
+ #if _MSC_VER < 1400
+ void __inline CLIB_DECL D_(const char *text, ...) { do {} while (0); }
+ #else
+ #define D_(args, ...) do {} while (0)
+ #endif
+-#endif
+
+ #elif defined __ANDROID__
+
diff --git a/ports/libxmp-lite/0002-fix-symbols.patch b/ports/libxmp-lite/0002-fix-symbols.patch
new file mode 100644
index 000000000..f765a7bf0
--- /dev/null
+++ b/ports/libxmp-lite/0002-fix-symbols.patch
@@ -0,0 +1,44 @@
+diff --git a/lite/src/format.c b/lite/src/format.c
+--- a/src/format.c
++++ b/src/format.c
+@@ -27,20 +27,20 @@
+ #endif
+ #include "format.h"
+
+-extern const struct format_loader xm_loader;
+-extern const struct format_loader mod_loader;
+-extern const struct format_loader it_loader;
+-extern const struct format_loader s3m_loader;
++extern const struct format_loader libxmp_loader_xm;
++extern const struct format_loader libxmp_loader_mod;
++extern const struct format_loader libxmp_loader_it;
++extern const struct format_loader libxmp_loader_s3m;
+
+ extern const struct pw_format *const pw_format[];
+
+ const struct format_loader *const format_loader[5] = {
+- &xm_loader,
+- &mod_loader,
++ &libxmp_loader_xm,
++ &libxmp_loader_mod,
+ #ifndef LIBXMP_CORE_DISABLE_IT
+- &it_loader,
++ &libxmp_loader_it,
+ #endif
+- &s3m_loader,
++ &libxmp_loader_s3m,
+ NULL
+ };
+
+diff --git a/lite/src/loaders/mod_load.c b/lite/src/loaders/mod_load.c
+--- a/src/loaders/mod_load.c
++++ b/src/loaders/mod_load.c
+@@ -36,7 +36,7 @@
+ static int mod_test (HIO_HANDLE *, char *, const int);
+ static int mod_load (struct module_data *, HIO_HANDLE *, const int);
+
+-const struct format_loader mod_loader = {
++const struct format_loader libxmp_loader_mod = {
+ "Protracker",
+ mod_test,
+ mod_load
diff --git a/ports/libxmp-lite/CMakeLists.txt b/ports/libxmp-lite/CMakeLists.txt
new file mode 100644
index 000000000..9495e0eb4
--- /dev/null
+++ b/ports/libxmp-lite/CMakeLists.txt
@@ -0,0 +1,65 @@
+cmake_minimum_required(VERSION 3.4)
+project(libxmp-lite)
+
+set(HEADERS "include/libxmp-lite/xmp.h")
+
+set(SOURCES src/virtual.c
+ src/format.c
+ src/period.c
+ src/player.c
+ src/read_event.c
+ src/dataio.c
+ src/lfo.c
+ src/scan.c
+ src/control.c
+ src/filter.c
+ src/effects.c
+ src/mixer.c
+ src/mix_all.c
+ src/load_helpers.c
+ src/load.c
+ src/hio.c
+ src/smix.c
+ src/memio.c
+ src/loaders/common.c
+ src/loaders/itsex.c
+ src/loaders/sample.c
+ src/loaders/xm_load.c
+ src/loaders/mod_load.c
+ src/loaders/s3m_load.c
+ src/loaders/it_load.c
+)
+
+include_directories(include/libxmp-lite src)
+
+option(BUILD_SHARED_LIBS "Build shared libs" OFF)
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ option(INSTALL_HEADERS "Install header files" OFF)
+else()
+ option(INSTALL_HEADERS "Install header files" ON)
+endif()
+
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
+add_library(libxmp-lite ${SOURCES})
+target_compile_definitions(libxmp-lite PRIVATE
+ LIBXMP_CORE_PLAYER=1
+ inline=__inline
+ _USE_MATH_DEFINES=1
+)
+
+# Fix UWP /sdl compile errors
+# Disable C4703: Not initialized
+# Disable C4996: Deprecated
+set_target_properties(libxmp-lite PROPERTIES COMPILE_FLAGS "/wd4703 /wd4996")
+
+install(
+ TARGETS libxmp-lite
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+)
+
+if(INSTALL_HEADERS)
+ install(FILES ${HEADERS} DESTINATION include)
+endif()
diff --git a/ports/libxmp-lite/CONTROL b/ports/libxmp-lite/CONTROL
new file mode 100644
index 000000000..1f7e8dded
--- /dev/null
+++ b/ports/libxmp-lite/CONTROL
@@ -0,0 +1,3 @@
+Source: libxmp-lite
+Version: 4.4.1
+Description: Lightweight version of libxmp that supports MOD, S3M, XM and IT modules.
diff --git a/ports/libxmp-lite/portfile.cmake b/ports/libxmp-lite/portfile.cmake
new file mode 100644
index 000000000..ac67940a1
--- /dev/null
+++ b/ports/libxmp-lite/portfile.cmake
@@ -0,0 +1,27 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libxmp-lite-4.4.1)
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://sourceforge.net/projects/xmp/files/libxmp/4.4.1/libxmp-lite-4.4.1.tar.gz"
+ FILENAME "libxmp-lite-4.4.1.tar.gz"
+ SHA512 f27e3f9fb79ff15ce90b51fb29641c01cadf7455150da57cde6860c2ba075ed497650eb44ec9143bdd3538288228c609f7db6d862c9d73f007f686eccb05543e
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/0001-msvc-buildfix.patch
+ ${CMAKE_CURRENT_LIST_DIR}/0002-fix-symbols.patch
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxmp-lite RENAME copyright)
diff --git a/ports/libzip/CONTROL b/ports/libzip/CONTROL
index 2106a5f94..045030e95 100644
--- a/ports/libzip/CONTROL
+++ b/ports/libzip/CONTROL
@@ -1,4 +1,4 @@
Source: libzip
-Version: 1.2.0-1
+Version: 1.2.0-2
Build-Depends: zlib
Description: A library for reading, creating, and modifying zip archives.
diff --git a/ports/live555/CONTROL b/ports/live555/CONTROL
index 37048f268..d2ff15211 100644
--- a/ports/live555/CONTROL
+++ b/ports/live555/CONTROL
@@ -1,3 +1,3 @@
Source: live555
-Version: 2017.06.04
+Version: 2017.06.04-1
Description: A complete RTSP server application
diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL
index 9b7936004..2f6b1ec93 100644
--- a/ports/llvm/CONTROL
+++ b/ports/llvm/CONTROL
@@ -1,3 +1,3 @@
Source: llvm
-Version: 4.0.0
+Version: 5.0.0-1
Description: The LLVM Compiler Infrastructure
diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake
index 9edf7f2b1..b1f546f4f 100644
--- a/ports/llvm/portfile.cmake
+++ b/ports/llvm/portfile.cmake
@@ -3,11 +3,11 @@
set(VCPKG_LIBRARY_LINKAGE static)
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/llvm-4.0.0.src)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/llvm-5.0.0.src)
vcpkg_download_distfile(ARCHIVE
- URLS "http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz"
- FILENAME "llvm-4.0.0.src.tar.xz"
- SHA512 cf681f0626ef6d568d951cdc3e143471a1d7715a0ba11e52aa273cf5d8d421e1357ef2645cc85879eaefcd577e99e74d07b01566825b3d0461171ef2cbfc7704
+ URLS "http://releases.llvm.org/5.0.0/llvm-5.0.0.src.tar.xz"
+ FILENAME "llvm-5.0.0.src.tar.xz"
+ SHA512 e6d8fdcb5bf27bded814d02f39f69c6171bc3a512d5957c03e5ac2e231f903b7de87634b059bd5c5da670f7c3a8f7a538f6299225799f15f921857f1452f6b3a
)
vcpkg_extract_source_archive(${ARCHIVE})
diff --git a/ports/lmdb/CONTROL b/ports/lmdb/CONTROL
index 13c648fa6..c926fd78f 100644
--- a/ports/lmdb/CONTROL
+++ b/ports/lmdb/CONTROL
@@ -1,3 +1,3 @@
Source: lmdb
-Version: 0.9.18-2
-Description: LMDB is an extraordinarily fast, memory-efficient database \ No newline at end of file
+Version: 0.9.18-3
+Description: LMDB is an extraordinarily fast, memory-efficient database
diff --git a/ports/lodepng/CMakeLists.txt b/ports/lodepng/CMakeLists.txt
new file mode 100644
index 000000000..d4c8bc12a
--- /dev/null
+++ b/ports/lodepng/CMakeLists.txt
@@ -0,0 +1,41 @@
+cmake_minimum_required(VERSION 3.8.0)
+project(lodepng)
+
+if(MSVC)
+ add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
+endif()
+
+if(BUILD_SHARED_LIBS)
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+endif()
+
+
+include_directories(".")
+
+add_library(lodepng lodepng.cpp lodepng_util.cpp)
+
+add_executable(pngdetail pngdetail.cpp)
+
+target_link_libraries(pngdetail lodepng)
+
+install(
+ TARGETS lodepng
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT DISABLE_INSTALL_TOOLS)
+ install (
+ TARGETS pngdetail
+ RUNTIME DESTINATION tools/lodepng
+ )
+endif()
+
+if(NOT DDISABLE_INSTALL_EXAMPLES)
+ install(DIRECTORY examples DESTINATION share/lodepng/)
+endif()
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES lodepng.h lodepng_util.h DESTINATION include)
+endif()
diff --git a/ports/lodepng/CONTROL b/ports/lodepng/CONTROL
new file mode 100644
index 000000000..230e27252
--- /dev/null
+++ b/ports/lodepng/CONTROL
@@ -0,0 +1,3 @@
+Source: lodepng
+Version: 2017-09-01-8a0f16afe74a6a-1
+Description: PNG encoder and decoder in C and C++
diff --git a/ports/lodepng/portfile.cmake b/ports/lodepng/portfile.cmake
new file mode 100644
index 000000000..8611d5ea3
--- /dev/null
+++ b/ports/lodepng/portfile.cmake
@@ -0,0 +1,28 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO lvandeve/lodepng
+ REF 8a0f16afe74a6abf85e3b45e9558283022021a59
+ SHA512 189dde0a0982822b6dfc3f886d8035338ed200958eed8394c5c64aa97ddcf758b3989beae14ce8f26a78efa9fb4b94932bb02b41cacd62bd62a46ebf9b324def
+ HEAD_REF master
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG
+ -DDISABLE_INSTALL_HEADERS=ON
+ -DDISABLE_INSTALL_TOOLS=ON
+ -DDDISABLE_INSTALL_EXAMPLES=ON
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/lodepng)
+
+
+file(INSTALL ${SOURCE_PATH}/lodepng.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/lodepng RENAME copyright)
diff --git a/ports/log4cplus/CONTROL b/ports/log4cplus/CONTROL
index d4af82051..882ee88b8 100644
--- a/ports/log4cplus/CONTROL
+++ b/ports/log4cplus/CONTROL
@@ -1,3 +1,3 @@
Source: log4cplus
-Version: REL_1_2_1-RC2
+Version: REL_1_2_1-RC2-1
Description: A simple to use C++ logging API providing thread--safe, flexible, and arbitrarily granular control over log management and configuration
diff --git a/ports/lpeg/CONTROL b/ports/lpeg/CONTROL
index 5f2a3aff7..9896815b8 100644
--- a/ports/lpeg/CONTROL
+++ b/ports/lpeg/CONTROL
@@ -1,4 +1,4 @@
Source: lpeg
-Version: 1.0.1-2
+Version: 1.0.1-3
Description: LPeg is a pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs).
Build-Depends: lua
diff --git a/ports/lua/CMakeLists.txt b/ports/lua/CMakeLists.txt
index faef8018b..fc2e27e08 100644
--- a/ports/lua/CMakeLists.txt
+++ b/ports/lua/CMakeLists.txt
@@ -56,9 +56,10 @@ INSTALL ( TARGETS lua
IF (NOT DEFINED SKIP_INSTALL_TOOLS)
ADD_EXECUTABLE ( luac src/luac.c ${SRC_LIBLUA} ) # compiler
- ADD_EXECUTABLE ( luai src/lua.c ${SRC_LIBLUA} ) # interpreter
+ ADD_EXECUTABLE ( luai src/lua.c ) # interpreter
+ TARGET_LINK_LIBRARIES ( luai lua )
SET_TARGET_PROPERTIES ( luai PROPERTIES OUTPUT_NAME lua PDB_NAME luai )
- INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools )
+ INSTALL ( TARGETS luai luac lua RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools )
ENDIF ()
IF (NOT DEFINED SKIP_INSTALL_HEADERS)
diff --git a/ports/lua/CONTROL b/ports/lua/CONTROL
index 266bd153c..cf49dafe5 100644
--- a/ports/lua/CONTROL
+++ b/ports/lua/CONTROL
@@ -1,3 +1,3 @@
Source: lua
-Version: 5.3.4
+Version: 5.3.4-2
Description: a powerful, fast, lightweight, embeddable scripting language
diff --git a/ports/luafilesystem/CONTROL b/ports/luafilesystem/CONTROL
index f101b7cb3..4ff18cda4 100644
--- a/ports/luafilesystem/CONTROL
+++ b/ports/luafilesystem/CONTROL
@@ -1,4 +1,4 @@
Source: luafilesystem
-Version: 1.6.3
+Version: 1.7.0.2
Description: LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution.
Build-Depends: lua
diff --git a/ports/luafilesystem/lfs-def-fix.patch b/ports/luafilesystem/lfs-def-fix.patch
index 62cea763e..34923427f 100644
--- a/ports/luafilesystem/lfs-def-fix.patch
+++ b/ports/luafilesystem/lfs-def-fix.patch
@@ -1,21 +1,20 @@
-From 644c9c32ca9053ced3d37ff76fc1fbc0389ddf53 Mon Sep 17 00:00:00 2001
-From: Alex <null@null.null>
-Date: Mon, 16 Feb 2015 08:15:41 +0300
-Subject: [PATCH] DEF file fixes (DESCRIPTION is deprecated; VERSION must
- contain one or two numers)
+From 92527d96199912f79b8046ddb32ff83a16771cb4 Mon Sep 17 00:00:00 2001
+From: "Stephen E. Baker" <baker.stephen.e@gmail.com>
+Date: Fri, 15 Sep 2017 21:18:58 -0400
+Subject: [PATCH] Update version in lfs.def
+Version number of current release is 1.7
---
- src/lfs.def | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
+ src/lfs.def | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lfs.def b/src/lfs.def
-index 7aa7a35..8a36d41 100644
+index 8a36d41..4055ff0 100644
--- a/src/lfs.def
+++ b/src/lfs.def
-@@ -1,5 +1,4 @@
+@@ -1,4 +1,4 @@
LIBRARY lfs.dll
--DESCRIPTION "LuaFileSystem"
--VERSION 1.5.0
-+VERSION 1.6
+-VERSION 1.6
++VERSION 1.7
EXPORTS
luaopen_lfs
diff --git a/ports/luafilesystem/portfile.cmake b/ports/luafilesystem/portfile.cmake
index e55d56881..74c3d116a 100644
--- a/ports/luafilesystem/portfile.cmake
+++ b/ports/luafilesystem/portfile.cmake
@@ -1,8 +1,8 @@
include(vcpkg_common_functions)
-set(LUAFILESYSTEM_VERSION 1.6.3)
-set(LUAFILESYSTEM_REVISION v_1_6_3)
-set(LUAFILESYSTEM_HASH abfa1b3ac22ed80189560a1a025a7ea21a954defe14e5b539e08f266d180962a691262efc7eb2ddacc2d4aae14d6e356b1a276165b5bed46a13e4d6c61ab99f1)
+set(LUAFILESYSTEM_VERSION 1.7.0.2)
+set(LUAFILESYSTEM_REVISION v1_7_0_2)
+set(LUAFILESYSTEM_HASH a1d4d077776e57cd878dbcd21656da141ea3686c587b5420a2b039aeaf086b7e7d05d531ee1cc2bbd7d06660d1315b09593e52143f6711f033ce8eecdc550511)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/luafilesystem-${LUAFILESYSTEM_VERSION})
vcpkg_from_github(
diff --git a/ports/lz4/CONTROL b/ports/lz4/CONTROL
index c6d730c2d..5e8b87bd2 100644
--- a/ports/lz4/CONTROL
+++ b/ports/lz4/CONTROL
@@ -1,3 +1,3 @@
Source: lz4
-Version: 1.8.0
+Version: 1.8.0-1
Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core.
diff --git a/ports/lzfse/CONTROL b/ports/lzfse/CONTROL
index 7559d661e..34276814f 100644
--- a/ports/lzfse/CONTROL
+++ b/ports/lzfse/CONTROL
@@ -1,3 +1,3 @@
Source: lzfse
-Version: 1.0
+Version: 1.0-1
Description: Lempel-Ziv style data compressor using Finite State Entropy coding.
diff --git a/ports/lzo/CONTROL b/ports/lzo/CONTROL
index ba477b484..d124020b8 100644
--- a/ports/lzo/CONTROL
+++ b/ports/lzo/CONTROL
@@ -1,3 +1,3 @@
Source: lzo
-Version: 2.10-1
+Version: 2.10-2
Description: Lossless data compression library
diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL
index f6e194c9f..6c187f423 100644
--- a/ports/magnum-plugins/CONTROL
+++ b/ports/magnum-plugins/CONTROL
@@ -1,4 +1,4 @@
Source: magnum-plugins
-Version: jun2017-4
+Version: jun2017-5
Build-Depends: stb, magnum
Description: Plugins for C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php
diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake
index b26262490..289816b94 100644
--- a/ports/magnum-plugins/portfile.cmake
+++ b/ports/magnum-plugins/portfile.cmake
@@ -3,7 +3,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mosra/magnum-plugins
REF 34a3bc34335ca05097e735db19fe1fae81dbfbb5
- SHA512 918c3eeae246d1ac67e3595c50ff599872a0c1498e9a8a0386ad656f3d9d2209b048b53c25f198660e15201147795578c5c931b00116da46fd77d8e91c0826cb
+ SHA512 8d8998ed0f5a9361fd8a322f0c9ee8bb36b2255487e7198603f316a383a5dcb38160dcfa92759a2e2aa6d13d45f5fdae8f1165e39428d516823bc931d3097b83
HEAD_REF master
)
@@ -72,4 +72,4 @@ endif()
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum-plugins)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum-plugins/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum-plugins/copyright)
-vcpkg_copy_pdbs() \ No newline at end of file
+vcpkg_copy_pdbs()
diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL
index a040014da..382e39075 100644
--- a/ports/magnum/CONTROL
+++ b/ports/magnum/CONTROL
@@ -1,4 +1,4 @@
Source: magnum
-Version: jun2017-5
+Version: jun2017-6
Build-Depends: corrade, sdl2, openal-soft
Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php
diff --git a/ports/matio/CONTROL b/ports/matio/CONTROL
index f4dac30a1..7912440e3 100644
--- a/ports/matio/CONTROL
+++ b/ports/matio/CONTROL
@@ -1,4 +1,4 @@
Source: matio
-Version: 1.5.10-1
+Version: 1.5.10-2
Description: MATLAB MAT File I/O Library
Build-Depends: zlib, hdf5
diff --git a/ports/meschach/CMakeLists.txt b/ports/meschach/CMakeLists.txt
new file mode 100644
index 000000000..648fe5af9
--- /dev/null
+++ b/ports/meschach/CMakeLists.txt
@@ -0,0 +1,89 @@
+cmake_minimum_required(VERSION 3.8.0)
+project(meschach)
+
+if(MSVC)
+ add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
+endif()
+
+set(meschach_srcs
+ bdfactor.c
+ bkpfacto.c
+ chfactor.c
+ copy.c
+ err.c
+ extras.c
+ fft.c
+ givens.c
+ hessen.c
+ hsehldr.c
+ init.c
+ iter0.c
+ iternsym.c
+ itersym.c
+ ivecop.c
+ lufactor.c
+ machine.c
+ matlab.c
+ matop.c
+ matrixio.c
+ meminfo.c
+ memory.c
+ memstat.c
+ mfunc.c
+ norm.c
+ otherio.c
+ pxop.c
+ qrfactor.c
+ schur.c
+ solve.c
+ sparse.c
+ sparseio.c
+ spbkp.c
+ spchfctr.c
+ splufctr.c
+ sprow.c
+ spswap.c
+ submat.c
+ svd.c
+ symmeig.c
+ update.c
+ vecop.c
+ version.c
+ zcopy.c
+ zfunc.c
+ zgivens.c
+ zhessen.c
+ zhsehldr.c
+ zlufctr.c
+ zmachine.c
+ zmatio.c
+ zmatlab.c
+ zmatop.c
+ zmemory.c
+ znorm.c
+ zqrfctr.c
+ zschur.c
+ zsolve.c
+ ztorture.c
+ zvecop.c
+)
+file(GLOB meschach_headers "*.h")
+
+include_directories(".")
+
+if(BUILD_SHARED_LIBS)
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+endif()
+
+add_library(meschach ${meschach_srcs})
+target_compile_definitions(meschach PRIVATE -DHAVE_MEMORY_H -DHAVE_COMPLEX_H)
+
+install(
+ TARGETS meschach
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES ${meschach_headers} DESTINATION include/meschach)
+endif()
diff --git a/ports/meschach/CONTROL b/ports/meschach/CONTROL
new file mode 100644
index 000000000..a8418b2b1
--- /dev/null
+++ b/ports/meschach/CONTROL
@@ -0,0 +1,3 @@
+Source: meschach
+Version: 1.2b-1
+Description: Matrix computations in C
diff --git a/ports/meschach/portfile.cmake b/ports/meschach/portfile.cmake
new file mode 100644
index 000000000..dd9d93085
--- /dev/null
+++ b/ports/meschach/portfile.cmake
@@ -0,0 +1,21 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://homepage.math.uiowa.edu/~dstewart/meschach/mesch12b.tar.gz"
+ FILENAME "mesch12b.tar.gz"
+ SHA512 9051e1502b8c9741400c61fd6038e514887f305f267ba4e97d747423de3da1270f835f65b2d1f538f8938677060bc0fcfd7a94022d74fbfd31a0450116e9d79e
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(INSTALL ${SOURCE_PATH}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/meschach)
diff --git a/ports/metis/CONTROL b/ports/metis/CONTROL
index cc604ce8f..f302a9ce4 100644
--- a/ports/metis/CONTROL
+++ b/ports/metis/CONTROL
@@ -1,3 +1,3 @@
Source: metis
-Version: 5.1.0
+Version: 5.1.0-1
Description: Serial Graph Partitioning and Fill-reducing Matrix Ordering
diff --git a/ports/minizip/CONTROL b/ports/minizip/CONTROL
index b3023e990..135303129 100644
--- a/ports/minizip/CONTROL
+++ b/ports/minizip/CONTROL
@@ -1,4 +1,4 @@
Source: minizip
-Version: 1.2.11-1
+Version: 1.2.11-2
Description:
Build-Depends: bzip2, zlib
diff --git a/ports/mongo-c-driver/CONTROL b/ports/mongo-c-driver/CONTROL
index a460b313c..4b100879a 100644
--- a/ports/mongo-c-driver/CONTROL
+++ b/ports/mongo-c-driver/CONTROL
@@ -1,4 +1,4 @@
Source: mongo-c-driver
-Version: 1.6.2
+Version: 1.6.2-1
Build-Depends: libbson, openssl (uwp)
-Description: Client library written in C for MongoDB. \ No newline at end of file
+Description: Client library written in C for MongoDB.
diff --git a/ports/mongo-cxx-driver/CONTROL b/ports/mongo-cxx-driver/CONTROL
index 9b7e29ba3..306f6a96c 100644
--- a/ports/mongo-cxx-driver/CONTROL
+++ b/ports/mongo-cxx-driver/CONTROL
@@ -1,4 +1,4 @@
Source: mongo-cxx-driver
-Version: 3.1.1
+Version: 3.1.1-1
Build-Depends: boost, libbson, mongo-c-driver
-Description: MongoDB C++ Driver. \ No newline at end of file
+Description: MongoDB C++ Driver.
diff --git a/ports/mozjpeg/CONTROL b/ports/mozjpeg/CONTROL
new file mode 100644
index 000000000..9e3f19b4c
--- /dev/null
+++ b/ports/mozjpeg/CONTROL
@@ -0,0 +1,3 @@
+Source: mozjpeg
+Version: 3.2-1
+Description: MozJPEG reduces file sizes of JPEG images while retaining quality and compatibility with the vast majority of the world's deployed decoders. It's compatible with libjpeg API and ABI, and can be used as a drop-in replacement for libjpeg.
diff --git a/ports/mozjpeg/portfile.cmake b/ports/mozjpeg/portfile.cmake
new file mode 100644
index 000000000..52011d394
--- /dev/null
+++ b/ports/mozjpeg/portfile.cmake
@@ -0,0 +1,54 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO mozilla/mozjpeg
+ REF v3.2
+ SHA512 d14789827a9f4f78139a3945d3169d37eb891758b5ab40ef19e99ebebb2fb6d7c3a05495de245bba54cfd913b153af352159aa9fc0218127f97819137e0f1ab8
+ HEAD_REF master
+)
+
+vcpkg_find_acquire_program(NASM)
+get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
+set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}")
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ set(OPTIONS "-DENABLE_SHARED=FALSE")
+else()
+ set(OPTIONS "-DENABLE_STATIC=FALSE")
+endif()
+
+string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" WITH_CRT_DLL)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ ${OPTIONS}
+ -DWITH_CRT_DLL=${WITH_CRT_DLL}
+)
+
+vcpkg_install_cmake()
+
+#remove extra debug files
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc)
+file(GLOB DEBUGEXES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
+file(REMOVE ${DEBUGEXES})
+
+#move exes to tools
+file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe)
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/mozjpeg)
+file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/mozjpeg)
+file(REMOVE ${EXES})
+
+vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/mozjpeg)
+
+#remove empty folders after static build
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/mozjpeg RENAME copyright)
+vcpkg_copy_pdbs() \ No newline at end of file
diff --git a/ports/mpfr/CONTROL b/ports/mpfr/CONTROL
index 16224d73b..bec54417d 100644
--- a/ports/mpfr/CONTROL
+++ b/ports/mpfr/CONTROL
@@ -1,4 +1,4 @@
Source: mpfr
-Version: 3.1.5
+Version: 3.1.6
Description: The MPFR library is a C library for multiple-precision floating-point computations with correct rounding
-Build-Depends: mpir \ No newline at end of file
+Build-Depends: mpir
diff --git a/ports/mpfr/portfile.cmake b/ports/mpfr/portfile.cmake
index 6a61d4038..b71aa0505 100644
--- a/ports/mpfr/portfile.cmake
+++ b/ports/mpfr/portfile.cmake
@@ -1,9 +1,9 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpfr-3.1.5)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpfr-3.1.6)
vcpkg_download_distfile(ARCHIVE
- URLS "http://www.mpfr.org/mpfr-current/mpfr-3.1.5.tar.xz"
- FILENAME "mpfr-3.1.5.tar.xz"
- SHA512 3643469b9099b31e41d6ec9158196cd1c30894030c8864ee5b1b1e91b488bccbf7c263c951b03fe9f4ae6f9d29279e157a7dfed0885467d875f107a3d964f032
+ URLS "http://www.mpfr.org/mpfr-current/mpfr-3.1.6.tar.xz"
+ FILENAME "mpfr-3.1.6.tar.xz"
+ SHA512 746ee74d5026f267f74ab352d850ed30ff627d530aa840c71b24793e44875f8503946bd7399905dea2b2dd5744326254d7889337fe94cfe58d03c4066e9d8054
)
vcpkg_extract_source_archive(${ARCHIVE})
diff --git a/ports/msgpack/CONTROL b/ports/msgpack/CONTROL
index 1d0daba68..7c9933d27 100644
--- a/ports/msgpack/CONTROL
+++ b/ports/msgpack/CONTROL
@@ -1,3 +1,3 @@
Source: msgpack
-Version: 2.1.5
+Version: 2.1.5-1
Description: MessagePack is an efficient binary serialization format, which lets you exchange data among multiple languages like JSON, except that it's faster and smaller.
diff --git a/ports/msmpi/portfile.cmake b/ports/msmpi/portfile.cmake
index ca841313e..893e6f124 100644
--- a/ports/msmpi/portfile.cmake
+++ b/ports/msmpi/portfile.cmake
@@ -22,7 +22,7 @@ vcpkg_get_program_files_platform_bitness(PROGRAM_FILES_PLATFORM_BITNESS)
set(SYSTEM_MPIEXEC_FILEPATH "${PROGRAM_FILES_PLATFORM_BITNESS}/Microsoft MPI/Bin/mpiexec.exe")
set(MSMPI_EXPECTED_FULL_VERSION "8.1.12438.1084")
-if(EXISTS ${SYSTEM_MPIEXEC_FILEPATH})
+if(EXISTS "${SYSTEM_MPIEXEC_FILEPATH}")
set(MPIEXEC_VERSION_LOGNAME "mpiexec-version")
vcpkg_execute_required_process(
COMMAND ${SYSTEM_MPIEXEC_FILEPATH}
@@ -31,8 +31,8 @@ if(EXISTS ${SYSTEM_MPIEXEC_FILEPATH})
)
file(READ ${CURRENT_BUILDTREES_DIR}/${MPIEXEC_VERSION_LOGNAME}-out.log MPIEXEC_OUTPUT)
- if(${MPIEXEC_OUTPUT} MATCHES "\\[Version ([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)\\]")
- if(NOT ${CMAKE_MATCH_1} STREQUAL ${MSMPI_EXPECTED_FULL_VERSION})
+ if(MPIEXEC_OUTPUT MATCHES "\\[Version ([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)\\]")
+ if(NOT CMAKE_MATCH_1 STREQUAL MSMPI_EXPECTED_FULL_VERSION)
download_msmpi_redistributable_package()
message(FATAL_ERROR
@@ -102,7 +102,7 @@ file(INSTALL
DESTINATION
${CURRENT_PACKAGES_DIR}/lib
)
-if(${TRIPLET_SYSTEM_ARCH} STREQUAL "x86")
+if(TRIPLET_SYSTEM_ARCH STREQUAL "x86")
file(INSTALL
"${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifes.lib"
"${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifms.lib"
@@ -121,7 +121,7 @@ file(INSTALL
DESTINATION
${CURRENT_PACKAGES_DIR}/debug/lib
)
-if(${TRIPLET_SYSTEM_ARCH} STREQUAL "x86")
+if(TRIPLET_SYSTEM_ARCH STREQUAL "x86")
file(INSTALL
"${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifes.lib"
"${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifms.lib"
diff --git a/ports/nana/CONTROL b/ports/nana/CONTROL
index 680dec287..ae4168544 100644
--- a/ports/nana/CONTROL
+++ b/ports/nana/CONTROL
@@ -1,4 +1,4 @@
Source: nana
-Version: 1.5.4
+Version: 1.5.4-1
Description: Cross-platform library for GUI programming in modern C++ style.
Build-Depends: libpng, libjpeg-turbo
diff --git a/ports/nanodbc/CONTROL b/ports/nanodbc/CONTROL
index 2611bac80..0343119a0 100644
--- a/ports/nanodbc/CONTROL
+++ b/ports/nanodbc/CONTROL
@@ -1,3 +1,3 @@
Source: nanodbc
-Version: 2.12.4
-Description: A small C++ wrapper for the native C ODBC API. \ No newline at end of file
+Version: 2.12.4-1
+Description: A small C++ wrapper for the native C ODBC API.
diff --git a/ports/netcdf-c/CONTROL b/ports/netcdf-c/CONTROL
index 1303cb517..a7f3816ba 100644
--- a/ports/netcdf-c/CONTROL
+++ b/ports/netcdf-c/CONTROL
@@ -1,4 +1,4 @@
Source: netcdf-c
-Version: 4.4.1.1-1
+Version: 4.4.1.1-2
Build-Depends: hdf5, curl
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-cxx4/CONTROL b/ports/netcdf-cxx4/CONTROL
index 9fcda5468..a3b7278a6 100644
--- a/ports/netcdf-cxx4/CONTROL
+++ b/ports/netcdf-cxx4/CONTROL
@@ -1,4 +1,4 @@
Source: netcdf-cxx4
-Version: 4.3.0
+Version: 4.3.0-1
Build-Depends: netcdf-c
Description: a set of machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.
diff --git a/ports/nlohmann-json/CONTROL b/ports/nlohmann-json/CONTROL
index 4e65a9d93..90b6e504e 100644
--- a/ports/nlohmann-json/CONTROL
+++ b/ports/nlohmann-json/CONTROL
@@ -1,3 +1,3 @@
Source: nlohmann-json
-Version: 2.1.1
+Version: 2.1.1-1
Description: JSON for Modern C++
diff --git a/ports/nlopt/0001_export_symbols.patch b/ports/nlopt/0001_export_symbols.patch
new file mode 100644
index 000000000..8db70a139
--- /dev/null
+++ b/ports/nlopt/0001_export_symbols.patch
@@ -0,0 +1,25 @@
+From a8ab743870873066a66b30d68907ccc4ade250a5 Mon Sep 17 00:00:00 2001
+From: Mikhail Paulyshka <me@mixaill.tk>
+Date: Mon, 4 Sep 2017 01:25:38 +0300
+Subject: [PATCH] export symbols
+
+---
+ CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f630c18..c266b39 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -20,6 +20,8 @@ endif ()
+
+ project (nlopt)
+
++set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
++
+ list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
+
+ option (WITH_CXX "enable cxx routines" OFF)
+--
+2.12.2.windows.2
+
diff --git a/ports/nlopt/CONTROL b/ports/nlopt/CONTROL
new file mode 100644
index 000000000..22d763b0b
--- /dev/null
+++ b/ports/nlopt/CONTROL
@@ -0,0 +1,3 @@
+Source: nlopt
+Version: 2.4.2-c43afa08d~vcpkg1-1
+Description: a library for nonlinear local and global optimization, for functions with and without gradient information.
diff --git a/ports/nlopt/portfile.cmake b/ports/nlopt/portfile.cmake
new file mode 100644
index 000000000..f2370b0c0
--- /dev/null
+++ b/ports/nlopt/portfile.cmake
@@ -0,0 +1,30 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO stevengj/nlopt
+ REF c43afa08d4fe086d9c00c37924a6bd4c9de71816
+ SHA512 e063d748b040f081a648b33dadaf9b7deef63ff3be0cffd8988816701c18694202f5bcf06a18991f1f4b35014e3f406ffa4404d4036ff7625d3680bd5e24f8e4
+ HEAD_REF master
+)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/0001_export_symbols.patch)
+
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/nlopt")
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/ports/octomap/CONTROL b/ports/octomap/CONTROL
index f54112669..6b26d7ef1 100644
--- a/ports/octomap/CONTROL
+++ b/ports/octomap/CONTROL
@@ -1,3 +1,3 @@
Source: octomap
-Version: cefed0c1d79afafa5aeb05273cf1246b093b771c-1
+Version: cefed0c1d79afafa5aeb05273cf1246b093b771c-2
Description: An Efficient Probabilistic 3D Mapping Framework Based on Octrees
diff --git a/ports/ogre/CONTROL b/ports/ogre/CONTROL
index 40d9e2416..a3a2460c4 100644
--- a/ports/ogre/CONTROL
+++ b/ports/ogre/CONTROL
@@ -1,4 +1,4 @@
Source: ogre
-Version: 1.9.0
+Version: 1.9.0 -1
Build-Depends: freeimage, freetype, zlib, zziplib
Description: 3D Object-Oriented Graphics Rendering Engine
diff --git a/ports/openal-soft/CONTROL b/ports/openal-soft/CONTROL
index 742bab3fe..094f5c188 100644
--- a/ports/openal-soft/CONTROL
+++ b/ports/openal-soft/CONTROL
@@ -1,3 +1,3 @@
Source: openal-soft
-Version: 1.18.1
+Version: 1.18.1-1
Description: OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API.
diff --git a/ports/openblas/CONTROL b/ports/openblas/CONTROL
index a3a3f702f..808d52ac9 100644
--- a/ports/openblas/CONTROL
+++ b/ports/openblas/CONTROL
@@ -1,3 +1,3 @@
Source: openblas
-Version: v0.2.20
+Version: v0.2.20-2
Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
diff --git a/ports/openblas/install-openblas.patch b/ports/openblas/install-openblas.patch
index 354b593dc..ef9574cdd 100644
--- a/ports/openblas/install-openblas.patch
+++ b/ports/openblas/install-openblas.patch
@@ -22,40 +22,3 @@ index a379f549..f95a872b 100644
# TODO: Why is the config saved here? Is this necessary with CMake?
#Save the config files for installation
-diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake
-index a7f98bfb..02ab7080 100644
---- a/cmake/prebuild.cmake
-+++ b/cmake/prebuild.cmake
-@@ -37,6 +37,10 @@
-
- # CPUIDEMU = ../../cpuid/table.o
-
-+if (NOT DEFINED BLASHELPER_BINARY_DIR)
-+ set(BLASHELPER_BINARY_DIR "${PROJECT_BINARY_DIR}")
-+endif ()
-+
- if (DEFINED CPUIDEMU)
- set(EXFLAGS "-DCPUIDEMU -DVENDOR=99")
- endif ()
-@@ -95,8 +99,8 @@ endif ()
- message(STATUS "Running getarch")
-
- # use the cmake binary w/ the -E param to run a shell command in a cross-platform way
--execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH_BIN} 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT)
--execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH_BIN} 1 OUTPUT_VARIABLE GETARCH_CONF_OUT)
-+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH_BIN} 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT)
-+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH_BIN} 1 OUTPUT_VARIABLE GETARCH_CONF_OUT)
-
- message(STATUS "GETARCH results:\n${GETARCH_MAKE_OUT}")
-
-@@ -121,8 +125,8 @@ if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
- endif ()
-
- # use the cmake binary w/ the -E param to run a shell command in a cross-platform way
--execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT)
--execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT)
-+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN} 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT)
-+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN} 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT)
-
- # append config data from getarch_2nd to the TARGET file and read in CMake vars
- file(APPEND ${TARGET_CONF} ${GETARCH2_CONF_OUT})
diff --git a/ports/openblas/portfile.cmake b/ports/openblas/portfile.cmake
index c437a8642..463db0f25 100644
--- a/ports/openblas/portfile.cmake
+++ b/ports/openblas/portfile.cmake
@@ -21,17 +21,17 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
set(VCPKG_LIBRARY_LINKAGE "dynamic")
endif()
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openblas-0.2.20)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://codeload.github.com/xianyi/OpenBLAS/zip/v0.2.20"
- FILENAME "openblas-v0.2.20.zip"
- SHA512 c9cd7397bb026e3bb06c9407ad5ac26bf936258da81ac22132ceceb53c0235677e18a6046f1db8a75c8a92a614b2d156a3da89d684421a24bd283430ce55db7d
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO xianyi/OpenBLAS
+ REF v0.2.20
+ SHA512 8dfc8e8c8d456b834d2e9544c8eadd9f4770e30db8b8dd76af601ec0735fd86c9cf63dd6a03ccd23fc02ec2e05069a09875b9073dfe29f99aadab3a958ae2634
+ HEAD_REF develop
)
-vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
- PATCHES "${CMAKE_CURRENT_LIST_DIR}/install-openblas.patch"
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/install-openblas.patch" "${CMAKE_CURRENT_LIST_DIR}/whitespace.patch"
)
find_program(GIT NAMES git git.cmd)
diff --git a/ports/openblas/whitespace.patch b/ports/openblas/whitespace.patch
new file mode 100644
index 000000000..410e81655
--- /dev/null
+++ b/ports/openblas/whitespace.patch
@@ -0,0 +1,64 @@
+diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake
+index 02ab708..b51bd0b 100644
+--- a/cmake/prebuild.cmake
++++ b/cmake/prebuild.cmake
+@@ -37,6 +37,10 @@
+
+ # CPUIDEMU = ../../cpuid/table.o
+
++if (NOT DEFINED BLASHELPER_BINARY_DIR)
++ set(BLASHELPER_BINARY_DIR "${PROJECT_BINARY_DIR}")
++endif ()
++
+ if (DEFINED CPUIDEMU)
+ set(EXFLAGS "-DCPUIDEMU -DVENDOR=99")
+ endif ()
+@@ -87,7 +87,7 @@ file(MAKE_DIRECTORY ${GETARCH_DIR})
+ if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
+ try_compile(GETARCH_RESULT ${GETARCH_DIR}
+ SOURCES ${GETARCH_SRC}
+- COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} -I${PROJECT_SOURCE_DIR}
++ COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} -I"${PROJECT_SOURCE_DIR}"
+ OUTPUT_VARIABLE GETARCH_LOG
+ COPY_FILE ${PROJECT_BINARY_DIR}/${GETARCH_BIN}
+ )
+@@ -95,8 +99,8 @@ endif ()
+ message(STATUS "Running getarch")
+
+ # use the cmake binary w/ the -E param to run a shell command in a cross-platform way
+-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH_BIN} 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT)
+-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH_BIN} 1 OUTPUT_VARIABLE GETARCH_CONF_OUT)
++execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH_BIN} 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT)
++execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH_BIN} 1 OUTPUT_VARIABLE GETARCH_CONF_OUT)
+
+ message(STATUS "GETARCH results:\n${GETARCH_MAKE_OUT}")
+
+@@ -114,7 +114,7 @@ file(MAKE_DIRECTORY ${GETARCH2_DIR})
+ if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
+ try_compile(GETARCH2_RESULT ${GETARCH2_DIR}
+ SOURCES ${PROJECT_SOURCE_DIR}/getarch_2nd.c
+- COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GETARCH2_FLAGS} -I${PROJECT_SOURCE_DIR}
++ COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GETARCH2_FLAGS} -I"${PROJECT_SOURCE_DIR}"
+ OUTPUT_VARIABLE GETARCH2_LOG
+ COPY_FILE ${PROJECT_BINARY_DIR}/${GETARCH2_BIN}
+ )
+@@ -121,8 +125,8 @@ if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
+ endif ()
+
+ # use the cmake binary w/ the -E param to run a shell command in a cross-platform way
+-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT)
+-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT)
++execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN} 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT)
++execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN} 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT)
+
+ # append config data from getarch_2nd to the TARGET file and read in CMake vars
+ file(APPEND ${TARGET_CONF} ${GETARCH2_CONF_OUT})
+@@ -141,7 +141,7 @@ file(MAKE_DIRECTORY ${GEN_CONFIG_H_DIR})
+ if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
+ try_compile(GEN_CONFIG_H_RESULT ${GEN_CONFIG_H_DIR}
+ SOURCES ${PROJECT_SOURCE_DIR}/gen_config_h.c
+- COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GEN_CONFIG_H_FLAGS} -I${PROJECT_SOURCE_DIR}
++ COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GEN_CONFIG_H_FLAGS} -I"${PROJECT_SOURCE_DIR}"
+ OUTPUT_VARIABLE GEN_CONFIG_H_LOG
+ COPY_FILE ${PROJECT_BINARY_DIR}/${GEN_CONFIG_H_BIN}
+ )
diff --git a/ports/opencv/002-fix-uwp.patch b/ports/opencv/002-fix-uwp.patch
index d684141f5..22d006862 100644
--- a/ports/opencv/002-fix-uwp.patch
+++ b/ports/opencv/002-fix-uwp.patch
@@ -24,16 +24,3 @@ index c8242dd..97edd14 100644
# removing APPCONTAINER from modules to run from console
# in case of usual starting of WinRT test apps output is missing
# so starting of console version w/o APPCONTAINER is required to get test results
-diff --git a/modules/highgui/src/window.cpp b/modules/highgui/src/window.cpp
-index 9306f8e..69a814e 100644
---- a/modules/highgui/src/window.cpp
-+++ b/modules/highgui/src/window.cpp
-@@ -209,7 +209,7 @@ int cv::waitKeyEx(int delay)
- int cv::waitKey(int delay)
- {
- int code = waitKeyEx(delay);
--#ifndef HAVE_WINRT
-+#ifndef WINRT
- static int use_legacy = -1;
- if (use_legacy < 0)
- {
diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL
index 7dbaf64c2..c2814c9c2 100644
--- a/ports/opencv/CONTROL
+++ b/ports/opencv/CONTROL
@@ -1,6 +1,5 @@
Source: opencv
-Version: 3.2.0-3
-Build-Depends: zlib, libpng, libjpeg-turbo, tiff
-#Use the following line instead for optional features from OpenCV-contrib that require protobuf
-#Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf
+Version: 3.3.0-4
+# Optional: Add in vtk to build with VTK and cuda to build with CUDA
+Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows), ffmpeg
Description: computer vision library
diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake
index 3323fb0f4..d21956108 100644
--- a/ports/opencv/portfile.cmake
+++ b/ports/opencv/portfile.cmake
@@ -1,15 +1,12 @@
-if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
- message(STATUS "Warning: Static building not supported yet. Building dynamic.")
- set(VCPKG_LIBRARY_LINKAGE dynamic)
-endif()
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/opencv-3.2.0)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/opencv/opencv/archive/3.2.0.zip"
- FILENAME "opencv-3.2.0.zip"
- SHA512 c6418d2a7654fe9d50611e756778df4c6736f2de76b85773efbf490bb475dd95ec1041fe57a87163ce11a7db44430cd378c8416af3319f979ced92532bf5ebb5
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO opencv/opencv
+ REF 3.3.0
+ SHA512 13dee5c1c5fec1dccdbb05879d299b93ef8ddeb87f561a6c4178e33a4cf5ae919765119068d0387a3efea0e09a625ca993cffac60a772159690fcbee4e8d70fb
+ HEAD_REF master
)
-vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
@@ -19,23 +16,26 @@ vcpkg_apply_patches(
)
file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/libjpeg ${SOURCE_PATH}/3rdparty/libpng ${SOURCE_PATH}/3rdparty/zlib ${SOURCE_PATH}/3rdparty/libtiff)
-# Uncomment the following lines and the lines under OPTIONS to build opencv_contrib
-# Important: after uncommenting you've add protobuf dependency within CONTROL file
-#SET(CONTRIB_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/opencv_contrib-3.2.0)
-#vcpkg_download_distfile(CONTRIB_ARCHIVE
-# URLS "https://github.com/opencv/opencv_contrib/archive/3.2.0.zip"
-# FILENAME "opencv_contrib-3.2.0.zip"
-# SHA512 da6cda7a7ae1d722967e18f9b8d60895b93bbc3664dfdb1645cb4d8b337a9c4207b9073fd546a596c48a489f92d15191aa34c7c607167b536fbe4937b8424b43
-#)
-#vcpkg_extract_source_archive(${CONTRIB_ARCHIVE})
-#vcpkg_apply_patches(
-# SOURCE_PATH ${CONTRIB_SOURCE_PATH}
-# PATCHES "${CMAKE_CURRENT_LIST_DIR}/open_contrib-remove-waldboost.patch"
-#)
+vcpkg_from_github(
+ OUT_SOURCE_PATH CONTRIB_SOURCE_PATH
+ REPO opencv/opencv_contrib
+ REF 3.3.0
+ SHA512 ebe3dbe6c754c6fbaabbf6b0d2a4209964e625fd68e593f30ce043792740c8c1d4440d7870949b5b33f488fd7e2e05f3752287b7f50dd24c29202e268776520e
+ HEAD_REF master
+)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${CONTRIB_SOURCE_PATH}
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/open_contrib-remove-waldboost.patch"
+)
+
+string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
+ "-DOPENCV_DOWNLOAD_PATH=${DOWNLOADS}/opencv-cache"
+ -DBUILD_WITH_STATIC_CRT=${BUILD_WITH_STATIC_CRT}
-DBUILD_ZLIB=OFF
-DBUILD_TIFF=OFF
-DBUILD_JPEG=OFF
@@ -51,20 +51,23 @@ vcpkg_configure_cmake(
-DBUILD_TESTS=OFF
-DBUILD_WITH_DEBUG_INFO=ON
-DOpenCV_DISABLE_ARCH_PATH=ON
- -DWITH_FFMPEG=OFF
+ -DWITH_FFMPEG=ON
-DINSTALL_FORCE_UNIX_PATHS=ON
-DOPENCV_CONFIG_INSTALL_PATH=share/opencv
-DOPENCV_OTHER_INSTALL_PATH=share/opencv
-DINSTALL_LICENSE=OFF
+ # Optional: change to ON to build with CUDA
-DWITH_CUDA=OFF
-DWITH_CUBLAS=OFF
-DWITH_OPENCLAMDBLAS=OFF
-DWITH_LAPACK=OFF
-
- # uncomment the following 3 lines to build opencv_contrib modules
- #-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules
- #-DBUILD_PROTOBUF=OFF
- #-DUPDATE_PROTO_FILES=ON
+ -DBUILD_opencv_dnn=ON
+ -DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules
+ -DBUILD_PROTOBUF=OFF
+ -DUPDATE_PROTO_FILES=ON
+ -DPROTOBUF_UPDATE_FILES=ON
+ # Optional: change to ON to build with VTK
+ -DWITH_VTK=OFF
OPTIONS_DEBUG
-DINSTALL_HEADERS=OFF
-DINSTALL_OTHER=OFF
@@ -72,13 +75,80 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
-file(READ ${CURRENT_PACKAGES_DIR}/debug/share/opencv/OpenCVModules-debug.cmake OPENCV_DEBUG_MODULE)
-string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" OPENCV_DEBUG_MODULE "${OPENCV_DEBUG_MODULE}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules-debug.cmake "${OPENCV_DEBUG_MODULE}")
-
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
-
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/opencv)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/opencv/LICENSE ${CURRENT_PACKAGES_DIR}/share/opencv/copyright)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/LICENSE)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/LICENSE)
+
+if(VCPKG_PLATFORM_TOOLSET STREQUAL "v141")
+ set(OpenCV_RUNTIME vc15)
+else()
+ set(OpenCV_RUNTIME vc14)
+endif()
+if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
+ set(OpenCV_ARCH x64)
+else()
+ set(OpenCV_ARCH x86)
+endif()
+
+file(GLOB BIN_AND_LIB ${CURRENT_PACKAGES_DIR}/${OpenCV_ARCH}/${OpenCV_RUNTIME}/*)
+file(COPY ${BIN_AND_LIB} DESTINATION ${CURRENT_PACKAGES_DIR})
+file(GLOB DEBUG_BIN_AND_LIB ${CURRENT_PACKAGES_DIR}/debug/${OpenCV_ARCH}/${OpenCV_RUNTIME}/*)
+file(COPY ${DEBUG_BIN_AND_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/${OpenCV_ARCH})
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/${OpenCV_ARCH})
+
+file(GLOB STATICLIB ${CURRENT_PACKAGES_DIR}/staticlib/*)
+if(STATICLIB)
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib)
+ file(COPY ${STATICLIB} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/staticlib)
+endif()
+file(GLOB STATICLIB ${CURRENT_PACKAGES_DIR}/debug/staticlib/*)
+if(STATICLIB)
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib)
+ file(COPY ${STATICLIB} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/staticlib)
+endif()
+
+file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVConfig.cmake OPENCV_CONFIG)
+string(REPLACE " vc15"
+ " ${OpenCV_RUNTIME}" OPENCV_CONFIG "${OPENCV_CONFIG}")
+string(REPLACE " vc14"
+ " ${OpenCV_RUNTIME}" OPENCV_CONFIG "${OPENCV_CONFIG}")
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVConfig.cmake "${OPENCV_CONFIG}")
+
+if(EXISTS "${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib")
+ file(RENAME ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib)
+endif()
+file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVModules-release.cmake OPENCV_CONFIG_LIB)
+string(REPLACE "/staticlib/"
+ "/lib/" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}")
+string(REPLACE "/${OpenCV_ARCH}/${OpenCV_RUNTIME}/"
+ "/" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}")
+string(REPLACE "${CURRENT_INSTALLED_DIR}"
+ "\${_IMPORT_PREFIX}" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}")
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVModules-release.cmake "${OPENCV_CONFIG_LIB}")
+
+if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib")
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib ${CURRENT_PACKAGES_DIR}/debug/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib)
+endif()
+file(READ ${CURRENT_PACKAGES_DIR}/debug/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVModules-debug.cmake OPENCV_CONFIG_LIB)
+string(REPLACE "/staticlib/"
+ "/lib/" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}")
+string(REPLACE "/${OpenCV_ARCH}/${OpenCV_RUNTIME}/"
+ "/" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}")
+string(REPLACE "PREFIX}/lib"
+ "PREFIX}/debug/lib" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}")
+string(REPLACE "PREFIX}/bin"
+ "PREFIX}/debug/bin" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}")
+string(REPLACE "${CURRENT_INSTALLED_DIR}"
+ "\${_IMPORT_PREFIX}" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}")
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVModules-debug.cmake "${OPENCV_CONFIG_LIB}")
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
vcpkg_copy_pdbs()
+
+set(VCPKG_LIBRARY_LINKAGE "dynamic") \ No newline at end of file
diff --git a/ports/openexr/CONTROL b/ports/openexr/CONTROL
index 1ce905777..b50a48ae8 100644
--- a/ports/openexr/CONTROL
+++ b/ports/openexr/CONTROL
@@ -1,4 +1,4 @@
Source: openexr
-Version: 2.2.0
+Version: 2.2.0-1
Description: OpenEXR is a high dynamic-range (HDR) image file format developed by Industrial Light & Magic for use in computer imaging applications
Build-Depends: zlib, ilmbase
diff --git a/ports/opengl/portfile.cmake b/ports/opengl/portfile.cmake
index 2af9e6e3b..36622393b 100644
--- a/ports/opengl/portfile.cmake
+++ b/ports/opengl/portfile.cmake
@@ -4,18 +4,18 @@ vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT)
vcpkg_get_windows_sdk(WINDOWS_SDK)
if (WINDOWS_SDK MATCHES "10.")
- set(OPENGLPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
+ set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
set(LICENSEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Licenses\\${WINDOWS_SDK}\\sdk_license.rtf")
set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um")
elseif(WINDOWS_SDK MATCHES "8.")
- set(OPENGLPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
+ set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Include\\um")
else()
message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}")
endif()
-if (NOT EXISTS "${OPENGLPATH}")
- message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${OPENGLPATH}")
+if (NOT EXISTS "${LIBFILEPATH}")
+ message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBFILEPATH}")
endif()
file(MAKE_DIRECTORY
@@ -30,8 +30,8 @@ file(COPY
"${HEADERSPATH}\\gl\\GLU.h"
DESTINATION ${CURRENT_PACKAGES_DIR}/include/gl
)
-file(COPY ${OPENGLPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
-file(COPY ${OPENGLPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
if (DEFINED LICENSEPATH)
file(COPY ${LICENSEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/opengl)
diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL
index b04914c5c..1421e3acb 100644
--- a/ports/openimageio/CONTROL
+++ b/ports/openimageio/CONTROL
@@ -1,4 +1,4 @@
Source: openimageio
-Version: 1.7.15
+Version: 1.7.15-1
Description: An library for reading and writing images, and a bunch of related classes, utilities, and application
-Build-Depends: boost, libjpeg-turbo, tiff, libpng, openexr \ No newline at end of file
+Build-Depends: boost, libjpeg-turbo, tiff, libpng, openexr
diff --git a/ports/openjpeg/CONTROL b/ports/openjpeg/CONTROL
index 7a1140c10..862d82ab8 100644
--- a/ports/openjpeg/CONTROL
+++ b/ports/openjpeg/CONTROL
@@ -1,3 +1,3 @@
Source: openjpeg
-Version: 2.2.0
+Version: 2.2.0-1
Description: JPEG 2000 image library
diff --git a/ports/openni2/CONTROL b/ports/openni2/CONTROL
index 5dca7646a..b1d60d860 100644
--- a/ports/openni2/CONTROL
+++ b/ports/openni2/CONTROL
@@ -1,3 +1,4 @@
Source: openni2
-Version: 2.2.0.33
+Version: 2.2.0.33-4
+Build-Depends: kinectsdk1
Description: OpenNI is open source library for access to Natural Interaction (NI) devices such as RGB-D camera.
diff --git a/ports/openni2/inherit_from_parent_or_project_defaults.patch b/ports/openni2/inherit_from_parent_or_project_defaults.patch
new file mode 100644
index 000000000..73893f3b9
--- /dev/null
+++ b/ports/openni2/inherit_from_parent_or_project_defaults.patch
@@ -0,0 +1,41 @@
+diff --git a/Source/Drivers/Kinect/Kinect.vcxproj b/Source/Drivers/Kinect/Kinect.vcxproj
+index 7f54d04..08a49fe 100644
+--- a/Source/Drivers/Kinect/Kinect.vcxproj
++++ b/Source/Drivers/Kinect/Kinect.vcxproj
+@@ -72,28 +72,29 @@
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(SolutionDir)Bin\$(Platform)-$(Configuration)\OpenNI2\Drivers\</OutDir>
+ <IntDir>$(SolutionDir)Bin\Intermediate\$(Platform)-$(Configuration)\$(ProjectName)\</IntDir>
+- <IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include</IncludePath>
+- <LibraryPath>$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;</LibraryPath>
++ <IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(IncludePath)</IncludePath>
++ <LibraryPath>$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;$(LibraryPath)</LibraryPath>
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <OutDir>$(SolutionDir)Bin\$(Platform)-$(Configuration)\OpenNI2\Drivers\</OutDir>
+ <IntDir>$(SolutionDir)Bin\Intermediate\$(Platform)-$(Configuration)\$(ProjectName)\</IntDir>
+- <IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;</IncludePath>
+- <LibraryPath>$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSdkDir)lib\x64;</LibraryPath>
++ <IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(IncludePath)</IncludePath>
++ <LibraryPath>$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSdkDir)lib\x64;$(LibraryPath)</LibraryPath>
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(SolutionDir)Bin\$(Platform)-$(Configuration)\OpenNI2\Drivers\</OutDir>
+ <IntDir>$(SolutionDir)Bin\Intermediate\$(Platform)-$(Configuration)\$(ProjectName)\</IntDir>
+- <IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;</IncludePath>
+- <LibraryPath>$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;</LibraryPath>
++ <IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(IncludePath)</IncludePath>
++ <LibraryPath>$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;$(LibraryPath)</LibraryPath>
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>$(SolutionDir)Bin\$(Platform)-$(Configuration)\OpenNI2\Drivers\</OutDir>
+ <IntDir>$(SolutionDir)Bin\Intermediate\$(Platform)-$(Configuration)\$(ProjectName)\</IntDir>
+- <IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include</IncludePath>
++ <IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(IncludePath)</IncludePath>
++ <LibraryPath>$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSdkDir)lib\x64;$(LibraryPath)</LibraryPath>
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
diff --git a/ports/openni2/portfile.cmake b/ports/openni2/portfile.cmake
index 12ac4902b..cc428ddb7 100644
--- a/ports/openni2/portfile.cmake
+++ b/ports/openni2/portfile.cmake
@@ -1,15 +1,3 @@
-# Common Ambient Variables:
-# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
-# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
-# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
-# PORT = current port name (zlib, etc)
-# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
-# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
-# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
-# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
-# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
-#
-
# UWP Not Support
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "Error: UWP builds are currently not supported.")
@@ -28,20 +16,32 @@ endif()
# Download Source Code
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/OpenNI2-2.2-beta2)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/OpenNI/OpenNI2/archive/2.2-beta2.zip"
- FILENAME "OpenNI2-2.2-beta.zip"
- SHA512 9779161493114265745c9eb8b15db95a3ed2322cd75504931d0fb7b6214d7abc8a9eb2ea5f35e309bc4d2748f015eee27ada4974a2e9568b5ecb9d98099c84e9
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO OpenNI/OpenNI2
+ REF 2.2-beta2
+ SHA512 60a3a3043679f3069aea869e92dc5881328ce4393d4140ea8d089027321ac501ae27d283657214e2834d216d0d49bf4f29a4b3d3e43df27a6ed21f889cd0083f
+ HEAD_REF master
)
-vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/upgrade_projects.patch"
- PATCHES "${CMAKE_CURRENT_LIST_DIR}/disable_kinect.patch"
+ "${CMAKE_CURRENT_LIST_DIR}/inherit_from_parent_or_project_defaults.patch"
+ "${CMAKE_CURRENT_LIST_DIR}/replace_environment_variable.patch"
)
+file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
+file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
+file(COPY ${SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
+get_filename_component(SOURCE_DIR_NAME "${SOURCE_PATH}" NAME)
+
+# Use fresh copy of sources for building and modification
+set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${SOURCE_DIR_NAME}")
+
+file(TO_NATIVE_PATH ${CURRENT_INSTALLED_DIR} NATIVE_INSTALLED_DIR)
+configure_file("${SOURCE_PATH}/Source/Drivers/Kinect/Kinect.vcxproj" "${SOURCE_PATH}/Source/Drivers/Kinect/Kinect.vcxproj" @ONLY)
+
# Build OpenNI2
vcpkg_build_msbuild(
PROJECT_PATH "${SOURCE_PATH}/OpenNI.sln"
@@ -137,6 +137,7 @@ file(
file(
INSTALL
+ "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/Kinect.dll"
"${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/OniFile.dll"
"${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/PS1080.dll"
"${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PS1080.ini"
@@ -156,6 +157,7 @@ file(
file(
INSTALL
+ "${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/Kinect.dll"
"${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/OniFile.dll"
"${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/PS1080.dll"
"${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PS1080.ini"
@@ -175,6 +177,7 @@ file(
file(
INSTALL
+ "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/Kinect.dll"
"${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/OniFile.dll"
"${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/PS1080.dll"
"${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PS1080.ini"
@@ -199,9 +202,9 @@ file(
"${SOURCE_BIN_PATH_RELEASE}/PS1080Console.exe"
"${SOURCE_BIN_PATH_RELEASE}/PSLinkConsole.exe"
DESTINATION
- ${CURRENT_PACKAGES_DIR}/tools/openni2/
+ ${CURRENT_PACKAGES_DIR}/tools/openni2
)
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openni2)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/openni2/LICENSE ${CURRENT_PACKAGES_DIR}/share/openni2/copyright)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/openni2/LICENSE ${CURRENT_PACKAGES_DIR}/share/openni2/copyright) \ No newline at end of file
diff --git a/ports/openni2/replace_environment_variable.patch b/ports/openni2/replace_environment_variable.patch
new file mode 100644
index 000000000..48978e869
--- /dev/null
+++ b/ports/openni2/replace_environment_variable.patch
@@ -0,0 +1,76 @@
+diff --git a/Source/Drivers/Kinect/Kinect.vcxproj b/Source/Drivers/Kinect/Kinect.vcxproj
+index 08a49fe..7fd8620 100644
+--- a/Source/Drivers/Kinect/Kinect.vcxproj
++++ b/Source/Drivers/Kinect/Kinect.vcxproj
+@@ -101,7 +101,7 @@
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+- <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc;</AdditionalIncludeDirectories>
++ <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_INSTALLED_DIR@\include</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_WINDLL;%(PreprocessorDefinitions);_WINDOWS</PreprocessorDefinitions>
+ <DisableLanguageExtensions>false</DisableLanguageExtensions>
+ <TreatWarningAsError>false</TreatWarningAsError>
+@@ -109,7 +109,7 @@
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>Kinect10.lib;XnLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+- <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86;</AdditionalLibraryDirectories>
++ <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_INSTALLED_DIR@\debug\lib</AdditionalLibraryDirectories>
+ <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
+ </Link>
+ </ItemDefinitionGroup>
+@@ -117,7 +117,7 @@
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+- <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc;</AdditionalIncludeDirectories>
++ <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_INSTALLED_DIR@\include</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_WINDLL;%(PreprocessorDefinitions);_WINDOWS</PreprocessorDefinitions>
+ <DisableLanguageExtensions>false</DisableLanguageExtensions>
+ <TreatWarningAsError>false</TreatWarningAsError>
+@@ -125,7 +125,7 @@
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>Kinect10.lib;XnLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+- <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64;</AdditionalLibraryDirectories>
++ <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_INSTALLED_DIR@\debug\lib</AdditionalLibraryDirectories>
+ <IgnoreSpecificDefaultLibraries>
+ </IgnoreSpecificDefaultLibraries>
+ <IgnoreAllDefaultLibraries>
+@@ -139,7 +139,7 @@
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+- <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc;</AdditionalIncludeDirectories>
++ <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_INSTALLED_DIR@\include</AdditionalIncludeDirectories>
+ <TreatWarningAsError>false</TreatWarningAsError>
+ </ClCompile>
+ <Link>
+@@ -147,7 +147,7 @@
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>Kinect10.lib;XnLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+- <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86;</AdditionalLibraryDirectories>
++ <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_INSTALLED_DIR@\lib</AdditionalLibraryDirectories>
+ <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
+ </Link>
+ </ItemDefinitionGroup>
+@@ -157,7 +157,7 @@
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+- <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc;</AdditionalIncludeDirectories>
++ <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_INSTALLED_DIR@\include</AdditionalIncludeDirectories>
+ <TreatWarningAsError>false</TreatWarningAsError>
+ </ClCompile>
+ <Link>
+@@ -165,7 +165,7 @@
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>Kinect10.lib;XnLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+- <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64;</AdditionalLibraryDirectories>
++ <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_INSTALLED_DIR@\lib</AdditionalLibraryDirectories>
+ <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
+ </Link>
+ </ItemDefinitionGroup>
diff --git a/ports/openni2/upgrade_projects.patch b/ports/openni2/upgrade_projects.patch
index 1a44381b0..86dee5794 100644
--- a/ports/openni2/upgrade_projects.patch
+++ b/ports/openni2/upgrade_projects.patch
@@ -837,7 +837,7 @@ index 56c5944..0401f3d 100644
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
diff --git a/Source/Drivers/Kinect/Kinect.vcxproj b/Source/Drivers/Kinect/Kinect.vcxproj
-index f54e8b2..7f54d04 100644
+index f54e8b2..6ea2656 100644
--- a/Source/Drivers/Kinect/Kinect.vcxproj
+++ b/Source/Drivers/Kinect/Kinect.vcxproj
@@ -2,4 +2,4 @@
@@ -895,6 +895,15 @@ index f54e8b2..7f54d04 100644
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
+@@ -125,7 +129,7 @@
+ </IgnoreSpecificDefaultLibraries>
+ <IgnoreAllDefaultLibraries>
+ </IgnoreAllDefaultLibraries>
+- <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
++ <TreatLinkerWarningAsErrors>false</TreatLinkerWarningAsErrors>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -135,7 +139,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL
index bb00f9cc3..f3f065c13 100644
--- a/ports/openssl/CONTROL
+++ b/ports/openssl/CONTROL
@@ -1,3 +1,3 @@
Source: openssl
-Version: 1.0.2l-1
+Version: 1.0.2l-3
Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.
diff --git a/ports/openssl/EmbedSymbolsInStaticLibsZ7.patch b/ports/openssl/EmbedSymbolsInStaticLibsZ7.patch
new file mode 100644
index 000000000..1a8de2c4b
--- /dev/null
+++ b/ports/openssl/EmbedSymbolsInStaticLibsZ7.patch
@@ -0,0 +1,25 @@
+diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl
+index dba96cb..5722f6e 100644
+--- a/util/pl/VC-32.pl
++++ b/util/pl/VC-32.pl
+@@ -154,9 +154,17 @@ else
+ $cflags=$opt_cflags.$base_cflags;
+ }
+
+-# generate symbols.pdb unconditionally
+-$app_cflag.=" /Zi /Fd\$(TMP_D)/app";
+-$lib_cflag.=" /Zi /Fd\$(TMP_D)/lib";
++# generate symbols.pdb when building dlls and embed symbols when building static libs
++if ($shlib)
++ {
++ $app_cflag.=" /Zi /Fd\$(TMP_D)/app.pdb";
++ $lib_cflag.=" /Zi /Fd\$(TMP_D)/lib.pdb";
++ }
++else
++ {
++ $app_cflag.=" /Z7";
++ $lib_cflag.=" /Z7";
++ }
+ $lflags.=" /debug";
+
+ $obj='.obj';
diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake
index 569de6c75..8ad0ff197 100644
--- a/ports/openssl/portfile.cmake
+++ b/ports/openssl/portfile.cmake
@@ -28,6 +28,7 @@ vcpkg_apply_patches(
PATCHES ${CMAKE_CURRENT_LIST_DIR}/PerlScriptSpaceInPathFixes.patch
${CMAKE_CURRENT_LIST_DIR}/ConfigureIncludeQuotesFix.patch
${CMAKE_CURRENT_LIST_DIR}/STRINGIFYPatch.patch
+ ${CMAKE_CURRENT_LIST_DIR}/EmbedSymbolsInStaticLibsZ7.patch
)
set(CONFIGURE_COMMAND ${PERL} Configure
@@ -126,11 +127,15 @@ message(STATUS "Build ${TARGET_TRIPLET}-dbg done")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE
${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe
- ${CURRENT_PACKAGES_DIR}/bin/openssl.exe
${CURRENT_PACKAGES_DIR}/debug/openssl.cnf
${CURRENT_PACKAGES_DIR}/openssl.cnf
)
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}/)
+file(RENAME ${CURRENT_PACKAGES_DIR}/bin/openssl.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/openssl.exe)
+
+vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
+
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
diff --git a/ports/opusfile/CONTROL b/ports/opusfile/CONTROL
index fd8a652c8..5489cb4b2 100644
--- a/ports/opusfile/CONTROL
+++ b/ports/opusfile/CONTROL
@@ -1,4 +1,4 @@
Source: opusfile
-Version: 0.9
+Version: 0.9-1
Description: Stand-alone decoder library for .opus streams
Build-Depends: libogg, opus, openssl
diff --git a/ports/osg/CONTROL b/ports/osg/CONTROL
index 867a8b4e0..df2af4bc1 100644
--- a/ports/osg/CONTROL
+++ b/ports/osg/CONTROL
@@ -1,4 +1,4 @@
Source: osg
-Version: 3.5.6
+Version: 3.5.6-1
Description: The OpenSceneGraph is an open source high performance 3D graphics toolkit.
Build-Depends: freetype, jasper, openexr, zlib, gdal, giflib, libjpeg-turbo, libpng, tiff
diff --git a/ports/paho-mqtt/CONTROL b/ports/paho-mqtt/CONTROL
index 7981a5195..cefd6bb87 100644
--- a/ports/paho-mqtt/CONTROL
+++ b/ports/paho-mqtt/CONTROL
@@ -1,4 +1,4 @@
Source: paho-mqtt
-Version: Version 1.1.0 (Paho 1.2)
+Version: 1.2.0-2
Description: Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things
Build-Depends: openssl
diff --git a/ports/paho-mqtt/disable_tests.patch b/ports/paho-mqtt/disable_tests.patch
new file mode 100644
index 000000000..ed9a644ff
--- /dev/null
+++ b/ports/paho-mqtt/disable_tests.patch
@@ -0,0 +1,16 @@
+diff --git "a/CMakeLists.txt" "b/CMakeLists.txt"
+index c041df0..2feb580 100644
+--- "a/CMakeLists.txt"
++++ "b/CMakeLists.txt"
+@@ -94,7 +94,10 @@ SET(CPACK_PACKAGE_VERSION_MINOR ${PAHO_VERSION_MINOR})
+ SET(CPACK_PACKAGE_VERSION_PATCH ${PAHO_VERSION_PATCH})
+ INCLUDE(CPack)
+
++if(BUILD_TESTS)
+ ENABLE_TESTING()
+
+ INCLUDE_DIRECTORIES(test src)
+ ADD_SUBDIRECTORY(test)
++
++endif()
+\ No newline at end of file
diff --git a/ports/paho-mqtt/portfile.cmake b/ports/paho-mqtt/portfile.cmake
index 5fc6341f8..27f9c8243 100644
--- a/ports/paho-mqtt/portfile.cmake
+++ b/ports/paho-mqtt/portfile.cmake
@@ -1,56 +1,83 @@
include(vcpkg_common_functions)
vcpkg_from_github(
- OUT_SOURCE_PATH SOURCE_PATH
- REPO eclipse/paho.mqtt.c
- REF v1.1.0
- SHA512 49eebf258e15076048103ff79442ad0d21164b83f713eee7f226998106b5931d310871d3b372322d5ef1cb2801219a6e626400b6fe4198814150a6277d6bfd74
- HEAD_REF master
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO eclipse/paho.mqtt.c
+ REF v1.2.0
+ SHA512 ffad01a8f9f41049dd008e163136e4ecb8c7c51f7b49917201593b0844b15a8d2a413ddec06fa5b2d77e432f0603b71664a23afbb7c215121cebd7d419ccacfa
+ HEAD_REF master
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PAHO_BUILD_STATIC)
+
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ "${CMAKE_CURRENT_LIST_DIR}/disable_tests.patch"
+ "${CMAKE_CURRENT_LIST_DIR}/remove_compiler_options.patch"
)
vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- OPTIONS -DPAHO_WITH_SSL=TRUE
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_STATIC=${PAHO_BUILD_STATIC}
)
vcpkg_build_cmake()
file(GLOB DLLS
- "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll"
- "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll"
- "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll"
+ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/*.dll"
+ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll"
+ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll"
)
file(GLOB LIBS
- "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib"
- "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib"
- "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib"
+ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/*.lib"
+ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib"
+ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib"
)
file(GLOB DEBUG_DLLS
- "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll"
- "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll"
- "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll"
+ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/*.dll"
+ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll"
+ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll"
)
file(GLOB DEBUG_LIBS
- "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib"
- "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib"
- "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib"
+ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/*.lib"
+ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib"
+ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib"
)
file(GLOB HEADERS "${SOURCE_PATH}/*/*.h")
if(DLLS)
- file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
+ file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
endif()
file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
if(DEBUG_DLLS)
- file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
-vcpkg_copy_pdbs()
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+ foreach(libname paho-mqtt3as-static paho-mqtt3cs-static paho-mqtt3a-static paho-mqtt3c-static)
+ foreach(foldername "lib" "debug/lib")
+ string(REPLACE "-static" "" outlibname ${libname})
+ file(RENAME ${CURRENT_PACKAGES_DIR}/${foldername}/${libname}.lib ${CURRENT_PACKAGES_DIR}/${foldername}/${outlibname}.lib)
+ endforeach()
+ endforeach()
+endif()
+foreach(libname paho-mqtt3a paho-mqtt3c)
+ foreach(root "${CURRENT_PACKAGES_DIR}" "${CURRENT_PACKAGES_DIR}/debug")
+ file(REMOVE
+ ${root}/lib/${libname}.lib
+ ${root}/bin/${libname}.dll
+ )
+ endforeach()
+endforeach()
-file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/paho-mqtt RENAME copyright)
+vcpkg_copy_pdbs()
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/paho-mqtt RENAME copyright)
diff --git a/ports/paho-mqtt/remove_compiler_options.patch b/ports/paho-mqtt/remove_compiler_options.patch
new file mode 100644
index 000000000..256d07a8f
--- /dev/null
+++ b/ports/paho-mqtt/remove_compiler_options.patch
@@ -0,0 +1,13 @@
+diff --git "a/CMakeLists.txt" "b/CMakeLists.txt"
+index 2feb580..796d08e 100644
+--- "a/CMakeLists.txt"
++++ "b/CMakeLists.txt"
+@@ -55,7 +55,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ ENDIF()
+
+ IF(WIN32)
+- ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -MD)
++ ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN)
+ ELSEIF(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
+ ADD_DEFINITIONS(-DOSX)
+ ENDIF()
diff --git a/ports/pango/CONTROL b/ports/pango/CONTROL
index 44c8c9b83..aa6c73e68 100644
--- a/ports/pango/CONTROL
+++ b/ports/pango/CONTROL
@@ -1,4 +1,4 @@
Source: pango
-Version: 1.40.11
+Version: 1.40.11-1
Description: Text and font handling library.
Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz
diff --git a/ports/pangolin/CONTROL b/ports/pangolin/CONTROL
index 5e110627b..a4d670b74 100644
--- a/ports/pangolin/CONTROL
+++ b/ports/pangolin/CONTROL
@@ -1,4 +1,4 @@
Source: pangolin
-Version: 0.5
-Build-Depends: eigen3
-Description: Lightweight GUI Library \ No newline at end of file
+Version: 0.5-2
+Build-Depends: eigen3, glew, libpng, libjpeg-turbo, ffmpeg
+Description: Lightweight GUI Library
diff --git a/ports/pangolin/portfile.cmake b/ports/pangolin/portfile.cmake
index d93f9d7cd..3fe7ef8b6 100644
--- a/ports/pangolin/portfile.cmake
+++ b/ports/pangolin/portfile.cmake
@@ -13,6 +13,9 @@ vcpkg_configure_cmake(
PREFER_NINJA
OPTIONS
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
+ -DBUILD_EXTERN_GLEW=OFF
+ -DBUILD_EXTERN_LIBPNG=OFF
+ -DBUILD_EXTERN_LIBJPEG=OFF
)
vcpkg_install_cmake()
@@ -21,24 +24,29 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Pangolin")
vcpkg_copy_pdbs()
-file(GLOB EXE ${CURRENT_PACKAGES_DIR}/lib/*.dll)
-file(COPY ${EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
-file(REMOVE ${EXE})
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ file(GLOB EXE ${CURRENT_PACKAGES_DIR}/lib/*.dll)
+ file(COPY ${EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE ${EXE})
-file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll)
-file(COPY ${DEBUG_EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
-file(REMOVE ${DEBUG_EXE})
+ file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll)
+ file(COPY ${DEBUG_EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(REMOVE ${DEBUG_EXE})
-file(READ ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-debug.cmake PANGOLIN_TARGETS)
-string(REPLACE "lib/pangolin.dll" "bin/pangolin.dll" PANGOLIN_TARGETS "${PANGOLIN_TARGETS}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-debug.cmake "${PANGOLIN_TARGETS}")
+ file(READ ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-debug.cmake PANGOLIN_TARGETS)
+ string(REPLACE "lib/pangolin.dll" "bin/pangolin.dll" PANGOLIN_TARGETS "${PANGOLIN_TARGETS}")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-debug.cmake "${PANGOLIN_TARGETS}")
-file(READ ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-release.cmake PANGOLIN_TARGETS)
-string(REPLACE "lib/pangolin.dll" "bin/pangolin.dll" PANGOLIN_TARGETS "${PANGOLIN_TARGETS}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-release.cmake "${PANGOLIN_TARGETS}")
+ file(READ ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-release.cmake PANGOLIN_TARGETS)
+ string(REPLACE "lib/pangolin.dll" "bin/pangolin.dll" PANGOLIN_TARGETS "${PANGOLIN_TARGETS}")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-release.cmake "${PANGOLIN_TARGETS}")
+endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+# Copy missing header file
+file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/include/pangolin/pangolin_export.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/pangolin)
+
# Put the license file where vcpkg expects it
file(COPY ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/Pangolin/)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/Pangolin/LICENCE ${CURRENT_PACKAGES_DIR}/share/Pangolin/copyright)
diff --git a/ports/parmetis/CONTROL b/ports/parmetis/CONTROL
index 86a367cbd..bb2237654 100644
--- a/ports/parmetis/CONTROL
+++ b/ports/parmetis/CONTROL
@@ -1,4 +1,4 @@
Source: parmetis
-Version: 4.0.3
+Version: 4.0.3-1
Description: Parallel Graph Partitioning and Fill-reducing Matrix Ordering
Build-Depends: metis, msmpi
diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL
index a92e912de..d8c38a363 100644
--- a/ports/pcl/CONTROL
+++ b/ports/pcl/CONTROL
@@ -1,4 +1,4 @@
Source: pcl
-Version: 1.8.1
-Build-Depends: boost, eigen3, flann, qhull, vtk, openni2, qt5
+Version: 1.8.1-2
+Build-Depends: boost, eigen3, flann, qhull, vtk, openni2, qt5, winpcap
Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing.
diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake
index 8010d9c70..cd5c5bedc 100644
--- a/ports/pcl/portfile.cmake
+++ b/ports/pcl/portfile.cmake
@@ -50,7 +50,7 @@ vcpkg_configure_cmake(
-DWITH_CUDA=OFF
-DWITH_LIBUSB=OFF
-DWITH_OPENNI2=ON
- -DWITH_PCAP=OFF
+ -DWITH_PCAP=ON
-DWITH_PNG=OFF
-DWITH_QHULL=ON
-DWITH_QT=ON
diff --git a/ports/pcre/CONTROL b/ports/pcre/CONTROL
index 6a321d5d0..b230a2909 100644
--- a/ports/pcre/CONTROL
+++ b/ports/pcre/CONTROL
@@ -1,3 +1,3 @@
Source: pcre
-Version: 8.41
+Version: 8.41-1
Description: Perl Compatible Regular Expresions
diff --git a/ports/pcre2/CONTROL b/ports/pcre2/CONTROL
index b25e10d49..06d683de4 100644
--- a/ports/pcre2/CONTROL
+++ b/ports/pcre2/CONTROL
@@ -1,3 +1,3 @@
Source: pcre2
-Version: 10.30
+Version: 10.30-1
Description: PCRE2 is a re-working of the original Perl Compatible Regular Expressions library
diff --git a/ports/physfs/CONTROL b/ports/physfs/CONTROL
index 5eac58c36..20d973f18 100644
--- a/ports/physfs/CONTROL
+++ b/ports/physfs/CONTROL
@@ -1,4 +1,4 @@
Source: physfs
-Version: 2.0.3-1
+Version: 2.0.3-2
Description: a library to provide abstract access to various archives
Build-Depends: zlib
diff --git a/ports/picosha2/CONTROL b/ports/picosha2/CONTROL
new file mode 100644
index 000000000..3aa5919a4
--- /dev/null
+++ b/ports/picosha2/CONTROL
@@ -0,0 +1,3 @@
+Source: picosha2
+Version: 2017-09-01-c5ff159b6
+Description: PicoSHA2 - a C++ SHA256 hash generator
diff --git a/ports/picosha2/portfile.cmake b/ports/picosha2/portfile.cmake
new file mode 100644
index 000000000..2ce820928
--- /dev/null
+++ b/ports/picosha2/portfile.cmake
@@ -0,0 +1,11 @@
+include(vcpkg_common_functions)
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO okdshin/PicoSHA2
+ REF c5ff159b60a7755f5601a18cf9c25388ad25e0ef
+ SHA512 8fa4045d73a921bbb9bf6de96e80272e1d54a52ddb8f7d05643785a3b582e8f7a069ccf901352af26db7788863717c0553f086f69578835d6a0512f0be04bae3
+ HEAD_REF master
+)
+
+file(INSTALL ${SOURCE_PATH}/picosha2.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/picosha2 RENAME copyright)
diff --git a/ports/piex/CMakeLists.txt b/ports/piex/CMakeLists.txt
new file mode 100644
index 000000000..35a881055
--- /dev/null
+++ b/ports/piex/CMakeLists.txt
@@ -0,0 +1,43 @@
+cmake_minimum_required(VERSION 3.8.0)
+project(piex)
+
+if(MSVC)
+ add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
+endif()
+
+include_directories(".")
+
+add_library(binary_parse
+ src/binary_parse/cached_paged_byte_array.cc
+ src/binary_parse/range_checked_byte_ptr.cc
+)
+
+add_library(image_type_recognition
+ src/image_type_recognition/image_type_recognition_lite.cc
+)
+
+target_link_libraries(image_type_recognition binary_parse)
+
+add_library(tiff_directory
+ src/tiff_directory/tiff_directory.cc
+)
+
+target_link_libraries(tiff_directory binary_parse)
+
+add_library(piex
+ src/piex.cc
+ src/tiff_parser.cc
+)
+
+target_link_libraries(piex tiff_directory image_type_recognition binary_parse)
+
+install(
+ TARGETS piex
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES src/piex.h src/piex_types.h DESTINATION include/src)
+endif()
diff --git a/ports/piex/CONTROL b/ports/piex/CONTROL
new file mode 100644
index 000000000..2311bbbaf
--- /dev/null
+++ b/ports/piex/CONTROL
@@ -0,0 +1,3 @@
+Source: piex
+Version: 2017-09-01-473434f2dd974978b-1
+Description: The Preview Image Extractor (PIEX) is designed to find and extract the largest
diff --git a/ports/piex/portfile.cmake b/ports/piex/portfile.cmake
new file mode 100644
index 000000000..2c99ad1c7
--- /dev/null
+++ b/ports/piex/portfile.cmake
@@ -0,0 +1,28 @@
+include(vcpkg_common_functions)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(WARNING "Dynamic not supported building static")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO google/piex
+ REF 473434f2dd974978b329faf5c87ae8aa09a2714d
+ SHA512 cb4a4107eb5e880673accac0f19965f3318e5e4c2fc24724afef5d15eab40d5866e17eb1a23af3b06b729d0e898ed99a6407d1f3000e94e3bbd71e1952d19627
+ HEAD_REF master
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG
+ -DDISABLE_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/piex RENAME copyright)
diff --git a/ports/pixman/CONTROL b/ports/pixman/CONTROL
index 3603242d0..940c30cc2 100644
--- a/ports/pixman/CONTROL
+++ b/ports/pixman/CONTROL
@@ -1,3 +1,3 @@
Source: pixman
-Version: 0.34.0-1
+Version: 0.34.0-2
Description: Pixman is a low-level software library for pixel manipulation, providing features such as image compositing and trapezoid rasterization.
diff --git a/ports/plibsys/CONTROL b/ports/plibsys/CONTROL
index 5f099fc51..92d57ca47 100644
--- a/ports/plibsys/CONTROL
+++ b/ports/plibsys/CONTROL
@@ -1,3 +1,3 @@
Source: plibsys
-Version: 0.0.3
+Version: 0.0.3-1
Description: Highly portable C system library: threads and synchronization, sockets, IPC, data structures and more.
diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL
index 2762c6248..2c78b6c6e 100644
--- a/ports/poco/CONTROL
+++ b/ports/poco/CONTROL
@@ -1,4 +1,4 @@
Source: poco
-Version: 1.7.8
+Version: 1.7.8-1
Build-Depends: zlib, pcre, sqlite3, expat
Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems.
diff --git a/ports/podofo/CONTROL b/ports/podofo/CONTROL
index dfb5446d1..55fa20a28 100644
--- a/ports/podofo/CONTROL
+++ b/ports/podofo/CONTROL
@@ -1,4 +1,4 @@
Source: podofo
-Version: 0.9.5
+Version: 0.9.5-1
Description: PoDoFo is a library to work with the PDF file format
-Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openssl, freetype, fontconfig \ No newline at end of file
+Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openssl, freetype, fontconfig
diff --git a/ports/portaudio/CONTROL b/ports/portaudio/CONTROL
index 5e5ffc57c..829a87026 100644
--- a/ports/portaudio/CONTROL
+++ b/ports/portaudio/CONTROL
@@ -1,3 +1,3 @@
Source: portaudio
-Version: 19.0.6.00-1
+Version: 19.0.6.00-2
Description: PortAudio Portable Cross-platform Audio I/O API PortAudio is a free, cross-platform, open-source, audio I/O library. It lets you write simple audio programs in 'C' or C++ that will compile and run on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA). It is intended to promote the exchange of audio software between developers on different platforms. Many applications use PortAudio for Audio I/O.
diff --git a/ports/pqp/CONTROL b/ports/pqp/CONTROL
index 8b9882631..69a72c33e 100644
--- a/ports/pqp/CONTROL
+++ b/ports/pqp/CONTROL
@@ -1,3 +1,3 @@
Source: pqp
-Version: 1.3-1
+Version: 1.3-2
Description: a proximity query package
diff --git a/ports/proj/CONTROL b/ports/proj/CONTROL
index b706ca11a..d6c204fda 100644
--- a/ports/proj/CONTROL
+++ b/ports/proj/CONTROL
@@ -1,3 +1,4 @@
Source: proj
-Version: 4.9.3
-Description: PROJ.4 library for cartographic projections
+Version: 0
+Description: a stub package that pulls in proj4. Do not depend on this package.
+Build-Depends: proj4
diff --git a/ports/proj/portfile.cmake b/ports/proj/portfile.cmake
index 6007ab62a..cc6e26fcb 100644
--- a/ports/proj/portfile.cmake
+++ b/ports/proj/portfile.cmake
@@ -1,57 +1 @@
-include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/proj-4.9.3)
-vcpkg_download_distfile(ARCHIVE
- URLS "http://download.osgeo.org/proj/proj-4.9.3.zip"
- FILENAME "proj-4.9.3.zip"
- SHA512 c9703008cd1f75fe1239b180158e560b9b88ae2ffd900b72923c716908eb86d1abbc4230647af5e3131f8c34481bdc66b03826d669620161ffcfbe67801cb631
-)
-vcpkg_extract_source_archive(${ARCHIVE})
-
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}/
- PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/0001-CMake-add-detection-of-recent-visual-studio-versions.patch
- ${CMAKE_CURRENT_LIST_DIR}/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch
- ${CMAKE_CURRENT_LIST_DIR}/0003-CMake-configurable-cmake-config-install-location.patch
-)
-
-if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- list(APPEND CMAKE_OPTIONS "-DBUILD_LIBPROJ_SHARED=YES")
-else()
- list(APPEND CMAKE_OPTIONS "-DBUILD_LIBPROJ_SHARED=NO")
-endif()
-
-vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- OPTIONS ${CMAKE_OPTIONS}
- -DPROJ_LIB_SUBDIR=lib
- -DPROJ_INCLUDE_SUBDIR=include
- -DPROJ_DATA_SUBDIR=share/proj
- -DPROJ_CMAKE_CONFIG_SUBDIR=share/proj
- -DBUILD_CS2CS=NO
- -DBUILD_PROJ=NO
- -DBUILD_GEOD=NO
- -DBUILD_NAD2BIN=NO
- -DPROJ4_TESTS=NO
-)
-
-vcpkg_install_cmake()
-
-
-# Rename library and adapt cmake configuration
-# N.B. debug cmake export is not copied, as it's not relocatable
-file(READ ${CURRENT_PACKAGES_DIR}/share/proj/proj4-targets-release.cmake PROJ4_TARGETS_RELEASE)
-string(REPLACE "proj_4_9.lib" "proj.lib" PROJ4_TARGETS_RELEASE ${PROJ4_TARGETS_RELEASE})
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj/proj4-targets-release.cmake ${PROJ4_TARGETS_RELEASE})
-
-file(RENAME ${CURRENT_PACKAGES_DIR}/lib/proj_4_9.lib ${CURRENT_PACKAGES_DIR}/lib/proj.lib)
-file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/proj_4_9_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/projd.lib)
-
-# Remove duplicate headers installed from debug build
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-# Remove data installed from debug build
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
-
-# Handle copyright
-file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/proj)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/proj/COPYING ${CURRENT_PACKAGES_DIR}/share/proj/copyright)
+SET(VCPKG_POLICY_EMPTY_PACKAGE enabled)
diff --git a/ports/proj/0001-CMake-add-detection-of-recent-visual-studio-versions.patch b/ports/proj4/0001-CMake-add-detection-of-recent-visual-studio-versions.patch
index 9be5438aa..9be5438aa 100644
--- a/ports/proj/0001-CMake-add-detection-of-recent-visual-studio-versions.patch
+++ b/ports/proj4/0001-CMake-add-detection-of-recent-visual-studio-versions.patch
diff --git a/ports/proj/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch b/ports/proj4/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch
index 2c470570e..2c470570e 100644
--- a/ports/proj/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch
+++ b/ports/proj4/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch
diff --git a/ports/proj/0003-CMake-configurable-cmake-config-install-location.patch b/ports/proj4/0003-CMake-configurable-cmake-config-install-location.patch
index 5870e12ea..5870e12ea 100644
--- a/ports/proj/0003-CMake-configurable-cmake-config-install-location.patch
+++ b/ports/proj4/0003-CMake-configurable-cmake-config-install-location.patch
diff --git a/ports/proj4/CONTROL b/ports/proj4/CONTROL
new file mode 100644
index 000000000..cf2519b12
--- /dev/null
+++ b/ports/proj4/CONTROL
@@ -0,0 +1,3 @@
+Source: proj4
+Version: 4.9.3-1
+Description: PROJ.4 library for cartographic projections
diff --git a/ports/proj4/portfile.cmake b/ports/proj4/portfile.cmake
new file mode 100644
index 000000000..626d6b2e4
--- /dev/null
+++ b/ports/proj4/portfile.cmake
@@ -0,0 +1,68 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/proj-4.9.3)
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://download.osgeo.org/proj/proj-4.9.3.zip"
+ FILENAME "proj-4.9.3.zip"
+ SHA512 c9703008cd1f75fe1239b180158e560b9b88ae2ffd900b72923c716908eb86d1abbc4230647af5e3131f8c34481bdc66b03826d669620161ffcfbe67801cb631
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}/
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/0001-CMake-add-detection-of-recent-visual-studio-versions.patch
+ ${CMAKE_CURRENT_LIST_DIR}/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch
+ ${CMAKE_CURRENT_LIST_DIR}/0003-CMake-configurable-cmake-config-install-location.patch
+)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ list(APPEND CMAKE_OPTIONS "-DBUILD_LIBPROJ_SHARED=YES")
+else()
+ list(APPEND CMAKE_OPTIONS "-DBUILD_LIBPROJ_SHARED=NO")
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS ${CMAKE_OPTIONS}
+ -DPROJ_LIB_SUBDIR=lib
+ -DPROJ_INCLUDE_SUBDIR=include
+ -DPROJ_DATA_SUBDIR=share/proj4
+ -DPROJ_CMAKE_CONFIG_SUBDIR=share/proj4
+ -DBUILD_CS2CS=NO
+ -DBUILD_PROJ=NO
+ -DBUILD_GEOD=NO
+ -DBUILD_NAD2BIN=NO
+ -DPROJ4_TESTS=NO
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/proj4)
+
+# Rename library and adapt cmake configuration
+file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake _contents)
+string(REPLACE "proj_4_9.lib" "proj.lib" _contents "${_contents}")
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake "${_contents}")
+
+file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake _contents)
+string(REPLACE "proj_4_9_d.lib" "projd.lib" _contents "${_contents}")
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake "${_contents}")
+
+file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets.cmake _contents)
+string(REPLACE "set(_IMPORT_PREFIX \"${CURRENT_PACKAGES_DIR}\")"
+ "set(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}\")\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)"
+ _contents "${_contents}"
+)
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets.cmake "${_contents}")
+
+file(RENAME ${CURRENT_PACKAGES_DIR}/lib/proj_4_9.lib ${CURRENT_PACKAGES_DIR}/lib/proj.lib)
+file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/proj_4_9_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/projd.lib)
+
+# Remove duplicate headers installed from debug build
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+# Remove data installed from debug build
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/proj4)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/proj4/COPYING ${CURRENT_PACKAGES_DIR}/share/proj4/copyright)
diff --git a/ports/protobuf/0001-fix-missing-export.patch b/ports/protobuf/0001-fix-missing-export.patch
deleted file mode 100644
index c7d5ff6c8..000000000
--- a/ports/protobuf/0001-fix-missing-export.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/google/protobuf/generated_message_util.h b/src/google/protobuf/generated_message_util.h
-index 4417446..a7154b4 100644
---- a/src/google/protobuf/generated_message_util.h
-+++ b/src/google/protobuf/generated_message_util.h
-@@ -164,7 +164,7 @@ class ExplicitlyConstructed {
-
- // Default empty string object. Don't use this directly. Instead, call
- // GetEmptyString() to get the reference.
--extern ExplicitlyConstructed< ::std::string> fixed_address_empty_string;
-+LIBPROTOBUF_EXPORT extern ExplicitlyConstructed< ::std::string> fixed_address_empty_string;
- LIBPROTOBUF_EXPORT extern ProtobufOnceType empty_string_once_init_;
- LIBPROTOBUF_EXPORT void InitEmptyString();
-
diff --git a/ports/protobuf/001-add-compiler-flag.patch b/ports/protobuf/001-add-compiler-flag.patch
index aec510f44..ad545cad3 100644
--- a/ports/protobuf/001-add-compiler-flag.patch
+++ b/ports/protobuf/001-add-compiler-flag.patch
@@ -1,14 +1,13 @@
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
-index 7618ba21..bd92b09d 100644
+index 7618ba2..d282a60 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
-@@ -165,8 +165,11 @@ endif (protobuf_UNICODE)
+@@ -165,8 +165,10 @@ endif (protobuf_UNICODE)
include(libprotobuf-lite.cmake)
include(libprotobuf.cmake)
-include(libprotoc.cmake)
-include(protoc.cmake)
-+
+if(protobuf_BUILD_COMPILER)
+ include(libprotoc.cmake)
+ include(protoc.cmake)
@@ -16,11 +15,12 @@ index 7618ba21..bd92b09d 100644
if (protobuf_BUILD_TESTS)
include(tests.cmake)
+
diff --git a/cmake/install.cmake b/cmake/install.cmake
-index 28dc90dc..52c1f721 100644
+index 441bf55..20b3aa0 100644
--- a/cmake/install.cmake
+++ b/cmake/install.cmake
-@@ -1,9 +1,12 @@
+@@ -1,14 +1,17 @@
include(GNUInstallDirs)
+set(LIBRARIES_TO_SET_DEST libprotobuf-lite libprotobuf)
@@ -28,6 +28,11 @@ index 28dc90dc..52c1f721 100644
+ list(APPEND LIBRARIES_TO_SET_DEST libprotoc)
+endif()
+
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf.pc.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc @ONLY)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf-lite.pc.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc @ONLY)
+
foreach(_library
- libprotobuf-lite
- libprotobuf
@@ -36,7 +41,7 @@ index 28dc90dc..52c1f721 100644
set_property(TARGET ${_library}
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${protobuf_source_dir}/src>
-@@ -14,8 +17,10 @@ foreach(_library
+@@ -19,8 +22,10 @@ foreach(_library
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library})
endforeach()
@@ -47,9 +52,9 @@ index 28dc90dc..52c1f721 100644
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
+endif()
- file(STRINGS extract_includes.bat.in _extract_strings
- REGEX "^copy")
-@@ -94,7 +99,12 @@ configure_file(protobuf-options.cmake
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
+
+@@ -101,7 +106,12 @@ configure_file(protobuf-options.cmake
${CMAKE_INSTALL_CMAKEDIR}/protobuf-options.cmake @ONLY)
# Allows the build directory to be used as a find directory.
diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL
index 192b57f96..b9d8b5b9e 100644
--- a/ports/protobuf/CONTROL
+++ b/ports/protobuf/CONTROL
@@ -1,4 +1,4 @@
Source: protobuf
-Version: 3.3.0-3
+Version: 3.4.1-1
Build-Depends: zlib
-Description: Protocol Buffers - Google's data interchange format \ No newline at end of file
+Description: Protocol Buffers - Google's data interchange format
diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake
index fa81e0542..e7f45c36c 100644
--- a/ports/protobuf/portfile.cmake
+++ b/ports/protobuf/portfile.cmake
@@ -1,16 +1,17 @@
include(vcpkg_common_functions)
-set(PROTOBUF_VERSION 3.3.0)
+set(PROTOBUF_VERSION 3.4.1)
+set(PROTOC_VERSION 3.4.0)
vcpkg_download_distfile(ARCHIVE_FILE
URLS "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-cpp-${PROTOBUF_VERSION}.tar.gz"
FILENAME "protobuf-cpp-${PROTOBUF_VERSION}.tar.gz"
- SHA512 ef01300bdda4a1a33a6056aea1d55e9d66ab1ca644aa2d9d5633cfc0bccfe4c24fdfa1015889b2c1c568e89ad053c701de1aca45196a6439130b7bb8f461595f
+ SHA512 6189e23c7e381f62e971bd0e35ad9c3ed8effe584755357013887c6a582cb5a9a654c39affa2a073b658854138f31bfb70f89fa1df494e9386f1d64fd73d07d2
)
vcpkg_download_distfile(TOOL_ARCHIVE_FILE
- URLS "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-win32.zip"
- FILENAME "protoc-${PROTOBUF_VERSION}-win32.zip"
- SHA512 9b4902b3187fb978a8153aaf050314a3ca9ca161b0712a3672ccdfabb7f5a57035e71c2dfde9a0b99f9417e159dcbdedaf9a2b1917d712dc3d9d554bba0d4ee8
+ URLS "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-win32.zip"
+ FILENAME "protoc-${PROTOC_VERSION}-win32.zip"
+ SHA512 b874c3f47b39ac78f5675e05220318683004a365c248bf47ba50d8c66c8ed7763432451bab30524e131e1185a2bdaa6e6071b389eb61ad58b1b95974cf39d41b
)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION})
@@ -18,13 +19,10 @@ set(TOOL_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}-win32)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
-# Patch to fix the missing export of fixed_address_empty_string,
-# see https://github.com/google/protobuf/pull/3216
# Add a flag that can be set to disable the protobuf compiler
vcpkg_apply_patches(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}
- PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-missing-export.patch"
- "${CMAKE_CURRENT_LIST_DIR}/001-add-compiler-flag.patch"
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/001-add-compiler-flag.patch"
)
@@ -60,8 +58,7 @@ vcpkg_configure_cmake(
-DCMAKE_INSTALL_CMAKEDIR=share/protobuf
)
-# Using 64-bit toolset to avoid occassional Linker Out-of-Memory issues.
-vcpkg_install_cmake(MSVC_64_TOOLSET)
+vcpkg_install_cmake()
# It appears that at this point the build hasn't actually finished. There is probably
# a process spawned by the build, therefore we need to wait a bit.
@@ -95,15 +92,11 @@ else()
protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin/protoc.exe)
endif()
-foreach(FILE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/arena.h ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/port.h)
- file(READ ${FILE} _contents)
- if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- string(REPLACE "defined(PROTOBUF_USE_DLLS)" "1" _contents "${_contents}")
- else()
- string(REPLACE "defined(PROTOBUF_USE_DLLS)" "0" _contents "${_contents}")
- endif()
- file(WRITE ${FILE} "${_contents}")
-endforeach()
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(READ ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h _contents)
+ string(REPLACE "\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" "\#define PROTOBUF_USE_DLLS\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" _contents "${_contents}")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h "${_contents}")
+endif()
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/protobuf RENAME copyright)
file(INSTALL ${TOOL_PATH}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
diff --git a/ports/ptex/CONTROL b/ports/ptex/CONTROL
index b2e6bff27..e41db7678 100644
--- a/ports/ptex/CONTROL
+++ b/ports/ptex/CONTROL
@@ -1,4 +1,4 @@
Source: ptex
-Version: 2.1.28
+Version: 2.1.28-1
Description: Per-Face Texture Mapping for Production Rendering.
Build-Depends: zlib
diff --git a/ports/pthreads/CONTROL b/ports/pthreads/CONTROL
index 81b97f70b..ee9b7b5fa 100644
--- a/ports/pthreads/CONTROL
+++ b/ports/pthreads/CONTROL
@@ -1,3 +1,3 @@
Source: pthreads
-Version: 2.9.1
+Version: 2.9.1-1
Description: pthreads for windows
diff --git a/ports/pugixml/CONTROL b/ports/pugixml/CONTROL
index 298d433b2..5fc5f1e4e 100644
--- a/ports/pugixml/CONTROL
+++ b/ports/pugixml/CONTROL
@@ -1,3 +1,3 @@
Source: pugixml
-Version: 1.8.1
+Version: 1.8.1-1
Description: C++ XML processing library
diff --git a/ports/pybind11/CONTROL b/ports/pybind11/CONTROL
index e5ca37eb4..94ed66368 100644
--- a/ports/pybind11/CONTROL
+++ b/ports/pybind11/CONTROL
@@ -1,4 +1,4 @@
Source: pybind11
-Version: 2.1.0-1
+Version: 2.2.0
Description: pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code.
-Build-Depends: python3 \ No newline at end of file
+Build-Depends: python3
diff --git a/ports/pybind11/portfile.cmake b/ports/pybind11/portfile.cmake
index 668edb5d9..3e5802059 100644
--- a/ports/pybind11/portfile.cmake
+++ b/ports/pybind11/portfile.cmake
@@ -3,8 +3,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO pybind/pybind11
- REF v2.1.0
- SHA512 2f74dcd2b82d8e41da7db36351284fe04511038bec66bdde820da9c0fce92f6d2c5aeb2e48264058a91a775a1a6a99bc757d26ebf001de3df4183d700d46efa1
+ REF v2.2.0
+ SHA512 65d8c2c9ba77b25577dd330356ef9cc8f9af924b1d578c28176f230c6f6a88cfd335cc01cc5e010bb8e641a000a78cfcaa1a1367b438e7c6e0d40ea511494a5a
HEAD_REF master
)
diff --git a/ports/pystring/CONTROL b/ports/pystring/CONTROL
index 23980ef12..6b4f14035 100644
--- a/ports/pystring/CONTROL
+++ b/ports/pystring/CONTROL
@@ -1,3 +1,3 @@
Source: pystring
-Version: 1.1.3
+Version: 1.1.3-1
Description: Pystring is a collection of C++ functions which match the interface and behavior of python's string class methods using std::string
diff --git a/ports/qca/CONTROL b/ports/qca/CONTROL
index cbe923bb4..7d757297c 100644
--- a/ports/qca/CONTROL
+++ b/ports/qca/CONTROL
@@ -1,4 +1,4 @@
Source: qca
-Version: 2.2.0
+Version: 2.2.0-1
Description: Qt Cryptographic Architecture (QCA). Sources: https://cgit.kde.org/qca.git/
Build-Depends: qt5
diff --git a/ports/qhull/CONTROL b/ports/qhull/CONTROL
index a36061285..ff0847781 100644
--- a/ports/qhull/CONTROL
+++ b/ports/qhull/CONTROL
@@ -1,3 +1,3 @@
Source: qhull
-Version: 2015.2
+Version: 2015.2-1
Description: computes the convex hull, Delaunay triangulation, Voronoi diagram
diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL
index 01c7a3a19..ce46d249b 100644
--- a/ports/qt5/CONTROL
+++ b/ports/qt5/CONTROL
@@ -1,4 +1,4 @@
Source: qt5
-Version: 5.8-4
+Version: 5.8-6
Description: Qt5 application framework main components. Webengine, examples and tests not included.
Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre, harfbuzz, sqlite3, libpq, double-conversion
diff --git a/ports/qt5/fixcmake.py b/ports/qt5/fixcmake.py
index 93a535fa2..b081af58e 100644
--- a/ports/qt5/fixcmake.py
+++ b/ports/qt5/fixcmake.py
@@ -18,6 +18,10 @@ for f in files:
builder += "\n " + line.replace("/bin/", "/debug/bin/")
builder += " endif()\n"
elif "_install_prefix}/lib/${LIB_LOCATION}" in line:
+ # Qt5AxServer(d).lib has been moved to manual-link:
+ if '_qt5AxServer_install_prefix' in line:
+ line = line.replace('/lib/', '/lib/manual-link/')
+
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
builder += "\n " + line
builder += " else()"
@@ -30,7 +34,8 @@ for f in files:
builder += "\n " + line.replace("/lib/", "/debug/lib/")
builder += " endif()\n"
elif "_install_prefix}/lib/qtmaind.lib" in line:
- builder += line.replace("/lib/", "/debug/lib/")
+ # qtmaind.lib has been moved to manual-link:
+ builder += line.replace("/lib/", "/debug/lib/manual-link/")
elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line:
builder += " if (${Configuration} STREQUAL \"RELEASE\")"
builder += "\n " + line
@@ -38,8 +43,9 @@ for f in files:
builder += "\n " + line.replace("/plugins/", "/debug/plugins/")
builder += " endif()\n"
elif "_install_prefix}/lib/qtmain.lib" in line:
- builder += line
- builder += " set(imported_location_debug \"${_qt5Core_install_prefix}/debug/lib/qtmaind.lib\")\n"
+ # qtmain(d).lib has been moved to manual-link:
+ builder += line.replace("/lib/", "/lib/manual-link/")
+ builder += " set(imported_location_debug \"${_qt5Core_install_prefix}/debug/lib/manual-link/qtmaind.lib\")\n"
builder += "\n"
builder += " set_target_properties(Qt5::WinMain PROPERTIES\n"
builder += " IMPORTED_LOCATION_DEBUG ${imported_location_debug}\n"
diff --git a/ports/qt5/portfile.cmake b/ports/qt5/portfile.cmake
index 33709c528..4b852e95c 100644
--- a/ports/qt5/portfile.cmake
+++ b/ports/qt5/portfile.cmake
@@ -89,6 +89,55 @@ vcpkg_execute_required_process(
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
+
+#---------------------------------------------------------------------------
+# Qt5Bootstrap: a release-only dependency
+#---------------------------------------------------------------------------
+# Remove release-only Qt5Bootstrap.lib from debug folders:
+#file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib)
+#file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl)
+# Above approach does not work:
+# check_matching_debug_and_release_binaries(dbg_libs, rel_libs)
+# requires the two sets to be of equal size!
+# Alt. approach, create dummy folder instead:
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use)
+file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use)
+file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl)
+#---------------------------------------------------------------------------
+
+#---------------------------------------------------------------------------
+# qtmain(d) vs. Qt5AxServer(d)
+#---------------------------------------------------------------------------
+# Qt applications have to either link to qtmain(d) or to Qt5AxServer(d),
+# never both. See http://doc.qt.io/qt-5/activeqt-server.html for more info.
+#
+# Create manual-link folders:
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link)
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
+#
+# Either have users explicitly link against qtmain.lib, qtmaind.lib:
+file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link)
+file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl)
+file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
+file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl)
+#
+# ... or have users explicitly link against Qt5AxServer.lib, Qt5AxServerd.lib:
+file(COPY ${CURRENT_PACKAGES_DIR}/lib/Qt5AxServer.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link)
+file(COPY ${CURRENT_PACKAGES_DIR}/lib/Qt5AxServer.prl DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/Qt5AxServer.lib)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/Qt5AxServer.prl)
+file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5AxServerd.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
+file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5AxServerd.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5AxServerd.lib)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5AxServerd.prl)
+#---------------------------------------------------------------------------
+
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5 RENAME copyright)
if(EXISTS ${CURRENT_PACKAGES_DIR}/plugins)
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/plugins)
diff --git a/ports/ragel/CONTROL b/ports/ragel/CONTROL
index bb83fa72f..bb6595ac5 100644
--- a/ports/ragel/CONTROL
+++ b/ports/ragel/CONTROL
@@ -1,3 +1,3 @@
Source: ragel
-Version: 6.10
+Version: 6.10-1
Description: Ragel State Machine Compiler
diff --git a/ports/readosm/CONTROL b/ports/readosm/CONTROL
new file mode 100644
index 000000000..bc2853daf
--- /dev/null
+++ b/ports/readosm/CONTROL
@@ -0,0 +1,4 @@
+Source: readosm
+Version: 1.1.0
+Description: ReadOSM is an open source library to extract valid data from within an Open Street Map input file (.osm or .osm.pbf)
+Build-Depends: expat, zlib
diff --git a/ports/readosm/fix-makefiles.patch b/ports/readosm/fix-makefiles.patch
new file mode 100644
index 000000000..3904b5136
--- /dev/null
+++ b/ports/readosm/fix-makefiles.patch
@@ -0,0 +1,49 @@
+diff --git a/makefile.vc b/makefile.vc
+index 791aedf..d294548 100644
+--- a/makefile.vc
++++ b/makefile.vc
+@@ -8,7 +8,7 @@ LIBOBJ = src\readosm.obj src\osmxml.obj \
+ src\protobuf.obj src\osm_objects.obj
+ READOSM_DLL = readosm$(VERSION).dll
+
+-CFLAGS = /nologo -IC:\OSGeo4W\include -Iheaders $(OPTFLAGS)
++CFLAGS = /nologo -I$(INSTALLED_ROOT)\include -Iheaders $(OPTFLAGS)
+
+ default: all
+
+@@ -21,9 +21,9 @@ readosm.lib: $(LIBOBJ)
+ $(READOSM_DLL): readosm_i.lib
+
+ readosm_i.lib: $(LIBOBJ)
+- link /debug /dll /out:$(READOSM_DLL) \
++ link $(LINK_FLAGS) /dll /out:$(READOSM_DLL) \
+ /implib:readosm_i.lib $(LIBOBJ) \
+- C:\OSGeo4w\lib\libexpat.lib C:\OSGeo4w\lib\zlib.lib
++ $(LIBS_ALL)
+ if exist $(READOSM_DLL).manifest mt -manifest \
+ $(READOSM_DLL).manifest -outputresource:$(READOSM_DLL);2
+
+@@ -35,7 +35,7 @@ clean:
+ del *.exp
+ del *.manifest
+ del *.lib
+- del *.obj
++ del src\*.obj
+ del *.pdb
+
+ install: all
+diff --git a/nmake.opt b/nmake.opt
+index 5e45c0e..61c44f9 100644
+--- a/nmake.opt
++++ b/nmake.opt
+@@ -1,8 +1,8 @@
+ # Directory tree where ReadOSM will be installed.
+-INSTDIR=C:\OSGeo4W
++INSTDIR=$(INST_DIR)
+
+ # Uncomment the first for an optimized build, or the second for debug.
+-OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \
++OPTFLAGS= /nologo /fp:precise /W3 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \
+ /DDLL_EXPORT
+ #OPTFLAGS= /nologo /Zi /MD /Fdreadosm.pdb /DDLL_EXPORT
+
diff --git a/ports/readosm/fix-version-macro.patch b/ports/readosm/fix-version-macro.patch
new file mode 100644
index 000000000..b091b3359
--- /dev/null
+++ b/ports/readosm/fix-version-macro.patch
@@ -0,0 +1,13 @@
+diff --git a/src/readosm.c b/src/readosm.c
+index e1dda27..7977339 100644
+--- a/src/readosm.c
++++ b/src/readosm.c
+@@ -50,7 +50,7 @@
+
+ #if defined(_WIN32) && !defined(__MINGW32__)
+ /* MSVC: avoiding to include at all config.h */
+-#define VERSION 1.1.0
++#define VERSION "1.1.0"
+ #else
+ #include "config.h"
+ #endif
diff --git a/ports/readosm/portfile.cmake b/ports/readosm/portfile.cmake
new file mode 100644
index 000000000..40af755eb
--- /dev/null
+++ b/ports/readosm/portfile.cmake
@@ -0,0 +1,78 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/readosm-1.1.0)
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://www.gaia-gis.it/gaia-sins/readosm-1.1.0.tar.gz"
+ FILENAME "readosm-1.1.0.tar.gz"
+ SHA512 d3581f564c4461c6a1a3d5fd7d18a262c884b2ac935530064bfaebd6c05d692fb92cc600fb40e87e03f7160ebf0eeeb05f51a0e257935d056b233fe28fc01a11
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/fix-makefiles.patch
+ ${CMAKE_CURRENT_LIST_DIR}/fix-version-macro.patch
+)
+
+find_program(NMAKE nmake)
+
+set(LIBS_ALL_DBG "\"${CURRENT_INSTALLED_DIR}/debug/lib/expat.lib\" \"${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib\"")
+set(LIBS_ALL_REL "\"${CURRENT_INSTALLED_DIR}/lib/expat.lib\" \"${CURRENT_INSTALLED_DIR}/lib/zlib.lib\"")
+
+if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
+ set(CL_FLAGS_DBG "/MDd /Zi")
+ set(CL_FLAGS_REL "/MD /Ox")
+else()
+ set(CL_FLAGS_DBG "/MTd /Zi")
+ set(CL_FLAGS_REL "/MT /Ox")
+endif()
+
+################
+# Debug build
+################
+message(STATUS "Building ${TARGET_TRIPLET}-dbg")
+
+file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG)
+
+vcpkg_execute_required_process(
+ COMMAND ${NMAKE} -f makefile.vc clean install
+ INST_DIR="${INST_DIR_DBG}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}"
+ "LIBS_ALL=${LIBS_ALL_DBG}"
+ WORKING_DIRECTORY ${SOURCE_PATH}
+ LOGNAME nmake-build-${TARGET_TRIPLET}-debug
+)
+vcpkg_copy_pdbs()
+message(STATUS "Building ${TARGET_TRIPLET}-dbg done")
+
+################
+# Release build
+################
+message(STATUS "Building ${TARGET_TRIPLET}-rel")
+
+file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL)
+vcpkg_execute_required_process(
+ COMMAND ${NMAKE} -f makefile.vc clean install
+ INST_DIR="${INST_DIR_REL}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=" "CL_FLAGS=${CL_FLAGS_REL}"
+ "LIBS_ALL=${LIBS_ALL_REL}"
+ WORKING_DIRECTORY ${SOURCE_PATH}
+ LOGNAME nmake-build-${TARGET_TRIPLET}-release
+)
+message(STATUS "Building ${TARGET_TRIPLET}-rel done")
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/readosm RENAME copyright)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/readosm_i.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/readosm_i.lib)
+else()
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/readosm.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/readosm.lib)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/readosm_i.lib ${CURRENT_PACKAGES_DIR}/lib/readosm.lib)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/readosm_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/readosm.lib)
+endif()
+
+
+message(STATUS "Packaging ${TARGET_TRIPLET} done")
diff --git a/ports/rhash/CONTROL b/ports/rhash/CONTROL
index cfa5c6cb0..16b50c945 100644
--- a/ports/rhash/CONTROL
+++ b/ports/rhash/CONTROL
@@ -1,3 +1,3 @@
Source: rhash
-Version: 1.3.5
+Version: 1.3.5-1
Description: C library for computing a wide variety of hash sums
diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL
index 2efbda7c3..59850ff03 100644
--- a/ports/rocksdb/CONTROL
+++ b/ports/rocksdb/CONTROL
@@ -1,4 +1,4 @@
Source: rocksdb
-Version: 2017-06-28-18c63af6ef2b9f014c404b88488ae52e6fead03c
+Version: 2017-06-28-18c63af6ef2b9f014c404b88488ae52e6fead03c-1
Description: A library that provides an embeddable, persistent key-value store for fast storage
Build-Depends: snappy, lz4, gflags, zlib, gtest
diff --git a/ports/rtmidi/CONTROL b/ports/rtmidi/CONTROL
index 9057812a0..9eaad9735 100644
--- a/ports/rtmidi/CONTROL
+++ b/ports/rtmidi/CONTROL
@@ -1,3 +1,3 @@
Source: rtmidi
-Version: 2.1.1-1
+Version: 2.1.1-2
Description: A set of C++ classes that provide a common API for realtime MIDI input/output across Linux (ALSA & JACK), Macintosh OS X (CoreMidi & JACK) and Windows (Multimedia)
diff --git a/ports/rttr/CONTROL b/ports/rttr/CONTROL
index 950247999..e7ed99b8c 100644
--- a/ports/rttr/CONTROL
+++ b/ports/rttr/CONTROL
@@ -1,3 +1,3 @@
Source: rttr
-Version: 0.9.5
+Version: 0.9.5-1
Description: an easy and intuitive way to use reflection in C++
diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL
index c41495b51..5583c626d 100644
--- a/ports/sciter/CONTROL
+++ b/ports/sciter/CONTROL
@@ -1,4 +1,4 @@
Source: sciter
-Version: 4.0.2-1
+Version: 4.0.4
Description: Sciter is an embeddable HTML/CSS/scripting engine.
Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com
diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake
index c5cfad6ea..ac3020144 100644
--- a/ports/sciter/portfile.cmake
+++ b/ports/sciter/portfile.cmake
@@ -12,9 +12,9 @@ include(vcpkg_common_functions)
# header-only library
set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled)
-set(SCITER_VERSION 4.0.2-1)
-set(SCITER_REVISION 2d1de5b6d9da55b50168cb9069c8b12490f39d60)
-set(SCITER_SHA 3d33bd0f76474b76e2281b96517c26ac1bb4b8009847499c063c0066a8e69280019c133a10967be8aaed97bbd6186023728619233dea6e7bcf1567e45cd57017)
+set(SCITER_VERSION 4.0.4)
+set(SCITER_REVISION 9b5954df34ac0094e6037ac8aa6e00fb883185f9)
+set(SCITER_SHA a87b05aec6c99f56926b005eb1303b2b68f901fe2658433ca11d704b50308e6d291026404b86320fae0f1b12ca257a35338464f21d94ebeaa6e40cfec64a9201)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
set(SCITER_ARCH 64)
diff --git a/ports/sdl2-gfx/CONTROL b/ports/sdl2-gfx/CONTROL
index 799306235..0e0b71aec 100644
--- a/ports/sdl2-gfx/CONTROL
+++ b/ports/sdl2-gfx/CONTROL
@@ -1,4 +1,4 @@
Source: sdl2-gfx
-Version: 1.0.3-1
+Version: 1.0.3-2
Build-Depends: sdl2
Description: Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions wrapped up in a C based add-on library for the Simple Direct Media (SDL) cross-platform API layer.
diff --git a/ports/sdl2-image/CONTROL b/ports/sdl2-image/CONTROL
index 5ebec2f38..a5c41a334 100644
--- a/ports/sdl2-image/CONTROL
+++ b/ports/sdl2-image/CONTROL
@@ -1,5 +1,5 @@
Source: sdl2-image
-Version: 2.0.1-1
+Version: 2.0.1-2
Build-Depends: sdl2, libpng, libjpeg-turbo, tiff, libwebp
Description: SDL_image is an image file loading library. It loads images as SDL surfaces and textures, and supports the following formats: BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF, WEBP, XCF, XPM, XV
diff --git a/ports/sdl2-mixer/CONTROL b/ports/sdl2-mixer/CONTROL
index 88356b73f..756a7380d 100644
--- a/ports/sdl2-mixer/CONTROL
+++ b/ports/sdl2-mixer/CONTROL
@@ -1,4 +1,4 @@
Source: sdl2-mixer
-Version: 2.0.1-1
+Version: 2.0.1-2
Description: Multi-channel audio mixer library for SDL.
Build-Depends: sdl2, libflac, smpeg2, libmodplug, libvorbis
diff --git a/ports/sdl2-net/CONTROL b/ports/sdl2-net/CONTROL
index 692bb7615..e64277b39 100644
--- a/ports/sdl2-net/CONTROL
+++ b/ports/sdl2-net/CONTROL
@@ -1,4 +1,4 @@
Source: sdl2-net
-Version: 2.0.1-1
+Version: 2.0.1-2
Description: Networking library for SDL
Build-Depends: sdl2
diff --git a/ports/sdl2-ttf/CONTROL b/ports/sdl2-ttf/CONTROL
index fe09831ee..7dbe06367 100644
--- a/ports/sdl2-ttf/CONTROL
+++ b/ports/sdl2-ttf/CONTROL
@@ -1,4 +1,4 @@
Source: sdl2-ttf
-Version: 2.0.14-1
+Version: 2.0.14-2
Description: A library for rendering TrueType fonts with SDL
Build-Depends: sdl2, freetype
diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL
index f22820579..e4d99f4ae 100644
--- a/ports/sdl2/CONTROL
+++ b/ports/sdl2/CONTROL
@@ -1,3 +1,3 @@
Source: sdl2
-Version: 2.0.5-3
+Version: 2.0.6-1
Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.
diff --git a/ports/sdl2/dont-ignore-default-libs.patch b/ports/sdl2/dont-ignore-default-libs.patch
deleted file mode 100644
index c9f4c6079..000000000
--- a/ports/sdl2/dont-ignore-default-libs.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 54a23f0..91c5736 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -1549,7 +1549,7 @@ if(SDL_SHARED)
- SOVERSION ${LT_REVISION}
- OUTPUT_NAME "SDL2")
- endif()
-- if(MSVC)
-+ if(MSVC AND NOT LIBC)
- # Don't try to link with the default set of libraries.
- set_target_properties(SDL2 PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
- set_target_properties(SDL2 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
-@@ -1564,7 +1564,7 @@ if(SDL_STATIC)
- add_library(SDL2-static STATIC ${SOURCE_FILES})
- set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2")
- set_target_properties(SDL2-static PROPERTIES POSITION_INDEPENDENT_CODE ${SDL_STATIC_PIC})
-- if(MSVC)
-+ if(MSVC AND NOT LIBC)
- set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
- set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
- set_target_properties(SDL2-static PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
diff --git a/ports/sdl2/export-symbols-only-in-shared-build.patch b/ports/sdl2/export-symbols-only-in-shared-build.patch
index b442954d5..7e6d503e2 100644
--- a/ports/sdl2/export-symbols-only-in-shared-build.patch
+++ b/ports/sdl2/export-symbols-only-in-shared-build.patch
@@ -1,16 +1,24 @@
-diff --git a/include/begin_code.h b/include/begin_code.h
-index 04e78c6..16464f5 100644
---- a/include/begin_code.h
-+++ b/include/begin_code.h
+# HG changeset patch
+# User Mikhail Paulyshka <me@mixaill.tk>
+# Date 1506252750 -10800
+# Sun Sep 24 14:32:30 2017 +0300
+# Branch SDL2-WIN-SYMBOLS_LEACKAGE
+# Node ID 46ec9baae30cd4e0c584de125cae4a3cce2864ad
+# Parent 8df7a59b55283aa09889522369a2b32674c048de
+win32: fix symbols leakage for static libraries
+
+diff -r 8df7a59b5528 -r 46ec9baae30c include/begin_code.h
+--- a/include/begin_code.h Fri Sep 22 11:25:52 2017 -0700
++++ b/include/begin_code.h Sun Sep 24 14:32:30 2017 +0300
@@ -58,8 +58,10 @@
# else
# define DECLSPEC __declspec(dllimport)
# endif
--# else
-+# elif defined(SDL2_EXPORTS)
- # define DECLSPEC __declspec(dllexport)
-+# else
++# elif defined(_DLL)
++# define DECLSPEC __declspec(dllexport)
+ # else
+-# define DECLSPEC __declspec(dllexport)
+# define DECLSPEC
# endif
- # else
- # if defined(__GNUC__) && __GNUC__ >= 4
+ # elif defined(__OS2__)
+ # ifdef BUILD_SDL
diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake
index 33123c1ba..a430b29f6 100644
--- a/ports/sdl2/portfile.cmake
+++ b/ports/sdl2/portfile.cmake
@@ -1,16 +1,19 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.5)
+
+set(SDL2_VERSION 2.0.6)
+set(SDL2_HASH ad4dad5663834ee0ffbdca1b531d753449b260c9256df2c48da7261aacd9795d91eef1286525cf914f6b92ba5985de7798f041557574b5d978b8224f10041830)
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2-${SDL2_VERSION})
vcpkg_download_distfile(ARCHIVE_FILE
- URLS "http://libsdl.org/release/SDL2-2.0.5.tar.gz"
- FILENAME "SDL2-2.0.5.tar.gz"
- SHA512 6401f5df08c08316c09bc6ac5b28345c5184bb25770baa5c94c0a582ae130ddf73bb736e44bb31f4e427c1ddbbeec4755a6a5f530b6b4c3d0f13ebc78ddc1750
+ URLS "http://libsdl.org/release/SDL2-${SDL2_VERSION}.tar.gz"
+ FILENAME "SDL2-${SDL2_VERSION}.tar.gz"
+ SHA512 ${SDL2_HASH}
)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/dont-ignore-default-libs.patch
${CMAKE_CURRENT_LIST_DIR}/export-symbols-only-in-shared-build.patch
)
@@ -58,14 +61,11 @@ else()
)
vcpkg_install_cmake()
-
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-endif()
-file(COPY ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link)
-file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib)
-file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
-file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2main.lib)
+ vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake")
+endif()
file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2 RENAME copyright)
vcpkg_copy_pdbs()
diff --git a/ports/sery/CONTROL b/ports/sery/CONTROL
index 782452b2a..1a771771b 100644
--- a/ports/sery/CONTROL
+++ b/ports/sery/CONTROL
@@ -1,3 +1,3 @@
Source: sery
-Version: 1.0.0
+Version: 1.0.0-1
Description: Simple binary (de)serialization library
diff --git a/ports/sfml/CONTROL b/ports/sfml/CONTROL
index e7fb08ecd..778638482 100644
--- a/ports/sfml/CONTROL
+++ b/ports/sfml/CONTROL
@@ -1,4 +1,4 @@
Source: sfml
-Version: 2.4.2
+Version: 2.4.2-2
Description: Simple and fast multimedia library
Build-Depends: freetype, libflac, libjpeg-turbo, libogg, libvorbis, openal-soft, stb
diff --git a/ports/sfml/portfile.cmake b/ports/sfml/portfile.cmake
index 69f114ca5..ea4cfd138 100644
--- a/ports/sfml/portfile.cmake
+++ b/ports/sfml/portfile.cmake
@@ -1,12 +1,11 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SFML-2.4.2)
-vcpkg_download_distfile(ARCHIVE
- URLS "http://www.sfml-dev.org/files/SFML-2.4.2-sources.zip"
- FILENAME "SFML-2.4.2-sources.zip"
- SHA512 14f2b9f244bbff681d1992581f20012f3073456e4baed0fb2bf2cf82538e9c5ddd8ce01b0cfb3874af47091ec19654aa23c426df04fe1ffcfa209623dc362f85)
+vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
+ REPO "sfml/sfml"
+ REF "2.4.2"
+ HEAD_REF master
+ SHA512 8acfdf320939c953a9a3413398f82d02d68a56a337f1366c2677c14ce032baa8ba059113ac3c91bb6e6fc22eef119369a265be7ef6894526e6a97a01f37e1972)
-vcpkg_extract_source_archive(${ARCHIVE})
file(REMOVE_RECURSE ${SOURCE_PATH}/extlibs)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
@@ -30,5 +29,9 @@ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib)
file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib)
-file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/sfml/license.txt ${CURRENT_PACKAGES_DIR}/share/sfml/copyright)
+# At the time of writing, HEAD has license.md instead of license.txt
+if (VCPKG_HEAD_VERSION)
+ file(INSTALL ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml RENAME copyright)
+else()
+ file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml RENAME copyright)
+endif() \ No newline at end of file
diff --git a/ports/shaderc/CMakeLists.txt b/ports/shaderc/CMakeLists.txt
index 3dc7be973..580ffa1d1 100644
--- a/ports/shaderc/CMakeLists.txt
+++ b/ports/shaderc/CMakeLists.txt
@@ -1,29 +1,31 @@
-option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D})
-if(NOT ${SUFFIX_D})
- find_library(GLSLANG glslang)
- find_library(OSDEPENDENT OSDependent)
- find_library(OGLCOMPILER OGLCompiler)
- find_library(HLSLLIB HLSL)
- find_library(SPIRVLIB SPIRV)
-ELSE()
- find_library(GLSLANG glslangd)
- find_library(OSDEPENDENT OSDependentd)
- find_library(OGLCOMPILER OGLCompilerd)
- find_library(HLSLLIB HLSLd)
- find_library(SPIRVLIB SPIRVd)
-ENDIF()
-
-add_library(glslang STATIC IMPORTED GLOBAL)
-set_property(TARGET glslang PROPERTY IMPORTED_LOCATION "${GLSLANG}")
-
-add_library(OSDependent STATIC IMPORTED GLOBAL)
-set_property(TARGET OSDependent PROPERTY IMPORTED_LOCATION "${OSDEPENDENT}")
-
-add_library(OGLCompiler STATIC IMPORTED GLOBAL)
-set_property(TARGET OGLCompiler PROPERTY IMPORTED_LOCATION "${OGLCOMPILER}")
-
-add_library(HLSL STATIC IMPORTED GLOBAL)
-set_property(TARGET HLSL PROPERTY IMPORTED_LOCATION "${HLSLLIB}")
-
-add_library(SPIRV STATIC IMPORTED GLOBAL)
-set_property(TARGET SPIRV PROPERTY IMPORTED_LOCATION "${SPIRVLIB}")
+option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D})
+if(NOT SUFFIX_D)
+ find_library(GLSLANG glslang)
+ find_library(OSDEPENDENT OSDependent)
+ find_library(OGLCOMPILER OGLCompiler)
+ find_library(HLSLLIB HLSL)
+ find_library(SPIRVLIB SPIRV)
+ELSE()
+ find_library(GLSLANG glslangd)
+ find_library(OSDEPENDENT OSDependentd)
+ find_library(OGLCOMPILER OGLCompilerd)
+ find_library(HLSLLIB HLSLd)
+ find_library(SPIRVLIB SPIRVd)
+ENDIF()
+
+add_library(glslang STATIC IMPORTED GLOBAL)
+set_property(TARGET glslang PROPERTY IMPORTED_LOCATION "${GLSLANG}")
+set(glslang_SOURCE_DIR "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include" CACHE STRING "glslang source dir")
+set_property(TARGET glslang APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include")
+
+add_library(OSDependent STATIC IMPORTED GLOBAL)
+set_property(TARGET OSDependent PROPERTY IMPORTED_LOCATION "${OSDEPENDENT}")
+
+add_library(OGLCompiler STATIC IMPORTED GLOBAL)
+set_property(TARGET OGLCompiler PROPERTY IMPORTED_LOCATION "${OGLCOMPILER}")
+
+add_library(HLSL STATIC IMPORTED GLOBAL)
+set_property(TARGET HLSL PROPERTY IMPORTED_LOCATION "${HLSLLIB}")
+
+add_library(SPIRV STATIC IMPORTED GLOBAL)
+set_property(TARGET SPIRV PROPERTY IMPORTED_LOCATION "${SPIRVLIB}")
diff --git a/ports/shaderc/CMakeLists_spirv.txt b/ports/shaderc/CMakeLists_spirv.txt
index 6aa738b1f..618177fa6 100644
--- a/ports/shaderc/CMakeLists_spirv.txt
+++ b/ports/shaderc/CMakeLists_spirv.txt
@@ -1,5 +1,5 @@
option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D})
-if(NOT ${SUFFIX_D})
+if(NOT SUFFIX_D)
find_library(SPIRVTOOLSOPT spirv-tools-opt)
find_library(SPIRVTOOLS spirv-tools)
ELSE()
diff --git a/ports/shaderc/CONTROL b/ports/shaderc/CONTROL
index 6cab280a6..5a5c2c580 100644
--- a/ports/shaderc/CONTROL
+++ b/ports/shaderc/CONTROL
@@ -1,4 +1,4 @@
Source: shaderc
-Version: 2df47b51d83ad83cbc2e7f8ff2b56776293e8958
+Version: 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da-1
Description: A collection of tools, libraries and tests for shader compilation.
Build-Depends: glslang, spirv-tools
diff --git a/ports/shaderc/portfile.cmake b/ports/shaderc/portfile.cmake
index eb17aa827..2b925455b 100644
--- a/ports/shaderc/portfile.cmake
+++ b/ports/shaderc/portfile.cmake
@@ -7,35 +7,19 @@
#
include(vcpkg_common_functions)
-find_program(GIT git)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO google/shaderc
+ REF 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da
+ SHA512 6fb45a0b01e6709c44a11658648b9271fe06bd94023dcc5042c47b5f2a04889c2efb0ab4c166f18728594ac9b9aa9f8b354af46d88eb7f7c39c7246f52f5a933
+ HEAD_REF master
+)
-set(SHADERC_GIT_URL "https://github.com/google/shaderc.git")
-set(SHADERC_GIT_REF "2df47b51d83ad83cbc2e7f8ff2b56776293e8958")
-if(NOT EXISTS "${DOWNLOADS}/shaderc.git")
- message(STATUS "Cloning")
- vcpkg_execute_required_process(
- COMMAND ${GIT} clone --bare ${SHADERC_GIT_URL} ${DOWNLOADS}/shaderc.git
- WORKING_DIRECTORY ${DOWNLOADS}
- LOGNAME clone
- )
-endif()
-if(NOT EXISTS "${SOURCE_PATH}/.git")
- message(STATUS "Adding worktree and patching")
- file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR})
- vcpkg_execute_required_process(
- COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH} ${SHADERC_GIT_REF}
- WORKING_DIRECTORY ${DOWNLOADS}/shaderc.git
- LOGNAME worktree
- )
- message(STATUS "Patching")
- vcpkg_execute_required_process(
- COMMAND ${GIT} apply ${CMAKE_CURRENT_LIST_DIR}/0001-Do-not-generate-build-version.inc.patch --ignore-whitespace --whitespace=fix
- WORKING_DIRECTORY ${SOURCE_PATH}
- LOGNAME patch
- )
-endif()
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Do-not-generate-build-version.inc.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)
@@ -69,10 +53,7 @@ file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
#Safe to remove as libs are static
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
-
-
-file(WRITE ${CURRENT_PACKAGES_DIR}/include/shaderc.txt)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/shaderc)
diff --git a/ports/shapelib/CONTROL b/ports/shapelib/CONTROL
new file mode 100644
index 000000000..7d37eb8aa
--- /dev/null
+++ b/ports/shapelib/CONTROL
@@ -0,0 +1,3 @@
+Source: shapelib
+Version: 1.4.1
+Description: Shapefile C Library is simple C API for reading and writing ESRI Shapefiles
diff --git a/ports/shapelib/portfile.cmake b/ports/shapelib/portfile.cmake
new file mode 100644
index 000000000..0f2787689
--- /dev/null
+++ b/ports/shapelib/portfile.cmake
@@ -0,0 +1,41 @@
+include(vcpkg_common_functions)
+
+set(SHAPELIB_VERSION 1.4.1)
+set(SHAPELIB_HASH e3e02dde8006773fed25d630896e79fd79d2008a029cc86b157fe0d92c143a9fab930fdb93d9700d4e1397c3b23ae4b86e91db1dbaca1c5388d4e3aea0309341)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/shapelib-${SHAPELIB_VERSION})
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://download.osgeo.org/shapelib/shapelib-${SHAPELIB_VERSION}.zip"
+ FILENAME "shapelib-${SHAPELIB_VERSION}.zip"
+ SHA512 ${SHAPELIB_HASH}
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS -DBUILD_TEST=OFF)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe")
+file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/shapelib)
+file(REMOVE ${EXES})
+
+file(GLOB DEBUG_EXES "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe")
+file(REMOVE ${DEBUG_EXES})
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/shapelib)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/shapelib/COPYING ${CURRENT_PACKAGES_DIR}/share/shapelib/copyright)
+
+vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/shapelib)
+
+vcpkg_copy_pdbs()
diff --git a/ports/signalrclient/CONTROL b/ports/signalrclient/CONTROL
index a5673e964..babcce692 100644
--- a/ports/signalrclient/CONTROL
+++ b/ports/signalrclient/CONTROL
@@ -1,4 +1,4 @@
Source: signalrclient
-Version: 1.0.0-beta1
+Version: 1.0.0-beta1-1
Build-Depends: cpprestsdk
-Description: C++ client for SignalR. \ No newline at end of file
+Description: C++ client for SignalR.
diff --git a/ports/signalrclient/portfile.cmake b/ports/signalrclient/portfile.cmake
index 22e91acab..ad7f4fd58 100644
--- a/ports/signalrclient/portfile.cmake
+++ b/ports/signalrclient/portfile.cmake
@@ -4,7 +4,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SignalR-Client-Cpp-1.0.0-beta1)
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/aspnet/SignalR-Client-Cpp/archive/1.0.0-beta1.tar.gz"
FILENAME "SignalR-Client-Cpp-1.0.0-beta1.tar.gz"
- SHA512 e0090415aa724087dbe2a317a4642d6359b134e00e836ea70c71bc9186dc8d6bba097666711ab18d9b0a390e1e5f59be2f55279b6859ac20d558b901bf5fe2f2
+ SHA512 b38f6f946f1499080071949cbcf574405118f9acfb469441e5b5b0df3e5f0d277a83b30e0d613dc5e54732b9071e3273dac1ee65129f994d5a60eef0e45bdf6c
)
vcpkg_extract_source_archive(${ARCHIVE})
@@ -31,4 +31,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# copy license
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/signalrclient)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/signalrclient/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/signalrclient/copyright) \ No newline at end of file
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/signalrclient/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/signalrclient/copyright)
diff --git a/ports/smpeg2/CONTROL b/ports/smpeg2/CONTROL
index 26c0b3904..9d00d9429 100644
--- a/ports/smpeg2/CONTROL
+++ b/ports/smpeg2/CONTROL
@@ -1,4 +1,4 @@
Source: smpeg2
-Version: 2.0.0-1
+Version: 2.0.0-2
Description: SDL MPEG Player Library
Build-Depends: sdl2
diff --git a/ports/snappy/CONTROL b/ports/snappy/CONTROL
index 287c9235e..230383955 100644
--- a/ports/snappy/CONTROL
+++ b/ports/snappy/CONTROL
@@ -1,3 +1,3 @@
Source: snappy
-Version: 1.1.7
+Version: 1.1.7-1
Description: A fast compressor/decompressor.
diff --git a/ports/sobjectizer/CONTROL b/ports/sobjectizer/CONTROL
index 9b9bd724e..95bcb751b 100644
--- a/ports/sobjectizer/CONTROL
+++ b/ports/sobjectizer/CONTROL
@@ -1,3 +1,3 @@
Source: sobjectizer
-Version: 5.5.19.2
+Version: 5.5.19.2-1
Description: SObjectizer is a C++ in-process message dispatching framework with implementation of Actor Model, Publish-Subscribe Model and CSP-like channels.
diff --git a/ports/soci/CONTROL b/ports/soci/CONTROL
index 5480bb712..1d1708a64 100644
--- a/ports/soci/CONTROL
+++ b/ports/soci/CONTROL
@@ -1,3 +1,3 @@
Source: soci
-Version: 2016.10.22
+Version: 2016.10.22-1
Description: SOCI database access library
diff --git a/ports/sophus/CONTROL b/ports/sophus/CONTROL
index 8214c4e7e..f6433e410 100644
--- a/ports/sophus/CONTROL
+++ b/ports/sophus/CONTROL
@@ -1,4 +1,4 @@
Source: sophus
-Version: 1.0.0
+Version: 1.0.0-1
Build-Depends: eigen3, ceres
Description: Lie group library for C++
diff --git a/ports/spatialite-tools/CONTROL b/ports/spatialite-tools/CONTROL
new file mode 100644
index 000000000..ecbf681c6
--- /dev/null
+++ b/ports/spatialite-tools/CONTROL
@@ -0,0 +1,4 @@
+Source: spatialite-tools
+Version: 4.3.0
+Description: Contains spatialite.exe and other command line tools to work with SpatiaLite databases (import, export, SQL queries)
+Build-Depends: sqlite3, libspatialite, geos, readosm, proj4, zlib, libiconv, expat
diff --git a/ports/spatialite-tools/fix-makefiles.patch b/ports/spatialite-tools/fix-makefiles.patch
new file mode 100644
index 000000000..ff6e0ad0d
--- /dev/null
+++ b/ports/spatialite-tools/fix-makefiles.patch
@@ -0,0 +1,128 @@
+diff --git a/makefile.vc b/makefile.vc
+index 33c85d2..c811e7d 100644
+--- a/makefile.vc
++++ b/makefile.vc
+@@ -15,7 +15,7 @@ SPATIALITE_OSM_RAW_EXE = spatialite_osm_raw.exe
+ SPATIALITE_OSM_FILTER_EXE = spatialite_osm_filter.exe
+ SPATIALITE_GML_EXE = spatialite_gml.exe
+
+-CFLAGS = /nologo -IC:\OSGeo4W\include $(OPTFLAGS)
++CFLAGS = /nologo -I$(INSTALLED_ROOT)\include $(OPTFLAGS)
+
+ default: all
+
+@@ -26,89 +26,58 @@ all: $(SPATIALITE_EXE) $(SHP_DOCTOR_EXE) $(SPATIALITE_TOOL_EXE) \
+ $(SPATIALITE_OSM_FILTER_EXE)
+
+ $(SPATIALITE_EXE): shell.obj
+- cl shell.obj C:\OSGeo4W\lib\proj_i.lib \
+- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \
+- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib \
+- /Fe$(SPATIALITE_EXE)
++ cl shell.obj $(LIBS_ALL) /Fe$(SPATIALITE_EXE)
+ if exist $(SPATIALITE_EXE).manifest mt -manifest \
+ $(SPATIALITE_EXE).manifest -outputresource:$(SPATIALITE_EXE);1
+
+ $(EXIF_LOADER_EXE): exif_loader.obj
+- cl exif_loader.obj C:\OSGeo4W\lib\proj_i.lib \
+- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \
+- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
++ cl exif_loader.obj $(LIBS_ALL)
+ if exist $(EXIF_LOADER_EXE).manifest mt -manifest \
+ $(EXIF_LOADER_EXE).manifest -outputresource:$(EXIF_LOADER_EXE);1
+
+ $(SHP_DOCTOR_EXE): shp_doctor.obj
+- cl shp_doctor.obj C:\OSGeo4W\lib\proj_i.lib \
+- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \
+- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
++ cl shp_doctor.obj $(LIBS_ALL)
+ if exist $(SHP_DOCTOR_EXE).manifest mt -manifest \
+ $(SHP_DOCTOR_EXE).manifest -outputresource:$(SHP_DOCTOR_EXE);1
+
+ $(SPATIALITE_NETWORK_EXE): spatialite_network.obj
+- cl spatialite_network.obj C:\OSGeo4W\lib\proj_i.lib \
+- C:\OSGeo4W\lib\iconv.lib \
+- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
++ cl spatialite_network.obj $(LIBS_ALL)
+ if exist $(SPATIALITE_NETWORK_EXE).manifest mt -manifest \
+ $(SPATIALITE_TOOL_EXE).manifest \
+ -outputresource:$(SPATIALITE_TOOL_EXE);1
+
+ $(SPATIALITE_TOOL_EXE): spatialite_tool.obj
+- cl spatialite_tool.obj C:\OSGeo4W\lib\proj_i.lib \
+- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \
+- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
++ cl spatialite_tool.obj $(LIBS_ALL)
+ if exist $(SPATIALITE_TOOL_EXE).manifest mt -manifest \
+ $(SPATIALITE_TOOL_EXE).manifest \
+ -outputresource:$(SPATIALITE_TOOL_EXE);1
+
+ $(SPATIALITE_OSM_NET_EXE): spatialite_osm_net.obj
+- cl spatialite_osm_net.obj C:\OSGeo4W\lib\proj_i.lib \
+- C:\OSGeo4W\lib\iconv.lib \
+- C:\OSGeo4W\lib\readosm_i.lib \
+- C:\OSGeo4W\lib\libexpat.lib \
+- C:\OSGeo4W\lib\zlib.lib \
+- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
++ cl spatialite_osm_net.obj $(LIBS_ALL)
+ if exist $(SPATIALITE_OSM_EXE).manifest mt -manifest \
+ $(SPATIALITE_OSM_EXE).manifest \
+ -outputresource:$(SPATIALITE_OSM_NET_EXE);1
+
+ $(SPATIALITE_OSM_MAP_EXE): spatialite_osm_map.obj
+- cl spatialite_osm_map.obj C:\OSGeo4W\lib\proj_i.lib \
+- C:\OSGeo4W\lib\iconv.lib \
+- C:\OSGeo4W\lib\readosm_i.lib \
+- C:\OSGeo4W\lib\libexpat.lib \
+- C:\OSGeo4W\lib\zlib.lib \
+- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
++ cl spatialite_osm_map.obj $(LIBS_ALL)
+ if exist $(SPATIALITE_OSM_MAP_EXE).manifest mt -manifest \
+ $(SPATIALITE_OSM_MAP_EXE).manifest \
+ -outputresource:$(SPATIALITE_OSM_MAP_EXE);1
+
+ $(SPATIALITE_GML_EXE): spatialite_gml.obj
+- cl spatialite_gml.obj C:\OSGeo4W\lib\proj_i.lib \
+- C:\OSGeo4W\lib\iconv.lib \
+- C:\OSGeo4W\lib\libexpat.lib \
+- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
++ cl spatialite_gml.obj $(LIBS_ALL)
+ if exist $(SPATIALITE_GML_EXE).manifest mt -manifest \
+ $(SPATIALITE_GML_EXE).manifest \
+ -outputresource:$(SPATIALITE_GML_EXE);1
+
+ $(SPATIALITE_OSM_RAW_EXE): spatialite_osm_raw.obj
+- cl spatialite_osm_raw.obj C:\OSGeo4W\lib\proj_i.lib \
+- C:\OSGeo4W\lib\iconv.lib \
+- C:\OSGeo4W\lib\readosm_i.lib \
+- C:\OSGeo4W\lib\libexpat.lib \
+- C:\OSGeo4W\lib\zlib.lib \
+- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
++ cl spatialite_osm_raw.obj $(LIBS_ALL)
+ if exist $(SPATIALITE_OSM_RAW_EXE).manifest mt -manifest \
+ $(SPATIALITE_OSM_RAW_EXE).manifest \
+ -outputresource:$(SPATIALITE_OSM_RAW_EXE);1
+
+ $(SPATIALITE_OSM_FILTER_EXE): spatialite_osm_filter.obj
+- cl spatialite_osm_filter.obj C:\OSGeo4W\lib\proj_i.lib \
+- C:\OSGeo4W\lib\iconv.lib \
+- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
++ cl spatialite_osm_filter.obj $(LIBS_ALL)
+ if exist $(SPATIALITE_OSM_FILTER_EXE).manifest mt -manifest \
+ $(SPATIALITE_OSM_FILTER_EXE).manifest \
+ -outputresource:$(SPATIALITE_OSM_FILTER_EXE);1
+diff --git a/nmake.opt b/nmake.opt
+index 4f4a953..d9efecf 100644
+--- a/nmake.opt
++++ b/nmake.opt
+@@ -1,8 +1,8 @@
+ # Directory tree where SpatiaLite will be installed.
+-INSTDIR=C:\OSGeo4W
++INSTDIR=$(INST_DIR)
+
+ # Uncomment the first for an optimized build, or the second for debug.
+-OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \
++OPTFLAGS= /nologo /fp:precise /W3 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \
+ /D_LARGE_FILE=1 /D_FILE_OFFSET_BITS=64 /D_LARGEFILE_SOURCE=1
+ #OPTFLAGS= /nologo /Zi /MD /Fdspatialite.pdb
+
diff --git a/ports/spatialite-tools/portfile.cmake b/ports/spatialite-tools/portfile.cmake
new file mode 100644
index 000000000..f42227a12
--- /dev/null
+++ b/ports/spatialite-tools/portfile.cmake
@@ -0,0 +1,118 @@
+include(vcpkg_common_functions)
+
+option(BUILD_DEBUG_TOOLS "Build debug version of tools" OFF)
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/spatialite-tools-4.3.0)
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://www.gaia-gis.it/gaia-sins/spatialite-tools-4.3.0.tar.gz"
+ FILENAME "spatialite-tools-4.3.0.tar.gz"
+ SHA512 e1de27c1c65ff2ff0b08583113517bea74edf33fff59ad6e9c77492ea3ae87d9c0f17d7670ee6602b32eea73ad3678bb5410ef2c6fac6e213bf2e341a907db88
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+find_program(NMAKE nmake)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-makefiles.patch
+)
+
+set(LDIR "\"${CURRENT_INSTALLED_DIR}\"")
+
+if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
+ set(CL_FLAGS_DBG "/MDd /Zi")
+ set(CL_FLAGS_REL "/MD /Ox")
+ set(GEOS_LIBS_REL "${LDIR}/lib/geos_c.lib")
+ set(GEOS_LIBS_DBG "${LDIR}/debug/lib/geos_c.lib")
+ set(LIBXML2_LIBS_REL "${LDIR}/lib/libxml2.lib")
+ set(LIBXML2_LIBS_DBG "${LDIR}/debug/lib/libxml2.lib")
+ set(SPATIALITE_LIBS_REL "${LDIR}/lib/spatialite.lib")
+ set(SPATIALITE_LIBS_DBG "${LDIR}/debug/lib/spatialite.lib")
+ set(ICONV_LIBS_REL "${LDIR}/lib/libiconv.lib")
+ set(ICONV_LIBS_DBG "${LDIR}/debug/lib/libiconv.lib")
+else()
+ set(CL_FLAGS_DBG "/MTd /Zi")
+ set(CL_FLAGS_REL "/MT /Ox")
+ set(GEOS_LIBS_REL "${LDIR}/lib/libgeos_c.lib ${LDIR}/lib/libgeos.lib")
+ set(GEOS_LIBS_DBG "${LDIR}/debug/lib/libgeos_c.lib ${LDIR}/debug/lib/libgeos.lib")
+ set(LIBXML2_LIBS_REL "${LDIR}/lib/libxml2.lib ${LDIR}/lib/lzma.lib ws2_32.lib")
+ set(LIBXML2_LIBS_DBG "${LDIR}/debug/lib/libxml2.lib ${LDIR}/debug/lib/lzma.lib ws2_32.lib")
+ set(SPATIALITE_LIBS_REL "${LDIR}/lib/spatialite.lib ${LDIR}/lib/freexl.lib")
+ set(SPATIALITE_LIBS_DBG "${LDIR}/debug/lib/spatialite.lib ${LDIR}/debug/lib/freexl.lib")
+ set(ICONV_LIBS_REL "${LDIR}/lib/libiconv.lib ${LDIR}/lib/libcharset.lib")
+ set(ICONV_LIBS_DBG "${LDIR}/debug/lib/libiconv.lib ${LDIR}/debug/lib/libcharset.lib ")
+endif()
+
+set(LIBS_ALL_DBG
+ "${ICONV_LIBS_DBG} \
+ ${LDIR}/debug/lib/sqlite3.lib \
+ ${SPATIALITE_LIBS_DBG} \
+ ${LIBXML2_LIBS_DBG} \
+ ${GEOS_LIBS_DBG} \
+ ${LDIR}/debug/lib/readosm.lib \
+ ${LDIR}/debug/lib/expat.lib \
+ ${LDIR}/debug/lib/zlibd.lib \
+ ${LDIR}/debug/lib/projd.lib"
+ )
+set(LIBS_ALL_REL
+ "${ICONV_LIBS_REL} \
+ ${LDIR}/lib/sqlite3.lib \
+ ${SPATIALITE_LIBS_REL} \
+ ${LIBXML2_LIBS_REL} \
+ ${GEOS_LIBS_REL} \
+ ${LDIR}/lib/readosm.lib \
+ ${LDIR}/lib/expat.lib \
+ ${LDIR}/lib/zlib.lib \
+ ${LDIR}/lib/proj.lib"
+ )
+
+if(BUILD_DEBUG_TOOLS)
+ ################
+ # Debug build
+ ################
+ message(STATUS "Building ${TARGET_TRIPLET}-dgb")
+
+ file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL)
+ vcpkg_execute_required_process(
+ COMMAND ${NMAKE} -f makefile.vc clean install
+ "INST_DIR=\"${INST_DIR_REL}\"" "INSTALLED_ROOT=${LDIR}" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}"
+ WORKING_DIRECTORY ${SOURCE_PATH}
+ LOGNAME nmake-build-${TARGET_TRIPLET}-debug
+ )
+ message(STATUS "Building ${TARGET_TRIPLET}-dbg done")
+ set(EXE_FOLDER ${CURRENT_PACKAGES_DIR}/bin/)
+else()
+ ################
+ # Release build
+ ################
+ message(STATUS "Building ${TARGET_TRIPLET}-rel")
+
+ file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL)
+ vcpkg_execute_required_process(
+ COMMAND ${NMAKE} -f makefile.vc clean install
+ "INST_DIR=\"${INST_DIR_REL}\"" "INSTALLED_ROOT=${LDIR}" "CL_FLAGS=${CL_FLAGS_REL}" "LIBS_ALL=${LIBS_ALL_REL}"
+ WORKING_DIRECTORY ${SOURCE_PATH}
+ LOGNAME nmake-build-${TARGET_TRIPLET}-release
+ )
+ message(STATUS "Building ${TARGET_TRIPLET}-rel done")
+ set(EXE_FOLDER ${CURRENT_PACKAGES_DIR}/bin/)
+endif()
+
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
+
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}/)
+file(GLOB EXES "${EXE_FOLDER}/*.exe")
+file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
+file(REMOVE ${EXES})
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include)
+
+if(NOT BUILD_DEBUG_TOOLS AND VCPKG_CRT_LINKAGE STREQUAL dynamic)
+ vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
+endif()
+
+message(STATUS "Packaging ${TARGET_TRIPLET} done")
+
+# Allow empty include directory
+set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
diff --git a/ports/spdlog/CONTROL b/ports/spdlog/CONTROL
index e060a2665..ac0b51be7 100644
--- a/ports/spdlog/CONTROL
+++ b/ports/spdlog/CONTROL
@@ -1,4 +1,4 @@
Source: spdlog
-Version: 0.14.0
+Version: 0.14.0-1
Description: Very fast, header only, C++ logging library
Build-Depends: fmt
diff --git a/ports/speex/CONTROL b/ports/speex/CONTROL
index 680dcdf13..5d3fa10a2 100644
--- a/ports/speex/CONTROL
+++ b/ports/speex/CONTROL
@@ -1,3 +1,3 @@
Source: speex
-Version: 1.2.0
+Version: 1.2.0-1
Description: Speex is an Open Source/Free Software patent-free audio compression format designed for speech.
diff --git a/ports/speexdsp/CONTROL b/ports/speexdsp/CONTROL
index 71144ecdd..d7e8bac98 100644
--- a/ports/speexdsp/CONTROL
+++ b/ports/speexdsp/CONTROL
@@ -1,4 +1,4 @@
Source: speexdsp
-Version: 1.2rc3-1
+Version: 1.2rc3-2
Description: A patent-free, Open Source/Free Software DSP library.
Build-Depends:
diff --git a/ports/spirit-po/CONTROL b/ports/spirit-po/CONTROL
new file mode 100644
index 000000000..b9857cea0
--- /dev/null
+++ b/ports/spirit-po/CONTROL
@@ -0,0 +1,4 @@
+Source: spirit-po
+Version: 1.1.2
+Description: A header-only C++ library for localization using GNU gettext po files, based on Boost.Spirit.
+Build-Depends: boost
diff --git a/ports/spirit-po/portfile.cmake b/ports/spirit-po/portfile.cmake
new file mode 100644
index 000000000..3fa1cb23b
--- /dev/null
+++ b/ports/spirit-po/portfile.cmake
@@ -0,0 +1,16 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/spirit-po-1.1.2)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/cbeck88/spirit-po/archive/v1.1.2.zip"
+ FILENAME "spirit-po-1.1.2.zip"
+ SHA512 8a33126c199765b91e832c64e546f240d532858e051b217189778ad01ef584c67f0f4b2f9674cb7b4a877ec2a2b21b5eda35dc24a12da8eb7a7990bf63a4a774
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(INSTALL ${SOURCE_PATH}/include/spirit_po
+ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+
+# spirit-po is header-only, so no vcpkg_{configure,install}_cmake
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/spirit-po RENAME copyright)
diff --git a/ports/spirv-tools/CONTROL b/ports/spirv-tools/CONTROL
index eacc40ff9..da2e2f29b 100644
--- a/ports/spirv-tools/CONTROL
+++ b/ports/spirv-tools/CONTROL
@@ -1,3 +1,3 @@
Source: spirv-tools
-Version: 1.1-f72189c249ba143c6a89a4cf1e7d53337b2ddd40
+Version: v2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23-1
Description: API and commands for processing SPIR-V modules
diff --git a/ports/spirv-tools/portfile.cmake b/ports/spirv-tools/portfile.cmake
index c9bb5f85f..08e35b7d3 100644
--- a/ports/spirv-tools/portfile.cmake
+++ b/ports/spirv-tools/portfile.cmake
@@ -1,68 +1,34 @@
-# Common Ambient Variables:
-# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
-# TARGET_TRIPLET is the current triplet (x86-windows, etc)
-# PORT is the current port name (zlib, etc)
-# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
-# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
-#
-
include(vcpkg_common_functions)
-find_program(GIT git)
-
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)
-
-set(GIT_URL "https://github.com/KhronosGroup/SPIRV-Tools.git")
-set(GIT_REF "f72189c249ba143c6a89a4cf1e7d53337b2ddd40")
-
-if(NOT EXISTS "${DOWNLOADS}/spirv-tools.git")
- message(STATUS "Cloning")
- vcpkg_execute_required_process(
- COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/spirv-tools.git
- WORKING_DIRECTORY ${DOWNLOADS}
- LOGNAME clone
- )
-endif()
-if(NOT EXISTS "${SOURCE_PATH}/.git")
- message(STATUS "Adding worktree and patching")
- file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR})
- vcpkg_execute_required_process(
- COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH} ${GIT_REF}
- WORKING_DIRECTORY ${DOWNLOADS}/spirv-tools.git
- LOGNAME worktree
- )
- message(STATUS "Patching")
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(WARNING "Dynamic not supported. Building static")
+ set(VCPKG_LIBRARY_LINKAGE "static")
endif()
-set(SPIRVHEADERS_GIT_URL "https://github.com/KhronosGroup/SPIRV-Headers.git")
-set(SPIRVHEADERS_GIT_REF "bd47a9abaefac00be692eae677daed1b977e625c")
-
-if(NOT EXISTS "${DOWNLOADS}/SPIRV-Headers.git")
- message(STATUS "Cloning")
- vcpkg_execute_required_process(
- COMMAND ${GIT} clone --bare ${SPIRVHEADERS_GIT_URL} ${DOWNLOADS}/SPIRV-Headers.git
- WORKING_DIRECTORY ${DOWNLOADS}
- LOGNAME clone
- )
-endif()
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO KhronosGroup/SPIRV-Tools
+ REF 7e2d26c77b606b21af839b37fd21381c4a669f23
+ SHA512 67e8fcdcb9748df1e7c86bb50358a89b656f80a96534bc5771afc4ce22e9ebcc8ca382f784fab7b856324d487f810c21abaaab2facee7453c0343a9b51d7e60b
+ HEAD_REF master
+)
-if(NOT EXISTS "${SOURCE_PATH}/external/spirv-headers/.git")
- message(STATUS "Adding worktree and patching")
- file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR})
- vcpkg_execute_required_process(
- COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH}/external/spirv-headers ${SPIRVHEADERS_GIT_REF}
- WORKING_DIRECTORY ${DOWNLOADS}/SPIRV-Headers.git
- LOGNAME worktree
- )
-endif()
+vcpkg_from_github(
+ OUT_SOURCE_PATH SPIRV_HEADERS_PATH
+ REPO KhronosGroup/SPIRV-Headers
+ REF 2bb92e6fe2c6aa410152fc6c63443f452acb1a65
+ SHA512 cdd1437a67c7e31e2062e5d0f25c767b99a3fadd64b91d00c3b07404e535bb4bfd78a43878ebbcd45e013a7153f1a2c969da99d50a99cc39efab940d0aab7cfd
+ HEAD_REF master
+)
-set(VCPKG_LIBRARY_LINKAGE "static")
+vcpkg_find_acquire_program(PYTHON3)
+get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
+set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}")
vcpkg_configure_cmake(
- SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src"
- # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
- # OPTIONS_RELEASE -DOPTIMIZE=1
- # OPTIONS_DEBUG -DDEBUGGABLE=1
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS -DSPIRV-Headers_SOURCE_DIR=${SPIRV_HEADERS_PATH}
)
vcpkg_install_cmake()
diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL
index d833f02b9..b444a953a 100644
--- a/ports/sqlite3/CONTROL
+++ b/ports/sqlite3/CONTROL
@@ -1,3 +1,3 @@
-Source: sqlite3
-Version: 3.19.1-1
-Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. \ No newline at end of file
+Source: sqlite3
+Version: 3.20.1
+Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.
diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake
index 768cd83a6..4bb53ef80 100644
--- a/ports/sqlite3/portfile.cmake
+++ b/ports/sqlite3/portfile.cmake
@@ -1,7 +1,7 @@
include(vcpkg_common_functions)
-set(SQLITE_VERSION 3190100)
-set(SQLITE_HASH 14064707d9ca029131ec92863026748e184ad4d6ca9d25e941fc254d9ad24f1451fc5fae6516603a420925aab1736e3fb92085f03d8dc47ec913839e158652c4)
+set(SQLITE_VERSION 3200100)
+set(SQLITE_HASH 66c325fec1c13ed5360899aa3e3a7a67d2b79d24dde954df7df7179c4d07e7b20edf831cc7107df863f3f8b0f30d21b934fcd0f7ea7b74409abbc0060bc28f7b)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sqlite-amalgamation-${SQLITE_VERSION})
vcpkg_download_distfile(ARCHIVE
diff --git a/ports/string-theory/CONTROL b/ports/string-theory/CONTROL
new file mode 100644
index 000000000..63bc5b656
--- /dev/null
+++ b/ports/string-theory/CONTROL
@@ -0,0 +1,3 @@
+Source: string-theory
+Version: 1.6
+Description: Flexible C++11 string library with type-safe formatting.
diff --git a/ports/string-theory/portfile.cmake b/ports/string-theory/portfile.cmake
new file mode 100644
index 000000000..8a6cb1fd1
--- /dev/null
+++ b/ports/string-theory/portfile.cmake
@@ -0,0 +1,42 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO zrax/string_theory
+ REF 1.6
+ SHA512 5bc99b6dfc2ab43d2812ee47dfbbeeb68106da39b2349799ab924f009270166ebb5508f87a37e634fbfa5495dd263697a582404650eedc5393722761c5ce2028
+ HEAD_REF master
+)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ set(ST_BUILD_STATIC ON)
+else()
+ set(ST_BUILD_STATIC OFF)
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DST_BUILD_STATIC=${ST_BUILD_STATIC}
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/string_theory")
+
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/string-theory ${CURRENT_PACKAGES_DIR}/share/string_theory)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/string-theory)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/string-theory/LICENSE ${CURRENT_PACKAGES_DIR}/share/string-theory/copyright)
+file(COPY ${CURRENT_PACKAGES_DIR}/share/string-theory/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/string_theory/copyright)
diff --git a/ports/suitesparse/CONTROL b/ports/suitesparse/CONTROL
index 000132c37..af5e1b631 100644
--- a/ports/suitesparse/CONTROL
+++ b/ports/suitesparse/CONTROL
@@ -1,4 +1,4 @@
Source: suitesparse
-Version: 4.5.5-2
+Version: 4.5.5-3
Build-Depends: metis, clapack
Description: algebra library
diff --git a/ports/sundials/CONTROL b/ports/sundials/CONTROL
index b1f0c349b..376a430fc 100644
--- a/ports/sundials/CONTROL
+++ b/ports/sundials/CONTROL
@@ -1,3 +1,3 @@
Source: sundials
-Version: 2.7.0
+Version: 2.7.0-1
Description: SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers)
diff --git a/ports/szip/CONTROL b/ports/szip/CONTROL
index acc364810..c775581ad 100644
--- a/ports/szip/CONTROL
+++ b/ports/szip/CONTROL
@@ -1,3 +1,3 @@
Source: szip
-Version: 2.1-1
+Version: 2.1-2
Description: Szip compression software, providing lossless compression of scientific data
diff --git a/ports/tacopie/CONTROL b/ports/tacopie/CONTROL
index accbf0291..c0464c02b 100644
--- a/ports/tacopie/CONTROL
+++ b/ports/tacopie/CONTROL
@@ -1,3 +1,3 @@
Source: tacopie
-Version: 2.4.1-1
+Version: 2.4.1-2
Description: Tacopie is a TCP Client & Server C++11 library
diff --git a/ports/taglib/CONTROL b/ports/taglib/CONTROL
index dff921020..cc5fdb0f7 100644
--- a/ports/taglib/CONTROL
+++ b/ports/taglib/CONTROL
@@ -1,4 +1,4 @@
Source: taglib
-Version: 1.11.1-3
+Version: 1.11.1-4
Description: TagLib Audio Meta-Data Library
-Build-Depends: zlib \ No newline at end of file
+Build-Depends: zlib
diff --git a/ports/tbb/portfile.cmake b/ports/tbb/portfile.cmake
index d633a9b23..7bde0c416 100644
--- a/ports/tbb/portfile.cmake
+++ b/ports/tbb/portfile.cmake
@@ -14,7 +14,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO 01org/tbb
REF 2017_U7
- SHA512 77fdd381eece8fb2fba4115af55d168e9d433bbdae3c21a53c35e7d5ed3397645fe75998ad10593b718f6959daaac05112401480cdb4fd2054f50b5f6f1a0df6
+ SHA512 e4a6fcc3cace9b57061e8661b09af9cb2be721224889af52f4c1b4faec1a130512b7c960e21171ebb8105593a81bd9b80bef20cda91bfac174d535d0f7ccb680
HEAD_REF tbb_2017)
if(TRIPLET_SYSTEM_ARCH STREQUAL x86)
diff --git a/ports/telnetpp/CONTROL b/ports/telnetpp/CONTROL
new file mode 100644
index 000000000..595e1cd88
--- /dev/null
+++ b/ports/telnetpp/CONTROL
@@ -0,0 +1,4 @@
+Source: telnetpp
+Version: 1.2.4
+Description: Telnet++ is an implementation of the Telnet Session Layer protocol using C++14
+Build-Depends: boost, gtest, zlib
diff --git a/ports/telnetpp/portfile.cmake b/ports/telnetpp/portfile.cmake
new file mode 100644
index 000000000..e52d69877
--- /dev/null
+++ b/ports/telnetpp/portfile.cmake
@@ -0,0 +1,47 @@
+if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
+ message(FATAL_ERROR "Telnetpp does not currently support UWP")
+endif()
+
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO KazDragon/telnetpp
+ REF v1.2.4
+ SHA512 16879fd377a7d13aac497bc9989c026acc1ed5b4eb9338d151d3d827c7c4c44fab84dd06c5fe55be4efe49a98ea46e62e80bbc51c8503d6ba1bf5534fee16c84
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+# Remove duplicate header files and CMake input file
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/include/telnetpp/version.hpp.in)
+
+# The install target in the upstream package does not install the binary output
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/telnetpp.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
+ file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/telnetpp.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
+# Move CMake installed configuration files and adjust for vcpkg debug location
+file(COPY ${CURRENT_PACKAGES_DIR}/lib/telnetpp/telnetpp-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp)
+file(COPY ${CURRENT_PACKAGES_DIR}/lib/telnetpp/telnetpp-config-release.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp)
+file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/telnetpp/telnetpp-config-debug.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/telnetpp)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/telnetpp)
+
+file(READ ${CURRENT_PACKAGES_DIR}/share/telnetpp/telnetpp-config-debug.cmake DEBUG_CONFIG)
+string(REPLACE "\${_IMPORT_PREFIX}/lib/telnetpp.lib"
+ "\${_IMPORT_PREFIX}/debug/lib/telnetpp.lib" DEBUG_CONFIG ${DEBUG_CONFIG})
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/telnetpp/telnetpp-config-debug.cmake "${DEBUG_CONFIG}")
+
+vcpkg_copy_pdbs()
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp RENAME COPYRIGHT)
diff --git a/ports/tesseract/CONTROL b/ports/tesseract/CONTROL
new file mode 100644
index 000000000..8aee14808
--- /dev/null
+++ b/ports/tesseract/CONTROL
@@ -0,0 +1,4 @@
+Source: tesseract
+Version: 3.05.01-1
+Description: An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google.
+Build-Depends: leptonica, icu
diff --git a/ports/tesseract/portfile.cmake b/ports/tesseract/portfile.cmake
new file mode 100644
index 000000000..31ed2cd1f
--- /dev/null
+++ b/ports/tesseract/portfile.cmake
@@ -0,0 +1,49 @@
+include(vcpkg_common_functions)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(STATUS "Warning: Dynamic building not supported yet. Building static.")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO tesseract-ocr/tesseract
+ REF 3.05.01
+ SHA512 a49c20c98386684cd89582e57b772811204fad8e5ff18214fb0da109f73629c70845054985e31e8deeb49107fbcf56e546aff661f08eb5dd60fbf83dbe976e81
+ HEAD_REF master
+)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/use-vcpkg-icu.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DSTATIC=ON
+ -DUSE_SYSTEM_ICU=True
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake")
+
+# Install tool
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/tesseract)
+file(COPY ${CURRENT_PACKAGES_DIR}/bin/tesseract.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tesseract)
+vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/tesseract)
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tesseract)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/tesseract/LICENSE ${CURRENT_PACKAGES_DIR}/share/tesseract/copyright)
diff --git a/ports/tesseract/use-vcpkg-icu.patch b/ports/tesseract/use-vcpkg-icu.patch
new file mode 100644
index 000000000..9c75726e1
--- /dev/null
+++ b/ports/tesseract/use-vcpkg-icu.patch
@@ -0,0 +1,11 @@
+--- a/training/CMakeLists.txt Thu Aug 17 02:46:15 2017
++++ b/training/CMakeLists.txt Thu Aug 17 02:46:15 2017
+@@ -11,7 +11,7 @@
+ endif()
+
+ # experimental
+-if (MSVC AND NOT CPPAN_BUILD)
++if (MSVC AND NOT CPPAN_BUILD AND NOT USE_SYSTEM_ICU)
+
+ include(CheckTypeSize)
+ check_type_size("void *" SIZEOF_VOID_P)
diff --git a/ports/theia/CONTROL b/ports/theia/CONTROL
index 554009d2d..56e2181a3 100644
--- a/ports/theia/CONTROL
+++ b/ports/theia/CONTROL
@@ -1,4 +1,4 @@
Source: theia
-Version: 0.7-d15154a
+Version: 0.7-d15154a-1
Build-Depends: flann, cereal, ceres, openimageio, glew, freeglut
-Description: An open source library for multiview geometry and structure from motion \ No newline at end of file
+Description: An open source library for multiview geometry and structure from motion
diff --git a/ports/theia/portfile.cmake b/ports/theia/portfile.cmake
index a45089225..8ac920d57 100644
--- a/ports/theia/portfile.cmake
+++ b/ports/theia/portfile.cmake
@@ -9,7 +9,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO sweeneychris/TheiaSfM
REF d15154a6c30ea48e7d135be126e2936802e476ad
- SHA512 e3cb29b1806b6d2ed161c28432ad8788f756e03db55f883bfa2c4b389b506aa46909f0de57460e93e38926d8103382c54f51685bb9035688e4c7378f913c2de0
+ SHA512 aaf6e9737d04499f0ffd453952380f2e1aa3aab2a75487d6806bfab60aa972719d7349730eab3d1b37088e99cf6c9076ae1cdea276f48532698226c69ac48977
HEAD_REF master
)
diff --git a/ports/thor/CONTROL b/ports/thor/CONTROL
index 46396427b..9ad978099 100644
--- a/ports/thor/CONTROL
+++ b/ports/thor/CONTROL
@@ -1,4 +1,4 @@
Source: thor
-Version: v2.0
+Version: v2.0-1
Description: Extends the multimedia library SFML with higher-level features
Build-Depends: sfml, aurora
diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL
index aef580f73..d7831632e 100644
--- a/ports/thrift/CONTROL
+++ b/ports/thrift/CONTROL
@@ -1,4 +1,4 @@
Source: thrift
-Version: 20172805-72ca60debae1d9fb35d9f0085118873669006d7f
+Version: 20172805-72ca60debae1d9fb35d9f0085118873669006d7f-1
Build-Depends: boost, zlib, libevent, openssl
Description: Apache Thrift is a software project spanning a variety of programming languages and use cases. Our goal is to make reliable, performant communication and data serialization across languages as efficient and seamless as possible. Originally developed at Facebook, Thrift was open sourced in April 2007 and entered the Apache Incubator in May, 2008. Thrift became an Apache TLP in October, 2010.
diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake
index 94e8201bf..3cb280462 100644
--- a/ports/thrift/portfile.cmake
+++ b/ports/thrift/portfile.cmake
@@ -16,7 +16,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO apache/thrift
REF 72ca60debae1d9fb35d9f0085118873669006d7f
- SHA512 6050c66b176ad596d9632b224b8fb49aa3b823c977dacad729dbcdefb0da60eb983d3a32d9326b4317bae6755fb1fc4cee2cc6c282b3e1636a4528844c0f5915
+ SHA512 65023690ff04376e9e64c3e9a609640a6416a39a08bb26d31ec8799ec462bbf8631620edf9a10cdf13980b13813304263601598258cf27bbd5027f9f755c49fa
HEAD_REF master
)
diff --git a/ports/tiff/CONTROL b/ports/tiff/CONTROL
index f5727b475..0222fa809 100644
--- a/ports/tiff/CONTROL
+++ b/ports/tiff/CONTROL
@@ -1,4 +1,4 @@
Source: tiff
-Version: 4.0.8
+Version: 4.0.8-1
Build-Depends: zlib, libjpeg-turbo, liblzma (windows)
Description: A library that supports the manipulation of TIFF image files
diff --git a/ports/tiny-dnn/CONTROL b/ports/tiny-dnn/CONTROL
new file mode 100644
index 000000000..f12cc076f
--- /dev/null
+++ b/ports/tiny-dnn/CONTROL
@@ -0,0 +1,3 @@
+Source: tiny-dnn
+Version: 2017-10-09-dd906fed8c8aff8dc837657c42f9d55f8b793b0e
+Description: A C++14 implementation of deep learning. It is suitable for deep learning on limited computational resource.
diff --git a/ports/tiny-dnn/portfile.cmake b/ports/tiny-dnn/portfile.cmake
new file mode 100644
index 000000000..7e3baa92a
--- /dev/null
+++ b/ports/tiny-dnn/portfile.cmake
@@ -0,0 +1,15 @@
+#header-only library
+include(vcpkg_common_functions)
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO tiny-dnn/tiny-dnn
+ REF dd906fed8c8aff8dc837657c42f9d55f8b793b0e
+ SHA512 d853db7f49af1bece55337b93631c41191f3abd8287969f230330662fecc612e4e53ab789535fc6f9770ae0c8623d8e020e6036c2c804783d08f176a08c05d1b
+ HEAD_REF master
+)
+
+file(INSTALL ${SOURCE_PATH}/tiny_dnn DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+
+
+file(COPY ${CURRENT_BUILDTREES_DIR}/src/tiny-dnn-dd906fed8c8aff8dc837657c42f9d55f8b793b0e/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiny-dnn)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/share/tiny-dnn/LICENSE ${CURRENT_PACKAGES_DIR}/share/tiny-dnn/copyright) \ No newline at end of file
diff --git a/ports/tinyexr/portfile.cmake b/ports/tinyexr/portfile.cmake
index bf725cddd..6ef6439d5 100644
--- a/ports/tinyexr/portfile.cmake
+++ b/ports/tinyexr/portfile.cmake
@@ -4,7 +4,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tinyexr-d16ea6347ae78bcee984fb57ca
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/syoyo/tinyexr/archive/d16ea6347ae78bcee984fb57cab1f023aeda4fb0.tar.gz"
FILENAME "tinyexr-v0.9.5-d16ea6.tar.gz"
- SHA512 189ab04f6c5fb50c20ac0515a83ee16cba4b0f1bca004db2926281077868d1384e0c54f81768a54b76286a17c1b0c45a0b82acaf22b7ee843dc87c654b09e950
+ SHA512 63399688d7894f9ac4b893b2142202b36108b5029b11c40c3f9ad0f0135625fb0c8e0d54cec88d92c016774648dc829a946d9575c5f19afea56542c00759546e
)
vcpkg_extract_source_archive(${ARCHIVE})
diff --git a/ports/tinythread/CMakeLists.txt b/ports/tinythread/CMakeLists.txt
new file mode 100644
index 000000000..ec8b3634c
--- /dev/null
+++ b/ports/tinythread/CMakeLists.txt
@@ -0,0 +1,25 @@
+cmake_minimum_required(VERSION 3.8.0)
+
+project(tinythread)
+
+if(MSVC)
+ add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
+endif()
+
+if(BUILD_SHARED_LIBS)
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+endif()
+
+include_directories(source)
+
+add_library(tinythread source/tinythread.cpp)
+
+install(
+ TARGETS tinythread
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES source/tinythread.h source/fast_mutex.h DESTINATION include)
+endif()
diff --git a/ports/tinythread/CONTROL b/ports/tinythread/CONTROL
new file mode 100644
index 000000000..d438e8721
--- /dev/null
+++ b/ports/tinythread/CONTROL
@@ -0,0 +1,3 @@
+Source: tinythread
+Version: 1.1-1
+Description: Implements a fairly compatible subset of the C++11 thread management classes
diff --git a/ports/tinythread/portfile.cmake b/ports/tinythread/portfile.cmake
new file mode 100644
index 000000000..23903e30e
--- /dev/null
+++ b/ports/tinythread/portfile.cmake
@@ -0,0 +1,21 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/TinyThread++-1.1")
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://tinythreadpp.bitsnbites.eu/files/TinyThread%2B%2B-1.1-src.tar.bz2"
+ FILENAME "TinyThread++-1.1.tar.bz2"
+ SHA512 407f54fcf3f68dd7fec25e9e0749a1803dffa5d52d606905155714d29f519b5eae64ff654b11768fecc32c0123a78c48be37c47993e0caf157a63349a2f869c6
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+
+file(INSTALL "${SOURCE_PATH}/README.txt" DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinythread RENAME copyright)
diff --git a/ports/tinyxml/0001_use_stl.patch b/ports/tinyxml/0001_use_stl.patch
new file mode 100644
index 000000000..a36f930ee
--- /dev/null
+++ b/ports/tinyxml/0001_use_stl.patch
@@ -0,0 +1,27 @@
+From 5ca492fee93015411a0f10e0b2f1d3503bf962a1 Mon Sep 17 00:00:00 2001
+From: Mikhail Paulyshka <me@mixaill.tk>
+Date: Sun, 3 Sep 2017 21:43:36 +0300
+Subject: [PATCH] enforce STL usage
+
+---
+ tinyxml.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/tinyxml.h b/tinyxml.h
+index a3589e5..7195033 100644
+--- a/tinyxml.h
++++ b/tinyxml.h
+@@ -43,6 +43,10 @@ distribution.
+ #define DEBUG
+ #endif
+
++#ifndef TIXML_USE_STL
++#define TIXML_USE_STL
++#endif
++
+ #ifdef TIXML_USE_STL
+ #include <string>
+ #include <iostream>
+--
+2.12.2.windows.2
+
diff --git a/ports/tinyxml/CMakeLists.txt b/ports/tinyxml/CMakeLists.txt
new file mode 100644
index 000000000..9b55aa717
--- /dev/null
+++ b/ports/tinyxml/CMakeLists.txt
@@ -0,0 +1,25 @@
+cmake_minimum_required(VERSION 3.4)
+project(tinyxml)
+
+set(HEADERS "tinyxml.h")
+
+set(SOURCES "tinyxml.cpp"
+ "tinyxmlerror.cpp"
+ "tinyxmlparser.cpp"
+)
+
+option(BUILD_SHARED_LIBS "Build shared libs" OFF)
+
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
+add_library(tinyxml ${SOURCES})
+target_compile_definitions(tinyxml PRIVATE "-DTIXML_USE_STL")
+
+install(
+ TARGETS tinyxml
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+)
+
+install(FILES ${HEADERS} DESTINATION include)
diff --git a/ports/tinyxml/CONTROL b/ports/tinyxml/CONTROL
new file mode 100644
index 000000000..3d97a3312
--- /dev/null
+++ b/ports/tinyxml/CONTROL
@@ -0,0 +1,3 @@
+Source: tinyxml
+Version: 2.6.2-2
+Description: A simple, small, minimal, C++ XML parser that can be easily integrating into other programs.
diff --git a/ports/tinyxml/License.txt b/ports/tinyxml/License.txt
new file mode 100644
index 000000000..2987cf75f
--- /dev/null
+++ b/ports/tinyxml/License.txt
@@ -0,0 +1,20 @@
+TinyXML is released under the zlib license:
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any
+damages arising from the use of this software.
+
+Permission is granted to anyone to use this software for any
+purpose, including commercial applications, and to alter it and
+redistribute it freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must
+not claim that you wrote the original software. If you use this
+software in a product, an acknowledgment in the product documentation
+would be appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and
+must not be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source
+distribution. \ No newline at end of file
diff --git a/ports/tinyxml/portfile.cmake b/ports/tinyxml/portfile.cmake
new file mode 100644
index 000000000..54d462bb4
--- /dev/null
+++ b/ports/tinyxml/portfile.cmake
@@ -0,0 +1,30 @@
+include(vcpkg_common_functions)
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tinyxml)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://sourceforge.net/projects/tinyxml/files/tinyxml/2.6.2/tinyxml_2_6_2.tar.gz"
+ FILENAME "tinyxml_2_6_2.tar.gz"
+ SHA512 133b5db06131a90ad0c2b39b0063f1c8e65e67288a7e5d67e1f7d9ba32af10dc5dfa0462f9723985ee27debe8f09a10a25d4b5a5aaff2ede979b1cebe8e59d56
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/0001_use_stl.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml RENAME copyright)
diff --git a/ports/tinyxml2/CONTROL b/ports/tinyxml2/CONTROL
index aaa9a7c4f..c2b75c438 100644
--- a/ports/tinyxml2/CONTROL
+++ b/ports/tinyxml2/CONTROL
@@ -1,3 +1,3 @@
Source: tinyxml2
-Version: 5.0.1
+Version: 5.0.1-1
Description: A simple, small, efficient, C++ XML parser
diff --git a/ports/units/CONTROL b/ports/units/CONTROL
new file mode 100644
index 000000000..b66a3b828
--- /dev/null
+++ b/ports/units/CONTROL
@@ -0,0 +1,3 @@
+Source: units
+Version: 2.3.0
+Description: A compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies.
diff --git a/ports/units/portfile.cmake b/ports/units/portfile.cmake
new file mode 100644
index 000000000..910626f6d
--- /dev/null
+++ b/ports/units/portfile.cmake
@@ -0,0 +1,25 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO nholthaus/units
+ REF v2.3.0
+ SHA512 1b9d7806e82d0f437574562e647077b6d22c0add81a19b5ec71f53ab608642db2d785a70d03d13cb2eeea2a8bc2d20f112b6bdf49acf0afce44e8e07bb6b7c39
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ OPTIONS -DBUILD_TESTS=OFF
+)
+
+vcpkg_install_cmake()
+
+# Handle copyright/readme/package files
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/units RENAME copyright)
+file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/units)
+file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/unitsConfig.cmake ${CURRENT_PACKAGES_DIR}/share/units/unitsConfig.cmake)
+
+# remove uneeded directories
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) \ No newline at end of file
diff --git a/ports/urdfdom-headers/CONTROL b/ports/urdfdom-headers/CONTROL
new file mode 100644
index 000000000..0b967f459
--- /dev/null
+++ b/ports/urdfdom-headers/CONTROL
@@ -0,0 +1,3 @@
+Source: urdfdom-headers
+Version: 1.0.0-2
+Description: The URDF (U-Robot Description Format) headers provides core data structure headers for URDF.
diff --git a/ports/urdfdom-headers/portfile.cmake b/ports/urdfdom-headers/portfile.cmake
new file mode 100644
index 000000000..eb2c9020e
--- /dev/null
+++ b/ports/urdfdom-headers/portfile.cmake
@@ -0,0 +1,25 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO ros/urdfdom_headers
+ REF 1.0.0
+ SHA512 b1f63c1a13f062c987d6be4fcea5eea903577a710d44fdce077722b70d72eb65a265131beac1fdeba576bde189ebf51ac0eb19b2b06a34b0f9fb9dcbd437291a
+ HEAD_REF master
+ )
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake")
+
+# The config files for this project use underscore
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers ${CURRENT_PACKAGES_DIR}/share/urdfdom_headers)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/)
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers RENAME copyright)
diff --git a/ports/urdfdom/0001_use_math_defines.patch b/ports/urdfdom/0001_use_math_defines.patch
new file mode 100644
index 000000000..b791533aa
--- /dev/null
+++ b/ports/urdfdom/0001_use_math_defines.patch
@@ -0,0 +1,26 @@
+From a374a5b04db27fde58a11cc2ba5ea10a0d0a7dad Mon Sep 17 00:00:00 2001
+From: Mikhail Paulyshka <me@mixaill.tk>
+Date: Sun, 3 Sep 2017 23:24:55 +0300
+Subject: [PATCH] define _USE_MATH_DEFINES
+
+---
+ urdf_parser/CMakeLists.txt | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/urdf_parser/CMakeLists.txt b/urdf_parser/CMakeLists.txt
+index 333226e..2158965 100644
+--- a/urdf_parser/CMakeLists.txt
++++ b/urdf_parser/CMakeLists.txt
+@@ -1,5 +1,9 @@
+ include_directories(include)
+
++if(MSVC)
++add_definitions(-D_USE_MATH_DEFINES)
++endif()
++
+ add_library(urdfdom_world SHARED src/pose.cpp src/model.cpp src/link.cpp src/joint.cpp src/world.cpp)
+ target_link_libraries(urdfdom_world ${TinyXML_LIBRARIES} ${console_bridge_LIBRARIES})
+ set_target_properties(urdfdom_world PROPERTIES SOVERSION ${URDF_MAJOR_MINOR_VERSION})
+--
+2.12.2.windows.2
+
diff --git a/ports/urdfdom/0002_fix_exports.patch b/ports/urdfdom/0002_fix_exports.patch
new file mode 100644
index 000000000..727883f8d
--- /dev/null
+++ b/ports/urdfdom/0002_fix_exports.patch
@@ -0,0 +1,29 @@
+From 06aa5a06ee543102bf1a4057601adba3490dad60 Mon Sep 17 00:00:00 2001
+From: Mikhail Paulyshka <me@mixaill.tk>
+Date: Sun, 3 Sep 2017 23:55:11 +0300
+Subject: [PATCH] fix exports
+
+---
+ urdf_parser/CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/urdf_parser/CMakeLists.txt b/urdf_parser/CMakeLists.txt
+index 2158965..c209228 100644
+--- a/urdf_parser/CMakeLists.txt
++++ b/urdf_parser/CMakeLists.txt
+@@ -15,10 +15,12 @@ set_target_properties(urdfdom_model PROPERTIES SOVERSION ${URDF_MAJOR_MINOR_VERS
+ add_library(urdfdom_sensor SHARED src/urdf_sensor.cpp)
+ target_link_libraries(urdfdom_sensor urdfdom_model ${TinyXML_LIBRARIES} ${console_bridge_LIBRARIES})
+ set_target_properties(urdfdom_sensor PROPERTIES SOVERSION ${URDF_MAJOR_MINOR_VERSION})
++set_target_properties(urdfdom_sensor PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
+ add_library(urdfdom_model_state SHARED src/urdf_model_state.cpp src/twist.cpp)
+ target_link_libraries(urdfdom_model_state ${TinyXML_LIBRARIES} ${console_bridge_LIBRARIES})
+ set_target_properties(urdfdom_model_state PROPERTIES SOVERSION ${URDF_MAJOR_MINOR_VERSION})
++set_target_properties(urdfdom_model_state PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
+ # --------------------------------
+
+--
+2.12.2.windows.2
+
diff --git a/ports/urdfdom/CONTROL b/ports/urdfdom/CONTROL
new file mode 100644
index 000000000..71e036251
--- /dev/null
+++ b/ports/urdfdom/CONTROL
@@ -0,0 +1,4 @@
+Source: urdfdom
+Version: 1.0.0-2
+Description: Provides core data structures and a simple XML parsers for populating the class data structures from an URDF file.
+Build-Depends: console-bridge, tinyxml, urdfdom-headers
diff --git a/ports/urdfdom/portfile.cmake b/ports/urdfdom/portfile.cmake
new file mode 100644
index 000000000..bf0568f8c
--- /dev/null
+++ b/ports/urdfdom/portfile.cmake
@@ -0,0 +1,51 @@
+include(vcpkg_common_functions)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ message(STATUS "urdfdom does not support static linkage. Building dynamically.")
+ set(VCPKG_LIBRARY_LINKAGE dynamic)
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO ros/urdfdom
+ REF 1.0.0
+ SHA512 50a218e596bcc0cecff904db2fa626bebc3902c4fe1f5ff8e08195e462b4d9a8c416a41f4773cabbcc71490060d3feff7e8528a76b824569dc7fdb0bda01ec3f
+ HEAD_REF master
+)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/0001_use_math_defines.patch
+ ${CMAKE_CURRENT_LIST_DIR}/0002_fix_exports.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake")
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/)
+file(RENAME ${CURRENT_PACKAGES_DIR}/bin/ ${CURRENT_PACKAGES_DIR}/tools/urdfdom/)
+
+file(GLOB URDFDOM_DLLS_DEBUG ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll)
+foreach(URDFDOM_DLL_DEBUG ${URDFDOM_DLLS_DEBUG})
+ file(COPY ${URDFDOM_DLL_DEBUG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(REMOVE ${URDFDOM_DLL_DEBUG})
+endforeach()
+
+file(GLOB URDFDOM_DLLS_RELEASE ${CURRENT_PACKAGES_DIR}/lib/*.dll)
+foreach(URDFDOM_DLL_RELEASE ${URDFDOM_DLLS_RELEASE})
+ file(COPY ${URDFDOM_DLL_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE ${URDFDOM_DLL_RELEASE})
+endforeach()
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/urdfdom RENAME copyright)
diff --git a/ports/uriparser/CONTROL b/ports/uriparser/CONTROL
index 7bba4c357..76f975dad 100644
--- a/ports/uriparser/CONTROL
+++ b/ports/uriparser/CONTROL
@@ -1,3 +1,3 @@
Source: uriparser
-Version: 0.8.4
+Version: 0.8.4-1
Description: uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C. uriparser is cross-platform, fast, supports Unicode
diff --git a/ports/utf8proc/CONTROL b/ports/utf8proc/CONTROL
index 1dcbbbef1..84acd8986 100644
--- a/ports/utf8proc/CONTROL
+++ b/ports/utf8proc/CONTROL
@@ -1,3 +1,3 @@
Source: utf8proc
-Version: 2.1.0
+Version: 2.1.0-1
Description: Clean C library for processing UTF-8 Unicode data.
diff --git a/ports/utfz/CONTROL b/ports/utfz/CONTROL
index 26344d928..fd1854467 100644
--- a/ports/utfz/CONTROL
+++ b/ports/utfz/CONTROL
@@ -1,3 +1,3 @@
Source: utfz
-Version: 1.2
+Version: 1.2-1
Description: A tiny C++ library for parsing and encoding utf-8
diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL
index 4faab5bfe..3e202f42b 100644
--- a/ports/uwebsockets/CONTROL
+++ b/ports/uwebsockets/CONTROL
@@ -1,4 +1,4 @@
Source: uwebsockets
-Version: 0.14.4
+Version: 0.14.4-1
Build-Depends: libuv, openssl, zlib, boost
Description: Highly scalable cross-platform WebSocket & HTTP library for C++11 and Node.js
diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL
index 652c27700..22d1b1376 100644
--- a/ports/vtk/CONTROL
+++ b/ports/vtk/CONTROL
@@ -1,4 +1,4 @@
Source: vtk
-Version: 8.0.0-1
+Version: 8.0.0-3
Description: Software system for 3D computer graphics, image processing, and visualization
-Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj, lz4, libtheora
+Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj4, lz4, libtheora, libharu
diff --git a/ports/vtk/FindGDAL.cmake b/ports/vtk/FindGDAL.cmake
new file mode 100644
index 000000000..e4f2f303b
--- /dev/null
+++ b/ports/vtk/FindGDAL.cmake
@@ -0,0 +1,127 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+#.rst:
+# FindGDAL
+# --------
+#
+#
+#
+# Locate gdal
+#
+# This module accepts the following environment variables:
+#
+# ::
+#
+# GDAL_DIR or GDAL_ROOT - Specify the location of GDAL
+#
+#
+#
+# This module defines the following CMake variables:
+#
+# ::
+#
+# GDAL_FOUND - True if libgdal is found
+# GDAL_LIBRARY - A variable pointing to the GDAL library
+# GDAL_INCLUDE_DIR - Where to find the headers
+
+#
+# $GDALDIR is an environment variable that would
+# correspond to the ./configure --prefix=$GDAL_DIR
+# used in building gdal.
+#
+# Created by Eric Wing. I'm not a gdal user, but OpenSceneGraph uses it
+# for osgTerrain so I whipped this module together for completeness.
+# I actually don't know the conventions or where files are typically
+# placed in distros.
+# Any real gdal users are encouraged to correct this (but please don't
+# break the OS X framework stuff when doing so which is what usually seems
+# to happen).
+
+# This makes the presumption that you are include gdal.h like
+#
+#include "gdal.h"
+
+find_path(GDAL_INCLUDE_DIR gdal.h
+ HINTS
+ ENV GDAL_DIR
+ ENV GDAL_ROOT
+ PATH_SUFFIXES
+ include/gdal
+ include/GDAL
+ include
+ PATHS
+ ~/Library/Frameworks/gdal.framework/Headers
+ /Library/Frameworks/gdal.framework/Headers
+ /sw # Fink
+ /opt/local # DarwinPorts
+ /opt/csw # Blastwave
+ /opt
+)
+
+if(UNIX)
+ # Use gdal-config to obtain the library version (this should hopefully
+ # allow us to -lgdal1.x.y where x.y are correct version)
+ # For some reason, libgdal development packages do not contain
+ # libgdal.so...
+ find_program(GDAL_CONFIG gdal-config
+ HINTS
+ ENV GDAL_DIR
+ ENV GDAL_ROOT
+ PATH_SUFFIXES bin
+ PATHS
+ /sw # Fink
+ /opt/local # DarwinPorts
+ /opt/csw # Blastwave
+ /opt
+ )
+
+ if(GDAL_CONFIG)
+ exec_program(${GDAL_CONFIG} ARGS --libs OUTPUT_VARIABLE GDAL_CONFIG_LIBS)
+ if(GDAL_CONFIG_LIBS)
+ string(REGEX MATCHALL "-l[^ ]+" _gdal_dashl ${GDAL_CONFIG_LIBS})
+ string(REPLACE "-l" "" _gdal_lib "${_gdal_dashl}")
+ string(REGEX MATCHALL "-L[^ ]+" _gdal_dashL ${GDAL_CONFIG_LIBS})
+ string(REPLACE "-L" "" _gdal_libpath "${_gdal_dashL}")
+ endif()
+ endif()
+endif()
+
+find_library(GDAL_LIBRARY_RELEASE
+ NAMES ${_gdal_lib} gdal gdal_i gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL
+ HINTS
+ ENV GDAL_DIR
+ ENV GDAL_ROOT
+ ${_gdal_libpath}
+ PATH_SUFFIXES lib
+ PATHS
+ /sw
+ /opt/local
+ /opt/csw
+ /opt
+ /usr/freeware
+)
+
+find_library(GDAL_LIBRARY_DEBUG
+ NAMES ${_gdal_lib} gdald gdald_i gdald1.5.0 gdald1.4.0 gdald1.3.2 GDALD
+ HINTS
+ ENV GDAL_DIR
+ ENV GDAL_ROOT
+ ${_gdal_libpath}
+ PATH_SUFFIXES lib
+ PATHS
+ /sw
+ /opt/local
+ /opt/csw
+ /opt
+ /usr/freeware
+)
+
+include(SelectLibraryConfigurations)
+select_library_configurations(GDAL)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDAL DEFAULT_MSG GDAL_LIBRARY GDAL_INCLUDE_DIR)
+
+set(GDAL_LIBRARIES ${GDAL_LIBRARY})
+set(GDAL_INCLUDE_DIRS ${GDAL_INCLUDE_DIR})
diff --git a/ports/vtk/fix-find-libharu.patch b/ports/vtk/fix-find-libharu.patch
new file mode 100644
index 000000000..683f7bae6
--- /dev/null
+++ b/ports/vtk/fix-find-libharu.patch
@@ -0,0 +1,18 @@
+--- a/CMake/FindLibHaru.cmake Mon Jun 26 15:29:04 2017
++++ b/CMake/FindLibHaru.cmake Wed Aug 16 09:30:12 2017
+@@ -19,9 +19,13 @@
+
+ find_path(LIBHARU_INCLUDE_DIR hpdf.h)
+
+-find_library(LIBHARU_LIBRARY NAMES hpdf)
++find_library(LIBHARU_LIBRARY_RELEASE NAMES hpdf libhpdf)
++find_library(LIBHARU_LIBRARY_DEBUG NAMES hpdfd libhpdfd)
+
+-# handle the QUIETLY and REQUIRED arguments and set FONTCONFIG_FOUND to TRUE if
++include(SelectLibraryConfigurations)
++select_library_configurations(LIBHARU)
++
++# handle the QUIETLY and REQUIRED arguments and set LIBHARU_FOUND to TRUE if
+ # all listed variables are TRUE
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(LibHaru DEFAULT_MSG
diff --git a/ports/vtk/fix-find-mysql.patch b/ports/vtk/fix-find-mysql.patch
new file mode 100644
index 000000000..d2f984cd5
--- /dev/null
+++ b/ports/vtk/fix-find-mysql.patch
@@ -0,0 +1,10 @@
+--- a/CMake/FindMySQL.cmake Mon Jun 26 15:29:04 2017
++++ b/CMake/FindMySQL.cmake Wed Aug 16 11:21:58 2017
+@@ -28,6 +28,7 @@
+ "C:/MySQL/include"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/include"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/include"
++ PATH_SUFFIXES mysql
+ DOC "Specify the directory containing mysql.h."
+ )
+
diff --git a/ports/vtk/fix-find-odbc.patch b/ports/vtk/fix-find-odbc.patch
new file mode 100644
index 000000000..0690ed0a9
--- /dev/null
+++ b/ports/vtk/fix-find-odbc.patch
@@ -0,0 +1,11 @@
+--- a/CMake/FindODBC.cmake Mon Jun 26 15:29:04 2017
++++ b/CMake/FindODBC.cmake Wed Aug 16 12:58:11 2017
+@@ -30,7 +30,7 @@
+ )
+
+ FIND_LIBRARY( ODBC_LIBRARY
+- NAMES odbc iodbc unixodbc
++ NAMES odbc iodbc unixodbc odbc32
+ PATHS
+ /usr/lib
+ /usr/lib/odbc
diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake
index ff9d457f1..c5ea4c387 100644
--- a/ports/vtk/portfile.cmake
+++ b/ports/vtk/portfile.cmake
@@ -1,13 +1,26 @@
include(vcpkg_common_functions)
+set(VTK_SHORT_VERSION "8.0")
+set(VTK_LONG_VERSION "${VTK_SHORT_VERSION}.0")
+
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO "Kitware/VTK"
- REF "v8.0.0"
+ REF "v${VTK_LONG_VERSION}"
SHA512 1a328f24df0b1c40c623ae80c9d49f8b27570144b10af02aeed41b90b50b8d4e0dd83d1341961f6818cde36e2cd793c578ebc95a46950cebfc518f486f249791
HEAD_REF "master"
)
+# =============================================================================
+# Options: These should be set by feature-packages when they become available
+set(VTK_WITH_QT ON ) # IMPORTANT: if ON make sure `qt5` is listed as dependency in the CONTROL file
+set(VTK_WITH_MPI ON ) # IMPORTANT: if ON make sure `mpi` is listed as dependency in the CONTROL file
+set(VTK_WITH_PYTHON OFF) # IMPORTANT: if ON make sure `python3` is listed as dependency in the CONTROL file
+set(VTK_WITH_ALL_MODULES OFF) # IMPORTANT: if ON make sure `qt5`, `mpi`, `python3`, `ffmpeg`, `gdal`, `fontconfig`,
+ # `libmysql` and `atlmfc` are listed as dependency in the CONTROL file
+
+# =============================================================================
+# Apply patches to the source code
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
@@ -28,33 +41,78 @@ vcpkg_apply_patches(
${CMAKE_CURRENT_LIST_DIR}/disable-workaround-findhdf5.patch
${CMAKE_CURRENT_LIST_DIR}/fix-find-libproj4.patch
+ ${CMAKE_CURRENT_LIST_DIR}/fix-find-libharu.patch
+ ${CMAKE_CURRENT_LIST_DIR}/fix-find-mysql.patch
+ ${CMAKE_CURRENT_LIST_DIR}/fix-find-odbc.patch
)
-# Remove the FindGLEW.cmake that is distributed with VTK, since it does not
-# detect the debug libraries correctly.
-# The default file distributed with CMake should be superior by all means.
+# Remove the FindGLEW.cmake and FindPythonLibs.cmake that are distributed with VTK,
+# since they do not detect the debug libraries correctly.
+# The default files distributed with CMake (>= 3.9) should be superior by all means.
+# For GDAL, the one distributed with CMake does not detect the debug libraries correctly,
+# so we provide an own one.
file(REMOVE ${SOURCE_PATH}/CMake/FindGLEW.cmake)
+file(REMOVE ${SOURCE_PATH}/CMake/FindPythonLibs.cmake)
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindGDAL.cmake DESTINATION ${SOURCE_PATH}/CMake)
+
+# =============================================================================
+# Collect CMake options for optional components
+if(VTK_WITH_QT)
+ list(APPEND ADDITIONAL_OPTIONS
+ -DVTK_Group_Qt=ON
+ -DVTK_QT_VERSION=5
+ -DVTK_BUILD_QT_DESIGNER_PLUGIN=OFF
+ )
+endif()
+
+if(VTK_WITH_MPI)
+ list(APPEND ADDITIONAL_OPTIONS
+ -DVTK_Group_MPI=ON
+ )
+endif()
+
+if(VTK_WITH_PYTHON)
+ list(APPEND ADDITIONAL_OPTIONS
+ -DVTK_WRAP_PYTHON=ON
+ -DVTK_PYTHON_VERSION=3
+ )
+endif()
+
+if(VTK_WITH_ALL_MODULES)
+ list(APPEND ADDITIONAL_OPTIONS
+ -DVTK_BUILD_ALL_MODULES=ON
+ -DVTK_USE_TK=OFF # TCL/TK currently not included in vcpkg
+ # -DVTK_USE_SYSTEM_AUTOBAHN=ON
+ # -DVTK_USE_SYSTEM_SIX=ON
+ # -DVTK_USE_SYSTEM_MPI4PY=ON
+ # -DVTK_USE_SYSTEM_CONSTANTLY=ON
+ # -DVTK_USE_SYSTEM_INCREMENTAL=ON
+ # -DVTK_USE_SYSTEM_TWISTED=ON
+ # -DVTK_USE_SYSTEM_XDMF2=ON
+ # -DVTK_USE_SYSTEM_XDMF3=ON
+ # -DVTK_USE_SYSTEM_ZFP=ON
+ # -DVTK_USE_SYSTEM_ZOPE=ON
+ )
+endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
list(APPEND ADDITIONAL_OPTIONS "-DVTK_EXTERNAL_HDF5_IS_SHARED=ON")
endif()
+# =============================================================================
+# Configure & Install
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
+ -DVTK_Group_Imaging=ON
+ -DVTK_Group_Views=ON
-DBUILD_TESTING=OFF
-DBUILD_EXAMPLES=OFF
- -DVTK_Group_MPI=ON
- -DVTK_Group_Qt=ON
- -DVTK_QT_VERSION=5
- -DVTK_BUILD_QT_DESIGNER_PLUGIN=OFF
- # -DVTK_WRAP_PYTHON=ON
- # -DVTK_PYTHON_VERSION=3
-DVTK_USE_SYSTEM_EXPAT=ON
-DVTK_USE_SYSTEM_FREETYPE=ON
# -DVTK_USE_SYSTEM_GL2PS=ON
- # -DVTK_USE_SYSTEM_LIBHARU=ON
+ -DVTK_USE_SYSTEM_LIBHARU=ON
-DVTK_USE_SYSTEM_JPEG=ON
-DVTK_USE_SYSTEM_GLEW=ON
-DVTK_USE_SYSTEM_HDF5=ON
@@ -85,9 +143,29 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
+# =============================================================================
+# Fixup target files
vcpkg_fixup_cmake_targets()
-# For VTK vcpkg_fixup_cmake_targets is not enough:
+# For some reason the references to the XDMF libraries in the target files do not end up
+# correctly, so we fix them here.
+if(VTK_WITH_ALL_MODULES)
+ file(READ ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake VTK_TARGETS_RELEASE_CONTENT)
+ string(REPLACE "lib/../XdmfCore.lib" "lib/XdmfCore.lib" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}")
+ string(REPLACE "bin/../XdmfCore.dll" "bin/XdmfCore.dll" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}")
+ string(REPLACE "lib/../vtkxdmf3.lib" "lib/vtkxdmf3.lib" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}")
+ string(REPLACE "bin/../vtkxdmf3.dll" "bin/vtkxdmf3.dll" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake "${VTK_TARGETS_RELEASE_CONTENT}")
+
+ file(READ ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake VTK_TARGETS_DEBUG_CONTENT)
+ string(REPLACE "lib/../XdmfCore.lib" "lib/XdmfCore.lib" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}")
+ string(REPLACE "bin/../XdmfCore.dll" "bin/XdmfCore.dll" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}")
+ string(REPLACE "lib/../vtkxdmf3.lib" "lib/vtkxdmf3.lib" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}")
+ string(REPLACE "bin/../vtkxdmf3.dll" "bin/vtkxdmf3.dll" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake "${VTK_TARGETS_DEBUG_CONTENT}")
+endif()
+
+# For VTK `vcpkg_fixup_cmake_targets` is not enough:
# Files for system third party dependencies are written to modules that
# are located in the paths `share/vtk/Modules` and `debug/share/vtk/Modules`.
# In the release folder, only the release libraries are referenced (e.g. "C:/vcpkg/installed/x64-windows/lib/zlib.lib").
@@ -158,8 +236,22 @@ set(SYSTEM_THIRD_PARTY_MODULES
vtkpng
vtktiff
vtkzlib
+ # vtkgl2ps
+ vtklibharu
)
+if(VTK_WITH_PYTHON OR VTK_WITH_ALL_MODULES)
+ list(APPEND SYSTEM_THIRD_PARTY_MODULES
+ vtkPython
+ )
+endif()
+
+if(VTK_WITH_ALL_MODULES)
+ list(APPEND SYSTEM_THIRD_PARTY_MODULES
+ AutobahnPython
+ )
+endif()
+
foreach(MODULE IN LISTS SYSTEM_THIRD_PARTY_MODULES)
_vtk_combine_third_party_libraries("${MODULE}")
endforeach()
@@ -172,16 +264,45 @@ file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" VTK_TARGETS_CONTE
string(REGEX REPLACE "${CURRENT_INSTALLED_DIR}/lib/[^\\.]*\\.lib" "" VTK_TARGETS_CONTENT "${VTK_TARGETS_CONTENT}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" "${VTK_TARGETS_CONTENT}")
-# Move executable to tools directory
+# =============================================================================
+# Move executable to tools directory and clean-up other directories
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/vtk)
-file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vtkEncodeString-8.0.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/vtkEncodeString-8.0.exe)
-file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vtkHashSource-8.0.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/vtkHashSource-8.0.exe)
-if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkEncodeString-8.0.exe)
- file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkHashSource-8.0.exe)
-else()
- # On static builds there should be no bin directory at all
+function(_vtk_move_tool TOOL_NAME)
+ if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}.exe)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/${TOOL_NAME}.exe)
+ endif()
+
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}.exe)
+endfunction()
+
+set(VTK_TOOLS
+ vtkEncodeString-${VTK_SHORT_VERSION}
+ vtkHashSource-${VTK_SHORT_VERSION}
+ vtkWrapTclInit-${VTK_SHORT_VERSION}
+ vtkWrapTcl-${VTK_SHORT_VERSION}
+ vtkWrapPythonInit-${VTK_SHORT_VERSION}
+ vtkWrapPython-${VTK_SHORT_VERSION}
+ vtkWrapJava-${VTK_SHORT_VERSION}
+ vtkWrapHierarchy-${VTK_SHORT_VERSION}
+ vtkParseJava-${VTK_SHORT_VERSION}
+ vtkParseOGLExt-${VTK_SHORT_VERSION}
+ vtkpython
+ pvtkpython
+)
+
+foreach(TOOL_NAME IN LISTS VTK_TOOLS)
+ _vtk_move_tool("${TOOL_NAME}")
+endforeach()
+
+# =============================================================================
+# Remove other files and directories that are not valid for vcpkg
+if(VTK_WITH_ALL_MODULES)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/XdmfConfig.cmake)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/XdmfConfig.cmake)
+endif()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
@@ -189,6 +310,7 @@ endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+# =============================================================================
# Handle copyright
file(COPY ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/vtk/Copyright.txt ${CURRENT_PACKAGES_DIR}/share/vtk/copyright)
diff --git a/ports/websocketpp/CONTROL b/ports/websocketpp/CONTROL
index f812dc565..f15164de2 100644
--- a/ports/websocketpp/CONTROL
+++ b/ports/websocketpp/CONTROL
@@ -1,4 +1,4 @@
Source: websocketpp
-Version: 0.7.0
+Version: 0.7.0-1
Build-Depends: zlib, openssl, boost
Description: Library that implements RFC6455 The WebSocket Protocol \ No newline at end of file
diff --git a/ports/websocketpp/openssl_110.patch b/ports/websocketpp/openssl_110.patch
new file mode 100644
index 000000000..93f4302e0
--- /dev/null
+++ b/ports/websocketpp/openssl_110.patch
@@ -0,0 +1,19 @@
+diff --git a/websocketpp/transport/asio/security/tls.hpp b/websocketpp/transport/asio/security/tls.hpp
+index 7b32db8..37173b7 100644
+--- a/websocketpp/transport/asio/security/tls.hpp
++++ b/websocketpp/transport/asio/security/tls.hpp
+@@ -355,7 +355,13 @@ protected:
+ template <typename ErrorCodeType>
+ lib::error_code translate_ec(ErrorCodeType ec) {
+ if (ec.category() == lib::asio::error::get_ssl_category()) {
+- if (ERR_GET_REASON(ec.value()) == SSL_R_SHORT_READ) {
++ if (
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++ ERR_GET_REASON(ec.value()) == SSL_R_SHORT_READ
++#else
++ false
++#endif
++ ) {
+ return make_error_code(transport::error::tls_short_read);
+ } else {
+ // We know it is a TLS related error, but otherwise don't know
diff --git a/ports/websocketpp/portfile.cmake b/ports/websocketpp/portfile.cmake
index 98a4d52e6..8531edd7d 100644
--- a/ports/websocketpp/portfile.cmake
+++ b/ports/websocketpp/portfile.cmake
@@ -9,6 +9,12 @@ vcpkg_download_distfile(ARCHIVE
)
vcpkg_extract_source_archive(${ARCHIVE})
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/openssl_110.patch
+)
+
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
# Put the license file where vcpkg expects it
diff --git a/ports/wildmidi/0001-add-install-target.patch b/ports/wildmidi/0001-add-install-target.patch
new file mode 100644
index 000000000..8270cd9ea
--- /dev/null
+++ b/ports/wildmidi/0001-add-install-target.patch
@@ -0,0 +1,30 @@
+--- a/src/CMakeLists.txt 2017-10-02 14:06:57.163881000 +0000
++++ b/src/CMakeLists.txt 2017-10-02 14:08:52.815977600 +0000
+@@ -313,6 +313,27 @@
+ ENDIF (WIN32 AND CMAKE_COMPILER_IS_MINGW)
+
+ IF (WIN32 AND MSVC)
++ # install our libraries
++ IF (WANT_STATIC)
++ INSTALL(TARGETS libwildmidi_static DESTINATION ${WILDMIDILIB_INSTALLDIR})
++ IF (WANT_PLAYERSTATIC)
++ INSTALL(TARGETS wildmidi-static DESTINATION bin)
++ ENDIF ()
++ ENDIF (WANT_STATIC)
++
++ IF (BUILD_SHARED_LIBS)
++ INSTALL(TARGETS libwildmidi_dynamic
++ ARCHIVE DESTINATION ${WILDMIDILIB_INSTALLDIR}
++ LIBRARY DESTINATION ${WILDMIDILIB_INSTALLDIR}
++ RUNTIME DESTINATION ${WILDMIDIDLL_INSTALLDIR}
++ )
++ IF (WANT_PLAYER)
++ INSTALL(TARGETS wildmidi DESTINATION bin)
++ ENDIF ()
++ ENDIF ()
++
++ INSTALL(FILES ${CMAKE_SOURCE_DIR}/include/wildmidi_lib.h DESTINATION include)
++
+ IF (WANT_MP_BUILD)
+ SET(MT_BUILD "/MP")
+ ENDIF ()
diff --git a/ports/wildmidi/0002-use-ansi.patch b/ports/wildmidi/0002-use-ansi.patch
new file mode 100644
index 000000000..68acb7b34
--- /dev/null
+++ b/ports/wildmidi/0002-use-ansi.patch
@@ -0,0 +1,22 @@
+diff --git a/src/file_io.c b/src/file_io.c
+index 9db9759..7110e8b 100644
+--- a/src/file_io.c
++++ b/src/file_io.c
+@@ -118,7 +118,7 @@ void *_WM_BufferFile(const char *filename, uint32_t *size) {
+ #elif defined(_WIN32)
+ int buffer_fd;
+ HANDLE h;
+- WIN32_FIND_DATA wfd;
++ WIN32_FIND_DATAA wfd;
+ #elif defined(__OS2__) || defined(__EMX__)
+ int buffer_fd;
+ HDIR h = HDIR_CREATE;
+@@ -186,7 +186,7 @@ void *_WM_BufferFile(const char *filename, uint32_t *size) {
+ }
+ *size = f.ff_fsize;
+ #elif defined(_WIN32)
+- if ((h = FindFirstFile(buffer_file, &wfd)) == INVALID_HANDLE_VALUE) {
++ if ((h = FindFirstFileA(buffer_file, &wfd)) == INVALID_HANDLE_VALUE) {
+ _WM_GLOBAL_ERROR(__FUNCTION__, __LINE__, WM_ERR_STAT, filename, ENOENT);
+ free(buffer_file);
+ return NULL;
diff --git a/ports/wildmidi/CONTROL b/ports/wildmidi/CONTROL
new file mode 100644
index 000000000..116333ec1
--- /dev/null
+++ b/ports/wildmidi/CONTROL
@@ -0,0 +1,3 @@
+Source: wildmidi
+Version: 0.4.1
+Description: MIDI software synthesizer library.
diff --git a/ports/wildmidi/portfile.cmake b/ports/wildmidi/portfile.cmake
new file mode 100644
index 000000000..d82895de4
--- /dev/null
+++ b/ports/wildmidi/portfile.cmake
@@ -0,0 +1,51 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/wildmidi-wildmidi-0.4.1)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/Mindwerks/wildmidi/archive/wildmidi-0.4.1.zip"
+ FILENAME "wildmidi-0.4.1.zip"
+ SHA512 ebfbb16b57c0d39f1402f91df4dd205d80f5632f6afbe5fa99af6f06279582f0676bb247cd64ec472cdf272f6a1a2917827ed98f9cc24166aa41f050b9f7d396
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/0001-add-install-target.patch
+ ${CMAKE_CURRENT_LIST_DIR}/0002-use-ansi.patch
+)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ set(BUILD_SHARED_LIBS "ON")
+ set(WANT_STATIC "OFF")
+else()
+ set(BUILD_SHARED_LIBS "OFF")
+ set(WANT_STATIC "ON")
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DMSVC=ON
+ -DWANT_PLAYER=OFF
+ -DWANT_STATIC=${WANT_STATIC}
+ -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+# Rename library to get rid of _dynamic and _static suffix
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/wildmidi_dynamic.lib ${CURRENT_PACKAGES_DIR}/lib/wildmidi.lib)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/wildmidi_dynamic.lib ${CURRENT_PACKAGES_DIR}/debug/lib/wildmidi.lib)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/bin/wildmidi_dynamic.dll ${CURRENT_PACKAGES_DIR}/bin/wildmidi.dll)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/wildmidi_dynamic.dll ${CURRENT_PACKAGES_DIR}/debug/bin/wildmidi.dll)
+else()
+ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/wildmidi_static.lib ${CURRENT_PACKAGES_DIR}/lib/wildmidi.lib)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/wildmidi_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/wildmidi.lib)
+endif()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/docs/license/LGPLv3.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wildmidi RENAME copyright)
diff --git a/ports/wincrypt/CONTROL b/ports/wincrypt/CONTROL
new file mode 100644
index 000000000..78803229c
--- /dev/null
+++ b/ports/wincrypt/CONTROL
@@ -0,0 +1,3 @@
+Source: wincrypt
+Version: 0.0
+Description: Windows Cryptography. \ No newline at end of file
diff --git a/ports/wincrypt/portfile.cmake b/ports/wincrypt/portfile.cmake
new file mode 100644
index 000000000..8ded1cdc4
--- /dev/null
+++ b/ports/wincrypt/portfile.cmake
@@ -0,0 +1,40 @@
+include(vcpkg_common_functions)
+
+vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT)
+vcpkg_get_windows_sdk(WINDOWS_SDK)
+
+if (WINDOWS_SDK MATCHES "10.")
+ set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\Crypt32.Lib")
+ set(LICENSEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Licenses\\${WINDOWS_SDK}\\sdk_license.rtf")
+ set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um")
+elseif(WINDOWS_SDK MATCHES "8.")
+ set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\Crypt32.Lib")
+ set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Include\\um")
+else()
+ message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}")
+endif()
+
+if (NOT EXISTS "${LIBFILEPATH}")
+ message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBFILEPATH}")
+endif()
+
+file(MAKE_DIRECTORY
+ ${CURRENT_PACKAGES_DIR}/include
+ ${CURRENT_PACKAGES_DIR}/lib
+ ${CURRENT_PACKAGES_DIR}/debug/lib
+ ${CURRENT_PACKAGES_DIR}/share/wincrypt
+)
+
+file(COPY
+ "${HEADERSPATH}\\Wincrypt.h"
+ DESTINATION ${CURRENT_PACKAGES_DIR}/include
+ )
+file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+
+if (DEFINED LICENSEPATH)
+ file(COPY ${LICENSEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/wincrypt)
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/wincrypt/copyright "See the accompanying sdk_license.rtf")
+else()
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/wincrypt/copyright "See https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license")
+endif() \ No newline at end of file
diff --git a/ports/winpcap/CONTROL b/ports/winpcap/CONTROL
new file mode 100644
index 000000000..3a09db558
--- /dev/null
+++ b/ports/winpcap/CONTROL
@@ -0,0 +1,3 @@
+Source: winpcap
+Version: 4.1.3-1
+Description: WinPcap is the industry-standard tool for link-layer network access in Windows environments.
diff --git a/ports/winpcap/create_bin.bat b/ports/winpcap/create_bin.bat
new file mode 100644
index 000000000..aa9e7f106
--- /dev/null
+++ b/ports/winpcap/create_bin.bat
@@ -0,0 +1,20 @@
+@echo off
+
+IF "%2"=="" (set WPDPACKDESTDIR=.\WpdPack\) ELSE (set WPDPACKDESTDIR=%2)
+
+IF ""=="%1" (set WINPCAPSOURCEDIR=.\) ELSE (set WINPCAPSOURCEDIR=%1)
+
+echo Creating \Lib folder
+mkdir %WPDPACKDESTDIR% >nul 2>nul
+mkdir %WPDPACKDESTDIR%\Bin >nul 2>nul
+mkdir %WPDPACKDESTDIR%\Bin\x64 >nul 2>nul
+
+xcopy /v /Y "%WINPCAPSOURCEDIR%\wpcap\PRJ\Release No AirPcap\x86\wpcap.dll" %WPDPACKDESTDIR%\Bin\ >nul
+xcopy /v /Y "%WINPCAPSOURCEDIR%\wpcap\PRJ\Release No AirPcap\x64\wpcap.dll" %WPDPACKDESTDIR%\Bin\x64 >nul
+xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\Release\x86\packet.dll %WPDPACKDESTDIR%\Bin\ >nul
+xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\Release\x64\packet.dll %WPDPACKDESTDIR%\Bin\x64 >nul
+
+echo Folder \Bin created successfully
+
+set WPDPACKDESTDIR=
+set WINPCAPSOURCEDIR= \ No newline at end of file
diff --git a/ports/winpcap/create_lib.patch b/ports/winpcap/create_lib.patch
new file mode 100644
index 000000000..8e144fa3d
--- /dev/null
+++ b/ports/winpcap/create_lib.patch
@@ -0,0 +1,19 @@
+diff --git a/create_lib.bat b/create_lib.bat
+index dbe511c..d431b88 100644
+--- a/create_lib.bat
++++ b/create_lib.bat
+@@ -9,12 +9,10 @@ mkdir %WPDPACKDESTDIR% >nul 2>nul
+ mkdir %WPDPACKDESTDIR%\Lib >nul 2>nul
+ mkdir %WPDPACKDESTDIR%\Lib\x64 >nul 2>nul
+
+-xcopy /v /Y %WINPCAPSOURCEDIR%\wpcap\PRJ\Release\x86\wpcap.lib %WPDPACKDESTDIR%\Lib\ >nul
+-xcopy /v /Y %WINPCAPSOURCEDIR%\wpcap\PRJ\Release\x64\wpcap.lib %WPDPACKDESTDIR%\Lib\x64 >nul
++xcopy /v /Y "%WINPCAPSOURCEDIR%\wpcap\PRJ\Release No AirPcap\x86\wpcap.lib" %WPDPACKDESTDIR%\Lib\ >nul
++xcopy /v /Y "%WINPCAPSOURCEDIR%\wpcap\PRJ\Release No AirPcap\x64\wpcap.lib" %WPDPACKDESTDIR%\Lib\x64 >nul
+ xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\Release\x86\packet.lib %WPDPACKDESTDIR%\Lib\ >nul
+ xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\Release\x64\packet.lib %WPDPACKDESTDIR%\Lib\x64 >nul
+-xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\libpacket.a %WPDPACKDESTDIR%\Lib\ >nul
+-xcopy /v /Y %WINPCAPSOURCEDIR%\wpcap\LIB\libwpcap.a %WPDPACKDESTDIR%\Lib\ >nul
+
+ echo Folder \Lib created successfully
+
diff --git a/ports/winpcap/packetNtx.patch.in b/ports/winpcap/packetNtx.patch.in
new file mode 100644
index 000000000..c19056a0c
--- /dev/null
+++ b/ports/winpcap/packetNtx.patch.in
@@ -0,0 +1,725 @@
+diff --git a/packetNtx/Dll/Project/Packet.dsp b/packetNtx/Dll/Project/Packet.dsp
+index 6e69440..fc520ce 100644
+--- a/packetNtx/Dll/Project/Packet.dsp
++++ b/packetNtx/Dll/Project/Packet.dsp
+@@ -55,8 +55,8 @@ RSC=rc.exe
+ # PROP Intermediate_Dir "Release"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_WANPACKET_API" /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c
+ # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD BASE RSC /l 0x410 /d "NDEBUG"
+@@ -87,8 +87,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib .
+ # PROP Intermediate_Dir "Debug"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_WANPACKET_API" /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c
+ # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD BASE RSC /l 0x410 /d "_DEBUG"
+@@ -120,8 +120,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib .
+ # PROP Intermediate_Dir "NT4_Debug"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /D "WIN32" /D "_WINDOWS" /YX /FD /c
+-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../common" /D "WIN32" /D "_WINDOWS" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c
+ # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD MTL /nologo /D "_DEBUG" /D "_WINNT4" /mktyplib203 /o "NUL" /win32
+ # ADD BASE RSC /l 0x410 /d "_DEBUG"
+@@ -154,8 +154,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib .
+ # PROP Intermediate_Dir "NT4_Release"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../common" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c
+-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../../../common" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c
+ # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD MTL /nologo /D "NDEBUG" /D "_WINNT4" /mktyplib203 /o "NUL" /win32
+ # ADD BASE RSC /l 0x410 /d "NDEBUG"
+@@ -187,8 +187,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib .
+ # PROP Intermediate_Dir "Debug_LOG_TO_FILE"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../dag/include" /I "../../../dag/drv/windows" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /YX /FD /c
+-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /FR /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../dag/include" /I "../../../dag/drv/windows" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /FR /YX /FD /c
+ # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD BASE RSC /l 0x410 /d "_DEBUG"
+@@ -221,8 +221,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib .
+ # PROP Intermediate_Dir "Release_LOG_TO_FILE"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../common" /I "../../../dag/include" /I "../../../dag/drv/windows" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /YX /FD /c
+-# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /FR /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../../../common" /I "../../../dag/include" /I "../../../dag/drv/windows" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@ /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /FR /YX /FD /c
+ # SUBTRACT CPP /u
+ # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+@@ -255,8 +255,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib .
+ # PROP Intermediate_Dir "NT4_Debug_LOG_TO_FILE"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c
+-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /D "_DEBUG_TO_FILE" /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../common" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /D "_DEBUG_TO_FILE" /YX /FD /c
+ # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD MTL /nologo /D "_DEBUG" /D "_WINNT4" /mktyplib203 /o "NUL" /win32
+ # ADD BASE RSC /l 0x410 /d "_DEBUG"
+@@ -289,8 +289,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib .
+ # PROP Intermediate_Dir "NT4_Release_LOG_TO_FILE"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../common" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c
+-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /D "_DEBUG_TO_FILE" /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../../../common" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /D "_DEBUG_TO_FILE" /YX /FD /c
+ # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD MTL /nologo /D "NDEBUG" /D "_WINNT4" /mktyplib203 /o "NUL" /win32
+ # ADD BASE RSC /l 0x410 /d "NDEBUG"
+@@ -323,8 +323,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib .
+ # PROP Intermediate_Dir "Debug_No_AirPcap"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../z1211u/airpcap/" /D "WIN32" /D "_WINDOWS" /D "HAVE_AIRPCAP_API" /YX /FD /c
+-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../z1211u/airpcap/" /D "WIN32" /D "_WINDOWS" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c
+ # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD BASE RSC /l 0x410 /d "_DEBUG"
+@@ -357,8 +357,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib .
+ # PROP Intermediate_Dir "Release_No_AirPcap"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../z1211u/airpcap/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_AIRPCAP_API" /YX /FD /c
+-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../z1211u/airpcap/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c
+ # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD BASE RSC /l 0x410 /d "NDEBUG"
+@@ -390,8 +390,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib .
+ # PROP Intermediate_Dir "Debug_No_NpfIm"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /D "_DBG" /YX /FD /c
+-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /I "../../../../NpfIm_DevPack" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /D "_DBG" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /I "../../../../NpfIm_DevPack" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c
+ # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD BASE RSC /l 0x410 /d "_DEBUG"
+@@ -424,8 +424,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib .
+ # PROP Intermediate_Dir "Release_No_NpfIm"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c
+-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /I "../../../../NpfIm_DevPack" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /I "../../../../NpfIm_DevPack" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c
+ # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD BASE RSC /l 0x410 /d "NDEBUG"
+@@ -457,8 +457,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib .
+ # PROP Intermediate_Dir "Debug_Vista"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c
+-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c
+ # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD BASE RSC /l 0x410 /d "_DEBUG"
+@@ -491,8 +491,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib .
+ # PROP Intermediate_Dir "Release_Vista"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c
+-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c
+ # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD BASE RSC /l 0x410 /d "NDEBUG"
+@@ -525,9 +525,9 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib .
+ # PROP Intermediate_Dir "Release_Vista_LOG_TO_FILE"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MT /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /FR /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /FR /YX /FD /c
+ # SUBTRACT BASE CPP /u
+-# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /FR /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@ /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /FR /YX /FD /c
+ # SUBTRACT CPP /u
+ # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+ # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+diff --git a/packetNtx/Dll/Project/Packet.vcproj b/packetNtx/Dll/Project/Packet.vcproj
+index 8be719e..e16afe2 100644
+--- a/packetNtx/Dll/Project/Packet.vcproj
++++ b/packetNtx/Dll/Project/Packet.vcproj
+@@ -22,7 +22,7 @@
+ Name="Debug|Win32"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="1"
+ >
+ <Tool
+@@ -44,7 +44,7 @@
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include"
+- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;HAVE_AIRPCAP_API;HAVE_AIRPCAP_API;HAVE_WANPACKET_API;HAVE_IPHELPER_API"
++ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;HAVE_IPHELPER_API"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+@@ -64,7 +64,7 @@
+ />
+ <Tool
+ Name="VCLinkerTool"
+- AdditionalDependencies="version.lib npptools.lib setupapi.lib ws2_32.lib iphlpapi.lib"
++ AdditionalDependencies="version.lib setupapi.lib ws2_32.lib iphlpapi.lib"
+ LinkIncremental="2"
+ ModuleDefinitionFile="..\packet.def"
+ GenerateDebugInformation="true"
+@@ -100,7 +100,7 @@
+ Name="Debug|x64"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="1"
+ >
+ <Tool
+@@ -123,7 +123,7 @@
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include"
+- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;HAVE_AIRPCAP_API;HAVE_WANPACKET_API;HAVE_IPHELPER_API"
++ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;HAVE_IPHELPER_API"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+@@ -143,7 +143,7 @@
+ />
+ <Tool
+ Name="VCLinkerTool"
+- AdditionalDependencies="version.lib npptools.lib setupapi.lib ws2_32.lib iphlpapi.lib"
++ AdditionalDependencies="version.lib setupapi.lib ws2_32.lib iphlpapi.lib"
+ LinkIncremental="2"
+ ModuleDefinitionFile="..\packet.def"
+ GenerateDebugInformation="true"
+@@ -179,7 +179,7 @@
+ Name="Release|Win32"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+@@ -201,7 +201,7 @@
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include"
+- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;HAVE_AIRPCAP_API;HAVE_WANPACKET_API;HAVE_IPHELPER_API"
++ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;HAVE_IPHELPER_API"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+@@ -219,7 +219,7 @@
+ />
+ <Tool
+ Name="VCLinkerTool"
+- AdditionalDependencies="version.lib npptools.lib setupapi.lib ws2_32.lib iphlpapi.lib"
++ AdditionalDependencies="version.lib setupapi.lib ws2_32.lib iphlpapi.lib"
+ LinkIncremental="1"
+ ModuleDefinitionFile="..\packet.def"
+ GenerateDebugInformation="true"
+@@ -257,7 +257,7 @@
+ Name="Release|x64"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+@@ -280,7 +280,7 @@
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include"
+- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; ;HAVE_AIRPCAP_API;HAVE_WANPACKET_API;HAVE_IPHELPER_API"
++ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; ;HAVE_IPHELPER_API"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+@@ -298,7 +298,7 @@
+ />
+ <Tool
+ Name="VCLinkerTool"
+- AdditionalDependencies="version.lib npptools.lib setupapi.lib ws2_32.lib iphlpapi.lib"
++ AdditionalDependencies="version.lib setupapi.lib ws2_32.lib iphlpapi.lib"
+ LinkIncremental="1"
+ ModuleDefinitionFile="..\packet.def"
+ GenerateDebugInformation="true"
+@@ -336,7 +336,7 @@
+ Name="Debug NT4|Win32"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="1"
+ >
+ <Tool
+@@ -415,7 +415,7 @@
+ Name="Debug NT4|x64"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="1"
+ >
+ <Tool
+@@ -458,7 +458,7 @@
+ />
+ <Tool
+ Name="VCLinkerTool"
+- AdditionalDependencies="version.lib npptools.lib"
++ AdditionalDependencies="version.lib"
+ LinkIncremental="2"
+ ModuleDefinitionFile="..\packet.def"
+ GenerateDebugInformation="true"
+@@ -494,7 +494,7 @@
+ Name="Release NT4|Win32"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+@@ -573,7 +573,7 @@
+ Name="Release NT4|x64"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+@@ -614,7 +614,7 @@
+ />
+ <Tool
+ Name="VCLinkerTool"
+- AdditionalDependencies="version.lib npptools.lib"
++ AdditionalDependencies="version.lib"
+ LinkIncremental="1"
+ ModuleDefinitionFile="..\packet.def"
+ GenerateDebugInformation="true"
+@@ -652,7 +652,7 @@
+ Name="Debug No NetMon|Win32"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="1"
+ >
+ <Tool
+@@ -674,7 +674,7 @@
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include"
+- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;HAVE_AIRPCAP_API;HAVE_IPHELPER_API"
++ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;HAVE_IPHELPER_API"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+@@ -731,7 +731,7 @@
+ Name="Debug No NetMon|x64"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="1"
+ >
+ <Tool
+@@ -754,7 +754,7 @@
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include"
+- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;HAVE_AIRPCAP_API;HAVE_IPHELPER_API"
++ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;HAVE_IPHELPER_API"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+@@ -811,7 +811,7 @@
+ Name="Release No NetMon|Win32"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+@@ -833,7 +833,7 @@
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include"
+- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;HAVE_AIRPCAP_API;HAVE_IPHELPER_API"
++ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;HAVE_IPHELPER_API"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+@@ -890,7 +890,7 @@
+ Name="Release No NetMon|x64"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+@@ -913,7 +913,7 @@
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include"
+- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; ;HAVE_AIRPCAP_API;HAVE_IPHELPER_API"
++ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; ;HAVE_IPHELPER_API"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+@@ -932,7 +932,7 @@
+ />
+ <Tool
+ Name="VCLinkerTool"
+- AdditionalDependencies="version.lib npptools.lib setupapi.lib ws2_32.lib iphlpapi.lib"
++ AdditionalDependencies="version.lib setupapi.lib ws2_32.lib iphlpapi.lib"
+ LinkIncremental="1"
+ ModuleDefinitionFile="..\packet.def"
+ GenerateDebugInformation="true"
+@@ -970,7 +970,7 @@
+ Name="Release LOG_TO_FILE|Win32"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+@@ -992,7 +992,7 @@
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include"
+- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;HAVE_AIRPCAP_API;HAVE_WANPACKET_API;HAVE_IPHELPER_API;_DEBUG_TO_FILE"
++ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;HAVE_IPHELPER_API;_DEBUG_TO_FILE"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+@@ -1010,7 +1010,7 @@
+ />
+ <Tool
+ Name="VCLinkerTool"
+- AdditionalDependencies="version.lib npptools.lib setupapi.lib ws2_32.lib iphlpapi.lib"
++ AdditionalDependencies="version.lib setupapi.lib ws2_32.lib iphlpapi.lib"
+ LinkIncremental="1"
+ ModuleDefinitionFile="..\packet.def"
+ GenerateDebugInformation="true"
+@@ -1048,7 +1048,7 @@
+ Name="Release LOG_TO_FILE|x64"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+@@ -1071,7 +1071,7 @@
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include"
+- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; ;HAVE_AIRPCAP_API;HAVE_WANPACKET_API;HAVE_IPHELPER_API;_DEBUG_TO_FILE"
++ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; ;HAVE_IPHELPER_API;_DEBUG_TO_FILE"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+@@ -1089,7 +1089,7 @@
+ />
+ <Tool
+ Name="VCLinkerTool"
+- AdditionalDependencies="version.lib npptools.lib setupapi.lib ws2_32.lib iphlpapi.lib"
++ AdditionalDependencies="version.lib setupapi.lib ws2_32.lib iphlpapi.lib"
+ LinkIncremental="1"
+ ModuleDefinitionFile="..\packet.def"
+ GenerateDebugInformation="true"
+@@ -1127,7 +1127,7 @@
+ Name="Release No NetMon LOG_TO_FILE|Win32"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+@@ -1149,7 +1149,7 @@
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include"
+- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;HAVE_AIRPCAP_API;HAVE_IPHELPER_API;_DEBUG_TO_FILE"
++ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;HAVE_IPHELPER_API;_DEBUG_TO_FILE"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+@@ -1206,7 +1206,7 @@
+ Name="Release No NetMon LOG_TO_FILE|x64"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+@@ -1229,7 +1229,7 @@
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include"
+- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; ;HAVE_AIRPCAP_API;HAVE_IPHELPER_API;_DEBUG_TO_FILE"
++ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS; ;HAVE_IPHELPER_API;_DEBUG_TO_FILE"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+@@ -1248,7 +1248,7 @@
+ />
+ <Tool
+ Name="VCLinkerTool"
+- AdditionalDependencies="version.lib npptools.lib setupapi.lib ws2_32.lib iphlpapi.lib"
++ AdditionalDependencies="version.lib setupapi.lib ws2_32.lib iphlpapi.lib"
+ LinkIncremental="1"
+ ModuleDefinitionFile="..\packet.def"
+ GenerateDebugInformation="true"
+@@ -1286,7 +1286,7 @@
+ Name="Release NT4 LOG_TO_FILE|Win32"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+@@ -1365,7 +1365,7 @@
+ Name="Release NT4 LOG_TO_FILE|x64"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+@@ -1406,7 +1406,7 @@
+ />
+ <Tool
+ Name="VCLinkerTool"
+- AdditionalDependencies="version.lib npptools.lib"
++ AdditionalDependencies="version.lib"
+ LinkIncremental="1"
+ ModuleDefinitionFile="..\packet.def"
+ GenerateDebugInformation="true"
+@@ -1462,82 +1462,6 @@
+ >
+ </File>
+ <File
+- RelativePath="..\WanPacket\WanPacket.cpp"
+- >
+- <FileConfiguration
+- Name="Debug NT4|Win32"
+- ExcludedFromBuild="true"
+- >
+- <Tool
+- Name="VCCLCompilerTool"
+- />
+- </FileConfiguration>
+- <FileConfiguration
+- Name="Release NT4|Win32"
+- ExcludedFromBuild="true"
+- >
+- <Tool
+- Name="VCCLCompilerTool"
+- />
+- </FileConfiguration>
+- <FileConfiguration
+- Name="Debug No NetMon|Win32"
+- ExcludedFromBuild="true"
+- >
+- <Tool
+- Name="VCCLCompilerTool"
+- />
+- </FileConfiguration>
+- <FileConfiguration
+- Name="Debug No NetMon|x64"
+- ExcludedFromBuild="true"
+- >
+- <Tool
+- Name="VCCLCompilerTool"
+- />
+- </FileConfiguration>
+- <FileConfiguration
+- Name="Release No NetMon|Win32"
+- ExcludedFromBuild="true"
+- >
+- <Tool
+- Name="VCCLCompilerTool"
+- />
+- </FileConfiguration>
+- <FileConfiguration
+- Name="Release No NetMon|x64"
+- ExcludedFromBuild="true"
+- >
+- <Tool
+- Name="VCCLCompilerTool"
+- />
+- </FileConfiguration>
+- <FileConfiguration
+- Name="Release No NetMon LOG_TO_FILE|Win32"
+- ExcludedFromBuild="true"
+- >
+- <Tool
+- Name="VCCLCompilerTool"
+- />
+- </FileConfiguration>
+- <FileConfiguration
+- Name="Release No NetMon LOG_TO_FILE|x64"
+- ExcludedFromBuild="true"
+- >
+- <Tool
+- Name="VCCLCompilerTool"
+- />
+- </FileConfiguration>
+- <FileConfiguration
+- Name="Release NT4 LOG_TO_FILE|Win32"
+- ExcludedFromBuild="true"
+- >
+- <Tool
+- Name="VCCLCompilerTool"
+- />
+- </FileConfiguration>
+- </File>
+- <File
+ RelativePath="..\..\driver\win_bpf_filter.c"
+ >
+ <FileConfiguration
+diff --git a/packetNtx/Dll/WanPacket/WanPacket.dsp b/packetNtx/Dll/WanPacket/WanPacket.dsp
+index 9ac30be..ed68158 100644
+--- a/packetNtx/Dll/WanPacket/WanPacket.dsp
++++ b/packetNtx/Dll/WanPacket/WanPacket.dsp
+@@ -42,8 +42,8 @@ RSC=rc.exe
+ # PROP Intermediate_Dir "Release"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WANPACKET_EXPORTS" /Yu"stdafx.h" /FD /c
+-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "..\..\..\Common" /I "..\..\driver" /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../../z1211u/airpcap/" /D "NDEBUG" /D "_MBCS" /D "_USRDLL" /D "WANPACKET_EXPORTS" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /D "__NPF_x86__" /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WANPACKET_EXPORTS" /Yu"stdafx.h" /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "..\..\..\Common" /I "..\..\driver" /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../../z1211u/airpcap/" /D "NDEBUG" /D "_MBCS" /D "_USRDLL" /D "WANPACKET_EXPORTS" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /D "__NPF_x86__" /FD /c
+ # SUBTRACT CPP /YX /Yc /Yu
+ # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+ # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+@@ -54,7 +54,7 @@ BSC32=bscmake.exe
+ # ADD BSC32 /nologo
+ LINK32=link.exe
+ # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+-# ADD LINK32 npptools.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /libpath:"..\..\WanPacket\Release\\" /opt:ref
++# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /libpath:"..\..\WanPacket\Release\\" /opt:ref
+ # SUBTRACT LINK32 /pdb:none
+
+ !ELSEIF "$(CFG)" == "WanPacket - Win32 Debug"
+@@ -70,8 +70,8 @@ LINK32=link.exe
+ # PROP Intermediate_Dir "Debug"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WANPACKET_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
+-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\Common" /I "..\..\driver" /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../../z1211u/airpcap/" /D "_DEBUG" /D "_MBCS" /D "_USRDLL" /D "WANPACKET_EXPORTS" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /D "__NPF_x86__" /FD /GZ /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WANPACKET_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "..\..\..\Common" /I "..\..\driver" /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../../z1211u/airpcap/" /D "_DEBUG" /D "_MBCS" /D "_USRDLL" /D "WANPACKET_EXPORTS" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /D "__NPF_x86__" /FD /GZ /c
+ # SUBTRACT CPP /YX /Yc /Yu
+ # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+ # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+@@ -82,7 +82,7 @@ BSC32=bscmake.exe
+ # ADD BSC32 /nologo
+ LINK32=link.exe
+ # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib npptools.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
++# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+
+ !ENDIF
+
+@@ -131,10 +131,6 @@ SOURCE=.\version.rc
+ # End Source File
+ # Begin Source File
+
+-SOURCE=.\WanPacket.cpp
+-# End Source File
+-# Begin Source File
+-
+ SOURCE=..\..\driver\win_bpf_filter.c
+ # End Source File
+ # End Group
+diff --git a/packetNtx/Dll/WanPacket/version.rc b/packetNtx/Dll/WanPacket/version.rc
+index 056db10..fc9b0ee 100644
+--- a/packetNtx/Dll/WanPacket/version.rc
++++ b/packetNtx/Dll/WanPacket/version.rc
+@@ -6,7 +6,7 @@
+ //
+ // Generated from the TEXTINCLUDE 2 resource.
+ //
+-#include "afxres.h"
++#include "winres.h"
+
+ /////////////////////////////////////////////////////////////////////////////
+ #undef APSTUDIO_READONLY_SYMBOLS
+@@ -34,7 +34,7 @@ END
+
+ 2 TEXTINCLUDE
+ BEGIN
+- "#include ""afxres.h""\r\n"
++ "#include ""winres.h""\r\n"
+ "\0"
+ END
+
+diff --git a/packetNtx/Dll/version.rc b/packetNtx/Dll/version.rc
+index 056db10..fc9b0ee 100644
+--- a/packetNtx/Dll/version.rc
++++ b/packetNtx/Dll/version.rc
+@@ -6,7 +6,7 @@
+ //
+ // Generated from the TEXTINCLUDE 2 resource.
+ //
+-#include "afxres.h"
++#include "winres.h"
+
+ /////////////////////////////////////////////////////////////////////////////
+ #undef APSTUDIO_READONLY_SYMBOLS
+@@ -34,7 +34,7 @@ END
+
+ 2 TEXTINCLUDE
+ BEGIN
+- "#include ""afxres.h""\r\n"
++ "#include ""winres.h""\r\n"
+ "\0"
+ END
+
diff --git a/ports/winpcap/portfile.cmake b/ports/winpcap/portfile.cmake
new file mode 100644
index 000000000..05b0a2c83
--- /dev/null
+++ b/ports/winpcap/portfile.cmake
@@ -0,0 +1,186 @@
+# Common Ambient Variables:
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
+# PORT = current port name (zlib, etc)
+# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
+# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
+# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
+#
+
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/winpcap)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://www.winpcap.org/install/bin/WpcapSrc_4_1_3.zip"
+ FILENAME "WpcapSrc_4_1_3.zip"
+ SHA512 89a5109ed17f8069f7a43497f6fec817c58620dbc5fa506e52069b9113c5bc13f69c307affe611281cb727cfa0f8529d07044d41427e350b24468ccc89a87f33
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+if(VCPKG_CRT_LINKAGE STREQUAL "static")
+ set(CRT_LINKAGE "MT")
+elseif(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
+ set(CRT_LINKAGE "MD")
+endif()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+set(LIBRARY_LINKAGE "4")
+elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+set(LIBRARY_LINKAGE "2")
+endif()
+
+configure_file("${CMAKE_CURRENT_LIST_DIR}/packetNtx.patch.in" "${CMAKE_CURRENT_LIST_DIR}/packetNtx.patch" @ONLY)
+configure_file("${CMAKE_CURRENT_LIST_DIR}/wpcap.patch.in" "${CMAKE_CURRENT_LIST_DIR}/wpcap.patch" @ONLY)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/packetNtx.patch"
+ "${CMAKE_CURRENT_LIST_DIR}/wpcap.patch"
+ "${CMAKE_CURRENT_LIST_DIR}/create_lib.patch"
+)
+
+file(
+ COPY
+ "${CURRENT_PORT_DIR}/create_bin.bat"
+ DESTINATION
+ ${SOURCE_PATH}
+)
+
+if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
+ set(PLATFORM Win32)
+elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
+ set(PLATFORM x64)
+endif()
+
+vcpkg_execute_required_process(
+ COMMAND "devenv.exe"
+ "Packet.sln"
+ /Upgrade
+ WORKING_DIRECTORY ${SOURCE_PATH}/packetNtx/Dll/Project
+ LOGNAME upgrade-Packet-${TARGET_TRIPLET}
+)
+
+vcpkg_build_msbuild(
+ PROJECT_PATH "${SOURCE_PATH}/packetNtx/Dll/Project/Packet.sln"
+ PLATFORM ${PLATFORM}
+)
+
+vcpkg_find_acquire_program(BISON)
+vcpkg_find_acquire_program(FLEX)
+
+vcpkg_execute_required_process(
+ COMMAND ${SOURCE_PATH}/wpcap/PRJ/build_scanner_parser.bat
+ WORKING_DIRECTORY ${SOURCE_PATH}
+ LOGNAME build_scanner_parser-${TARGET_TRIPLET}
+)
+
+vcpkg_execute_required_process(
+ COMMAND "devenv.exe"
+ "wpcap.sln"
+ /Upgrade
+ WORKING_DIRECTORY ${SOURCE_PATH}/wpcap/PRJ
+ LOGNAME upgrade-wpcap-${TARGET_TRIPLET}
+)
+
+vcpkg_build_msbuild(
+ PROJECT_PATH "${SOURCE_PATH}/wpcap/PRJ/wpcap.sln"
+ RELEASE_CONFIGURATION "Release - No AirPcap"
+ DEBUG_CONFIGURATION "Debug - No AirPcap"
+ PLATFORM ${PLATFORM}
+)
+
+vcpkg_execute_required_process(
+ COMMAND ${SOURCE_PATH}/create_include.bat
+ WORKING_DIRECTORY ${SOURCE_PATH}
+ LOGNAME create_include-${TARGET_TRIPLET}
+)
+
+file(
+ INSTALL
+ "${SOURCE_PATH}/WpdPack/Include/bittypes.h"
+ "${SOURCE_PATH}/WpdPack/Include/ip6_misc.h"
+ "${SOURCE_PATH}/WpdPack/Include/Packet32.h"
+ "${SOURCE_PATH}/WpdPack/Include/pcap.h"
+ "${SOURCE_PATH}/WpdPack/Include/pcap-bpf.h"
+ "${SOURCE_PATH}/WpdPack/Include/pcap-namedb.h"
+ "${SOURCE_PATH}/WpdPack/Include/pcap-stdinc.h"
+ "${SOURCE_PATH}/WpdPack/Include/remote-ext.h"
+ "${SOURCE_PATH}/WpdPack/Include/Win32-Extensions.h"
+ DESTINATION
+ ${CURRENT_PACKAGES_DIR}/include
+)
+
+file(
+ INSTALL
+ "${SOURCE_PATH}/WpdPack/Include/pcap/bluetooth.h"
+ "${SOURCE_PATH}/WpdPack/Include/pcap/bpf.h"
+ "${SOURCE_PATH}/WpdPack/Include/pcap/namedb.h"
+ "${SOURCE_PATH}/WpdPack/Include/pcap/pcap.h"
+ "${SOURCE_PATH}/WpdPack/Include/pcap/sll.h"
+ "${SOURCE_PATH}/WpdPack/Include/pcap/usb.h"
+ "${SOURCE_PATH}/WpdPack/Include/pcap/vlan.h"
+ DESTINATION
+ ${CURRENT_PACKAGES_DIR}/include/pcap
+)
+
+vcpkg_execute_required_process(
+ COMMAND ${SOURCE_PATH}/create_lib.bat
+ WORKING_DIRECTORY ${SOURCE_PATH}
+ LOGNAME create_lib-${TARGET_TRIPLET}
+)
+
+set(PCAP_LIBRARY_PATH "${SOURCE_PATH}/WpdPack/Lib")
+if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
+ set(PCAP_LIBRARY_PATH "${PCAP_LIBRARY_PATH}/x64")
+endif()
+
+file(
+ INSTALL
+ "${PCAP_LIBRARY_PATH}/Packet.lib"
+ "${PCAP_LIBRARY_PATH}/wpcap.lib"
+ DESTINATION
+ ${CURRENT_PACKAGES_DIR}/lib
+)
+
+file(
+ INSTALL
+ "${PCAP_LIBRARY_PATH}/Packet.lib"
+ "${PCAP_LIBRARY_PATH}/wpcap.lib"
+ DESTINATION
+ ${CURRENT_PACKAGES_DIR}/debug/lib
+)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ vcpkg_execute_required_process(
+ COMMAND ${SOURCE_PATH}/create_bin.bat
+ WORKING_DIRECTORY ${SOURCE_PATH}
+ LOGNAME create_bin-${TARGET_TRIPLET}
+ )
+
+ set(PCAP_BINARY_PATH "${SOURCE_PATH}/WpdPack/Bin")
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
+ set(PCAP_BINARY_PATH "${PCAP_BINARY_PATH}/x64")
+ endif()
+
+ file(
+ INSTALL
+ "${PCAP_BINARY_PATH}/Packet.dll"
+ "${PCAP_BINARY_PATH}/wpcap.dll"
+ DESTINATION
+ ${CURRENT_PACKAGES_DIR}/bin
+ )
+
+ file(
+ INSTALL
+ "${PCAP_BINARY_PATH}/Packet.dll"
+ "${PCAP_BINARY_PATH}/wpcap.dll"
+ DESTINATION
+ ${CURRENT_PACKAGES_DIR}/debug/bin
+ )
+endif()
+
+# Handle copyright
+file(DOWNLOAD "https://www.winpcap.org/misc/copyright.htm" ${SOURCE_PATH}/copyright.htm)
+file(INSTALL ${SOURCE_PATH}/copyright.htm DESTINATION ${CURRENT_PACKAGES_DIR}/share/winpcap RENAME copyright)
diff --git a/ports/winpcap/wpcap.patch.in b/ports/winpcap/wpcap.patch.in
new file mode 100644
index 000000000..01c8a38c8
--- /dev/null
+++ b/ports/winpcap/wpcap.patch.in
@@ -0,0 +1,414 @@
+diff --git a/wpcap/PRJ/wpcap.dsp b/wpcap/PRJ/wpcap.dsp
+index e53a865..0e4ed19 100644
+--- a/wpcap/PRJ/wpcap.dsp
++++ b/wpcap/PRJ/wpcap.dsp
+@@ -48,8 +48,8 @@ RSC=rc.exe
+ # PROP Intermediate_Dir "Release"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPCAP_EXPORTS" /YX /FD /c
+-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPCAP_EXPORTS" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c
+ # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+ # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+ # ADD BASE RSC /l 0x410 /d "NDEBUG"
+@@ -75,8 +75,8 @@ LINK32=link.exe
+ # PROP Intermediate_Dir "Debug"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPCAP_EXPORTS" /YX /FD /GZ /c
+-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPCAP_EXPORTS" /YX /FD /GZ /c
++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c
+ # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+ # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+ # ADD BASE RSC /l 0x410 /d "_DEBUG"
+@@ -103,8 +103,8 @@ LINK32=link.exe
+ # PROP Intermediate_Dir "Debug_REMOTE"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c
+-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c
++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c
+ # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+ # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+ # ADD BASE RSC /l 0x410 /d "_DEBUG"
+@@ -138,8 +138,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy
+ # PROP Intermediate_Dir "Debug_REMOTE_DAG"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c
+-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c
++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c
+ # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+ # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+ # ADD BASE RSC /l 0x410 /d "_DEBUG"
+@@ -173,8 +173,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy
+ # PROP Intermediate_Dir "Release_REMOTE"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c
+-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c
+ # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+ # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+ # ADD BASE RSC /l 0x410 /d "NDEBUG"
+@@ -208,8 +208,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy
+ # PROP Intermediate_Dir "Release_REMOTE_DAG"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c
+-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c
+ # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+ # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+ # ADD BASE RSC /l 0x410 /d "NDEBUG"
+@@ -243,8 +243,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy
+ # PROP Intermediate_Dir "Release_REMOTE_NO_AIRPCAP"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c
+-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c
+ # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+ # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+ # ADD BASE RSC /l 0x410 /d "NDEBUG"
+@@ -278,8 +278,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy
+ # PROP Intermediate_Dir "Debug_REMOTE_NO_AIRPCAP"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
+-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
+ # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+ # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+ # ADD BASE RSC /l 0x410 /d "_DEBUG"
+diff --git a/wpcap/PRJ/wpcap.vcproj b/wpcap/PRJ/wpcap.vcproj
+index c1d56b4..40a8ce1 100644
+--- a/wpcap/PRJ/wpcap.vcproj
++++ b/wpcap/PRJ/wpcap.vcproj
+@@ -22,7 +22,7 @@
+ Name="Debug|Win32"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="2"
+ >
+ <Tool
+@@ -44,7 +44,7 @@
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\libpcap;..\libpcap\lbl;..\libpcap\bpf\;..\..\common;..\libpcap\win32\include;..\Win32-Extensions;..\..\..\AirPcap_DevPack\include"
+- PreprocessorDefinitions="LIBPCAP_EXPORTS;WIN32;_DEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_SNPRINTF;HAVE_VSNPRINTF;HAVE_REMOTE;HAVE_AIRPCAP_API;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API"
++ PreprocessorDefinitions="LIBPCAP_EXPORTS;WIN32;_DEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_VSNPRINTF;HAVE_REMOTE;HAVE_AIRPCAP_API;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+@@ -102,7 +102,7 @@
+ Name="Debug|x64"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="2"
+ >
+ <Tool
+@@ -125,7 +125,7 @@
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\libpcap;..\libpcap\lbl;..\libpcap\bpf\;..\..\common;..\libpcap\win32\include;..\Win32-Extensions;..\..\..\AirPcap_DevPack\include"
+- PreprocessorDefinitions="LIBPCAP_EXPORTS;WIN32;_DEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_SNPRINTF;HAVE_VSNPRINTF;HAVE_REMOTE;HAVE_AIRPCAP_API;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API"
++ PreprocessorDefinitions="LIBPCAP_EXPORTS;WIN32;_DEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_VSNPRINTF;HAVE_REMOTE;HAVE_AIRPCAP_API;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+@@ -183,7 +183,7 @@
+ Name="Release|Win32"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+@@ -205,7 +205,7 @@
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\libpcap;..\libpcap\lbl;..\libpcap\bpf\;..\..\common;..\libpcap\win32\include;..\Win32-Extensions;..\..\..\AirPcap_DevPack\include"
+- PreprocessorDefinitions="LIBPCAP_EXPORTS;WIN32;NDEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_SNPRINTF;HAVE_VSNPRINTF;HAVE_REMOTE;HAVE_AIRPCAP_API;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API"
++ PreprocessorDefinitions="LIBPCAP_EXPORTS;WIN32;NDEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_VSNPRINTF;HAVE_REMOTE;HAVE_AIRPCAP_API;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+@@ -262,7 +262,7 @@
+ Name="Release|x64"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+@@ -285,7 +285,7 @@
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\libpcap;..\libpcap\lbl;..\libpcap\bpf\;..\..\common;..\libpcap\win32\include;..\Win32-Extensions;..\..\..\AirPcap_DevPack\include"
+- PreprocessorDefinitions="LIBPCAP_EXPORTS;WIN32;NDEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_SNPRINTF;HAVE_VSNPRINTF;HAVE_REMOTE;HAVE_AIRPCAP_API;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API"
++ PreprocessorDefinitions="LIBPCAP_EXPORTS;WIN32;NDEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_VSNPRINTF;HAVE_REMOTE;HAVE_AIRPCAP_API;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+@@ -342,7 +342,7 @@
+ Name="Debug No AirPcap|Win32"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="2"
+ >
+ <Tool
+@@ -364,7 +364,7 @@
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\libpcap;..\libpcap\lbl;..\libpcap\bpf\;..\..\common;..\libpcap\win32\include;..\Win32-Extensions"
+- PreprocessorDefinitions="LIBPCAP_EXPORTS;WIN32;_DEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_SNPRINTF;HAVE_VSNPRINTF;HAVE_REMOTE;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API"
++ PreprocessorDefinitions="LIBPCAP_EXPORTS;WIN32;_DEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_VSNPRINTF;HAVE_REMOTE;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+@@ -422,7 +422,7 @@
+ Name="Debug No AirPcap|x64"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="2"
+ >
+ <Tool
+@@ -445,7 +445,7 @@
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\libpcap;..\libpcap\lbl;..\libpcap\bpf\;..\..\common;..\libpcap\win32\include;..\Win32-Extensions"
+- PreprocessorDefinitions="LIBPCAP_EXPORTS;WIN32;_DEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_SNPRINTF;HAVE_VSNPRINTF;HAVE_REMOTE;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API"
++ PreprocessorDefinitions="LIBPCAP_EXPORTS;WIN32;_DEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_VSNPRINTF;HAVE_REMOTE;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+@@ -503,7 +503,7 @@
+ Name="Release No AirPcap|Win32"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x86"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+@@ -525,7 +525,7 @@
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\libpcap;..\libpcap\lbl;..\libpcap\bpf\;..\..\common;..\libpcap\win32\include;..\Win32-Extensions"
+- PreprocessorDefinitions="LIBPCAP_EXPORTS;WIN32;NDEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_SNPRINTF;HAVE_VSNPRINTF;HAVE_REMOTE;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API"
++ PreprocessorDefinitions="LIBPCAP_EXPORTS;WIN32;NDEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_VSNPRINTF;HAVE_REMOTE;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+@@ -582,7 +582,7 @@
+ Name="Release No AirPcap|x64"
+ OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+ IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x64"
+- ConfigurationType="2"
++ ConfigurationType="@LIBRARY_LINKAGE@"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+@@ -605,7 +605,7 @@
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\libpcap;..\libpcap\lbl;..\libpcap\bpf\;..\..\common;..\libpcap\win32\include;..\Win32-Extensions"
+- PreprocessorDefinitions="LIBPCAP_EXPORTS;WIN32;NDEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_SNPRINTF;HAVE_VSNPRINTF;HAVE_REMOTE;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API"
++ PreprocessorDefinitions="LIBPCAP_EXPORTS;WIN32;NDEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_VSNPRINTF;HAVE_REMOTE;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+diff --git a/wpcap/Win32-Extensions/version.rc b/wpcap/Win32-Extensions/version.rc
+index 056db10..fc9b0ee 100644
+--- a/wpcap/Win32-Extensions/version.rc
++++ b/wpcap/Win32-Extensions/version.rc
+@@ -6,7 +6,7 @@
+ //
+ // Generated from the TEXTINCLUDE 2 resource.
+ //
+-#include "afxres.h"
++#include "winres.h"
+
+ /////////////////////////////////////////////////////////////////////////////
+ #undef APSTUDIO_READONLY_SYMBOLS
+@@ -34,7 +34,7 @@ END
+
+ 2 TEXTINCLUDE
+ BEGIN
+- "#include ""afxres.h""\r\n"
++ "#include ""winres.h""\r\n"
+ "\0"
+ END
+
+diff --git a/wpcap/libpcap/Win32/Prj/libpcap.dsp b/wpcap/libpcap/Win32/Prj/libpcap.dsp
+index aa0c6fc..98ce24c 100644
+--- a/wpcap/libpcap/Win32/Prj/libpcap.dsp
++++ b/wpcap/libpcap/Win32/Prj/libpcap.dsp
+@@ -43,7 +43,7 @@ RSC=rc.exe
+ # PROP Intermediate_Dir "Release"
+ # PROP Target_Dir ""
+ # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_TC_API" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_VSNPRINTF" /D "HAVE_TC_API" /YX /FD /c
+ # ADD BASE RSC /l 0x409 /d "NDEBUG"
+ # ADD RSC /l 0x409 /d "NDEBUG"
+ BSC32=bscmake.exe
+@@ -66,7 +66,7 @@ LIB32=link.exe -lib
+ # PROP Intermediate_Dir "Debug"
+ # PROP Target_Dir ""
+ # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_TC_API" /YX /FD /GZ /c
++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_VSNPRINTF" /D "HAVE_TC_API" /YX /FD /GZ /c
+ # ADD BASE RSC /l 0x409 /d "_DEBUG"
+ # ADD RSC /l 0x409 /d "_DEBUG"
+ BSC32=bscmake.exe
+@@ -88,8 +88,8 @@ LIB32=link.exe -lib
+ # PROP Output_Dir "Debug_REMOTE"
+ # PROP Intermediate_Dir "Debug_REMOTE"
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /YX /FD /GZ /c
+-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_TC_API" /YX /FD /GZ /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_VSNPRINTF" /YX /FD /GZ /c
++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_TC_API" /YX /FD /GZ /c
+ # ADD BASE RSC /l 0x409 /d "_DEBUG"
+ # ADD RSC /l 0x409 /d "_DEBUG"
+ BSC32=bscmake.exe
+@@ -111,8 +111,8 @@ LIB32=link.exe -lib
+ # PROP Output_Dir "Release_REMOTE"
+ # PROP Intermediate_Dir "Release_REMOTE"
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /YX /FD /c
+-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_TC_API" /YX /FD /c
++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_VSNPRINTF" /YX /FD /c
++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_TC_API" /YX /FD /c
+ # ADD BASE RSC /l 0x409 /d "NDEBUG"
+ # ADD RSC /l 0x409 /d "NDEBUG"
+ BSC32=bscmake.exe
+diff --git a/wpcap/libpcap/pcap-int.h b/wpcap/libpcap/pcap-int.h
+index f20ce2e..d6d7559 100644
+--- a/wpcap/libpcap/pcap-int.h
++++ b/wpcap/libpcap/pcap-int.h
+@@ -456,8 +456,9 @@ int pcap_read(pcap_t *, int cnt, pcap_handler, u_char *);
+ #include <stdarg.h>
+
+ #if !defined(HAVE_SNPRINTF)
+-#define snprintf pcap_snprintf
+-extern int snprintf (char *, size_t, const char *, ...);
++#define snprintf _snprintf
++//#define snprintf pcap_snprintf
++//extern int snprintf (char *, size_t, const char *, ...);
+ #endif
+
+ #if !defined(HAVE_VSNPRINTF)
+diff --git a/wpcap/libpcap/rpcapd/rpcapd.dsp b/wpcap/libpcap/rpcapd/rpcapd.dsp
+index f7c00af..1cd823e 100644
+--- a/wpcap/libpcap/rpcapd/rpcapd.dsp
++++ b/wpcap/libpcap/rpcapd/rpcapd.dsp
+@@ -44,8 +44,8 @@ RSC=rc.exe
+ # PROP Intermediate_Dir "Debug_REMOTE"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c
+-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c
++# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c
++# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c
+ # ADD BASE RSC /l 0x409 /d "_DEBUG"
+ # ADD RSC /l 0x409 /d "_DEBUG"
+ BSC32=bscmake.exe
+@@ -69,8 +69,8 @@ LINK32=link.exe
+ # PROP Intermediate_Dir "Debug_REMOTE_DAG"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c
+-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /FR /YX /FD /GZ /c
++# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c
++# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /FR /YX /FD /GZ /c
+ # ADD BASE RSC /l 0x409 /d "_DEBUG"
+ # ADD RSC /l 0x409 /d "_DEBUG"
+ BSC32=bscmake.exe
+@@ -94,8 +94,8 @@ LINK32=link.exe
+ # PROP Intermediate_Dir "Release_REMOTE"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c
+-# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c
++# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c
++# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c
+ # ADD BASE RSC /l 0x409 /d "NDEBUG"
+ # ADD RSC /l 0x409 /d "NDEBUG"
+ BSC32=bscmake.exe
+@@ -120,8 +120,8 @@ LINK32=link.exe
+ # PROP Intermediate_Dir "Release_REMOTE_DAG"
+ # PROP Ignore_Export_Lib 0
+ # PROP Target_Dir ""
+-# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c
+-# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /YX /FD /c
++# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c
++# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /YX /FD /c
+ # ADD BASE RSC /l 0x409 /d "NDEBUG"
+ # ADD RSC /l 0x409 /d "NDEBUG"
+ BSC32=bscmake.exe
+diff --git a/wpcap/libpcap/rpcapd/rpcapd.vcproj b/wpcap/libpcap/rpcapd/rpcapd.vcproj
+index 882fbac..b89f1f9 100644
+--- a/wpcap/libpcap/rpcapd/rpcapd.vcproj
++++ b/wpcap/libpcap/rpcapd/rpcapd.vcproj
+@@ -41,7 +41,7 @@
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\;..\Win32\include;..\..\..\Common;.\Win32-pthreads;..\..\Win32-Extensions"
+- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_SNPRINTF;HAVE_VSNPRINTF;HAVE_REMOTE;WPCAP;_CRT_SECURE_NO_DEPRECATE;HAVE_TC_API"
++ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_VSNPRINTF;HAVE_REMOTE;WPCAP;_CRT_SECURE_NO_DEPRECATE;HAVE_TC_API"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+@@ -119,7 +119,7 @@
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\;..\Win32\include;..\..\..\Common;.\Win32-pthreads;..\..\Win32-Extensions"
+- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_SNPRINTF;HAVE_VSNPRINTF;HAVE_REMOTE;WPCAP;_CRT_SECURE_NO_DEPRECATE;HAVE_TC_API"
++ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_VSNPRINTF;HAVE_REMOTE;WPCAP;_CRT_SECURE_NO_DEPRECATE;HAVE_TC_API"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+diff --git a/wpcap/libpcap/rpcapd/version.rc b/wpcap/libpcap/rpcapd/version.rc
+index 056db10..fc9b0ee 100644
+--- a/wpcap/libpcap/rpcapd/version.rc
++++ b/wpcap/libpcap/rpcapd/version.rc
+@@ -6,7 +6,7 @@
+ //
+ // Generated from the TEXTINCLUDE 2 resource.
+ //
+-#include "afxres.h"
++#include "winres.h"
+
+ /////////////////////////////////////////////////////////////////////////////
+ #undef APSTUDIO_READONLY_SYMBOLS
+@@ -34,7 +34,7 @@ END
+
+ 2 TEXTINCLUDE
+ BEGIN
+- "#include ""afxres.h""\r\n"
++ "#include ""winres.h""\r\n"
+ "\0"
+ END
+
diff --git a/ports/winsock2/CONTROL b/ports/winsock2/CONTROL
new file mode 100644
index 000000000..4b56e50bf
--- /dev/null
+++ b/ports/winsock2/CONTROL
@@ -0,0 +1,3 @@
+Source: winsock2
+Version: 0.0
+Description: Windows Sockets. \ No newline at end of file
diff --git a/ports/winsock2/portfile.cmake b/ports/winsock2/portfile.cmake
new file mode 100644
index 000000000..81fd38992
--- /dev/null
+++ b/ports/winsock2/portfile.cmake
@@ -0,0 +1,40 @@
+include(vcpkg_common_functions)
+
+vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT)
+vcpkg_get_windows_sdk(WINDOWS_SDK)
+
+if (WINDOWS_SDK MATCHES "10.")
+ set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\Ws2_32.Lib")
+ set(LICENSEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Licenses\\${WINDOWS_SDK}\\sdk_license.rtf")
+ set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um")
+elseif(WINDOWS_SDK MATCHES "8.")
+ set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\Ws2_32.Lib")
+ set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Include\\um")
+else()
+ message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}")
+endif()
+
+if (NOT EXISTS "${LIBFILEPATH}")
+ message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBFILEPATH}")
+endif()
+
+file(MAKE_DIRECTORY
+ ${CURRENT_PACKAGES_DIR}/include
+ ${CURRENT_PACKAGES_DIR}/lib
+ ${CURRENT_PACKAGES_DIR}/debug/lib
+ ${CURRENT_PACKAGES_DIR}/share/winsock2
+)
+
+file(COPY
+ "${HEADERSPATH}\\Winsock2.h"
+ DESTINATION ${CURRENT_PACKAGES_DIR}/include
+ )
+file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+
+if (DEFINED LICENSEPATH)
+ file(COPY ${LICENSEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/winsock2)
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/winsock2/copyright "See the accompanying sdk_license.rtf")
+else()
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/winsock2/copyright "See https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license")
+endif() \ No newline at end of file
diff --git a/ports/wt/CONTROL b/ports/wt/CONTROL
index 5efc3e24c..43fa044ef 100644
--- a/ports/wt/CONTROL
+++ b/ports/wt/CONTROL
@@ -1,4 +1,4 @@
Source: wt
-Version: 3.3.7-1
+Version: 3.3.7-2
Description: Wt is a C++ library for developing web applications
Build-Depends: boost, openssl, sqlite3, libpq, pango
diff --git a/ports/xlnt/CONTROL b/ports/xlnt/CONTROL
index 0a9a86c0a..907b66b16 100644
--- a/ports/xlnt/CONTROL
+++ b/ports/xlnt/CONTROL
@@ -1,4 +1,3 @@
Source: xlnt
-Version: 0.9.4
+Version: 1.1.0-1
Description: Cross-platform user-friendly xlsx library for C++14
-Build-Depends: zlib, cryptopp, expat \ No newline at end of file
diff --git a/ports/xlnt/portfile.cmake b/ports/xlnt/portfile.cmake
index b4a0f5e62..e514cf8eb 100644
--- a/ports/xlnt/portfile.cmake
+++ b/ports/xlnt/portfile.cmake
@@ -1,12 +1,12 @@
include(vcpkg_common_functions)
-set(XLNT_REV 9dccde4bff34cfbafbdc3811fdd05326ac6bd0aa)
-set(XLNT_HASH 85bb651e42e33a829672ee76d14504fcbab683bb6b468d728837f1163b5ca1395c9aa80b3bed91a243e065599cdbf23cad769375f77792f71c173b02061771af)
-set(XLNT_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xlnt-${XLNT_REV})
+set(XLNT_VERSION 1.1.0)
+set(XLNT_HASH f0c59a2b241c6b219fbd8bb39705847e2b31332e413bc4aff7e0a8d4d4b9ef6750c03ecc49a196f647fdf60c3bec9f06c800bdb53b56648d2ba9fab359623f95)
+set(XLNT_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xlnt-${XLNT_VERSION})
vcpkg_download_distfile(ARCHIVE
- URLS https://github.com/tfussell/xlnt/archive/${XLNT_REV}.zip
- FILENAME xlnt-${XLNT_REV}.zip
+ URLS https://github.com/tfussell/xlnt/archive/v${XLNT_VERSION}.zip
+ FILENAME xlnt-${XLNT_VERSION}.zip
SHA512 ${XLNT_HASH}
)
diff --git a/ports/xxhash/CONTROL b/ports/xxhash/CONTROL
index 171a1b816..3ca3cb512 100644
--- a/ports/xxhash/CONTROL
+++ b/ports/xxhash/CONTROL
@@ -1,3 +1,3 @@
Source: xxhash
-Version: 0.6.2
+Version: 0.6.3-1
Description: Extremely fast hash algorithm
diff --git a/ports/xxhash/portfile.cmake b/ports/xxhash/portfile.cmake
index e1b913a44..3330174b8 100644
--- a/ports/xxhash/portfile.cmake
+++ b/ports/xxhash/portfile.cmake
@@ -1,24 +1,15 @@
include(vcpkg_common_functions)
-set(XXHASH_VERSION 0.6.2)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xxhash-${XXHASH_VERSION})
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/Cyan4973/xxHash/archive/v${XXHASH_VERSION}.zip"
- FILENAME "xxhash-${XXHASH_VERSION}.zip"
- SHA512 a2364421f46116a6e7f6bd686665fe4ee58670af6dad611ca626283c1b448fb1120ab3495903a5c8653d341ef22c0d244604edc20bf82a42734ffb4b871e2724)
-
-vcpkg_extract_source_archive(${ARCHIVE})
-
-if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
- set(XXH_STATIC ON)
-else()
- set(XXH_STATIC OFF)
-endif()
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO Cyan4973/xxHash
+ REF v0.6.3
+ SHA512 5b11009ecf142725c642be55e9072792709bd40d8674f30afdc13f9b9fd6936ea69e683c7b9df212b5126f9ba3925969fc0b65bb5518506b501bb339d3a29372
+ HEAD_REF dev)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/cmake_unofficial
PREFER_NINJA
OPTIONS
- -DBUILD_STATIC_LIBS=${XXH_STATIC}
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON)
vcpkg_install_cmake()
@@ -28,6 +19,10 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(READ ${CURRENT_PACKAGES_DIR}/include/xxhash.h XXHASH_H)
string(REPLACE "# define XXH_PUBLIC_API /* do nothing */" "# define XXH_PUBLIC_API __declspec(dllimport)" XXHASH_H "${XXHASH_H}")
file(WRITE ${CURRENT_PACKAGES_DIR}/include/xxhash.h "${XXHASH_H}")
+
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/xxhsum.exe ${CURRENT_PACKAGES_DIR}/debug/bin/xxhsum.exe)
+else()
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
diff --git a/ports/yaml-cpp/CONTROL b/ports/yaml-cpp/CONTROL
index 02490ca3a..0a9823da9 100644
--- a/ports/yaml-cpp/CONTROL
+++ b/ports/yaml-cpp/CONTROL
@@ -1,3 +1,3 @@
Source: yaml-cpp
-Version: 0.5.4-rc-1
+Version: 0.5.4-rc-2
Description: yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec.
diff --git a/ports/yaml-cpp/portfile.cmake b/ports/yaml-cpp/portfile.cmake
index 8d20458cb..82a0b3897 100644
--- a/ports/yaml-cpp/portfile.cmake
+++ b/ports/yaml-cpp/portfile.cmake
@@ -3,7 +3,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO jbeder/yaml-cpp
REF 380ecb404ef99ba132154ed43dd2b84136b30b14
- SHA512 36fa4432f1ee94049dc67c52c180efe1eddc7678bfc545437b0d751be1eecd94d541daabdbcb01acbb84a321f2c80d609ba2927c8458ad8499e007123ae25d4e
+ SHA512 30d344d271d15163be755c998b28750857355f26a3fdbaf620932b60e419a7f72884bc7fd65bf3076f4e5315e0f82aab6011406a8146e2c01ba3fc267723d5bc
HEAD_REF master
)
diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL
index 6b82f310a..b850b71b9 100644
--- a/ports/zeromq/CONTROL
+++ b/ports/zeromq/CONTROL
@@ -1,3 +1,3 @@
Source: zeromq
-Version: 4.2.2
+Version: 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2-1
Description: The ZeroMQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products
diff --git a/ports/zeromq/portfile.cmake b/ports/zeromq/portfile.cmake
index a530598eb..77d0da23d 100644
--- a/ports/zeromq/portfile.cmake
+++ b/ports/zeromq/portfile.cmake
@@ -1,75 +1,44 @@
-set(ZEROMQ_VERSION 4.2.2)
-set(ZEROMQ_HASH 4069813374d4e8d4c0f8debbe85472d0bd24cf644fb1bce748920eadffb81c429d28f523ef424df84fcaa7082b984fab8da57192802585811d37cff066f4e40c)
-
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libzmq-${ZEROMQ_VERSION})
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/zeromq/libzmq/archive/v${ZEROMQ_VERSION}.tar.gz"
- FILENAME "libzmq-${ZEROMQ_VERSION}.tar.gz"
- SHA512 ${ZEROMQ_HASH}
-)
-vcpkg_extract_source_archive(${ARCHIVE})
-# Map from triplet "x86" to "win32" as used in the vcxproj file.
-if (TRIPLET_SYSTEM_ARCH MATCHES "x86")
- set(MSBUILD_PLATFORM "Win32")
-else ()
- set(MSBUILD_PLATFORM ${TRIPLET_SYSTEM_ARCH})
-endif()
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO zeromq/libzmq
+ REF 18498f620f0f6d4076981ea16eb5760fe4d28dc2
+ SHA512 0c4a5c72455411f47283da3cad381600101be19a62437ad8e2c38e5f18fb6d621a3136e402c6eb9ba153f3d6333da9902335c2dacd8405094d4d1269df28d4af
+ HEAD_REF master
+)
-if(VCPKG_PLATFORM_TOOLSET MATCHES "v141")
- set(MSVS_VERSION 2017)
-else()
- set(MSVS_VERSION 2015)
-endif()
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES ${ARCHIVE}
+)
-if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- vcpkg_build_msbuild(
- PROJECT_PATH ${SOURCE_PATH}/builds/msvc/vs${MSVS_VERSION}/libzmq/libzmq.vcxproj
- RELEASE_CONFIGURATION ReleaseDLL
- DEBUG_CONFIGURATION DebugDLL
- )
- file(INSTALL
- ${SOURCE_PATH}/bin/${MSBUILD_PLATFORM}/Debug/${VCPKG_PLATFORM_TOOLSET}/dynamic/libzmq.dll
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
- )
- file(INSTALL
- ${SOURCE_PATH}/bin/${MSBUILD_PLATFORM}/Release/${VCPKG_PLATFORM_TOOLSET}/dynamic/libzmq.dll
- DESTINATION ${CURRENT_PACKAGES_DIR}/bin
- )
- file(INSTALL
- ${SOURCE_PATH}/bin/${MSBUILD_PLATFORM}/Debug/${VCPKG_PLATFORM_TOOLSET}/dynamic/libzmq.lib
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
- )
- file(INSTALL
- ${SOURCE_PATH}/bin/${MSBUILD_PLATFORM}/Release/${VCPKG_PLATFORM_TOOLSET}/dynamic/libzmq.lib
- DESTINATION ${CURRENT_PACKAGES_DIR}/lib
- )
- vcpkg_copy_pdbs()
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
+
+set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} \"-I${SOURCE_PATH}/builds/msvc\"")
+set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} \"-I${SOURCE_PATH}/builds/msvc\"")
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DZMQ_BUILD_TESTS=OFF
+ -DPOLLER=select
+ -DBUILD_STATIC=${BUILD_STATIC}
+ -DBUILD_SHARED=${BUILD_SHARED}
+ -DWITH_PERF_TOOL=OFF
+ OPTIONS_DEBUG
+ "-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"
+)
-else()
- vcpkg_build_msbuild(
- PROJECT_PATH ${SOURCE_PATH}/builds/msvc/vs${MSVS_VERSION}/libzmq/libzmq.vcxproj
- RELEASE_CONFIGURATION ReleaseLIB
- DEBUG_CONFIGURATION DebugLIB
- )
- file(INSTALL
- ${SOURCE_PATH}/bin/${MSBUILD_PLATFORM}/Debug/${VCPKG_PLATFORM_TOOLSET}/static/libzmq.lib
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
- )
- file(INSTALL
- ${SOURCE_PATH}/bin/${MSBUILD_PLATFORM}/Release/${VCPKG_PLATFORM_TOOLSET}/static/libzmq.lib
- DESTINATION ${CURRENT_PACKAGES_DIR}/lib
- )
-endif()
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
-file(INSTALL
- ${SOURCE_PATH}/include/
- DESTINATION ${CURRENT_PACKAGES_DIR}/include
-)
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/ZeroMQ)
# Handle copyright
-file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/zeromq)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/zeromq/COPYING ${CURRENT_PACKAGES_DIR}/share/zeromq/copyright)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/zmq/COPYING.LESSER.txt ${CURRENT_PACKAGES_DIR}/share/zeromq/copyright)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/zmq)
diff --git a/ports/zlib/CONTROL b/ports/zlib/CONTROL
index def1ef6be..c55963783 100644
--- a/ports/zlib/CONTROL
+++ b/ports/zlib/CONTROL
@@ -1,3 +1,3 @@
Source: zlib
-Version: 1.2.11
-Description: A compression library \ No newline at end of file
+Version: 1.2.11-3
+Description: A compression library
diff --git a/ports/zlib/cmake_dont_build_more_than_needed.patch b/ports/zlib/cmake_dont_build_more_than_needed.patch
new file mode 100644
index 000000000..229a2d055
--- /dev/null
+++ b/ports/zlib/cmake_dont_build_more_than_needed.patch
@@ -0,0 +1,42 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0fe939d..8d2f5f1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -7,6 +7,7 @@ set(VERSION "1.2.11")
+
+ option(ASM686 "Enable building i686 assembly implementation")
+ option(AMD64 "Enable building amd64 assembly implementation")
++option(SKIP_BUILD_EXAMPLES "Skip build of the examples" OFF)
+
+ set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
+ set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
+@@ -211,7 +212,15 @@ elseif(BUILD_SHARED_LIBS AND WIN32)
+ endif()
+
+ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
+- install(TARGETS zlib zlibstatic
++ if (BUILD_SHARED_LIBS)
++ set(ZLIB_TARGETS zlib)
++ set_target_properties(zlibstatic PROPERTIES EXCLUDE_FROM_ALL ON)
++ else()
++ set(ZLIB_TARGETS zlibstatic)
++ set_target_properties(zlib PROPERTIES EXCLUDE_FROM_ALL ON)
++ endif()
++
++ install(TARGETS ${ZLIB_TARGETS}
+ RUNTIME DESTINATION "${INSTALL_BIN_DIR}"
+ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
+ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" )
+@@ -230,6 +239,7 @@ endif()
+ # Example binaries
+ #============================================================================
+
++if (NOT SKIP_BUILD_EXAMPLES)
+ add_executable(example test/example.c)
+ target_link_libraries(example zlib)
+ add_test(example example)
+@@ -247,3 +257,4 @@ if(HAVE_OFF64_T)
+ target_link_libraries(minigzip64 zlib)
+ set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
+ endif()
++endif()
diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake
index 0d53d9e89..c41d61bda 100644
--- a/ports/zlib/portfile.cmake
+++ b/ports/zlib/portfile.cmake
@@ -7,10 +7,18 @@ vcpkg_download_distfile(ARCHIVE_FILE
)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/cmake_dont_build_more_than_needed.patch
+)
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
OPTIONS
-DSKIP_INSTALL_FILES=ON
+ -DSKIP_BUILD_EXAMPLES=ON
OPTIONS_DEBUG
-DSKIP_INSTALL_HEADERS=ON
)
@@ -18,11 +26,7 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
# Both dynamic and static are built, so keep only the one needed
-if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/zlibstatic.lib ${CURRENT_PACKAGES_DIR}/debug/lib/zlibstaticd.lib)
-else()
- file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/zlib.lib ${CURRENT_PACKAGES_DIR}/debug/lib/zlibd.lib)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/zlibstatic.lib ${CURRENT_PACKAGES_DIR}/lib/zlib.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/zlibstaticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/zlibd.lib)
endif()
diff --git a/ports/zstd/CONTROL b/ports/zstd/CONTROL
index ba363a585..c6c5cc8e3 100644
--- a/ports/zstd/CONTROL
+++ b/ports/zstd/CONTROL
@@ -1,3 +1,3 @@
Source: zstd
-Version: 1.3.1
+Version: 1.3.1-1
Description: Zstandard - Fast real-time compression algorithm http://www.zstd.net
diff --git a/ports/zziplib/CMakeLists.txt b/ports/zziplib/CMakeLists.txt
index 7f46079e9..c99bc0ddd 100644
--- a/ports/zziplib/CMakeLists.txt
+++ b/ports/zziplib/CMakeLists.txt
@@ -55,7 +55,7 @@ set(SRCS zzip/dir.c
add_library(zziplib ${SRCS} ${HEADERS})
-if(${BUILD_SHARED_LIBS})
+if(BUILD_SHARED_LIBS)
target_compile_definitions(zziplib PRIVATE -DZZIPLIB_EXPORTS)
endif()
diff --git a/ports/zziplib/CONTROL b/ports/zziplib/CONTROL
index 235b72c63..2b7447609 100644
--- a/ports/zziplib/CONTROL
+++ b/ports/zziplib/CONTROL
@@ -1,4 +1,4 @@
Source: zziplib
-Version: 0.13.62
+Version: 0.13.62-1
Build-Depends: zlib
Description: library providing read access on ZIP-archives
diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake
index d8c7ee6b8..19fc99af7 100644
--- a/scripts/buildsystems/vcpkg.cmake
+++ b/scripts/buildsystems/vcpkg.cmake
@@ -1,156 +1,175 @@
# Mark variables as used so cmake doesn't complain about them
-set(CMAKE_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_FILE})
-if(NOT VCPKG_TOOLCHAIN)
- if(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$")
+mark_as_advanced(CMAKE_TOOLCHAIN_FILE)
+
+if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
+ include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}")
+endif()
+
+if(VCPKG_TOOLCHAIN)
+ return()
+endif()
+
+get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
+if( _CMAKE_IN_TRY_COMPILE )
+ include( "${CMAKE_CURRENT_SOURCE_DIR}/../vcpkg.config.cmake" OPTIONAL )
+endif()
+
+if(VCPKG_TARGET_TRIPLET)
+elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$")
+ set(_VCPKG_TARGET_TRIPLET_ARCH x86)
+elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Xx]64$")
+ set(_VCPKG_TARGET_TRIPLET_ARCH x64)
+elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$")
+ set(_VCPKG_TARGET_TRIPLET_ARCH arm)
+else()
+ if(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 Win64$")
+ set(_VCPKG_TARGET_TRIPLET_ARCH x64)
+ elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 ARM$")
+ set(_VCPKG_TARGET_TRIPLET_ARCH arm)
+ elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015$")
set(_VCPKG_TARGET_TRIPLET_ARCH x86)
- elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Xx]64$")
+ elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 Win64$")
set(_VCPKG_TARGET_TRIPLET_ARCH x64)
- elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$")
+ elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 ARM")
set(_VCPKG_TARGET_TRIPLET_ARCH arm)
+ elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017")
+ set(_VCPKG_TARGET_TRIPLET_ARCH x86)
else()
- if(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 Win64$")
+ find_program(_VCPKG_CL cl)
+ if(_VCPKG_CL MATCHES "amd64/cl.exe$" OR _VCPKG_CL MATCHES "x64/cl.exe$")
set(_VCPKG_TARGET_TRIPLET_ARCH x64)
- elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 ARM$")
+ elseif(_VCPKG_CL MATCHES "arm/cl.exe$")
set(_VCPKG_TARGET_TRIPLET_ARCH arm)
- elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015$")
- set(_VCPKG_TARGET_TRIPLET_ARCH x86)
- elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 Win64$")
- set(_VCPKG_TARGET_TRIPLET_ARCH x64)
- elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 ARM")
- set(_VCPKG_TARGET_TRIPLET_ARCH arm)
- elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017")
+ elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$")
set(_VCPKG_TARGET_TRIPLET_ARCH x86)
else()
- find_program(_VCPKG_CL cl)
- if(_VCPKG_CL MATCHES "amd64/cl.exe$" OR _VCPKG_CL MATCHES "x64/cl.exe$")
- set(_VCPKG_TARGET_TRIPLET_ARCH x64)
- elseif(_VCPKG_CL MATCHES "arm/cl.exe$")
- set(_VCPKG_TARGET_TRIPLET_ARCH arm)
- elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$")
- set(_VCPKG_TARGET_TRIPLET_ARCH x86)
- else()
- message(FATAL_ERROR "Unable to determine target architecture.")
- endif()
+ message(FATAL_ERROR "Unable to determine target architecture.")
endif()
endif()
+endif()
- if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone")
- set(_VCPKG_TARGET_TRIPLET_PLAT uwp)
- else()
- set(_VCPKG_TARGET_TRIPLET_PLAT windows)
- endif()
+if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone")
+ set(_VCPKG_TARGET_TRIPLET_PLAT uwp)
+else()
+ set(_VCPKG_TARGET_TRIPLET_PLAT windows)
+endif()
- set(VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT} CACHE STRING "Vcpkg target triplet (ex. x86-windows)")
- set(_VCPKG_TOOLCHAIN_DIR ${CMAKE_CURRENT_LIST_DIR})
+set(VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT} CACHE STRING "Vcpkg target triplet (ex. x86-windows)")
+set(_VCPKG_TOOLCHAIN_DIR ${CMAKE_CURRENT_LIST_DIR})
- #Detect .vcpkg-root to figure VCPKG_ROOT_DIR
- SET(_VCPKG_ROOT_DIR_CANDIDATE ${CMAKE_CURRENT_LIST_DIR})
- while(IS_DIRECTORY ${_VCPKG_ROOT_DIR_CANDIDATE} AND NOT EXISTS "${_VCPKG_ROOT_DIR_CANDIDATE}/.vcpkg-root")
- get_filename_component(_VCPKG_ROOT_DIR_TEMP ${_VCPKG_ROOT_DIR_CANDIDATE} DIRECTORY)
- if (_VCPKG_ROOT_DIR_TEMP STREQUAL _VCPKG_ROOT_DIR_CANDIDATE) # If unchanged, we have reached the root of the drive
- message(FATAL_ERROR "Could not find .vcpkg-root")
- else()
- SET(_VCPKG_ROOT_DIR_CANDIDATE ${_VCPKG_ROOT_DIR_TEMP})
- endif()
- endwhile()
- set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE})
- set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed)
-
- if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE)
- list(APPEND CMAKE_PREFIX_PATH
- ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug
- )
- list(APPEND CMAKE_LIBRARY_PATH
- ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link
- )
+# Detect .vcpkg-root to figure VCPKG_ROOT_DIR
+set(_VCPKG_ROOT_DIR_CANDIDATE ${CMAKE_CURRENT_LIST_DIR})
+while(IS_DIRECTORY ${_VCPKG_ROOT_DIR_CANDIDATE} AND NOT EXISTS "${_VCPKG_ROOT_DIR_CANDIDATE}/.vcpkg-root")
+ get_filename_component(_VCPKG_ROOT_DIR_TEMP ${_VCPKG_ROOT_DIR_CANDIDATE} DIRECTORY)
+ if (_VCPKG_ROOT_DIR_TEMP STREQUAL _VCPKG_ROOT_DIR_CANDIDATE) # If unchanged, we have reached the root of the drive
+ message(FATAL_ERROR "Could not find .vcpkg-root")
+ else()
+ SET(_VCPKG_ROOT_DIR_CANDIDATE ${_VCPKG_ROOT_DIR_TEMP})
endif()
+endwhile()
+set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE})
+set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed)
+
+if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE)
list(APPEND CMAKE_PREFIX_PATH
- ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
+ ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug
)
list(APPEND CMAKE_LIBRARY_PATH
- ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link
+ ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link
)
+endif()
+list(APPEND CMAKE_PREFIX_PATH
+ ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
+)
+list(APPEND CMAKE_LIBRARY_PATH
+ ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link
+)
- set(Boost_COMPILER "-vc140")
+set(Boost_COMPILER "-vc140")
- if (NOT DEFINED CMAKE_SYSTEM_VERSION)
- include(${_VCPKG_ROOT_DIR}/scripts/cmake/vcpkg_get_windows_sdk.cmake)
- # This is used as an implicit parameter for vcpkg_get_windows_sdk
- set(VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR})
- vcpkg_get_windows_sdk(WINDOWS_SDK_VERSION)
- unset(VCPKG_ROOT_DIR)
- set(CMAKE_SYSTEM_VERSION ${WINDOWS_SDK_VERSION})
- endif()
+if (NOT DEFINED CMAKE_SYSTEM_VERSION)
+ include(${_VCPKG_ROOT_DIR}/scripts/cmake/vcpkg_get_windows_sdk.cmake)
+ # This is used as an implicit parameter for vcpkg_get_windows_sdk
+ set(VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR})
+ vcpkg_get_windows_sdk(WINDOWS_SDK_VERSION)
+ unset(VCPKG_ROOT_DIR)
+ set(CMAKE_SYSTEM_VERSION ${WINDOWS_SDK_VERSION} CACHE STRING "Windows SDK version")
+endif()
- file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
- set(CMAKE_SYSTEM_IGNORE_PATH
- "${_programfiles}/OpenSSL"
- "${_programfiles}/OpenSSL-Win32"
- "${_programfiles}/OpenSSL-Win64"
- "${_programfiles}/OpenSSL-Win32/lib/VC"
- "${_programfiles}/OpenSSL-Win64/lib/VC"
- "${_programfiles}/OpenSSL-Win32/lib/VC/static"
- "${_programfiles}/OpenSSL-Win64/lib/VC/static"
- "C:/OpenSSL/"
- "C:/OpenSSL-Win32/"
- "C:/OpenSSL-Win64/"
- "C:/OpenSSL-Win32/lib/VC"
- "C:/OpenSSL-Win64/lib/VC"
- "C:/OpenSSL-Win32/lib/VC/static"
- "C:/OpenSSL-Win64/lib/VC/static"
- )
+file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
+set(CMAKE_SYSTEM_IGNORE_PATH
+ "${_programfiles}/OpenSSL"
+ "${_programfiles}/OpenSSL-Win32"
+ "${_programfiles}/OpenSSL-Win64"
+ "${_programfiles}/OpenSSL-Win32/lib/VC"
+ "${_programfiles}/OpenSSL-Win64/lib/VC"
+ "${_programfiles}/OpenSSL-Win32/lib/VC/static"
+ "${_programfiles}/OpenSSL-Win64/lib/VC/static"
+ "C:/OpenSSL/"
+ "C:/OpenSSL-Win32/"
+ "C:/OpenSSL-Win64/"
+ "C:/OpenSSL-Win32/lib/VC"
+ "C:/OpenSSL-Win64/lib/VC"
+ "C:/OpenSSL-Win32/lib/VC/static"
+ "C:/OpenSSL-Win64/lib/VC/static"
+)
- set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools)
- file(GLOB _VCPKG_TOOLS_DIRS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*)
- foreach(_VCPKG_TOOLS_DIR ${_VCPKG_TOOLS_DIRS})
- if(IS_DIRECTORY ${_VCPKG_TOOLS_DIR})
- set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_TOOLS_DIR})
- endif()
- endforeach()
-
- option(VCPKG_APPLOCAL_DEPS "Automatically copy dependencies into the output directory for executables." ON)
- function(add_executable name)
- _add_executable(${ARGV})
- list(FIND ARGV "IMPORTED" IMPORTED_IDX)
- list(FIND ARGV "ALIAS" ALIAS_IDX)
- if(IMPORTED_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1)
- if(VCPKG_APPLOCAL_DEPS)
- add_custom_command(TARGET ${name} POST_BUILD
- COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1
- -targetBinary $<TARGET_FILE:${name}>
- -installedDir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$<CONFIG:Debug>:/debug>/bin"
- -OutVariable out
- )
- endif()
- set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props)
- set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false)
- endif()
- endfunction()
-
- function(add_library name)
- _add_library(${ARGV})
- list(FIND ARGV "IMPORTED" IMPORTED_IDX)
- list(FIND ARGV "INTERFACE" INTERFACE_IDX)
- list(FIND ARGV "ALIAS" ALIAS_IDX)
- if(IMPORTED_IDX EQUAL -1 AND INTERFACE_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1)
- set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props)
- set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false)
- endif()
- endfunction()
+set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools)
+file(GLOB _VCPKG_TOOLS_DIRS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*)
+foreach(_VCPKG_TOOLS_DIR ${_VCPKG_TOOLS_DIRS})
+ if(IS_DIRECTORY ${_VCPKG_TOOLS_DIR})
+ set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_TOOLS_DIR})
+ endif()
+endforeach()
- macro(find_package name)
- if(name STREQUAL "Boost")
- unset(Boost_USE_STATIC_LIBS)
+option(VCPKG_APPLOCAL_DEPS "Automatically copy dependencies into the output directory for executables." ON)
+function(add_executable name)
+ _add_executable(${ARGV})
+ list(FIND ARGV "IMPORTED" IMPORTED_IDX)
+ list(FIND ARGV "ALIAS" ALIAS_IDX)
+ if(IMPORTED_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1)
+ if(VCPKG_APPLOCAL_DEPS)
+ add_custom_command(TARGET ${name} POST_BUILD
+ COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1
+ -targetBinary $<TARGET_FILE:${name}>
+ -installedDir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$<CONFIG:Debug>:/debug>/bin"
+ -OutVariable out
+ )
endif()
- _find_package(${ARGV})
- endmacro()
+ set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props)
+ set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false)
+ endif()
+endfunction()
- set(VCPKG_TOOLCHAIN ON)
-endif()
+function(add_library name)
+ _add_library(${ARGV})
+ list(FIND ARGV "IMPORTED" IMPORTED_IDX)
+ list(FIND ARGV "INTERFACE" INTERFACE_IDX)
+ list(FIND ARGV "ALIAS" ALIAS_IDX)
+ if(IMPORTED_IDX EQUAL -1 AND INTERFACE_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1)
+ set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props)
+ set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false)
+ endif()
+endfunction()
+
+macro(find_package name)
+ if(name STREQUAL "Boost")
+ unset(Boost_USE_STATIC_LIBS)
+ endif()
+ _find_package(${ARGV})
+endmacro()
-set(_UNUSED ${CMAKE_TOOLCHAIN_FILE})
+set(VCPKG_TOOLCHAIN ON)
set(_UNUSED ${CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION})
set(_UNUSED ${CMAKE_EXPORT_NO_PACKAGE_REGISTRY})
set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY})
set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY})
set(_UNUSED ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP})
+
+if(NOT _CMAKE_IN_TRY_COMPILE)
+ file(TO_CMAKE_PATH "${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" _chainload_file)
+ file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vcpkg.config.cmake"
+ "set(VCPKG_TARGET_TRIPLET \"${VCPKG_TARGET_TRIPLET}\" CACHE STRING \"\")\n"
+ "set(VCPKG_APPLOCAL_DEPS \"${VCPKG_APPLOCAL_DEPS}\" CACHE STRING \"\")\n"
+ "set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE \"${_chainload_file}\" CACHE STRING \"\")\n")
+endif() \ No newline at end of file
diff --git a/scripts/cmake/vcpkg_acquire_depot_tools.cmake b/scripts/cmake/vcpkg_acquire_depot_tools.cmake
index 1cc375725..009ba40f1 100644
--- a/scripts/cmake/vcpkg_acquire_depot_tools.cmake
+++ b/scripts/cmake/vcpkg_acquire_depot_tools.cmake
@@ -26,7 +26,7 @@ function(vcpkg_acquire_depot_tools PATH_TO_ROOT_OUT)
set(download_success 1)
endif()
- if (NOT ${download_success})
+ if (NOT download_success)
message(FATAL_ERROR
"\n"
" Failed to download file.\n"
diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake
index 18e2a8b00..5dc81ec09 100644
--- a/scripts/cmake/vcpkg_build_cmake.cmake
+++ b/scripts/cmake/vcpkg_build_cmake.cmake
@@ -1,41 +1,76 @@
+## # vcpkg_build_cmake
+##
+## Build a cmake project.
+##
+## ## Usage:
+## ```cmake
+## vcpkg_build_cmake([DISABLE_PARALLEL] [TARGET <target>])
+## ```
+##
+## ## Parameters:
+## ### DISABLE_PARALLEL
+## The underlying buildsystem will be instructed to not parallelize
+##
+## ### TARGET
+## The target passed to the cmake build command (`cmake --build . --target <target>`). If not specified, no target will
+## be passed.
+##
+## ## Notes:
+## This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md).
+## You can use the alias [`vcpkg_install_cmake()`](vcpkg_configure_cmake.md) function if your CMake script supports the
+## "install" target
+##
+## ## Examples:
+##
+## * [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake)
+## * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake)
+## * [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake)
+## * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake)
function(vcpkg_build_cmake)
- cmake_parse_arguments(_bc "MSVC_64_TOOLSET;DISABLE_PARALLEL" "" "" ${ARGN})
+ cmake_parse_arguments(_bc "DISABLE_PARALLEL" "TARGET;LOGFILE_ROOT" "" ${ARGN})
- set(MSVC_EXTRA_ARGS
- "/p:VCPkgLocalAppDataDisabled=true"
- "/p:UseIntelMKL=No"
- )
-
- # Specifies the architecture of the toolset, NOT the architecture of the produced binary
- # This can help libraries that cause the linker to run out of memory.
- # https://support.microsoft.com/en-us/help/2891057/linker-fatal-error-lnk1102-out-of-memory
- if (_bc_MSVC_64_TOOLSET)
- list(APPEND MSVC_EXTRA_ARGS "/p:PreferredToolArchitecture=x64")
+ if(NOT _bc_LOGFILE_ROOT)
+ set(_bc_LOGFILE_ROOT "build")
endif()
- if (NOT _bc_DISABLE_PARALLEL)
- list(APPEND MSVC_EXTRA_ARGS "/m")
+ if(_VCPKG_CMAKE_GENERATOR MATCHES "Ninja")
+ set(BUILD_ARGS "-v") # verbose output
+ if (_bc_DISABLE_PARALLEL)
+ list(APPEND BUILD_ARGS "-j1")
+ endif()
+ elseif(_VCPKG_CMAKE_GENERATOR MATCHES "Visual Studio")
+ set(BUILD_ARGS
+ "/p:VCPkgLocalAppDataDisabled=true"
+ "/p:UseIntelMKL=No"
+ )
+ if (NOT _bc_DISABLE_PARALLEL)
+ list(APPEND BUILD_ARGS "/m")
+ endif()
+ elseif(_VCPKG_CMAKE_GENERATOR MATCHES "NMake")
+ # No options are currently added for nmake builds
+ else()
+ message(FATAL_ERROR "Unrecognized GENERATOR setting from vcpkg_configure_cmake(). Valid generators are: Ninja, Visual Studio, and NMake Makefiles")
endif()
- if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/build.ninja)
- set(BUILD_ARGS -v) # verbose output
+ if(_bc_TARGET)
+ set(TARGET_PARAM "--target" ${_bc_TARGET})
else()
- set(BUILD_ARGS ${MSVC_EXTRA_ARGS})
+ set(TARGET_PARAM)
endif()
message(STATUS "Build ${TARGET_TRIPLET}-rel")
vcpkg_execute_required_process(
- COMMAND ${CMAKE_COMMAND} --build . --config Release -- ${BUILD_ARGS}
+ COMMAND ${CMAKE_COMMAND} --build . --config Release ${TARGET_PARAM} -- ${BUILD_ARGS}
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
- LOGNAME build-${TARGET_TRIPLET}-rel
+ LOGNAME ${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-rel
)
message(STATUS "Build ${TARGET_TRIPLET}-rel done")
message(STATUS "Build ${TARGET_TRIPLET}-dbg")
vcpkg_execute_required_process(
- COMMAND ${CMAKE_COMMAND} --build . --config Debug -- ${BUILD_ARGS}
+ COMMAND ${CMAKE_COMMAND} --build . --config Debug ${TARGET_PARAM} -- ${BUILD_ARGS}
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
- LOGNAME build-${TARGET_TRIPLET}-dbg
+ LOGNAME ${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-dbg
)
message(STATUS "Build ${TARGET_TRIPLET}-dbg done")
endfunction()
diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake
index 29f0f8dff..81e8e5813 100644
--- a/scripts/cmake/vcpkg_common_functions.cmake
+++ b/scripts/cmake/vcpkg_common_functions.cmake
@@ -6,6 +6,7 @@ include(vcpkg_execute_required_process_repeat)
include(vcpkg_find_acquire_program)
include(vcpkg_fixup_cmake_targets)
include(vcpkg_from_github)
+include(vcpkg_from_bitbucket)
include(vcpkg_build_cmake)
include(vcpkg_build_msbuild)
include(vcpkg_build_qmake)
diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake
index 07acfc8ea..b979245aa 100644
--- a/scripts/cmake/vcpkg_configure_cmake.cmake
+++ b/scripts/cmake/vcpkg_configure_cmake.cmake
@@ -61,31 +61,39 @@ function(vcpkg_configure_cmake)
set(GENERATOR ${_csc_GENERATOR})
elseif(_csc_PREFER_NINJA AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT _csc_HOST_ARCHITECTURE STREQUAL "x86")
set(GENERATOR "Ninja")
- elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
+ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
set(GENERATOR "Visual Studio 14 2015")
- elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
+ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
set(GENERATOR "Visual Studio 14 2015 Win64")
- elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
+ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
set(GENERATOR "Visual Studio 14 2015 ARM")
- elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
+ elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
set(GENERATOR "Visual Studio 14 2015")
- elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
+ elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
set(GENERATOR "Visual Studio 14 2015 Win64")
- elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
+ elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
set(GENERATOR "Visual Studio 14 2015 ARM")
- elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
+ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
set(GENERATOR "Visual Studio 15 2017")
- elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
+ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
set(GENERATOR "Visual Studio 15 2017 Win64")
- elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
+ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
set(GENERATOR "Visual Studio 15 2017 ARM")
- elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
+ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
+ set(GENERATOR "Visual Studio 15 2017")
+ set(ARCH "ARM64")
+ elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
set(GENERATOR "Visual Studio 15 2017")
- elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
+ elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
set(GENERATOR "Visual Studio 15 2017 Win64")
- elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
set(GENERATOR "Visual Studio 15 2017 ARM")
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
+ set(GENERATOR "Visual Studio 15 2017")
+ set(ARCH "ARM64")
+ else()
+ message(FATAL_ERROR "Unable to determine appropriate generator for: ${VCPKG_CMAKE_SYSTEM_NAME}-${VCPKG_TARGET_ARCHITECTURE}-${VCPKG_PLATFORM_TOOLSET}")
endif()
# If we use Ninja, make sure it's on PATH
@@ -98,15 +106,18 @@ function(vcpkg_configure_cmake)
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
if(DEFINED VCPKG_CMAKE_SYSTEM_NAME)
- list(APPEND _csc_OPTIONS -DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME})
+ list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}")
endif()
if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION)
- list(APPEND _csc_OPTIONS -DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION})
+ list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}")
endif()
- if(DEFINED VCPKG_LIBRARY_LINKAGE AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=ON)
- elseif(DEFINED VCPKG_LIBRARY_LINKAGE AND VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=OFF)
+ else()
+ message(FATAL_ERROR "Invalid setting for VCPKG_LIBRARY_LINKAGE: \"${VCPKG_LIBRARY_LINKAGE}\". It must be \"static\" or \"dynamic\"")
endif()
if((NOT DEFINED VCPKG_CXX_FLAGS_DEBUG AND NOT DEFINED VCPKG_C_FLAGS_DEBUG) OR
@@ -125,10 +136,45 @@ function(vcpkg_configure_cmake)
message(FATAL_ERROR "You must set both the VCPKG_CXX_FLAGS and VCPKG_C_FLAGS")
endif()
+ if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
+ list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}")
+ else()
+ set(VCPKG_CXX_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ${VCPKG_CXX_FLAGS}")
+ set(VCPKG_C_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ${VCPKG_C_FLAGS}")
+ if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
+ list(APPEND _csc_OPTIONS_DEBUG
+ "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}"
+ "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}"
+ )
+ list(APPEND _csc_OPTIONS_RELEASE
+ "-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}"
+ "-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}"
+ )
+ elseif(VCPKG_CRT_LINKAGE STREQUAL "static")
+ list(APPEND _csc_OPTIONS_DEBUG
+ "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}"
+ "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}"
+ )
+ list(APPEND _csc_OPTIONS_RELEASE
+ "-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}"
+ "-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}"
+ )
+ else()
+ message(FATAL_ERROR "Invalid setting for VCPKG_CRT_LINKAGE: \"${VCPKG_CRT_LINKAGE}\". It must be \"static\" or \"dynamic\"")
+ endif()
+
+ list(APPEND _csc_OPTIONS_RELEASE
+ "-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}"
+ "-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}"
+ )
+ list(APPEND _csc_OPTIONS
+ "-DCMAKE_CXX_FLAGS=${VCPKG_CXX_FLAGS}"
+ "-DCMAKE_C_FLAGS=${VCPKG_C_FLAGS}"
+ )
+ endif()
+
list(APPEND _csc_OPTIONS
"-DVCPKG_TARGET_TRIPLET=${TARGET_TRIPLET}"
- "-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ${VCPKG_CXX_FLAGS}"
- "-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ${VCPKG_C_FLAGS}"
"-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON"
"-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON"
"-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON"
@@ -139,32 +185,12 @@ function(vcpkg_configure_cmake)
"-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON"
)
- if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic)
- list(APPEND _csc_OPTIONS_DEBUG
- "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}"
- "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}"
- )
- list(APPEND _csc_OPTIONS_RELEASE
- "-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi ${VCPKG_CXX_FLAGS_RELEASE}"
- "-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi ${VCPKG_C_FLAGS_RELEASE}"
- )
-
- elseif(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static)
- list(APPEND _csc_OPTIONS_DEBUG
- "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}"
- "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}"
- )
- list(APPEND _csc_OPTIONS_RELEASE
- "-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Zi ${VCPKG_CXX_FLAGS_RELEASE}"
- "-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Zi ${VCPKG_C_FLAGS_RELEASE}"
+ if(DEFINED ARCH)
+ list(APPEND _csc_OPTIONS
+ "-A${ARCH}"
)
endif()
- list(APPEND _csc_OPTIONS_RELEASE
- "-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}"
- "-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}"
- )
-
message(STATUS "Configuring ${TARGET_TRIPLET}-rel")
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
vcpkg_execute_required_process(
@@ -188,4 +214,6 @@ function(vcpkg_configure_cmake)
LOGNAME config-${TARGET_TRIPLET}-dbg
)
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done")
+
+ set(_VCPKG_CMAKE_GENERATOR "${GENERATOR}" PARENT_SCOPE)
endfunction() \ No newline at end of file
diff --git a/scripts/cmake/vcpkg_configure_meson.cmake b/scripts/cmake/vcpkg_configure_meson.cmake
index 277f91e11..143bb74de 100644
--- a/scripts/cmake/vcpkg_configure_meson.cmake
+++ b/scripts/cmake/vcpkg_configure_meson.cmake
@@ -9,17 +9,17 @@ function(vcpkg_configure_meson)
set(MESON_COMMON_CXXFLAGS "${MESON_COMMON_CXXFLAGS} /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc")
if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic)
- set(MESON_DEBUG_CFLAGS "${MESON_DEBUG_CFLAGS} /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1")
- set(MESON_DEBUG_CXXFLAGS "${MESON_DEBUG_CXXFLAGS} /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1")
+ set(MESON_DEBUG_CFLAGS "${MESON_DEBUG_CFLAGS} /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1")
+ set(MESON_DEBUG_CXXFLAGS "${MESON_DEBUG_CXXFLAGS} /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1")
- set(MESON_RELEASE_CFLAGS "${MESON_RELEASE_CFLAGS} /MD /O2 /Oi /Gy /DNDEBUG /Zi")
- set(MESON_RELEASE_CXXFLAGS "${MESON_RELEASE_CXXFLAGS} /MD /O2 /Oi /Gy /DNDEBUG /Zi")
+ set(MESON_RELEASE_CFLAGS "${MESON_RELEASE_CFLAGS} /MD /O2 /Oi /Gy /DNDEBUG /Z7")
+ set(MESON_RELEASE_CXXFLAGS "${MESON_RELEASE_CXXFLAGS} /MD /O2 /Oi /Gy /DNDEBUG /Z7")
elseif(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static)
- set(MESON_DEBUG_CFLAGS "${MESON_DEBUG_CFLAGS} /D_DEBUG /MTd /Zi /Ob0 /Od /RTC1")
- set(MESON_DEBUG_CXXFLAGS "${MESON_DEBUG_CXXFLAGS} /D_DEBUG /MTd /Zi /Ob0 /Od /RTC1")
+ set(MESON_DEBUG_CFLAGS "${MESON_DEBUG_CFLAGS} /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1")
+ set(MESON_DEBUG_CXXFLAGS "${MESON_DEBUG_CXXFLAGS} /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1")
- set(MESON_RELEASE_CFLAGS "${MESON_RELEASE_CFLAGS} /MT /O2 /Oi /Gy /DNDEBUG /Zi")
- set(MESON_RELEASE_CXXFLAGS "${MESON_RELEASE_CXXFLAGS} /MT /O2 /Oi /Gy /DNDEBUG /Zi")
+ set(MESON_RELEASE_CFLAGS "${MESON_RELEASE_CFLAGS} /MT /O2 /Oi /Gy /DNDEBUG /Z7")
+ set(MESON_RELEASE_CXXFLAGS "${MESON_RELEASE_CXXFLAGS} /MT /O2 /Oi /Gy /DNDEBUG /Z7")
endif()
set(MESON_COMMON_LDFLAGS "${MESON_COMMON_LDFLAGS} /DEBUG")
diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake
index 006570195..b8acfc823 100644
--- a/scripts/cmake/vcpkg_download_distfile.cmake
+++ b/scripts/cmake/vcpkg_download_distfile.cmake
@@ -78,7 +78,7 @@ function(vcpkg_download_distfile VAR)
endif()
endforeach(url)
- if (NOT ${download_success})
+ if (NOT download_success)
message(FATAL_ERROR
"\n"
" Failed to download file.\n"
diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake
index fef62da53..b81675c13 100644
--- a/scripts/cmake/vcpkg_find_acquire_program.cmake
+++ b/scripts/cmake/vcpkg_find_acquire_program.cmake
@@ -34,7 +34,8 @@
## * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake)
## * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake)
function(vcpkg_find_acquire_program VAR)
- if(${VAR} AND NOT ${VAR} MATCHES "-NOTFOUND")
+ set(EXPANDED_VAR ${${VAR}})
+ if(EXPANDED_VAR)
return()
endif()
@@ -66,31 +67,19 @@ function(vcpkg_find_acquire_program VAR)
set(HASH 850b26be5bbbdaeaf45ac39dd27f69f1a85e600c35afbd16b9f621396b3c7a19863ea3ff316b025b578fce0a8280eef2203306a2b3e46ee1389abb65313fb720)
elseif(VAR MATCHES "PYTHON3")
set(PROGNAME python)
- set(PATHS ${DOWNLOADS}/tools/python)
- set(URL "https://www.python.org/ftp/python/3.5.3/python-3.5.3-embed-win32.zip")
- set(ARCHIVE "python-3.5.3-embed-win32.zip")
- set(HASH c8cfdc09d052dc27e4380e8e4bf0d32a4c0def7e03896c1fa6cabc26dde78bb74dbb04e3673cc36e3e307d65a1ef284d69174f0cc80008c83bc6178f192ac5cf)
+ set(SUBDIR "python3")
+ set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR})
+ set(URL "https://www.python.org/ftp/python/3.5.4/python-3.5.4-embed-win32.zip")
+ set(ARCHIVE "python-3.5.4-embed-win32.zip")
+ set(HASH b5240fdc95088c2d7f65d2dd598650f8dd106b49589d94156bd4a078b108c6cabbe7a38ef73e2b2cf00e8312a93d2e587eac2c54ce85540d3c7a26cc60013156)
elseif(VAR MATCHES "PYTHON2")
- find_program(PYTHON2 NAMES python2 python PATHS C:/python27 c:/Python27amd64 ENV PYTHON)
- if(NOT PYTHON2 MATCHES "NOTFOUND")
- execute_process(
- COMMAND ${PYTHON2} --version
- OUTPUT_VARIABLE PYTHON_VER_CHECK_OUT
- ERROR_VARIABLE PYTHON_VER_CHECK_ERR
- )
- set(PYTHON_VER_CHECK "${PYTHON_VER_CHECK_OUT}${PYTHON_VER_CHECK_ERR}")
- debug_message("PYTHON_VER_CHECK=${PYTHON_VER_CHECK}")
- if(NOT PYTHON_VER_CHECK MATCHES "Python 2.7")
- set(PYTHON2 PYTHON2-NOTFOUND)
- find_program(PYTHON2 NAMES python2 python PATHS C:/python27 ENV PYTHON NO_SYSTEM_ENVIRONMENT_PATH)
- endif()
- endif()
- if(PYTHON2 MATCHES "NOTFOUND")
- message(FATAL_ERROR "Python 2.7 was not found in the path or by searching inside C:\\Python27.\n"
- "There is no portable redistributable for Python 2.7, so you will need to install the MSI located at:\n"
- " https://www.python.org/ftp/python/2.7.13/python-2.7.13.msi\n"
- )
- endif()
+ set(PROGNAME python)
+ set(SUBDIR "python2")
+ set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR})
+ file(TO_NATIVE_PATH "${PATHS}" DESTINATION_NATIVE_PATH)
+ set(URL "https://www.python.org/ftp/python/2.7.14/python-2.7.14.msi")
+ set(ARCHIVE "python2.msi")
+ set(HASH 8c3ad6e527742d99ba96dcfd1098861b14e7207b80d51a54e9b410ab2f36e44e05561ea1527d8e92b3e10808311536260bd9e82db0da3b513fb1be18e108510e)
elseif(VAR MATCHES "RUBY")
set(PROGNAME "ruby")
set(PATHS ${DOWNLOADS}/tools/ruby/rubyinstaller-2.4.1-1-x86/bin)
@@ -112,11 +101,11 @@ function(vcpkg_find_acquire_program VAR)
set(HASH 556f95f7566fe23704d136239e4cf5e2a26f939ab43b44145c91b70d031a088d553e5c21301f1242a2295dcde3143b356211f0108c68e65eef8572407618326d)
elseif(VAR MATCHES "NINJA")
set(PROGNAME ninja)
- set(SUBDIR "ninja-1.7.2")
+ set(SUBDIR "ninja-1.8.2")
set(PATHS ${DOWNLOADS}/tools/ninja/${SUBDIR})
- set(URL "https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip")
- set(ARCHIVE "ninja-win.zip")
- set(HASH cccab9281b274c564f9ad77a2115be1f19be67d7b2ee14a55d1db1b27f3b68db8e76076e4f804b61eb8e573e26a8ecc9985675a8dcf03fd7a77b7f57234f1393)
+ set(URL "https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip")
+ set(ARCHIVE "ninja-1.8.2-win.zip")
+ set(HASH 9b9ce248240665fcd6404b989f3b3c27ed9682838225e6dc9b67b551774f251e4ff8a207504f941e7c811e7a8be1945e7bcb94472a335ef15e23a0200a32e6d5)
elseif(VAR MATCHES "MESON")
set(PROGNAME meson)
set(REQUIRED_INTERPRETER PYTHON3)
@@ -152,6 +141,13 @@ function(vcpkg_find_acquire_program VAR)
set(URL "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/36bacb4cba27003c572e5bf7a9c4dfe3c9a8d40d/gas-preprocessor.pl")
set(ARCHIVE "gas-preprocessor.pl")
set(HASH a25caadccd1457a0fd2abb5a0da9aca1713b2c351d76daf87a4141e52021f51aa09e95a62942c6f0764f79cc1fa65bf71584955b09e62ee7da067b5c82baf6b3)
+ elseif(VAR MATCHES "DARK")
+ set(PROGNAME dark)
+ set(SUBDIR "wix311-binaries")
+ set(PATHS ${DOWNLOADS}/tools/dark/${SUBDIR})
+ set(URL "https://github.com/wixtoolset/wix3/releases/download/wix311rtm/wix311-binaries.zip")
+ set(ARCHIVE "wix311-binaries.zip")
+ set(HASH 74f0fa29b5991ca655e34a9d1000d47d4272e071113fada86727ee943d913177ae96dc3d435eaf494d2158f37560cd4c2c5274176946ebdb17bf2354ced1c516)
else()
message(FATAL "unknown tool ${VAR} -- unable to acquire.")
endif()
@@ -167,7 +163,7 @@ function(vcpkg_find_acquire_program VAR)
endmacro()
do_find()
- if(${VAR} MATCHES "-NOTFOUND")
+ if("${${VAR}}" MATCHES "-NOTFOUND")
file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE}
EXPECTED_HASH SHA512=${HASH}
SHOW_PROGRESS
@@ -178,7 +174,7 @@ function(vcpkg_find_acquire_program VAR)
else()
get_filename_component(ARCHIVE_EXTENSION ${ARCHIVE} EXT)
string(TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION)
- if(${ARCHIVE_EXTENSION} STREQUAL ".msi")
+ if(ARCHIVE_EXTENSION STREQUAL ".msi")
file(TO_NATIVE_PATH "${DOWNLOADS}/${ARCHIVE}" ARCHIVE_NATIVE_PATH)
file(TO_NATIVE_PATH "${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}" DESTINATION_NATIVE_PATH)
execute_process(
@@ -196,5 +192,5 @@ function(vcpkg_find_acquire_program VAR)
do_find()
endif()
- set(${VAR} ${${VAR}} PARENT_SCOPE)
+ set(${VAR} "${${VAR}}" PARENT_SCOPE)
endfunction()
diff --git a/scripts/cmake/vcpkg_from_bitbucket.cmake b/scripts/cmake/vcpkg_from_bitbucket.cmake
new file mode 100644
index 000000000..227de5141
--- /dev/null
+++ b/scripts/cmake/vcpkg_from_bitbucket.cmake
@@ -0,0 +1,190 @@
+## # vcpkg_from_bitbucket
+##
+## Download and extract a project from Bitbucket.
+## Enables support for installing HEAD `vcpkg.exe install --head <port>`.
+##
+## ## Usage:
+## ```cmake
+## vcpkg_from_bitbucket(
+## OUT_SOURCE_PATH <SOURCE_PATH>
+## REPO <Microsoft/cpprestsdk>
+## [REF <v2.0.0>]
+## [SHA512 <45d0d7f8cc350...>]
+## [HEAD_REF <master>]
+## )
+## ```
+##
+## ## Parameters:
+## ### OUT_SOURCE_PATH
+## Specifies the out-variable that will contain the extracted location.
+##
+## This should be set to `SOURCE_PATH` by convention.
+##
+## ### REPO
+## The organization or user and repository on GitHub.
+##
+## ### REF
+## A stable git commit-ish (ideally a tag) that will not change contents. **This should not be a branch.**
+##
+## For repositories without official releases, this can be set to the full commit id of the current latest master.
+##
+## If `REF` is specified, `SHA512` must also be specified.
+##
+## ### SHA512
+## The SHA512 hash that should match the archive (https://bitbucket.com/${REPO}/get/${REF}.tar.gz).
+##
+## This is most easily determined by first setting it to `1`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile.
+##
+## ### HEAD_REF
+## The unstable git commit-ish (ideally a branch) to pull for `--head` builds.
+##
+## For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms.
+##
+## ## Notes:
+## At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present.
+##
+## This exports the `VCPKG_HEAD_VERSION` variable during head builds.
+##
+## ## Examples:
+##
+## * [blaze](https://github.com/Microsoft/vcpkg/blob/master/ports/blaze/portfile.cmake)
+function(vcpkg_from_bitbucket)
+ set(oneValueArgs OUT_SOURCE_PATH REPO REF SHA512 HEAD_REF)
+ set(multipleValuesArgs)
+ cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN})
+
+ if(NOT _vdud_OUT_SOURCE_PATH)
+ message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.")
+ endif()
+
+ if((_vdud_REF AND NOT _vdud_SHA512) OR (NOT _vdud_REF AND _vdud_SHA512))
+ message(FATAL_ERROR "SHA512 must be specified if REF is specified.")
+ endif()
+
+ if(NOT _vdud_REPO)
+ message(FATAL_ERROR "The Bitbucket repository must be specified.")
+ endif()
+
+ if(NOT _vdud_REF AND NOT _vdud_HEAD_REF)
+ message(FATAL_ERROR "At least one of REF and HEAD_REF must be specified.")
+ endif()
+
+ string(REGEX REPLACE ".*/" "" REPO_NAME ${_vdud_REPO})
+ string(REGEX REPLACE "/.*" "" ORG_NAME ${_vdud_REPO})
+
+ macro(set_SOURCE_PATH BASE BASEREF)
+ set(SOURCE_PATH "${BASE}/${ORG_NAME}-${REPO_NAME}-${BASEREF}")
+ if(EXISTS ${SOURCE_PATH})
+ set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE)
+ else()
+ # Sometimes GitHub strips a leading 'v' off the REF.
+ string(REGEX REPLACE "^v" "" REF ${BASEREF})
+ set(SOURCE_PATH "${BASE}/${ORG_NAME}-${REPO_NAME}-${REF}")
+ if(EXISTS ${SOURCE_PATH})
+ set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE)
+ else()
+ message(FATAL_ERROR "Could not determine source path: '${BASE}/${ORG_NAME}-${REPO_NAME}-${BASEREF}' does not exist")
+ endif()
+ endif()
+ endmacro()
+
+ if(VCPKG_USE_HEAD_VERSION AND NOT _vdud_HEAD_REF)
+ message(STATUS "Package does not specify HEAD_REF. Falling back to non-HEAD version.")
+ set(VCPKG_USE_HEAD_VERSION OFF)
+ endif()
+
+ # Handle --no-head scenarios
+ if(NOT VCPKG_USE_HEAD_VERSION)
+ if(NOT _vdud_REF)
+ message(FATAL_ERROR "Package does not specify REF. It must built using --head.")
+ endif()
+
+ set(URL "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_REF}.tar.gz")
+ set(downloaded_file_path "${DOWNLOADS}/${ORG_NAME}-${REPO_NAME}-${_vdud_REF}.tar.gz")
+
+ file(DOWNLOAD "https://api.bitbucket.com/2.0/repositories/${ORG_NAME}/${REPO_NAME}/refs/tags/${_vdud_REF}"
+ ${downloaded_file_path}.version
+ STATUS download_status
+ )
+ list(GET download_status 0 status_code)
+ if ("${status_code}" STREQUAL "0")
+ # Parse the github refs response with regex.
+ # TODO: use some JSON swiss-army-knife utility instead.
+ file(READ "${downloaded_file_path}.version" _contents)
+ string(REGEX MATCH "\"hash\": \"[a-f0-9]+\"" x "${_contents}")
+ string(REGEX REPLACE "\"hash\": \"([a-f0-9]+)\"" "\\1" _version ${x})
+ string(SUBSTRING ${_version} 0 12 _version) # Get the 12 first numbers from commit hash
+ else()
+ set(_version ${_vdud_REF})
+ endif()
+
+ vcpkg_download_distfile(ARCHIVE
+ URLS "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_REF}.tar.gz"
+ SHA512 "${_vdud_SHA512}"
+ FILENAME "${ORG_NAME}-${REPO_NAME}-${_vdud_REF}.tar.gz"
+ )
+ vcpkg_extract_source_archive_ex(ARCHIVE "${ARCHIVE}")
+ set_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src ${_version})
+ return()
+ endif()
+
+ # The following is for --head scenarios
+ set(URL "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_HEAD_REF}.tar.gz")
+ set(downloaded_file_path "${DOWNLOADS}/${ORG_NAME}-${REPO_NAME}-${_vdud_HEAD_REF}.tar.gz")
+
+ if(_VCPKG_NO_DOWNLOADS)
+ if(NOT EXISTS ${downloaded_file_path} OR NOT EXISTS ${downloaded_file_path}.version)
+ message(FATAL_ERROR "Downloads are disabled, but '${downloaded_file_path}' does not exist.")
+ endif()
+ message(STATUS "Using cached ${downloaded_file_path}")
+ else()
+ if(EXISTS ${downloaded_file_path})
+ message(STATUS "Purging cached ${downloaded_file_path} to fetch latest (use --no-downloads to suppress)")
+ file(REMOVE ${downloaded_file_path})
+ endif()
+ if(EXISTS ${downloaded_file_path}.version)
+ file(REMOVE ${downloaded_file_path}.version)
+ endif()
+ if(EXISTS ${CURRENT_BUILDTREES_DIR}/src/head)
+ file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/head)
+ endif()
+
+ # Try to download the file and version information from bitbucket.
+ message(STATUS "Downloading ${URL}...")
+ file(DOWNLOAD "https://api.bitbucket.com/2.0/repositories/${ORG_NAME}/${REPO_NAME}/refs/branches/${_vdud_HEAD_REF}"
+ ${downloaded_file_path}.version
+ STATUS download_status
+ )
+ list(GET download_status 0 status_code)
+ if (NOT "${status_code}" STREQUAL "0")
+ file(REMOVE ${downloaded_file_path}.version)
+ message(FATAL_ERROR "Downloading version info for ${URL}... Failed. Status: ${download_status}")
+ endif()
+
+ file(DOWNLOAD ${URL} ${downloaded_file_path} STATUS download_status)
+ list(GET download_status 0 status_code)
+ if (NOT "${status_code}" STREQUAL "0")
+ file(REMOVE ${downloaded_file_path})
+ message(FATAL_ERROR "Downloading ${URL}... Failed. Status: ${download_status}")
+ else()
+ message(STATUS "Downloading ${URL}... OK")
+ endif()
+ endif()
+
+ vcpkg_extract_source_archive_ex(
+ ARCHIVE "${downloaded_file_path}"
+ WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/head"
+ )
+
+ # Parse the github refs response with regex.
+ # TODO: use some JSON swiss-army-knife utility instead.
+ file(READ "${downloaded_file_path}.version" _contents)
+ string(REGEX MATCH "\"hash\": \"[a-f0-9]+\"" x "${_contents}")
+ string(REGEX REPLACE "\"hash\": \"([a-f0-9]+)\"" "\\1" _version ${x})
+ string(SUBSTRING ${_version} 0 12 _vdud_HEAD_REF) # Get the 12 first numbers from commit hash
+
+ # exports VCPKG_HEAD_VERSION to the caller. This will get picked up by ports.cmake after the build.
+ set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE)
+
+ set_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src/head ${_vdud_HEAD_REF})
+endfunction()
diff --git a/scripts/cmake/vcpkg_install_cmake.cmake b/scripts/cmake/vcpkg_install_cmake.cmake
index f778007ef..ab72d054e 100644
--- a/scripts/cmake/vcpkg_install_cmake.cmake
+++ b/scripts/cmake/vcpkg_install_cmake.cmake
@@ -4,15 +4,15 @@
##
## ## Usage:
## ```cmake
-## vcpkg_install_cmake([MSVC_64_TOOLSET])
+## vcpkg_install_cmake(...)
## ```
##
## ## Parameters:
-## ### MSVC_64_TOOLSET
-## This adds the `/p:PreferredToolArchitecture=x64` switch if the underlying buildsystem is MSBuild. Some large projects can run out of memory when linking if they use the 32-bit hosted tools.
+## See [`vcpkg_build_cmake()`](vcpkg_build_cmake.md).
##
## ## Notes:
-## This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md).
+## This command transparently forwards to [`vcpkg_build_cmake()`](vcpkg_build_cmake.md), adding a `TARGET install`
+## parameter.
##
## ## Examples:
##
@@ -21,43 +21,5 @@
## * [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake)
## * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake)
function(vcpkg_install_cmake)
- cmake_parse_arguments(_bc "MSVC_64_TOOLSET;DISABLE_PARALLEL" "" "" ${ARGN})
-
- set(MSVC_EXTRA_ARGS
- "/p:VCPkgLocalAppDataDisabled=true"
- "/p:UseIntelMKL=No"
- )
-
- # Specifies the architecture of the toolset, NOT the architecture of the produced binary
- # This can help libraries that cause the linker to run out of memory.
- # https://support.microsoft.com/en-us/help/2891057/linker-fatal-error-lnk1102-out-of-memory
- if (_bc_MSVC_64_TOOLSET)
- list(APPEND MSVC_EXTRA_ARGS "/p:PreferredToolArchitecture=x64")
- endif()
-
- if (NOT _bc_DISABLE_PARALLEL)
- list(APPEND MSVC_EXTRA_ARGS "/m")
- endif()
-
- if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/build.ninja)
- set(BUILD_ARGS -v) # verbose output
- else()
- set(BUILD_ARGS ${MSVC_EXTRA_ARGS})
- endif()
-
- message(STATUS "Package ${TARGET_TRIPLET}-rel")
- vcpkg_execute_required_process(
- COMMAND ${CMAKE_COMMAND} --build . --config Release --target install -- ${BUILD_ARGS}
- WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
- LOGNAME package-${TARGET_TRIPLET}-rel
- )
- message(STATUS "Package ${TARGET_TRIPLET}-rel done")
-
- message(STATUS "Package ${TARGET_TRIPLET}-dbg")
- vcpkg_execute_required_process(
- COMMAND ${CMAKE_COMMAND} --build . --config Debug --target install -- ${BUILD_ARGS}
- WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
- LOGNAME package-${TARGET_TRIPLET}-dbg
- )
- message(STATUS "Package ${TARGET_TRIPLET}-dbg done")
+ vcpkg_build_cmake(LOGFILE_ROOT install TARGET install ${ARGN})
endfunction()
diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1
index c9aeb0f77..773ebeac4 100644
--- a/scripts/fetchDependency.ps1
+++ b/scripts/fetchDependency.ps1
@@ -36,17 +36,19 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
New-Item -ItemType directory -Path $downloadDir | Out-Null
}
+ $WC = New-Object System.Net.WebClient
+ $ProxyAuth = !$WC.Proxy.IsBypassed($url)
+ if ($ProxyAuth)
+ {
+ $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication"
+ $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic")
+ $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred)
+ $WC.Proxy.Credentials=$ProxyCred
+ }
+
if (($PSVersionTable.PSEdition -ne "Core") -and ($Dependency -ne "git")) # git fails with BITS
{
try {
- $WC = New-Object System.Net.WebClient
- $ProxyAuth = !$WC.Proxy.IsBypassed($url)
- If($ProxyAuth){
- $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication"
- $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic")
- $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred)
- }
-
Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop
}
catch [System.Exception] {
@@ -60,7 +62,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
if (!(Test-Path $downloadPath))
{
Write-Verbose("Downloading $Dependency...")
- (New-Object System.Net.WebClient).DownloadFile($url, $downloadPath)
+ $WC.DownloadFile($url, $downloadPath)
}
}
@@ -105,22 +107,32 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
if($Dependency -eq "cmake")
{
- $requiredVersion = "3.9.1"
- $downloadVersion = "3.9.1"
- $url = "https://cmake.org/files/v3.9/cmake-3.9.1-win32-x86.zip"
- $downloadPath = "$downloadsDir\cmake-3.9.1-win32-x86.zip"
- $expectedDownloadedFileHash = "e0d9501bd34e3100e925dcb2e07f5f0ce8980bdbe5fce0ae950b21368d54c1a1"
- $executableFromDownload = "$downloadsDir\cmake-3.9.1-win32-x86\bin\cmake.exe"
+ $requiredVersion = "3.9.3"
+ $downloadVersion = "3.9.3"
+ $url = "https://cmake.org/files/v3.9/cmake-3.9.3-win32-x86.zip"
+ $downloadPath = "$downloadsDir\cmake-3.9.3-win32-x86.zip"
+ $expectedDownloadedFileHash = "47870e3d4c9a5aa019e71020cd85cc60b6f2d2569fb239eaec204cd991e512f1"
+ $executableFromDownload = "$downloadsDir\cmake-3.9.3-win32-x86\bin\cmake.exe"
$extractionType = $ExtractionType_ZIP
$extractionFolder = $downloadsDir
}
elseif($Dependency -eq "nuget")
{
- $requiredVersion = "4.1.0"
- $downloadVersion = "4.1.0"
- $url = "https://dist.nuget.org/win-x86-commandline/v4.1.0/nuget.exe"
- $downloadPath = "$downloadsDir\nuget-4.1.0\nuget.exe"
- $expectedDownloadedFileHash = "4c1de9b026e0c4ab087302ff75240885742c0faa62bd2554f913bbe1f6cb63a0"
+ $requiredVersion = "4.3.0"
+ $downloadVersion = "4.3.0"
+ $url = "https://dist.nuget.org/win-x86-commandline/v4.3.0/nuget.exe"
+ $downloadPath = "$downloadsDir\nuget-$downloadVersion\nuget.exe"
+ $expectedDownloadedFileHash = "386da77a8cf2b63d1260b7020feeedabfe3b65ab31d20e6a313a530865972f3a"
+ $executableFromDownload = $downloadPath
+ $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED
+ }
+ elseif($Dependency -eq "vswhere")
+ {
+ $requiredVersion = "2.2.3"
+ $downloadVersion = "2.2.3"
+ $url = "https://github.com/Microsoft/vswhere/releases/download/2.2.3/vswhere.exe"
+ $downloadPath = "$downloadsDir\vswhere-$downloadVersion\vswhere.exe"
+ $expectedDownloadedFileHash = "5f19066ac91635ad17d33fe0f79fc63c672a46f98c0358589a90163bcb2733e8"
$executableFromDownload = $downloadPath
$extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED
}
@@ -137,6 +149,17 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
$extractionType = $ExtractionType_ZIP
$extractionFolder = "$downloadsDir\MinGit-2.14.1-32-bit"
}
+ elseif($Dependency -eq "installerbase")
+ {
+ $requiredVersion = "3.1.81"
+ $downloadVersion = "3.1.81"
+ $url = "https://github.com/podsvirov/installer-framework/releases/download/cr203958-9/QtInstallerFramework-win-x86.zip"
+ $downloadPath = "$downloadsDir\QtInstallerFramework-win-x86.zip"
+ $expectedDownloadedFileHash = "f2ce23cf5cf9fc7ce409bdca49328e09a070c0026d3c8a04e4dfde7b05b83fe8"
+ $executableFromDownload = "$downloadsDir\QtInstallerFramework-win-x86\bin\installerbase.exe"
+ $extractionType = $ExtractionType_ZIP
+ $extractionFolder = $downloadsDir
+ }
else
{
throw "Unknown program requested"
diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1
index f72491e5d..e9fb60cb2 100644
--- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1
+++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1
@@ -1,164 +1,50 @@
[CmdletBinding()]
param(
[Parameter(Mandatory=$False)]
- [switch]$DisableVS2017 = $False,
-
- [Parameter(Mandatory=$False)]
- [switch]$DisableVS2015 = $False
+ [string]$explicitlyRequestedVSPath = ""
)
-if ($DisableVS2017 -and $DisableVS2015)
-{
- throw "Both VS2015 and VS2017 were disabled."
-}
-
-function New-MSBuildInstance()
-{
- param ($msbuildExePath, $toolsetVersion)
-
- $instance = new-object PSObject
- $instance | add-member -type NoteProperty -Name msbuildExePath -Value $msbuildExePath
- $instance | add-member -type NoteProperty -Name toolsetVersion -Value $toolsetVersion
+$explicitlyRequestedVSPath = $explicitlyRequestedVSPath -replace "\\$" # Remove potential trailing backslash
- return $instance
-}
-
-Write-Verbose "Executing $($MyInvocation.MyCommand.Name) with DisableVS2017=$DisableVS2017, DisableVS2015=$DisableVS2015"
$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition
-
-$validInstances = New-Object System.Collections.ArrayList
-
-# VS2017
-Write-Verbose "`n`n"
-Write-Verbose "Checking for MSBuild from VS2017 instances..."
-$VisualStudio2017InstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1
-Write-Verbose "VS2017 Candidates: $([system.String]::Join(',', $VisualStudio2017InstallationInstances))"
-foreach ($instanceCandidate in $VisualStudio2017InstallationInstances)
-{
- $VCFolder= "$instanceCandidate\VC\Tools\MSVC\"
-
- if (Test-Path $VCFolder)
- {
- $instance = New-MSBuildInstance "$instanceCandidate\MSBuild\15.0\Bin\MSBuild.exe" "v141"
- Write-Verbose "Found $instance"
- $validInstances.Add($instance) > $null
- }
-}
-
-# VS2015 - in Program Files
-Write-Verbose "`n`n"
-Write-Verbose "Checking for MSBuild from VS2015 in Program Files..."
-$CandidateProgramFiles = $(& $scriptsDir\getProgramFiles32bit.ps1), $(& $scriptsDir\getProgramFilesPlatformBitness.ps1)
-Write-Verbose "Program Files Candidate locations: $([system.String]::Join(',', $CandidateProgramFiles))"
-foreach ($ProgramFiles in $CandidateProgramFiles)
-{
- $clExe= "$ProgramFiles\Microsoft Visual Studio 14.0\VC\bin\cl.exe"
-
- if (!(Test-Path $clExe))
- {
- Write-Verbose "$clExe - Not Found"
- continue
- }
-
- Write-Verbose "$clExe - Found"
- $instance = New-MSBuildInstance "$ProgramFiles\MSBuild\14.0\Bin\MSBuild.exe" "v140"
- Write-Verbose "Found $instance"
- $validInstances.Add($instance) > $null
-}
-
-# VS2015 - through the registry
-function NewCppRegistryPair()
-{
- param ($visualStudioEntry, $msBuildEntry)
-
- $instance = new-object PSObject
- $instance | add-member -type NoteProperty -Name visualStudioEntry -Value $visualStudioEntry
- $instance | add-member -type NoteProperty -Name msBuildEntry -Value $msBuildEntry
-
- return $instance
-}
-
-Write-Verbose "`n`n"
-Write-Verbose "Checking for MSBuild from VS2015 through the registry..."
-
-$registryPairs =
-$(NewCppRegistryPair "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\visualstudio\14.0" "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\msbuild\toolsversions\14.0"),
-$(NewCppRegistryPair "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\visualstudio\14.0" "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\msbuild\toolsversions\14.0")
-
-foreach ($pair in $registryPairs)
+$VisualStudioInstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1
+Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstallationInstances))"
+foreach ($instanceCandidate in $VisualStudioInstallationInstances)
{
- $vsEntry = $pair.visualStudioEntry
- try
- {
- $VS14InstallDir = $(gp $vsEntry InstallDir -erroraction Stop | % { $_.InstallDir })
- Write-Verbose "$vsEntry\InstallDir - Found"
- }
- catch
- {
- Write-Verbose "$vsEntry\InstallDir - Not Found"
- continue
- }
-
- Write-Verbose "$VS14InstallDir - Obtained from registry"
- # We want "${VS14InstallDir}..\..\VC\bin\cl.exe"
- # Doing Split-path to avoid the ..\.. from appearing in the output
- $clExePath = Split-path $VS14InstallDir -Parent
- $clExePath = Split-path $clExePath -Parent
- $clExePath = "$clExePath\VC\bin\cl.exe"
-
- if (!(Test-Path $clExePath))
- {
- Write-Verbose "$clExePath - Not Found"
- continue
- }
+ Write-Verbose "Inspecting: $instanceCandidate"
+ $split = $instanceCandidate -split "::"
+ # $preferenceWeight = $split[0]
+ # $releaseType = $split[1]
+ $version = $split[2]
+ $path = $split[3]
- Write-Verbose "$clExePath - Found"
-
- $msbuildEntry = $pair.msBuildEntry
- try
- {
- $MSBuild14 = $(gp $msbuildEntry MSBuildToolsPath -erroraction Stop | % { $_.MSBuildToolsPath })
- Write-Verbose "$msbuildEntry\MSBuildToolsPath - Found"
- }
- catch
- {
- Write-Verbose "$msbuildEntry\MSBuildToolsPath - Not Found"
- continue
- }
-
- Write-Verbose "${MSBuild14} - Obtained from registry"
- $msbuildPath = "${MSBuild14}MSBuild.exe"
- if (!(Test-Path $msbuildPath))
+ if ($explicitlyRequestedVSPath -ne "" -and $explicitlyRequestedVSPath -ne $path)
{
- Write-Verbose "$msbuildPath - Not Found"
+ Write-Verbose "Skipping: $instanceCandidate"
continue
}
- $instance = New-MSBuildInstance $msbuildPath "v140"
- Write-Verbose "Found $instance"
- $validInstances.Add($instance) > $null
-}
-
-Write-Verbose "`n`n`n"
-Write-Verbose "The following MSBuild instances were found:"
-foreach ($instance in $validInstances)
-{
- Write-Verbose $instance
-}
-
-# Selecting
-foreach ($instance in $validInstances)
-{
- if (!$DisableVS2017 -and $instance.toolsetVersion -eq "v141")
+ $majorVersion = $version.Substring(0,2);
+ if ($majorVersion -eq "15")
{
- return $instance.msbuildExePath, $instance.toolsetVersion
+ $VCFolder= "$path\VC\Tools\MSVC\"
+ if (Test-Path $VCFolder)
+ {
+ Write-Verbose "Picking: $instanceCandidate"
+ return "$path\MSBuild\15.0\Bin\MSBuild.exe", "v141"
+ }
}
- if (!$DisableVS2015 -and $instance.toolsetVersion -eq "v140")
+ if ($majorVersion -eq "14")
{
- return $instance.msbuildExePath, $instance.toolsetVersion
+ $clExe= "$path\VC\bin\cl.exe"
+ if (Test-Path $clExe)
+ {
+ Write-Verbose "Picking: $instanceCandidate"
+ $programFilesPath = & $scriptsDir\getProgramFiles32bit.ps1
+ return "$programFilesPath\MSBuild\14.0\Bin\MSBuild.exe", "v140"
+ }
}
}
-
throw "Could not find MSBuild version with C++ support. VS2015 or VS2017 (with C++) needs to be installed." \ No newline at end of file
diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1
index ca807980c..b2f186478 100644
--- a/scripts/findVisualStudioInstallationInstances.ps1
+++ b/scripts/findVisualStudioInstallationInstances.ps1
@@ -4,32 +4,35 @@ param(
)
$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition
-$vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root
+$vswhereExe = & $scriptsDir\fetchDependency.ps1 "vswhere"
-$downloadsDir = "$vcpkgRootDir\downloads"
+$output = & $vswhereExe -prerelease -legacy -products * -format xml
+[xml]$asXml = $output
-$nugetexe = & $scriptsDir\fetchDependency.ps1 "nuget"
-$nugetPackageDir = "$downloadsDir\nuget-packages"
-
-$SetupAPIVersion = "1.8.24"
-Write-Verbose "Fetching Microsoft.VisualStudio.Setup.Configuration.Native@$SetupAPIVersion from NuGet."
-$nugetOutput = & $nugetexe install Microsoft.VisualStudio.Setup.Configuration.Native -Version $SetupAPIVersion -OutputDirectory $nugetPackageDir -Source "https://api.nuget.org/v3/index.json" -nocache 2>&1
-Write-Verbose "Fetching Microsoft.VisualStudio.Setup.Configuration.Native@$SetupAPIVersion from NuGet. Done."
-
-$SetupConsoleExe = "$nugetPackageDir\Microsoft.VisualStudio.Setup.Configuration.Native.$SetupAPIVersion\tools\x86\Microsoft.VisualStudio.Setup.Configuration.Console.exe"
-
-if (!(Test-Path $SetupConsoleExe))
+$results = New-Object System.Collections.ArrayList
+foreach ($instance in $asXml.instances.instance)
{
- throw $nugetOutput
+ $installationPath = $instance.InstallationPath -replace "\\$" # Remove potential trailing backslash
+ $installationVersion = $instance.InstallationVersion
+ $isPrerelease = $instance.IsPrerelease
+ if ($isPrerelease -eq 0)
+ {
+ $releaseType = "PreferenceWeight3::StableRelease"
+ }
+ elseif ($isPrerelease -eq 1)
+ {
+ $releaseType = "PreferenceWeight2::PreRelease"
+ }
+ else
+ {
+ $releaseType = "PreferenceWeight1::Legacy"
+ }
+
+ # Placed like that for easy sorting according to preference
+ $results.Add("${releaseType}::${installationVersion}::${installationPath}") > $null
}
-$instances = & $SetupConsoleExe -nologo -value InstallationPath 2>&1
-$instanceCount = $instances.Length
-
-# The last item can be empty
-if ($instanceCount -gt 0 -and $instances[$instanceCount - 1] -eq "")
-{
- $instances = $instances[0..($instanceCount - 2)]
-}
+$results.Sort()
+$results.Reverse()
-return $instances
+return $results \ No newline at end of file
diff --git a/scripts/getWindowsSDK.ps1 b/scripts/getWindowsSDK.ps1
index 9aebae8e3..8ef26a436 100644
--- a/scripts/getWindowsSDK.ps1
+++ b/scripts/getWindowsSDK.ps1
@@ -13,14 +13,13 @@ if ($DisableWin10SDK -and $DisableWin81SDK)
}
Write-Verbose "Executing $($MyInvocation.MyCommand.Name)"
-$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition
$validInstances = New-Object System.Collections.ArrayList
# Windows 10 SDK
function CheckWindows10SDK($path)
{
- $folder = "$path\Include"
+ $folder = (Join-Path $path "Include")
if (!(Test-Path $folder))
{
Write-Verbose "$folder - Not Found"
@@ -37,7 +36,7 @@ function CheckWindows10SDK($path)
if (!(Test-Path $windowsheader))
{
Write-Verbose "$windowsheader - Not Found"
- return
+ continue
}
Write-Verbose "$windowsheader - Found"
@@ -45,7 +44,7 @@ function CheckWindows10SDK($path)
if (!(Test-Path $ddkheader))
{
Write-Verbose "$ddkheader - Not Found"
- return
+ continue
}
Write-Verbose "$ddkheader - Found"
@@ -106,4 +105,4 @@ foreach ($instance in $validInstances)
}
}
-throw "Could not detect a Windows SDK / TargetPlatformVersion" \ No newline at end of file
+throw "Could not detect a Windows SDK / TargetPlatformVersion"
diff --git a/scripts/get_triplet_environment.cmake b/scripts/get_triplet_environment.cmake
index 69e06bf97..b32f840d2 100644
--- a/scripts/get_triplet_environment.cmake
+++ b/scripts/get_triplet_environment.cmake
@@ -5,4 +5,5 @@ message("c35112b6-d1ba-415b-aa5d-81de856ef8eb")
message("VCPKG_TARGET_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE}")
message("VCPKG_CMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}")
message("VCPKG_CMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}")
-message("VCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET}") \ No newline at end of file
+message("VCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET}")
+message("VCPKG_VISUAL_STUDIO_PATH=${VCPKG_VISUAL_STUDIO_PATH}") \ No newline at end of file
diff --git a/scripts/ifw/maintenance.qs b/scripts/ifw/maintenance.qs
new file mode 100644
index 000000000..5cdad7225
--- /dev/null
+++ b/scripts/ifw/maintenance.qs
@@ -0,0 +1,46 @@
+// constructor
+function Component()
+{
+ installer.installationStarted.connect(this, Component.prototype.onInstallationStarted);
+}
+
+Component.prototype.onInstallationStarted = function()
+{
+ if (component.updateRequested() || component.installationRequested()) {
+ if (installer.value("os") == "win")
+ component.installerbaseBinaryPath = "@TargetDir@/tempmaintenancetool.exe";
+ installer.setInstallerBaseBinary(component.installerbaseBinaryPath);
+ }
+}
+
+Component.prototype.createOperations = function()
+{
+ // call the base createOperations
+ component.createOperations();
+
+ // only for windows online installer
+ if ( installer.value("os") == "win" && !installer.isOfflineOnly() )
+ {
+ // shortcut to add or remove packages
+ component.addOperation( "CreateShortcut",
+ "@TargetDir@/maintenancetool.exe",
+ "@StartMenuDir@/Manage vcpkg.lnk",
+ " --manage-packages");
+ // shortcut to update packages
+ component.addOperation( "CreateShortcut",
+ "@TargetDir@/maintenancetool.exe",
+ "@StartMenuDir@/Update vcpkg.lnk",
+ " --updater");
+ }
+
+ // create uninstall link only for windows
+ if (installer.value("os") == "win")
+ {
+ // shortcut to uninstaller
+ component.addOperation( "CreateShortcut",
+ "@TargetDir@/maintenancetool.exe",
+ "@StartMenuDir@/Uninstall vcpkg.lnk",
+ " --uninstall");
+ }
+}
+
diff --git a/scripts/internalCI.ps1 b/scripts/internalCI.ps1
index 67871acc1..887eb7bea 100644
--- a/scripts/internalCI.ps1
+++ b/scripts/internalCI.ps1
@@ -14,7 +14,7 @@ if (-not $?) { throw $? }
./vcpkg.exe install azure-storage-cpp cpprestsdk:x64-windows-static cpprestsdk:x86-uwp
if (-not $?) { throw $? }
-./vcpkg.exe install bond chakracore cryptopp zlib expat sdl2 curl sqlite3 libuv protobuf:x64-windows sfml opencv:x64-windows uwebsockets uwebsockets:x64-windows-static
+./vcpkg.exe install bond cryptopp zlib expat sdl2 curl sqlite3 libuv protobuf:x64-windows sfml opencv:x64-windows uwebsockets uwebsockets:x64-windows-static
if (-not $?) { throw $? }
./vcpkg.exe install opencv:x86-uwp boost:x86-uwp
diff --git a/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psd1 b/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psd1
new file mode 100644
index 000000000..3fb94fe7d
--- /dev/null
+++ b/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psd1
@@ -0,0 +1,31 @@
+@{
+
+# Script module or binary module file associated with this manifest.
+ModuleToProcess = 'posh-vcpkg.psm1'
+
+# Version number of this module.
+ModuleVersion = '0.0.1'
+
+# ID used to uniquely identify this module
+GUID = '948f02ab-fc99-4a53-8335-b6556eef129b'
+
+# Minimum version of the Windows PowerShell engine required by this module
+PowerShellVersion = '5.0'
+
+FunctionsToExport = @('TabExpansion')
+CmdletsToExport = @()
+VariablesToExport = @()
+AliasesToExport = @()
+
+# Private data to pass to the module specified in RootModule/ModuleToProcess.
+# This may also contain a PSData hashtable with additional module metadata used by PowerShell.
+PrivateData =
+@{
+ PSData =
+ @{
+ # Tags applied to this module. These help with module discovery in online galleries.
+ Tags = @('vcpkg', 'tab', 'tab-completion', 'tab-expansion', 'tabexpansion')
+ }
+}
+
+}
diff --git a/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psm1 b/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psm1
new file mode 100644
index 000000000..25ef99609
--- /dev/null
+++ b/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psm1
@@ -0,0 +1,39 @@
+param()
+
+if (Get-Module posh-vcpkg) { return }
+
+if ($PSVersionTable.PSVersion.Major -lt 5) {
+ Write-Warning ("posh-vcpkg does not support PowerShell versions before 5.0.")
+ return
+}
+
+if (Test-Path Function:\TabExpansion) {
+ Rename-Item Function:\TabExpansion VcpkgTabExpansionBackup
+}
+
+function TabExpansion($line, $lastWord) {
+ $lastBlock = [regex]::Split($line, '[|;]')[-1].TrimStart()
+
+ switch -regex ($lastBlock) {
+ "^(?<vcpkgexe>(\./|\.\\|)vcpkg(\.exe|)) (?<remaining>.*)$"
+ {
+ & $matches['vcpkgexe'] autocomplete $matches['remaining']
+ return
+ }
+
+ # Fall back on existing tab expansion
+ default {
+ if (Test-Path Function:\VcpkgTabExpansionBackup) {
+ VcpkgTabExpansionBackup $line $lastWord
+ }
+ }
+ }
+}
+
+$exportModuleMemberParams = @{
+ Function = @(
+ 'TabExpansion'
+ )
+}
+
+Export-ModuleMember @exportModuleMemberParams
diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt
index d27b8ca83..04ab0d2c9 100644
--- a/toolsrc/VERSION.txt
+++ b/toolsrc/VERSION.txt
@@ -1 +1 @@
-"0.0.85" \ No newline at end of file
+"0.0.91" \ No newline at end of file
diff --git a/toolsrc/include/CStringView.h b/toolsrc/include/CStringView.h
deleted file mode 100644
index 282caad3a..000000000
--- a/toolsrc/include/CStringView.h
+++ /dev/null
@@ -1,54 +0,0 @@
-#pragma once
-#include <string>
-
-namespace vcpkg
-{
- template<class CharType>
- struct BasicCStringView
- {
- constexpr BasicCStringView() : cstr(nullptr) {}
- constexpr BasicCStringView(const CharType* cstr) : cstr(cstr) {}
- constexpr BasicCStringView(const BasicCStringView&) = default;
- BasicCStringView(const std::basic_string<CharType>& str) : cstr(str.c_str()) {}
-
- constexpr operator const CharType*() const { return cstr; }
- constexpr const CharType* c_str() const { return cstr; }
-
- private:
- const CharType* cstr;
- };
-
- template<class CharType>
- bool operator==(const std::basic_string<CharType>& l, const BasicCStringView<CharType>& r)
- {
- return l == r.c_str();
- }
-
- template<class CharType>
- bool operator==(const BasicCStringView<CharType>& r, const std::basic_string<CharType>& l)
- {
- return l == r.c_str();
- }
-
- template<class CharType>
- bool operator!=(const BasicCStringView<CharType>& r, const std::basic_string<CharType>& l)
- {
- return l != r.c_str();
- }
-
- template<class CharType>
- bool operator!=(const std::basic_string<CharType>& l, const BasicCStringView<CharType>& r)
- {
- return l != r.c_str();
- }
-
- using CStringView = BasicCStringView<char>;
- using CWStringView = BasicCStringView<wchar_t>;
-
- inline const char* to_printf_arg(const CStringView string_view) { return string_view.c_str(); }
-
- inline const wchar_t* to_wprintf_arg(const CWStringView string_view) { return string_view.c_str(); }
-
- static_assert(sizeof(CStringView) == sizeof(void*), "CStringView must be a simple wrapper around char*");
- static_assert(sizeof(CWStringView) == sizeof(void*), "CWStringView must be a simple wrapper around wchar_t*");
-}
diff --git a/toolsrc/include/Span.h b/toolsrc/include/Span.h
deleted file mode 100644
index b16af2cef..000000000
--- a/toolsrc/include/Span.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#pragma once
-
-#include <array>
-#include <cstddef>
-#include <vector>
-
-template<class T>
-struct span
-{
-public:
- using element_type = T;
- using pointer = T*;
- using reference = T&;
- using iterator = T*;
-
- constexpr span() noexcept : m_ptr(nullptr), m_count(0) {}
- constexpr span(std::nullptr_t) noexcept : span() {}
- constexpr span(T* ptr, size_t count) noexcept : m_ptr(ptr), m_count(count) {}
- constexpr span(T* ptr_begin, T* ptr_end) noexcept : m_ptr(ptr_begin), m_count(ptr_end - ptr_begin) {}
-
- template<size_t N>
- constexpr span(T (&arr)[N]) noexcept : span(arr, N)
- {
- }
-
- span(std::vector<T>& v) noexcept : span(v.data(), v.size()) {}
- span(const std::vector<std::remove_const_t<T>>& v) noexcept : span(v.data(), v.size()) {}
-
- constexpr iterator begin() const { return m_ptr; }
- constexpr iterator end() const { return m_ptr + m_count; }
-
- constexpr reference operator[](size_t i) const { return m_ptr[i]; }
- constexpr size_t size() const { return m_count; }
-
-private:
- pointer m_ptr;
- size_t m_count;
-};
diff --git a/toolsrc/include/filesystem_fs.h b/toolsrc/include/filesystem_fs.h
deleted file mode 100644
index 0651ebf25..000000000
--- a/toolsrc/include/filesystem_fs.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#pragma once
-
-#include <filesystem>
-
-namespace fs
-{
- namespace stdfs = std::experimental::filesystem;
-
- using stdfs::path;
- using stdfs::copy_options;
- using stdfs::file_status;
-
- inline bool is_regular_file(file_status s) { return stdfs::is_regular_file(s); }
- inline bool is_directory(file_status s) { return stdfs::is_directory(s); }
- inline bool status_known(file_status s) { return stdfs::status_known(s); }
-} \ No newline at end of file
diff --git a/toolsrc/include/pch.h b/toolsrc/include/pch.h
index 770bcf07a..5c31fbbd1 100644
--- a/toolsrc/include/pch.h
+++ b/toolsrc/include/pch.h
@@ -1,10 +1,22 @@
#pragma once
+#if defined(_WIN32)
#define NOMINMAX
#define WIN32_LEAN_AND_MEAN
+#pragma warning(suppress : 4768)
#include <windows.h>
+#pragma warning(suppress : 4768)
+#include <Shlobj.h>
+
+#include <process.h>
+#include <shellapi.h>
+#include <winhttp.h>
+#else
+#include <unistd.h>
+#endif
+
#include <algorithm>
#include <array>
#include <atomic>
@@ -15,7 +27,12 @@
#include <cstdarg>
#include <cstddef>
#include <cstdint>
+#if defined(_WIN32)
#include <filesystem>
+#else
+#include <experimental/filesystem>
+#endif
+#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
@@ -24,19 +41,17 @@
#include <map>
#include <memory>
#include <mutex>
-#include <process.h>
#include <regex>
#include <set>
-#include <shellapi.h>
-#include <shlobj.h>
#include <stdexcept>
#include <string>
#include <sys/timeb.h>
+#include <sys/types.h>
#include <system_error>
+#include <thread>
#include <time.h>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
-#include <winhttp.h>
diff --git a/toolsrc/include/vcpkg_Checks.h b/toolsrc/include/vcpkg/base/checks.h
index 01cb7209b..fb162c897 100644
--- a/toolsrc/include/vcpkg_Checks.h
+++ b/toolsrc/include/vcpkg/base/checks.h
@@ -1,7 +1,8 @@
#pragma once
-#include "LineInfo.h"
-#include "vcpkg_Strings.h"
+#include <vcpkg/base/cstringview.h>
+#include <vcpkg/base/lineinfo.h>
+#include <vcpkg/base/strings.h>
namespace vcpkg::Checks
{
@@ -20,33 +21,35 @@ namespace vcpkg::Checks
[[noreturn]] inline void exit_success(const LineInfo& line_info) { exit_with_code(line_info, EXIT_SUCCESS); }
// Display an error message to the user and exit the tool.
- [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView errorMessage);
+ [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView error_message);
template<class Arg1, class... Args>
// Display an error message to the user and exit the tool.
[[noreturn]] void exit_with_message(const LineInfo& line_info,
- const char* errorMessageTemplate,
- const Arg1 errorMessageArg1,
- const Args&... errorMessageArgs)
+ const char* error_message_template,
+ const Arg1 error_message_arg1,
+ const Args&... error_message_args)
{
- exit_with_message(line_info, Strings::format(errorMessageTemplate, errorMessageArg1, errorMessageArgs...));
+ exit_with_message(line_info,
+ Strings::format(error_message_template, error_message_arg1, error_message_args...));
}
void check_exit(const LineInfo& line_info, bool expression);
- void check_exit(const LineInfo& line_info, bool expression, const CStringView errorMessage);
+ void check_exit(const LineInfo& line_info, bool expression, const CStringView error_message);
template<class Conditional, class Arg1, class... Args>
void check_exit(const LineInfo& line_info,
Conditional&& expression,
- const char* errorMessageTemplate,
- const Arg1 errorMessageArg1,
- const Args&... errorMessageArgs)
+ const char* error_message_template,
+ const Arg1 error_message_arg1,
+ const Args&... error_message_args)
{
if (!expression)
{
// Only create the string if the expression is false
- exit_with_message(line_info, Strings::format(errorMessageTemplate, errorMessageArg1, errorMessageArgs...));
+ exit_with_message(line_info,
+ Strings::format(error_message_template, error_message_arg1, error_message_args...));
}
}
}
diff --git a/toolsrc/include/vcpkg_Chrono.h b/toolsrc/include/vcpkg/base/chrono.h
index c14019ff9..b525852f2 100644
--- a/toolsrc/include/vcpkg_Chrono.h
+++ b/toolsrc/include/vcpkg/base/chrono.h
@@ -3,7 +3,7 @@
#include <chrono>
#include <string>
-namespace vcpkg
+namespace vcpkg::Chrono
{
class ElapsedTime
{
diff --git a/toolsrc/include/coff_file_reader.h b/toolsrc/include/vcpkg/base/cofffilereader.h
index 09f6447c2..ad2cc7b12 100644
--- a/toolsrc/include/coff_file_reader.h
+++ b/toolsrc/include/vcpkg/base/cofffilereader.h
@@ -1,9 +1,11 @@
#pragma once
-#include "MachineType.h"
-#include "filesystem_fs.h"
+
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/machinetype.h>
+
#include <vector>
-namespace vcpkg::COFFFileReader
+namespace vcpkg::CoffFileReader
{
struct DllInfo
{
diff --git a/toolsrc/include/vcpkg/base/cstringview.h b/toolsrc/include/vcpkg/base/cstringview.h
new file mode 100644
index 000000000..342455402
--- /dev/null
+++ b/toolsrc/include/vcpkg/base/cstringview.h
@@ -0,0 +1,69 @@
+#pragma once
+
+#include <string.h>
+#include <string>
+
+namespace vcpkg
+{
+ struct CStringView
+ {
+ constexpr CStringView() : cstr(nullptr) {}
+ constexpr CStringView(const char* cstr) : cstr(cstr) {}
+ constexpr CStringView(const CStringView&) = default;
+ CStringView(const std::string& str) : cstr(str.c_str()) {}
+
+ constexpr const char* c_str() const { return cstr; }
+
+ private:
+ const char* cstr;
+ };
+
+ struct CWStringView
+ {
+ constexpr CWStringView() : cstr(nullptr) {}
+ constexpr CWStringView(const wchar_t* cstr) : cstr(cstr) {}
+ constexpr CWStringView(const CWStringView&) = default;
+ CWStringView(const std::wstring& str) : cstr(str.c_str()) {}
+
+ constexpr const wchar_t* c_str() const { return cstr; }
+
+ private:
+ const wchar_t* cstr;
+ };
+
+ namespace details
+ {
+ inline bool vcpkg_strcmp(const char* l, const char* r) { return strcmp(l, r) == 0; }
+ }
+
+ inline bool operator==(const CStringView& l, const CStringView& r)
+ {
+ return details::vcpkg_strcmp(l.c_str(), r.c_str());
+ }
+
+ inline bool operator==(const char* l, const CStringView& r) { return details::vcpkg_strcmp(l, r.c_str()); }
+
+ inline bool operator==(const CStringView& r, const char* l) { return details::vcpkg_strcmp(l, r.c_str()); }
+
+ inline bool operator==(const std::string& l, const CStringView& r) { return l == r.c_str(); }
+
+ inline bool operator==(const CStringView& r, const std::string& l) { return l == r.c_str(); }
+
+ // notequals
+ inline bool operator!=(const CStringView& l, const CStringView& r)
+ {
+ return !details::vcpkg_strcmp(l.c_str(), r.c_str());
+ }
+
+ inline bool operator!=(const char* l, const CStringView& r) { return !details::vcpkg_strcmp(l, r.c_str()); }
+
+ inline bool operator!=(const CStringView& r, const char* l) { return !details::vcpkg_strcmp(l, r.c_str()); }
+
+ inline bool operator!=(const CStringView& r, const std::string& l) { return l != r.c_str(); }
+
+ inline bool operator!=(const std::string& l, const CStringView& r) { return l != r.c_str(); }
+
+ inline const char* to_printf_arg(const CStringView string_view) { return string_view.c_str(); }
+
+ static_assert(sizeof(CStringView) == sizeof(void*), "CStringView must be a simple wrapper around char*");
+}
diff --git a/toolsrc/include/vcpkg_Enums.h b/toolsrc/include/vcpkg/base/enums.h
index c75feaa1f..6eca2cfe1 100644
--- a/toolsrc/include/vcpkg_Enums.h
+++ b/toolsrc/include/vcpkg/base/enums.h
@@ -1,5 +1,7 @@
#pragma once
-#include "LineInfo.h"
+
+#include <vcpkg/base/lineinfo.h>
+
#include <string>
namespace vcpkg::Enums
diff --git a/toolsrc/include/vcpkg_expected.h b/toolsrc/include/vcpkg/base/expected.h
index 9637ec087..b3b81ae81 100644
--- a/toolsrc/include/vcpkg_expected.h
+++ b/toolsrc/include/vcpkg/base/expected.h
@@ -1,6 +1,7 @@
#pragma once
-#include "vcpkg_Checks.h"
+#include <vcpkg/base/checks.h>
+
#include <system_error>
namespace vcpkg
@@ -32,7 +33,7 @@ namespace vcpkg
ErrorHolder() = default;
ErrorHolder(const std::error_code& err) : m_err(err) {}
- constexpr bool has_error() const { return bool(m_err); }
+ bool has_error() const { return bool(m_err); }
const std::error_code& error() const { return m_err; }
std::error_code& error() { return m_err; }
@@ -71,13 +72,13 @@ namespace vcpkg
return std::move(this->m_t);
}
- const T& value_or_exit(const LineInfo& line_info) const &
+ const T& value_or_exit(const LineInfo& line_info) const&
{
exit_if_error(line_info);
return this->m_t;
}
- const S& error() const & { return this->m_s.error(); }
+ const S& error() const& { return this->m_s.error(); }
S&& error() && { return std::move(this->m_s.error()); }
diff --git a/toolsrc/include/vcpkg_Files.h b/toolsrc/include/vcpkg/base/files.h
index 855e8ea45..63cf3c6fd 100644
--- a/toolsrc/include/vcpkg_Files.h
+++ b/toolsrc/include/vcpkg/base/files.h
@@ -1,11 +1,29 @@
#pragma once
-#include "filesystem_fs.h"
-#include "vcpkg_expected.h"
+#include <vcpkg/base/expected.h>
+
+#if defined(_WIN32)
+#include <filesystem>
+#else
+#include <experimental/filesystem>
+#endif
+
+namespace fs
+{
+ namespace stdfs = std::experimental::filesystem;
+
+ using stdfs::copy_options;
+ using stdfs::file_status;
+ using stdfs::path;
+
+ inline bool is_regular_file(file_status s) { return stdfs::is_regular_file(s); }
+ inline bool is_directory(file_status s) { return stdfs::is_directory(s); }
+ inline bool status_known(file_status s) { return stdfs::status_known(s); }
+}
namespace vcpkg::Files
{
- __interface Filesystem
+ struct Filesystem
{
virtual Expected<std::string> read_contents(const fs::path& file_path) const = 0;
virtual Expected<std::vector<std::string>> read_lines(const fs::path& file_path) const = 0;
@@ -26,8 +44,10 @@ namespace vcpkg::Files
virtual bool create_directory(const fs::path& path, std::error_code& ec) = 0;
virtual bool create_directories(const fs::path& path, std::error_code& ec) = 0;
virtual void copy(const fs::path& oldpath, const fs::path& newpath, fs::copy_options opts) = 0;
- virtual bool copy_file(
- const fs::path& oldpath, const fs::path& newpath, fs::copy_options opts, std::error_code& ec) = 0;
+ virtual bool copy_file(const fs::path& oldpath,
+ const fs::path& newpath,
+ fs::copy_options opts,
+ std::error_code& ec) = 0;
virtual fs::file_status status(const fs::path& path, std::error_code& ec) const = 0;
};
@@ -39,5 +59,5 @@ namespace vcpkg::Files
void print_paths(const std::vector<fs::path>& paths);
- std::vector<fs::path> find_from_PATH(const std::wstring& name);
+ std::vector<fs::path> find_from_PATH(const std::string& name);
}
diff --git a/toolsrc/include/vcpkg_Graphs.h b/toolsrc/include/vcpkg/base/graphs.h
index 13c0a7136..b585d2bb9 100644
--- a/toolsrc/include/vcpkg_Graphs.h
+++ b/toolsrc/include/vcpkg/base/graphs.h
@@ -3,6 +3,8 @@
#include <unordered_map>
#include <unordered_set>
+#include <vcpkg/base/checks.h>
+
namespace vcpkg::Graphs
{
enum class ExplorationStatus
@@ -18,11 +20,11 @@ namespace vcpkg::Graphs
};
template<class V, class U>
- __interface AdjacencyProvider
+ struct AdjacencyProvider
{
- std::vector<V> adjacency_list(const U& vertex) const;
+ virtual std::vector<V> adjacency_list(const U& vertex) const = 0;
- U load_vertex_data(const V& vertex) const;
+ virtual U load_vertex_data(const V& vertex) const = 0;
};
template<class V, class U>
diff --git a/toolsrc/include/lazy.h b/toolsrc/include/vcpkg/base/lazy.h
index 58c11c002..58c11c002 100644
--- a/toolsrc/include/lazy.h
+++ b/toolsrc/include/vcpkg/base/lazy.h
diff --git a/toolsrc/include/LineInfo.h b/toolsrc/include/vcpkg/base/lineinfo.h
index 62973462a..62973462a 100644
--- a/toolsrc/include/LineInfo.h
+++ b/toolsrc/include/vcpkg/base/lineinfo.h
diff --git a/toolsrc/include/MachineType.h b/toolsrc/include/vcpkg/base/machinetype.h
index 6f61bbd53..b85cdbb0b 100644
--- a/toolsrc/include/MachineType.h
+++ b/toolsrc/include/vcpkg/base/machinetype.h
@@ -1,4 +1,5 @@
#pragma once
+
#include <cstdint>
namespace vcpkg
diff --git a/toolsrc/include/vcpkg_optional.h b/toolsrc/include/vcpkg/base/optional.h
index 31a2d3e88..ff7a210c7 100644
--- a/toolsrc/include/vcpkg_optional.h
+++ b/toolsrc/include/vcpkg/base/optional.h
@@ -1,5 +1,6 @@
#pragma once
-#include "vcpkg_Checks.h"
+
+#include <vcpkg/base/checks.h>
namespace vcpkg
{
@@ -29,7 +30,7 @@ namespace vcpkg
return std::move(this->m_t);
}
- const T& value_or_exit(const LineInfo& line_info) const &
+ const T& value_or_exit(const LineInfo& line_info) const&
{
this->exit_if_null(line_info);
return this->m_t;
@@ -40,7 +41,7 @@ namespace vcpkg
constexpr bool has_value() const { return m_is_present; }
template<class U>
- T value_or(U&& default_value) const &
+ T value_or(U&& default_value) const&
{
return bool(*this) ? this->m_t : static_cast<T>(std::forward<U>(default_value));
}
diff --git a/toolsrc/include/SortedVector.h b/toolsrc/include/vcpkg/base/sortedvector.h
index 62808cc2f..62808cc2f 100644
--- a/toolsrc/include/SortedVector.h
+++ b/toolsrc/include/vcpkg/base/sortedvector.h
diff --git a/toolsrc/include/vcpkg/base/span.h b/toolsrc/include/vcpkg/base/span.h
new file mode 100644
index 000000000..6be546351
--- /dev/null
+++ b/toolsrc/include/vcpkg/base/span.h
@@ -0,0 +1,60 @@
+#pragma once
+
+#include <array>
+#include <cstddef>
+#include <initializer_list>
+#include <vector>
+
+namespace vcpkg
+{
+ template<class T>
+ struct Span
+ {
+ public:
+ using element_type = T;
+ using pointer = T*;
+ using reference = T&;
+ using iterator = T*;
+
+ constexpr Span() noexcept : m_ptr(nullptr), m_count(0) {}
+ constexpr Span(std::nullptr_t) noexcept : Span() {}
+ constexpr Span(T* ptr, size_t count) noexcept : m_ptr(ptr), m_count(count) {}
+ constexpr Span(T* ptr_begin, T* ptr_end) noexcept : m_ptr(ptr_begin), m_count(ptr_end - ptr_begin) {}
+ constexpr Span(std::initializer_list<T> l) noexcept : m_ptr(l.begin()), m_count(l.size()) {}
+
+ template<size_t N>
+ constexpr Span(T (&arr)[N]) noexcept : Span(arr, N)
+ {
+ }
+
+ template<size_t N>
+ constexpr Span(const std::array<std::remove_const_t<T>, N>& arr) noexcept : Span(arr.data(), arr.size())
+ {
+ }
+
+ Span(std::vector<T>& v) noexcept : Span(v.data(), v.size()) {}
+ Span(const std::vector<std::remove_const_t<T>>& v) noexcept : Span(v.data(), v.size()) {}
+
+ constexpr iterator begin() const { return m_ptr; }
+ constexpr iterator end() const { return m_ptr + m_count; }
+
+ constexpr reference operator[](size_t i) const { return m_ptr[i]; }
+ constexpr size_t size() const { return m_count; }
+
+ private:
+ pointer m_ptr;
+ size_t m_count;
+ };
+
+ template<class T>
+ Span<T> make_span(std::vector<T>& v)
+ {
+ return {v.data(), v.size()};
+ }
+
+ template<class T>
+ Span<const T> make_span(const std::vector<T>& v)
+ {
+ return {v.data(), v.size()};
+ }
+} \ No newline at end of file
diff --git a/toolsrc/include/vcpkg_Strings.h b/toolsrc/include/vcpkg/base/strings.h
index 61f6fab61..d263e3b6b 100644
--- a/toolsrc/include/vcpkg_Strings.h
+++ b/toolsrc/include/vcpkg/base/strings.h
@@ -1,6 +1,7 @@
#pragma once
-#include "CStringView.h"
+#include <vcpkg/base/cstringview.h>
+
#include <vector>
namespace vcpkg::Strings::details
@@ -15,30 +16,17 @@ namespace vcpkg::Strings::details
inline const char* to_printf_arg(const char* s) { return s; }
- inline int to_printf_arg(const int s) { return s; }
-
- inline long long to_printf_arg(const long long s) { return s; }
-
- inline unsigned long to_printf_arg(const unsigned long s) { return s; }
-
- inline size_t to_printf_arg(const size_t s) { return s; }
-
- inline double to_printf_arg(const double s) { return s; }
+ template<class T, class = std::enable_if_t<std::is_arithmetic<T>::value>>
+ T to_printf_arg(T s)
+ {
+ return s;
+ }
std::string format_internal(const char* fmtstr, ...);
-
- inline const wchar_t* to_wprintf_arg(const std::wstring& s) { return s.c_str(); }
-
- inline const wchar_t* to_wprintf_arg(const wchar_t* s) { return s; }
-
- std::wstring wformat_internal(const wchar_t* fmtstr, ...);
}
namespace vcpkg::Strings
{
- static constexpr const char* EMPTY = "";
- static constexpr const wchar_t* WEMPTY = L"";
-
template<class... Args>
std::string format(const char* fmtstr, const Args&... args)
{
@@ -46,37 +34,32 @@ namespace vcpkg::Strings
return details::format_internal(fmtstr, to_printf_arg(to_printf_arg(args))...);
}
- template<class... Args>
- std::wstring wformat(const wchar_t* fmtstr, const Args&... args)
- {
- using vcpkg::Strings::details::to_wprintf_arg;
- return details::wformat_internal(fmtstr, to_wprintf_arg(to_wprintf_arg(args))...);
- }
-
- std::wstring to_utf16(const CStringView s);
+ std::wstring to_utf16(const CStringView& s);
- std::string to_utf8(const CWStringView w);
+ std::string to_utf8(const CWStringView& w);
std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern);
bool case_insensitive_ascii_contains(const std::string& s, const std::string& pattern);
- int case_insensitive_ascii_compare(const CStringView left, const CStringView right);
+ bool case_insensitive_ascii_equals(const CStringView left, const CStringView right);
std::string ascii_to_lowercase(const std::string& input);
- template<class Container, class Transformer, class CharType>
- std::basic_string<CharType> join(const CharType* delimiter, const Container& v, Transformer transformer)
+ bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern);
+
+ template<class Container, class Transformer>
+ std::string join(const char* delimiter, const Container& v, Transformer transformer)
{
const auto begin = v.begin();
const auto end = v.end();
if (begin == end)
{
- return std::basic_string<CharType>();
+ return std::string();
}
- std::basic_string<CharType> output;
+ std::string output;
output.append(transformer(*begin));
for (auto it = std::next(begin); it != end; ++it)
{
@@ -86,8 +69,8 @@ namespace vcpkg::Strings
return output;
}
- template<class Container, class CharType>
- std::basic_string<CharType> join(const CharType* delimiter, const Container& v)
+ template<class Container>
+ std::string join(const char* delimiter, const Container& v)
{
using Element = decltype(*v.begin());
return join(delimiter, v, [](const Element& x) -> const Element& { return x; });
diff --git a/toolsrc/include/vcpkg_System.h b/toolsrc/include/vcpkg/base/system.h
index 9dd9ea8bd..b396ef293 100644
--- a/toolsrc/include/vcpkg_System.h
+++ b/toolsrc/include/vcpkg/base/system.h
@@ -1,9 +1,8 @@
#pragma once
-#include "filesystem_fs.h"
-#include "vcpkg_Strings.h"
-#include "vcpkg_optional.h"
-#include <Windows.h>
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/optional.h>
+#include <vcpkg/base/strings.h>
namespace vcpkg::System
{
@@ -17,13 +16,13 @@ namespace vcpkg::System
std::string output;
};
- int cmd_execute_clean(const CWStringView cmd_line);
+ int cmd_execute_clean(const CStringView cmd_line);
- int cmd_execute(const CWStringView cmd_line);
+ int cmd_execute(const CStringView cmd_line);
- ExitCodeAndOutput cmd_execute_and_capture_output(const CWStringView cmd_line);
+ ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line);
- std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args = Strings::WEMPTY);
+ std::string create_powershell_script_cmd(const fs::path& script_path, const CStringView args = "");
enum class Color
{
@@ -62,9 +61,9 @@ namespace vcpkg::System
return System::println(c, Strings::format(messageTemplate, messageArg1, messageArgs...));
}
- Optional<std::wstring> get_environment_variable(const CWStringView varname) noexcept;
+ Optional<std::string> get_environment_variable(const CStringView varname) noexcept;
- Optional<std::wstring> get_registry_string(HKEY base, const CWStringView subkey, const CWStringView valuename);
+ Optional<std::string> get_registry_string(void* base_hkey, const CStringView subkey, const CStringView valuename);
enum class CPUArchitecture
{
@@ -74,15 +73,15 @@ namespace vcpkg::System
ARM64,
};
- Optional<CPUArchitecture> to_cpu_architecture(CStringView arch);
+ Optional<CPUArchitecture> to_cpu_architecture(const CStringView& arch);
CPUArchitecture get_host_processor();
std::vector<CPUArchitecture> get_supported_host_architectures();
- const fs::path& get_ProgramFiles_32_bit();
+ const fs::path& get_program_files_32_bit();
- const fs::path& get_ProgramFiles_platform_bitness();
+ const fs::path& get_program_files_platform_bitness();
}
namespace vcpkg::Debug
diff --git a/toolsrc/include/vcpkg_Util.h b/toolsrc/include/vcpkg/base/util.h
index c76ca01ac..d5db6b6ee 100644
--- a/toolsrc/include/vcpkg_Util.h
+++ b/toolsrc/include/vcpkg/base/util.h
@@ -1,5 +1,6 @@
#pragma once
+#include <algorithm>
#include <map>
#include <mutex>
#include <utility>
@@ -7,6 +8,18 @@
namespace vcpkg::Util
{
+ template<class Container>
+ using ElementT = std::remove_reference_t<decltype(*begin(std::declval<Container>()))>;
+
+ namespace Vectors
+ {
+ template<class Container, class T = ElementT<Container>>
+ void concatenate(std::vector<T>* augend, const Container& addend)
+ {
+ augend->insert(augend->end(), addend.begin(), addend.end());
+ }
+ }
+
template<class Cont, class Func>
using FmapOut = decltype(std::declval<Func>()(*begin(std::declval<Cont>())));
@@ -38,6 +51,12 @@ namespace vcpkg::Util
}
template<class Container, class Pred>
+ void stable_keep_if(Container& cont, Pred pred)
+ {
+ cont.erase(std::stable_partition(cont.begin(), cont.end(), pred), cont.end());
+ }
+
+ template<class Container, class Pred>
void unstable_keep_if(Container& cont, Pred pred)
{
cont.erase(std::partition(cont.begin(), cont.end(), pred), cont.end());
@@ -50,25 +69,37 @@ namespace vcpkg::Util
}
template<class Container, class V>
- auto find(const Container& cont, V&& v)
+ auto find(Container&& cont, V&& v)
{
- return std::find(cont.cbegin(), cont.cend(), v);
+ using std::begin;
+ using std::end;
+ return std::find(begin(cont), end(cont), v);
}
template<class Container, class Pred>
- auto find_if(const Container& cont, Pred pred)
+ auto find_if(Container&& cont, Pred pred)
+ {
+ using std::begin;
+ using std::end;
+ return std::find_if(begin(cont), end(cont), pred);
+ }
+
+ template<class Container, class T = ElementT<Container>>
+ std::vector<T*> element_pointers(Container&& cont)
{
- return std::find_if(cont.cbegin(), cont.cend(), pred);
+ return fmap(cont, [](auto&& x) { return &x; });
}
template<class Container, class Pred>
- auto find_if_not(const Container& cont, Pred pred)
+ auto find_if_not(Container&& cont, Pred pred)
{
- return std::find_if_not(cont.cbegin(), cont.cend(), pred);
+ using std::begin;
+ using std::end;
+ return std::find_if_not(begin(cont), end(cont), pred);
}
template<class K, class V, class Container, class Func>
- void group_by(const Container& cont, std::map<K, std::vector<const V*>>* output, Func f)
+ void group_by(const Container& cont, std::map<K, std::vector<const V*>>* output, Func&& f)
{
for (const V& element : cont)
{
@@ -77,6 +108,12 @@ namespace vcpkg::Util
}
}
+ template<class AssocContainer, class K = std::decay_t<decltype(begin(std::declval<AssocContainer>())->first)>>
+ std::vector<K> extract_keys(AssocContainer&& input_map)
+ {
+ return fmap(input_map, [](auto&& p) { return p.first; });
+ }
+
struct MoveOnlyBase
{
MoveOnlyBase() = default;
@@ -126,4 +163,4 @@ namespace vcpkg::Util
std::unique_lock<std::mutex> m_lock;
T& m_ptr;
};
-} \ No newline at end of file
+}
diff --git a/toolsrc/include/BinaryParagraph.h b/toolsrc/include/vcpkg/binaryparagraph.h
index 61e03343a..7eb50a6d7 100644
--- a/toolsrc/include/BinaryParagraph.h
+++ b/toolsrc/include/vcpkg/binaryparagraph.h
@@ -1,7 +1,8 @@
#pragma once
-#include "PackageSpec.h"
-#include "SourceParagraph.h"
+#include <vcpkg/packagespec.h>
+#include <vcpkg/sourceparagraph.h>
+
#include <unordered_map>
namespace vcpkg
diff --git a/toolsrc/include/vcpkg_Build.h b/toolsrc/include/vcpkg/build.h
index fc6f28e24..774e25922 100644
--- a/toolsrc/include/vcpkg_Build.h
+++ b/toolsrc/include/vcpkg/build.h
@@ -1,19 +1,31 @@
#pragma once
-#include "CStringView.h"
-#include "PackageSpec.h"
-#include "StatusParagraphs.h"
-#include "VcpkgPaths.h"
-#include "vcpkg_Files.h"
-#include "vcpkg_optional.h"
+#include <vcpkg/packagespec.h>
+#include <vcpkg/statusparagraphs.h>
+#include <vcpkg/triplet.h>
+#include <vcpkg/vcpkgcmdarguments.h>
+#include <vcpkg/vcpkgpaths.h>
+
+#include <vcpkg/base/cstringview.h>
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/optional.h>
#include <array>
#include <map>
-#include <unordered_map>
#include <vector>
namespace vcpkg::Build
{
+ namespace Command
+ {
+ void perform_and_exit(const FullPackageSpec& full_spec,
+ const fs::path& port_dir,
+ const std::unordered_set<std::string>& options,
+ const VcpkgPaths& paths);
+
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
+ }
+
enum class UseHeadVersion
{
NO = 0,
@@ -56,7 +68,7 @@ namespace vcpkg::Build
CASCADED_DUE_TO_MISSING_DEPENDENCIES
};
- static constexpr std::array<BuildResult, 5> BuildResult_values = {
+ static constexpr std::array<BuildResult, 5> BUILD_RESULT_VALUES = {
BuildResult::SUCCEEDED,
BuildResult::BUILD_FAILED,
BuildResult::POST_BUILD_CHECKS_FAILED,
@@ -80,10 +92,11 @@ namespace vcpkg::Build
std::string target_architecture;
std::string cmake_system_name;
std::string cmake_system_version;
- std::string platform_toolset;
+ Optional<std::string> platform_toolset;
+ Optional<fs::path> visual_studio_path;
};
- std::wstring make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset);
+ std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset);
struct ExtendedBuildResult
{
@@ -143,7 +156,7 @@ namespace vcpkg::Build
COUNT,
};
- constexpr std::array<BuildPolicy, size_t(BuildPolicy::COUNT)> g_all_policies = {
+ constexpr std::array<BuildPolicy, size_t(BuildPolicy::COUNT)> G_ALL_POLICIES = {
BuildPolicy::EMPTY_PACKAGE,
BuildPolicy::DLLS_WITHOUT_LIBS,
BuildPolicy::ONLY_RELEASE_CRT,
@@ -159,7 +172,7 @@ namespace vcpkg::Build
BuildPolicies() = default;
BuildPolicies(std::map<BuildPolicy, bool>&& map) : m_policies(std::move(map)) {}
- inline bool is_enabled(BuildPolicy policy) const
+ bool is_enabled(BuildPolicy policy) const
{
const auto it = m_policies.find(policy);
if (it != m_policies.cend()) return it->second;
diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h
new file mode 100644
index 000000000..e00812c98
--- /dev/null
+++ b/toolsrc/include/vcpkg/commands.h
@@ -0,0 +1,135 @@
+#pragma once
+
+#include <vcpkg/build.h>
+#include <vcpkg/dependencies.h>
+#include <vcpkg/statusparagraphs.h>
+#include <vcpkg/vcpkgcmdarguments.h>
+#include <vcpkg/vcpkgpaths.h>
+
+#include <array>
+
+namespace vcpkg::Commands
+{
+ using CommandTypeA = void (*)(const VcpkgCmdArguments& args,
+ const VcpkgPaths& paths,
+ const Triplet& default_triplet);
+ using CommandTypeB = void (*)(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
+ using CommandTypeC = void (*)(const VcpkgCmdArguments& args);
+
+ namespace BuildExternal
+ {
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
+ }
+
+ namespace CI
+ {
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
+ }
+
+ namespace Env
+ {
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
+ }
+
+ namespace Create
+ {
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
+ }
+
+ namespace Edit
+ {
+ extern const CommandStructure COMMAND_STRUCTURE;
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
+ }
+
+ namespace DependInfo
+ {
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
+ }
+
+ namespace Search
+ {
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
+ }
+
+ namespace List
+ {
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
+ }
+
+ namespace Owns
+ {
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
+ }
+
+ namespace Cache
+ {
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
+ }
+
+ namespace Import
+ {
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
+ }
+
+ namespace Integrate
+ {
+ extern const char* const INTEGRATE_COMMAND_HELPSTRING;
+
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
+ }
+
+ namespace PortsDiff
+ {
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
+ }
+
+ namespace Autocomplete
+ {
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
+ }
+
+ namespace Version
+ {
+ const std::string& version();
+ void warn_if_vcpkg_version_mismatch(const VcpkgPaths& paths);
+ void perform_and_exit(const VcpkgCmdArguments& args);
+ }
+
+ namespace Contact
+ {
+ const std::string& email();
+ void perform_and_exit(const VcpkgCmdArguments& args);
+ }
+
+ namespace Hash
+ {
+ void perform_and_exit(const VcpkgCmdArguments& args);
+ }
+
+ template<class T>
+ struct PackageNameAndFunction
+ {
+ std::string name;
+ T function;
+ };
+
+ Span<const PackageNameAndFunction<CommandTypeA>> get_available_commands_type_a();
+ Span<const PackageNameAndFunction<CommandTypeB>> get_available_commands_type_b();
+ Span<const PackageNameAndFunction<CommandTypeC>> get_available_commands_type_c();
+
+ template<typename T>
+ T find(const std::string& command_name, const std::vector<PackageNameAndFunction<T>> available_commands)
+ {
+ for (const PackageNameAndFunction<T>& cmd : available_commands)
+ {
+ if (cmd.name == command_name)
+ {
+ return cmd.function;
+ }
+ }
+
+ // not found
+ return nullptr;
+ }
+}
diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg/dependencies.h
index 235abb839..585338ae2 100644
--- a/toolsrc/include/vcpkg_Dependencies.h
+++ b/toolsrc/include/vcpkg/dependencies.h
@@ -1,10 +1,12 @@
#pragma once
-#include "PackageSpec.h"
-#include "StatusParagraphs.h"
-#include "VcpkgPaths.h"
-#include "vcpkg_Graphs.h"
-#include "vcpkg_Util.h"
-#include "vcpkg_optional.h"
+
+#include <vcpkg/base/graphs.h>
+#include <vcpkg/base/optional.h>
+#include <vcpkg/base/util.h>
+#include <vcpkg/packagespec.h>
+#include <vcpkg/statusparagraphs.h>
+#include <vcpkg/vcpkgpaths.h>
+
#include <vector>
namespace vcpkg::Dependencies
@@ -89,6 +91,8 @@ namespace vcpkg::Dependencies
Optional<InstallPlanAction> install_plan;
Optional<RemovePlanAction> remove_plan;
+
+ const PackageSpec& spec() const;
};
enum class ExportPlanType
@@ -111,7 +115,10 @@ namespace vcpkg::Dependencies
RequestType request_type;
};
- __interface PortFileProvider { virtual const SourceControlFile& get_control_file(const std::string& spec) const; };
+ struct PortFileProvider
+ {
+ virtual const SourceControlFile& get_control_file(const std::string& spec) const = 0;
+ };
struct MapPortFile : Util::ResourceBase, PortFileProvider
{
diff --git a/toolsrc/include/vcpkg/export.h b/toolsrc/include/vcpkg/export.h
new file mode 100644
index 000000000..f3285e187
--- /dev/null
+++ b/toolsrc/include/vcpkg/export.h
@@ -0,0 +1,10 @@
+#pragma once
+
+#include <vcpkg/vcpkgpaths.h>
+
+namespace vcpkg::Export
+{
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
+
+ void export_integration_files(const fs::path& raw_exported_dir_path, const VcpkgPaths& paths);
+}
diff --git a/toolsrc/include/vcpkg/export.ifw.h b/toolsrc/include/vcpkg/export.ifw.h
new file mode 100644
index 000000000..d28a4436d
--- /dev/null
+++ b/toolsrc/include/vcpkg/export.ifw.h
@@ -0,0 +1,26 @@
+#pragma once
+
+#include <vcpkg/dependencies.h>
+#include <vcpkg/vcpkgpaths.h>
+
+#include <vcpkg/base/files.h>
+
+#include <string>
+#include <vector>
+
+namespace vcpkg::Export::IFW
+{
+ struct Options
+ {
+ Optional<std::string> maybe_repository_url;
+ Optional<std::string> maybe_packages_dir_path;
+ Optional<std::string> maybe_repository_dir_path;
+ Optional<std::string> maybe_config_file_path;
+ Optional<std::string> maybe_installer_file_path;
+ };
+
+ void do_export(const std::vector<Dependencies::ExportPlanAction>& export_plan,
+ const std::string& export_id,
+ const Options& ifw_options,
+ const VcpkgPaths& paths);
+}
diff --git a/toolsrc/include/vcpkg_GlobalState.h b/toolsrc/include/vcpkg/globalstate.h
index 6522a25bf..7cea361cf 100644
--- a/toolsrc/include/vcpkg_GlobalState.h
+++ b/toolsrc/include/vcpkg/globalstate.h
@@ -1,15 +1,15 @@
#pragma once
-#include <atomic>
+#include <vcpkg/base/chrono.h>
+#include <vcpkg/base/util.h>
-#include "vcpkg_Chrono.h"
-#include "vcpkg_Util.h"
+#include <atomic>
namespace vcpkg
{
struct GlobalState
{
- static Util::LockGuarded<ElapsedTime> timer;
+ static Util::LockGuarded<Chrono::ElapsedTime> timer;
static std::atomic<bool> debugging;
static std::atomic<bool> feature_packages;
diff --git a/toolsrc/include/vcpkg/help.h b/toolsrc/include/vcpkg/help.h
new file mode 100644
index 000000000..39ad6912d
--- /dev/null
+++ b/toolsrc/include/vcpkg/help.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include <vcpkg/vcpkgcmdarguments.h>
+#include <vcpkg/vcpkgpaths.h>
+
+#include <string>
+
+namespace vcpkg::Help
+{
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
+
+ void help_topic_valid_triplet(const VcpkgPaths& paths);
+
+ void print_usage();
+
+ void print_example(const std::string& command_and_arguments);
+
+ std::string create_example_string(const std::string& command_and_arguments);
+}
diff --git a/toolsrc/include/vcpkg_Input.h b/toolsrc/include/vcpkg/input.h
index fa568207a..621139427 100644
--- a/toolsrc/include/vcpkg_Input.h
+++ b/toolsrc/include/vcpkg/input.h
@@ -1,5 +1,6 @@
#pragma once
-#include "PackageSpec.h"
+
+#include <vcpkg/packagespec.h>
namespace vcpkg::Input
{
diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h
new file mode 100644
index 000000000..db6055f4f
--- /dev/null
+++ b/toolsrc/include/vcpkg/install.h
@@ -0,0 +1,71 @@
+#pragma once
+
+#include <vcpkg/build.h>
+#include <vcpkg/dependencies.h>
+#include <vcpkg/vcpkgcmdarguments.h>
+#include <vcpkg/vcpkgpaths.h>
+
+#include <vector>
+
+namespace vcpkg::Install
+{
+ enum class KeepGoing
+ {
+ NO = 0,
+ YES
+ };
+
+ inline KeepGoing to_keep_going(const bool value) { return value ? KeepGoing::YES : KeepGoing::NO; }
+
+ enum class PrintSummary
+ {
+ NO = 0,
+ YES
+ };
+
+ inline PrintSummary to_print_summary(const bool value) { return value ? PrintSummary::YES : PrintSummary::NO; }
+
+ struct InstallDir
+ {
+ static InstallDir from_destination_root(const fs::path& destination_root,
+ const std::string& destination_subdirectory,
+ const fs::path& listfile);
+
+ private:
+ fs::path m_destination;
+ std::string m_destination_subdirectory;
+ fs::path m_listfile;
+
+ public:
+ const fs::path& destination() const;
+ const std::string& destination_subdirectory() const;
+ const fs::path& listfile() const;
+ };
+
+ Build::BuildResult perform_install_plan_action(const VcpkgPaths& paths,
+ const Dependencies::InstallPlanAction& action,
+ const Build::BuildPackageOptions& install_plan_options,
+ StatusParagraphs& status_db);
+
+ enum class InstallResult
+ {
+ FILE_CONFLICTS,
+ SUCCESS,
+ };
+
+ void install_files_and_write_listfile(Files::Filesystem& fs, const fs::path& source_dir, const InstallDir& dirs);
+ InstallResult install_package(const VcpkgPaths& paths,
+ const BinaryControlFile& binary_paragraph,
+ StatusParagraphs* status_db);
+
+ void perform_and_exit_ex(const std::vector<Dependencies::AnyAction>& action_plan,
+ const Build::BuildPackageOptions& install_plan_options,
+ const KeepGoing keep_going,
+ const PrintSummary print_summary,
+ const VcpkgPaths& paths,
+ StatusParagraphs& status_db);
+
+ extern const CommandStructure COMMAND_STRUCTURE;
+
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
+}
diff --git a/toolsrc/include/metrics.h b/toolsrc/include/vcpkg/metrics.h
index 8eae426de..f73c636cf 100644
--- a/toolsrc/include/metrics.h
+++ b/toolsrc/include/vcpkg/metrics.h
@@ -1,8 +1,8 @@
#pragma once
-#include <string>
+#include <vcpkg/base/util.h>
-#include "vcpkg_Util.h"
+#include <string>
namespace vcpkg::Metrics
{
@@ -15,7 +15,6 @@ namespace vcpkg::Metrics
void track_metric(const std::string& name, double value);
void track_property(const std::string& name, const std::string& value);
- void track_property(const std::string& name, const std::wstring& value);
void upload(const std::string& payload);
void flush();
@@ -23,6 +22,6 @@ namespace vcpkg::Metrics
extern Util::LockGuarded<Metrics> g_metrics;
- std::wstring get_SQM_user();
+ std::string get_SQM_user();
bool get_compiled_metrics_enabled();
}
diff --git a/toolsrc/include/PackageSpec.h b/toolsrc/include/vcpkg/packagespec.h
index c5ce767f9..60c99782e 100644
--- a/toolsrc/include/PackageSpec.h
+++ b/toolsrc/include/vcpkg/packagespec.h
@@ -1,8 +1,8 @@
#pragma once
-#include "PackageSpecParseResult.h"
-#include "Triplet.h"
-#include "vcpkg_expected.h"
+#include <vcpkg/base/expected.h>
+#include <vcpkg/packagespecparseresult.h>
+#include <vcpkg/triplet.h>
namespace vcpkg
{
@@ -76,20 +76,23 @@ namespace vcpkg
bool operator!=(const PackageSpec& left, const PackageSpec& right);
}
-template<>
-struct std::hash<vcpkg::PackageSpec>
+namespace std
{
- size_t operator()(const vcpkg::PackageSpec& value) const
+ template<>
+ struct hash<vcpkg::PackageSpec>
{
- size_t hash = 17;
- hash = hash * 31 + std::hash<std::string>()(value.name());
- hash = hash * 31 + std::hash<vcpkg::Triplet>()(value.triplet());
- return hash;
- }
-};
-
-template<>
-struct std::equal_to<vcpkg::PackageSpec>
-{
- bool operator()(const vcpkg::PackageSpec& left, const vcpkg::PackageSpec& right) const { return left == right; }
-};
+ size_t operator()(const vcpkg::PackageSpec& value) const
+ {
+ size_t hash = 17;
+ hash = hash * 31 + std::hash<std::string>()(value.name());
+ hash = hash * 31 + std::hash<vcpkg::Triplet>()(value.triplet());
+ return hash;
+ }
+ };
+
+ template<>
+ struct equal_to<vcpkg::PackageSpec>
+ {
+ bool operator()(const vcpkg::PackageSpec& left, const vcpkg::PackageSpec& right) const { return left == right; }
+ };
+}
diff --git a/toolsrc/include/PackageSpecParseResult.h b/toolsrc/include/vcpkg/packagespecparseresult.h
index 1462b8073..dd91c9a67 100644
--- a/toolsrc/include/PackageSpecParseResult.h
+++ b/toolsrc/include/vcpkg/packagespecparseresult.h
@@ -1,6 +1,7 @@
#pragma once
-#include "vcpkg_expected.h"
+#include <vcpkg/base/cstringview.h>
+#include <vcpkg/base/expected.h>
namespace vcpkg
{
@@ -19,7 +20,7 @@ namespace vcpkg
ErrorHolder() : m_err(PackageSpecParseResult::SUCCESS) {}
ErrorHolder(PackageSpecParseResult err) : m_err(err) {}
- constexpr bool has_error() const { return m_err != PackageSpecParseResult::SUCCESS; }
+ bool has_error() const { return m_err != PackageSpecParseResult::SUCCESS; }
const PackageSpecParseResult& error() const { return m_err; }
PackageSpecParseResult& error() { return m_err; }
diff --git a/toolsrc/include/ParagraphParseResult.h b/toolsrc/include/vcpkg/paragraphparseresult.h
index eaa7e6327..558715bbc 100644
--- a/toolsrc/include/ParagraphParseResult.h
+++ b/toolsrc/include/vcpkg/paragraphparseresult.h
@@ -1,4 +1,5 @@
#pragma once
+
#include <system_error>
namespace vcpkg
@@ -25,8 +26,11 @@ namespace vcpkg
ParagraphParseResult to_paragraph_parse_result(std::error_code ec);
}
-// Enable implicit conversion to std::error_code
-template<>
-struct std::is_error_code_enum<vcpkg::ParagraphParseResult> : ::std::true_type
+namespace std
{
-};
+ // Enable implicit conversion to std::error_code
+ template<>
+ struct is_error_code_enum<vcpkg::ParagraphParseResult> : ::std::true_type
+ {
+ };
+} \ No newline at end of file
diff --git a/toolsrc/include/Paragraphs.h b/toolsrc/include/vcpkg/paragraphs.h
index aae46f7da..c8dbea646 100644
--- a/toolsrc/include/Paragraphs.h
+++ b/toolsrc/include/vcpkg/paragraphs.h
@@ -1,13 +1,13 @@
#pragma once
-#include <map>
+#include <vcpkg/binaryparagraph.h>
+#include <vcpkg/parse.h>
+#include <vcpkg/vcpkgpaths.h>
+#include <vcpkg/versiont.h>
+
+#include <vcpkg/base/expected.h>
-#include "BinaryParagraph.h"
-#include "VcpkgPaths.h"
-#include "VersionT.h"
-#include "filesystem_fs.h"
-#include "vcpkg_Parse.h"
-#include "vcpkg_expected.h"
+#include <map>
namespace vcpkg::Paragraphs
{
diff --git a/toolsrc/include/vcpkg_Parse.h b/toolsrc/include/vcpkg/parse.h
index e663448b9..4b33e302e 100644
--- a/toolsrc/include/vcpkg_Parse.h
+++ b/toolsrc/include/vcpkg/parse.h
@@ -1,11 +1,11 @@
#pragma once
+#include <vcpkg/base/expected.h>
+#include <vcpkg/base/optional.h>
+
#include <memory>
#include <unordered_map>
-#include "vcpkg_expected.h"
-#include "vcpkg_optional.h"
-
namespace vcpkg::Parse
{
struct ParseControlErrorInfo
@@ -26,7 +26,7 @@ namespace vcpkg::Parse
ParagraphParser(RawParagraph&& fields) : fields(std::move(fields)) {}
void required_field(const std::string& fieldname, std::string& out);
- std::string optional_field(const std::string& fieldname);
+ std::string optional_field(const std::string& fieldname) const;
std::unique_ptr<ParseControlErrorInfo> error_info(const std::string& name) const;
private:
diff --git a/toolsrc/include/PostBuildLint_BuildType.h b/toolsrc/include/vcpkg/postbuildlint.buildtype.h
index 38ad3084e..ff651fd7a 100644
--- a/toolsrc/include/PostBuildLint_BuildType.h
+++ b/toolsrc/include/vcpkg/postbuildlint.buildtype.h
@@ -1,6 +1,8 @@
#pragma once
-#include "CStringView.h"
-#include "vcpkg_Build.h"
+
+#include <vcpkg/base/cstringview.h>
+#include <vcpkg/build.h>
+
#include <array>
#include <regex>
diff --git a/toolsrc/include/PostBuildLint.h b/toolsrc/include/vcpkg/postbuildlint.h
index 69fafc9f7..5dcfeb8df 100644
--- a/toolsrc/include/PostBuildLint.h
+++ b/toolsrc/include/vcpkg/postbuildlint.h
@@ -1,7 +1,8 @@
#pragma once
-#include "PackageSpec.h"
-#include "VcpkgPaths.h"
-#include "vcpkg_Build.h"
+
+#include <vcpkg/build.h>
+#include <vcpkg/packagespec.h>
+#include <vcpkg/vcpkgpaths.h>
namespace vcpkg::PostBuildLint
{
diff --git a/toolsrc/include/vcpkg/remove.h b/toolsrc/include/vcpkg/remove.h
new file mode 100644
index 000000000..6d8a3ebe9
--- /dev/null
+++ b/toolsrc/include/vcpkg/remove.h
@@ -0,0 +1,26 @@
+#pragma once
+
+#include <vcpkg/dependencies.h>
+#include <vcpkg/vcpkgcmdarguments.h>
+#include <vcpkg/vcpkgpaths.h>
+
+namespace vcpkg::Remove
+{
+ enum class Purge
+ {
+ NO = 0,
+ YES
+ };
+
+ inline Purge to_purge(const bool value) { return value ? Purge::YES : Purge::NO; }
+
+ void perform_remove_plan_action(const VcpkgPaths& paths,
+ const Dependencies::RemovePlanAction& action,
+ const Purge purge,
+ StatusParagraphs& status_db);
+
+ extern const CommandStructure COMMAND_STRUCTURE;
+
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
+ void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db);
+}
diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/vcpkg/sourceparagraph.h
index 8563d83b0..dcbbc1c3b 100644
--- a/toolsrc/include/SourceParagraph.h
+++ b/toolsrc/include/vcpkg/sourceparagraph.h
@@ -1,13 +1,13 @@
#pragma once
-#include "PackageSpec.h"
-#include "Span.h"
-#include "vcpkg_Parse.h"
-#include "vcpkg_System.h"
-#include "vcpkg_expected.h"
+#include <vcpkg/packagespec.h>
+#include <vcpkg/parse.h>
+
+#include <vcpkg/base/expected.h>
+#include <vcpkg/base/span.h>
+#include <vcpkg/base/system.h>
#include <string>
-#include <unordered_map>
#include <vector>
namespace vcpkg
@@ -27,7 +27,7 @@ namespace vcpkg
// zlib[uwp] becomes Dependency{"zlib", "uwp"}
std::vector<Dependency> expand_qualified_dependencies(const std::vector<std::string>& depends);
- const std::string to_string(const Dependency& dep);
+ std::string to_string(const Dependency& dep);
struct FeatureParagraph
{
@@ -58,7 +58,7 @@ namespace vcpkg
std::vector<std::unique_ptr<FeatureParagraph>> feature_paragraphs;
};
- void print_error_message(span<const std::unique_ptr<Parse::ParseControlErrorInfo>> error_info_list);
+ void print_error_message(Span<const std::unique_ptr<Parse::ParseControlErrorInfo>> error_info_list);
inline void print_error_message(const std::unique_ptr<Parse::ParseControlErrorInfo>& error_info_list)
{
return print_error_message({&error_info_list, 1});
diff --git a/toolsrc/include/StatusParagraph.h b/toolsrc/include/vcpkg/statusparagraph.h
index b56533d65..ca84b1bb7 100644
--- a/toolsrc/include/StatusParagraph.h
+++ b/toolsrc/include/vcpkg/statusparagraph.h
@@ -1,6 +1,7 @@
#pragma once
-#include "BinaryParagraph.h"
+#include <vcpkg/binaryparagraph.h>
+
#include <unordered_map>
namespace vcpkg
diff --git a/toolsrc/include/StatusParagraphs.h b/toolsrc/include/vcpkg/statusparagraphs.h
index 1a9ee6a03..c2f3b7b8e 100644
--- a/toolsrc/include/StatusParagraphs.h
+++ b/toolsrc/include/vcpkg/statusparagraphs.h
@@ -1,5 +1,6 @@
#pragma once
-#include "StatusParagraph.h"
+#include <vcpkg/statusparagraph.h>
+
#include <iterator>
#include <memory>
diff --git a/toolsrc/include/triplet.h b/toolsrc/include/vcpkg/triplet.h
index be3bcf5b3..50d731593 100644
--- a/toolsrc/include/triplet.h
+++ b/toolsrc/include/vcpkg/triplet.h
@@ -9,7 +9,7 @@ namespace vcpkg
struct Triplet
{
public:
- constexpr Triplet() : m_instance(&default_instance) {}
+ constexpr Triplet() : m_instance(&DEFAULT_INSTANCE) {}
static Triplet from_canonical_name(const std::string& triplet_as_string);
@@ -26,7 +26,7 @@ namespace vcpkg
bool operator==(const Triplet& other) const;
private:
- static const TripletInstance default_instance;
+ static const TripletInstance DEFAULT_INSTANCE;
constexpr Triplet(const TripletInstance* ptr) : m_instance(ptr) {}
@@ -36,8 +36,11 @@ namespace vcpkg
bool operator!=(const Triplet& left, const Triplet& right);
}
-template<>
-struct std::hash<vcpkg::Triplet>
+namespace std
{
- size_t operator()(const vcpkg::Triplet& t) const { return t.hash_code(); }
-};
+ template<>
+ struct hash<vcpkg::Triplet>
+ {
+ size_t operator()(const vcpkg::Triplet& t) const { return t.hash_code(); }
+ };
+} \ No newline at end of file
diff --git a/toolsrc/include/vcpkg/update.h b/toolsrc/include/vcpkg/update.h
new file mode 100644
index 000000000..e7303d1b0
--- /dev/null
+++ b/toolsrc/include/vcpkg/update.h
@@ -0,0 +1,21 @@
+#pragma once
+
+#include <vcpkg/packagespec.h>
+#include <vcpkg/statusparagraphs.h>
+#include <vcpkg/vcpkgcmdarguments.h>
+#include <vcpkg/vcpkgpaths.h>
+#include <vcpkg/versiont.h>
+
+namespace vcpkg::Update
+{
+ struct OutdatedPackage
+ {
+ static bool compare_by_name(const OutdatedPackage& left, const OutdatedPackage& right);
+
+ PackageSpec spec;
+ VersionDiff version_diff;
+ };
+
+ std::vector<OutdatedPackage> find_outdated_packages(const VcpkgPaths& paths, const StatusParagraphs& status_db);
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
+} \ No newline at end of file
diff --git a/toolsrc/include/VcpkgCmdArguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h
index 0de5747b1..d9895f4b8 100644
--- a/toolsrc/include/VcpkgCmdArguments.h
+++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h
@@ -1,6 +1,9 @@
#pragma once
-#include "vcpkg_optional.h"
+#include <vcpkg/base/cstringview.h>
+#include <vcpkg/base/optional.h>
+#include <vcpkg/base/span.h>
+
#include <memory>
#include <unordered_map>
#include <unordered_set>
@@ -16,7 +19,11 @@ namespace vcpkg
struct VcpkgCmdArguments
{
+#if defined(_WIN32)
static VcpkgCmdArguments create_from_command_line(const int argc, const wchar_t* const* const argv);
+#else
+ static VcpkgCmdArguments create_from_command_line(const int argc, const char* const* const argv);
+#endif
static VcpkgCmdArguments create_from_arg_sequence(const std::string* arg_begin, const std::string* arg_end);
std::unique_ptr<std::string> vcpkg_root_dir;
@@ -46,4 +53,19 @@ namespace vcpkg
private:
std::unordered_map<std::string, Optional<std::string>> optional_command_arguments;
};
+
+ struct VcpkgPaths;
+
+ struct CommandStructure
+ {
+ CStringView example_text;
+
+ size_t minimum_arity;
+ size_t maximum_arity;
+
+ Span<const std::string> switches;
+ Span<const std::string> settings;
+
+ std::vector<std::string> (*valid_arguments)(const VcpkgPaths& paths);
+ };
}
diff --git a/toolsrc/include/vcpkglib.h b/toolsrc/include/vcpkg/vcpkglib.h
index 0bb75f9b5..9a7fdb861 100644
--- a/toolsrc/include/vcpkglib.h
+++ b/toolsrc/include/vcpkg/vcpkglib.h
@@ -1,8 +1,8 @@
#pragma once
-#include "SortedVector.h"
-#include "StatusParagraphs.h"
-#include "VcpkgPaths.h"
+#include <vcpkg/base/sortedvector.h>
+#include <vcpkg/statusparagraphs.h>
+#include <vcpkg/vcpkgpaths.h>
namespace vcpkg
{
@@ -22,17 +22,16 @@ namespace vcpkg
struct CMakeVariable
{
- CMakeVariable(const CWStringView varname, const wchar_t* varvalue);
- CMakeVariable(const CWStringView varname, const std::string& varvalue);
- CMakeVariable(const CWStringView varname, const std::wstring& varvalue);
- CMakeVariable(const CWStringView varname, const fs::path& path);
+ CMakeVariable(const CStringView varname, const char* varvalue);
+ CMakeVariable(const CStringView varname, const std::string& varvalue);
+ CMakeVariable(const CStringView varname, const fs::path& path);
- std::wstring s;
+ std::string s;
};
- std::wstring make_cmake_cmd(const fs::path& cmake_exe,
- const fs::path& cmake_script,
- const std::vector<CMakeVariable>& pass_variables);
+ std::string make_cmake_cmd(const fs::path& cmake_exe,
+ const fs::path& cmake_script,
+ const std::vector<CMakeVariable>& pass_variables);
std::string shorten_text(const std::string& desc, size_t length);
} // namespace vcpkg
diff --git a/toolsrc/include/VcpkgPaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h
index d55c95fe1..781dabd1a 100644
--- a/toolsrc/include/VcpkgPaths.h
+++ b/toolsrc/include/vcpkg/vcpkgpaths.h
@@ -1,25 +1,28 @@
#pragma once
-#include "BinaryParagraph.h"
-#include "Lazy.h"
-#include "PackageSpec.h"
-#include "filesystem_fs.h"
-#include "vcpkg_Files.h"
-#include "vcpkg_expected.h"
+
+#include <vcpkg/binaryparagraph.h>
+#include <vcpkg/packagespec.h>
+
+#include <vcpkg/base/expected.h>
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/lazy.h>
namespace vcpkg
{
struct ToolsetArchOption
{
- CWStringView name;
+ CStringView name;
System::CPUArchitecture host_arch;
System::CPUArchitecture target_arch;
};
struct Toolset
{
+ fs::path visual_studio_root_path;
fs::path dumpbin;
fs::path vcvarsall;
- CWStringView version;
+ std::vector<std::string> vcvarsall_options;
+ CStringView version;
std::vector<ToolsetArchOption> supported_architectures;
};
@@ -33,6 +36,7 @@ namespace vcpkg
fs::path build_info_file_path(const PackageSpec& spec) const;
fs::path listfile_path(const BinaryParagraph& pgh) const;
+ const std::vector<std::string>& get_available_triplets() const;
bool is_valid_triplet(const Triplet& t) const;
fs::path root;
@@ -57,19 +61,27 @@ namespace vcpkg
const fs::path& get_cmake_exe() const;
const fs::path& get_git_exe() const;
const fs::path& get_nuget_exe() const;
+ const fs::path& get_ifw_installerbase_exe() const;
+ const fs::path& get_ifw_binarycreator_exe() const;
+ const fs::path& get_ifw_repogen_exe() const;
/// <summary>Retrieve a toolset matching a VS version</summary>
/// <remarks>
/// Valid version strings are "v140", "v141", and "". Empty string gets the latest.
/// </remarks>
- const Toolset& get_toolset(const std::string& toolset_version) const;
+ const Toolset& get_toolset(const Optional<std::string>& toolset_version,
+ const Optional<fs::path>& visual_studio_path) const;
Files::Filesystem& get_filesystem() const;
private:
+ Lazy<std::vector<std::string>> available_triplets;
Lazy<fs::path> cmake_exe;
Lazy<fs::path> git_exe;
Lazy<fs::path> nuget_exe;
+ Lazy<fs::path> ifw_installerbase_exe;
+ Lazy<fs::path> ifw_binarycreator_exe;
+ Lazy<fs::path> ifw_repogen_exe;
Lazy<std::vector<Toolset>> toolsets;
};
}
diff --git a/toolsrc/include/VersionT.h b/toolsrc/include/vcpkg/versiont.h
index 67efd8da3..67efd8da3 100644
--- a/toolsrc/include/VersionT.h
+++ b/toolsrc/include/vcpkg/versiont.h
diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h
deleted file mode 100644
index 756a12f01..000000000
--- a/toolsrc/include/vcpkg_Commands.h
+++ /dev/null
@@ -1,215 +0,0 @@
-#pragma once
-
-#include "StatusParagraphs.h"
-#include "VcpkgCmdArguments.h"
-#include "VcpkgPaths.h"
-#include "VersionT.h"
-#include "vcpkg_Build.h"
-#include "vcpkg_Dependencies.h"
-#include <array>
-
-namespace vcpkg::Commands
-{
- using CommandTypeA = void (*)(const VcpkgCmdArguments& args,
- const VcpkgPaths& paths,
- const Triplet& default_triplet);
- using CommandTypeB = void (*)(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
- using CommandTypeC = void (*)(const VcpkgCmdArguments& args);
-
- namespace BuildCommand
- {
- void perform_and_exit(const FullPackageSpec& full_spec,
- const fs::path& port_dir,
- const std::unordered_set<std::string>& options,
- const VcpkgPaths& paths);
-
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
- }
-
- namespace BuildExternal
- {
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
- }
-
- namespace Install
- {
- struct InstallDir
- {
- static InstallDir from_destination_root(const fs::path& destination_root,
- const std::string& destination_subdirectory,
- const fs::path& listfile);
-
- private:
- fs::path m_destination;
- std::string m_destination_subdirectory;
- fs::path m_listfile;
-
- public:
- const fs::path& destination() const;
- const std::string& destination_subdirectory() const;
- const fs::path& listfile() const;
- };
-
- Build::BuildResult perform_install_plan_action(const VcpkgPaths& paths,
- const Dependencies::InstallPlanAction& action,
- const Build::BuildPackageOptions& install_plan_options,
- StatusParagraphs& status_db);
-
- enum class InstallResult
- {
- FILE_CONFLICTS,
- SUCCESS,
- };
-
- void install_files_and_write_listfile(Files::Filesystem& fs,
- const fs::path& source_dir,
- const InstallDir& dirs);
- InstallResult install_package(const VcpkgPaths& paths,
- const BinaryControlFile& binary_paragraph,
- StatusParagraphs* status_db);
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
- }
-
- namespace Export
- {
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
- }
-
- namespace CI
- {
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
- }
-
- namespace Remove
- {
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
- void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db);
- }
-
- namespace Update
- {
- struct OutdatedPackage
- {
- static bool compare_by_name(const OutdatedPackage& left, const OutdatedPackage& right);
-
- PackageSpec spec;
- VersionDiff version_diff;
- };
-
- std::vector<OutdatedPackage> find_outdated_packages(const VcpkgPaths& paths, const StatusParagraphs& status_db);
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
- }
-
- namespace Env
- {
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
- }
-
- namespace Create
- {
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
- }
-
- namespace Edit
- {
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
- }
-
- namespace DependInfo
- {
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
- }
-
- namespace Search
- {
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
- }
-
- namespace List
- {
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
- }
-
- namespace Owns
- {
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
- }
-
- namespace Cache
- {
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
- }
-
- namespace Import
- {
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
- }
-
- namespace Integrate
- {
- extern const char* const INTEGRATE_COMMAND_HELPSTRING;
-
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
- }
-
- namespace PortsDiff
- {
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
- }
-
- namespace Help
- {
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
-
- void help_topic_valid_triplet(const VcpkgPaths& paths);
-
- void print_usage();
-
- void print_example(const std::string& command_and_arguments);
-
- std::string create_example_string(const std::string& command_and_arguments);
- }
-
- namespace Version
- {
- const std::string& version();
- void perform_and_exit(const VcpkgCmdArguments& args);
- }
-
- namespace Contact
- {
- const std::string& email();
- void perform_and_exit(const VcpkgCmdArguments& args);
- }
-
- namespace Hash
- {
- void perform_and_exit(const VcpkgCmdArguments& args);
- }
-
- template<class T>
- struct PackageNameAndFunction
- {
- std::string name;
- T function;
- };
-
- const std::vector<PackageNameAndFunction<CommandTypeA>>& get_available_commands_type_a();
- const std::vector<PackageNameAndFunction<CommandTypeB>>& get_available_commands_type_b();
- const std::vector<PackageNameAndFunction<CommandTypeC>>& get_available_commands_type_c();
-
- template<typename T>
- T find(const std::string& command_name, const std::vector<PackageNameAndFunction<T>> available_commands)
- {
- for (const PackageNameAndFunction<T>& cmd : available_commands)
- {
- if (cmd.name == command_name)
- {
- return cmd.function;
- }
- }
-
- // not found
- return nullptr;
- }
-}
diff --git a/toolsrc/include/vcpkg_Maps.h b/toolsrc/include/vcpkg_Maps.h
deleted file mode 100644
index aadd81c2b..000000000
--- a/toolsrc/include/vcpkg_Maps.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#pragma once
-
-#include <map>
-#include <unordered_map>
-#include <unordered_set>
-
-namespace vcpkg::Maps
-{
- template<typename K, typename V>
- std::vector<K> extract_keys(const std::unordered_map<K, V>& input_map)
- {
- std::vector<K> key_set;
- for (auto const& element : input_map)
- {
- key_set.push_back(element.first);
- }
- return key_set;
- }
-
- template<typename K, typename V>
- std::vector<K> extract_keys(const std::map<K, V>& input_map)
- {
- std::vector<K> key_set;
- for (auto const& element : input_map)
- {
- key_set.push_back(element.first);
- }
- return key_set;
- }
-}
diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp
deleted file mode 100644
index 865f2ce44..000000000
--- a/toolsrc/src/VcpkgPaths.cpp
+++ /dev/null
@@ -1,417 +0,0 @@
-#include "pch.h"
-
-#include "PackageSpec.h"
-#include "VcpkgPaths.h"
-#include "metrics.h"
-#include "vcpkg_Files.h"
-#include "vcpkg_System.h"
-#include "vcpkg_Util.h"
-#include "vcpkg_expected.h"
-
-namespace vcpkg
-{
- static std::string WORKAROUND_ISSUE_1712(const std::string& line)
- {
- auto colon_pos = line.find(':');
- if (colon_pos != std::string::npos && colon_pos > 1)
- {
- return line.substr(colon_pos - 1);
- }
- return line;
- }
-
- static bool exists_and_has_equal_or_greater_version(const std::wstring& version_cmd,
- const std::array<int, 3>& expected_version)
- {
- static const std::regex re(R"###((\d+)\.(\d+)\.(\d+))###");
-
- auto rc = System::cmd_execute_and_capture_output(Strings::wformat(LR"(%s)", version_cmd));
- if (rc.exit_code != 0)
- {
- return false;
- }
-
- std::match_results<std::string::const_iterator> match;
- auto found = std::regex_search(rc.output, match, re);
- if (!found)
- {
- return false;
- }
-
- int d1 = atoi(match[1].str().c_str());
- int d2 = atoi(match[2].str().c_str());
- int d3 = atoi(match[3].str().c_str());
- if (d1 > expected_version[0] || (d1 == expected_version[0] && d2 > expected_version[1]) ||
- (d1 == expected_version[0] && d2 == expected_version[1] && d3 >= expected_version[2]))
- {
- // satisfactory version found
- return true;
- }
-
- return false;
- }
-
- static Optional<fs::path> find_if_has_equal_or_greater_version(const std::vector<fs::path>& candidate_paths,
- const std::wstring& version_check_arguments,
- const std::array<int, 3>& expected_version)
- {
- auto it = Util::find_if(candidate_paths, [&](const fs::path& p) {
- const std::wstring cmd = Strings::wformat(LR"("%s" %s)", p.native(), version_check_arguments);
- return exists_and_has_equal_or_greater_version(cmd, expected_version);
- });
-
- if (it != candidate_paths.cend())
- {
- return std::move(*it);
- }
-
- return nullopt;
- }
-
- static fs::path fetch_dependency(const fs::path& scripts_folder,
- const std::wstring& tool_name,
- const fs::path& expected_downloaded_path,
- const std::array<int, 3>& version)
- {
- const fs::path script = scripts_folder / "fetchDependency.ps1";
- auto install_cmd = System::create_powershell_script_cmd(script, Strings::wformat(L"-Dependency %s", tool_name));
- System::ExitCodeAndOutput rc = System::cmd_execute_and_capture_output(install_cmd);
- if (rc.exit_code)
- {
- const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]);
-
- System::println(System::Color::error,
- "Launching powershell failed or was denied when trying to fetch %s version %s.\n"
- "(No sufficient installed version was found)",
- Strings::to_utf8(tool_name),
- version_as_string);
- {
- auto locked_metrics = Metrics::g_metrics.lock();
- locked_metrics->track_property("error", "powershell install failed");
- locked_metrics->track_property("dependency", tool_name);
- }
- Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code);
- }
-
- const fs::path actual_downloaded_path = WORKAROUND_ISSUE_1712(Strings::trimmed(rc.output));
- std::error_code ec;
- auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec);
- Checks::check_exit(VCPKG_LINE_INFO,
- eq && !ec,
- "Expected dependency downloaded path to be %s, but was %s",
- expected_downloaded_path.u8string(),
- actual_downloaded_path.u8string());
- return actual_downloaded_path;
- }
-
- static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder)
- {
- static constexpr std::array<int, 3> expected_version = {3, 9, 1};
- static const std::wstring version_check_arguments = L"--version";
-
- const fs::path downloaded_copy = downloads_folder / "cmake-3.9.1-win32-x86" / "bin" / "cmake.exe";
- const std::vector<fs::path> from_path = Files::find_from_PATH(L"cmake");
-
- std::vector<fs::path> candidate_paths;
- candidate_paths.push_back(downloaded_copy);
- candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend());
- candidate_paths.push_back(System::get_ProgramFiles_platform_bitness() / "CMake" / "bin" / "cmake.exe");
- candidate_paths.push_back(System::get_ProgramFiles_32_bit() / "CMake" / "bin");
-
- const Optional<fs::path> path =
- find_if_has_equal_or_greater_version(candidate_paths, version_check_arguments, expected_version);
- if (auto p = path.get())
- {
- return *p;
- }
-
- return fetch_dependency(scripts_folder, L"cmake", downloaded_copy, expected_version);
- }
-
- fs::path get_nuget_path(const fs::path& downloads_folder, const fs::path& scripts_folder)
- {
- static constexpr std::array<int, 3> expected_version = {4, 1, 0};
- static const std::wstring version_check_arguments = Strings::WEMPTY;
-
- const fs::path downloaded_copy = downloads_folder / "nuget-4.1.0" / "nuget.exe";
- const std::vector<fs::path> from_path = Files::find_from_PATH(L"nuget");
-
- std::vector<fs::path> candidate_paths;
- candidate_paths.push_back(downloaded_copy);
- candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend());
-
- auto path = find_if_has_equal_or_greater_version(candidate_paths, version_check_arguments, expected_version);
- if (auto p = path.get())
- {
- return *p;
- }
-
- return fetch_dependency(scripts_folder, L"nuget", downloaded_copy, expected_version);
- }
-
- fs::path get_git_path(const fs::path& downloads_folder, const fs::path& scripts_folder)
- {
- static constexpr std::array<int, 3> expected_version = {2, 14, 1};
- static const std::wstring version_check_arguments = L"--version";
-
- const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.1-32-bit" / "cmd" / "git.exe";
- const std::vector<fs::path> from_path = Files::find_from_PATH(L"git");
-
- std::vector<fs::path> candidate_paths;
- candidate_paths.push_back(downloaded_copy);
- candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend());
- candidate_paths.push_back(System::get_ProgramFiles_platform_bitness() / "git" / "cmd" / "git.exe");
- candidate_paths.push_back(System::get_ProgramFiles_32_bit() / "git" / "cmd" / "git.exe");
-
- const Optional<fs::path> path =
- find_if_has_equal_or_greater_version(candidate_paths, version_check_arguments, expected_version);
- if (auto p = path.get())
- {
- return *p;
- }
-
- return fetch_dependency(scripts_folder, L"git", downloaded_copy, expected_version);
- }
-
- Expected<VcpkgPaths> VcpkgPaths::create(const fs::path& vcpkg_root_dir)
- {
- std::error_code ec;
- const fs::path canonical_vcpkg_root_dir = fs::stdfs::canonical(vcpkg_root_dir, ec);
- if (ec)
- {
- return ec;
- }
-
- VcpkgPaths paths;
- paths.root = canonical_vcpkg_root_dir;
-
- if (paths.root.empty())
- {
- Metrics::g_metrics.lock()->track_property("error", "Invalid vcpkg root directory");
- Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid vcpkg root directory: %s", paths.root.string());
- }
-
- paths.packages = paths.root / "packages";
- paths.buildtrees = paths.root / "buildtrees";
- paths.downloads = paths.root / "downloads";
- paths.ports = paths.root / "ports";
- paths.installed = paths.root / "installed";
- paths.triplets = paths.root / "triplets";
- paths.scripts = paths.root / "scripts";
-
- paths.buildsystems = paths.scripts / "buildsystems";
- paths.buildsystems_msbuild_targets = paths.buildsystems / "msbuild" / "vcpkg.targets";
-
- paths.vcpkg_dir = paths.installed / "vcpkg";
- paths.vcpkg_dir_status_file = paths.vcpkg_dir / "status";
- paths.vcpkg_dir_info = paths.vcpkg_dir / "info";
- paths.vcpkg_dir_updates = paths.vcpkg_dir / "updates";
-
- paths.ports_cmake = paths.scripts / "ports.cmake";
-
- return paths;
- }
-
- fs::path VcpkgPaths::package_dir(const PackageSpec& spec) const { return this->packages / spec.dir(); }
-
- fs::path VcpkgPaths::port_dir(const PackageSpec& spec) const { return this->ports / spec.name(); }
- fs::path VcpkgPaths::port_dir(const std::string& name) const { return this->ports / name; }
-
- fs::path VcpkgPaths::build_info_file_path(const PackageSpec& spec) const
- {
- return this->package_dir(spec) / "BUILD_INFO";
- }
-
- fs::path VcpkgPaths::listfile_path(const BinaryParagraph& pgh) const
- {
- return this->vcpkg_dir_info / (pgh.fullstem() + ".list");
- }
-
- bool VcpkgPaths::is_valid_triplet(const Triplet& t) const
- {
- for (auto&& path : get_filesystem().get_files_non_recursive(this->triplets))
- {
- std::string triplet_file_name = path.stem().generic_u8string();
- if (t.canonical_name() == triplet_file_name) // TODO: fuzzy compare
- {
- // t.value = triplet_file_name; // NOTE: uncomment when implementing fuzzy compare
- return true;
- }
- }
- return false;
- }
-
- const fs::path& VcpkgPaths::get_cmake_exe() const
- {
- return this->cmake_exe.get_lazy([this]() { return get_cmake_path(this->downloads, this->scripts); });
- }
-
- const fs::path& VcpkgPaths::get_git_exe() const
- {
- return this->git_exe.get_lazy([this]() { return get_git_path(this->downloads, this->scripts); });
- }
-
- const fs::path& VcpkgPaths::get_nuget_exe() const
- {
- return this->nuget_exe.get_lazy([this]() { return get_nuget_path(this->downloads, this->scripts); });
- }
-
- static std::vector<std::string> get_VS2017_installation_instances(const VcpkgPaths& paths)
- {
- const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1";
- const std::wstring cmd = System::create_powershell_script_cmd(script);
- System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd);
- Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect VS 2017 instances");
- return Util::fmap(Strings::split(ec_data.output, "\n"), WORKAROUND_ISSUE_1712);
- }
-
- static Optional<fs::path> get_VS2015_installation_instance()
- {
- const Optional<std::wstring> vs2015_cmntools_optional = System::get_environment_variable(L"VS140COMNTOOLS");
- if (auto v = vs2015_cmntools_optional.get())
- {
- const fs::path vs2015_cmntools = fs::path(*v).parent_path(); // The call to parent_path() is needed because
- // the env variable has a trailing backslash
- return vs2015_cmntools.parent_path().parent_path();
- }
-
- return nullopt;
- }
-
- static std::vector<Toolset> find_toolset_instances(const VcpkgPaths& paths)
- {
- using CPU = System::CPUArchitecture;
-
- const auto& fs = paths.get_filesystem();
-
- const std::vector<std::string> vs2017_installation_instances = get_VS2017_installation_instances(paths);
- // Note: this will contain a mix of vcvarsall.bat locations and dumpbin.exe locations.
- std::vector<fs::path> paths_examined;
-
- std::vector<Toolset> found_toolsets;
-
- // VS2015
- const Optional<fs::path> vs_2015_installation_instance = get_VS2015_installation_instance();
- if (auto v = vs_2015_installation_instance.get())
- {
- const fs::path vs2015_vcvarsall_bat = *v / "VC" / "vcvarsall.bat";
-
- paths_examined.push_back(vs2015_vcvarsall_bat);
- if (fs.exists(vs2015_vcvarsall_bat))
- {
- const fs::path vs2015_dumpbin_exe = *v / "VC" / "bin" / "dumpbin.exe";
- paths_examined.push_back(vs2015_dumpbin_exe);
-
- const fs::path vs2015_bin_dir = vs2015_vcvarsall_bat.parent_path() / "bin";
- std::vector<ToolsetArchOption> supported_architectures;
- if (fs.exists(vs2015_bin_dir / "vcvars32.bat"))
- supported_architectures.push_back({L"x86", CPU::X86, CPU::X86});
- if (fs.exists(vs2015_bin_dir / "amd64\\vcvars64.bat"))
- supported_architectures.push_back({L"x64", CPU::X64, CPU::X64});
- if (fs.exists(vs2015_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat"))
- supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64});
- if (fs.exists(vs2015_bin_dir / "x86_arm\\vcvarsx86_arm.bat"))
- supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM});
- if (fs.exists(vs2015_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat"))
- supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86});
- if (fs.exists(vs2015_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat"))
- supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM});
-
- if (fs.exists(vs2015_dumpbin_exe))
- {
- found_toolsets.push_back(
- {vs2015_dumpbin_exe, vs2015_vcvarsall_bat, L"v140", supported_architectures});
- }
- }
- }
-
- // VS2017
- Optional<Toolset> vs2017_toolset;
- for (const fs::path& instance : vs2017_installation_instances)
- {
- const fs::path vc_dir = instance / "VC";
-
- // Skip any instances that do not have vcvarsall.
- const fs::path vcvarsall_dir = vc_dir / "Auxiliary" / "Build";
- const fs::path vcvarsall_bat = vcvarsall_dir / "vcvarsall.bat";
- paths_examined.push_back(vcvarsall_bat);
- if (!fs.exists(vcvarsall_bat)) continue;
-
- // Get all supported architectures
- std::vector<ToolsetArchOption> supported_architectures;
- if (fs.exists(vcvarsall_dir / "vcvars32.bat"))
- supported_architectures.push_back({L"x86", CPU::X86, CPU::X86});
- if (fs.exists(vcvarsall_dir / "vcvars64.bat"))
- supported_architectures.push_back({L"amd64", CPU::X64, CPU::X64});
- if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat"))
- supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64});
- if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat"))
- supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM});
- if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat"))
- supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86});
- if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat"))
- supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM});
-
- // Locate the "best" MSVC toolchain version
- const fs::path msvc_path = vc_dir / "Tools" / "MSVC";
- std::vector<fs::path> msvc_subdirectories = fs.get_files_non_recursive(msvc_path);
- Util::unstable_keep_if(msvc_subdirectories, [&fs](const fs::path& path) { return fs.is_directory(path); });
-
- // Sort them so that latest comes first
- std::sort(msvc_subdirectories.begin(),
- msvc_subdirectories.end(),
- [](const fs::path& left, const fs::path& right) { return left.filename() > right.filename(); });
-
- for (const fs::path& subdir : msvc_subdirectories)
- {
- const fs::path dumpbin_path = subdir / "bin" / "HostX86" / "x86" / "dumpbin.exe";
- paths_examined.push_back(dumpbin_path);
- if (fs.exists(dumpbin_path))
- {
- vs2017_toolset = Toolset{dumpbin_path, vcvarsall_bat, L"v141", supported_architectures};
- break;
- }
- }
- if (auto value = vs2017_toolset.get())
- {
- found_toolsets.push_back(*value);
- break;
- }
- }
-
- if (found_toolsets.empty())
- {
- System::println(System::Color::error, "Could not locate a complete toolset.");
- System::println("The following paths were examined:");
- for (const fs::path& path : paths_examined)
- {
- System::println(" %s", path.u8string());
- }
- Checks::exit_fail(VCPKG_LINE_INFO);
- }
-
- return found_toolsets;
- }
-
- const Toolset& VcpkgPaths::get_toolset(const std::string& toolset_version) const
- {
- // Invariant: toolsets are non-empty and sorted with newest at back()
- const auto& vs_toolsets = this->toolsets.get_lazy([this]() { return find_toolset_instances(*this); });
-
- if (toolset_version.empty())
- {
- return vs_toolsets.back();
- }
- else
- {
- const auto toolset = Util::find_if(vs_toolsets, [&](const Toolset& toolset) {
- return toolset_version == Strings::to_utf8(toolset.version);
- });
- Checks::check_exit(
- VCPKG_LINE_INFO, toolset != vs_toolsets.end(), "Could not find toolset '%s'", toolset_version);
- return *toolset;
- }
- }
-
- Files::Filesystem& VcpkgPaths::get_filesystem() const { return Files::get_real_filesystem(); }
-}
diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp
deleted file mode 100644
index 26a783a4b..000000000
--- a/toolsrc/src/commands_build.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-#include "pch.h"
-
-#include "Paragraphs.h"
-#include "PostBuildLint.h"
-#include "StatusParagraphs.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_Dependencies.h"
-#include "vcpkg_Enums.h"
-#include "vcpkg_Input.h"
-#include "vcpkg_System.h"
-#include "vcpkglib.h"
-
-using vcpkg::Build::BuildResult;
-using vcpkg::Parse::ParseControlErrorInfo;
-using vcpkg::Parse::ParseExpected;
-
-namespace vcpkg::Commands::BuildCommand
-{
- using Dependencies::InstallPlanAction;
- using Dependencies::InstallPlanType;
-
- static const std::string OPTION_CHECKS_ONLY = "--checks-only";
-
- void perform_and_exit(const FullPackageSpec& full_spec,
- const fs::path& port_dir,
- const std::unordered_set<std::string>& options,
- const VcpkgPaths& paths)
- {
- const PackageSpec& spec = full_spec.package_spec;
- if (options.find(OPTION_CHECKS_ONLY) != options.end())
- {
- const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, spec.triplet());
- const auto build_info = Build::read_build_info(paths.get_filesystem(), paths.build_info_file_path(spec));
- const size_t error_count = PostBuildLint::perform_all_checks(spec, paths, pre_build_info, build_info);
- Checks::check_exit(VCPKG_LINE_INFO, error_count == 0);
- Checks::exit_success(VCPKG_LINE_INFO);
- }
-
- const ParseExpected<SourceControlFile> source_control_file =
- Paragraphs::try_load_port(paths.get_filesystem(), port_dir);
-
- if (!source_control_file.has_value())
- {
- print_error_message(source_control_file.error());
- Checks::exit_fail(VCPKG_LINE_INFO);
- }
-
- for (const std::string& str : full_spec.features)
- {
- System::println("%s \n", str);
- }
- const auto& scf = source_control_file.value_or_exit(VCPKG_LINE_INFO);
- Checks::check_exit(VCPKG_LINE_INFO,
- spec.name() == scf->core_paragraph->name,
- "The Name: field inside the CONTROL does not match the port directory: '%s' != '%s'",
- scf->core_paragraph->name,
- spec.name());
-
- const StatusParagraphs status_db = database_load_check(paths);
- const Build::BuildPackageOptions build_package_options{Build::UseHeadVersion::NO, Build::AllowDownloads::YES};
-
- const Build::BuildPackageConfig build_config{
- *scf->core_paragraph, spec.triplet(), paths.port_dir(spec), build_package_options};
-
- const auto result = Build::build_package(paths, build_config, status_db);
- if (result.code == BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES)
- {
- System::println(System::Color::error,
- "The build command requires all dependencies to be already installed.");
- System::println("The following dependencies are missing:");
- System::println();
- for (const auto& p : result.unmet_dependencies)
- {
- System::println(" %s", p);
- }
- System::println();
- Checks::exit_fail(VCPKG_LINE_INFO);
- }
-
- if (result.code != BuildResult::SUCCEEDED)
- {
- System::println(System::Color::error, Build::create_error_message(result.code, spec));
- System::println(Build::create_user_troubleshooting_message(spec));
- Checks::exit_fail(VCPKG_LINE_INFO);
- }
-
- Checks::exit_success(VCPKG_LINE_INFO);
- }
-
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet)
- {
- static const std::string example = Commands::Help::create_example_string("build zlib:x64-windows");
- args.check_exact_arg_count(
- 1, example); // Build only takes a single package and all dependencies must already be installed
- const std::string command_argument = args.command_arguments.at(0);
- const FullPackageSpec spec = Input::check_and_get_full_package_spec(command_argument, default_triplet, example);
- Input::check_triplet(spec.package_spec.triplet(), paths);
- const std::unordered_set<std::string> options =
- args.check_and_get_optional_command_arguments({OPTION_CHECKS_ONLY});
- perform_and_exit(spec, paths.port_dir(spec.package_spec), options, paths);
- }
-}
diff --git a/toolsrc/src/commands_ci.cpp b/toolsrc/src/commands_ci.cpp
deleted file mode 100644
index f781adf69..000000000
--- a/toolsrc/src/commands_ci.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-#include "pch.h"
-
-#include "Paragraphs.h"
-#include "vcpkg_Build.h"
-#include "vcpkg_Chrono.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_Dependencies.h"
-#include "vcpkg_Files.h"
-#include "vcpkg_Input.h"
-#include "vcpkg_System.h"
-#include "vcpkg_Util.h"
-#include "vcpkglib.h"
-
-namespace vcpkg::Commands::CI
-{
- using Dependencies::InstallPlanAction;
- using Dependencies::InstallPlanType;
- using Build::BuildResult;
-
- static std::vector<PackageSpec> load_all_package_specs(Files::Filesystem& fs,
- const fs::path& ports_directory,
- const Triplet& triplet)
- {
- auto ports = Paragraphs::load_all_ports(fs, ports_directory);
- return Util::fmap(ports, [&](auto&& control_file) -> PackageSpec {
- return PackageSpec::from_name_and_triplet(control_file->core_paragraph->name, triplet)
- .value_or_exit(VCPKG_LINE_INFO);
- });
- }
-
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet)
- {
- static const std::string example = Commands::Help::create_example_string("ci x64-windows");
- args.check_max_arg_count(1, example);
- const Triplet triplet = args.command_arguments.size() == 1
- ? Triplet::from_canonical_name(args.command_arguments.at(0))
- : default_triplet;
- Input::check_triplet(triplet, paths);
- args.check_and_get_optional_command_arguments({});
- const std::vector<PackageSpec> specs = load_all_package_specs(paths.get_filesystem(), paths.ports, triplet);
-
- StatusParagraphs status_db = database_load_check(paths);
- const auto& paths_port_file = Dependencies::PathsPortFile(paths);
- const std::vector<InstallPlanAction> install_plan =
- Dependencies::create_install_plan(paths_port_file, specs, status_db);
- Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty");
-
- std::vector<BuildResult> results;
- std::vector<std::string> timing;
- const ElapsedTime timer = ElapsedTime::create_started();
- size_t counter = 0;
- const size_t package_count = install_plan.size();
- const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, Build::AllowDownloads::YES};
-
- for (const InstallPlanAction& action : install_plan)
- {
- const ElapsedTime build_timer = ElapsedTime::create_started();
- counter++;
- const std::string display_name = action.spec.to_string();
- System::println("Starting package %d/%d: %s", counter, package_count, display_name);
-
- timing.push_back("0");
- results.push_back(BuildResult::NULLVALUE);
-
- const BuildResult result =
- Install::perform_install_plan_action(paths, action, install_plan_options, status_db);
- timing.back() = build_timer.to_string();
- results.back() = result;
- System::println("Elapsed time for package %s: %s", action.spec, build_timer.to_string());
- }
-
- System::println("Total time taken: %s", timer.to_string());
-
- for (size_t i = 0; i < results.size(); i++)
- {
- System::println("%s: %s: %s", install_plan[i].spec, Build::to_string(results[i]), timing[i]);
- }
-
- std::map<BuildResult, int> summary;
- for (const BuildResult& v : Build::BuildResult_values)
- {
- summary[v] = 0;
- }
-
- for (const BuildResult& r : results)
- {
- summary[r]++;
- }
-
- System::println("\n\nSUMMARY");
- for (const std::pair<const BuildResult, int>& entry : summary)
- {
- System::println(" %s: %d", Build::to_string(entry.first), entry.second);
- }
-
- Checks::exit_success(VCPKG_LINE_INFO);
- }
-}
diff --git a/toolsrc/src/commands_hash.cpp b/toolsrc/src/commands_hash.cpp
deleted file mode 100644
index b3211b9f8..000000000
--- a/toolsrc/src/commands_hash.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-#include "pch.h"
-
-#include "vcpkg_Commands.h"
-#include "vcpkg_System.h"
-#include "vcpkg_Util.h"
-
-namespace vcpkg::Commands::Hash
-{
- static void do_file_hash(fs::path const& path, std::wstring const& hash_type)
- {
- const auto cmd_line = Strings::wformat(LR"(CertUtil.exe -hashfile "%s" %s)", path.c_str(), hash_type);
- const auto ec_data = System::cmd_execute_and_capture_output(cmd_line);
- Checks::check_exit(
- VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::to_utf8(cmd_line));
-
- std::string const& output = ec_data.output;
-
- const auto start = output.find_first_of("\r\n");
- Checks::check_exit(VCPKG_LINE_INFO,
- start != std::string::npos,
- "Unexpected output format from command: %s",
- Strings::to_utf8(cmd_line));
-
- const auto end = output.find_first_of("\r\n", start + 1);
- Checks::check_exit(VCPKG_LINE_INFO,
- end != std::string::npos,
- "Unexpected output format from command: %s",
- Strings::to_utf8(cmd_line));
-
- auto hash = output.substr(start, end - start);
- Util::erase_remove_if(hash, isspace);
- System::println(hash);
- }
-
- void perform_and_exit(const VcpkgCmdArguments& args)
- {
- static const std::string EXAMPLE =
- Strings::format("The argument should be a file path\n%s",
- Commands::Help::create_example_string("hash boost_1_62_0.tar.bz2"));
- args.check_min_arg_count(1, EXAMPLE);
- args.check_max_arg_count(2, EXAMPLE);
- args.check_and_get_optional_command_arguments({});
-
- if (args.command_arguments.size() == 1)
- {
- do_file_hash(args.command_arguments[0], L"SHA512");
- }
- if (args.command_arguments.size() == 2)
- {
- do_file_hash(args.command_arguments[0], Strings::to_utf16(args.command_arguments[1]));
- }
-
- Checks::exit_success(VCPKG_LINE_INFO);
- }
-}
diff --git a/toolsrc/src/commands_version.cpp b/toolsrc/src/commands_version.cpp
deleted file mode 100644
index af81cd26e..000000000
--- a/toolsrc/src/commands_version.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-#include "pch.h"
-
-#include "metrics.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_System.h"
-
-#define STRINGIFY(...) #__VA_ARGS__
-#define MACRO_TO_STRING(X) STRINGIFY(X)
-
-#define VCPKG_VERSION_AS_STRING MACRO_TO_STRING(VCPKG_VERSION)
-
-namespace vcpkg::Commands::Version
-{
- const std::string& version()
- {
- static const std::string s_version =
-#include "../VERSION.txt"
-
- +std::string(VCPKG_VERSION_AS_STRING)
-#ifndef NDEBUG
- + std::string("-debug")
-#endif
- + std::string(Metrics::get_compiled_metrics_enabled() ? Strings::EMPTY : "-external");
- return s_version;
- }
-
- void perform_and_exit(const VcpkgCmdArguments& args)
- {
- args.check_exact_arg_count(0);
- args.check_and_get_optional_command_arguments({});
-
- System::println("Vcpkg package management program version %s\n"
- "\n"
- "See LICENSE.txt for license information.",
- version());
- Checks::exit_success(VCPKG_LINE_INFO);
- }
-}
diff --git a/toolsrc/src/tests_arguments.cpp b/toolsrc/src/tests.arguments.cpp
index 14b3c3d4f..25bf0f085 100644
--- a/toolsrc/src/tests_arguments.cpp
+++ b/toolsrc/src/tests.arguments.cpp
@@ -1,5 +1,5 @@
-#include "CppUnitTest.h"
-#include "VcpkgCmdArguments.h"
+#include <CppUnitTest.h>
+#include <vcpkg/vcpkgcmdarguments.h>
#pragma comment(lib, "version")
#pragma comment(lib, "winhttp")
diff --git a/toolsrc/src/tests_dependencies.cpp b/toolsrc/src/tests.dependencies.cpp
index 6a6981d73..3f6e0dd10 100644
--- a/toolsrc/src/tests_dependencies.cpp
+++ b/toolsrc/src/tests.dependencies.cpp
@@ -1,6 +1,6 @@
-#include "CppUnitTest.h"
-#include "SourceParagraph.h"
-#include "Triplet.h"
+#include <CppUnitTest.h>
+#include <vcpkg/sourceparagraph.h>
+#include <vcpkg/triplet.h>
#pragma comment(lib, "version")
#pragma comment(lib, "winhttp")
diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/tests.installplan.cpp
index 6c9311264..120009db5 100644
--- a/toolsrc/src/test_install_plan.cpp
+++ b/toolsrc/src/tests.installplan.cpp
@@ -1,6 +1,7 @@
-#include "CppUnitTest.h"
-#include "vcpkg_Dependencies.h"
-#include "vcpkg_Util.h"
+#include <CppUnitTest.h>
+#include <vcpkg/dependencies.h>
+
+#include <vcpkg/base/util.h>
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
diff --git a/toolsrc/src/tests_package_spec.cpp b/toolsrc/src/tests.packagespec.cpp
index fa201b372..cb5c41af0 100644
--- a/toolsrc/src/tests_package_spec.cpp
+++ b/toolsrc/src/tests.packagespec.cpp
@@ -1,7 +1,8 @@
-#include "BinaryParagraph.h"
-#include "CppUnitTest.h"
-#include "Paragraphs.h"
-#include "vcpkg_Strings.h"
+#include <CppUnitTest.h>
+#include <vcpkg/binaryparagraph.h>
+#include <vcpkg/paragraphs.h>
+
+#include <vcpkg/base/strings.h>
#pragma comment(lib, "version")
#pragma comment(lib, "winhttp")
@@ -43,7 +44,7 @@ namespace UnitTest1
std::array<const char*, 6> features = {"", "0", "1", "", "2", "3"};
std::array<PackageSpec*, 6> specs = {&a_spec, &a_spec, &a_spec, &b_spec, &b_spec, &b_spec};
- for (int i = 0; i < features.size(); ++i)
+ for (size_t i = 0; i < features.size(); ++i)
{
Assert::AreEqual(features[i], fspecs[i].feature().c_str());
Assert::AreEqual(*specs[i], fspecs[i].spec());
diff --git a/toolsrc/src/tests_paragraph.cpp b/toolsrc/src/tests.paragraph.cpp
index 47a07e12d..d9301abd0 100644
--- a/toolsrc/src/tests_paragraph.cpp
+++ b/toolsrc/src/tests.paragraph.cpp
@@ -1,7 +1,8 @@
-#include "BinaryParagraph.h"
-#include "CppUnitTest.h"
-#include "Paragraphs.h"
-#include "vcpkg_Strings.h"
+#include <CppUnitTest.h>
+#include <vcpkg/binaryparagraph.h>
+#include <vcpkg/paragraphs.h>
+
+#include <vcpkg/base/strings.h>
#pragma comment(lib, "version")
#pragma comment(lib, "winhttp")
diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp
index 781f03585..e1e2240e7 100644
--- a/toolsrc/src/vcpkg.cpp
+++ b/toolsrc/src/vcpkg.cpp
@@ -1,27 +1,40 @@
+#if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
-#include "Paragraphs.h"
-#include "metrics.h"
-#include "vcpkg_Chrono.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_Files.h"
-#include "vcpkg_GlobalState.h"
-#include "vcpkg_Input.h"
-#include "vcpkg_Strings.h"
-#include "vcpkg_System.h"
-#include "vcpkglib.h"
+#pragma warning(push)
+#pragma warning(disable : 4768)
#include <Shlobj.h>
+#pragma warning(pop)
+#else
+#include <unistd.h>
+#endif
+
+#include <vcpkg/base/chrono.h>
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/strings.h>
+#include <vcpkg/base/system.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/globalstate.h>
+#include <vcpkg/help.h>
+#include <vcpkg/input.h>
+#include <vcpkg/metrics.h>
+#include <vcpkg/paragraphs.h>
+#include <vcpkg/vcpkglib.h>
+
#include <cassert>
#include <fstream>
#include <memory>
+#pragma comment(lib, "ole32")
+#pragma comment(lib, "shell32")
+
using namespace vcpkg;
void invalid_command(const std::string& cmd)
{
System::println(System::Color::error, "invalid command: %s", cmd);
- Commands::Help::print_usage();
+ Help::print_usage();
Checks::exit_fail(VCPKG_LINE_INFO);
}
@@ -30,13 +43,26 @@ static void inner(const VcpkgCmdArguments& args)
Metrics::g_metrics.lock()->track_property("command", args.command);
if (args.command.empty())
{
- Commands::Help::print_usage();
+ Help::print_usage();
Checks::exit_fail(VCPKG_LINE_INFO);
}
- if (const auto command_function = Commands::find(args.command, Commands::get_available_commands_type_c()))
+ static const auto find_command = [&](auto&& commands) {
+ auto it = Util::find_if(commands, [&](auto&& commandc) {
+ return Strings::case_insensitive_ascii_equals(commandc.name, args.command);
+ });
+ using std::end;
+ if (it != end(commands))
+ {
+ return &*it;
+ }
+ else
+ return static_cast<decltype(&*it)>(nullptr);
+ };
+
+ if (const auto command_function = find_command(Commands::get_available_commands_type_c()))
{
- return command_function(args);
+ return command_function->function(args);
}
fs::path vcpkg_root_dir;
@@ -46,15 +72,21 @@ static void inner(const VcpkgCmdArguments& args)
}
else
{
- const Optional<std::wstring> vcpkg_root_dir_env = System::get_environment_variable(L"VCPKG_ROOT");
+ const auto vcpkg_root_dir_env = System::get_environment_variable("VCPKG_ROOT");
if (const auto v = vcpkg_root_dir_env.get())
{
vcpkg_root_dir = fs::stdfs::absolute(*v);
}
else
{
- vcpkg_root_dir = Files::get_real_filesystem().find_file_recursively_up(
- fs::stdfs::absolute(System::get_exe_path_of_current_process()), ".vcpkg-root");
+ const fs::path current_path = fs::stdfs::current_path();
+ vcpkg_root_dir = Files::get_real_filesystem().find_file_recursively_up(current_path, ".vcpkg-root");
+
+ if (vcpkg_root_dir.empty())
+ {
+ vcpkg_root_dir = Files::get_real_filesystem().find_file_recursively_up(
+ fs::stdfs::absolute(System::get_exe_path_of_current_process()), ".vcpkg-root");
+ }
}
}
@@ -67,12 +99,18 @@ static void inner(const VcpkgCmdArguments& args)
vcpkg_root_dir.string(),
expected_paths.error().message());
const VcpkgPaths paths = expected_paths.value_or_exit(VCPKG_LINE_INFO);
+
+#if defined(_WIN32)
const int exit_code = _wchdir(paths.root.c_str());
+#else
+ const int exit_code = chdir(paths.root.c_str());
+#endif
Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Changing the working dir failed");
+ Commands::Version::warn_if_vcpkg_version_mismatch(paths);
- if (const auto command_function = Commands::find(args.command, Commands::get_available_commands_type_b()))
+ if (const auto command_function = find_command(Commands::get_available_commands_type_b()))
{
- return command_function(args, paths);
+ return command_function->function(args, paths);
}
Triplet default_triplet;
@@ -82,11 +120,10 @@ static void inner(const VcpkgCmdArguments& args)
}
else
{
- const Optional<std::wstring> vcpkg_default_triplet_env =
- System::get_environment_variable(L"VCPKG_DEFAULT_TRIPLET");
+ const auto vcpkg_default_triplet_env = System::get_environment_variable("VCPKG_DEFAULT_TRIPLET");
if (const auto v = vcpkg_default_triplet_env.get())
{
- default_triplet = Triplet::from_canonical_name(Strings::to_utf8(*v));
+ default_triplet = Triplet::from_canonical_name(*v);
}
else
{
@@ -96,16 +133,17 @@ static void inner(const VcpkgCmdArguments& args)
Input::check_triplet(default_triplet, paths);
- if (const auto command_function = Commands::find(args.command, Commands::get_available_commands_type_a()))
+ if (const auto command_function = find_command(Commands::get_available_commands_type_a()))
{
- return command_function(args, paths, default_triplet);
+ return command_function->function(args, paths, default_triplet);
}
return invalid_command(args.command);
}
-static void loadConfig()
+static void load_config()
{
+#if defined(_WIN32)
fs::path localappdata;
{
// Config path in AppDataLocal
@@ -165,6 +203,7 @@ static void loadConfig()
catch (...)
{
}
+#endif
}
static std::string trim_path_from_command_line(const std::string& full_command_line)
@@ -188,26 +227,34 @@ static std::string trim_path_from_command_line(const std::string& full_command_l
return std::string(it, full_command_line.cend());
}
+#if defined(_WIN32)
int wmain(const int argc, const wchar_t* const* const argv)
+#else
+int main(const int argc, const char* const* const argv)
+#endif
{
if (argc == 0) std::abort();
+ *GlobalState::timer.lock() = Chrono::ElapsedTime::create_started();
+
+#if defined(_WIN32)
GlobalState::g_init_console_cp = GetConsoleCP();
GlobalState::g_init_console_output_cp = GetConsoleOutputCP();
SetConsoleCP(65001);
SetConsoleOutputCP(65001);
- *GlobalState::timer.lock() = ElapsedTime::create_started();
-
const std::string trimmed_command_line = trim_path_from_command_line(Strings::to_utf8(GetCommandLineW()));
+#endif
{
auto locked_metrics = Metrics::g_metrics.lock();
locked_metrics->track_property("version", Commands::Version::version());
+#if defined(_WIN32)
locked_metrics->track_property("cmdline", trimmed_command_line);
+#endif
}
- loadConfig();
+ load_config();
Metrics::g_metrics.lock()->track_property("sqmuser", Metrics::get_SQM_user());
const VcpkgCmdArguments args = VcpkgCmdArguments::create_from_command_line(argc, argv);
@@ -254,6 +301,12 @@ int wmain(const int argc, const wchar_t* const* const argv)
exc_msg);
fflush(stdout);
for (int x = 0; x < argc; ++x)
+ {
+#if defined(_WIN32)
System::println("%s|", Strings::to_utf8(argv[x]));
+#else
+ System::println("%s|", argv[x]);
+#endif
+ }
fflush(stdout);
}
diff --git a/toolsrc/src/vcpkg_Checks.cpp b/toolsrc/src/vcpkg/base/checks.cpp
index 3692a0e9a..ed28d6e2b 100644
--- a/toolsrc/src/vcpkg_Checks.cpp
+++ b/toolsrc/src/vcpkg/base/checks.cpp
@@ -1,41 +1,54 @@
#include "pch.h"
-#include "metrics.h"
-#include "vcpkg_Checks.h"
-#include "vcpkg_GlobalState.h"
-#include "vcpkg_System.h"
-#include "vcpkglib.h"
+#include <vcpkg/globalstate.h>
+#include <vcpkg/metrics.h>
+
+#include <vcpkg/base/checks.h>
+#include <vcpkg/base/system.h>
namespace vcpkg::Checks
{
[[noreturn]] static void cleanup_and_exit(const int exit_code)
{
- auto elapsed_us = GlobalState::timer.lock()->microseconds();
+ const auto elapsed_us = GlobalState::timer.lock()->microseconds();
auto metrics = Metrics::g_metrics.lock();
metrics->track_metric("elapsed_us", elapsed_us);
GlobalState::debugging = false;
metrics->flush();
+#if defined(_WIN32)
SetConsoleCP(GlobalState::g_init_console_cp);
SetConsoleOutputCP(GlobalState::g_init_console_output_cp);
+#endif
fflush(nullptr);
+#if defined(_WIN32)
::TerminateProcess(::GetCurrentProcess(), exit_code);
+#else
+ ::exit(exit_code);
+#endif
}
- static BOOL CtrlHandler(DWORD fdwCtrlType)
+#if defined(_WIN32)
+ static BOOL ctrl_handler(DWORD fdw_ctrl_type)
{
{
auto locked_metrics = Metrics::g_metrics.lock();
- locked_metrics->track_property("CtrlHandler", std::to_string(fdwCtrlType));
+ locked_metrics->track_property("CtrlHandler", std::to_string(fdw_ctrl_type));
locked_metrics->track_property("error", "CtrlHandler was fired.");
}
cleanup_and_exit(EXIT_FAILURE);
}
- void register_console_ctrl_handler() { SetConsoleCtrlHandler((PHANDLER_ROUTINE)CtrlHandler, TRUE); }
+ void register_console_ctrl_handler()
+ {
+ SetConsoleCtrlHandler(reinterpret_cast<PHANDLER_ROUTINE>(ctrl_handler), TRUE);
+ }
+#else
+ void register_console_ctrl_handler() {}
+#endif
[[noreturn]] void unreachable(const LineInfo& line_info)
{
@@ -54,9 +67,9 @@ namespace vcpkg::Checks
cleanup_and_exit(exit_code);
}
- [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView errorMessage)
+ [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView error_message)
{
- System::println(System::Color::error, errorMessage);
+ System::println(System::Color::error, error_message);
exit_fail(line_info);
}
@@ -64,15 +77,15 @@ namespace vcpkg::Checks
{
if (!expression)
{
- exit_with_message(line_info, Strings::EMPTY);
+ exit_with_message(line_info, "");
}
}
- void check_exit(const LineInfo& line_info, bool expression, const CStringView errorMessage)
+ void check_exit(const LineInfo& line_info, bool expression, const CStringView error_message)
{
if (!expression)
{
- exit_with_message(line_info, errorMessage);
+ exit_with_message(line_info, error_message);
}
}
}
diff --git a/toolsrc/src/vcpkg_Chrono.cpp b/toolsrc/src/vcpkg/base/chrono.cpp
index d70f4a054..5d28909fc 100644
--- a/toolsrc/src/vcpkg_Chrono.cpp
+++ b/toolsrc/src/vcpkg/base/chrono.cpp
@@ -1,49 +1,49 @@
#include "pch.h"
-#include "vcpkg_Checks.h"
-#include "vcpkg_Chrono.h"
+#include <vcpkg/base/checks.h>
+#include <vcpkg/base/chrono.h>
-namespace vcpkg
+namespace vcpkg::Chrono
{
static std::string format_time_userfriendly(const std::chrono::nanoseconds& nanos)
{
+ using std::chrono::duration_cast;
using std::chrono::hours;
- using std::chrono::minutes;
- using std::chrono::seconds;
- using std::chrono::milliseconds;
using std::chrono::microseconds;
+ using std::chrono::milliseconds;
+ using std::chrono::minutes;
using std::chrono::nanoseconds;
- using std::chrono::duration_cast;
+ using std::chrono::seconds;
const double nanos_as_double = static_cast<double>(nanos.count());
if (duration_cast<hours>(nanos) > hours())
{
- auto t = nanos_as_double / duration_cast<nanoseconds>(hours(1)).count();
+ const auto t = nanos_as_double / duration_cast<nanoseconds>(hours(1)).count();
return Strings::format("%.4g h", t);
}
if (duration_cast<minutes>(nanos) > minutes())
{
- auto t = nanos_as_double / duration_cast<nanoseconds>(minutes(1)).count();
+ const auto t = nanos_as_double / duration_cast<nanoseconds>(minutes(1)).count();
return Strings::format("%.4g min", t);
}
if (duration_cast<seconds>(nanos) > seconds())
{
- auto t = nanos_as_double / duration_cast<nanoseconds>(seconds(1)).count();
+ const auto t = nanos_as_double / duration_cast<nanoseconds>(seconds(1)).count();
return Strings::format("%.4g s", t);
}
if (duration_cast<milliseconds>(nanos) > milliseconds())
{
- auto t = nanos_as_double / duration_cast<nanoseconds>(milliseconds(1)).count();
+ const auto t = nanos_as_double / duration_cast<nanoseconds>(milliseconds(1)).count();
return Strings::format("%.4g ms", t);
}
if (duration_cast<microseconds>(nanos) > microseconds())
{
- auto t = nanos_as_double / duration_cast<nanoseconds>(microseconds(1)).count();
+ const auto t = nanos_as_double / duration_cast<nanoseconds>(microseconds(1)).count();
return Strings::format("%.4g us", t);
}
diff --git a/toolsrc/src/coff_file_reader.cpp b/toolsrc/src/vcpkg/base/cofffilereader.cpp
index 10c1437c6..1927e0b5e 100644
--- a/toolsrc/src/coff_file_reader.cpp
+++ b/toolsrc/src/vcpkg/base/cofffilereader.cpp
@@ -1,12 +1,13 @@
#include "pch.h"
-#include "coff_file_reader.h"
-#include "vcpkg_Checks.h"
+#include <vcpkg/base/checks.h>
+#include <vcpkg/base/cofffilereader.h>
using namespace std;
-namespace vcpkg::COFFFileReader
+namespace vcpkg::CoffFileReader
{
+#if defined(_WIN32)
template<class T>
static T reinterpret_bytes(const char* data)
{
@@ -24,7 +25,7 @@ namespace vcpkg::COFFFileReader
template<class T>
static T peek_value_from_stream(fstream& fs)
{
- const fpos_t original_pos = fs.tellg().seekpos();
+ const std::streampos original_pos = fs.tellg();
T data;
fs.read(reinterpret_cast<char*>(&data), sizeof data);
fs.seekg(original_pos);
@@ -305,4 +306,8 @@ namespace vcpkg::COFFFileReader
return {std::vector<MachineType>(machine_types.cbegin(), machine_types.cend())};
}
+#else
+ DllInfo read_dll(const fs::path& path) { exit(-1); }
+ LibInfo read_lib(const fs::path& path) { exit(-1); }
+#endif
}
diff --git a/toolsrc/src/vcpkg_Enums.cpp b/toolsrc/src/vcpkg/base/enums.cpp
index 51ba9d5dc..aa124f3aa 100644
--- a/toolsrc/src/vcpkg_Enums.cpp
+++ b/toolsrc/src/vcpkg/base/enums.cpp
@@ -1,7 +1,7 @@
#include "pch.h"
-#include "vcpkg_Checks.h"
-#include "vcpkg_Enums.h"
+#include <vcpkg/base/checks.h>
+#include <vcpkg/base/enums.h>
namespace vcpkg::Enums
{
diff --git a/toolsrc/src/vcpkg_Files.cpp b/toolsrc/src/vcpkg/base/files.cpp
index ad1fcebc6..6e43debb1 100644
--- a/toolsrc/src/vcpkg_Files.cpp
+++ b/toolsrc/src/vcpkg/base/files.cpp
@@ -1,9 +1,8 @@
#include "pch.h"
-#include "vcpkg_Files.h"
-#include "vcpkg_System.h"
-#include "vcpkg_Util.h"
-#include <thread>
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/system.h>
+#include <vcpkg/base/util.h>
namespace vcpkg::Files
{
@@ -164,7 +163,12 @@ namespace vcpkg::Files
virtual void write_contents(const fs::path& file_path, const std::string& data) override
{
FILE* f = nullptr;
+#if defined(_WIN32)
auto ec = _wfopen_s(&f, file_path.native().c_str(), L"wb");
+#else
+ f = fopen(file_path.native().c_str(), "wb");
+ int ec = f != nullptr ? 0 : 1;
+#endif
Checks::check_exit(
VCPKG_LINE_INFO, ec == 0, "Error: Could not open file for writing: %s", file_path.u8string().c_str());
auto count = fwrite(data.data(), sizeof(data[0]), data.size(), f);
@@ -195,9 +199,13 @@ namespace vcpkg::Files
System::println();
}
- std::vector<fs::path> find_from_PATH(const std::wstring& name)
+ std::vector<fs::path> find_from_PATH(const std::string& name)
{
- const std::wstring cmd = Strings::wformat(L"where.exe %s", name);
+#if defined(_WIN32)
+ const std::string cmd = Strings::format("where.exe %s", name);
+#else
+ const std::string cmd = Strings::format("which %s", name);
+#endif
auto out = System::cmd_execute_and_capture_output(cmd);
if (out.exit_code != 0)
{
diff --git a/toolsrc/src/LineInfo.cpp b/toolsrc/src/vcpkg/base/lineinfo.cpp
index d1bf9a4b1..7435ed666 100644
--- a/toolsrc/src/LineInfo.cpp
+++ b/toolsrc/src/vcpkg/base/lineinfo.cpp
@@ -1,7 +1,7 @@
#include "pch.h"
-#include "LineInfo.h"
-#include "vcpkg_Strings.h"
+#include <vcpkg/base/lineinfo.h>
+#include <vcpkg/base/strings.h>
namespace vcpkg
{
diff --git a/toolsrc/src/MachineType.cpp b/toolsrc/src/vcpkg/base/machinetype.cpp
index 2f44ce21a..2b7bd5e3a 100644
--- a/toolsrc/src/MachineType.cpp
+++ b/toolsrc/src/vcpkg/base/machinetype.cpp
@@ -1,13 +1,13 @@
#include "pch.h"
-#include "MachineType.h"
-#include "vcpkg_Checks.h"
+#include <vcpkg/base/checks.h>
+#include <vcpkg/base/machinetype.h>
namespace vcpkg
{
MachineType to_machine_type(const uint16_t value)
{
- MachineType t = static_cast<MachineType>(value);
+ const MachineType t = static_cast<MachineType>(value);
switch (t)
{
case MachineType::UNKNOWN:
diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp
index 15851829d..af41eed9a 100644
--- a/toolsrc/src/vcpkg_Strings.cpp
+++ b/toolsrc/src/vcpkg/base/strings.cpp
@@ -1,8 +1,8 @@
#include "pch.h"
-#include "vcpkg_Checks.h"
-#include "vcpkg_Strings.h"
-#include "vcpkg_Util.h"
+#include <vcpkg/base/checks.h>
+#include <vcpkg/base/strings.h>
+#include <vcpkg/base/util.h>
namespace vcpkg::Strings::details
{
@@ -37,31 +37,8 @@ namespace vcpkg::Strings::details
#if defined(_WIN32)
_vsnprintf_s_l(&output.at(0), output.size() + 1, output.size(), fmtstr, c_locale(), args);
#else
- vsnprintf(&output.at(0), output.size() + 1, fmtstr, args);
-#endif
- va_end(args);
-
- return output;
- }
-
- std::wstring wformat_internal(const wchar_t* fmtstr, ...)
- {
- va_list args;
va_start(args, fmtstr);
-
-#if defined(_WIN32)
- const int sz = _vscwprintf_l(fmtstr, c_locale(), args);
-#else
- const int sz = vswprintf(nullptr, 0, fmtstr, args);
-#endif
- Checks::check_exit(VCPKG_LINE_INFO, sz > 0);
-
- std::wstring output(sz, L'\0');
-
-#if defined(_WIN32)
- _vsnwprintf_s_l(&output.at(0), output.size() + 1, output.size(), fmtstr, c_locale(), args);
-#else
- vswprintf(&output.at(0), output.size() + 1, fmtstr, args);
+ auto res = vsnprintf(&output.at(0), output.size() + 1, fmtstr, args);
#endif
va_end(args);
@@ -71,16 +48,30 @@ namespace vcpkg::Strings::details
namespace vcpkg::Strings
{
- std::wstring to_utf16(const CStringView s)
+ std::wstring to_utf16(const CStringView& s)
{
- std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t> conversion;
- return conversion.from_bytes(s);
+#if defined(_WIN32)
+ const int size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, nullptr, 0);
+ std::wstring output;
+ output.resize(size - 1);
+ MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, output.data(), size - 1);
+ return output;
+#else
+ Checks::unreachable(VCPKG_LINE_INFO);
+#endif
}
- std::string to_utf8(const CWStringView w)
+ std::string to_utf8(const CWStringView& w)
{
- std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t> conversion;
- return conversion.to_bytes(w);
+#if defined(_WIN32)
+ const int size = WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, nullptr, 0, nullptr, nullptr);
+ std::string output;
+ output.resize(size - 1);
+ WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, output.data(), size - 1, nullptr, nullptr);
+ return output;
+#else
+ Checks::unreachable(VCPKG_LINE_INFO);
+#endif
}
std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern)
@@ -98,9 +89,13 @@ namespace vcpkg::Strings
return case_insensitive_ascii_find(s, pattern) != s.end();
}
- int case_insensitive_ascii_compare(const CStringView left, const CStringView right)
+ bool case_insensitive_ascii_equals(const CStringView left, const CStringView right)
{
- return _stricmp(left, right);
+#if defined(_WIN32)
+ return _stricmp(left.c_str(), right.c_str()) == 0;
+#else
+ return strcasecmp(left.c_str(), right.c_str()) == 0;
+#endif
}
std::string ascii_to_lowercase(const std::string& input)
@@ -110,6 +105,15 @@ namespace vcpkg::Strings
return output;
}
+ bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern)
+ {
+#if defined(_WIN32)
+ return _strnicmp(s.c_str(), pattern.c_str(), pattern.size()) == 0;
+#else
+ return strncasecmp(s.c_str(), pattern.c_str(), pattern.size()) == 0;
+#endif
+ }
+
void trim(std::string* s)
{
s->erase(std::find_if_not(s->rbegin(), s->rend(), details::isspace).base(), s->end());
@@ -137,11 +141,19 @@ namespace vcpkg::Strings
{
std::vector<std::string> output;
+ if (delimiter.empty())
+ {
+ output.push_back(s);
+ return output;
+ }
+
+ const size_t delimiter_length = delimiter.length();
size_t i = 0;
for (size_t pos = s.find(delimiter); pos != std::string::npos; pos = s.find(delimiter, pos))
{
output.push_back(s.substr(i, pos - i));
- i = ++pos;
+ pos += delimiter_length;
+ i = pos;
}
// Add the rest of the string after the last delimiter, unless there is nothing after it
diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg/base/system.cpp
index f5106b25e..b04f79414 100644
--- a/toolsrc/src/vcpkg_System.cpp
+++ b/toolsrc/src/vcpkg/base/system.cpp
@@ -1,9 +1,12 @@
#include "pch.h"
-#include "vcpkg_Checks.h"
-#include "vcpkg_GlobalState.h"
-#include "vcpkg_System.h"
-#include "vcpkglib.h"
+#include <vcpkg/base/checks.h>
+#include <vcpkg/base/system.h>
+#include <vcpkg/globalstate.h>
+
+#include <time.h>
+
+#pragma comment(lib, "Advapi32")
namespace vcpkg::System
{
@@ -12,35 +15,46 @@ namespace vcpkg::System
using std::chrono::system_clock;
std::time_t now_time = system_clock::to_time_t(system_clock::now());
tm parts;
+#if defined(_WIN32)
localtime_s(&parts, &now_time);
+#else
+ parts = *localtime(&now_time);
+#endif
return parts;
}
fs::path get_exe_path_of_current_process()
{
+#if defined(_WIN32)
wchar_t buf[_MAX_PATH];
const int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH);
if (bytes == 0) std::abort();
return fs::path(buf, buf + bytes);
+#else
+ std::array<char, 1024 * 4> buf;
+ auto written = readlink("/proc/self/exe", buf.data(), buf.size());
+ Checks::check_exit(VCPKG_LINE_INFO, written != -1, "Could not determine current executable path.");
+ return fs::path(buf.data(), buf.data() + written);
+#endif
}
- Optional<CPUArchitecture> to_cpu_architecture(CStringView arch)
+ Optional<CPUArchitecture> to_cpu_architecture(const CStringView& arch)
{
- if (Strings::case_insensitive_ascii_compare(arch, "x86") == 0) return CPUArchitecture::X86;
- if (Strings::case_insensitive_ascii_compare(arch, "x64") == 0) return CPUArchitecture::X64;
- if (Strings::case_insensitive_ascii_compare(arch, "amd64") == 0) return CPUArchitecture::X64;
- if (Strings::case_insensitive_ascii_compare(arch, "arm") == 0) return CPUArchitecture::ARM;
- if (Strings::case_insensitive_ascii_compare(arch, "arm64") == 0) return CPUArchitecture::ARM64;
+ if (Strings::case_insensitive_ascii_equals(arch, "x86")) return CPUArchitecture::X86;
+ if (Strings::case_insensitive_ascii_equals(arch, "x64")) return CPUArchitecture::X64;
+ if (Strings::case_insensitive_ascii_equals(arch, "amd64")) return CPUArchitecture::X64;
+ if (Strings::case_insensitive_ascii_equals(arch, "arm")) return CPUArchitecture::ARM;
+ if (Strings::case_insensitive_ascii_equals(arch, "arm64")) return CPUArchitecture::ARM64;
return nullopt;
}
CPUArchitecture get_host_processor()
{
- auto w6432 = get_environment_variable(L"PROCESSOR_ARCHITEW6432");
- if (const auto p = w6432.get()) return to_cpu_architecture(Strings::to_utf8(*p)).value_or_exit(VCPKG_LINE_INFO);
+ auto w6432 = get_environment_variable("PROCESSOR_ARCHITEW6432");
+ if (const auto p = w6432.get()) return to_cpu_architecture(*p).value_or_exit(VCPKG_LINE_INFO);
- const auto procarch = get_environment_variable(L"PROCESSOR_ARCHITECTURE").value_or_exit(VCPKG_LINE_INFO);
- return to_cpu_architecture(Strings::to_utf8(procarch)).value_or_exit(VCPKG_LINE_INFO);
+ const auto procarch = get_environment_variable("PROCESSOR_ARCHITECTURE").value_or_exit(VCPKG_LINE_INFO);
+ return to_cpu_architecture(procarch).value_or_exit(VCPKG_LINE_INFO);
}
std::vector<CPUArchitecture> get_supported_host_architectures()
@@ -57,12 +71,13 @@ namespace vcpkg::System
return supported_architectures;
}
- int cmd_execute_clean(const CWStringView cmd_line)
+ int cmd_execute_clean(const CStringView cmd_line)
{
- static const std::wstring SYSTEM_ROOT = get_environment_variable(L"SystemRoot").value_or_exit(VCPKG_LINE_INFO);
- static const std::wstring SYSTEM_32 = SYSTEM_ROOT + LR"(\system32)";
- static const std::wstring NEW_PATH = Strings::wformat(
- LR"(Path=%s;%s;%s\Wbem;%s\WindowsPowerShell\v1.0\)", SYSTEM_32, SYSTEM_ROOT, SYSTEM_32, SYSTEM_32);
+#if defined(_WIN32)
+ static const std::string SYSTEM_ROOT = get_environment_variable("SystemRoot").value_or_exit(VCPKG_LINE_INFO);
+ static const std::string SYSTEM_32 = SYSTEM_ROOT + R"(\system32)";
+ static const std::string NEW_PATH = Strings::format(
+ R"(Path=%s;%s;%s\Wbem;%s\WindowsPowerShell\v1.0\)", SYSTEM_32, SYSTEM_ROOT, SYSTEM_32, SYSTEM_32);
std::vector<std::wstring> env_wstrings = {
L"ALLUSERSPROFILE",
@@ -106,6 +121,8 @@ namespace vcpkg::System
L"HTTPS_PROXY",
// Enables find_package(CUDA) in CMake
L"CUDA_PATH",
+ // Environmental variable generated automatically by CUDA after installation
+ L"NVCUDASAMPLES_ROOT",
};
// Flush stdout before launching external process
@@ -115,17 +132,17 @@ namespace vcpkg::System
for (auto&& env_wstring : env_wstrings)
{
- const Optional<std::wstring> value = System::get_environment_variable(env_wstring);
+ const Optional<std::string> value = System::get_environment_variable(Strings::to_utf8(env_wstring));
const auto v = value.get();
if (!v || v->empty()) continue;
env_cstr.append(env_wstring);
env_cstr.push_back(L'=');
- env_cstr.append(*v);
+ env_cstr.append(Strings::to_utf16(*v));
env_cstr.push_back(L'\0');
}
- env_cstr.append(NEW_PATH);
+ env_cstr.append(Strings::to_utf16(NEW_PATH));
env_cstr.push_back(L'\0');
STARTUPINFOW startup_info;
@@ -136,10 +153,10 @@ namespace vcpkg::System
memset(&process_info, 0, sizeof(PROCESS_INFORMATION));
// Basically we are wrapping it in quotes
- std::wstring actual_cmd_line = Strings::wformat(LR"###(cmd.exe /c "%s")###", cmd_line);
- Debug::println("CreateProcessW(%s)", Strings::to_utf8(actual_cmd_line));
+ const std::string actual_cmd_line = Strings::format(R"###(cmd.exe /c "%s")###", cmd_line);
+ Debug::println("CreateProcessW(%s)", actual_cmd_line);
bool succeeded = TRUE == CreateProcessW(nullptr,
- actual_cmd_line.data(),
+ Strings::to_utf16(actual_cmd_line).data(),
nullptr,
nullptr,
FALSE,
@@ -161,32 +178,54 @@ namespace vcpkg::System
Debug::println("CreateProcessW() returned %lu", exit_code);
return static_cast<int>(exit_code);
+#else
+ fflush(nullptr);
+ return system(cmd_line.c_str());
+#endif
}
- int cmd_execute(const CWStringView cmd_line)
+ int cmd_execute(const CStringView cmd_line)
{
// Flush stdout before launching external process
fflush(nullptr);
// Basically we are wrapping it in quotes
- const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s")###", cmd_line);
- Debug::println("_wsystem(%s)", Strings::to_utf8(actual_cmd_line));
- const int exit_code = _wsystem(actual_cmd_line.c_str());
+ const std::string& actual_cmd_line = Strings::format(R"###("%s")###", cmd_line);
+#if defined(_WIN32)
+ Debug::println("_wsystem(%s)", actual_cmd_line);
+ const int exit_code = _wsystem(Strings::to_utf16(actual_cmd_line).c_str());
Debug::println("_wsystem() returned %d", exit_code);
+#else
+ Debug::println("_system(%s)", actual_cmd_line);
+ const int exit_code = system(actual_cmd_line.c_str());
+ Debug::println("_system() returned %d", exit_code);
+#endif
return exit_code;
}
- ExitCodeAndOutput cmd_execute_and_capture_output(const CWStringView cmd_line)
+ // On Win7, output from powershell calls contain a byte order mark, so we strip it out if it is present
+ static void remove_byte_order_marks(std::wstring* s)
+ {
+ const wchar_t* a = s->c_str();
+ // This is the UTF-8 byte-order mark
+ while (s->size() >= 3 && a[0] == 0xEF && a[1] == 0xBB && a[2] == 0xBF)
+ {
+ s->erase(0, 3);
+ }
+ }
+
+ ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line)
{
// Flush stdout before launching external process
fflush(stdout);
- const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s 2>&1")###", cmd_line);
+#if defined(_WIN32)
+ const auto actual_cmd_line = Strings::format(R"###("%s 2>&1")###", cmd_line);
- Debug::println("_wpopen(%s)", Strings::to_utf8(actual_cmd_line));
+ Debug::println("_wpopen(%s)", actual_cmd_line);
std::wstring output;
wchar_t buf[1024];
- const auto pipe = _wpopen(actual_cmd_line.c_str(), L"r");
+ const auto pipe = _wpopen(Strings::to_utf16(actual_cmd_line).c_str(), L"r");
if (pipe == nullptr)
{
return {1, Strings::to_utf8(output)};
@@ -202,28 +241,54 @@ namespace vcpkg::System
const auto ec = _pclose(pipe);
Debug::println("_pclose() returned %d", ec);
+ remove_byte_order_marks(&output);
return {ec, Strings::to_utf8(output)};
+#else
+ const auto actual_cmd_line = Strings::format(R"###(%s 2>&1)###", cmd_line);
+
+ Debug::println("popen(%s)", actual_cmd_line);
+ std::string output;
+ char buf[1024];
+ const auto pipe = popen(actual_cmd_line.c_str(), "r");
+ if (pipe == nullptr)
+ {
+ return {1, output};
+ }
+ while (fgets(buf, 1024, pipe))
+ {
+ output.append(buf);
+ }
+ if (!feof(pipe))
+ {
+ return {1, output};
+ }
+
+ const auto ec = pclose(pipe);
+ Debug::println("pclose() returned %d", ec);
+ return {ec, output};
+#endif
}
- std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args)
+ std::string create_powershell_script_cmd(const fs::path& script_path, const CStringView args)
{
// TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned
- return Strings::wformat(
- LR"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.native(), args);
+ return Strings::format(
+ R"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.u8string(), args);
}
- void println() { println(Strings::EMPTY); }
+ void println() { putchar('\n'); }
- void print(const CStringView message) { fputs(message, stdout); }
+ void print(const CStringView message) { fputs(message.c_str(), stdout); }
void println(const CStringView message)
{
print(message);
- putchar('\n');
+ println();
}
void print(const Color c, const CStringView message)
{
+#if defined(_WIN32)
const HANDLE console_handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO console_screen_buffer_info{};
@@ -233,86 +298,110 @@ namespace vcpkg::System
SetConsoleTextAttribute(console_handle, static_cast<WORD>(c) | (original_color & 0xF0));
print(message);
SetConsoleTextAttribute(console_handle, original_color);
+#else
+ print(message);
+#endif
}
void println(const Color c, const CStringView message)
{
print(c, message);
- putchar('\n');
+ println();
}
- Optional<std::wstring> get_environment_variable(const CWStringView varname) noexcept
+ Optional<std::string> get_environment_variable(const CStringView varname) noexcept
{
- const auto sz = GetEnvironmentVariableW(varname, nullptr, 0);
+#if defined(_WIN32)
+ const auto w_varname = Strings::to_utf16(varname);
+ const auto sz = GetEnvironmentVariableW(w_varname.c_str(), nullptr, 0);
if (sz == 0) return nullopt;
std::wstring ret(sz, L'\0');
Checks::check_exit(VCPKG_LINE_INFO, MAXDWORD >= ret.size());
- const auto sz2 = GetEnvironmentVariableW(varname, ret.data(), static_cast<DWORD>(ret.size()));
+ const auto sz2 = GetEnvironmentVariableW(w_varname.c_str(), ret.data(), static_cast<DWORD>(ret.size()));
Checks::check_exit(VCPKG_LINE_INFO, sz2 + 1 == sz);
ret.pop_back();
- return ret;
+ return Strings::to_utf8(ret);
+#else
+ auto v = getenv(varname.c_str());
+ if (!v) return nullopt;
+ return std::string(v);
+#endif
}
- static bool is_string_keytype(DWORD hkey_type)
+#if defined(_WIN32)
+ static bool is_string_keytype(const DWORD hkey_type)
{
return hkey_type == REG_SZ || hkey_type == REG_MULTI_SZ || hkey_type == REG_EXPAND_SZ;
}
- Optional<std::wstring> get_registry_string(HKEY base, const CWStringView sub_key, const CWStringView valuename)
+ Optional<std::string> get_registry_string(void* base_hkey, const CStringView sub_key, const CStringView valuename)
{
HKEY k = nullptr;
- const LSTATUS ec = RegOpenKeyExW(base, sub_key, NULL, KEY_READ, &k);
+ const LSTATUS ec =
+ RegOpenKeyExW(reinterpret_cast<HKEY>(base_hkey), Strings::to_utf16(sub_key).c_str(), NULL, KEY_READ, &k);
if (ec != ERROR_SUCCESS) return nullopt;
DWORD dw_buffer_size = 0;
DWORD dw_type = 0;
- auto rc = RegQueryValueExW(k, valuename, nullptr, &dw_type, nullptr, &dw_buffer_size);
+ auto rc =
+ RegQueryValueExW(k, Strings::to_utf16(valuename).c_str(), nullptr, &dw_type, nullptr, &dw_buffer_size);
if (rc != ERROR_SUCCESS || !is_string_keytype(dw_type) || dw_buffer_size == 0 ||
dw_buffer_size % sizeof(wchar_t) != 0)
return nullopt;
std::wstring ret;
ret.resize(dw_buffer_size / sizeof(wchar_t));
- rc = RegQueryValueExW(k, valuename, nullptr, &dw_type, reinterpret_cast<LPBYTE>(ret.data()), &dw_buffer_size);
+ rc = RegQueryValueExW(k,
+ Strings::to_utf16(valuename).c_str(),
+ nullptr,
+ &dw_type,
+ reinterpret_cast<LPBYTE>(ret.data()),
+ &dw_buffer_size);
if (rc != ERROR_SUCCESS || !is_string_keytype(dw_type) || dw_buffer_size != sizeof(wchar_t) * ret.size())
return nullopt;
ret.pop_back(); // remove extra trailing null byte
- return ret;
+ return Strings::to_utf8(ret);
+ }
+#else
+ Optional<std::string> get_registry_string(void* base_hkey, const CStringView sub_key, const CStringView valuename)
+ {
+ return nullopt;
}
+#endif
- static const fs::path& get_ProgramFiles()
+ static const fs::path& get_program_files()
{
- static const fs::path p = System::get_environment_variable(L"PROGRAMFILES").value_or_exit(VCPKG_LINE_INFO);
- return p;
+ static const fs::path PATH = System::get_environment_variable("PROGRAMFILES").value_or_exit(VCPKG_LINE_INFO);
+ return PATH;
}
- const fs::path& get_ProgramFiles_32_bit()
+ const fs::path& get_program_files_32_bit()
{
- static const fs::path p = []() -> fs::path {
- auto value = System::get_environment_variable(L"ProgramFiles(x86)");
+ static const fs::path PATH = []() -> fs::path {
+ auto value = System::get_environment_variable("ProgramFiles(x86)");
if (auto v = value.get())
{
return std::move(*v);
}
- return get_ProgramFiles();
+ return get_program_files();
}();
- return p;
+ return PATH;
}
- const fs::path& get_ProgramFiles_platform_bitness()
+ const fs::path& get_program_files_platform_bitness()
{
- static const fs::path p = []() -> fs::path {
- auto value = System::get_environment_variable(L"ProgramW6432");
+ static const fs::path PATH = []() -> fs::path {
+ auto value = System::get_environment_variable("ProgramW6432");
if (auto v = value.get())
{
return std::move(*v);
}
- return get_ProgramFiles();
+ return get_program_files();
}();
- return p;
+ return PATH;
}
}
diff --git a/toolsrc/src/BinaryParagraph.cpp b/toolsrc/src/vcpkg/binaryparagraph.cpp
index 1504912ab..3a493eb4c 100644
--- a/toolsrc/src/BinaryParagraph.cpp
+++ b/toolsrc/src/vcpkg/binaryparagraph.cpp
@@ -1,8 +1,8 @@
#include "pch.h"
-#include "BinaryParagraph.h"
-#include "vcpkg_Checks.h"
-#include "vcpkg_Parse.h"
+#include <vcpkg/base/checks.h>
+#include <vcpkg/binaryparagraph.h>
+#include <vcpkg/parse.h>
namespace vcpkg
{
@@ -80,10 +80,10 @@ namespace vcpkg
BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet)
{
this->spec = PackageSpec::from_name_and_triplet(spgh.name, triplet).value_or_exit(VCPKG_LINE_INFO);
- this->version = Strings::EMPTY;
+ this->version = "";
this->feature = fpgh.name;
this->description = fpgh.description;
- this->maintainer = Strings::EMPTY;
+ this->maintainer = "";
this->depends = filter_dependencies(fpgh.depends, triplet);
}
diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg/build.cpp
index a2fa99ac8..cf16c8f9c 100644
--- a/toolsrc/src/vcpkg_Build.cpp
+++ b/toolsrc/src/vcpkg/build.cpp
@@ -1,20 +1,150 @@
#include "pch.h"
-#include "Paragraphs.h"
-#include "PostBuildLint.h"
-#include "metrics.h"
-#include "vcpkg_Build.h"
-#include "vcpkg_Checks.h"
-#include "vcpkg_Chrono.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_Enums.h"
-#include "vcpkg_GlobalState.h"
-#include "vcpkg_System.h"
-#include "vcpkg_optional.h"
-#include "vcpkglib.h"
+#include <vcpkg/base/checks.h>
+#include <vcpkg/base/chrono.h>
+#include <vcpkg/base/enums.h>
+#include <vcpkg/base/optional.h>
+#include <vcpkg/base/system.h>
+#include <vcpkg/build.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/dependencies.h>
+#include <vcpkg/globalstate.h>
+#include <vcpkg/help.h>
+#include <vcpkg/input.h>
+#include <vcpkg/metrics.h>
+#include <vcpkg/paragraphs.h>
+#include <vcpkg/postbuildlint.h>
+#include <vcpkg/statusparagraphs.h>
+#include <vcpkg/vcpkglib.h>
+
+using vcpkg::Build::BuildResult;
+using vcpkg::Parse::ParseControlErrorInfo;
+using vcpkg::Parse::ParseExpected;
+
+namespace vcpkg::Build::Command
+{
+ using Dependencies::InstallPlanAction;
+ using Dependencies::InstallPlanType;
+
+ static const std::string OPTION_CHECKS_ONLY = "--checks-only";
+
+ void perform_and_exit(const FullPackageSpec& full_spec,
+ const fs::path& port_dir,
+ const std::unordered_set<std::string>& options,
+ const VcpkgPaths& paths)
+ {
+ const PackageSpec& spec = full_spec.package_spec;
+ if (options.find(OPTION_CHECKS_ONLY) != options.end())
+ {
+ const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, spec.triplet());
+ const auto build_info = Build::read_build_info(paths.get_filesystem(), paths.build_info_file_path(spec));
+ const size_t error_count = PostBuildLint::perform_all_checks(spec, paths, pre_build_info, build_info);
+ Checks::check_exit(VCPKG_LINE_INFO, error_count == 0);
+ Checks::exit_success(VCPKG_LINE_INFO);
+ }
+
+ const ParseExpected<SourceControlFile> source_control_file =
+ Paragraphs::try_load_port(paths.get_filesystem(), port_dir);
+
+ if (!source_control_file.has_value())
+ {
+ print_error_message(source_control_file.error());
+ Checks::exit_fail(VCPKG_LINE_INFO);
+ }
+
+ for (const std::string& str : full_spec.features)
+ {
+ System::println("%s \n", str);
+ }
+ const auto& scf = source_control_file.value_or_exit(VCPKG_LINE_INFO);
+ Checks::check_exit(VCPKG_LINE_INFO,
+ spec.name() == scf->core_paragraph->name,
+ "The Name: field inside the CONTROL does not match the port directory: '%s' != '%s'",
+ scf->core_paragraph->name,
+ spec.name());
+
+ const StatusParagraphs status_db = database_load_check(paths);
+ const Build::BuildPackageOptions build_package_options{Build::UseHeadVersion::NO, Build::AllowDownloads::YES};
+
+ const Build::BuildPackageConfig build_config{
+ *scf->core_paragraph, spec.triplet(), paths.port_dir(spec), build_package_options};
+
+ const auto build_timer = Chrono::ElapsedTime::create_started();
+ const auto result = Build::build_package(paths, build_config, status_db);
+ System::println("Elapsed time for package %s: %s", spec.to_string(), build_timer.to_string());
+
+ if (result.code == BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES)
+ {
+ System::println(System::Color::error,
+ "The build command requires all dependencies to be already installed.");
+ System::println("The following dependencies are missing:");
+ System::println();
+ for (const auto& p : result.unmet_dependencies)
+ {
+ System::println(" %s", p);
+ }
+ System::println();
+ Checks::exit_fail(VCPKG_LINE_INFO);
+ }
+
+ if (result.code != BuildResult::SUCCEEDED)
+ {
+ System::println(System::Color::error, Build::create_error_message(result.code, spec));
+ System::println(Build::create_user_troubleshooting_message(spec));
+ Checks::exit_fail(VCPKG_LINE_INFO);
+ }
+
+ Checks::exit_success(VCPKG_LINE_INFO);
+ }
+
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet)
+ {
+ static const std::string EXAMPLE = Help::create_example_string("build zlib:x64-windows");
+ // Build only takes a single package and all dependencies must already be installed
+ args.check_exact_arg_count(1, EXAMPLE);
+ const std::string command_argument = args.command_arguments.at(0);
+ const FullPackageSpec spec = Input::check_and_get_full_package_spec(command_argument, default_triplet, EXAMPLE);
+ Input::check_triplet(spec.package_spec.triplet(), paths);
+ const std::unordered_set<std::string> options =
+ args.check_and_get_optional_command_arguments({OPTION_CHECKS_ONLY});
+ perform_and_exit(spec, paths.port_dir(spec.package_spec), options, paths);
+ }
+}
namespace vcpkg::Build
{
+ static const std::string NAME_EMPTY_PACKAGE = "PolicyEmptyPackage";
+ static const std::string NAME_DLLS_WITHOUT_LIBS = "PolicyDLLsWithoutLIBs";
+ static const std::string NAME_ONLY_RELEASE_CRT = "PolicyOnlyReleaseCRT";
+ static const std::string NAME_EMPTY_INCLUDE_FOLDER = "PolicyEmptyIncludeFolder";
+ static const std::string NAME_ALLOW_OBSOLETE_MSVCRT = "PolicyAllowObsoleteMsvcrt";
+
+ const std::string& to_string(BuildPolicy policy)
+ {
+ switch (policy)
+ {
+ case BuildPolicy::EMPTY_PACKAGE: return NAME_EMPTY_PACKAGE;
+ case BuildPolicy::DLLS_WITHOUT_LIBS: return NAME_DLLS_WITHOUT_LIBS;
+ case BuildPolicy::ONLY_RELEASE_CRT: return NAME_ONLY_RELEASE_CRT;
+ case BuildPolicy::EMPTY_INCLUDE_FOLDER: return NAME_EMPTY_INCLUDE_FOLDER;
+ case BuildPolicy::ALLOW_OBSOLETE_MSVCRT: return NAME_ALLOW_OBSOLETE_MSVCRT;
+ default: Checks::unreachable(VCPKG_LINE_INFO);
+ }
+ }
+
+ CStringView to_cmake_variable(BuildPolicy policy)
+ {
+ switch (policy)
+ {
+ case BuildPolicy::EMPTY_PACKAGE: return "VCPKG_POLICY_EMPTY_PACKAGE";
+ case BuildPolicy::DLLS_WITHOUT_LIBS: return "VCPKG_POLICY_DLLS_WITHOUT_LIBS";
+ case BuildPolicy::ONLY_RELEASE_CRT: return "VCPKG_POLICY_ONLY_RELEASE_CRT";
+ case BuildPolicy::EMPTY_INCLUDE_FOLDER: return "VCPKG_POLICY_EMPTY_INCLUDE_FOLDER";
+ case BuildPolicy::ALLOW_OBSOLETE_MSVCRT: return "VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT";
+ default: Checks::unreachable(VCPKG_LINE_INFO);
+ }
+ }
+
Optional<LinkageType> to_linkage_type(const std::string& str)
{
if (str == "dynamic") return LinkageType::DYNAMIC;
@@ -28,16 +158,16 @@ namespace vcpkg::Build
static const std::string LIBRARY_LINKAGE = "LibraryLinkage";
}
- CWStringView to_vcvarsall_target(const std::string& cmake_system_name)
+ CStringView to_vcvarsall_target(const std::string& cmake_system_name)
{
- if (cmake_system_name == Strings::EMPTY) return Strings::WEMPTY;
- if (cmake_system_name == "Windows") return Strings::WEMPTY;
- if (cmake_system_name == "WindowsStore") return L"store";
+ if (cmake_system_name.empty()) return "";
+ if (cmake_system_name == "Windows") return "";
+ if (cmake_system_name == "WindowsStore") return "store";
Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported vcvarsall target %s", cmake_system_name);
}
- CWStringView to_vcvarsall_toolchain(const std::string& target_architecture, const Toolset& toolset)
+ CStringView to_vcvarsall_toolchain(const std::string& target_architecture, const Toolset& toolset)
{
auto maybe_target_arch = System::to_cpu_architecture(target_architecture);
Checks::check_exit(
@@ -56,18 +186,23 @@ namespace vcpkg::Build
Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported toolchain combination %s", target_architecture);
}
- std::wstring make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset)
+ std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset)
{
- const wchar_t* tonull = L" >nul";
+ const char* tonull = " >nul";
if (GlobalState::debugging)
{
- tonull = Strings::WEMPTY;
+ tonull = "";
}
const auto arch = to_vcvarsall_toolchain(pre_build_info.target_architecture, toolset);
const auto target = to_vcvarsall_target(pre_build_info.cmake_system_name);
- return Strings::wformat(LR"("%s" %s %s %s 2>&1)", toolset.vcvarsall.native(), arch, target, tonull);
+ return Strings::format(R"("%s" %s %s %s %s 2>&1)",
+ toolset.vcvarsall.u8string(),
+ Strings::join(" ", toolset.vcvarsall_options),
+ arch,
+ target,
+ tonull);
}
static void create_binary_feature_control_file(const SourceParagraph& source_paragraph,
@@ -133,8 +268,6 @@ namespace vcpkg::Build
const fs::path ports_cmake_script_path = paths.ports_cmake;
const auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet);
- const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset);
- const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset);
std::string features;
if (GlobalState::feature_packages)
@@ -152,24 +285,28 @@ namespace vcpkg::Build
}
}
- const std::wstring cmd_launch_cmake = make_cmake_cmd(
+ const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path);
+
+ const std::string cmd_launch_cmake = make_cmake_cmd(
cmake_exe_path,
ports_cmake_script_path,
{
- {L"CMD", L"BUILD"},
- {L"PORT", config.src.name},
- {L"CURRENT_PORT_DIR", config.port_dir / "/."},
- {L"TARGET_TRIPLET", triplet.canonical_name()},
- {L"VCPKG_PLATFORM_TOOLSET", toolset.version},
- {L"VCPKG_USE_HEAD_VERSION", to_bool(config.build_package_options.use_head_version) ? L"1" : L"0"},
- {L"_VCPKG_NO_DOWNLOADS", !to_bool(config.build_package_options.allow_downloads) ? L"1" : L"0"},
- {L"GIT", git_exe_path},
- {L"FEATURES", features},
+ {"CMD", "BUILD"},
+ {"PORT", config.src.name},
+ {"CURRENT_PORT_DIR", config.port_dir / "/."},
+ {"TARGET_TRIPLET", triplet.canonical_name()},
+ {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()},
+ {"VCPKG_USE_HEAD_VERSION", to_bool(config.build_package_options.use_head_version) ? "1" : "0"},
+ {"_VCPKG_NO_DOWNLOADS", !to_bool(config.build_package_options.allow_downloads) ? "1" : "0"},
+ {"GIT", git_exe_path},
+ {"FEATURES", features},
});
- const std::wstring command = Strings::wformat(LR"(%s && %s)", cmd_set_environment, cmd_launch_cmake);
+ std::string command;
+ const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset);
+ command = Strings::format(R"(%s && %s)", cmd_set_environment, cmd_launch_cmake);
- const ElapsedTime timer = ElapsedTime::create_started();
+ const auto timer = Chrono::ElapsedTime::create_started();
const int return_code = System::cmd_execute_clean(command);
const auto buildtimeus = timer.microseconds();
@@ -289,7 +426,7 @@ namespace vcpkg::Build
if (!version.empty()) build_info.version = std::move(version);
std::map<BuildPolicy, bool> policies;
- for (auto policy : g_all_policies)
+ for (auto policy : G_ALL_POLICIES)
{
const auto setting = parser.optional_field(to_string(policy));
if (setting.empty()) continue;
@@ -329,14 +466,12 @@ namespace vcpkg::Build
const fs::path ports_cmake_script_path = paths.scripts / "get_triplet_environment.cmake";
const fs::path triplet_file_path = paths.triplets / (triplet.canonical_name() + ".cmake");
- const std::wstring cmd_launch_cmake = make_cmake_cmd(cmake_exe_path,
- ports_cmake_script_path,
- {
- {L"CMAKE_TRIPLET_FILE", triplet_file_path},
- });
-
- const std::wstring command = Strings::wformat(LR"(%s)", cmd_launch_cmake);
- const auto ec_data = System::cmd_execute_and_capture_output(command);
+ const auto cmd_launch_cmake = make_cmake_cmd(cmake_exe_path,
+ ports_cmake_script_path,
+ {
+ {"CMAKE_TRIPLET_FILE", triplet_file_path},
+ });
+ const auto ec_data = System::cmd_execute_and_capture_output(cmd_launch_cmake);
Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0);
const std::vector<std::string> lines = Strings::split(ec_data.output, "\n");
@@ -359,7 +494,7 @@ namespace vcpkg::Build
const bool variable_with_no_value = s.size() == 1;
const std::string variable_name = s.at(0);
- const std::string variable_value = variable_with_no_value ? Strings::EMPTY : s.at(1);
+ const std::string variable_value = variable_with_no_value ? "" : s.at(1);
if (variable_name == "VCPKG_TARGET_ARCHITECTURE")
{
@@ -381,7 +516,15 @@ namespace vcpkg::Build
if (variable_name == "VCPKG_PLATFORM_TOOLSET")
{
- pre_build_info.platform_toolset = variable_value;
+ pre_build_info.platform_toolset =
+ variable_value.empty() ? nullopt : Optional<std::string>{variable_value};
+ continue;
+ }
+
+ if (variable_name == "VCPKG_VISUAL_STUDIO_PATH")
+ {
+ pre_build_info.visual_studio_path =
+ variable_value.empty() ? nullopt : Optional<fs::path>{variable_value};
continue;
}
diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp
new file mode 100644
index 000000000..addb9edaf
--- /dev/null
+++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp
@@ -0,0 +1,141 @@
+#include "pch.h"
+
+#include <vcpkg/base/system.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/install.h>
+#include <vcpkg/metrics.h>
+#include <vcpkg/paragraphs.h>
+#include <vcpkg/remove.h>
+#include <vcpkg/vcpkglib.h>
+
+namespace vcpkg::Commands::Autocomplete
+{
+ [[noreturn]] static void output_sorted_results_and_exit(const LineInfo& line_info,
+ std::vector<std::string>&& results)
+ {
+ const SortedVector<std::string> sorted_results(results);
+ System::println(Strings::join("\n", sorted_results));
+
+ Checks::exit_success(line_info);
+ }
+
+ std::vector<std::string> combine_port_with_triplets(const std::string& port,
+ const std::vector<std::string>& triplets)
+ {
+ return Util::fmap(triplets,
+ [&](const std::string& triplet) { return Strings::format("%s:%s", port, triplet); });
+ }
+
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
+ {
+ Metrics::g_metrics.lock()->set_send_metrics(false);
+ const std::string to_autocomplete = Strings::join(" ", args.command_arguments);
+ const std::vector<std::string> tokens = Strings::split(to_autocomplete, " ");
+
+ std::smatch match;
+
+ // Handles vcpkg <command>
+ if (std::regex_match(to_autocomplete, match, std::regex{R"###(^(\S*)$)###"}))
+ {
+ const std::string requested_command = match[1].str();
+
+ std::vector<std::string> valid_commands = {
+ "install",
+ "search",
+ "remove",
+ "list",
+ "update",
+ "hash",
+ "help",
+ "integrate",
+ "export",
+ "edit",
+ "create",
+ "owns",
+ "cache",
+ "version",
+ "contact",
+ };
+
+ Util::unstable_keep_if(valid_commands, [&](const std::string& s) {
+ return Strings::case_insensitive_ascii_starts_with(s, requested_command);
+ });
+
+ output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(valid_commands));
+ }
+
+ // Handles vcpkg install package:<triplet>
+ if (std::regex_match(to_autocomplete, match, std::regex{R"###(^install(.*|)\s([^:]+):(\S*)$)###"}))
+ {
+ const auto port_name = match[2].str();
+ const auto triplet_prefix = match[3].str();
+
+ auto maybe_port = Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(port_name));
+ if (maybe_port.error())
+ {
+ Checks::exit_success(VCPKG_LINE_INFO);
+ }
+
+ std::vector<std::string> triplets = paths.get_available_triplets();
+ Util::unstable_keep_if(triplets, [&](const std::string& s) {
+ return Strings::case_insensitive_ascii_starts_with(s, triplet_prefix);
+ });
+
+ auto result = combine_port_with_triplets(port_name, triplets);
+
+ output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(result));
+ }
+
+ struct CommandEntry
+ {
+ constexpr CommandEntry(const CStringView& name, const CStringView& regex, const CommandStructure& structure)
+ : name(name), regex(regex), structure(structure)
+ {
+ }
+
+ CStringView name;
+ CStringView regex;
+ const CommandStructure& structure;
+ };
+
+ static constexpr CommandEntry COMMANDS[] = {
+ CommandEntry{"install", R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE},
+ CommandEntry{"install", R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE},
+ CommandEntry{"edit", R"###(^edit\s(.*\s|)(\S*)$)###", Edit::COMMAND_STRUCTURE},
+ CommandEntry{"remove", R"###(^remove\s(.*\s|)(\S*)$)###", Remove::COMMAND_STRUCTURE},
+ };
+
+ for (auto&& command : COMMANDS)
+ {
+ if (std::regex_match(to_autocomplete, match, std::regex{command.regex.c_str()}))
+ {
+ const auto prefix = match[2].str();
+ std::vector<std::string> results;
+
+ if (Strings::case_insensitive_ascii_starts_with(prefix, "-"))
+ {
+ results = Util::fmap(command.structure.switches, [](auto&& s) -> std::string { return s; });
+ }
+ else
+ {
+ results = command.structure.valid_arguments(paths);
+ }
+
+ Util::unstable_keep_if(results, [&](const std::string& s) {
+ return Strings::case_insensitive_ascii_starts_with(s, prefix);
+ });
+
+ if (command.name == "install" && results.size() == 1)
+ {
+ const auto port_at_each_triplet =
+ combine_port_with_triplets(results[0], paths.get_available_triplets());
+ Util::Vectors::concatenate(&results, port_at_each_triplet);
+ }
+
+ output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(results));
+ }
+ }
+
+ Checks::exit_success(VCPKG_LINE_INFO);
+ }
+}
diff --git a/toolsrc/src/commands_build_external.cpp b/toolsrc/src/vcpkg/commands.buildexternal.cpp
index ff70e9cf2..3991beb62 100644
--- a/toolsrc/src/commands_build_external.cpp
+++ b/toolsrc/src/vcpkg/commands.buildexternal.cpp
@@ -1,22 +1,23 @@
#include "pch.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_Input.h"
-#include "vcpkg_System.h"
+#include <vcpkg/build.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/help.h>
+#include <vcpkg/input.h>
namespace vcpkg::Commands::BuildExternal
{
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet)
{
- static const std::string example =
- Commands::Help::create_example_string(R"(build_external zlib2 C:\path\to\dir\with\controlfile\)");
- args.check_exact_arg_count(2, example);
+ static const std::string EXAMPLE =
+ Help::create_example_string(R"(build_external zlib2 C:\path\to\dir\with\controlfile\)");
+ args.check_exact_arg_count(2, EXAMPLE);
const FullPackageSpec spec =
- Input::check_and_get_full_package_spec(args.command_arguments.at(0), default_triplet, example);
+ Input::check_and_get_full_package_spec(args.command_arguments.at(0), default_triplet, EXAMPLE);
Input::check_triplet(spec.package_spec.triplet(), paths);
const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments({});
const fs::path port_dir = args.command_arguments.at(1);
- BuildCommand::perform_and_exit(spec, port_dir, options, paths);
+ Build::Command::perform_and_exit(spec, port_dir, options, paths);
}
}
diff --git a/toolsrc/src/commands_cache.cpp b/toolsrc/src/vcpkg/commands.cache.cpp
index fa0c62ee4..77f0a20f6 100644
--- a/toolsrc/src/commands_cache.cpp
+++ b/toolsrc/src/vcpkg/commands.cache.cpp
@@ -1,10 +1,11 @@
#include "pch.h"
-#include "BinaryParagraph.h"
-#include "Paragraphs.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_Files.h"
-#include "vcpkg_System.h"
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/system.h>
+#include <vcpkg/binaryparagraph.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/help.h>
+#include <vcpkg/paragraphs.h>
namespace vcpkg::Commands::Cache
{
@@ -27,10 +28,10 @@ namespace vcpkg::Commands::Cache
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
{
- static const std::string example = Strings::format(
+ static const std::string EXAMPLE = Strings::format(
"The argument should be a substring to search for, or no argument to display all cached libraries.\n%s",
- Commands::Help::create_example_string("cache png"));
- args.check_max_arg_count(1, example);
+ Help::create_example_string("cache png"));
+ args.check_max_arg_count(1, EXAMPLE);
args.check_and_get_optional_command_arguments({});
const std::vector<BinaryParagraph> binary_paragraphs = read_all_binary_paragraphs(paths);
diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp
new file mode 100644
index 000000000..1c98d1d83
--- /dev/null
+++ b/toolsrc/src/vcpkg/commands.ci.cpp
@@ -0,0 +1,62 @@
+#include "pch.h"
+
+#include <vcpkg/base/chrono.h>
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/system.h>
+#include <vcpkg/base/util.h>
+#include <vcpkg/build.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/dependencies.h>
+#include <vcpkg/help.h>
+#include <vcpkg/input.h>
+#include <vcpkg/install.h>
+#include <vcpkg/paragraphs.h>
+#include <vcpkg/vcpkglib.h>
+
+namespace vcpkg::Commands::CI
+{
+ using Build::BuildResult;
+ using Dependencies::InstallPlanAction;
+ using Dependencies::InstallPlanType;
+
+ static std::vector<PackageSpec> load_all_package_specs(Files::Filesystem& fs,
+ const fs::path& ports_directory,
+ const Triplet& triplet)
+ {
+ auto ports = Paragraphs::load_all_ports(fs, ports_directory);
+ return Util::fmap(ports, [&](auto&& control_file) -> PackageSpec {
+ return PackageSpec::from_name_and_triplet(control_file->core_paragraph->name, triplet)
+ .value_or_exit(VCPKG_LINE_INFO);
+ });
+ }
+
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet)
+ {
+ static const std::string EXAMPLE = Help::create_example_string("ci x64-windows");
+ args.check_max_arg_count(1, EXAMPLE);
+ const Triplet triplet = args.command_arguments.size() == 1
+ ? Triplet::from_canonical_name(args.command_arguments.at(0))
+ : default_triplet;
+ Input::check_triplet(triplet, paths);
+ args.check_and_get_optional_command_arguments({});
+ const std::vector<PackageSpec> specs = load_all_package_specs(paths.get_filesystem(), paths.ports, triplet);
+
+ StatusParagraphs status_db = database_load_check(paths);
+ const auto& paths_port_file = Dependencies::PathsPortFile(paths);
+ std::vector<InstallPlanAction> install_plan =
+ Dependencies::create_install_plan(paths_port_file, specs, status_db);
+ Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty");
+
+ const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, Build::AllowDownloads::YES};
+
+ const std::vector<Dependencies::AnyAction> action_plan =
+ Util::fmap(install_plan, [](InstallPlanAction& install_action) {
+ return Dependencies::AnyAction(std::move(install_action));
+ });
+
+ Install::perform_and_exit_ex(
+ action_plan, install_plan_options, Install::KeepGoing::YES, Install::PrintSummary::YES, paths, status_db);
+
+ Checks::exit_success(VCPKG_LINE_INFO);
+ }
+}
diff --git a/toolsrc/src/commands_contact.cpp b/toolsrc/src/vcpkg/commands.contact.cpp
index 7f4161802..421b8a230 100644
--- a/toolsrc/src/commands_contact.cpp
+++ b/toolsrc/src/vcpkg/commands.contact.cpp
@@ -1,14 +1,14 @@
#include "pch.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_System.h"
+#include <vcpkg/base/system.h>
+#include <vcpkg/commands.h>
namespace vcpkg::Commands::Contact
{
const std::string& email()
{
- static const std::string s_email = R"(vcpkg@microsoft.com)";
- return s_email;
+ static const std::string S_EMAIL = R"(vcpkg@microsoft.com)";
+ return S_EMAIL;
}
void perform_and_exit(const VcpkgCmdArguments& args)
diff --git a/toolsrc/src/commands_available_commands.cpp b/toolsrc/src/vcpkg/commands.cpp
index 87cc43dca..9d969ea28 100644
--- a/toolsrc/src/commands_available_commands.cpp
+++ b/toolsrc/src/vcpkg/commands.cpp
@@ -1,16 +1,22 @@
#include "pch.h"
-#include "vcpkg_Commands.h"
+#include <vcpkg/build.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/export.h>
+#include <vcpkg/help.h>
+#include <vcpkg/install.h>
+#include <vcpkg/remove.h>
+#include <vcpkg/update.h>
namespace vcpkg::Commands
{
- const std::vector<PackageNameAndFunction<CommandTypeA>>& get_available_commands_type_a()
+ Span<const PackageNameAndFunction<CommandTypeA>> get_available_commands_type_a()
{
static std::vector<PackageNameAndFunction<CommandTypeA>> t = {
{"install", &Install::perform_and_exit},
{"ci", &CI::perform_and_exit},
{"remove", &Remove::perform_and_exit},
- {"build", &BuildCommand::perform_and_exit},
+ {"build", &Build::Command::perform_and_exit},
{"env", &Env::perform_and_exit},
{"build-external", &BuildExternal::perform_and_exit},
{"export", &Export::perform_and_exit},
@@ -18,7 +24,7 @@ namespace vcpkg::Commands
return t;
}
- const std::vector<PackageNameAndFunction<CommandTypeB>>& get_available_commands_type_b()
+ Span<const PackageNameAndFunction<CommandTypeB>> get_available_commands_type_b()
{
static std::vector<PackageNameAndFunction<CommandTypeB>> t = {
{"/?", &Help::perform_and_exit},
@@ -34,11 +40,11 @@ namespace vcpkg::Commands
{"import", &Import::perform_and_exit},
{"cache", &Cache::perform_and_exit},
{"portsdiff", &PortsDiff::perform_and_exit},
- };
+ {"autocomplete", &Autocomplete::perform_and_exit}};
return t;
}
- const std::vector<PackageNameAndFunction<CommandTypeC>>& get_available_commands_type_c()
+ Span<const PackageNameAndFunction<CommandTypeC>> get_available_commands_type_c()
{
static std::vector<PackageNameAndFunction<CommandTypeC>> t = {
{"version", &Version::perform_and_exit},
diff --git a/toolsrc/src/commands_create.cpp b/toolsrc/src/vcpkg/commands.create.cpp
index 7f85b776a..85763f25e 100644
--- a/toolsrc/src/commands_create.cpp
+++ b/toolsrc/src/vcpkg/commands.create.cpp
@@ -1,26 +1,26 @@
#include "pch.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_Files.h"
-#include "vcpkg_Input.h"
-#include "vcpkg_System.h"
-#include "vcpkglib.h"
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/system.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/help.h>
+#include <vcpkg/vcpkglib.h>
namespace vcpkg::Commands::Create
{
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
{
- static const std::string example = Commands::Help::create_example_string(
+ static const std::string EXAMPLE = Help::create_example_string(
R"###(create zlib2 http://zlib.net/zlib1211.zip "zlib1211-2.zip")###");
- args.check_max_arg_count(3, example);
- args.check_min_arg_count(2, example);
+ args.check_max_arg_count(3, EXAMPLE);
+ args.check_min_arg_count(2, EXAMPLE);
args.check_and_get_optional_command_arguments({});
const std::string port_name = args.command_arguments.at(0);
const std::string url = args.command_arguments.at(1);
const fs::path& cmake_exe = paths.get_cmake_exe();
- std::vector<CMakeVariable> cmake_args{{L"CMD", L"CREATE"}, {L"PORT", port_name}, {L"URL", url}};
+ std::vector<CMakeVariable> cmake_args{{"CMD", "CREATE"}, {"PORT", port_name}, {"URL", url}};
if (args.command_arguments.size() >= 3)
{
@@ -30,10 +30,10 @@ namespace vcpkg::Commands::Create
R"(Filename cannot contain invalid chars %s, but was %s)",
Files::FILESYSTEM_INVALID_CHARACTERS,
zip_file_name);
- cmake_args.push_back({L"FILENAME", zip_file_name});
+ cmake_args.push_back({"FILENAME", zip_file_name});
}
- const std::wstring cmd_launch_cmake = make_cmake_cmd(cmake_exe, paths.ports_cmake, cmake_args);
+ const std::string cmd_launch_cmake = make_cmake_cmd(cmake_exe, paths.ports_cmake, cmake_args);
Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute_clean(cmd_launch_cmake));
}
}
diff --git a/toolsrc/src/commands_depends.cpp b/toolsrc/src/vcpkg/commands.dependinfo.cpp
index ffad91226..89c7e0c7f 100644
--- a/toolsrc/src/commands_depends.cpp
+++ b/toolsrc/src/vcpkg/commands.dependinfo.cpp
@@ -1,17 +1,18 @@
#include "pch.h"
-#include "Paragraphs.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_Strings.h"
-#include "vcpkg_System.h"
-#include "vcpkg_Util.h"
+#include <vcpkg/base/strings.h>
+#include <vcpkg/base/system.h>
+#include <vcpkg/base/util.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/help.h>
+#include <vcpkg/paragraphs.h>
namespace vcpkg::Commands::DependInfo
{
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
{
- static const std::string example = Commands::Help::create_example_string(R"###(depend-info [pat])###");
- args.check_max_arg_count(1, example);
+ static const std::string EXAMPLE = Help::create_example_string(R"###(depend-info [pat])###");
+ args.check_max_arg_count(1, EXAMPLE);
args.check_and_get_optional_command_arguments({});
std::vector<std::unique_ptr<SourceControlFile>> source_control_files =
diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp
index f71d4d44c..668ec9b1a 100644
--- a/toolsrc/src/commands_edit.cpp
+++ b/toolsrc/src/vcpkg/commands.edit.cpp
@@ -1,42 +1,69 @@
#include "pch.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_Input.h"
-#include "vcpkg_System.h"
+#include <vcpkg/base/system.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/help.h>
+#include <vcpkg/paragraphs.h>
namespace vcpkg::Commands::Edit
{
static std::vector<fs::path> find_from_registry()
{
- static const std::array<const wchar_t*, 4> REGKEYS = {
- LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)",
- LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)",
- LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)",
- LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)",
+ static const std::array<const char*, 3> REGKEYS = {
+ R"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)",
+ R"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1287CAD5-7C8D-410D-88B9-0D1EE4A83FF2}_is1)",
+ R"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)",
};
std::vector<fs::path> output;
+#if defined(_WIN32)
for (auto&& keypath : REGKEYS)
{
- const Optional<std::wstring> code_installpath =
- System::get_registry_string(HKEY_LOCAL_MACHINE, keypath, L"InstallLocation");
+ const Optional<std::string> code_installpath =
+ System::get_registry_string(HKEY_LOCAL_MACHINE, keypath, "InstallLocation");
if (const auto c = code_installpath.get())
{
const fs::path install_path = fs::path(*c);
- output.push_back(install_path / "Code.exe");
output.push_back(install_path / "Code - Insiders.exe");
+ output.push_back(install_path / "Code.exe");
}
}
+#endif
return output;
}
+ static const std::string OPTION_BUILDTREES = "--buildtrees";
+
+ static const std::array<std::string, 1> SWITCHES = {
+ OPTION_BUILDTREES,
+ };
+ static const std::array<std::string, 0> SETTINGS;
+
+ static std::vector<std::string> valid_arguments(const VcpkgPaths& paths)
+ {
+ auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports);
+
+ return Util::fmap(sources_and_errors.paragraphs,
+ [](auto&& pgh) -> std::string { return pgh->core_paragraph->name; });
+ }
+
+ const CommandStructure COMMAND_STRUCTURE = {
+ "edit zlib",
+ 1,
+ 1,
+ SWITCHES,
+ SETTINGS,
+ &valid_arguments,
+ };
+
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
{
- static const std::string OPTION_BUILDTREES = "--buildtrees";
+ static const fs::path VS_CODE_INSIDERS = fs::path{"Microsoft VS Code Insiders"} / "Code - Insiders.exe";
+ static const fs::path VS_CODE = fs::path{"Microsoft VS Code"} / "Code.exe";
auto& fs = paths.get_filesystem();
- static const std::string EXAMPLE = Commands::Help::create_example_string("edit zlib");
+ static const std::string EXAMPLE = Help::create_example_string("edit zlib");
args.check_exact_arg_count(1, EXAMPLE);
const std::unordered_set<std::string> options =
args.check_and_get_optional_command_arguments({OPTION_BUILDTREES});
@@ -46,10 +73,12 @@ namespace vcpkg::Commands::Edit
Checks::check_exit(VCPKG_LINE_INFO, fs.is_directory(portpath), R"(Could not find port named "%s")", port_name);
std::vector<fs::path> candidate_paths;
- const std::vector<fs::path> from_path = Files::find_from_PATH(L"EDITOR");
+ const std::vector<fs::path> from_path = Files::find_from_PATH("EDITOR");
candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend());
- candidate_paths.push_back(System::get_ProgramFiles_platform_bitness() / "Microsoft VS Code" / "Code.exe");
- candidate_paths.push_back(System::get_ProgramFiles_32_bit() / "Microsoft VS Code" / "Code.exe");
+ candidate_paths.push_back(System::get_program_files_platform_bitness() / VS_CODE_INSIDERS);
+ candidate_paths.push_back(System::get_program_files_32_bit() / VS_CODE_INSIDERS);
+ candidate_paths.push_back(System::get_program_files_platform_bitness() / VS_CODE);
+ candidate_paths.push_back(System::get_program_files_32_bit() / VS_CODE);
const std::vector<fs::path> from_registry = find_from_registry();
candidate_paths.insert(candidate_paths.end(), from_registry.cbegin(), from_registry.cend());
@@ -70,13 +99,16 @@ namespace vcpkg::Commands::Edit
{
const auto buildtrees_current_dir = paths.buildtrees / port_name;
- const std::wstring cmd_line =
- Strings::wformat(LR"("%s" "%s" -n)", env_editor, buildtrees_current_dir.native());
+ const auto cmd_line =
+ Strings::format(R"("%s" "%s" -n)", env_editor.u8string(), buildtrees_current_dir.u8string());
Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line));
}
- const std::wstring cmd_line = Strings::wformat(
- LR"("%s" "%s" "%s" -n)", env_editor, portpath.native(), (portpath / "portfile.cmake").native());
+ const auto cmd_line = Strings::format(
+ R"("%s" "%s" "%s" -n)",
+ env_editor.u8string(),
+ portpath.u8string(),
+ (portpath / "portfile.cmake").u8string());
Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line));
}
}
diff --git a/toolsrc/src/commands_env.cpp b/toolsrc/src/vcpkg/commands.env.cpp
index 073c501f5..9f8ae5207 100644
--- a/toolsrc/src/commands_env.cpp
+++ b/toolsrc/src/vcpkg/commands.env.cpp
@@ -1,20 +1,21 @@
#include "pch.h"
-#include "vcpkg_Build.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_System.h"
+#include <vcpkg/base/system.h>
+#include <vcpkg/build.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/help.h>
namespace vcpkg::Commands::Env
{
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet)
{
- static const std::string EXAMPLE = Commands::Help::create_example_string(R"(env --Triplet x64-windows)");
+ static const std::string EXAMPLE = Help::create_example_string(R"(env --triplet x64-windows)");
args.check_exact_arg_count(0, EXAMPLE);
args.check_and_get_optional_command_arguments({});
const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, default_triplet);
- System::cmd_execute_clean(
- Build::make_build_env_cmd(pre_build_info, paths.get_toolset(pre_build_info.platform_toolset)) + L" && cmd");
+ const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path);
+ System::cmd_execute_clean(Build::make_build_env_cmd(pre_build_info, toolset) + " && cmd");
Checks::exit_success(VCPKG_LINE_INFO);
}
diff --git a/toolsrc/src/vcpkg/commands.exportifw.cpp b/toolsrc/src/vcpkg/commands.exportifw.cpp
new file mode 100644
index 000000000..682267acb
--- /dev/null
+++ b/toolsrc/src/vcpkg/commands.exportifw.cpp
@@ -0,0 +1,490 @@
+#include "pch.h"
+
+#include <vcpkg/commands.h>
+#include <vcpkg/export.h>
+#include <vcpkg/export.ifw.h>
+#include <vcpkg/install.h>
+
+namespace vcpkg::Export::IFW
+{
+ using Dependencies::ExportPlanAction;
+ using Dependencies::ExportPlanType;
+ using Install::InstallDir;
+
+ static std::string create_release_date()
+ {
+ const tm date_time = System::get_current_date_time();
+
+ // Format is: YYYY-mm-dd
+ // 10 characters + 1 null terminating character will be written for a total of 11 chars
+ char mbstr[11];
+ const size_t bytes_written = std::strftime(mbstr, sizeof(mbstr), "%Y-%m-%d", &date_time);
+ Checks::check_exit(VCPKG_LINE_INFO,
+ bytes_written == 10,
+ "Expected 10 bytes to be written, but %u were written",
+ bytes_written);
+ const std::string date_time_as_string(mbstr);
+ return date_time_as_string;
+ }
+
+ std::string safe_rich_from_plain_text(const std::string& text)
+ {
+ // match standalone ampersand, no HTML number or name
+ std::regex standalone_ampersand(R"###(&(?!(#[0-9]+|\w+);))###");
+
+ return std::regex_replace(text, standalone_ampersand, "&amp;");
+ }
+
+ fs::path get_packages_dir_path(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths)
+ {
+ return ifw_options.maybe_packages_dir_path.has_value()
+ ? fs::path(ifw_options.maybe_packages_dir_path.value_or_exit(VCPKG_LINE_INFO))
+ : paths.root / (export_id + "-ifw-packages");
+ }
+
+ fs::path get_repository_dir_path(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths)
+ {
+ return ifw_options.maybe_repository_dir_path.has_value()
+ ? fs::path(ifw_options.maybe_repository_dir_path.value_or_exit(VCPKG_LINE_INFO))
+ : paths.root / (export_id + "-ifw-repository");
+ }
+
+ fs::path get_config_file_path(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths)
+ {
+ return ifw_options.maybe_config_file_path.has_value()
+ ? fs::path(ifw_options.maybe_config_file_path.value_or_exit(VCPKG_LINE_INFO))
+ : paths.root / (export_id + "-ifw-configuration.xml");
+ }
+
+ fs::path get_installer_file_path(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths)
+ {
+ return ifw_options.maybe_installer_file_path.has_value()
+ ? fs::path(ifw_options.maybe_installer_file_path.value_or_exit(VCPKG_LINE_INFO))
+ : paths.root / (export_id + "-ifw-installer.exe");
+ }
+
+ fs::path export_real_package(const fs::path& ifw_packages_dir_path,
+ const ExportPlanAction& action,
+ Files::Filesystem& fs)
+ {
+ std::error_code ec;
+
+ const BinaryParagraph& binary_paragraph =
+ action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph;
+
+ // Prepare meta dir
+ const fs::path package_xml_file_path =
+ ifw_packages_dir_path /
+ Strings::format("packages.%s.%s", action.spec.name(), action.spec.triplet().canonical_name()) / "meta" /
+ "package.xml";
+ const fs::path package_xml_dir_path = package_xml_file_path.parent_path();
+ fs.create_directories(package_xml_dir_path, ec);
+ Checks::check_exit(VCPKG_LINE_INFO,
+ !ec,
+ "Could not create directory for package file %s",
+ package_xml_file_path.generic_string());
+
+ auto deps = Strings::join(
+ ",", binary_paragraph.depends, [](const std::string& dep) { return "packages." + dep + ":"; });
+
+ if (!deps.empty()) deps = "\n <Dependencies>" + deps + "</Dependencies>";
+
+ fs.write_contents(package_xml_file_path,
+ Strings::format(
+ R"###(<?xml version="1.0"?>
+<Package>
+ <DisplayName>%s</DisplayName>
+ <Version>%s</Version>
+ <ReleaseDate>%s</ReleaseDate>
+ <AutoDependOn>packages.%s:,triplets.%s:</AutoDependOn>%s
+ <Virtual>true</Virtual>
+</Package>
+)###",
+ action.spec.to_string(),
+ binary_paragraph.version,
+ create_release_date(),
+ action.spec.name(),
+ action.spec.triplet().canonical_name(),
+ deps));
+
+ // Return dir path for export package data
+ return ifw_packages_dir_path /
+ Strings::format("packages.%s.%s", action.spec.name(), action.spec.triplet().canonical_name()) / "data" /
+ "installed";
+ }
+
+ void export_unique_packages(const fs::path& raw_exported_dir_path,
+ std::map<std::string, const ExportPlanAction*> unique_packages,
+ Files::Filesystem& fs)
+ {
+ std::error_code ec;
+
+ // packages
+
+ fs::path package_xml_file_path = raw_exported_dir_path / "packages" / "meta" / "package.xml";
+ fs::path package_xml_dir_path = package_xml_file_path.parent_path();
+ fs.create_directories(package_xml_dir_path, ec);
+ Checks::check_exit(VCPKG_LINE_INFO,
+ !ec,
+ "Could not create directory for package file %s",
+ package_xml_file_path.generic_string());
+ fs.write_contents(package_xml_file_path,
+ Strings::format(
+ R"###(<?xml version="1.0"?>
+<Package>
+ <DisplayName>Packages</DisplayName>
+ <Version>1.0.0</Version>
+ <ReleaseDate>%s</ReleaseDate>
+</Package>
+)###",
+ create_release_date()));
+
+ for (auto package = unique_packages.begin(); package != unique_packages.end(); ++package)
+ {
+ const ExportPlanAction& action = *(package->second);
+ const BinaryParagraph& binary_paragraph =
+ action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph;
+
+ package_xml_file_path =
+ raw_exported_dir_path / Strings::format("packages.%s", package->first) / "meta" / "package.xml";
+ package_xml_dir_path = package_xml_file_path.parent_path();
+ fs.create_directories(package_xml_dir_path, ec);
+ Checks::check_exit(VCPKG_LINE_INFO,
+ !ec,
+ "Could not create directory for package file %s",
+ package_xml_file_path.generic_string());
+
+ fs.write_contents(package_xml_file_path,
+ Strings::format(
+ R"###(<?xml version="1.0"?>
+<Package>
+ <DisplayName>%s</DisplayName>
+ <Description>%s</Description>
+ <Version>%s</Version>
+ <ReleaseDate>%s</ReleaseDate>
+</Package>
+)###",
+ action.spec.name(),
+ safe_rich_from_plain_text(binary_paragraph.description),
+ binary_paragraph.version,
+ create_release_date()));
+ }
+ }
+
+ void export_unique_triplets(const fs::path& raw_exported_dir_path,
+ std::set<std::string> unique_triplets,
+ Files::Filesystem& fs)
+ {
+ std::error_code ec;
+
+ // triplets
+
+ fs::path package_xml_file_path = raw_exported_dir_path / "triplets" / "meta" / "package.xml";
+ fs::path package_xml_dir_path = package_xml_file_path.parent_path();
+ fs.create_directories(package_xml_dir_path, ec);
+ Checks::check_exit(VCPKG_LINE_INFO,
+ !ec,
+ "Could not create directory for package file %s",
+ package_xml_file_path.generic_string());
+ fs.write_contents(package_xml_file_path,
+ Strings::format(
+ R"###(<?xml version="1.0"?>
+<Package>
+ <DisplayName>Triplets</DisplayName>
+ <Version>1.0.0</Version>
+ <ReleaseDate>%s</ReleaseDate>
+</Package>
+)###",
+ create_release_date()));
+
+ for (const std::string& triplet : unique_triplets)
+ {
+ package_xml_file_path =
+ raw_exported_dir_path / Strings::format("triplets.%s", triplet) / "meta" / "package.xml";
+ package_xml_dir_path = package_xml_file_path.parent_path();
+ fs.create_directories(package_xml_dir_path, ec);
+ Checks::check_exit(VCPKG_LINE_INFO,
+ !ec,
+ "Could not create directory for package file %s",
+ package_xml_file_path.generic_string());
+ fs.write_contents(package_xml_file_path,
+ Strings::format(
+ R"###(<?xml version="1.0"?>
+<Package>
+ <DisplayName>%s</DisplayName>
+ <Version>1.0.0</Version>
+ <ReleaseDate>%s</ReleaseDate>
+</Package>
+)###",
+ triplet,
+ create_release_date()));
+ }
+ }
+
+ void export_integration(const fs::path& raw_exported_dir_path, Files::Filesystem& fs)
+ {
+ std::error_code ec;
+
+ // integration
+ fs::path package_xml_file_path = raw_exported_dir_path / "integration" / "meta" / "package.xml";
+ fs::path package_xml_dir_path = package_xml_file_path.parent_path();
+ fs.create_directories(package_xml_dir_path, ec);
+ Checks::check_exit(VCPKG_LINE_INFO,
+ !ec,
+ "Could not create directory for package file %s",
+ package_xml_file_path.generic_string());
+
+ fs.write_contents(package_xml_file_path,
+ Strings::format(
+ R"###(<?xml version="1.0"?>
+<Package>
+ <DisplayName>Integration</DisplayName>
+ <Version>1.0.0</Version>
+ <ReleaseDate>%s</ReleaseDate>
+</Package>
+)###",
+ create_release_date()));
+ }
+
+ void export_config(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths)
+ {
+ std::error_code ec;
+ Files::Filesystem& fs = paths.get_filesystem();
+
+ const fs::path config_xml_file_path = get_config_file_path(export_id, ifw_options, paths);
+
+ fs::path config_xml_dir_path = config_xml_file_path.parent_path();
+ fs.create_directories(config_xml_dir_path, ec);
+ Checks::check_exit(VCPKG_LINE_INFO,
+ !ec,
+ "Could not create directory for configuration file %s",
+ config_xml_file_path.generic_string());
+
+ std::string formatted_repo_url;
+ std::string ifw_repo_url = ifw_options.maybe_repository_url.value_or("");
+ if (!ifw_repo_url.empty())
+ {
+ formatted_repo_url = Strings::format(R"###(
+ <RemoteRepositories>
+ <Repository>
+ <Url>%s</Url>
+ </Repository>
+ </RemoteRepositories>)###",
+ ifw_repo_url);
+ }
+
+ fs.write_contents(config_xml_file_path,
+ Strings::format(
+ R"###(<?xml version="1.0"?>
+<Installer>
+ <Name>vcpkg</Name>
+ <Version>1.0.0</Version>
+ <StartMenuDir>vcpkg</StartMenuDir>
+ <TargetDir>@RootDir@/src/vcpkg</TargetDir>%s
+</Installer>
+)###",
+ formatted_repo_url));
+ }
+
+ void export_maintenance_tool(const fs::path& ifw_packages_dir_path, const VcpkgPaths& paths)
+ {
+ System::println("Exporting maintenance tool... ");
+
+ std::error_code ec;
+ Files::Filesystem& fs = paths.get_filesystem();
+
+ const fs::path& installerbase_exe = paths.get_ifw_installerbase_exe();
+ fs::path tempmaintenancetool = ifw_packages_dir_path / "maintenance" / "data" / "tempmaintenancetool.exe";
+ fs.create_directories(tempmaintenancetool.parent_path(), ec);
+ Checks::check_exit(VCPKG_LINE_INFO,
+ !ec,
+ "Could not create directory for package file %s",
+ tempmaintenancetool.generic_string());
+ fs.copy_file(installerbase_exe, tempmaintenancetool, fs::copy_options::overwrite_existing, ec);
+ Checks::check_exit(
+ VCPKG_LINE_INFO, !ec, "Could not write package file %s", tempmaintenancetool.generic_string());
+
+ fs::path package_xml_file_path = ifw_packages_dir_path / "maintenance" / "meta" / "package.xml";
+ fs::path package_xml_dir_path = package_xml_file_path.parent_path();
+ fs.create_directories(package_xml_dir_path, ec);
+ Checks::check_exit(VCPKG_LINE_INFO,
+ !ec,
+ "Could not create directory for package file %s",
+ package_xml_file_path.generic_string());
+ fs.write_contents(package_xml_file_path,
+ Strings::format(
+ R"###(<?xml version="1.0"?>
+<Package>
+ <DisplayName>Maintenance Tool</DisplayName>
+ <Description>Maintenance Tool</Description>
+ <Version>1.0.0</Version>
+ <ReleaseDate>%s</ReleaseDate>
+ <Script>maintenance.qs</Script>
+ <Essential>true</Essential>
+ <Virtual>true</Virtual>
+ <ForcedInstallation>true</ForcedInstallation>
+</Package>
+)###",
+ create_release_date()));
+ const fs::path script_source = paths.root / "scripts" / "ifw" / "maintenance.qs";
+ const fs::path script_destination = ifw_packages_dir_path / "maintenance" / "meta" / "maintenance.qs";
+ fs.copy_file(script_source, script_destination, fs::copy_options::overwrite_existing, ec);
+ Checks::check_exit(
+ VCPKG_LINE_INFO, !ec, "Could not write package file %s", script_destination.generic_string());
+
+ System::println("Exporting maintenance tool... done");
+ }
+
+ void do_repository(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths)
+ {
+ const fs::path& repogen_exe = paths.get_ifw_repogen_exe();
+ const fs::path packages_dir = get_packages_dir_path(export_id, ifw_options, paths);
+ const fs::path repository_dir = get_repository_dir_path(export_id, ifw_options, paths);
+
+ System::println("Generating repository %s...", repository_dir.generic_string());
+
+ std::error_code ec;
+ Files::Filesystem& fs = paths.get_filesystem();
+
+ fs.remove_all(repository_dir, ec);
+ Checks::check_exit(
+ VCPKG_LINE_INFO, !ec, "Could not remove outdated repository directory %s", repository_dir.generic_string());
+
+ const auto cmd_line = Strings::format(R"("%s" --packages "%s" "%s" > nul)",
+ repogen_exe.u8string(),
+ packages_dir.u8string(),
+ repository_dir.u8string());
+
+ const int exit_code = System::cmd_execute_clean(cmd_line);
+ Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: IFW repository generating failed");
+
+ System::println(System::Color::success, "Generating repository %s... done.", repository_dir.generic_string());
+ }
+
+ void do_installer(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths)
+ {
+ const fs::path& binarycreator_exe = paths.get_ifw_binarycreator_exe();
+ const fs::path config_file = get_config_file_path(export_id, ifw_options, paths);
+ const fs::path packages_dir = get_packages_dir_path(export_id, ifw_options, paths);
+ const fs::path repository_dir = get_repository_dir_path(export_id, ifw_options, paths);
+ const fs::path installer_file = get_installer_file_path(export_id, ifw_options, paths);
+
+ System::println("Generating installer %s...", installer_file.generic_string());
+
+ std::string cmd_line;
+
+ std::string ifw_repo_url = ifw_options.maybe_repository_url.value_or("");
+ if (!ifw_repo_url.empty())
+ {
+ cmd_line = Strings::format(R"("%s" --online-only --config "%s" --repository "%s" "%s" > nul)",
+ binarycreator_exe.u8string(),
+ config_file.u8string(),
+ repository_dir.u8string(),
+ installer_file.u8string());
+ }
+ else
+ {
+ cmd_line = Strings::format(R"("%s" --config "%s" --packages "%s" "%s" > nul)",
+ binarycreator_exe.u8string(),
+ config_file.u8string(),
+ packages_dir.u8string(),
+ installer_file.u8string());
+ }
+
+ const int exit_code = System::cmd_execute_clean(cmd_line);
+ Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: IFW installer generating failed");
+
+ System::println(System::Color::success, "Generating installer %s... done.", installer_file.generic_string());
+ }
+
+ void do_export(const std::vector<ExportPlanAction>& export_plan,
+ const std::string& export_id,
+ const Options& ifw_options,
+ const VcpkgPaths& paths)
+ {
+ std::error_code ec;
+ Files::Filesystem& fs = paths.get_filesystem();
+
+ // Prepare packages directory
+ const fs::path ifw_packages_dir_path = get_packages_dir_path(export_id, ifw_options, paths);
+
+ fs.remove_all(ifw_packages_dir_path, ec);
+ Checks::check_exit(VCPKG_LINE_INFO,
+ !ec,
+ "Could not remove outdated packages directory %s",
+ ifw_packages_dir_path.generic_string());
+
+ fs.create_directory(ifw_packages_dir_path, ec);
+ Checks::check_exit(
+ VCPKG_LINE_INFO, !ec, "Could not create packages directory %s", ifw_packages_dir_path.generic_string());
+
+ // Export maintenance tool
+ export_maintenance_tool(ifw_packages_dir_path, paths);
+
+ System::println("Exporting packages %s... ", ifw_packages_dir_path.generic_string());
+
+ // execute the plan
+ std::map<std::string, const ExportPlanAction*> unique_packages;
+ std::set<std::string> unique_triplets;
+ for (const ExportPlanAction& action : export_plan)
+ {
+ if (action.plan_type != ExportPlanType::ALREADY_BUILT)
+ {
+ Checks::unreachable(VCPKG_LINE_INFO);
+ }
+
+ const std::string display_name = action.spec.to_string();
+ System::println("Exporting package %s... ", display_name);
+
+ const BinaryParagraph& binary_paragraph =
+ action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph;
+
+ unique_packages[action.spec.name()] = &action;
+ unique_triplets.insert(action.spec.triplet().canonical_name());
+
+ // Export real package and return data dir for installation
+ fs::path ifw_package_dir_path = export_real_package(ifw_packages_dir_path, action, fs);
+
+ // Copy package data
+ const InstallDir dirs = InstallDir::from_destination_root(ifw_package_dir_path,
+ action.spec.triplet().to_string(),
+ ifw_package_dir_path / "vcpkg" / "info" /
+ (binary_paragraph.fullstem() + ".list"));
+
+ Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs);
+ System::println("Exporting package %s... done", display_name);
+ }
+
+ System::println("Exporting packages %s... done", ifw_packages_dir_path.generic_string());
+
+ const fs::path config_file = get_config_file_path(export_id, ifw_options, paths);
+
+ System::println("Generating configuration %s...", config_file.generic_string());
+
+ // Unique packages
+ export_unique_packages(ifw_packages_dir_path, unique_packages, fs);
+
+ // Unique triplets
+ export_unique_triplets(ifw_packages_dir_path, unique_triplets, fs);
+
+ // Copy files needed for integration
+ export_integration_files(ifw_packages_dir_path / "integration" / "data", paths);
+ // Integration
+ export_integration(ifw_packages_dir_path, fs);
+
+ // Configuration
+ export_config(export_id, ifw_options, paths);
+
+ System::println("Generating configuration %s... done.", config_file.generic_string());
+
+ // Do repository (optional)
+ std::string ifw_repo_url = ifw_options.maybe_repository_url.value_or("");
+ if (!ifw_repo_url.empty())
+ {
+ do_repository(export_id, ifw_options, paths);
+ }
+
+ // Do installer
+ do_installer(export_id, ifw_options, paths);
+ }
+}
diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp
new file mode 100644
index 000000000..4bc58b509
--- /dev/null
+++ b/toolsrc/src/vcpkg/commands.hash.cpp
@@ -0,0 +1,50 @@
+#include "pch.h"
+
+#include <vcpkg/base/system.h>
+#include <vcpkg/base/util.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/help.h>
+
+namespace vcpkg::Commands::Hash
+{
+ static void do_file_hash(fs::path const& path, std::string const& hash_type)
+ {
+ const auto cmd_line = Strings::format(R"(CertUtil.exe -hashfile "%s" %s)", path.u8string().c_str(), hash_type);
+ const auto ec_data = System::cmd_execute_and_capture_output(cmd_line);
+ Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line);
+
+ std::string const& output = ec_data.output;
+
+ const auto start = output.find_first_of("\r\n");
+ Checks::check_exit(
+ VCPKG_LINE_INFO, start != std::string::npos, "Unexpected output format from command: %s", cmd_line);
+
+ const auto end = output.find_first_of("\r\n", start + 1);
+ Checks::check_exit(
+ VCPKG_LINE_INFO, end != std::string::npos, "Unexpected output format from command: %s", cmd_line);
+
+ auto hash = output.substr(start, end - start);
+ Util::erase_remove_if(hash, isspace);
+ System::println(hash);
+ }
+
+ void perform_and_exit(const VcpkgCmdArguments& args)
+ {
+ static const std::string EXAMPLE = Strings::format("The argument should be a file path\n%s",
+ Help::create_example_string("hash boost_1_62_0.tar.bz2"));
+ args.check_min_arg_count(1, EXAMPLE);
+ args.check_max_arg_count(2, EXAMPLE);
+ args.check_and_get_optional_command_arguments({});
+
+ if (args.command_arguments.size() == 1)
+ {
+ do_file_hash(args.command_arguments[0], "SHA512");
+ }
+ if (args.command_arguments.size() == 2)
+ {
+ do_file_hash(args.command_arguments[0], args.command_arguments[1]);
+ }
+
+ Checks::exit_success(VCPKG_LINE_INFO);
+ }
+}
diff --git a/toolsrc/src/commands_import.cpp b/toolsrc/src/vcpkg/commands.import.cpp
index 5db1885b2..119aee022 100644
--- a/toolsrc/src/commands_import.cpp
+++ b/toolsrc/src/vcpkg/commands.import.cpp
@@ -1,9 +1,10 @@
#include "pch.h"
-#include "Paragraphs.h"
-#include "StatusParagraph.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_Files.h"
+#include <vcpkg/base/files.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/help.h>
+#include <vcpkg/paragraphs.h>
+#include <vcpkg/statusparagraph.h>
namespace vcpkg::Commands::Import
{
@@ -28,7 +29,7 @@ namespace vcpkg::Commands::Import
for (auto&& file : files)
{
if (fs.is_directory(file)) continue;
- auto ext = file.extension();
+ const auto ext = file.extension();
if (ext == ".dll")
binaries.dlls.push_back(std::move(file));
else if (ext == ".lib")
@@ -46,7 +47,7 @@ namespace vcpkg::Commands::Import
for (auto const& src_path : files)
{
- fs::path dest_path = destination_folder / src_path.filename();
+ const fs::path dest_path = destination_folder / src_path.filename();
fs.copy(src_path, dest_path, fs::copy_options::overwrite_existing);
}
}
@@ -59,10 +60,10 @@ namespace vcpkg::Commands::Import
check_is_directory(VCPKG_LINE_INFO, fs, include_directory);
check_is_directory(VCPKG_LINE_INFO, fs, project_directory);
check_is_directory(VCPKG_LINE_INFO, fs, destination_path);
- Binaries debug_binaries = find_binaries_in_dir(fs, project_directory / "Debug");
- Binaries release_binaries = find_binaries_in_dir(fs, project_directory / "Release");
+ const Binaries debug_binaries = find_binaries_in_dir(fs, project_directory / "Debug");
+ const Binaries release_binaries = find_binaries_in_dir(fs, project_directory / "Release");
- fs::path destination_include_directory = destination_path / "include";
+ const fs::path destination_include_directory = destination_path / "include";
fs.copy(include_directory,
destination_include_directory,
fs::copy_options::recursive | fs::copy_options::overwrite_existing);
@@ -82,20 +83,20 @@ namespace vcpkg::Commands::Import
const BinaryParagraph& control_file_data)
{
auto& fs = paths.get_filesystem();
- fs::path library_destination_path = paths.package_dir(control_file_data.spec);
+ const fs::path library_destination_path = paths.package_dir(control_file_data.spec);
std::error_code ec;
fs.create_directory(library_destination_path, ec);
place_library_files_in(paths.get_filesystem(), include_directory, project_directory, library_destination_path);
- fs::path control_file_path = library_destination_path / "CONTROL";
+ const fs::path control_file_path = library_destination_path / "CONTROL";
fs.write_contents(control_file_path, Strings::serialize(control_file_data));
}
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
{
- static const std::string example = Commands::Help::create_example_string(
+ static const std::string EXAMPLE = Help::create_example_string(
R"(import C:\path\to\CONTROLfile C:\path\to\includedir C:\path\to\projectdir)");
- args.check_exact_arg_count(3, example);
+ args.check_exact_arg_count(3, EXAMPLE);
args.check_and_get_optional_command_arguments({});
const fs::path control_file_path(args.command_arguments[0]);
diff --git a/toolsrc/src/commands_integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp
index c5942f9fc..0d185476e 100644
--- a/toolsrc/src/commands_integrate.cpp
+++ b/toolsrc/src/vcpkg/commands.integrate.cpp
@@ -1,19 +1,13 @@
#include "pch.h"
-#include "vcpkg_Checks.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_Files.h"
-#include "vcpkg_System.h"
-#include "vcpkg_Util.h"
+#include <vcpkg/base/checks.h>
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/system.h>
+#include <vcpkg/base/util.h>
+#include <vcpkg/commands.h>
namespace vcpkg::Commands::Integrate
{
- static const std::array<fs::path, 2> old_system_target_files = {
- System::get_ProgramFiles_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.nuget.targets",
- System::get_ProgramFiles_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.system.targets"};
- static const fs::path system_wide_targets_file =
- System::get_ProgramFiles_32_bit() / "MSBuild/Microsoft.Cpp/v4.0/V140/ImportBefore/Default/vcpkg.system.props";
-
static std::string create_appdata_targets_shortcut(const std::string& target_path) noexcept
{
return Strings::format(R"###(
@@ -82,7 +76,7 @@ namespace vcpkg::Commands::Integrate
const std::string& nuget_id,
const std::string& nupkg_version)
{
- static constexpr auto content_template = R"(
+ static constexpr auto CONTENT_TEMPLATE = R"(
<package>
<metadata>
<id>@NUGET_ID@</id>
@@ -99,7 +93,7 @@ namespace vcpkg::Commands::Integrate
</package>
)";
- std::string content = std::regex_replace(content_template, std::regex("@NUGET_ID@"), nuget_id);
+ std::string content = std::regex_replace(CONTENT_TEMPLATE, std::regex("@NUGET_ID@"), nuget_id);
content = std::regex_replace(content, std::regex("@VCPKG_DIR@"), vcpkg_root_dir.string());
content = std::regex_replace(content, std::regex("@VERSION@"), nupkg_version);
return content;
@@ -111,52 +105,67 @@ namespace vcpkg::Commands::Integrate
NO
};
+#if defined(_WIN32)
static ElevationPromptChoice elevated_cmd_execute(const std::string& param)
{
- SHELLEXECUTEINFO shExInfo = {0};
- shExInfo.cbSize = sizeof(shExInfo);
- shExInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
- shExInfo.hwnd = nullptr;
- shExInfo.lpVerb = "runas";
- shExInfo.lpFile = "cmd"; // Application to start
-
- shExInfo.lpParameters = param.c_str(); // Additional parameters
- shExInfo.lpDirectory = nullptr;
- shExInfo.nShow = SW_HIDE;
- shExInfo.hInstApp = nullptr;
-
- if (!ShellExecuteExA(&shExInfo))
+ SHELLEXECUTEINFOW sh_ex_info = {0};
+ sh_ex_info.cbSize = sizeof(sh_ex_info);
+ sh_ex_info.fMask = SEE_MASK_NOCLOSEPROCESS;
+ sh_ex_info.hwnd = nullptr;
+ sh_ex_info.lpVerb = L"runas";
+ sh_ex_info.lpFile = L"cmd"; // Application to start
+
+ auto wparam = Strings::to_utf16(param);
+ sh_ex_info.lpParameters = wparam.c_str(); // Additional parameters
+ sh_ex_info.lpDirectory = nullptr;
+ sh_ex_info.nShow = SW_HIDE;
+ sh_ex_info.hInstApp = nullptr;
+
+ if (!ShellExecuteExW(&sh_ex_info))
{
return ElevationPromptChoice::NO;
}
- if (shExInfo.hProcess == nullptr)
+ if (sh_ex_info.hProcess == nullptr)
{
return ElevationPromptChoice::NO;
}
- WaitForSingleObject(shExInfo.hProcess, INFINITE);
- CloseHandle(shExInfo.hProcess);
+ WaitForSingleObject(sh_ex_info.hProcess, INFINITE);
+ CloseHandle(sh_ex_info.hProcess);
return ElevationPromptChoice::YES;
}
+#endif
+#if defined(_WIN32)
static fs::path get_appdata_targets_path()
{
- static const fs::path local_app_data =
- fs::path(System::get_environment_variable(L"LOCALAPPDATA").value_or_exit(VCPKG_LINE_INFO));
- return local_app_data / "vcpkg" / "vcpkg.user.targets";
+ static const fs::path LOCAL_APP_DATA =
+ fs::path(System::get_environment_variable("LOCALAPPDATA").value_or_exit(VCPKG_LINE_INFO));
+ return LOCAL_APP_DATA / "vcpkg" / "vcpkg.user.targets";
}
+#endif
+#if defined(_WIN32)
static void integrate_install(const VcpkgPaths& paths)
{
+ static const std::array<fs::path, 2> OLD_SYSTEM_TARGET_FILES = {
+ System::get_program_files_32_bit() /
+ "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.nuget.targets",
+ System::get_program_files_32_bit() /
+ "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.system.targets"};
+ static const fs::path SYSTEM_WIDE_TARGETS_FILE =
+ System::get_program_files_32_bit() /
+ "MSBuild/Microsoft.Cpp/v4.0/V140/ImportBefore/Default/vcpkg.system.props";
+
auto& fs = paths.get_filesystem();
// TODO: This block of code should eventually be removed
- for (auto&& old_system_wide_targets_file : old_system_target_files)
+ for (auto&& old_system_wide_targets_file : OLD_SYSTEM_TARGET_FILES)
{
if (fs.exists(old_system_wide_targets_file))
{
const std::string param =
Strings::format(R"(/c DEL "%s" /Q > nul)", old_system_wide_targets_file.string());
- ElevationPromptChoice user_choice = elevated_cmd_execute(param);
+ const ElevationPromptChoice user_choice = elevated_cmd_execute(param);
switch (user_choice)
{
case ElevationPromptChoice::YES: break;
@@ -174,15 +183,15 @@ namespace vcpkg::Commands::Integrate
fs.create_directory(tmp_dir, ec);
bool should_install_system = true;
- const Expected<std::string> system_wide_file_contents = fs.read_contents(system_wide_targets_file);
- if (auto contents_data = system_wide_file_contents.get())
+ const Expected<std::string> system_wide_file_contents = fs.read_contents(SYSTEM_WIDE_TARGETS_FILE);
+ static const std::regex RE(R"###(<!-- version (\d+) -->)###");
+ if (const auto contents_data = system_wide_file_contents.get())
{
- std::regex re(R"###(<!-- version (\d+) -->)###");
std::match_results<std::string::const_iterator> match;
- auto found = std::regex_search(*contents_data, match, re);
+ const auto found = std::regex_search(*contents_data, match, RE);
if (found)
{
- int ver = atoi(match[1].str().c_str());
+ const int ver = atoi(match[1].str().c_str());
if (ver >= 1) should_install_system = false;
}
}
@@ -193,10 +202,10 @@ namespace vcpkg::Commands::Integrate
fs.write_contents(sys_src_path, create_system_targets_shortcut());
const std::string param = Strings::format(R"(/c mkdir "%s" & copy "%s" "%s" /Y > nul)",
- system_wide_targets_file.parent_path().string(),
+ SYSTEM_WIDE_TARGETS_FILE.parent_path().string(),
sys_src_path.string(),
- system_wide_targets_file.string());
- ElevationPromptChoice user_choice = elevated_cmd_execute(param);
+ SYSTEM_WIDE_TARGETS_FILE.string());
+ const ElevationPromptChoice user_choice = elevated_cmd_execute(param);
switch (user_choice)
{
case ElevationPromptChoice::YES: break;
@@ -207,9 +216,9 @@ namespace vcpkg::Commands::Integrate
}
Checks::check_exit(VCPKG_LINE_INFO,
- fs.exists(system_wide_targets_file),
+ fs.exists(SYSTEM_WIDE_TARGETS_FILE),
"Error: failed to copy targets file to %s",
- system_wide_targets_file.string());
+ SYSTEM_WIDE_TARGETS_FILE.string());
}
const fs::path appdata_src_path = tmp_dir / "vcpkg.user.targets";
@@ -217,7 +226,7 @@ namespace vcpkg::Commands::Integrate
create_appdata_targets_shortcut(paths.buildsystems_msbuild_targets.string()));
auto appdata_dst_path = get_appdata_targets_path();
- auto rc = fs.copy_file(appdata_src_path, appdata_dst_path, fs::copy_options::overwrite_existing, ec);
+ const auto rc = fs.copy_file(appdata_src_path, appdata_dst_path, fs::copy_options::overwrite_existing, ec);
if (!rc || ec)
{
@@ -229,13 +238,14 @@ namespace vcpkg::Commands::Integrate
}
System::println(System::Color::success, "Applied user-wide integration for this vcpkg root.");
const fs::path cmake_toolchain = paths.buildsystems / "vcpkg.cmake";
- System::println("\n"
- "All MSBuild C++ projects can now #include any installed libraries.\n"
- "Linking will be handled automatically.\n"
- "Installing new libraries will make them instantly available.\n"
- "\n"
- "CMake projects should use -DCMAKE_TOOLCHAIN_FILE=%s",
- cmake_toolchain.generic_string());
+ System::println(
+ R"(
+All MSBuild C++ projects can now #include any installed libraries.
+Linking will be handled automatically.
+Installing new libraries will make them instantly available.
+
+CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")",
+ cmake_toolchain.generic_string());
Checks::exit_success(VCPKG_LINE_INFO);
}
@@ -245,7 +255,7 @@ namespace vcpkg::Commands::Integrate
const fs::path path = get_appdata_targets_path();
std::error_code ec;
- bool was_deleted = fs.remove(path, ec);
+ const bool was_deleted = fs.remove(path, ec);
Checks::check_exit(VCPKG_LINE_INFO, !ec, "Error: Unable to remove user-wide integration: %d", ec.message());
@@ -260,6 +270,7 @@ namespace vcpkg::Commands::Integrate
Checks::exit_success(VCPKG_LINE_INFO);
}
+#endif
static void integrate_project(const VcpkgPaths& paths)
{
@@ -284,10 +295,10 @@ namespace vcpkg::Commands::Integrate
fs.write_contents(nuspec_file_path, create_nuspec_file_contents(paths.root, nuget_id, nupkg_version));
// Using all forward slashes for the command line
- const std::wstring cmd_line = Strings::wformat(LR"("%s" pack -OutputDirectory "%s" "%s" > nul)",
- nuget_exe.native(),
- buildsystems_dir.native(),
- nuspec_file_path.native());
+ const std::string cmd_line = Strings::format(R"("%s" pack -OutputDirectory "%s" "%s" > nul)",
+ nuget_exe.u8string(),
+ buildsystems_dir.u8string(),
+ nuspec_file_path.u8string());
const int exit_code = System::cmd_execute_clean(cmd_line);
@@ -317,12 +328,13 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
{
- static const std::string example = Strings::format("Commands:\n"
+ static const std::string EXAMPLE = Strings::format("Commands:\n"
"%s",
INTEGRATE_COMMAND_HELPSTRING);
- args.check_exact_arg_count(1, example);
+ args.check_exact_arg_count(1, EXAMPLE);
args.check_and_get_optional_command_arguments({});
+#if defined(_WIN32)
if (args.command_arguments[0] == "install")
{
return integrate_install(paths);
@@ -335,6 +347,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console
{
return integrate_project(paths);
}
+#endif
Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown parameter %s for integrate", args.command_arguments[0]);
}
diff --git a/toolsrc/src/commands_list.cpp b/toolsrc/src/vcpkg/commands.list.cpp
index 3cfa7e184..d0e8e00b4 100644
--- a/toolsrc/src/commands_list.cpp
+++ b/toolsrc/src/vcpkg/commands.list.cpp
@@ -1,16 +1,17 @@
#include "pch.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_System.h"
-#include "vcpkglib.h"
+#include <vcpkg/base/system.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/help.h>
+#include <vcpkg/vcpkglib.h>
namespace vcpkg::Commands::List
{
static const std::string OPTION_FULLDESC = "--x-full-desc"; // TODO: This should find a better home, eventually
- static void do_print(const StatusParagraph& pgh, bool FullDesc)
+ static void do_print(const StatusParagraph& pgh, bool full_desc)
{
- if (FullDesc)
+ if (full_desc)
{
System::println("%-30s %-16s %s", pgh.package.displayname(), pgh.package.version, pgh.package.description);
}
@@ -25,10 +26,10 @@ namespace vcpkg::Commands::List
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
{
- static const std::string example = Strings::format(
+ static const std::string EXAMPLE = Strings::format(
"The argument should be a substring to search for, or no argument to display all installed libraries.\n%s",
- Commands::Help::create_example_string("list png"));
- args.check_max_arg_count(1, example);
+ Help::create_example_string("list png"));
+ args.check_max_arg_count(1, EXAMPLE);
const std::unordered_set<std::string> options =
args.check_and_get_optional_command_arguments({OPTION_FULLDESC});
diff --git a/toolsrc/src/commands_owns.cpp b/toolsrc/src/vcpkg/commands.owns.cpp
index 757292e96..69079e829 100644
--- a/toolsrc/src/commands_owns.cpp
+++ b/toolsrc/src/vcpkg/commands.owns.cpp
@@ -1,8 +1,9 @@
#include "pch.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_System.h"
-#include "vcpkglib.h"
+#include <vcpkg/base/system.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/help.h>
+#include <vcpkg/vcpkglib.h>
namespace vcpkg::Commands::Owns
{
@@ -25,9 +26,9 @@ namespace vcpkg::Commands::Owns
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
{
- static const std::string example = Strings::format("The argument should be a pattern to search for. %s",
- Commands::Help::create_example_string("owns zlib.dll"));
- args.check_exact_arg_count(1, example);
+ static const std::string EXAMPLE = Strings::format("The argument should be a pattern to search for. %s",
+ Help::create_example_string("owns zlib.dll"));
+ args.check_exact_arg_count(1, EXAMPLE);
args.check_and_get_optional_command_arguments({});
StatusParagraphs status_db = database_load_check(paths);
diff --git a/toolsrc/src/commands_portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp
index 83d62896f..a8c043751 100644
--- a/toolsrc/src/commands_portsdiff.cpp
+++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp
@@ -1,11 +1,12 @@
#include "pch.h"
-#include "Paragraphs.h"
-#include "SortedVector.h"
-#include "SourceParagraph.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_Maps.h"
-#include "vcpkg_System.h"
+#include <vcpkg/commands.h>
+#include <vcpkg/help.h>
+#include <vcpkg/paragraphs.h>
+
+#include <vcpkg/base/sortedvector.h>
+#include <vcpkg/base/system.h>
+#include <vcpkg/base/util.h>
namespace vcpkg::Commands::PortsDiff
{
@@ -69,33 +70,33 @@ namespace vcpkg::Commands::PortsDiff
for (const std::string& name : ports_to_print)
{
const VersionT& version = names_and_versions.at(name);
- System::println("%-20s %-16s", name, version);
+ System::println(" - %-14s %-16s", name, version);
}
}
static std::map<std::string, VersionT> read_ports_from_commit(const VcpkgPaths& paths,
- const std::wstring& git_commit_id)
+ const std::string& git_commit_id)
{
std::error_code ec;
auto& fs = paths.get_filesystem();
const fs::path& git_exe = paths.get_git_exe();
const fs::path dot_git_dir = paths.root / ".git";
- const std::wstring ports_dir_name_as_string = paths.ports.filename().native();
+ const std::string ports_dir_name_as_string = paths.ports.filename().u8string();
const fs::path temp_checkout_path =
- paths.root / Strings::wformat(L"%s-%s", ports_dir_name_as_string, git_commit_id);
+ paths.root / Strings::format("%s-%s", ports_dir_name_as_string, git_commit_id);
fs.create_directory(temp_checkout_path, ec);
- const std::wstring checkout_this_dir =
- Strings::wformat(LR"(.\%s)", ports_dir_name_as_string); // Must be relative to the root of the repository
-
- const std::wstring cmd =
- Strings::wformat(LR"("%s" --git-dir="%s" --work-tree="%s" checkout %s -f -q -- %s %s & "%s" reset >NUL)",
- git_exe.native(),
- dot_git_dir.native(),
- temp_checkout_path.native(),
- git_commit_id,
- checkout_this_dir,
- L".vcpkg-root",
- git_exe.native());
+ const auto checkout_this_dir =
+ Strings::format(R"(.\%s)", ports_dir_name_as_string); // Must be relative to the root of the repository
+
+ const std::string cmd =
+ Strings::format(R"("%s" --git-dir="%s" --work-tree="%s" checkout %s -f -q -- %s %s & "%s" reset >NUL)",
+ git_exe.u8string(),
+ dot_git_dir.u8string(),
+ temp_checkout_path.u8string(),
+ git_commit_id,
+ checkout_this_dir,
+ ".vcpkg-root",
+ git_exe.u8string());
System::cmd_execute_clean(cmd);
const std::map<std::string, VersionT> names_and_versions = Paragraphs::load_all_port_names_and_versions(
paths.get_filesystem(), temp_checkout_path / ports_dir_name_as_string);
@@ -103,32 +104,29 @@ namespace vcpkg::Commands::PortsDiff
return names_and_versions;
}
- static void check_commit_exists(const fs::path& git_exe, const std::wstring& git_commit_id)
+ static void check_commit_exists(const fs::path& git_exe, const std::string& git_commit_id)
{
static const std::string VALID_COMMIT_OUTPUT = "commit\n";
- const std::wstring cmd = Strings::wformat(LR"("%s" cat-file -t %s)", git_exe.native(), git_commit_id);
+ const auto cmd = Strings::format(R"("%s" cat-file -t %s)", git_exe.u8string(), git_commit_id);
const System::ExitCodeAndOutput output = System::cmd_execute_and_capture_output(cmd);
- Checks::check_exit(VCPKG_LINE_INFO,
- output.output == VALID_COMMIT_OUTPUT,
- "Invalid commit id %s",
- Strings::to_utf8(git_commit_id));
+ Checks::check_exit(
+ VCPKG_LINE_INFO, output.output == VALID_COMMIT_OUTPUT, "Invalid commit id %s", git_commit_id);
}
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
{
- static const std::string example =
- Strings::format("The argument should be a branch/tag/hash to checkout.\n%s",
- Commands::Help::create_example_string("portsdiff mybranchname"));
- args.check_min_arg_count(1, example);
- args.check_max_arg_count(2, example);
+ static const std::string EXAMPLE = Strings::format("The argument should be a branch/tag/hash to checkout.\n%s",
+ Help::create_example_string("portsdiff mybranchname"));
+ args.check_min_arg_count(1, EXAMPLE);
+ args.check_max_arg_count(2, EXAMPLE);
args.check_and_get_optional_command_arguments({});
const fs::path& git_exe = paths.get_git_exe();
- const std::wstring git_commit_id_for_previous_snapshot = Strings::to_utf16(args.command_arguments.at(0));
- const std::wstring git_commit_id_for_current_snapshot =
- args.command_arguments.size() < 2 ? L"HEAD" : Strings::to_utf16(args.command_arguments.at(1));
+ const std::string git_commit_id_for_previous_snapshot = args.command_arguments.at(0);
+ const std::string git_commit_id_for_current_snapshot =
+ args.command_arguments.size() < 2 ? "HEAD" : args.command_arguments.at(1);
check_commit_exists(git_exe, git_commit_id_for_current_snapshot);
check_commit_exists(git_exe, git_commit_id_for_previous_snapshot);
@@ -139,8 +137,8 @@ namespace vcpkg::Commands::PortsDiff
read_ports_from_commit(paths, git_commit_id_for_previous_snapshot);
// Already sorted, so set_difference can work on std::vector too
- std::vector<std::string> current_ports = Maps::extract_keys(current_names_and_versions);
- std::vector<std::string> previous_ports = Maps::extract_keys(previous_names_and_versions);
+ const std::vector<std::string> current_ports = Util::extract_keys(current_names_and_versions);
+ const std::vector<std::string> previous_ports = Util::extract_keys(previous_names_and_versions);
const SetElementPresence<std::string> setp =
SetElementPresence<std::string>::create(current_ports, previous_ports);
@@ -148,14 +146,14 @@ namespace vcpkg::Commands::PortsDiff
const std::vector<std::string>& added_ports = setp.only_left;
if (!added_ports.empty())
{
- System::println("\nThe following %d ports were added:\n", added_ports.size());
+ System::println("\nThe following %d ports were added:", added_ports.size());
do_print_name_and_version(added_ports, current_names_and_versions);
}
const std::vector<std::string>& removed_ports = setp.only_right;
if (!removed_ports.empty())
{
- System::println("\nThe following %d ports were removed:\n", removed_ports.size());
+ System::println("\nThe following %d ports were removed:", removed_ports.size());
do_print_name_and_version(removed_ports, previous_names_and_versions);
}
@@ -165,10 +163,10 @@ namespace vcpkg::Commands::PortsDiff
if (!updated_ports.empty())
{
- System::println("\nThe following %d ports were updated:\n", updated_ports.size());
+ System::println("\nThe following %d ports were updated:", updated_ports.size());
for (const UpdatedPort& p : updated_ports)
{
- System::println("%-20s %-16s", p.port, p.version_diff.to_string());
+ System::println(" - %-14s %-16s", p.port, p.version_diff.to_string());
}
}
diff --git a/toolsrc/src/commands_search.cpp b/toolsrc/src/vcpkg/commands.search.cpp
index 529d52a8b..3ba8707de 100644
--- a/toolsrc/src/commands_search.cpp
+++ b/toolsrc/src/vcpkg/commands.search.cpp
@@ -1,11 +1,12 @@
#include "pch.h"
-#include "Paragraphs.h"
-#include "SourceParagraph.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_GlobalState.h"
-#include "vcpkg_System.h"
-#include "vcpkglib.h"
+#include <vcpkg/base/system.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/globalstate.h>
+#include <vcpkg/help.h>
+#include <vcpkg/paragraphs.h>
+#include <vcpkg/sourceparagraph.h>
+#include <vcpkg/vcpkglib.h>
namespace vcpkg::Commands::Search
{
@@ -80,34 +81,15 @@ namespace vcpkg::Commands::Search
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
{
- static const std::string example = Strings::format(
+ static const std::string EXAMPLE = Strings::format(
"The argument should be a substring to search for, or no argument to display all libraries.\n%s",
- Commands::Help::create_example_string("search png"));
- args.check_max_arg_count(1, example);
+ Help::create_example_string("search png"));
+ args.check_max_arg_count(1, EXAMPLE);
const std::unordered_set<std::string> options =
args.check_and_get_optional_command_arguments({OPTION_GRAPH, OPTION_FULLDESC});
- auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports);
+ auto source_paragraphs = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports);
- if (!sources_and_errors.errors.empty())
- {
- if (GlobalState::debugging)
- {
- print_error_message(sources_and_errors.errors);
- }
- else
- {
- for (auto&& error : sources_and_errors.errors)
- {
- System::println(
- System::Color::warning, "Warning: an error occurred while parsing '%s'", error->name);
- }
- System::println(System::Color::warning,
- "Use '--debug' to get more information about the parse failures.\n");
- }
- }
-
- auto& source_paragraphs = sources_and_errors.paragraphs;
if (options.find(OPTION_GRAPH) != options.cend())
{
const std::string graph_as_string = create_graph_as_string(source_paragraphs);
diff --git a/toolsrc/src/vcpkg/commands.version.cpp b/toolsrc/src/vcpkg/commands.version.cpp
new file mode 100644
index 000000000..403c355b5
--- /dev/null
+++ b/toolsrc/src/vcpkg/commands.version.cpp
@@ -0,0 +1,76 @@
+#include "pch.h"
+
+#include <vcpkg/base/system.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/metrics.h>
+
+#define STRINGIFY(...) #__VA_ARGS__
+#define MACRO_TO_STRING(X) STRINGIFY(X)
+
+#define VCPKG_VERSION_AS_STRING MACRO_TO_STRING(VCPKG_VERSION)
+
+namespace vcpkg::Commands::Version
+{
+ const std::string& version()
+ {
+ static const std::string S_VERSION =
+#include "../VERSION.txt"
+
+ +std::string(VCPKG_VERSION_AS_STRING)
+#ifndef NDEBUG
+ + std::string("-debug")
+#endif
+ + std::string(Metrics::get_compiled_metrics_enabled() ? "" : "-external");
+ return S_VERSION;
+ }
+
+ static int scan3(const char* input, const char* pattern, int* a, int* b, int* c)
+ {
+#if defined(_WIN32)
+ return sscanf_s(input, pattern, a, b, c);
+#else
+ return sscanf(input, pattern, a, b, c);
+#endif
+ }
+
+ void warn_if_vcpkg_version_mismatch(const VcpkgPaths& paths)
+ {
+ auto version_file = paths.get_filesystem().read_contents(paths.root / "toolsrc" / "VERSION.txt");
+ if (const auto version_contents = version_file.get())
+ {
+ int maj1, min1, rev1;
+ const auto num1 = scan3(version_contents->c_str(), "\"%d.%d.%d\"", &maj1, &min1, &rev1);
+
+ int maj2, min2, rev2;
+ const auto num2 = scan3(Version::version().c_str(), "%d.%d.%d-", &maj2, &min2, &rev2);
+
+ if (num1 == 3 && num2 == 3)
+ {
+ if (maj1 != maj2 || min1 != min2 || rev1 != rev2)
+ {
+ System::println(System::Color::warning,
+ "Warning: Different source is available for vcpkg (%d.%d.%d -> %d.%d.%d). Use "
+ ".\\bootstrap-vcpkg.bat to update.",
+ maj2,
+ min2,
+ rev2,
+ maj1,
+ min1,
+ rev1);
+ }
+ }
+ }
+ }
+
+ void perform_and_exit(const VcpkgCmdArguments& args)
+ {
+ args.check_exact_arg_count(0);
+ args.check_and_get_optional_command_arguments({});
+
+ System::println("Vcpkg package management program version %s\n"
+ "\n"
+ "See LICENSE.txt for license information.",
+ version());
+ Checks::exit_success(VCPKG_LINE_INFO);
+ }
+}
diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp
index 1a0f0a6ed..02b2ec785 100644
--- a/toolsrc/src/vcpkg_Dependencies.cpp
+++ b/toolsrc/src/vcpkg/dependencies.cpp
@@ -1,15 +1,15 @@
#include "pch.h"
-#include "PackageSpec.h"
-#include "Paragraphs.h"
-#include "StatusParagraphs.h"
-#include "VcpkgPaths.h"
-#include "vcpkg_Dependencies.h"
-#include "vcpkg_Files.h"
-#include "vcpkg_Graphs.h"
-#include "vcpkg_Strings.h"
-#include "vcpkg_Util.h"
-#include "vcpkglib.h"
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/graphs.h>
+#include <vcpkg/base/strings.h>
+#include <vcpkg/base/util.h>
+#include <vcpkg/dependencies.h>
+#include <vcpkg/packagespec.h>
+#include <vcpkg/paragraphs.h>
+#include <vcpkg/statusparagraphs.h>
+#include <vcpkg/vcpkglib.h>
+#include <vcpkg/vcpkgpaths.h>
namespace vcpkg::Dependencies
{
@@ -43,14 +43,17 @@ namespace vcpkg::Dependencies
bool operator==(const ClusterPtr& l, const ClusterPtr& r) { return l.ptr == r.ptr; }
}
-template<>
-struct std::hash<vcpkg::Dependencies::ClusterPtr>
+namespace std
{
- size_t operator()(const vcpkg::Dependencies::ClusterPtr& value) const
+ template<>
+ struct hash<vcpkg::Dependencies::ClusterPtr>
{
- return std::hash<vcpkg::PackageSpec>()(value.ptr->spec);
- }
-};
+ size_t operator()(const vcpkg::Dependencies::ClusterPtr& value) const
+ {
+ return std::hash<vcpkg::PackageSpec>()(value.ptr->spec);
+ }
+ };
+}
namespace vcpkg::Dependencies
{
@@ -213,6 +216,21 @@ namespace vcpkg::Dependencies
{
}
+ const PackageSpec& AnyAction::spec() const
+ {
+ if (const auto p = install_plan.get())
+ {
+ return p->spec;
+ }
+
+ if (const auto p = remove_plan.get())
+ {
+ return p->spec;
+ }
+
+ Checks::exit_with_message(VCPKG_LINE_INFO, "Null action");
+ }
+
bool ExportPlanAction::compare_by_name(const ExportPlanAction* left, const ExportPlanAction* right)
{
return left->spec.name() < right->spec.name();
diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/vcpkg/export.cpp
index dbfb09aab..5e27d4126 100644
--- a/toolsrc/src/commands_export.cpp
+++ b/toolsrc/src/vcpkg/export.cpp
@@ -1,15 +1,19 @@
#include "pch.h"
-#include "Paragraphs.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_Dependencies.h"
-#include "vcpkg_Input.h"
-#include "vcpkg_System.h"
-#include "vcpkg_Util.h"
-#include "vcpkglib.h"
+#include <vcpkg/base/system.h>
+#include <vcpkg/base/util.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/dependencies.h>
+#include <vcpkg/export.ifw.h>
+#include <vcpkg/help.h>
+#include <vcpkg/input.h>
+#include <vcpkg/install.h>
+#include <vcpkg/paragraphs.h>
+#include <vcpkg/vcpkglib.h>
+
#include <regex>
-namespace vcpkg::Commands::Export
+namespace vcpkg::Export
{
using Dependencies::ExportPlanAction;
using Dependencies::ExportPlanType;
@@ -21,7 +25,7 @@ namespace vcpkg::Commands::Export
const std::string& nuget_id,
const std::string& nupkg_version)
{
- static constexpr auto content_template = R"(
+ static constexpr auto CONTENT_TEMPLATE = R"(
<package>
<metadata>
<id>@NUGET_ID@</id>
@@ -40,7 +44,7 @@ namespace vcpkg::Commands::Export
</package>
)";
- std::string nuspec_file_content = std::regex_replace(content_template, std::regex("@NUGET_ID@"), nuget_id);
+ std::string nuspec_file_content = std::regex_replace(CONTENT_TEMPLATE, std::regex("@NUGET_ID@"), nuget_id);
nuspec_file_content = std::regex_replace(nuspec_file_content, std::regex("@VERSION@"), nupkg_version);
nuspec_file_content =
std::regex_replace(nuspec_file_content, std::regex("@RAW_EXPORTED_DIR@"), raw_exported_dir);
@@ -62,10 +66,10 @@ namespace vcpkg::Commands::Export
static void print_plan(const std::map<ExportPlanType, std::vector<const ExportPlanAction*>>& group_by_plan_type)
{
- static constexpr std::array<ExportPlanType, 2> order = {ExportPlanType::ALREADY_BUILT,
+ static constexpr std::array<ExportPlanType, 2> ORDER = {ExportPlanType::ALREADY_BUILT,
ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT};
- for (const ExportPlanType plan_type : order)
+ for (const ExportPlanType plan_type : ORDER)
{
const auto it = group_by_plan_type.find(plan_type);
if (it == group_by_plan_type.cend())
@@ -133,11 +137,10 @@ namespace vcpkg::Commands::Export
fs.write_contents(nuspec_file_path, nuspec_file_content);
// -NoDefaultExcludes is needed for ".vcpkg-root"
- const std::wstring cmd_line =
- Strings::wformat(LR"("%s" pack -OutputDirectory "%s" "%s" -NoDefaultExcludes > nul)",
- nuget_exe.native(),
- output_dir.native(),
- nuspec_file_path.native());
+ const auto cmd_line = Strings::format(R"("%s" pack -OutputDirectory "%s" "%s" -NoDefaultExcludes > nul)",
+ nuget_exe.u8string(),
+ output_dir.u8string(),
+ nuspec_file_path.u8string());
const int exit_code = System::cmd_execute_clean(cmd_line);
Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: NuGet package creation failed");
@@ -151,30 +154,30 @@ namespace vcpkg::Commands::Export
enum class BackingEnum
{
ZIP = 1,
- _7ZIP,
+ SEVEN_ZIP,
};
constexpr ArchiveFormat() = delete;
- constexpr ArchiveFormat(BackingEnum backing_enum, const wchar_t* extension, const wchar_t* cmake_option)
+ constexpr ArchiveFormat(BackingEnum backing_enum, const char* extension, const char* cmake_option)
: backing_enum(backing_enum), m_extension(extension), m_cmake_option(cmake_option)
{
}
constexpr operator BackingEnum() const { return backing_enum; }
- constexpr CWStringView extension() const { return this->m_extension; }
- constexpr CWStringView cmake_option() const { return this->m_cmake_option; }
+ constexpr CStringView extension() const { return this->m_extension; }
+ constexpr CStringView cmake_option() const { return this->m_cmake_option; }
private:
BackingEnum backing_enum;
- const wchar_t* m_extension;
- const wchar_t* m_cmake_option;
+ const char* m_extension;
+ const char* m_cmake_option;
};
namespace ArchiveFormatC
{
- constexpr const ArchiveFormat ZIP(ArchiveFormat::BackingEnum::ZIP, L"zip", L"zip");
- constexpr const ArchiveFormat _7ZIP(ArchiveFormat::BackingEnum::_7ZIP, L"7z", L"7zip");
+ constexpr const ArchiveFormat ZIP(ArchiveFormat::BackingEnum::ZIP, "zip", "zip");
+ constexpr const ArchiveFormat SEVEN_ZIP(ArchiveFormat::BackingEnum::SEVEN_ZIP, "7z", "7zip");
}
static fs::path do_archive_export(const VcpkgPaths& paths,
@@ -184,17 +187,17 @@ namespace vcpkg::Commands::Export
{
const fs::path& cmake_exe = paths.get_cmake_exe();
- const std::wstring exported_dir_filename = raw_exported_dir.filename().native();
- const std::wstring exported_archive_filename =
- Strings::wformat(L"%s.%s", exported_dir_filename, format.extension());
+ const std::string exported_dir_filename = raw_exported_dir.filename().u8string();
+ const std::string exported_archive_filename =
+ Strings::format("%s.%s", exported_dir_filename, format.extension());
const fs::path exported_archive_path = (output_dir / exported_archive_filename);
// -NoDefaultExcludes is needed for ".vcpkg-root"
- const std::wstring cmd_line = Strings::wformat(LR"("%s" -E tar "cf" "%s" --format=%s -- "%s")",
- cmake_exe.native(),
- exported_archive_path.native(),
- format.cmake_option(),
- raw_exported_dir.native());
+ const auto cmd_line = Strings::format(R"("%s" -E tar "cf" "%s" --format=%s -- "%s")",
+ cmake_exe.u8string(),
+ exported_archive_path.u8string(),
+ format.cmake_option(),
+ raw_exported_dir.u8string());
const int exit_code = System::cmd_execute_clean(cmd_line);
Checks::check_exit(
@@ -210,103 +213,167 @@ namespace vcpkg::Commands::Export
return nullopt;
}
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet)
+ void export_integration_files(const fs::path& raw_exported_dir_path, const VcpkgPaths& paths)
+ {
+ const std::vector<fs::path> integration_files_relative_to_root = {
+ {".vcpkg-root"},
+ {fs::path{"scripts"} / "buildsystems" / "msbuild" / "applocal.ps1"},
+ {fs::path{"scripts"} / "buildsystems" / "msbuild" / "vcpkg.targets"},
+ {fs::path{"scripts"} / "buildsystems" / "vcpkg.cmake"},
+ {fs::path{"scripts"} / "cmake" / "vcpkg_get_windows_sdk.cmake"},
+ {fs::path{"scripts"} / "getWindowsSDK.ps1"},
+ {fs::path{"scripts"} / "getProgramFilesPlatformBitness.ps1"},
+ {fs::path{"scripts"} / "getProgramFiles32bit.ps1"},
+ };
+
+ for (const fs::path& file : integration_files_relative_to_root)
+ {
+ const fs::path source = paths.root / file;
+ fs::path destination = raw_exported_dir_path / file;
+ Files::Filesystem& fs = paths.get_filesystem();
+ std::error_code ec;
+ fs.create_directories(destination.parent_path(), ec);
+ Checks::check_exit(VCPKG_LINE_INFO, !ec);
+ fs.copy_file(source, destination, fs::copy_options::overwrite_existing, ec);
+ Checks::check_exit(VCPKG_LINE_INFO, !ec);
+ }
+ }
+
+ struct ExportArguments
{
+ bool dry_run;
+ bool raw;
+ bool nuget;
+ bool ifw;
+ bool zip;
+ bool seven_zip;
+
+ Optional<std::string> maybe_nuget_id;
+ Optional<std::string> maybe_nuget_version;
+
+ IFW::Options ifw_options;
+ std::vector<PackageSpec> specs;
+ };
+
+ static ExportArguments handle_export_command_arguments(const VcpkgCmdArguments& args,
+ const Triplet& default_triplet)
+ {
+ ExportArguments ret;
+
static const std::string OPTION_DRY_RUN = "--dry-run";
static const std::string OPTION_RAW = "--raw";
static const std::string OPTION_NUGET = "--nuget";
+ static const std::string OPTION_IFW = "--ifw";
static const std::string OPTION_ZIP = "--zip";
- static const std::string OPTION_7ZIP = "--7zip";
+ static const std::string OPTION_SEVEN_ZIP = "--7zip";
static const std::string OPTION_NUGET_ID = "--nuget-id";
static const std::string OPTION_NUGET_VERSION = "--nuget-version";
+ static const std::string OPTION_IFW_REPOSITORY_URL = "--ifw-repository-url";
+ static const std::string OPTION_IFW_PACKAGES_DIR_PATH = "--ifw-packages-directory-path";
+ static const std::string OPTION_IFW_REPOSITORY_DIR_PATH = "--ifw-repository-directory-path";
+ static const std::string OPTION_IFW_CONFIG_FILE_PATH = "--ifw-configuration-file-path";
+ static const std::string OPTION_IFW_INSTALLER_FILE_PATH = "--ifw-installer-file-path";
// input sanitization
- static const std::string example =
- Commands::Help::create_example_string("export zlib zlib:x64-windows boost --nuget");
- args.check_min_arg_count(1, example);
+ static const std::string EXAMPLE = Help::create_example_string("export zlib zlib:x64-windows boost --nuget");
+ args.check_min_arg_count(1, EXAMPLE);
- const std::vector<PackageSpec> specs = Util::fmap(args.command_arguments, [&](auto&& arg) {
- return Input::check_and_get_package_spec(arg, default_triplet, example);
+ ret.specs = Util::fmap(args.command_arguments, [&](auto&& arg) {
+ return Input::check_and_get_package_spec(arg, default_triplet, EXAMPLE);
});
- for (auto&& spec : specs)
- Input::check_triplet(spec.triplet(), paths);
const auto options = args.check_and_get_optional_command_arguments(
{
OPTION_DRY_RUN,
OPTION_RAW,
OPTION_NUGET,
+ OPTION_IFW,
OPTION_ZIP,
- OPTION_7ZIP,
+ OPTION_SEVEN_ZIP,
},
{
OPTION_NUGET_ID,
OPTION_NUGET_VERSION,
+ OPTION_IFW_REPOSITORY_URL,
+ OPTION_IFW_PACKAGES_DIR_PATH,
+ OPTION_IFW_REPOSITORY_DIR_PATH,
+ OPTION_IFW_CONFIG_FILE_PATH,
+ OPTION_IFW_INSTALLER_FILE_PATH,
});
- const bool dryRun = options.switches.find(OPTION_DRY_RUN) != options.switches.cend();
- const bool raw = options.switches.find(OPTION_RAW) != options.switches.cend();
- const bool nuget = options.switches.find(OPTION_NUGET) != options.switches.cend();
- const bool zip = options.switches.find(OPTION_ZIP) != options.switches.cend();
- const bool _7zip = options.switches.find(OPTION_7ZIP) != options.switches.cend();
-
- if (!raw && !nuget && !zip && !_7zip && !dryRun)
- {
- System::println(System::Color::error, "Must provide at least one export type: --raw --nuget --zip --7zip");
- System::print(example);
- Checks::exit_fail(VCPKG_LINE_INFO);
- }
-
- auto maybe_nuget_id = maybe_lookup(options.settings, OPTION_NUGET_ID);
- auto maybe_nuget_version = maybe_lookup(options.settings, OPTION_NUGET_VERSION);
-
- Checks::check_exit(VCPKG_LINE_INFO, !maybe_nuget_id || nuget, "--nuget-id is only valid with --nuget");
- Checks::check_exit(
- VCPKG_LINE_INFO, !maybe_nuget_version || nuget, "--nuget-version is only valid with --nuget");
-
- // create the plan
- const StatusParagraphs status_db = database_load_check(paths);
- std::vector<ExportPlanAction> export_plan = Dependencies::create_export_plan(paths, specs, status_db);
- Checks::check_exit(VCPKG_LINE_INFO, !export_plan.empty(), "Export plan cannot be empty");
-
- std::map<ExportPlanType, std::vector<const ExportPlanAction*>> group_by_plan_type;
- Util::group_by(export_plan, &group_by_plan_type, [](const ExportPlanAction& p) { return p.plan_type; });
- print_plan(group_by_plan_type);
-
- const bool has_non_user_requested_packages =
- Util::find_if(export_plan, [](const ExportPlanAction& package) -> bool {
- return package.request_type != RequestType::USER_REQUESTED;
- }) != export_plan.cend();
-
- if (has_non_user_requested_packages)
- {
- System::println(System::Color::warning,
- "Additional packages (*) need to be exported to complete this operation.");
- }
-
- const auto it = group_by_plan_type.find(ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT);
- if (it != group_by_plan_type.cend() && !it->second.empty())
+ ret.dry_run = options.switches.find(OPTION_DRY_RUN) != options.switches.cend();
+ ret.raw = options.switches.find(OPTION_RAW) != options.switches.cend();
+ ret.nuget = options.switches.find(OPTION_NUGET) != options.switches.cend();
+ ret.ifw = options.switches.find(OPTION_IFW) != options.switches.cend();
+ ret.zip = options.switches.find(OPTION_ZIP) != options.switches.cend();
+ ret.seven_zip = options.switches.find(OPTION_SEVEN_ZIP) != options.switches.cend();
+
+ if (!ret.raw && !ret.nuget && !ret.ifw && !ret.zip && !ret.seven_zip && !ret.dry_run)
{
- System::println(System::Color::error, "There are packages that have not been built.");
-
- // No need to show all of them, just the user-requested ones. Dependency resolution will handle the rest.
- std::vector<const ExportPlanAction*> unbuilt = it->second;
- Util::erase_remove_if(
- unbuilt, [](const ExportPlanAction* a) { return a->request_type != RequestType::USER_REQUESTED; });
-
- const auto s = Strings::join(" ", unbuilt, [](const ExportPlanAction* a) { return a->spec.to_string(); });
- System::println("To build them, run:\n"
- " vcpkg install %s",
- s);
+ System::println(System::Color::error,
+ "Must provide at least one export type: --raw --nuget --ifw --zip --7zip");
+ System::print(EXAMPLE);
Checks::exit_fail(VCPKG_LINE_INFO);
}
- if (dryRun)
+ struct OptionPair
{
- Checks::exit_success(VCPKG_LINE_INFO);
- }
+ const std::string& name;
+ Optional<std::string>& out_opt;
+ };
+ const auto options_implies =
+ [&](const std::string& main_opt_name, bool main_opt, Span<const OptionPair> implying_opts) {
+ if (main_opt)
+ {
+ for (auto&& opt : implying_opts)
+ opt.out_opt = maybe_lookup(options.settings, opt.name);
+ }
+ else
+ {
+ for (auto&& opt : implying_opts)
+ Checks::check_exit(VCPKG_LINE_INFO,
+ !maybe_lookup(options.settings, opt.name),
+ "%s is only valid with %s",
+ opt.name,
+ main_opt_name);
+ }
+ };
+
+ options_implies(OPTION_NUGET,
+ ret.nuget,
+ {
+ {OPTION_NUGET_ID, ret.maybe_nuget_id},
+ {OPTION_NUGET_VERSION, ret.maybe_nuget_version},
+ });
+
+ options_implies(OPTION_IFW,
+ ret.ifw,
+ {
+ {OPTION_IFW_REPOSITORY_URL, ret.ifw_options.maybe_repository_url},
+ {OPTION_IFW_PACKAGES_DIR_PATH, ret.ifw_options.maybe_packages_dir_path},
+ {OPTION_IFW_REPOSITORY_DIR_PATH, ret.ifw_options.maybe_repository_dir_path},
+ {OPTION_IFW_CONFIG_FILE_PATH, ret.ifw_options.maybe_config_file_path},
+ {OPTION_IFW_INSTALLER_FILE_PATH, ret.ifw_options.maybe_installer_file_path},
+ });
+ return ret;
+ }
- const std::string export_id = create_export_id();
+ static void print_next_step_info(const fs::path& prefix)
+ {
+ const fs::path cmake_toolchain = prefix / "scripts" / "buildsystems" / "vcpkg.cmake";
+ const CMakeVariable cmake_variable = CMakeVariable("CMAKE_TOOLCHAIN_FILE", cmake_toolchain.generic_string());
+ System::println("\n"
+ "To use the exported libraries in CMake projects use:"
+ "\n"
+ " %s"
+ "\n",
+ cmake_variable.s);
+ };
+ static void handle_raw_based_export(Span<const ExportPlanAction> export_plan,
+ const ExportArguments& opts,
+ const std::string& export_id,
+ const VcpkgPaths& paths)
+ {
Files::Filesystem& fs = paths.get_filesystem();
const fs::path export_to_path = paths.root;
const fs::path raw_exported_dir_path = export_to_path / export_id;
@@ -327,6 +394,7 @@ namespace vcpkg::Commands::Export
const BinaryParagraph& binary_paragraph =
action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph;
+
const InstallDir dirs = InstallDir::from_destination_root(
raw_exported_dir_path / "installed",
action.spec.triplet().to_string(),
@@ -337,52 +405,21 @@ namespace vcpkg::Commands::Export
}
// Copy files needed for integration
- const std::vector<fs::path> integration_files_relative_to_root = {
- {".vcpkg-root"},
- {fs::path{"scripts"} / "buildsystems" / "msbuild" / "applocal.ps1"},
- {fs::path{"scripts"} / "buildsystems" / "msbuild" / "vcpkg.targets"},
- {fs::path{"scripts"} / "buildsystems" / "vcpkg.cmake"},
- {fs::path{"scripts"} / "cmake" / "vcpkg_get_windows_sdk.cmake"},
- {fs::path{"scripts"} / "getWindowsSDK.ps1"},
- {fs::path{"scripts"} / "getProgramFilesPlatformBitness.ps1"},
- {fs::path{"scripts"} / "getProgramFiles32bit.ps1"},
- };
-
- for (const fs::path& file : integration_files_relative_to_root)
- {
- const fs::path source = paths.root / file;
- const fs::path destination = raw_exported_dir_path / file;
- fs.create_directories(destination.parent_path(), ec);
- Checks::check_exit(VCPKG_LINE_INFO, !ec);
- fs.copy_file(source, destination, fs::copy_options::overwrite_existing, ec);
- Checks::check_exit(VCPKG_LINE_INFO, !ec);
- }
+ export_integration_files(raw_exported_dir_path, paths);
- const auto print_next_step_info = [](const fs::path& prefix) {
- const fs::path cmake_toolchain = prefix / "scripts" / "buildsystems" / "vcpkg.cmake";
- const CMakeVariable cmake_variable =
- CMakeVariable(L"CMAKE_TOOLCHAIN_FILE", cmake_toolchain.generic_string());
- System::println("\n"
- "To use the exported libraries in CMake projects use:"
- "\n"
- " %s"
- "\n",
- Strings::to_utf8(cmake_variable.s));
- };
-
- if (raw)
+ if (opts.raw)
{
System::println(
System::Color::success, R"(Files exported at: "%s")", raw_exported_dir_path.generic_string());
print_next_step_info(export_to_path);
}
- if (nuget)
+ if (opts.nuget)
{
System::println("Creating nuget package... ");
- const std::string nuget_id = maybe_nuget_id.value_or(raw_exported_dir_path.filename().string());
- const std::string nuget_version = maybe_nuget_version.value_or("1.0.0");
+ const std::string nuget_id = opts.maybe_nuget_id.value_or(raw_exported_dir_path.filename().string());
+ const std::string nuget_version = opts.maybe_nuget_version.value_or("1.0.0");
const fs::path output_path =
do_nuget_export(paths, nuget_id, nuget_version, raw_exported_dir_path, export_to_path);
System::println(System::Color::success, "Creating nuget package... done");
@@ -397,7 +434,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console
output_path.parent_path().u8string());
}
- if (zip)
+ if (opts.zip)
{
System::println("Creating zip archive... ");
const fs::path output_path =
@@ -407,20 +444,83 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console
print_next_step_info("[...]");
}
- if (_7zip)
+ if (opts.seven_zip)
{
System::println("Creating 7zip archive... ");
const fs::path output_path =
- do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::_7ZIP);
+ do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::SEVEN_ZIP);
System::println(System::Color::success, "Creating 7zip archive... done");
System::println(System::Color::success, "7zip archive exported at: %s", output_path.generic_string());
print_next_step_info("[...]");
}
- if (!raw)
+ if (!opts.raw)
{
fs.remove_all(raw_exported_dir_path, ec);
}
+ }
+
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet)
+ {
+ const auto opts = handle_export_command_arguments(args, default_triplet);
+ for (auto&& spec : opts.specs)
+ Input::check_triplet(spec.triplet(), paths);
+
+ // create the plan
+ const StatusParagraphs status_db = database_load_check(paths);
+ std::vector<ExportPlanAction> export_plan = Dependencies::create_export_plan(paths, opts.specs, status_db);
+ Checks::check_exit(VCPKG_LINE_INFO, !export_plan.empty(), "Export plan cannot be empty");
+
+ std::map<ExportPlanType, std::vector<const ExportPlanAction*>> group_by_plan_type;
+ Util::group_by(export_plan, &group_by_plan_type, [](const ExportPlanAction& p) { return p.plan_type; });
+ print_plan(group_by_plan_type);
+
+ const bool has_non_user_requested_packages =
+ Util::find_if(export_plan, [](const ExportPlanAction& package) -> bool {
+ return package.request_type != RequestType::USER_REQUESTED;
+ }) != export_plan.cend();
+
+ if (has_non_user_requested_packages)
+ {
+ System::println(System::Color::warning,
+ "Additional packages (*) need to be exported to complete this operation.");
+ }
+
+ const auto it = group_by_plan_type.find(ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT);
+ if (it != group_by_plan_type.cend() && !it->second.empty())
+ {
+ System::println(System::Color::error, "There are packages that have not been built.");
+
+ // No need to show all of them, just the user-requested ones. Dependency resolution will handle the rest.
+ std::vector<const ExportPlanAction*> unbuilt = it->second;
+ Util::erase_remove_if(
+ unbuilt, [](const ExportPlanAction* a) { return a->request_type != RequestType::USER_REQUESTED; });
+
+ const auto s = Strings::join(" ", unbuilt, [](const ExportPlanAction* a) { return a->spec.to_string(); });
+ System::println("To build them, run:\n"
+ " vcpkg install %s",
+ s);
+ Checks::exit_fail(VCPKG_LINE_INFO);
+ }
+
+ if (opts.dry_run)
+ {
+ Checks::exit_success(VCPKG_LINE_INFO);
+ }
+
+ std::string export_id = create_export_id();
+
+ if (opts.raw || opts.nuget || opts.zip || opts.seven_zip)
+ {
+ handle_raw_based_export(export_plan, opts, export_id, paths);
+ }
+
+ if (opts.ifw)
+ {
+ IFW::do_export(export_plan, export_id, opts.ifw_options, paths);
+
+ print_next_step_info("@RootDir@/src/vcpkg");
+ }
Checks::exit_success(VCPKG_LINE_INFO);
}
diff --git a/toolsrc/src/vcpkg/globalstate.cpp b/toolsrc/src/vcpkg/globalstate.cpp
new file mode 100644
index 000000000..43230fa4b
--- /dev/null
+++ b/toolsrc/src/vcpkg/globalstate.cpp
@@ -0,0 +1,13 @@
+#include "pch.h"
+
+#include <vcpkg/globalstate.h>
+
+namespace vcpkg
+{
+ Util::LockGuarded<Chrono::ElapsedTime> GlobalState::timer;
+ std::atomic<bool> GlobalState::debugging(false);
+ std::atomic<bool> GlobalState::feature_packages(false);
+
+ std::atomic<int> GlobalState::g_init_console_cp(0);
+ std::atomic<int> GlobalState::g_init_console_output_cp(0);
+}
diff --git a/toolsrc/src/commands_help.cpp b/toolsrc/src/vcpkg/help.cpp
index a12f9003d..2a0578211 100644
--- a/toolsrc/src/commands_help.cpp
+++ b/toolsrc/src/vcpkg/help.cpp
@@ -1,9 +1,9 @@
#include "pch.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_System.h"
+#include <vcpkg/base/system.h>
+#include <vcpkg/commands.h>
-namespace vcpkg::Commands::Help
+namespace vcpkg::Help
{
void help_topics()
{
@@ -16,9 +16,9 @@ namespace vcpkg::Commands::Help
void help_topic_valid_triplet(const VcpkgPaths& paths)
{
System::println("Available architecture triplets:");
- for (auto&& path : paths.get_filesystem().get_files_non_recursive(paths.triplets))
+ for (auto&& triplet : paths.get_available_triplets())
{
- System::println(" %s", path.stem().filename().string());
+ System::println(" %s", triplet);
}
}
@@ -75,7 +75,7 @@ namespace vcpkg::Commands::Help
" (default: %%VCPKG_ROOT%%)\n"
"\n"
"For more help (including examples) see the accompanying README.md.",
- Integrate::INTEGRATE_COMMAND_HELPSTRING);
+ Commands::Integrate::INTEGRATE_COMMAND_HELPSTRING);
}
std::string create_example_string(const std::string& command_and_arguments)
@@ -114,7 +114,7 @@ namespace vcpkg::Commands::Help
{
System::print("Commands:\n"
"%s",
- Integrate::INTEGRATE_COMMAND_HELPSTRING);
+ Commands::Integrate::INTEGRATE_COMMAND_HELPSTRING);
}
else if (topic == "topics")
{
diff --git a/toolsrc/src/vcpkg_Input.cpp b/toolsrc/src/vcpkg/input.cpp
index 153e6a942..aee0fac7f 100644
--- a/toolsrc/src/vcpkg_Input.cpp
+++ b/toolsrc/src/vcpkg/input.cpp
@@ -1,9 +1,10 @@
#include "pch.h"
-#include "metrics.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_Input.h"
-#include "vcpkg_System.h"
+#include <vcpkg/base/system.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/help.h>
+#include <vcpkg/input.h>
+#include <vcpkg/metrics.h>
namespace vcpkg::Input
{
@@ -13,7 +14,7 @@ namespace vcpkg::Input
{
const std::string as_lowercase = Strings::ascii_to_lowercase(package_spec_as_string);
auto expected_spec = FullPackageSpec::from_string(as_lowercase, default_triplet);
- if (auto spec = expected_spec.get())
+ if (const auto spec = expected_spec.get())
{
return PackageSpec{spec->package_spec};
}
@@ -30,7 +31,7 @@ namespace vcpkg::Input
{
System::println(System::Color::error, "Error: invalid triplet: %s", t);
Metrics::g_metrics.lock()->track_property("error", "invalid triplet: " + t.to_string());
- Commands::Help::help_topic_valid_triplet(paths);
+ Help::help_topic_valid_triplet(paths);
Checks::exit_fail(VCPKG_LINE_INFO);
}
}
@@ -41,7 +42,7 @@ namespace vcpkg::Input
{
const std::string as_lowercase = Strings::ascii_to_lowercase(full_package_spec_as_string);
auto expected_spec = FullPackageSpec::from_string(as_lowercase, default_triplet);
- if (auto spec = expected_spec.get())
+ if (const auto spec = expected_spec.get())
{
return *spec;
}
diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/vcpkg/install.cpp
index 8b1eec5eb..adbd8c943 100644
--- a/toolsrc/src/commands_install.cpp
+++ b/toolsrc/src/vcpkg/install.cpp
@@ -1,18 +1,21 @@
#include "pch.h"
-#include "Paragraphs.h"
-#include "metrics.h"
-#include "vcpkg_Build.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_Dependencies.h"
-#include "vcpkg_Files.h"
-#include "vcpkg_GlobalState.h"
-#include "vcpkg_Input.h"
-#include "vcpkg_System.h"
-#include "vcpkg_Util.h"
-#include "vcpkglib.h"
-
-namespace vcpkg::Commands::Install
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/system.h>
+#include <vcpkg/base/util.h>
+#include <vcpkg/build.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/dependencies.h>
+#include <vcpkg/globalstate.h>
+#include <vcpkg/help.h>
+#include <vcpkg/input.h>
+#include <vcpkg/install.h>
+#include <vcpkg/metrics.h>
+#include <vcpkg/paragraphs.h>
+#include <vcpkg/remove.h>
+#include <vcpkg/vcpkglib.h>
+
+namespace vcpkg::Install
{
using namespace Dependencies;
@@ -59,7 +62,7 @@ namespace vcpkg::Commands::Install
auto files = fs.get_files_recursive(source_dir);
for (auto&& file : files)
{
- auto status = fs.status(file, ec);
+ const auto status = fs.status(file, ec);
if (ec)
{
System::println(System::Color::error, "failed: %s: %s", file.u8string(), ec.message());
@@ -67,9 +70,8 @@ namespace vcpkg::Commands::Install
}
const std::string filename = file.filename().generic_string();
- if (fs::is_regular_file(status) &&
- (Strings::case_insensitive_ascii_compare(filename.c_str(), "CONTROL") == 0 ||
- Strings::case_insensitive_ascii_compare(filename.c_str(), "BUILD_INFO") == 0))
+ if (fs::is_regular_file(status) && (Strings::case_insensitive_ascii_equals(filename.c_str(), "CONTROL") ||
+ Strings::case_insensitive_ascii_equals(filename.c_str(), "BUILD_INFO")))
{
// Do not copy the control file
continue;
@@ -142,7 +144,7 @@ namespace vcpkg::Commands::Install
continue;
}
- output.insert(output.end(), t.files.begin(), t.files.end());
+ Util::Vectors::concatenate(&output, t.files);
}
std::sort(output.begin(), output.end());
@@ -309,7 +311,7 @@ namespace vcpkg::Commands::Install
const BinaryControlFile bcf =
Paragraphs::try_load_cached_control_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO);
System::println("Installing package %s... ", display_name_with_features);
- auto install_result = install_package(paths, bcf, &status_db);
+ const auto install_result = install_package(paths, bcf, &status_db);
switch (install_result)
{
case InstallResult::SUCCESS:
@@ -328,7 +330,7 @@ namespace vcpkg::Commands::Install
System::Color::warning, "Package %s is already built -- not building from HEAD", display_name);
}
System::println("Installing package %s... ", display_name);
- auto install_result = install_package(
+ const auto install_result = install_package(
paths, action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO), &status_db);
switch (install_result)
{
@@ -442,20 +444,126 @@ namespace vcpkg::Commands::Install
}
}
- void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet)
+ void perform_and_exit_ex(const std::vector<AnyAction>& action_plan,
+ const Build::BuildPackageOptions& install_plan_options,
+ const KeepGoing keep_going,
+ const PrintSummary print_summary,
+ const VcpkgPaths& paths,
+ StatusParagraphs& status_db)
{
- static const std::string OPTION_DRY_RUN = "--dry-run";
- static const std::string OPTION_USE_HEAD_VERSION = "--head";
- static const std::string OPTION_NO_DOWNLOADS = "--no-downloads";
- static const std::string OPTION_RECURSE = "--recurse";
+ std::vector<BuildResult> results;
+ std::vector<std::string> timing;
+ const auto timer = Chrono::ElapsedTime::create_started();
+ size_t counter = 0;
+ const size_t package_count = action_plan.size();
+
+ for (const auto& action : action_plan)
+ {
+ const auto build_timer = Chrono::ElapsedTime::create_started();
+ counter++;
+
+ const std::string display_name = action.spec().to_string();
+ System::println("Starting package %d/%d: %s", counter, package_count, display_name);
+
+ timing.push_back("0");
+ results.push_back(BuildResult::NULLVALUE);
+
+ if (const auto install_action = action.install_plan.get())
+ {
+ const BuildResult result =
+ perform_install_plan_action(paths, *install_action, install_plan_options, status_db);
+ if (result != BuildResult::SUCCEEDED && keep_going == KeepGoing::NO)
+ {
+ System::println(Build::create_user_troubleshooting_message(install_action->spec));
+ Checks::exit_fail(VCPKG_LINE_INFO);
+ }
+
+ results.back() = result;
+ }
+ else if (const auto remove_action = action.remove_plan.get())
+ {
+ Checks::check_exit(VCPKG_LINE_INFO, GlobalState::feature_packages);
+ Remove::perform_remove_plan_action(paths, *remove_action, Remove::Purge::YES, status_db);
+ }
+ else
+ {
+ Checks::unreachable(VCPKG_LINE_INFO);
+ }
+
+ timing.back() = build_timer.to_string();
+ System::println("Elapsed time for package %s: %s", display_name, build_timer.to_string());
+ }
+
+ System::println("Total time taken: %s", timer.to_string());
+
+ if (print_summary == PrintSummary::YES)
+ {
+ for (size_t i = 0; i < results.size(); i++)
+ {
+ System::println("%s: %s: %s", action_plan[i].spec(), Build::to_string(results[i]), timing[i]);
+ }
+
+ std::map<BuildResult, int> summary;
+ for (const BuildResult& v : Build::BUILD_RESULT_VALUES)
+ {
+ summary[v] = 0;
+ }
+
+ for (const BuildResult& r : results)
+ {
+ summary[r]++;
+ }
+
+ System::println("\n\nSUMMARY");
+ for (const std::pair<const BuildResult, int>& entry : summary)
+ {
+ System::println(" %s: %d", Build::to_string(entry.first), entry.second);
+ }
+ }
+
+ Checks::exit_success(VCPKG_LINE_INFO);
+ }
+
+ static const std::string OPTION_DRY_RUN = "--dry-run";
+ static const std::string OPTION_USE_HEAD_VERSION = "--head";
+ static const std::string OPTION_NO_DOWNLOADS = "--no-downloads";
+ static const std::string OPTION_RECURSE = "--recurse";
+ static const std::string OPTION_KEEP_GOING = "--keep-going";
+
+ static const std::array<std::string, 5> INSTALL_SWITCHES = {
+ OPTION_DRY_RUN,
+ OPTION_USE_HEAD_VERSION,
+ OPTION_NO_DOWNLOADS,
+ OPTION_RECURSE,
+ OPTION_KEEP_GOING,
+ };
+ static const std::array<std::string, 0> INSTALL_SETTINGS;
+ static std::vector<std::string> valid_arguments(const VcpkgPaths& paths)
+ {
+ auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports);
+
+ return Util::fmap(sources_and_errors.paragraphs,
+ [](auto&& pgh) -> std::string { return pgh->core_paragraph->name; });
+ }
+
+ const CommandStructure COMMAND_STRUCTURE = {
+ "install zlib zlib:x64-windows curl boost",
+ 1,
+ SIZE_MAX,
+ INSTALL_SWITCHES,
+ INSTALL_SETTINGS,
+ &valid_arguments,
+ };
+
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet)
+ {
// input sanitization
- static const std::string example =
- Commands::Help::create_example_string("install zlib zlib:x64-windows curl boost");
- args.check_min_arg_count(1, example);
+ static const std::string EXAMPLE = Help::create_example_string("install zlib zlib:x64-windows curl boost");
+ args.check_min_arg_count(1, EXAMPLE);
const std::vector<FullPackageSpec> specs = Util::fmap(args.command_arguments, [&](auto&& arg) {
- return Input::check_and_get_full_package_spec(arg, default_triplet, example);
+ return Input::check_and_get_full_package_spec(arg, default_triplet, EXAMPLE);
});
for (auto&& spec : specs)
@@ -469,11 +577,13 @@ namespace vcpkg::Commands::Install
}
const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments(
- {OPTION_DRY_RUN, OPTION_USE_HEAD_VERSION, OPTION_NO_DOWNLOADS, OPTION_RECURSE});
- const bool dryRun = options.find(OPTION_DRY_RUN) != options.cend();
+ {OPTION_DRY_RUN, OPTION_USE_HEAD_VERSION, OPTION_NO_DOWNLOADS, OPTION_RECURSE, OPTION_KEEP_GOING});
+ const bool dry_run = options.find(OPTION_DRY_RUN) != options.cend();
const bool use_head_version = options.find(OPTION_USE_HEAD_VERSION) != options.cend();
const bool no_downloads = options.find(OPTION_NO_DOWNLOADS) != options.cend();
const bool is_recursive = options.find(OPTION_RECURSE) != options.cend();
+ const KeepGoing keep_going = to_keep_going(options.find(OPTION_KEEP_GOING) != options.cend());
+ const PrintSummary print_summary = to_print_summary(keep_going == KeepGoing::YES);
// create the plan
StatusParagraphs status_db = database_load_check(paths);
@@ -486,8 +596,8 @@ namespace vcpkg::Commands::Install
if (GlobalState::feature_packages)
{
std::unordered_map<std::string, SourceControlFile> scf_map;
- auto all_ports = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports);
- for (auto&& port : all_ports.paragraphs)
+ auto all_ports = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports);
+ for (auto&& port : all_ports)
{
scf_map[port->core_paragraph->name] = std::move(*port);
}
@@ -519,78 +629,12 @@ namespace vcpkg::Commands::Install
print_plan(action_plan, is_recursive);
- if (dryRun)
+ if (dry_run)
{
Checks::exit_success(VCPKG_LINE_INFO);
}
- // execute the plan
- if (GlobalState::feature_packages)
- {
- for (const auto& action : action_plan)
- {
- if (auto install_action = action.install_plan.get())
- {
- const BuildResult result =
- perform_install_plan_action(paths, *install_action, install_plan_options, status_db);
- if (result != BuildResult::SUCCEEDED)
- {
- System::println(Build::create_user_troubleshooting_message(install_action->spec));
- Checks::exit_fail(VCPKG_LINE_INFO);
- }
- }
- else if (auto remove_action = action.remove_plan.get())
- {
- static const std::string OPTION_PURGE = "--purge";
- static const std::string OPTION_NO_PURGE = "--no-purge";
-
- const bool alsoRemoveFolderFromPackages = options.find(OPTION_NO_PURGE) == options.end();
- if (options.find(OPTION_PURGE) != options.end() && !alsoRemoveFolderFromPackages)
- {
- // User specified --purge and --no-purge
- System::println(System::Color::error, "Error: cannot specify both --no-purge and --purge.");
- System::print(example);
- Checks::exit_fail(VCPKG_LINE_INFO);
- }
- const std::string display_name = remove_action->spec.to_string();
- switch (remove_action->plan_type)
- {
- case RemovePlanType::NOT_INSTALLED:
- System::println(System::Color::success, "Package %s is not installed", display_name);
- break;
- case RemovePlanType::REMOVE:
- System::println("Removing package %s... ", display_name);
- Commands::Remove::remove_package(paths, remove_action->spec, &status_db);
- System::println(System::Color::success, "Removing package %s... done", display_name);
- break;
- case RemovePlanType::UNKNOWN:
- default: Checks::unreachable(VCPKG_LINE_INFO);
- }
-
- if (alsoRemoveFolderFromPackages)
- {
- System::println("Purging package %s... ", display_name);
- Files::Filesystem& fs = paths.get_filesystem();
- std::error_code ec;
- fs.remove_all(paths.packages / remove_action->spec.dir(), ec);
- System::println(System::Color::success, "Purging package %s... done", display_name);
- }
- }
- }
- }
- else
- {
- for (const auto& action : action_plan)
- {
- const auto& iaction = action.install_plan.value_or_exit(VCPKG_LINE_INFO);
- const BuildResult result = perform_install_plan_action(paths, iaction, install_plan_options, status_db);
- if (result != BuildResult::SUCCEEDED)
- {
- System::println(Build::create_user_troubleshooting_message(iaction.spec));
- Checks::exit_fail(VCPKG_LINE_INFO);
- }
- }
- }
+ perform_and_exit_ex(action_plan, install_plan_options, keep_going, print_summary, paths, status_db);
Checks::exit_success(VCPKG_LINE_INFO);
}
diff --git a/toolsrc/src/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp
index 8a7d02a30..8f2575886 100644
--- a/toolsrc/src/metrics.cpp
+++ b/toolsrc/src/vcpkg/metrics.cpp
@@ -1,10 +1,13 @@
#include "pch.h"
-#include "filesystem_fs.h"
-#include "metrics.h"
-#include "vcpkg_Files.h"
-#include "vcpkg_Strings.h"
-#include "vcpkg_System.h"
+#include <vcpkg/metrics.h>
+
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/strings.h>
+#include <vcpkg/base/system.h>
+
+#pragma comment(lib, "version")
+#pragma comment(lib, "winhttp")
namespace vcpkg::Metrics
{
@@ -16,17 +19,25 @@ namespace vcpkg::Metrics
std::array<char, 80> date;
date.fill(0);
+#if defined(_WIN32)
struct _timeb timebuffer;
_ftime_s(&timebuffer);
time_t now = timebuffer.time;
- int milli = timebuffer.millitm;
+ const int milli = timebuffer.millitm;
+
+ const errno_t err = gmtime_s(&newtime, &now);
- errno_t err = gmtime_s(&newtime, &now);
if (err)
{
- return Strings::EMPTY;
+ return "";
}
+#else
+ time_t now;
+ time(&now);
+ gmtime_r(&now, &newtime);
+ const int milli = 0;
+#endif
strftime(&date[0], date.size(), "%Y-%m-%dT%H:%M:%S", &newtime);
return std::string(&date[0]) + "." + std::to_string(milli) + "Z";
@@ -34,7 +45,7 @@ namespace vcpkg::Metrics
static std::string generate_random_UUID()
{
- int partSizes[] = {8, 4, 4, 4, 12};
+ int part_sizes[] = {8, 4, 4, 4, 12};
char uuid[37];
memset(uuid, 0, sizeof(uuid));
int num;
@@ -50,7 +61,7 @@ namespace vcpkg::Metrics
// Generating UUID format version 4
// http://en.wikipedia.org/wiki/Universally_unique_identifier
- for (int i = 0; i < partSizes[part]; i++, index++)
+ for (int i = 0; i < part_sizes[part]; i++, index++)
{
if (part == 2 && i == 0)
{
@@ -81,8 +92,8 @@ namespace vcpkg::Metrics
static const std::string& get_session_id()
{
- static const std::string id = generate_random_UUID();
- return id;
+ static const std::string ID = generate_random_UUID();
+ return ID;
}
static std::string to_json_string(const std::string& str)
@@ -101,11 +112,11 @@ namespace vcpkg::Metrics
else if (ch < 0x20 || ch >= 0x80)
{
// Note: this treats incoming Strings as Latin-1
- static constexpr const char hex[16] = {
+ static constexpr const char HEX[16] = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
encoded.append("\\u00");
- encoded.push_back(hex[ch / 16]);
- encoded.push_back(hex[ch % 16]);
+ encoded.push_back(HEX[ch / 16]);
+ encoded.push_back(HEX[ch % 16]);
}
else
{
@@ -118,23 +129,24 @@ namespace vcpkg::Metrics
static std::string get_os_version_string()
{
+#if defined(_WIN32)
std::wstring path;
path.resize(MAX_PATH);
- auto n = GetSystemDirectoryW(&path[0], static_cast<UINT>(path.size()));
+ const auto n = GetSystemDirectoryW(&path[0], static_cast<UINT>(path.size()));
path.resize(n);
path += L"\\kernel32.dll";
- auto versz = GetFileVersionInfoSizeW(path.c_str(), nullptr);
- if (versz == 0) return Strings::EMPTY;
+ const auto versz = GetFileVersionInfoSizeW(path.c_str(), nullptr);
+ if (versz == 0) return "";
std::vector<char> verbuf;
verbuf.resize(versz);
- if (!GetFileVersionInfoW(path.c_str(), 0, static_cast<DWORD>(verbuf.size()), &verbuf[0])) return Strings::EMPTY;
+ if (!GetFileVersionInfoW(path.c_str(), 0, static_cast<DWORD>(verbuf.size()), &verbuf[0])) return "";
void* rootblock;
UINT rootblocksize;
- if (!VerQueryValueW(&verbuf[0], L"\\", &rootblock, &rootblocksize)) return Strings::EMPTY;
+ if (!VerQueryValueW(&verbuf[0], L"\\", &rootblock, &rootblocksize)) return "";
auto rootblock_ffi = static_cast<VS_FIXEDFILEINFO*>(rootblock);
@@ -142,6 +154,9 @@ namespace vcpkg::Metrics
static_cast<int>(HIWORD(rootblock_ffi->dwProductVersionMS)),
static_cast<int>(LOWORD(rootblock_ffi->dwProductVersionMS)),
static_cast<int>(HIWORD(rootblock_ffi->dwProductVersionLS)));
+#else
+ return "unknown";
+#endif
}
struct MetricMessage
@@ -152,7 +167,7 @@ namespace vcpkg::Metrics
std::string properties;
std::string measurements;
- void TrackProperty(const std::string& name, const std::string& value)
+ void track_property(const std::string& name, const std::string& value)
{
if (properties.size() != 0) properties.push_back(',');
properties.append(to_json_string(name));
@@ -160,7 +175,7 @@ namespace vcpkg::Metrics
properties.append(to_json_string(value));
}
- void TrackMetric(const std::string& name, double value)
+ void track_metric(const std::string& name, double value)
{
if (measurements.size() != 0) measurements.push_back(',');
measurements.append(to_json_string(name));
@@ -218,11 +233,15 @@ namespace vcpkg::Metrics
bool get_compiled_metrics_enabled() { return DISABLE_METRICS == 0; }
- std::wstring get_SQM_user()
+ std::string get_SQM_user()
{
+#if defined(_WIN32)
auto hkcu_sqmclient =
- System::get_registry_string(HKEY_CURRENT_USER, LR"(Software\Microsoft\SQMClient)", L"UserId");
- return hkcu_sqmclient.value_or(L"{}");
+ System::get_registry_string(HKEY_CURRENT_USER, R"(Software\Microsoft\SQMClient)", "UserId");
+ return hkcu_sqmclient.value_or("{}");
+#else
+ return "{}";
+#endif
}
void Metrics::set_user_information(const std::string& user_id, const std::string& first_use_time)
@@ -241,95 +260,85 @@ namespace vcpkg::Metrics
void Metrics::set_print_metrics(bool should_print_metrics) { g_should_print_metrics = should_print_metrics; }
- void Metrics::track_metric(const std::string& name, double value) { g_metricmessage.TrackMetric(name, value); }
-
- void Metrics::track_property(const std::string& name, const std::wstring& value)
- {
- // Note: this is not valid UTF-16 -> UTF-8, it just yields a close enough approximation for our purposes.
- std::string converted_value;
- converted_value.resize(value.size());
- std::transform(
- value.begin(), value.end(), converted_value.begin(), [](wchar_t ch) { return static_cast<char>(ch); });
-
- g_metricmessage.TrackProperty(name, converted_value);
- }
+ void Metrics::track_metric(const std::string& name, double value) { g_metricmessage.track_metric(name, value); }
void Metrics::track_property(const std::string& name, const std::string& value)
{
- g_metricmessage.TrackProperty(name, value);
+ g_metricmessage.track_property(name, value);
}
void Metrics::upload(const std::string& payload)
{
- HINTERNET hSession = nullptr, hConnect = nullptr, hRequest = nullptr;
- BOOL bResults = FALSE;
+#if defined(_WIN32)
+ HINTERNET connect = nullptr, request = nullptr;
+ BOOL results = FALSE;
- hSession = WinHttpOpen(
+ const HINTERNET session = WinHttpOpen(
L"vcpkg/1.0", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0);
- if (hSession)
- hConnect = WinHttpConnect(hSession, L"dc.services.visualstudio.com", INTERNET_DEFAULT_HTTPS_PORT, 0);
-
- if (hConnect)
- hRequest = WinHttpOpenRequest(hConnect,
- L"POST",
- L"/v2/track",
- nullptr,
- WINHTTP_NO_REFERER,
- WINHTTP_DEFAULT_ACCEPT_TYPES,
- WINHTTP_FLAG_SECURE);
-
- if (hRequest)
+ if (session) connect = WinHttpConnect(session, L"dc.services.visualstudio.com", INTERNET_DEFAULT_HTTPS_PORT, 0);
+
+ if (connect)
+ request = WinHttpOpenRequest(connect,
+ L"POST",
+ L"/v2/track",
+ nullptr,
+ WINHTTP_NO_REFERER,
+ WINHTTP_DEFAULT_ACCEPT_TYPES,
+ WINHTTP_FLAG_SECURE);
+
+ if (request)
{
if (MAXDWORD <= payload.size()) abort();
std::wstring hdrs = L"Content-Type: application/json\r\n";
- bResults = WinHttpSendRequest(hRequest,
- hdrs.c_str(),
- static_cast<DWORD>(hdrs.size()),
- (void*)&payload[0],
- static_cast<DWORD>(payload.size()),
- static_cast<DWORD>(payload.size()),
- 0);
+ std::string& p = const_cast<std::string&>(payload);
+ results = WinHttpSendRequest(request,
+ hdrs.c_str(),
+ static_cast<DWORD>(hdrs.size()),
+ static_cast<void*>(&p[0]),
+ static_cast<DWORD>(payload.size()),
+ static_cast<DWORD>(payload.size()),
+ 0);
}
- if (bResults)
+ if (results)
{
- bResults = WinHttpReceiveResponse(hRequest, nullptr);
+ results = WinHttpReceiveResponse(request, nullptr);
}
DWORD http_code = 0, junk = sizeof(DWORD);
- if (bResults)
+ if (results)
{
- bResults = WinHttpQueryHeaders(hRequest,
- WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER,
- nullptr,
- &http_code,
- &junk,
- WINHTTP_NO_HEADER_INDEX);
+ results = WinHttpQueryHeaders(request,
+ WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER,
+ nullptr,
+ &http_code,
+ &junk,
+ WINHTTP_NO_HEADER_INDEX);
}
- std::vector<char> responseBuffer;
- if (bResults)
+ std::vector<char> response_buffer;
+ if (results)
{
- DWORD availableData = 0, readData = 0, totalData = 0;
- while ((bResults = WinHttpQueryDataAvailable(hRequest, &availableData)) == TRUE && availableData > 0)
+ DWORD available_data = 0, read_data = 0, total_data = 0;
+ while ((results = WinHttpQueryDataAvailable(request, &available_data)) == TRUE && available_data > 0)
{
- responseBuffer.resize(responseBuffer.size() + availableData);
+ response_buffer.resize(response_buffer.size() + available_data);
- bResults = WinHttpReadData(hRequest, &responseBuffer.data()[totalData], availableData, &readData);
+ results = WinHttpReadData(request, &response_buffer.data()[total_data], available_data, &read_data);
- if (!bResults)
+ if (!results)
{
break;
}
- totalData += readData;
+ total_data += read_data;
- responseBuffer.resize(totalData);
+ response_buffer.resize(total_data);
}
}
- if (!bResults)
+ if (!results)
{
#ifndef NDEBUG
__debugbreak();
@@ -338,22 +347,16 @@ namespace vcpkg::Metrics
#endif
}
- if (hRequest) WinHttpCloseHandle(hRequest);
- if (hConnect) WinHttpCloseHandle(hConnect);
- if (hSession) WinHttpCloseHandle(hSession);
- }
-
- static fs::path get_bindir()
- {
- wchar_t buf[_MAX_PATH];
- int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH);
- if (bytes == 0) std::abort();
- return fs::path(buf, buf + bytes);
+ if (request) WinHttpCloseHandle(request);
+ if (connect) WinHttpCloseHandle(connect);
+ if (session) WinHttpCloseHandle(session);
+#endif
}
void Metrics::flush()
{
- std::string payload = g_metricmessage.format_event_data_template();
+#if defined(_WIN32)
+ const std::string payload = g_metricmessage.format_event_data_template();
if (g_should_print_metrics) std::cerr << payload << "\n";
if (!g_should_send_metrics) return;
@@ -370,14 +373,14 @@ namespace vcpkg::Metrics
if (true)
{
const fs::path exe_path = [&fs]() -> fs::path {
- auto vcpkgdir = get_bindir().parent_path();
+ auto vcpkgdir = System::get_exe_path_of_current_process().parent_path();
auto path = vcpkgdir / "vcpkgmetricsuploader.exe";
if (fs.exists(path)) return path;
path = vcpkgdir / "scripts" / "vcpkgmetricsuploader.exe";
if (fs.exists(path)) return path;
- return Strings::WEMPTY;
+ return "";
}();
std::error_code ec;
@@ -388,8 +391,9 @@ namespace vcpkg::Metrics
const fs::path vcpkg_metrics_txt_path = temp_folder_path / ("vcpkg" + generate_random_UUID() + ".txt");
fs.write_contents(vcpkg_metrics_txt_path, payload);
- const std::wstring cmdLine =
- Strings::wformat(L"start %s %s", temp_folder_path_exe.native(), vcpkg_metrics_txt_path.native());
- System::cmd_execute_clean(cmdLine);
+ const std::string cmd_line =
+ Strings::format("start %s %s", temp_folder_path_exe.u8string(), vcpkg_metrics_txt_path.u8string());
+ System::cmd_execute_clean(cmd_line);
+#endif
}
}
diff --git a/toolsrc/src/PackageSpec.cpp b/toolsrc/src/vcpkg/packagespec.cpp
index 890de8899..6e40d70f5 100644
--- a/toolsrc/src/PackageSpec.cpp
+++ b/toolsrc/src/vcpkg/packagespec.cpp
@@ -1,8 +1,8 @@
#include "pch.h"
-#include "PackageSpec.h"
-#include "vcpkg_Parse.h"
-#include "vcpkg_Util.h"
+#include <vcpkg/base/util.h>
+#include <vcpkg/packagespec.h>
+#include <vcpkg/parse.h>
using vcpkg::Parse::parse_comma_list;
@@ -38,7 +38,7 @@ namespace vcpkg
for (auto&& feature : spec->features)
f_specs.push_back(FeatureSpec{pspec, feature});
- if (spec->features.empty()) f_specs.push_back(FeatureSpec{pspec, Strings::EMPTY});
+ if (spec->features.empty()) f_specs.push_back(FeatureSpec{pspec, ""});
}
else
{
@@ -56,7 +56,7 @@ namespace vcpkg
std::vector<FeatureSpec> ret;
for (auto&& spec : specs)
{
- ret.emplace_back(spec.package_spec, Strings::EMPTY);
+ ret.emplace_back(spec.package_spec, "");
for (auto&& feature : spec.features)
ret.emplace_back(spec.package_spec, feature);
}
diff --git a/toolsrc/src/PackageSpecParseResult.cpp b/toolsrc/src/vcpkg/packagespecparseresult.cpp
index 838c788ba..b12bd12d0 100644
--- a/toolsrc/src/PackageSpecParseResult.cpp
+++ b/toolsrc/src/vcpkg/packagespecparseresult.cpp
@@ -1,7 +1,8 @@
#include "pch.h"
-#include "PackageSpecParseResult.h"
-#include "vcpkg_Checks.h"
+#include <vcpkg/packagespecparseresult.h>
+
+#include <vcpkg/base/checks.h>
namespace vcpkg
{
diff --git a/toolsrc/src/ParagraphParseResult.cpp b/toolsrc/src/vcpkg/paragraphparseresult.cpp
index 5c8c1d59d..920a4b16b 100644
--- a/toolsrc/src/ParagraphParseResult.cpp
+++ b/toolsrc/src/vcpkg/paragraphparseresult.cpp
@@ -1,7 +1,7 @@
#include "pch.h"
-#include "ParagraphParseResult.h"
-#include "vcpkg_Checks.h"
+#include <vcpkg/base/checks.h>
+#include <vcpkg/paragraphparseresult.h>
namespace vcpkg
{
diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/vcpkg/paragraphs.cpp
index a7dee4fd3..b93de190c 100644
--- a/toolsrc/src/Paragraphs.cpp
+++ b/toolsrc/src/vcpkg/paragraphs.cpp
@@ -1,10 +1,10 @@
#include "pch.h"
-#include "ParagraphParseResult.h"
-#include "Paragraphs.h"
-#include "vcpkg_Files.h"
-#include "vcpkg_GlobalState.h"
-#include "vcpkg_Util.h"
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/util.h>
+#include <vcpkg/globalstate.h>
+#include <vcpkg/paragraphparseresult.h>
+#include <vcpkg/paragraphs.h>
using namespace vcpkg::Parse;
@@ -254,7 +254,7 @@ namespace vcpkg::Paragraphs
for (auto&& path : fs.get_files_non_recursive(ports_dir))
{
auto maybe_spgh = try_load_port(fs, path);
- if (auto spgh = maybe_spgh.get())
+ if (const auto spgh = maybe_spgh.get())
{
ret.paragraphs.emplace_back(std::move(*spgh));
}
@@ -272,8 +272,20 @@ namespace vcpkg::Paragraphs
auto results = try_load_all_ports(fs, ports_dir);
if (!results.errors.empty())
{
- print_error_message(results.errors);
- Checks::exit_fail(VCPKG_LINE_INFO);
+ if (GlobalState::debugging)
+ {
+ print_error_message(results.errors);
+ }
+ else
+ {
+ for (auto&& error : results.errors)
+ {
+ System::println(
+ System::Color::warning, "Warning: an error occurred while parsing '%s'", error->name);
+ }
+ System::println(System::Color::warning,
+ "Use '--debug' to get more information about the parse failures.\n");
+ }
}
return std::move(results.paragraphs);
}
diff --git a/toolsrc/src/vcpkg_Parse.cpp b/toolsrc/src/vcpkg/parse.cpp
index b54f7360b..c2670f561 100644
--- a/toolsrc/src/vcpkg_Parse.cpp
+++ b/toolsrc/src/vcpkg/parse.cpp
@@ -1,8 +1,9 @@
#include "pch.h"
-#include "vcpkg_Checks.h"
-#include "vcpkg_Maps.h"
-#include "vcpkg_Parse.h"
+#include <vcpkg/parse.h>
+
+#include <vcpkg/base/checks.h>
+#include <vcpkg/base/util.h>
namespace vcpkg::Parse
{
@@ -23,14 +24,14 @@ namespace vcpkg::Parse
void ParagraphParser::required_field(const std::string& fieldname, std::string& out)
{
auto maybe_field = remove_field(&fields, fieldname);
- if (auto field = maybe_field.get())
+ if (const auto field = maybe_field.get())
out = std::move(*field);
else
missing_fields.push_back(fieldname);
}
- std::string ParagraphParser::optional_field(const std::string& fieldname)
+ std::string ParagraphParser::optional_field(const std::string& fieldname) const
{
- return remove_field(&fields, fieldname).value_or(Strings::EMPTY);
+ return remove_field(&fields, fieldname).value_or("");
}
std::unique_ptr<ParseControlErrorInfo> ParagraphParser::error_info(const std::string& name) const
{
@@ -38,7 +39,7 @@ namespace vcpkg::Parse
{
auto err = std::make_unique<ParseControlErrorInfo>();
err->name = name;
- err->extra_fields = Maps::extract_keys(fields);
+ err->extra_fields = Util::extract_keys(fields);
err->missing_fields = std::move(missing_fields);
return err;
}
diff --git a/toolsrc/src/PostBuildLint_BuildType.cpp b/toolsrc/src/vcpkg/postbuildlint.buildtype.cpp
index 649f0ccca..2baaddb5e 100644
--- a/toolsrc/src/PostBuildLint_BuildType.cpp
+++ b/toolsrc/src/vcpkg/postbuildlint.buildtype.cpp
@@ -1,7 +1,7 @@
#include "pch.h"
-#include "PostBuildLint_BuildType.h"
-#include "vcpkg_Checks.h"
+#include <vcpkg/base/checks.h>
+#include <vcpkg/postbuildlint.buildtype.h>
namespace vcpkg::PostBuildLint
{
diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/vcpkg/postbuildlint.cpp
index 473c81cfa..0063f8d98 100644
--- a/toolsrc/src/PostBuildLint.cpp
+++ b/toolsrc/src/vcpkg/postbuildlint.cpp
@@ -1,14 +1,14 @@
#include "pch.h"
-#include "PackageSpec.h"
-#include "PostBuildLint.h"
-#include "PostBuildLint_BuildType.h"
-#include "VcpkgPaths.h"
-#include "coff_file_reader.h"
-#include "vcpkg_Build.h"
-#include "vcpkg_Files.h"
-#include "vcpkg_System.h"
-#include "vcpkg_Util.h"
+#include <vcpkg/base/cofffilereader.h>
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/system.h>
+#include <vcpkg/base/util.h>
+#include <vcpkg/build.h>
+#include <vcpkg/packagespec.h>
+#include <vcpkg/postbuildlint.buildtype.h>
+#include <vcpkg/postbuildlint.h>
+#include <vcpkg/vcpkgpaths.h>
using vcpkg::Build::BuildInfo;
using vcpkg::Build::BuildPolicy;
@@ -38,9 +38,9 @@ namespace vcpkg::PostBuildLint
}
};
- const std::vector<OutdatedDynamicCrt>& get_outdated_dynamic_crts()
+ Span<const OutdatedDynamicCrt> get_outdated_dynamic_crts(CStringView toolset)
{
- static const std::vector<OutdatedDynamicCrt> v_no_msvcrt = {
+ static const std::vector<OutdatedDynamicCrt> V_NO_MSVCRT = {
{"msvcp100.dll", R"(msvcp100\.dll)"},
{"msvcp100d.dll", R"(msvcp100d\.dll)"},
{"msvcp110.dll", R"(msvcp110\.dll)"},
@@ -59,7 +59,7 @@ namespace vcpkg::PostBuildLint
{"msvcrt20.dll", R"(msvcrt20\.dll)"},
{"msvcrt40.dll", R"(msvcrt40\.dll)"}};
- return v_no_msvcrt;
+ return V_NO_MSVCRT;
}
static LintStatus check_for_files_in_include_directory(const Files::Filesystem& fs,
@@ -284,13 +284,10 @@ namespace vcpkg::PostBuildLint
std::vector<fs::path> dlls_with_no_exports;
for (const fs::path& dll : dlls)
{
- const std::wstring cmd_line =
- Strings::wformat(LR"("%s" /exports "%s")", dumpbin_exe.native(), dll.native());
+ const std::string cmd_line =
+ Strings::format(R"("%s" /exports "%s")", dumpbin_exe.u8string(), dll.u8string());
System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line);
- Checks::check_exit(VCPKG_LINE_INFO,
- ec_data.exit_code == 0,
- "Running command:\n %s\n failed",
- Strings::to_utf8(cmd_line));
+ Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line);
if (ec_data.output.find("ordinal hint RVA name") == std::string::npos)
{
@@ -321,13 +318,10 @@ namespace vcpkg::PostBuildLint
std::vector<fs::path> dlls_with_improper_uwp_bit;
for (const fs::path& dll : dlls)
{
- const std::wstring cmd_line =
- Strings::wformat(LR"("%s" /headers "%s")", dumpbin_exe.native(), dll.native());
+ const std::string cmd_line =
+ Strings::format(R"("%s" /headers "%s")", dumpbin_exe.u8string(), dll.u8string());
System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line);
- Checks::check_exit(VCPKG_LINE_INFO,
- ec_data.exit_code == 0,
- "Running command:\n %s\n failed",
- Strings::to_utf8(cmd_line));
+ Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line);
if (ec_data.output.find("App Container") == std::string::npos)
{
@@ -361,6 +355,7 @@ namespace vcpkg::PostBuildLint
case MachineType::I386: return "x86";
case MachineType::ARM:
case MachineType::ARMNT: return "arm";
+ case MachineType::ARM64: return "arm64";
default: return "Machine Type Code = " + std::to_string(static_cast<uint16_t>(machine_type));
}
}
@@ -389,7 +384,7 @@ namespace vcpkg::PostBuildLint
file.extension() == ".dll",
"The file extension was not .dll: %s",
file.generic_string());
- COFFFileReader::DllInfo info = COFFFileReader::read_dll(file);
+ const CoffFileReader::DllInfo info = CoffFileReader::read_dll(file);
const std::string actual_architecture = get_actual_architecture(info.machine_type);
if (expected_architecture != actual_architecture)
@@ -418,7 +413,7 @@ namespace vcpkg::PostBuildLint
file.extension() == ".lib",
"The file extension was not .lib: %s",
file.generic_string());
- COFFFileReader::LibInfo info = COFFFileReader::read_lib(file);
+ CoffFileReader::LibInfo info = CoffFileReader::read_lib(file);
// This is zero for folly's debug library
// TODO: Why?
@@ -580,7 +575,7 @@ namespace vcpkg::PostBuildLint
return LintStatus::SUCCESS;
}
- struct BuildType_and_file
+ struct BuildTypeAndFile
{
fs::path file;
BuildType build_type;
@@ -594,17 +589,14 @@ namespace vcpkg::PostBuildLint
bad_build_types.erase(std::remove(bad_build_types.begin(), bad_build_types.end(), expected_build_type),
bad_build_types.end());
- std::vector<BuildType_and_file> libs_with_invalid_crt;
+ std::vector<BuildTypeAndFile> libs_with_invalid_crt;
for (const fs::path& lib : libs)
{
- const std::wstring cmd_line =
- Strings::wformat(LR"("%s" /directives "%s")", dumpbin_exe.native(), lib.native());
+ const std::string cmd_line =
+ Strings::format(R"("%s" /directives "%s")", dumpbin_exe.u8string(), lib.u8string());
System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line);
- Checks::check_exit(VCPKG_LINE_INFO,
- ec_data.exit_code == 0,
- "Running command:\n %s\n failed",
- Strings::to_utf8(cmd_line));
+ Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line);
for (const BuildType& bad_build_type : bad_build_types)
{
@@ -622,7 +614,7 @@ namespace vcpkg::PostBuildLint
"Expected %s crt linkage, but the following libs had invalid crt linkage:",
expected_build_type.to_string());
System::println();
- for (const BuildType_and_file btf : libs_with_invalid_crt)
+ for (const BuildTypeAndFile btf : libs_with_invalid_crt)
{
System::println(" %s: %s", btf.file.generic_string(), btf.build_type.to_string());
}
@@ -636,12 +628,12 @@ namespace vcpkg::PostBuildLint
return LintStatus::SUCCESS;
}
- struct OutdatedDynamicCrt_and_file
+ struct OutdatedDynamicCrtAndFile
{
fs::path file;
OutdatedDynamicCrt outdated_crt;
- OutdatedDynamicCrt_and_file() = delete;
+ OutdatedDynamicCrtAndFile() = delete;
};
static LintStatus check_outdated_crt_linkage_of_dlls(const std::vector<fs::path>& dlls,
@@ -650,19 +642,15 @@ namespace vcpkg::PostBuildLint
{
if (build_info.policies.is_enabled(BuildPolicy::ALLOW_OBSOLETE_MSVCRT)) return LintStatus::SUCCESS;
- std::vector<OutdatedDynamicCrt_and_file> dlls_with_outdated_crt;
+ std::vector<OutdatedDynamicCrtAndFile> dlls_with_outdated_crt;
for (const fs::path& dll : dlls)
{
- const std::wstring cmd_line =
- Strings::wformat(LR"("%s" /dependents "%s")", dumpbin_exe.native(), dll.native());
+ const auto cmd_line = Strings::format(R"("%s" /dependents "%s")", dumpbin_exe.u8string(), dll.u8string());
System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line);
- Checks::check_exit(VCPKG_LINE_INFO,
- ec_data.exit_code == 0,
- "Running command:\n %s\n failed",
- Strings::to_utf8(cmd_line));
+ Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line);
- for (const OutdatedDynamicCrt& outdated_crt : get_outdated_dynamic_crts())
+ for (const OutdatedDynamicCrt& outdated_crt : get_outdated_dynamic_crts("v141"))
{
if (std::regex_search(ec_data.output.cbegin(), ec_data.output.cend(), outdated_crt.regex))
{
@@ -676,7 +664,7 @@ namespace vcpkg::PostBuildLint
{
System::println(System::Color::warning, "Detected outdated dynamic CRT in the following files:");
System::println();
- for (const OutdatedDynamicCrt_and_file btf : dlls_with_outdated_crt)
+ for (const OutdatedDynamicCrtAndFile btf : dlls_with_outdated_crt)
{
System::println(" %s: %s", btf.file.generic_string(), btf.outdated_crt.name);
}
@@ -695,8 +683,8 @@ namespace vcpkg::PostBuildLint
std::vector<fs::path> misplaced_files = fs.get_files_non_recursive(dir);
Util::unstable_keep_if(misplaced_files, [&fs](const fs::path& path) {
const std::string filename = path.filename().generic_string();
- if (Strings::case_insensitive_ascii_compare(filename.c_str(), "CONTROL") == 0 ||
- Strings::case_insensitive_ascii_compare(filename.c_str(), "BUILD_INFO") == 0)
+ if (Strings::case_insensitive_ascii_equals(filename.c_str(), "CONTROL") ||
+ Strings::case_insensitive_ascii_equals(filename.c_str(), "BUILD_INFO"))
return false;
return !fs.is_directory(path);
});
@@ -722,7 +710,7 @@ namespace vcpkg::PostBuildLint
const auto& fs = paths.get_filesystem();
// for dumpbin
- const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset);
+ const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path);
const fs::path package_dir = paths.package_dir(spec);
size_t error_count = 0;
diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/vcpkg/remove.cpp
index cca541c85..2ec32855a 100644
--- a/toolsrc/src/commands_remove.cpp
+++ b/toolsrc/src/vcpkg/remove.cpp
@@ -1,13 +1,16 @@
#include "pch.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_Dependencies.h"
-#include "vcpkg_Input.h"
-#include "vcpkg_System.h"
-#include "vcpkg_Util.h"
-#include "vcpkglib.h"
-
-namespace vcpkg::Commands::Remove
+#include <vcpkg/base/system.h>
+#include <vcpkg/base/util.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/dependencies.h>
+#include <vcpkg/help.h>
+#include <vcpkg/input.h>
+#include <vcpkg/remove.h>
+#include <vcpkg/update.h>
+#include <vcpkg/vcpkglib.h>
+
+namespace vcpkg::Remove
{
using Dependencies::RemovePlanAction;
using Dependencies::RemovePlanType;
@@ -18,7 +21,7 @@ namespace vcpkg::Commands::Remove
{
auto& fs = paths.get_filesystem();
auto spghs = status_db->find_all(spec.name(), spec.triplet());
- auto core_pkg = **status_db->find(spec.name(), spec.triplet(), Strings::EMPTY);
+ const auto core_pkg = **status_db->find(spec.name(), spec.triplet(), "");
for (auto&& spgh : spghs)
{
@@ -31,7 +34,7 @@ namespace vcpkg::Commands::Remove
auto maybe_lines = fs.read_lines(paths.listfile_path(core_pkg.package));
- if (auto lines = maybe_lines.get())
+ if (const auto lines = maybe_lines.get())
{
std::vector<fs::path> dirs_touched;
for (auto&& suffix : *lines)
@@ -42,7 +45,7 @@ namespace vcpkg::Commands::Remove
auto target = paths.installed / suffix;
- auto status = fs.status(target, ec);
+ const auto status = fs.status(target, ec);
if (ec)
{
System::println(System::Color::error, "failed: %s", ec.message());
@@ -72,7 +75,7 @@ namespace vcpkg::Commands::Remove
}
auto b = dirs_touched.rbegin();
- auto e = dirs_touched.rend();
+ const auto e = dirs_touched.rend();
for (; b != e; ++b)
{
if (fs.is_empty(*b))
@@ -100,11 +103,11 @@ namespace vcpkg::Commands::Remove
static void print_plan(const std::map<RemovePlanType, std::vector<const RemovePlanAction*>>& group_by_plan_type)
{
- static constexpr std::array<RemovePlanType, 2> order = {RemovePlanType::NOT_INSTALLED, RemovePlanType::REMOVE};
+ static constexpr std::array<RemovePlanType, 2> ORDER = {RemovePlanType::NOT_INSTALLED, RemovePlanType::REMOVE};
- for (const RemovePlanType plan_type : order)
+ for (const RemovePlanType plan_type : ORDER)
{
- auto it = group_by_plan_type.find(plan_type);
+ const auto it = group_by_plan_type.find(plan_type);
if (it == group_by_plan_type.cend())
{
continue;
@@ -129,15 +132,72 @@ namespace vcpkg::Commands::Remove
}
}
+ void perform_remove_plan_action(const VcpkgPaths& paths,
+ const RemovePlanAction& action,
+ const Purge purge,
+ StatusParagraphs& status_db)
+ {
+ const std::string display_name = action.spec.to_string();
+
+ switch (action.plan_type)
+ {
+ case RemovePlanType::NOT_INSTALLED:
+ System::println(System::Color::success, "Package %s is not installed", display_name);
+ break;
+ case RemovePlanType::REMOVE:
+ System::println("Removing package %s... ", display_name);
+ remove_package(paths, action.spec, &status_db);
+ System::println(System::Color::success, "Removing package %s... done", display_name);
+ break;
+ case RemovePlanType::UNKNOWN:
+ default: Checks::unreachable(VCPKG_LINE_INFO);
+ }
+
+ if (purge == Purge::YES)
+ {
+ System::println("Purging package %s... ", display_name);
+ Files::Filesystem& fs = paths.get_filesystem();
+ std::error_code ec;
+ fs.remove_all(paths.packages / action.spec.dir(), ec);
+ System::println(System::Color::success, "Purging package %s... done", display_name);
+ }
+ }
+
+ static const std::string OPTION_PURGE = "--purge";
+ static const std::string OPTION_NO_PURGE = "--no-purge";
+ static const std::string OPTION_RECURSE = "--recurse";
+ static const std::string OPTION_DRY_RUN = "--dry-run";
+ static const std::string OPTION_OUTDATED = "--outdated";
+
+ static const std::array<std::string, 5> REMOVE_SWITCHES = {
+ OPTION_PURGE,
+ OPTION_NO_PURGE,
+ OPTION_RECURSE,
+ OPTION_DRY_RUN,
+ OPTION_OUTDATED,
+ };
+ static const std::array<std::string, 0> REMOVE_SETTINGS;
+
+ static std::vector<std::string> valid_arguments(const VcpkgPaths& paths)
+ {
+ const StatusParagraphs status_db = database_load_check(paths);
+ const std::vector<StatusParagraph*> installed_packages = get_installed_ports(status_db);
+
+ return Util::fmap(installed_packages, [](auto&& pgh) -> std::string { return pgh->package.spec.to_string(); });
+ }
+
+ const CommandStructure COMMAND_STRUCTURE = {
+ "remove zlib zlib:x64-windows curl boost",
+ 1,
+ SIZE_MAX,
+ REMOVE_SWITCHES,
+ REMOVE_SETTINGS,
+ &valid_arguments,
+ };
+
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet)
{
- static const std::string OPTION_PURGE = "--purge";
- static const std::string OPTION_NO_PURGE = "--no-purge";
- static const std::string OPTION_RECURSE = "--recurse";
- static const std::string OPTION_DRY_RUN = "--dry-run";
- static const std::string OPTION_OUTDATED = "--outdated";
- static const std::string example =
- Commands::Help::create_example_string("remove zlib zlib:x64-windows curl boost");
+ static const std::string EXAMPLE = Help::create_example_string("remove zlib zlib:x64-windows curl boost");
const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments(
{OPTION_PURGE, OPTION_NO_PURGE, OPTION_RECURSE, OPTION_DRY_RUN, OPTION_OUTDATED});
@@ -145,7 +205,7 @@ namespace vcpkg::Commands::Remove
std::vector<PackageSpec> specs;
if (options.find(OPTION_OUTDATED) != options.cend())
{
- args.check_exact_arg_count(0, example);
+ args.check_exact_arg_count(0, EXAMPLE);
specs = Util::fmap(Update::find_outdated_packages(paths, status_db),
[](auto&& outdated) { return outdated.spec; });
@@ -157,25 +217,26 @@ namespace vcpkg::Commands::Remove
}
else
{
- args.check_min_arg_count(1, example);
+ args.check_min_arg_count(1, EXAMPLE);
specs = Util::fmap(args.command_arguments, [&](auto&& arg) {
- return Input::check_and_get_package_spec(arg, default_triplet, example);
+ return Input::check_and_get_package_spec(arg, default_triplet, EXAMPLE);
});
for (auto&& spec : specs)
Input::check_triplet(spec.triplet(), paths);
}
- const bool alsoRemoveFolderFromPackages = options.find(OPTION_NO_PURGE) == options.end();
- if (options.find(OPTION_PURGE) != options.end() && !alsoRemoveFolderFromPackages)
+ const bool no_purge_was_passed = options.find(OPTION_NO_PURGE) != options.end();
+ const bool purge_was_passed = options.find(OPTION_PURGE) != options.end();
+ if (purge_was_passed && no_purge_was_passed)
{
- // User specified --purge and --no-purge
System::println(System::Color::error, "Error: cannot specify both --no-purge and --purge.");
- System::print(example);
+ System::print(EXAMPLE);
Checks::exit_fail(VCPKG_LINE_INFO);
}
- const bool isRecursive = options.find(OPTION_RECURSE) != options.cend();
- const bool dryRun = options.find(OPTION_DRY_RUN) != options.cend();
+ const Purge purge = to_purge(purge_was_passed || !no_purge_was_passed);
+ const bool is_recursive = options.find(OPTION_RECURSE) != options.cend();
+ const bool dry_run = options.find(OPTION_DRY_RUN) != options.cend();
const std::vector<RemovePlanAction> remove_plan = Dependencies::create_remove_plan(specs, status_db);
Checks::check_exit(VCPKG_LINE_INFO, !remove_plan.empty(), "Remove plan cannot be empty");
@@ -194,7 +255,7 @@ namespace vcpkg::Commands::Remove
System::println(System::Color::warning,
"Additional packages (*) need to be removed to complete this operation.");
- if (!isRecursive)
+ if (!is_recursive)
{
System::println(System::Color::warning,
"If you are sure you want to remove them, run the command with the --recurse option");
@@ -202,37 +263,14 @@ namespace vcpkg::Commands::Remove
}
}
- if (dryRun)
+ if (dry_run)
{
Checks::exit_success(VCPKG_LINE_INFO);
}
for (const RemovePlanAction& action : remove_plan)
{
- const std::string display_name = action.spec.to_string();
-
- switch (action.plan_type)
- {
- case RemovePlanType::NOT_INSTALLED:
- System::println(System::Color::success, "Package %s is not installed", display_name);
- break;
- case RemovePlanType::REMOVE:
- System::println("Removing package %s... ", display_name);
- remove_package(paths, action.spec, &status_db);
- System::println(System::Color::success, "Removing package %s... done", display_name);
- break;
- case RemovePlanType::UNKNOWN:
- default: Checks::unreachable(VCPKG_LINE_INFO);
- }
-
- if (alsoRemoveFolderFromPackages)
- {
- System::println("Purging package %s... ", display_name);
- Files::Filesystem& fs = paths.get_filesystem();
- std::error_code ec;
- fs.remove_all(paths.packages / action.spec.dir(), ec);
- System::println(System::Color::success, "Purging package %s... done", display_name);
- }
+ perform_remove_plan_action(paths, action, purge, status_db);
}
Checks::exit_success(VCPKG_LINE_INFO);
diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/vcpkg/sourceparagraph.cpp
index 50d6ecf07..2a9480538 100644
--- a/toolsrc/src/SourceParagraph.cpp
+++ b/toolsrc/src/vcpkg/sourceparagraph.cpp
@@ -1,19 +1,19 @@
#include "pch.h"
-#include "PackageSpec.h"
-#include "SourceParagraph.h"
-#include "Triplet.h"
-#include "vcpkg_Checks.h"
-#include "vcpkg_Maps.h"
-#include "vcpkg_System.h"
-#include "vcpkg_Util.h"
-#include "vcpkg_expected.h"
+#include <vcpkg/packagespec.h>
+#include <vcpkg/sourceparagraph.h>
+#include <vcpkg/triplet.h>
+
+#include <vcpkg/base/checks.h>
+#include <vcpkg/base/expected.h>
+#include <vcpkg/base/system.h>
+#include <vcpkg/base/util.h>
namespace vcpkg
{
using namespace vcpkg::Parse;
- namespace Fields
+ namespace SourceParagraphFields
{
static const std::string BUILD_DEPENDS = "Build-Depends";
static const std::string DEFAULTFEATURES = "Default-Features";
@@ -25,20 +25,20 @@ namespace vcpkg
static const std::string VERSION = "Version";
}
- static span<const std::string> get_list_of_valid_fields()
+ static Span<const std::string> get_list_of_valid_fields()
{
static const std::string valid_fields[] = {
- Fields::SOURCE,
- Fields::VERSION,
- Fields::DESCRIPTION,
- Fields::MAINTAINER,
- Fields::BUILD_DEPENDS,
+ SourceParagraphFields::SOURCE,
+ SourceParagraphFields::VERSION,
+ SourceParagraphFields::DESCRIPTION,
+ SourceParagraphFields::MAINTAINER,
+ SourceParagraphFields::BUILD_DEPENDS,
};
return valid_fields;
}
- void print_error_message(span<const std::unique_ptr<Parse::ParseControlErrorInfo>> error_info_list)
+ void print_error_message(Span<const std::unique_ptr<Parse::ParseControlErrorInfo>> error_info_list)
{
Checks::check_exit(VCPKG_LINE_INFO, error_info_list.size() > 0);
@@ -92,14 +92,15 @@ namespace vcpkg
auto spgh = std::make_unique<SourceParagraph>();
- parser.required_field(Fields::SOURCE, spgh->name);
- parser.required_field(Fields::VERSION, spgh->version);
+ parser.required_field(SourceParagraphFields::SOURCE, spgh->name);
+ parser.required_field(SourceParagraphFields::VERSION, spgh->version);
- spgh->description = parser.optional_field(Fields::DESCRIPTION);
- spgh->maintainer = parser.optional_field(Fields::MAINTAINER);
- spgh->depends = expand_qualified_dependencies(parse_comma_list(parser.optional_field(Fields::BUILD_DEPENDS)));
- spgh->supports = parse_comma_list(parser.optional_field(Fields::SUPPORTS));
- spgh->default_features = parse_comma_list(parser.optional_field(Fields::DEFAULTFEATURES));
+ spgh->description = parser.optional_field(SourceParagraphFields::DESCRIPTION);
+ spgh->maintainer = parser.optional_field(SourceParagraphFields::MAINTAINER);
+ spgh->depends = expand_qualified_dependencies(
+ parse_comma_list(parser.optional_field(SourceParagraphFields::BUILD_DEPENDS)));
+ spgh->supports = parse_comma_list(parser.optional_field(SourceParagraphFields::SUPPORTS));
+ spgh->default_features = parse_comma_list(parser.optional_field(SourceParagraphFields::DEFAULTFEATURES));
auto err = parser.error_info(spgh->name);
if (err)
@@ -114,10 +115,11 @@ namespace vcpkg
auto fpgh = std::make_unique<FeatureParagraph>();
- parser.required_field(Fields::FEATURE, fpgh->name);
- parser.required_field(Fields::DESCRIPTION, fpgh->description);
+ parser.required_field(SourceParagraphFields::FEATURE, fpgh->name);
+ parser.required_field(SourceParagraphFields::DESCRIPTION, fpgh->description);
- fpgh->depends = expand_qualified_dependencies(parse_comma_list(parser.optional_field(Fields::BUILD_DEPENDS)));
+ fpgh->depends = expand_qualified_dependencies(
+ parse_comma_list(parser.optional_field(SourceParagraphFields::BUILD_DEPENDS)));
auto err = parser.error_info(fpgh->name);
if (err)
@@ -137,7 +139,7 @@ namespace vcpkg
auto control_file = std::make_unique<SourceControlFile>();
auto maybe_source = parse_source_paragraph(std::move(control_paragraphs.front()));
- if (auto source = maybe_source.get())
+ if (const auto source = maybe_source.get())
control_file->core_paragraph = std::move(*source);
else
return std::move(maybe_source).error();
@@ -147,7 +149,7 @@ namespace vcpkg
for (auto&& feature_pgh : control_paragraphs)
{
auto maybe_feature = parse_feature_paragraph(std::move(feature_pgh));
- if (auto feature = maybe_feature.get())
+ if (const auto feature = maybe_feature.get())
control_file->feature_paragraphs.emplace_back(std::move(*feature));
else
return std::move(maybe_feature).error();
@@ -170,24 +172,17 @@ namespace vcpkg
std::string Dependency::name() const
{
- std::string str = this->depend.name;
- if (this->depend.features.empty()) return str;
+ if (this->depend.features.empty()) return this->depend.name;
- str += "[";
- for (auto&& s : this->depend.features)
- {
- str += s + ",";
- }
- str.pop_back();
- str += "]";
- return str;
+ const std::string features = Strings::join(",", this->depend.features);
+ return Strings::format("%s[%s]", this->depend.name, features);
}
- std::vector<Dependency> vcpkg::expand_qualified_dependencies(const std::vector<std::string>& depends)
+ std::vector<Dependency> expand_qualified_dependencies(const std::vector<std::string>& depends)
{
return Util::fmap(depends, [&](const std::string& depend_string) -> Dependency {
auto pos = depend_string.find(' ');
- if (pos == std::string::npos) return Dependency::parse_dependency(depend_string, Strings::EMPTY);
+ if (pos == std::string::npos) return Dependency::parse_dependency(depend_string, "");
// expect of the form "\w+ \[\w+\]"
Dependency dep;
@@ -195,7 +190,7 @@ namespace vcpkg
if (depend_string.c_str()[pos + 1] != '(' || depend_string[depend_string.size() - 1] != ')')
{
// Error, but for now just slurp the entire string.
- return Dependency::parse_dependency(depend_string, Strings::EMPTY);
+ return Dependency::parse_dependency(depend_string, "");
}
dep.qualifier = depend_string.substr(pos + 2, depend_string.size() - pos - 3);
return dep;
@@ -220,11 +215,7 @@ namespace vcpkg
return FeatureSpec::from_strings_and_triplet(filter_dependencies(deps, t), t);
}
- const std::string to_string(const Dependency& dep)
- {
- std::string name = dep.name();
- return name;
- }
+ std::string to_string(const Dependency& dep) { return dep.name(); }
ExpectedT<Supports, std::vector<std::string>> Supports::parse(const std::vector<std::string>& strs)
{
@@ -263,7 +254,7 @@ namespace vcpkg
bool Supports::is_supported(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools)
{
- auto is_in_or_empty = [](auto v, auto&& c) -> bool { return c.empty() || c.end() != Util::find(c, v); };
+ const auto is_in_or_empty = [](auto v, auto&& c) -> bool { return c.empty() || c.end() != Util::find(c, v); };
if (!is_in_or_empty(arch, architectures)) return false;
if (!is_in_or_empty(plat, platforms)) return false;
if (!is_in_or_empty(crt, crt_linkages)) return false;
diff --git a/toolsrc/src/StatusParagraph.cpp b/toolsrc/src/vcpkg/statusparagraph.cpp
index 5b5c3978f..5f00825e1 100644
--- a/toolsrc/src/StatusParagraph.cpp
+++ b/toolsrc/src/vcpkg/statusparagraph.cpp
@@ -1,6 +1,6 @@
#include "pch.h"
-#include "StatusParagraph.h"
+#include <vcpkg/statusparagraph.h>
using namespace vcpkg::Parse;
@@ -33,8 +33,8 @@ namespace vcpkg
this->package = BinaryParagraph(std::move(fields));
auto b = status_field.begin();
- auto mark = b;
- auto e = status_field.end();
+ const auto mark = b;
+ const auto e = status_field.end();
// Todo: improve error handling
while (b != e && *b != ' ')
diff --git a/toolsrc/src/StatusParagraphs.cpp b/toolsrc/src/vcpkg/statusparagraphs.cpp
index 02ee61f75..647ed6d3f 100644
--- a/toolsrc/src/StatusParagraphs.cpp
+++ b/toolsrc/src/vcpkg/statusparagraphs.cpp
@@ -1,8 +1,7 @@
#include "pch.h"
-#include "StatusParagraphs.h"
-#include "vcpkg_Checks.h"
-#include <algorithm>
+#include <vcpkg/base/checks.h>
+#include <vcpkg/statusparagraphs.h>
namespace vcpkg
{
@@ -67,7 +66,7 @@ namespace vcpkg
{
Checks::check_exit(VCPKG_LINE_INFO, pgh != nullptr, "Inserted null paragraph");
const PackageSpec& spec = pgh->package.spec;
- auto ptr = find(spec.name(), spec.triplet(), pgh->package.feature);
+ const auto ptr = find(spec.name(), spec.triplet(), pgh->package.feature);
if (ptr == end())
{
paragraphs.push_back(std::move(pgh));
diff --git a/toolsrc/src/triplet.cpp b/toolsrc/src/vcpkg/triplet.cpp
index 451deb040..4cba1523d 100644
--- a/toolsrc/src/triplet.cpp
+++ b/toolsrc/src/vcpkg/triplet.cpp
@@ -1,8 +1,8 @@
#include "pch.h"
-#include "Triplet.h"
-#include "vcpkg_Checks.h"
-#include "vcpkg_Strings.h"
+#include <vcpkg/base/checks.h>
+#include <vcpkg/base/strings.h>
+#include <vcpkg/triplet.h>
namespace vcpkg
{
@@ -15,14 +15,17 @@ namespace vcpkg
bool operator==(const TripletInstance& o) const { return o.value == value; }
};
- const TripletInstance Triplet::default_instance({});
+ const TripletInstance Triplet::DEFAULT_INSTANCE({});
}
-template<>
-struct std::hash<vcpkg::TripletInstance>
+namespace std
{
- size_t operator()(const vcpkg::TripletInstance& t) const { return t.hash; }
-};
+ template<>
+ struct hash<vcpkg::TripletInstance>
+ {
+ size_t operator()(const vcpkg::TripletInstance& t) const { return t.hash; }
+ };
+}
namespace vcpkg
{
@@ -41,10 +44,7 @@ namespace vcpkg
Triplet Triplet::from_canonical_name(const std::string& triplet_as_string)
{
std::string s(Strings::ascii_to_lowercase(triplet_as_string));
- auto it = std::find(s.cbegin(), s.cend(), '-');
- Checks::check_exit(VCPKG_LINE_INFO, it != s.cend(), "Invalid triplet: %s", triplet_as_string);
-
- auto p = g_triplet_instances.emplace(std::move(s));
+ const auto p = g_triplet_instances.emplace(std::move(s));
return &*p.first;
}
diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/vcpkg/update.cpp
index 35f24af12..168949bc1 100644
--- a/toolsrc/src/commands_update.cpp
+++ b/toolsrc/src/vcpkg/update.cpp
@@ -1,12 +1,13 @@
#include "pch.h"
-#include "Paragraphs.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_Files.h"
-#include "vcpkg_System.h"
-#include "vcpkglib.h"
+#include <vcpkg/base/system.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/help.h>
+#include <vcpkg/paragraphs.h>
+#include <vcpkg/update.h>
+#include <vcpkg/vcpkglib.h>
-namespace vcpkg::Commands::Update
+namespace vcpkg::Update
{
bool OutdatedPackage::compare_by_name(const OutdatedPackage& left, const OutdatedPackage& right)
{
@@ -22,7 +23,7 @@ namespace vcpkg::Commands::Update
std::vector<OutdatedPackage> output;
for (const StatusParagraph* pgh : installed_packages)
{
- auto it = src_names_to_versions.find(pgh->package.spec.name());
+ const auto it = src_names_to_versions.find(pgh->package.spec.name());
if (it == src_names_to_versions.end())
{
// Package was not installed from portfile
@@ -69,31 +70,6 @@ namespace vcpkg::Commands::Update
install_line);
}
- auto version_file = paths.get_filesystem().read_contents(paths.root / "toolsrc" / "VERSION.txt");
- if (auto version_contents = version_file.get())
- {
- int maj1, min1, rev1;
- auto num1 = sscanf_s(version_contents->c_str(), "\"%d.%d.%d\"", &maj1, &min1, &rev1);
-
- int maj2, min2, rev2;
- auto num2 = sscanf_s(Version::version().c_str(), "%d.%d.%d-", &maj2, &min2, &rev2);
-
- if (num1 == 3 && num2 == 3)
- {
- if (maj1 != maj2 || min1 != min2 || rev1 != rev2)
- {
- System::println("Different source is available for vcpkg (%d.%d.%d -> %d.%d.%d). Use "
- ".\\bootstrap-vcpkg.bat to update.",
- maj2,
- min2,
- rev2,
- maj1,
- min1,
- rev1);
- }
- }
- }
-
Checks::exit_success(VCPKG_LINE_INFO);
}
}
diff --git a/toolsrc/src/VcpkgCmdArguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp
index cb261930e..209f6a3f2 100644
--- a/toolsrc/src/VcpkgCmdArguments.cpp
+++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp
@@ -1,10 +1,11 @@
#include "pch.h"
-#include "VcpkgCmdArguments.h"
-#include "metrics.h"
-#include "vcpkg_Commands.h"
-#include "vcpkg_GlobalState.h"
-#include "vcpkg_System.h"
+#include <vcpkg/base/system.h>
+#include <vcpkg/commands.h>
+#include <vcpkg/globalstate.h>
+#include <vcpkg/help.h>
+#include <vcpkg/metrics.h>
+#include <vcpkg/vcpkgcmdarguments.h>
namespace vcpkg
{
@@ -17,7 +18,7 @@ namespace vcpkg
{
System::println(System::Color::error, "Error: expected value after %s", option_name);
Metrics::g_metrics.lock()->track_property("error", "error option name");
- Commands::Help::print_usage();
+ Help::print_usage();
Checks::exit_fail(VCPKG_LINE_INFO);
}
@@ -25,7 +26,7 @@ namespace vcpkg
{
System::println(System::Color::error, "Error: %s specified multiple times", option_name);
Metrics::g_metrics.lock()->track_property("error", "error option specified multiple times");
- Commands::Help::print_usage();
+ Help::print_usage();
Checks::exit_fail(VCPKG_LINE_INFO);
}
@@ -38,18 +39,26 @@ namespace vcpkg
{
System::println(System::Color::error, "Error: conflicting values specified for --%s", option_name);
Metrics::g_metrics.lock()->track_property("error", "error conflicting switches");
- Commands::Help::print_usage();
+ Help::print_usage();
Checks::exit_fail(VCPKG_LINE_INFO);
}
option_field = new_setting;
}
+#if defined(_WIN32)
VcpkgCmdArguments VcpkgCmdArguments::create_from_command_line(const int argc, const wchar_t* const* const argv)
+#else
+ VcpkgCmdArguments VcpkgCmdArguments::create_from_command_line(const int argc, const char* const* const argv)
+#endif
{
std::vector<std::string> v;
for (int i = 1; i < argc; ++i)
{
+#if defined(_WIN32)
v.push_back(Strings::to_utf8(argv[i]));
+#else
+ v.push_back(argv[i]);
+#endif
}
return VcpkgCmdArguments::create_from_arg_sequence(v.data(), v.data() + v.size());
@@ -222,17 +231,17 @@ namespace vcpkg
void VcpkgCmdArguments::check_max_arg_count(const size_t expected_arg_count) const
{
- return check_max_arg_count(expected_arg_count, Strings::EMPTY);
+ return check_max_arg_count(expected_arg_count, "");
}
void VcpkgCmdArguments::check_min_arg_count(const size_t expected_arg_count) const
{
- return check_min_arg_count(expected_arg_count, Strings::EMPTY);
+ return check_min_arg_count(expected_arg_count, "");
}
void VcpkgCmdArguments::check_exact_arg_count(const size_t expected_arg_count) const
{
- return check_exact_arg_count(expected_arg_count, Strings::EMPTY);
+ return check_exact_arg_count(expected_arg_count, "");
}
void VcpkgCmdArguments::check_max_arg_count(const size_t expected_arg_count, const std::string& example_text) const
diff --git a/toolsrc/src/vcpkglib.cpp b/toolsrc/src/vcpkg/vcpkglib.cpp
index 5cdafdbc8..38b130f6f 100644
--- a/toolsrc/src/vcpkglib.cpp
+++ b/toolsrc/src/vcpkg/vcpkglib.cpp
@@ -1,11 +1,11 @@
#include "pch.h"
-#include "Paragraphs.h"
-#include "metrics.h"
-#include "vcpkg_Files.h"
-#include "vcpkg_Strings.h"
-#include "vcpkg_Util.h"
-#include "vcpkglib.h"
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/strings.h>
+#include <vcpkg/base/util.h>
+#include <vcpkg/metrics.h>
+#include <vcpkg/paragraphs.h>
+#include <vcpkg/vcpkglib.h>
namespace vcpkg
{
@@ -212,30 +212,26 @@ namespace vcpkg
return installed_files;
}
- CMakeVariable::CMakeVariable(const CWStringView varname, const wchar_t* varvalue)
- : s(Strings::wformat(LR"("-D%s=%s")", varname, varvalue))
+ CMakeVariable::CMakeVariable(const CStringView varname, const char* varvalue)
+ : s(Strings::format(R"("-D%s=%s")", varname, varvalue))
{
}
- CMakeVariable::CMakeVariable(const CWStringView varname, const std::string& varvalue)
- : CMakeVariable(varname, Strings::to_utf16(varvalue).c_str())
- {
- }
- CMakeVariable::CMakeVariable(const CWStringView varname, const std::wstring& varvalue)
+ CMakeVariable::CMakeVariable(const CStringView varname, const std::string& varvalue)
: CMakeVariable(varname, varvalue.c_str())
{
}
- CMakeVariable::CMakeVariable(const CWStringView varname, const fs::path& path)
- : CMakeVariable(varname, path.generic_wstring())
+ CMakeVariable::CMakeVariable(const CStringView varname, const fs::path& path)
+ : CMakeVariable(varname, path.generic_u8string())
{
}
- std::wstring make_cmake_cmd(const fs::path& cmake_exe,
- const fs::path& cmake_script,
- const std::vector<CMakeVariable>& pass_variables)
+ std::string make_cmake_cmd(const fs::path& cmake_exe,
+ const fs::path& cmake_script,
+ const std::vector<CMakeVariable>& pass_variables)
{
- const std::wstring cmd_cmake_pass_variables = Strings::join(L" ", pass_variables, [](auto&& v) { return v.s; });
- return Strings::wformat(
- LR"("%s" %s -P "%s")", cmake_exe.native(), cmd_cmake_pass_variables, cmake_script.generic_wstring());
+ const std::string cmd_cmake_pass_variables = Strings::join(" ", pass_variables, [](auto&& v) { return v.s; });
+ return Strings::format(
+ R"("%s" %s -P "%s")", cmake_exe.u8string(), cmd_cmake_pass_variables, cmake_script.generic_u8string());
}
std::string shorten_text(const std::string& desc, size_t length)
diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp
new file mode 100644
index 000000000..90f9cb00b
--- /dev/null
+++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp
@@ -0,0 +1,528 @@
+#include "pch.h"
+
+#include <vcpkg/base/expected.h>
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/system.h>
+#include <vcpkg/base/util.h>
+#include <vcpkg/metrics.h>
+#include <vcpkg/packagespec.h>
+#include <vcpkg/vcpkgpaths.h>
+
+namespace vcpkg
+{
+ static constexpr CStringView V_120 = "v120";
+ static constexpr CStringView V_140 = "v140";
+ static constexpr CStringView V_141 = "v141";
+
+ static bool exists_and_has_equal_or_greater_version(const std::string& version_cmd,
+ const std::array<int, 3>& expected_version)
+ {
+ static const std::regex RE(R"###((\d+)\.(\d+)\.(\d+))###");
+
+ const auto rc = System::cmd_execute_and_capture_output(Strings::format(R"(%s)", version_cmd));
+ if (rc.exit_code != 0)
+ {
+ return false;
+ }
+
+ std::match_results<std::string::const_iterator> match;
+ const auto found = std::regex_search(rc.output, match, RE);
+ if (!found)
+ {
+ return false;
+ }
+
+ const int d1 = atoi(match[1].str().c_str());
+ const int d2 = atoi(match[2].str().c_str());
+ const int d3 = atoi(match[3].str().c_str());
+ if (d1 > expected_version[0] || (d1 == expected_version[0] && d2 > expected_version[1]) ||
+ (d1 == expected_version[0] && d2 == expected_version[1] && d3 >= expected_version[2]))
+ {
+ // satisfactory version found
+ return true;
+ }
+
+ return false;
+ }
+
+ static Optional<fs::path> find_if_has_equal_or_greater_version(const std::vector<fs::path>& candidate_paths,
+ const std::string& version_check_arguments,
+ const std::array<int, 3>& expected_version)
+ {
+ auto it = Util::find_if(candidate_paths, [&](const fs::path& p) {
+ const std::string cmd = Strings::format(R"("%s" %s)", p.u8string(), version_check_arguments);
+ return exists_and_has_equal_or_greater_version(cmd, expected_version);
+ });
+
+ if (it != candidate_paths.cend())
+ {
+ return std::move(*it);
+ }
+
+ return nullopt;
+ }
+
+ static fs::path fetch_dependency(const fs::path& scripts_folder,
+ const std::string& tool_name,
+ const fs::path& expected_downloaded_path,
+ const std::array<int, 3>& version)
+ {
+ const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]);
+ System::println("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...",
+ tool_name,
+ version_as_string,
+ tool_name,
+ version_as_string);
+ const fs::path script = scripts_folder / "fetchDependency.ps1";
+ const auto install_cmd =
+ System::create_powershell_script_cmd(script, Strings::format("-Dependency %s", tool_name));
+ const System::ExitCodeAndOutput rc = System::cmd_execute_and_capture_output(install_cmd);
+ if (rc.exit_code)
+ {
+ System::println(System::Color::error,
+ "Launching powershell failed or was denied when trying to fetch %s version %s.\n"
+ "(No sufficient installed version was found)",
+ tool_name,
+ version_as_string);
+ {
+ auto locked_metrics = Metrics::g_metrics.lock();
+ locked_metrics->track_property("error", "powershell install failed");
+ locked_metrics->track_property("dependency", tool_name);
+ }
+ Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code);
+ }
+
+ const fs::path actual_downloaded_path = Strings::trimmed(rc.output);
+ std::error_code ec;
+ const auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec);
+ Checks::check_exit(VCPKG_LINE_INFO,
+ eq && !ec,
+ "Expected dependency downloaded path to be %s, but was %s",
+ expected_downloaded_path.u8string(),
+ actual_downloaded_path.u8string());
+ return actual_downloaded_path;
+ }
+
+ static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder)
+ {
+ static constexpr std::array<int, 3> EXPECTED_VERSION = {3, 9, 3};
+ static const std::string VERSION_CHECK_ARGUMENTS = "--version";
+
+ const fs::path downloaded_copy = downloads_folder / "cmake-3.9.3-win32-x86" / "bin" / "cmake.exe";
+ const std::vector<fs::path> from_path = Files::find_from_PATH("cmake");
+
+ std::vector<fs::path> candidate_paths;
+ candidate_paths.push_back(downloaded_copy);
+ candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend());
+#if defined(_WIN32)
+ candidate_paths.push_back(System::get_program_files_platform_bitness() / "CMake" / "bin" / "cmake.exe");
+ candidate_paths.push_back(System::get_program_files_32_bit() / "CMake" / "bin");
+#endif
+
+ const Optional<fs::path> path =
+ find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION);
+ if (const auto p = path.get())
+ {
+ return *p;
+ }
+
+ return fetch_dependency(scripts_folder, "cmake", downloaded_copy, EXPECTED_VERSION);
+ }
+
+ fs::path get_nuget_path(const fs::path& downloads_folder, const fs::path& scripts_folder)
+ {
+ static constexpr std::array<int, 3> EXPECTED_VERSION = {4, 3, 0};
+
+ const fs::path downloaded_copy = downloads_folder / "nuget-4.3.0" / "nuget.exe";
+ const std::vector<fs::path> from_path = Files::find_from_PATH("nuget");
+
+ std::vector<fs::path> candidate_paths;
+ candidate_paths.push_back(downloaded_copy);
+ candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend());
+
+ auto path = find_if_has_equal_or_greater_version(candidate_paths, "", EXPECTED_VERSION);
+ if (const auto p = path.get())
+ {
+ return *p;
+ }
+
+ return fetch_dependency(scripts_folder, "nuget", downloaded_copy, EXPECTED_VERSION);
+ }
+
+ fs::path get_git_path(const fs::path& downloads_folder, const fs::path& scripts_folder)
+ {
+ static constexpr std::array<int, 3> EXPECTED_VERSION = {2, 14, 1};
+ static const std::string VERSION_CHECK_ARGUMENTS = "--version";
+
+ const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.1-32-bit" / "cmd" / "git.exe";
+ const std::vector<fs::path> from_path = Files::find_from_PATH("git");
+
+ std::vector<fs::path> candidate_paths;
+ candidate_paths.push_back(downloaded_copy);
+ candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend());
+#if defined(_WIN32)
+ candidate_paths.push_back(System::get_program_files_platform_bitness() / "git" / "cmd" / "git.exe");
+ candidate_paths.push_back(System::get_program_files_32_bit() / "git" / "cmd" / "git.exe");
+#endif
+
+ const Optional<fs::path> path =
+ find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION);
+ if (const auto p = path.get())
+ {
+ return *p;
+ }
+
+ return fetch_dependency(scripts_folder, "git", downloaded_copy, EXPECTED_VERSION);
+ }
+
+ static fs::path get_ifw_installerbase_path(const fs::path& downloads_folder, const fs::path& scripts_folder)
+ {
+ static constexpr std::array<int, 3> EXPECTED_VERSION = {3, 1, 81};
+ static const std::string VERSION_CHECK_ARGUMENTS = "--framework-version";
+
+ const fs::path downloaded_copy =
+ downloads_folder / "QtInstallerFramework-win-x86" / "bin" / "installerbase.exe";
+
+ std::vector<fs::path> candidate_paths;
+ candidate_paths.push_back(downloaded_copy);
+ // TODO: Uncomment later
+ // const std::vector<fs::path> from_path = Files::find_from_PATH("installerbase");
+ // candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend());
+ // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / "Qt" /
+ // "Tools" / "QtInstallerFramework" / "3.1" / "bin" / "installerbase.exe");
+ // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / "Qt" /
+ // "QtIFW-3.1.0" / "bin" / "installerbase.exe");
+
+ const Optional<fs::path> path =
+ find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION);
+ if (const auto p = path.get())
+ {
+ return *p;
+ }
+
+ return fetch_dependency(scripts_folder, "installerbase", downloaded_copy, EXPECTED_VERSION);
+ }
+
+ Expected<VcpkgPaths> VcpkgPaths::create(const fs::path& vcpkg_root_dir)
+ {
+ std::error_code ec;
+ const fs::path canonical_vcpkg_root_dir = fs::stdfs::canonical(vcpkg_root_dir, ec);
+ if (ec)
+ {
+ return ec;
+ }
+
+ VcpkgPaths paths;
+ paths.root = canonical_vcpkg_root_dir;
+
+ if (paths.root.empty())
+ {
+ Metrics::g_metrics.lock()->track_property("error", "Invalid vcpkg root directory");
+ Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid vcpkg root directory: %s", paths.root.string());
+ }
+
+ paths.packages = paths.root / "packages";
+ paths.buildtrees = paths.root / "buildtrees";
+ paths.downloads = paths.root / "downloads";
+ paths.ports = paths.root / "ports";
+ paths.installed = paths.root / "installed";
+ paths.triplets = paths.root / "triplets";
+ paths.scripts = paths.root / "scripts";
+
+ paths.buildsystems = paths.scripts / "buildsystems";
+ paths.buildsystems_msbuild_targets = paths.buildsystems / "msbuild" / "vcpkg.targets";
+
+ paths.vcpkg_dir = paths.installed / "vcpkg";
+ paths.vcpkg_dir_status_file = paths.vcpkg_dir / "status";
+ paths.vcpkg_dir_info = paths.vcpkg_dir / "info";
+ paths.vcpkg_dir_updates = paths.vcpkg_dir / "updates";
+
+ paths.ports_cmake = paths.scripts / "ports.cmake";
+
+ return paths;
+ }
+
+ fs::path VcpkgPaths::package_dir(const PackageSpec& spec) const { return this->packages / spec.dir(); }
+
+ fs::path VcpkgPaths::port_dir(const PackageSpec& spec) const { return this->ports / spec.name(); }
+ fs::path VcpkgPaths::port_dir(const std::string& name) const { return this->ports / name; }
+
+ fs::path VcpkgPaths::build_info_file_path(const PackageSpec& spec) const
+ {
+ return this->package_dir(spec) / "BUILD_INFO";
+ }
+
+ fs::path VcpkgPaths::listfile_path(const BinaryParagraph& pgh) const
+ {
+ return this->vcpkg_dir_info / (pgh.fullstem() + ".list");
+ }
+
+ const std::vector<std::string>& VcpkgPaths::get_available_triplets() const
+ {
+ return this->available_triplets.get_lazy([this]() -> std::vector<std::string> {
+
+ std::vector<std::string> output;
+ for (auto&& path : this->get_filesystem().get_files_non_recursive(this->triplets))
+ {
+ output.push_back(path.stem().filename().string());
+ }
+
+ return output;
+ });
+ }
+
+ bool VcpkgPaths::is_valid_triplet(const Triplet& t) const
+ {
+ auto it = Util::find_if(this->get_available_triplets(),
+ [&](auto&& available_triplet) { return t.canonical_name() == available_triplet; });
+ return it != this->get_available_triplets().cend();
+ }
+
+ const fs::path& VcpkgPaths::get_cmake_exe() const
+ {
+ return this->cmake_exe.get_lazy([this]() { return get_cmake_path(this->downloads, this->scripts); });
+ }
+
+ const fs::path& VcpkgPaths::get_git_exe() const
+ {
+ return this->git_exe.get_lazy([this]() { return get_git_path(this->downloads, this->scripts); });
+ }
+
+ const fs::path& VcpkgPaths::get_nuget_exe() const
+ {
+ return this->nuget_exe.get_lazy([this]() { return get_nuget_path(this->downloads, this->scripts); });
+ }
+
+ const fs::path& VcpkgPaths::get_ifw_installerbase_exe() const
+ {
+ return this->ifw_installerbase_exe.get_lazy(
+ [this]() { return get_ifw_installerbase_path(this->downloads, this->scripts); });
+ }
+
+ const fs::path& VcpkgPaths::get_ifw_binarycreator_exe() const
+ {
+ return this->ifw_binarycreator_exe.get_lazy(
+ [this]() { return get_ifw_installerbase_exe().parent_path() / "binarycreator.exe"; });
+ }
+
+ const fs::path& VcpkgPaths::get_ifw_repogen_exe() const
+ {
+ return this->ifw_repogen_exe.get_lazy(
+ [this]() { return get_ifw_installerbase_exe().parent_path() / "repogen.exe"; });
+ }
+
+ struct VisualStudioInstance
+ {
+ fs::path root_path;
+ std::string version;
+ std::string release_type;
+ std::string preference_weight; // Mostly unused, just for verification that order is as intended
+
+ std::string major_version() const { return version.substr(0, 2); }
+ };
+
+ static std::vector<VisualStudioInstance> get_visual_studio_instances(const VcpkgPaths& paths)
+ {
+ const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1";
+ const std::string cmd = System::create_powershell_script_cmd(script);
+ const System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd);
+ Checks::check_exit(
+ VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect Visual Studio instances");
+
+ const std::vector<std::string> instances_as_strings = Strings::split(ec_data.output, "\n");
+ std::vector<VisualStudioInstance> output;
+ for (const std::string& instance_as_string : instances_as_strings)
+ {
+ const std::vector<std::string> split = Strings::split(instance_as_string, "::");
+ output.push_back({split.at(3), split.at(2), split.at(1), split.at(0)});
+ }
+
+ return output;
+ }
+
+ static std::vector<Toolset> find_toolset_instances(const VcpkgPaths& paths)
+ {
+ using CPU = System::CPUArchitecture;
+
+ const auto& fs = paths.get_filesystem();
+
+ // Note: this will contain a mix of vcvarsall.bat locations and dumpbin.exe locations.
+ std::vector<fs::path> paths_examined;
+
+ std::vector<Toolset> found_toolsets;
+
+ const std::vector<VisualStudioInstance> vs_instances = get_visual_studio_instances(paths);
+ const bool v140_is_available = Util::find_if(vs_instances, [&](const VisualStudioInstance& vs_instance) {
+ return vs_instance.major_version() == "14";
+ }) != vs_instances.cend();
+
+ for (const VisualStudioInstance& vs_instance : vs_instances)
+ {
+ const std::string major_version = vs_instance.major_version();
+ if (major_version == "15")
+ {
+ const fs::path vc_dir = vs_instance.root_path / "VC";
+
+ // Skip any instances that do not have vcvarsall.
+ const fs::path vcvarsall_dir = vc_dir / "Auxiliary" / "Build";
+ const fs::path vcvarsall_bat = vcvarsall_dir / "vcvarsall.bat";
+ paths_examined.push_back(vcvarsall_bat);
+ if (!fs.exists(vcvarsall_bat)) continue;
+
+ // Get all supported architectures
+ std::vector<ToolsetArchOption> supported_architectures;
+ if (fs.exists(vcvarsall_dir / "vcvars32.bat"))
+ supported_architectures.push_back({"x86", CPU::X86, CPU::X86});
+ if (fs.exists(vcvarsall_dir / "vcvars64.bat"))
+ supported_architectures.push_back({"amd64", CPU::X64, CPU::X64});
+ if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat"))
+ supported_architectures.push_back({"x86_amd64", CPU::X86, CPU::X64});
+ if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat"))
+ supported_architectures.push_back({"x86_arm", CPU::X86, CPU::ARM});
+ if (fs.exists(vcvarsall_dir / "vcvarsx86_arm64.bat"))
+ supported_architectures.push_back({"x86_arm64", CPU::X86, CPU::ARM64});
+ if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat"))
+ supported_architectures.push_back({"amd64_x86", CPU::X64, CPU::X86});
+ if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat"))
+ supported_architectures.push_back({"amd64_arm", CPU::X64, CPU::ARM});
+ if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm64.bat"))
+ supported_architectures.push_back({"amd64_arm64", CPU::X64, CPU::ARM64});
+
+ // Locate the "best" MSVC toolchain version
+ const fs::path msvc_path = vc_dir / "Tools" / "MSVC";
+ std::vector<fs::path> msvc_subdirectories = fs.get_files_non_recursive(msvc_path);
+ Util::unstable_keep_if(msvc_subdirectories,
+ [&fs](const fs::path& path) { return fs.is_directory(path); });
+
+ // Sort them so that latest comes first
+ std::sort(
+ msvc_subdirectories.begin(),
+ msvc_subdirectories.end(),
+ [](const fs::path& left, const fs::path& right) { return left.filename() > right.filename(); });
+
+ for (const fs::path& subdir : msvc_subdirectories)
+ {
+ const fs::path dumpbin_path = subdir / "bin" / "HostX86" / "x86" / "dumpbin.exe";
+ paths_examined.push_back(dumpbin_path);
+ if (fs.exists(dumpbin_path))
+ {
+ found_toolsets.push_back(Toolset{
+ vs_instance.root_path, dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures});
+
+ if (v140_is_available)
+ {
+ found_toolsets.push_back(Toolset{vs_instance.root_path,
+ dumpbin_path,
+ vcvarsall_bat,
+ {"-vcvars_ver=14.0"},
+ V_140,
+ supported_architectures});
+ }
+
+ break;
+ }
+ }
+
+ continue;
+ }
+
+ if (major_version == "14")
+ {
+ const fs::path vcvarsall_bat = vs_instance.root_path / "VC" / "vcvarsall.bat";
+
+ paths_examined.push_back(vcvarsall_bat);
+ if (fs.exists(vcvarsall_bat))
+ {
+ const fs::path vs2015_dumpbin_exe = vs_instance.root_path / "VC" / "bin" / "dumpbin.exe";
+ paths_examined.push_back(vs2015_dumpbin_exe);
+
+ const fs::path vs2015_bin_dir = vcvarsall_bat.parent_path() / "bin";
+ std::vector<ToolsetArchOption> supported_architectures;
+ if (fs.exists(vs2015_bin_dir / "vcvars32.bat"))
+ supported_architectures.push_back({"x86", CPU::X86, CPU::X86});
+ if (fs.exists(vs2015_bin_dir / "amd64\\vcvars64.bat"))
+ supported_architectures.push_back({"x64", CPU::X64, CPU::X64});
+ if (fs.exists(vs2015_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat"))
+ supported_architectures.push_back({"x86_amd64", CPU::X86, CPU::X64});
+ if (fs.exists(vs2015_bin_dir / "x86_arm\\vcvarsx86_arm.bat"))
+ supported_architectures.push_back({"x86_arm", CPU::X86, CPU::ARM});
+ if (fs.exists(vs2015_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat"))
+ supported_architectures.push_back({"amd64_x86", CPU::X64, CPU::X86});
+ if (fs.exists(vs2015_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat"))
+ supported_architectures.push_back({"amd64_arm", CPU::X64, CPU::ARM});
+
+ if (fs.exists(vs2015_dumpbin_exe))
+ {
+ found_toolsets.push_back({vs_instance.root_path,
+ vs2015_dumpbin_exe,
+ vcvarsall_bat,
+ {},
+ V_140,
+ supported_architectures});
+ }
+ }
+ }
+ }
+
+ if (found_toolsets.empty())
+ {
+ System::println(System::Color::error, "Could not locate a complete toolset.");
+ System::println("The following paths were examined:");
+ for (const fs::path& path : paths_examined)
+ {
+ System::println(" %s", path.u8string());
+ }
+ Checks::exit_fail(VCPKG_LINE_INFO);
+ }
+
+ return found_toolsets;
+ }
+
+ const Toolset& VcpkgPaths::get_toolset(const Optional<std::string>& toolset_version,
+ const Optional<fs::path>& visual_studio_path) const
+ {
+ // Invariant: toolsets are non-empty and sorted with newest at back()
+ const std::vector<Toolset>& vs_toolsets =
+ this->toolsets.get_lazy([this]() { return find_toolset_instances(*this); });
+
+ std::vector<const Toolset*> candidates = Util::element_pointers(vs_toolsets);
+ const auto tsv = toolset_version.get();
+ const auto vsp = visual_studio_path.get();
+
+ if (tsv && vsp)
+ {
+ Util::stable_keep_if(
+ candidates, [&](const Toolset* t) { return *tsv == t->version && *vsp == t->visual_studio_root_path; });
+ Checks::check_exit(VCPKG_LINE_INFO,
+ !candidates.empty(),
+ "Could not find Visual Studio instace at %s with %s toolset.",
+ vsp->u8string(),
+ *tsv);
+
+ Checks::check_exit(VCPKG_LINE_INFO, candidates.size() == 1);
+ return *candidates.back();
+ }
+
+ if (tsv)
+ {
+ Util::stable_keep_if(candidates, [&](const Toolset* t) { return *tsv == t->version; });
+ Checks::check_exit(
+ VCPKG_LINE_INFO, !candidates.empty(), "Could not find Visual Studio instace with %s toolset.", *tsv);
+ }
+
+ if (vsp)
+ {
+ const fs::path vs_root_path = *vsp;
+ Util::stable_keep_if(candidates,
+ [&](const Toolset* t) { return vs_root_path == t->visual_studio_root_path; });
+ Checks::check_exit(VCPKG_LINE_INFO,
+ !candidates.empty(),
+ "Could not find Visual Studio instace at %s.",
+ vs_root_path.generic_string());
+ }
+
+ return *candidates.front();
+ }
+
+ Files::Filesystem& VcpkgPaths::get_filesystem() const { return Files::get_real_filesystem(); }
+}
diff --git a/toolsrc/src/VersionT.cpp b/toolsrc/src/vcpkg/versiont.cpp
index 738d2ce88..1c52d674a 100644
--- a/toolsrc/src/VersionT.cpp
+++ b/toolsrc/src/vcpkg/versiont.cpp
@@ -1,7 +1,7 @@
#include "pch.h"
-#include "VersionT.h"
-#include "vcpkg_Strings.h"
+#include <vcpkg/base/strings.h>
+#include <vcpkg/versiont.h>
namespace vcpkg
{
diff --git a/toolsrc/src/vcpkg_Build_BuildPolicy.cpp b/toolsrc/src/vcpkg_Build_BuildPolicy.cpp
deleted file mode 100644
index b3bb778dc..000000000
--- a/toolsrc/src/vcpkg_Build_BuildPolicy.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-#include "pch.h"
-
-#include "vcpkg_Build.h"
-#include "vcpkg_Checks.h"
-#include "vcpkg_Enums.h"
-
-namespace vcpkg::Build
-{
- static const std::string NAME_EMPTY_PACKAGE = "PolicyEmptyPackage";
- static const std::string NAME_DLLS_WITHOUT_LIBS = "PolicyDLLsWithoutLIBs";
- static const std::string NAME_ONLY_RELEASE_CRT = "PolicyOnlyReleaseCRT";
- static const std::string NAME_EMPTY_INCLUDE_FOLDER = "PolicyEmptyIncludeFolder";
- static const std::string NAME_ALLOW_OBSOLETE_MSVCRT = "PolicyAllowObsoleteMsvcrt";
-
- const std::string& to_string(BuildPolicy policy)
- {
- switch (policy)
- {
- case BuildPolicy::EMPTY_PACKAGE: return NAME_EMPTY_PACKAGE;
- case BuildPolicy::DLLS_WITHOUT_LIBS: return NAME_DLLS_WITHOUT_LIBS;
- case BuildPolicy::ONLY_RELEASE_CRT: return NAME_ONLY_RELEASE_CRT;
- case BuildPolicy::EMPTY_INCLUDE_FOLDER: return NAME_EMPTY_INCLUDE_FOLDER;
- case BuildPolicy::ALLOW_OBSOLETE_MSVCRT: return NAME_ALLOW_OBSOLETE_MSVCRT;
- default: Checks::unreachable(VCPKG_LINE_INFO);
- }
- }
-
- CStringView to_cmake_variable(BuildPolicy policy)
- {
- switch (policy)
- {
- case BuildPolicy::EMPTY_PACKAGE: return "VCPKG_POLICY_EMPTY_PACKAGE";
- case BuildPolicy::DLLS_WITHOUT_LIBS: return "VCPKG_POLICY_DLLS_WITHOUT_LIBS";
- case BuildPolicy::ONLY_RELEASE_CRT: return "VCPKG_POLICY_ONLY_RELEASE_CRT";
- case BuildPolicy::EMPTY_INCLUDE_FOLDER: return "VCPKG_POLICY_EMPTY_INCLUDE_FOLDER";
- case BuildPolicy::ALLOW_OBSOLETE_MSVCRT: return "VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT";
- default: Checks::unreachable(VCPKG_LINE_INFO);
- }
- }
-}
diff --git a/toolsrc/src/vcpkg_GlobalState.cpp b/toolsrc/src/vcpkg_GlobalState.cpp
deleted file mode 100644
index 2221222c0..000000000
--- a/toolsrc/src/vcpkg_GlobalState.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "pch.h"
-
-#include "vcpkg_GlobalState.h"
-
-namespace vcpkg
-{
- Util::LockGuarded<ElapsedTime> GlobalState::timer;
- std::atomic<bool> GlobalState::debugging = false;
- std::atomic<bool> GlobalState::feature_packages = false;
-
- std::atomic<int> GlobalState::g_init_console_cp = 0;
- std::atomic<int> GlobalState::g_init_console_output_cp = 0;
-}
diff --git a/toolsrc/src/vcpkg_metrics_uploader.cpp b/toolsrc/src/vcpkgmetricsuploader.cpp
index cef4f4756..2239fe750 100644
--- a/toolsrc/src/vcpkg_metrics_uploader.cpp
+++ b/toolsrc/src/vcpkgmetricsuploader.cpp
@@ -1,6 +1,8 @@
-#include "metrics.h"
-#include "vcpkg_Checks.h"
-#include "vcpkg_Files.h"
+#include <vcpkg/metrics.h>
+
+#include <vcpkg/base/checks.h>
+#include <vcpkg/base/files.h>
+
#include <Windows.h>
using namespace vcpkg;
diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj
index edecd7720..ae332e015 100644
--- a/toolsrc/vcpkglib/vcpkglib.vcxproj
+++ b/toolsrc/vcpkglib/vcpkglib.vcxproj
@@ -136,110 +136,114 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
- <ClInclude Include="..\include\BinaryParagraph.h" />
- <ClInclude Include="..\include\CStringView.h" />
- <ClInclude Include="..\include\lazy.h" />
- <ClInclude Include="..\include\LineInfo.h" />
- <ClInclude Include="..\include\ParagraphParseResult.h" />
- <ClInclude Include="..\include\PostBuildLint_BuildType.h" />
- <ClInclude Include="..\include\Span.h" />
- <ClInclude Include="..\include\vcpkg_Build.h" />
- <ClInclude Include="..\include\coff_file_reader.h" />
- <ClInclude Include="..\include\vcpkg_expected.h" />
- <ClInclude Include="..\include\filesystem_fs.h" />
- <ClInclude Include="..\include\SortedVector.h" />
- <ClInclude Include="..\include\MachineType.h" />
- <ClInclude Include="..\include\metrics.h" />
- <ClInclude Include="..\include\PackageSpec.h" />
- <ClInclude Include="..\include\PackageSpecParseResult.h" />
- <ClInclude Include="..\include\Paragraphs.h" />
<ClInclude Include="..\include\pch.h" />
- <ClInclude Include="..\include\PostBuildLint.h" />
- <ClInclude Include="..\include\SourceParagraph.h" />
- <ClInclude Include="..\include\StatusParagraph.h" />
- <ClInclude Include="..\include\StatusParagraphs.h" />
- <ClInclude Include="..\include\vcpkg_Chrono.h" />
- <ClInclude Include="..\include\triplet.h" />
- <ClInclude Include="..\include\vcpkglib.h" />
- <ClInclude Include="..\include\vcpkg_GlobalState.h" />
- <ClInclude Include="..\include\vcpkg_Parse.h" />
- <ClInclude Include="..\include\vcpkg_Checks.h" />
- <ClInclude Include="..\include\VcpkgCmdArguments.h" />
- <ClInclude Include="..\include\vcpkg_Commands.h" />
- <ClInclude Include="..\include\vcpkg_Dependencies.h" />
- <ClInclude Include="..\include\vcpkg_Enums.h" />
- <ClInclude Include="..\include\vcpkg_Files.h" />
- <ClInclude Include="..\include\vcpkg_Graphs.h" />
- <ClInclude Include="..\include\vcpkg_Input.h" />
- <ClInclude Include="..\include\vcpkg_Maps.h" />
- <ClInclude Include="..\include\vcpkg_optional.h" />
- <ClInclude Include="..\include\VcpkgPaths.h" />
- <ClInclude Include="..\include\vcpkg_Strings.h" />
- <ClInclude Include="..\include\vcpkg_System.h" />
- <ClInclude Include="..\include\vcpkg_Util.h" />
- <ClInclude Include="..\include\VersionT.h" />
+ <ClInclude Include="..\include\vcpkg\base\checks.h" />
+ <ClInclude Include="..\include\vcpkg\base\chrono.h" />
+ <ClInclude Include="..\include\vcpkg\base\cofffilereader.h" />
+ <ClInclude Include="..\include\vcpkg\base\cstringview.h" />
+ <ClInclude Include="..\include\vcpkg\base\enums.h" />
+ <ClInclude Include="..\include\vcpkg\base\expected.h" />
+ <ClInclude Include="..\include\vcpkg\base\files.h" />
+ <ClInclude Include="..\include\vcpkg\base\graphs.h" />
+ <ClInclude Include="..\include\vcpkg\base\lazy.h" />
+ <ClInclude Include="..\include\vcpkg\base\lineinfo.h" />
+ <ClInclude Include="..\include\vcpkg\base\machinetype.h" />
+ <ClInclude Include="..\include\vcpkg\base\optional.h" />
+ <ClInclude Include="..\include\vcpkg\base\sortedvector.h" />
+ <ClInclude Include="..\include\vcpkg\base\span.h" />
+ <ClInclude Include="..\include\vcpkg\base\strings.h" />
+ <ClInclude Include="..\include\vcpkg\base\system.h" />
+ <ClInclude Include="..\include\vcpkg\base\util.h" />
+ <ClInclude Include="..\include\vcpkg\binaryparagraph.h" />
+ <ClInclude Include="..\include\vcpkg\build.h" />
+ <ClInclude Include="..\include\vcpkg\commands.h" />
+ <ClInclude Include="..\include\vcpkg\dependencies.h" />
+ <ClInclude Include="..\include\vcpkg\export.h" />
+ <ClInclude Include="..\include\vcpkg\export.ifw.h" />
+ <ClInclude Include="..\include\vcpkg\globalstate.h" />
+ <ClInclude Include="..\include\vcpkg\help.h" />
+ <ClInclude Include="..\include\vcpkg\input.h" />
+ <ClInclude Include="..\include\vcpkg\install.h" />
+ <ClInclude Include="..\include\vcpkg\metrics.h" />
+ <ClInclude Include="..\include\vcpkg\packagespec.h" />
+ <ClInclude Include="..\include\vcpkg\packagespecparseresult.h" />
+ <ClInclude Include="..\include\vcpkg\paragraphparseresult.h" />
+ <ClInclude Include="..\include\vcpkg\paragraphs.h" />
+ <ClInclude Include="..\include\vcpkg\parse.h" />
+ <ClInclude Include="..\include\vcpkg\postbuildlint.h" />
+ <ClInclude Include="..\include\vcpkg\postbuildlint.buildtype.h" />
+ <ClInclude Include="..\include\vcpkg\remove.h" />
+ <ClInclude Include="..\include\vcpkg\sourceparagraph.h" />
+ <ClInclude Include="..\include\vcpkg\statusparagraph.h" />
+ <ClInclude Include="..\include\vcpkg\statusparagraphs.h" />
+ <ClInclude Include="..\include\vcpkg\triplet.h" />
+ <ClInclude Include="..\include\vcpkg\update.h" />
+ <ClInclude Include="..\include\vcpkg\vcpkgcmdarguments.h" />
+ <ClInclude Include="..\include\vcpkg\vcpkglib.h" />
+ <ClInclude Include="..\include\vcpkg\vcpkgpaths.h" />
+ <ClInclude Include="..\include\vcpkg\versiont.h" />
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\src\BinaryParagraph.cpp" />
- <ClCompile Include="..\src\commands_ci.cpp" />
- <ClCompile Include="..\src\commands_depends.cpp" />
- <ClCompile Include="..\src\commands_env.cpp" />
- <ClCompile Include="..\src\commands_export.cpp" />
- <ClCompile Include="..\src\LineInfo.cpp" />
- <ClCompile Include="..\src\ParagraphParseResult.cpp" />
- <ClCompile Include="..\src\vcpkg_Build.cpp" />
- <ClCompile Include="..\src\vcpkg_Build_BuildPolicy.cpp" />
- <ClCompile Include="..\src\coff_file_reader.cpp" />
- <ClCompile Include="..\src\commands_available_commands.cpp" />
- <ClCompile Include="..\src\commands_build.cpp" />
- <ClCompile Include="..\src\commands_build_external.cpp" />
- <ClCompile Include="..\src\commands_cache.cpp" />
- <ClCompile Include="..\src\commands_contact.cpp" />
- <ClCompile Include="..\src\commands_create.cpp" />
- <ClCompile Include="..\src\commands_edit.cpp" />
- <ClCompile Include="..\src\commands_hash.cpp" />
- <ClCompile Include="..\src\commands_help.cpp" />
- <ClCompile Include="..\src\commands_import.cpp" />
- <ClCompile Include="..\src\commands_install.cpp" />
- <ClCompile Include="..\src\commands_integrate.cpp" />
- <ClCompile Include="..\src\commands_list.cpp" />
- <ClCompile Include="..\src\commands_owns.cpp" />
- <ClCompile Include="..\src\commands_portsdiff.cpp" />
- <ClCompile Include="..\src\commands_remove.cpp" />
- <ClCompile Include="..\src\commands_search.cpp" />
- <ClCompile Include="..\src\commands_update.cpp" />
- <ClCompile Include="..\src\commands_version.cpp" />
- <ClCompile Include="..\src\MachineType.cpp" />
- <ClCompile Include="..\src\metrics.cpp" />
<ClCompile Include="..\src\pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
- <ClCompile Include="..\src\PostBuildLint.cpp" />
- <ClCompile Include="..\src\PostBuildLint_BuildType.cpp" />
- <ClCompile Include="..\src\vcpkg_Chrono.cpp" />
- <ClCompile Include="..\src\vcpkglib.cpp" />
- <ClCompile Include="..\src\PackageSpec.cpp" />
- <ClCompile Include="..\src\PackageSpecParseResult.cpp" />
- <ClCompile Include="..\src\Paragraphs.cpp" />
- <ClCompile Include="..\src\SourceParagraph.cpp" />
- <ClCompile Include="..\src\StatusParagraph.cpp" />
- <ClCompile Include="..\src\StatusParagraphs.cpp" />
- <ClCompile Include="..\src\triplet.cpp" />
- <ClCompile Include="..\src\vcpkg_GlobalState.cpp" />
- <ClCompile Include="..\src\vcpkg_Parse.cpp" />
- <ClCompile Include="..\src\vcpkg_Checks.cpp" />
- <ClCompile Include="..\src\VcpkgCmdArguments.cpp" />
- <ClCompile Include="..\src\vcpkg_Dependencies.cpp" />
- <ClCompile Include="..\src\vcpkg_Enums.cpp" />
- <ClCompile Include="..\src\vcpkg_Files.cpp" />
- <ClCompile Include="..\src\vcpkg_Input.cpp" />
- <ClCompile Include="..\src\VcpkgPaths.cpp" />
- <ClCompile Include="..\src\vcpkg_Strings.cpp" />
- <ClCompile Include="..\src\vcpkg_System.cpp" />
- <ClCompile Include="..\src\VersionT.cpp" />
+ <ClCompile Include="..\src\vcpkg\base\checks.cpp" />
+ <ClCompile Include="..\src\vcpkg\base\chrono.cpp" />
+ <ClCompile Include="..\src\vcpkg\base\cofffilereader.cpp" />
+ <ClCompile Include="..\src\vcpkg\base\enums.cpp" />
+ <ClCompile Include="..\src\vcpkg\base\files.cpp" />
+ <ClCompile Include="..\src\vcpkg\base\lineinfo.cpp" />
+ <ClCompile Include="..\src\vcpkg\base\machinetype.cpp" />
+ <ClCompile Include="..\src\vcpkg\base\strings.cpp" />
+ <ClCompile Include="..\src\vcpkg\base\system.cpp" />
+ <ClCompile Include="..\src\vcpkg\binaryparagraph.cpp" />
+ <ClCompile Include="..\src\vcpkg\build.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.autocomplete.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.buildexternal.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.cache.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.ci.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.contact.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.create.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.dependinfo.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.edit.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.env.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.exportifw.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.hash.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.import.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.integrate.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.list.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.owns.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.portsdiff.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.search.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.version.cpp" />
+ <ClCompile Include="..\src\vcpkg\dependencies.cpp" />
+ <ClCompile Include="..\src\vcpkg\export.cpp" />
+ <ClCompile Include="..\src\vcpkg\globalstate.cpp" />
+ <ClCompile Include="..\src\vcpkg\help.cpp" />
+ <ClCompile Include="..\src\vcpkg\input.cpp" />
+ <ClCompile Include="..\src\vcpkg\install.cpp" />
+ <ClCompile Include="..\src\vcpkg\metrics.cpp" />
+ <ClCompile Include="..\src\vcpkg\packagespec.cpp" />
+ <ClCompile Include="..\src\vcpkg\packagespecparseresult.cpp" />
+ <ClCompile Include="..\src\vcpkg\paragraphparseresult.cpp" />
+ <ClCompile Include="..\src\vcpkg\paragraphs.cpp" />
+ <ClCompile Include="..\src\vcpkg\parse.cpp" />
+ <ClCompile Include="..\src\vcpkg\postbuildlint.buildtype.cpp" />
+ <ClCompile Include="..\src\vcpkg\postbuildlint.cpp" />
+ <ClCompile Include="..\src\vcpkg\remove.cpp" />
+ <ClCompile Include="..\src\vcpkg\sourceparagraph.cpp" />
+ <ClCompile Include="..\src\vcpkg\statusparagraph.cpp" />
+ <ClCompile Include="..\src\vcpkg\statusparagraphs.cpp" />
+ <ClCompile Include="..\src\vcpkg\triplet.cpp" />
+ <ClCompile Include="..\src\vcpkg\update.cpp" />
+ <ClCompile Include="..\src\vcpkg\vcpkgcmdarguments.cpp" />
+ <ClCompile Include="..\src\vcpkg\vcpkglib.cpp" />
+ <ClCompile Include="..\src\vcpkg\vcpkgpaths.cpp" />
+ <ClCompile Include="..\src\vcpkg\versiont.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters
index 2fbf3d929..e902bffbb 100644
--- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters
+++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters
@@ -13,300 +13,324 @@
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
+ <Filter Include="Header Files\vcpkg">
+ <UniqueIdentifier>{69f6b6e6-5ac4-4419-a256-b8a6b0392720}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Header Files\vcpkg\base">
+ <UniqueIdentifier>{4a229410-0d09-4dab-953b-f434d6483f96}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Source Files\vcpkg">
+ <UniqueIdentifier>{75592043-ab63-4905-beee-568a6ab8bf93}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Source Files\vcpkg\base">
+ <UniqueIdentifier>{fa1f10e7-58d2-4f7c-ac26-a979baa70061}</UniqueIdentifier>
+ </Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\src\SourceParagraph.cpp">
+ <ClCompile Include="..\src\pch.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\src\BinaryParagraph.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\binaryparagraph.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\StatusParagraph.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\build.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\StatusParagraphs.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.autocomplete.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\triplet.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.buildexternal.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\Paragraphs.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.cache.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\metrics.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.ci.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\vcpkg_Input.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.contact.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\coff_file_reader.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_available_commands.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.create.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_build.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.dependinfo.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_build_external.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.edit.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_cache.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.env.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_contact.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.exportifw.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_create.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.hash.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_edit.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.import.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_hash.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.integrate.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_help.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.list.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_import.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.owns.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_install.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.portsdiff.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_integrate.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.search.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_list.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\commands.version.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_owns.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\dependencies.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_portsdiff.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\export.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_remove.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\globalstate.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_search.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\help.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_update.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\input.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_version.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\install.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\MachineType.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\metrics.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\vcpkg_Dependencies.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\packagespec.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\vcpkglib.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\packagespecparseresult.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\vcpkg_System.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\paragraphparseresult.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\vcpkg_Checks.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\paragraphs.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\vcpkg_Files.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\parse.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\vcpkg_Strings.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\postbuildlint.buildtype.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\pch.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\postbuildlint.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\PostBuildLint.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\remove.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\PostBuildLint_BuildType.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\sourceparagraph.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\vcpkg_Enums.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\statusparagraph.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_ci.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\statusparagraphs.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\vcpkg_Chrono.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\triplet.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\LineInfo.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\update.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_env.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\vcpkgcmdarguments.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\PackageSpec.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\vcpkglib.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\PackageSpecParseResult.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\vcpkgpaths.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\ParagraphParseResult.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\versiont.cpp">
+ <Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\VcpkgCmdArguments.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\base\checks.cpp">
+ <Filter>Source Files\vcpkg\base</Filter>
</ClCompile>
- <ClCompile Include="..\src\VcpkgPaths.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\base\chrono.cpp">
+ <Filter>Source Files\vcpkg\base</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_depends.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\base\cofffilereader.cpp">
+ <Filter>Source Files\vcpkg\base</Filter>
</ClCompile>
- <ClCompile Include="..\src\commands_export.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\base\enums.cpp">
+ <Filter>Source Files\vcpkg\base</Filter>
</ClCompile>
- <ClCompile Include="..\src\VersionT.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\base\files.cpp">
+ <Filter>Source Files\vcpkg\base</Filter>
</ClCompile>
- <ClCompile Include="..\src\vcpkg_Build.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\base\lineinfo.cpp">
+ <Filter>Source Files\vcpkg\base</Filter>
</ClCompile>
- <ClCompile Include="..\src\vcpkg_Build_BuildPolicy.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\base\machinetype.cpp">
+ <Filter>Source Files\vcpkg\base</Filter>
</ClCompile>
- <ClCompile Include="..\src\vcpkg_Parse.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\base\strings.cpp">
+ <Filter>Source Files\vcpkg\base</Filter>
</ClCompile>
- <ClCompile Include="..\src\vcpkg_GlobalState.cpp">
- <Filter>Source Files</Filter>
+ <ClCompile Include="..\src\vcpkg\base\system.cpp">
+ <Filter>Source Files\vcpkg\base</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
- <ClInclude Include="..\include\SourceParagraph.h">
+ <ClInclude Include="..\include\pch.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\include\BinaryParagraph.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\base\files.h">
+ <Filter>Header Files\vcpkg\base</Filter>
</ClInclude>
- <ClInclude Include="..\include\StatusParagraph.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\base\checks.h">
+ <Filter>Header Files\vcpkg\base</Filter>
</ClInclude>
- <ClInclude Include="..\include\StatusParagraphs.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\base\chrono.h">
+ <Filter>Header Files\vcpkg\base</Filter>
</ClInclude>
- <ClInclude Include="..\include\triplet.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\base\cofffilereader.h">
+ <Filter>Header Files\vcpkg\base</Filter>
</ClInclude>
- <ClInclude Include="..\include\Paragraphs.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\base\cstringview.h">
+ <Filter>Header Files\vcpkg\base</Filter>
</ClInclude>
- <ClInclude Include="..\include\metrics.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\base\enums.h">
+ <Filter>Header Files\vcpkg\base</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkg_Input.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\base\expected.h">
+ <Filter>Header Files\vcpkg\base</Filter>
</ClInclude>
- <ClInclude Include="..\include\coff_file_reader.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\base\graphs.h">
+ <Filter>Header Files\vcpkg\base</Filter>
</ClInclude>
- <ClInclude Include="..\include\filesystem_fs.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\base\lazy.h">
+ <Filter>Header Files\vcpkg\base</Filter>
</ClInclude>
- <ClInclude Include="..\include\MachineType.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\base\lineinfo.h">
+ <Filter>Header Files\vcpkg\base</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkg_Commands.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\base\machinetype.h">
+ <Filter>Header Files\vcpkg\base</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkg_Dependencies.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\base\optional.h">
+ <Filter>Header Files\vcpkg\base</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkglib.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\base\sortedvector.h">
+ <Filter>Header Files\vcpkg\base</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkg_Checks.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\base\span.h">
+ <Filter>Header Files\vcpkg\base</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkg_Files.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\base\strings.h">
+ <Filter>Header Files\vcpkg\base</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkg_Graphs.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\base\system.h">
+ <Filter>Header Files\vcpkg\base</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkg_Maps.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\base\util.h">
+ <Filter>Header Files\vcpkg\base</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkg_Strings.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\binaryparagraph.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkg_System.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\build.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\pch.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\commands.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkg_optional.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\dependencies.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\PostBuildLint.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\export.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkg_Enums.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\globalstate.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkg_Chrono.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\help.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\lazy.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\input.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\LineInfo.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\install.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkg_expected.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\metrics.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkg_Util.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\packagespec.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\SortedVector.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\packagespecparseresult.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\CStringView.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\paragraphparseresult.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\PackageSpec.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\paragraphs.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\PackageSpecParseResult.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\parse.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\ParagraphParseResult.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\postbuildlint.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\VcpkgCmdArguments.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\remove.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\VersionT.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\sourceparagraph.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\VcpkgPaths.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\statusparagraph.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkg_Build.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\statusparagraphs.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\PostBuildLint_BuildType.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\triplet.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\Span.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\update.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkg_Parse.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\vcpkgcmdarguments.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
- <ClInclude Include="..\include\vcpkg_GlobalState.h">
- <Filter>Header Files</Filter>
+ <ClInclude Include="..\include\vcpkg\vcpkglib.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\vcpkgpaths.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\versiont.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\postbuildlint.buildtype.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\export.ifw.h">
+ <Filter>Header Files\vcpkg</Filter>
</ClInclude>
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj
index 472d74e30..4b59c5ace 100644
--- a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj
+++ b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj
@@ -131,7 +131,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="..\src\vcpkg_metrics_uploader.cpp" />
+ <ClCompile Include="..\src\vcpkgmetricsuploader.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\vcpkglib\vcpkglib.vcxproj">
diff --git a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj.filters b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj.filters
index a50df7250..847921000 100644
--- a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj.filters
+++ b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj.filters
@@ -15,7 +15,7 @@
</Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\src\vcpkg_metrics_uploader.cpp">
+ <ClCompile Include="..\src\vcpkgmetricsuploader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj b/toolsrc/vcpkgtest/vcpkgtest.vcxproj
index 041e74d31..d25748124 100644
--- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj
+++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj
@@ -19,11 +19,11 @@
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\src\tests_arguments.cpp" />
- <ClCompile Include="..\src\tests_dependencies.cpp" />
- <ClCompile Include="..\src\tests_package_spec.cpp" />
- <ClCompile Include="..\src\tests_paragraph.cpp" />
- <ClCompile Include="..\src\test_install_plan.cpp" />
+ <ClCompile Include="..\src\tests.arguments.cpp" />
+ <ClCompile Include="..\src\tests.dependencies.cpp" />
+ <ClCompile Include="..\src\tests.packagespec.cpp" />
+ <ClCompile Include="..\src\tests.paragraph.cpp" />
+ <ClCompile Include="..\src\tests.installplan.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\vcpkglib\vcpkglib.vcxproj">
diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters
index b31dbd951..42691c614 100644
--- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters
+++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters
@@ -15,19 +15,19 @@
</Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\src\tests_paragraph.cpp">
+ <ClCompile Include="..\src\tests.installplan.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\src\tests_dependencies.cpp">
+ <ClCompile Include="..\src\tests.arguments.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\src\tests_arguments.cpp">
+ <ClCompile Include="..\src\tests.dependencies.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\src\test_install_plan.cpp">
+ <ClCompile Include="..\src\tests.packagespec.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\src\tests_package_spec.cpp">
+ <ClCompile Include="..\src\tests.paragraph.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
diff --git a/triplets/arm64-uwp.cmake b/triplets/arm64-uwp.cmake
new file mode 100644
index 000000000..b37c34e87
--- /dev/null
+++ b/triplets/arm64-uwp.cmake
@@ -0,0 +1,6 @@
+set(VCPKG_TARGET_ARCHITECTURE arm64)
+set(VCPKG_CRT_LINKAGE dynamic)
+set(VCPKG_LIBRARY_LINKAGE dynamic)
+
+set(VCPKG_CMAKE_SYSTEM_NAME WindowsStore)
+set(VCPKG_CMAKE_SYSTEM_VERSION 10.0)