aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjasjuang <jasjuang@gmail.com>2017-09-22 08:16:32 -0700
committerjasjuang <jasjuang@gmail.com>2017-09-22 08:16:32 -0700
commitf643a8422f87c5a16e3cc77e3e321e34a45f7103 (patch)
tree419c9a2e74ab577aab0e868441b9a0e4c15d4919
parent9989177fed607cdc9e20127ff7c22e3266e7c913 (diff)
parentfac96eb344a500405ab65b7e7f3755af0ad00b7e (diff)
downloadvcpkg-f643a8422f87c5a16e3cc77e3e321e34a45f7103.tar.gz
vcpkg-f643a8422f87c5a16e3cc77e3e321e34a45f7103.zip
Merge branch 'master' of https://github.com/jasjuang/vcpkg
-rw-r--r--CHANGELOG.md167
-rw-r--r--docs/about/faq.md26
-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/allegro5/fix-pdb-install.patch21
-rw-r--r--ports/allegro5/portfile.cmake14
-rw-r--r--ports/anax/CONTROL2
-rw-r--r--ports/angle/CONTROL2
-rw-r--r--ports/angle/portfile.cmake2
-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/assimp/const-compare-worditerator.patch15
-rw-r--r--ports/assimp/portfile.cmake5
-rw-r--r--ports/atk/CONTROL2
-rw-r--r--ports/aubio/CONTROL2
-rw-r--r--ports/aws-sdk-cpp/CONTROL2
-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/CONTROL2
-rw-r--r--ports/blaze/portfile.cmake12
-rw-r--r--ports/bond/CONTROL2
-rw-r--r--ports/boost/CONTROL2
-rw-r--r--ports/boost/portfile.cmake17
-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.txt43
-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/catch/CONTROL2
-rw-r--r--ports/catch/portfile.cmake5
-rw-r--r--ports/ccd/0001_fix_symbols_export.patch39
-rw-r--r--ports/ccd/CONTROL (renamed from ports/libccd/CONTROL)4
-rw-r--r--ports/ccd/portfile.cmake30
-rw-r--r--ports/ccfits/CONTROL4
-rw-r--r--ports/ccfits/dll_exports.patch495
-rw-r--r--ports/ccfits/portfile.cmake56
-rw-r--r--ports/cereal/CONTROL2
-rw-r--r--ports/ceres/CONTROL4
-rw-r--r--ports/cfitsio/CONTROL3
-rw-r--r--ports/cfitsio/portfile.cmake29
-rw-r--r--ports/charls/CONTROL4
-rw-r--r--ports/chmlib/CONTROL3
-rw-r--r--ports/chmlib/chm.vcxproj211
-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.cmake66
-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/CONTROL6
-rw-r--r--ports/cpprestsdk/portfile.cmake2
-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/CMakeLists.txt2
-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/curl/portfile.cmake4
-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/ecm/CONTROL2
-rw-r--r--ports/ecm/portfile.cmake8
-rw-r--r--ports/eigen3/CONTROL2
-rw-r--r--ports/embree/CONTROL2
-rw-r--r--ports/entityx/CONTROL2
-rw-r--r--ports/evpp/CONTROL2
-rw-r--r--ports/expat/CONTROL2
-rw-r--r--ports/expat/portfile.cmake21
-rw-r--r--ports/fadbad/CONTROL3
-rw-r--r--ports/fadbad/portfile.cmake18
-rw-r--r--ports/fastlz/CONTROL2
-rw-r--r--ports/fcl/0001_fix_package_detection.patch81
-rw-r--r--ports/fcl/CONTROL4
-rw-r--r--ports/fcl/portfile.cmake42
-rw-r--r--ports/ffmpeg/CONTROL4
-rw-r--r--ports/ffmpeg/portfile.cmake8
-rw-r--r--ports/fftw3/CONTROL2
-rw-r--r--ports/flann/CONTROL2
-rw-r--r--ports/flann/portfile.cmake1
-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/fontconfig/CONTROL2
-rw-r--r--ports/freeglut/CONTROL4
-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/fuzzylite/CONTROL2
-rw-r--r--ports/g2o/CONTROL2
-rw-r--r--ports/gdal/CONTROL2
-rw-r--r--ports/gdal/portfile.cmake4
-rw-r--r--ports/gdcm2/CONTROL2
-rw-r--r--ports/gdk-pixbuf/CMakeLists.txt1
-rw-r--r--ports/gdk-pixbuf/CONTROL2
-rw-r--r--ports/gdk-pixbuf/portfile.cmake4
-rw-r--r--ports/geogram/CONTROL2
-rw-r--r--ports/geographiclib/CONTROL2
-rw-r--r--ports/geos/CONTROL2
-rw-r--r--ports/gettext/CONTROL2
-rw-r--r--ports/gflags/CONTROL2
-rw-r--r--ports/giflib/CONTROL2
-rw-r--r--ports/gl2ps/CONTROL4
-rw-r--r--ports/gl2ps/portfile.cmake24
-rw-r--r--ports/gl2ps/separate-static-dynamic-build.patch214
-rw-r--r--ports/glbinding/CONTROL2
-rw-r--r--ports/glew/CONTROL4
-rw-r--r--ports/glew/portfile.cmake10
-rw-r--r--ports/glfw3/CONTROL4
-rw-r--r--ports/glib/CONTROL2
-rw-r--r--ports/glib/portfile.cmake4
-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/gtk/CONTROL2
-rw-r--r--ports/gtk/portfile.cmake4
-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/CONTROL4
-rw-r--r--ports/hdf5/CONTROL4
-rw-r--r--ports/highfive/CONTROL4
-rw-r--r--ports/highfive/portfile.cmake13
-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/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/jsoncpp/portfile.cmake30
-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/jxrlib/portfile.cmake2
-rw-r--r--ports/kf5plotting/CONTROL4
-rw-r--r--ports/kf5plotting/portfile.cmake24
-rw-r--r--ports/lcms/CMakeLists.txt5
-rw-r--r--ports/lcms/CONTROL4
-rw-r--r--ports/lcms/portfile.cmake24
-rw-r--r--ports/lcms/shared.patch2
-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/libccd/portfile.cmake41
-rw-r--r--ports/libconfig/CONTROL2
-rw-r--r--ports/libepoxy/CONTROL2
-rw-r--r--ports/libevent/CONTROL4
-rw-r--r--ports/libffi/CONTROL2
-rw-r--r--ports/libflac/CONTROL2
-rw-r--r--ports/libgd/CONTROL2
-rw-r--r--ports/libharu/CONTROL4
-rw-r--r--ports/libharu/portfile.cmake58
-rw-r--r--ports/libiconv/CONTROL2
-rw-r--r--ports/libjpeg-turbo/CONTROL2
-rw-r--r--ports/libkml/CONTROL2
-rw-r--r--ports/liblzma/CONTROL2
-rw-r--r--ports/libmad/CMakeLists.txt2
-rw-r--r--ports/libmad/CONTROL2
-rw-r--r--ports/libmad/portfile.cmake5
-rw-r--r--ports/libmad/use_fpm_default.patch16
-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/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/libogg/portfile.cmake3
-rw-r--r--ports/libopusenc/CONTROL2
-rw-r--r--ports/libp7-baical/CMakeLists.txt5
-rw-r--r--ports/libp7-baical/CONTROL2
-rw-r--r--ports/libp7-baical/portfile.cmake8
-rw-r--r--ports/libpng/CONTROL2
-rw-r--r--ports/libpng/portfile.cmake4
-rw-r--r--ports/libpopt/CONTROL2
-rw-r--r--ports/libpq/CONTROL2
-rw-r--r--ports/libraw/CONTROL4
-rw-r--r--ports/libraw/portfile.cmake10
-rw-r--r--ports/libsigcpp/CMakeLists.txt19
-rw-r--r--ports/libsigcpp/CONTROL2
-rw-r--r--ports/libsigcpp/portfile.cmake8
-rw-r--r--ports/libsndfile/CONTROL2
-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/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/libxml2/portfile.cmake4
-rw-r--r--ports/libzip/CONTROL2
-rw-r--r--ports/live555/CONTROL2
-rw-r--r--ports/llvm/CONTROL2
-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/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/CMakeLists.txt2
-rw-r--r--ports/lz4/CONTROL2
-rw-r--r--ports/lz4/auto-define-import-macro.patch28
-rw-r--r--ports/lz4/portfile.cmake29
-rw-r--r--ports/lzfse/CONTROL3
-rw-r--r--ports/lzfse/disable-cli-option.patch51
-rw-r--r--ports/lzfse/portfile.cmake37
-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/CONTROL6
-rw-r--r--ports/mongo-cxx-driver/CONTROL4
-rw-r--r--ports/mpfr/CMakeLists.txt275
-rw-r--r--ports/mpfr/CONTROL4
-rw-r--r--ports/mpfr/portfile.cmake23
-rw-r--r--ports/msgpack/CONTROL2
-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/CONTROL3
-rw-r--r--ports/opencv/portfile.cmake3
-rw-r--r--ports/openexr/CONTROL2
-rw-r--r--ports/openimageio/CONTROL4
-rw-r--r--ports/openjpeg/CONTROL2
-rw-r--r--ports/openssl/CONTROL2
-rw-r--r--ports/openssl/EmbedSymbolsInStaticLibsZ7.patch25
-rw-r--r--ports/openssl/fix-uwp-pathlib.patch13
-rw-r--r--ports/openssl/make-openssl.bat9
-rw-r--r--ports/openssl/portfile-uwp.cmake67
-rw-r--r--ports/openssl/portfile.cmake1
-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/CMakeLists.txt1
-rw-r--r--ports/pango/CONTROL2
-rw-r--r--ports/pango/portfile.cmake5
-rw-r--r--ports/pangolin/CONTROL4
-rw-r--r--ports/pangolin/portfile.cmake44
-rw-r--r--ports/parmetis/CONTROL2
-rw-r--r--ports/pcl/CONTROL2
-rw-r--r--ports/pcre/CONTROL2
-rw-r--r--ports/pcre2/CONTROL2
-rw-r--r--ports/pcre2/portfile.cmake9
-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/CONTROL2
-rw-r--r--ports/protobuf/0001-fix-missing-export.patch13
-rw-r--r--ports/protobuf/001-add-compiler-flag.patch25
-rw-r--r--ports/protobuf/CONTROL4
-rw-r--r--ports/protobuf/portfile.cmake25
-rw-r--r--ports/ptex/CONTROL2
-rw-r--r--ports/pthreads/CMakeLists.txt213
-rw-r--r--ports/pthreads/CONTROL3
-rw-r--r--ports/pthreads/portfile.cmake34
-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/rhash/CMakeLists.txt15
-rw-r--r--ports/rhash/CONTROL3
-rw-r--r--ports/rhash/portfile.cmake25
-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/sery/CONTROL2
-rw-r--r--ports/sfml/CONTROL2
-rw-r--r--ports/shaderc/CMakeLists.txt60
-rw-r--r--ports/shaderc/CONTROL2
-rw-r--r--ports/shaderc/portfile.cmake43
-rw-r--r--ports/signalrclient/CONTROL4
-rw-r--r--ports/smpeg2/CONTROL2
-rw-r--r--ports/snappy/CONTROL2
-rw-r--r--ports/snappy/portfile.cmake16
-rw-r--r--ports/sobjectizer/CONTROL2
-rw-r--r--ports/soci/CONTROL2
-rw-r--r--ports/sophus/CONTROL4
-rw-r--r--ports/sophus/portfile.cmake27
-rw-r--r--ports/spdlog/CONTROL2
-rw-r--r--ports/spdlog/portfile.cmake4
-rw-r--r--ports/speex/CONTROL2
-rw-r--r--ports/speexdsp/CMakeLists.txt31
-rw-r--r--ports/speexdsp/CONTROL4
-rw-r--r--ports/speexdsp/portfile.cmake24
-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/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/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/CONTROL4
-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/unrar/CONTROL3
-rw-r--r--ports/unrar/portfile.cmake38
-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/CONTROL2
-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.cmake185
-rw-r--r--ports/winpcap/wpcap.patch.in414
-rw-r--r--ports/wt/CONTROL2
-rw-r--r--ports/xerces-c/portfile.cmake14
-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/zstd/CONTROL2
-rw-r--r--ports/zstd/portfile.cmake12
-rw-r--r--ports/zziplib/CONTROL2
-rw-r--r--scripts/bootstrap.ps128
-rw-r--r--scripts/buildsystems/msbuild/vcpkg.targets12
-rw-r--r--scripts/cmake/vcpkg_acquire_msys.cmake4
-rw-r--r--scripts/cmake/vcpkg_common_functions.cmake1
-rw-r--r--scripts/cmake/vcpkg_configure_cmake.cmake16
-rw-r--r--scripts/cmake/vcpkg_configure_meson.cmake16
-rw-r--r--scripts/cmake/vcpkg_find_acquire_program.cmake6
-rw-r--r--scripts/cmake/vcpkg_from_bitbucket.cmake190
-rw-r--r--scripts/fetchDependency.ps166
-rw-r--r--scripts/findVisualStudioInstallationInstances.ps12
-rw-r--r--scripts/internalCI.ps11
-rw-r--r--toolsrc/VERSION.txt2
-rw-r--r--toolsrc/include/BinaryParagraph.h6
-rw-r--r--toolsrc/include/PackageSpec.h42
-rw-r--r--toolsrc/include/Paragraphs.h2
-rw-r--r--toolsrc/include/SourceParagraph.h25
-rw-r--r--toolsrc/include/StatusParagraphs.h2
-rw-r--r--toolsrc/include/VcpkgPaths.h9
-rw-r--r--toolsrc/include/coff_file_reader.h2
-rw-r--r--toolsrc/include/metrics.h30
-rw-r--r--toolsrc/include/pch.h2
-rw-r--r--toolsrc/include/triplet.h4
-rw-r--r--toolsrc/include/vcpkg_Build.h11
-rw-r--r--toolsrc/include/vcpkg_Checks.h31
-rw-r--r--toolsrc/include/vcpkg_Commands.h50
-rw-r--r--toolsrc/include/vcpkg_Dependencies.h117
-rw-r--r--toolsrc/include/vcpkg_Files.h2
-rw-r--r--toolsrc/include/vcpkg_GlobalState.h19
-rw-r--r--toolsrc/include/vcpkg_Parse.h4
-rw-r--r--toolsrc/include/vcpkg_Strings.h23
-rw-r--r--toolsrc/include/vcpkg_System.h9
-rw-r--r--toolsrc/include/vcpkg_Util.h74
-rw-r--r--toolsrc/include/vcpkglib.h4
-rw-r--r--toolsrc/src/BinaryParagraph.cpp12
-rw-r--r--toolsrc/src/MachineType.cpp2
-rw-r--r--toolsrc/src/PackageSpec.cpp165
-rw-r--r--toolsrc/src/Paragraphs.cpp19
-rw-r--r--toolsrc/src/PostBuildLint.cpp38
-rw-r--r--toolsrc/src/SourceParagraph.cpp85
-rw-r--r--toolsrc/src/StatusParagraph.cpp4
-rw-r--r--toolsrc/src/StatusParagraphs.cpp26
-rw-r--r--toolsrc/src/VcpkgCmdArguments.cpp23
-rw-r--r--toolsrc/src/VcpkgPaths.cpp165
-rw-r--r--toolsrc/src/coff_file_reader.cpp8
-rw-r--r--toolsrc/src/commands_build.cpp24
-rw-r--r--toolsrc/src/commands_build_external.cpp7
-rw-r--r--toolsrc/src/commands_cache.cpp6
-rw-r--r--toolsrc/src/commands_ci.cpp58
-rw-r--r--toolsrc/src/commands_contact.cpp4
-rw-r--r--toolsrc/src/commands_create.cpp7
-rw-r--r--toolsrc/src/commands_depends.cpp8
-rw-r--r--toolsrc/src/commands_edit.cpp112
-rw-r--r--toolsrc/src/commands_env.cpp9
-rw-r--r--toolsrc/src/commands_export.cpp67
-rw-r--r--toolsrc/src/commands_hash.cpp16
-rw-r--r--toolsrc/src/commands_import.cpp18
-rw-r--r--toolsrc/src/commands_install.cpp466
-rw-r--r--toolsrc/src/commands_integrate.cpp82
-rw-r--r--toolsrc/src/commands_list.cpp18
-rw-r--r--toolsrc/src/commands_owns.cpp4
-rw-r--r--toolsrc/src/commands_portsdiff.cpp11
-rw-r--r--toolsrc/src/commands_remove.cpp122
-rw-r--r--toolsrc/src/commands_search.cpp19
-rw-r--r--toolsrc/src/commands_update.cpp28
-rw-r--r--toolsrc/src/commands_version.cpp35
-rw-r--r--toolsrc/src/metrics.cpp158
-rw-r--r--toolsrc/src/test_install_plan.cpp547
-rw-r--r--toolsrc/src/tests_dependencies.cpp21
-rw-r--r--toolsrc/src/tests_package_spec.cpp119
-rw-r--r--toolsrc/src/tests_paragraph.cpp85
-rw-r--r--toolsrc/src/triplet.cpp6
-rw-r--r--toolsrc/src/vcpkg.cpp68
-rw-r--r--toolsrc/src/vcpkg_Build.cpp148
-rw-r--r--toolsrc/src/vcpkg_Checks.cpp48
-rw-r--r--toolsrc/src/vcpkg_Chrono.cpp18
-rw-r--r--toolsrc/src/vcpkg_Dependencies.cpp455
-rw-r--r--toolsrc/src/vcpkg_Files.cpp17
-rw-r--r--toolsrc/src/vcpkg_GlobalState.cpp13
-rw-r--r--toolsrc/src/vcpkg_Input.cpp6
-rw-r--r--toolsrc/src/vcpkg_Parse.cpp39
-rw-r--r--toolsrc/src/vcpkg_Strings.cpp7
-rw-r--r--toolsrc/src/vcpkg_System.cpp182
-rw-r--r--toolsrc/src/vcpkg_metrics_uploader.cpp5
-rw-r--r--toolsrc/src/vcpkglib.cpp21
-rw-r--r--toolsrc/vcpkglib/vcpkglib.vcxproj2
-rw-r--r--toolsrc/vcpkglib/vcpkglib.vcxproj.filters6
-rw-r--r--toolsrc/vcpkgtest/vcpkgtest.vcxproj1
-rw-r--r--toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters3
561 files changed, 10106 insertions, 2829 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 52357ed6f..7cba05a1e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,170 @@
+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:
+ - ccfits 2.5
+ - highfive 1.3
+ - lzfse 1.0
+ - pangolin 0.5
+ - rhash 1.3.5
+ - speexdsp 1.2rc3-1
+ - unrar 5.5.8
+ * Update ports:
+ - assimp 4.0.0 -> 4.0.0-1
+ - catch 1.9.7 -> 1.10.0
+ - ctemplate 2017-06-23-44b7c5b918a08ad561c63e9d28beecb40c10ebca -> 2017-06-23-44b7c5-2
+ - curl 7.55.0 -> 7.55.1
+ - ecm 5.32.0 -> 5.37.0
+ - expat 2.1.1-1 -> 2.2.4-1
+ - ffmpeg 3.2.4-3 -> 3.3.3
+ - gl2ps OpenGL to PostScript Printing Library -> 1.4.0
+ - jsoncpp 1.7.7 -> 1.8.1
+ - libp7-baical 4.1 -> 4.4-1
+ - libpng 1.6.31 -> 1.6.32
+ - libraw 0.18.2-2 -> 0.18.2-3
+ - libsigcpp 2.10 -> 2.99
+ - snappy 1.1.6-be6dc3d -> 1.1.7
+ * `vcpkg edit`: Add new option `--builtrees`; opens editor in buildtrees directory for examining build issues
+ * Improve Windows SDK support (contract version detection)
+ * Improve handling for non-ascii environments
+ * Fixes and improvements in the `vcpkg` tool itself
+
+-- vcpkg team <vcpkg@microsoft.com> SUN, 27 Aug 2017 22:00:00 -0800
+
+
+vcpkg (0.0.84)
+--------------
+ * Add ports:
+ - cfitsio 3.410
+ - chmlib 0.40
+ - gl2ps OpenGL to PostScript Printing Library
+ - libharu 2017-08-15-d84867ebf9f-1
+ - mpfr 3.1.5
+ - sophus 1.0.0
+ * Update ports:
+ - allegro5 5.2.1.0 -> 5.2.2.0
+ - blaze 3.1 -> 3.2
+ - boost 1.64-5 -> 1.65
+ - curl 7.51.0-3 -> 7.55.0
+ - flann 1.9.1-4 -> 1.9.1-5
+ - gdal 1.11.3-4 -> 1.11.3-5
+ - glew 2.0.0-2 -> 2.1.0
+ - lcms 2.8-1 -> 2.8-2
+ - libogg 2017-07-27-cab46b19847 -> 1.3.2-cab46b1-2
+ - libuv 1.13.1 -> 1.14.0
+ - lz4 1.7.5 -> 1.8.0
+ - pcre2 10.23 -> 10.30
+ - spdlog 0.13.0 -> 0.14.0
+ - zstd 1.3.0 -> 1.3.1
+ * Bump required version & auto-downloaded version of `git` to 2.14.1 (due to a security vulnerability)
+ * Show more information when there are issues acquiring `vcpkg` tool dependencies (`git`, `cmake`, `nuget`)
+ * Remove download prompts for cmake/git. The prompts were causing a lot of issues for users and especially CI builds
+ * `vcpkg edit`: Fix detection of 64-bit VSCode
+ * Fixes and improvements in the `vcpkg` tool itself
+
+-- vcpkg team <vcpkg@microsoft.com> TUE, 22 Aug 2017 13:00:00 -0800
+
+
vcpkg (0.0.83)
--------------
* Add ports:
diff --git a/docs/about/faq.md b/docs/about/faq.md
index 85a0c14db..88f88bad0 100644
--- a/docs/about/faq.md
+++ b/docs/about/faq.md
@@ -46,6 +46,32 @@ Yes. In the current preview, there is not yet a standardized global way to chang
By saving the changes to the portfile (and checking them in), you'll get the same results even if you're rebuilding from scratch in the future and forgot what exact settings you used.
+## Can I get Vcpkg integration for custom configurations?
+
+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.
+
+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:
+```
+<PropertyGroup>
+ <VcpkgConfiguration Condition="'$(Configuration)' == 'MyRelease'">Release</VcpkgConfiguration>
+</PropertyGroup>
+```
+Of course, this will only produce viable binaries if your custom configuration is compatible with the target configuration (e.g. they should both link with the same runtime library).
+
+## I can't use user-wide integration. Can I use a per-project integration?
+
+Yes. A NuGet package suitable for per-project use can be generated via either the `vcpkg integrate project` command (lightweight linking) or the `vcpkg export --nuget` command (shrinkwrapped).
+
+A lower level mechanism to achieve the same as the `vcpkg integrate project` NuGet package is via the `<vcpkg_root>\scripts\buildsystems\msbuild\vcpkg.targets` file. All you need is to import it in your .vcxproj file, replacing `<vcpkg_root>` with the path where you installed vcpkg:
+
+```
+<Import Project="<vcpkg_root>\scripts\buildsystems\msbuild\vcpkg.targets" />
+```
+
## How is CMake used internally by Vcpkg?
Vcpkg uses CMake internally as a build scripting language. This is because CMake is already an extremely common build system for cross-platform open source libraries and is becoming very popular for C++ projects in general. It is easy to acquire on Windows, does not require system-wide installation, and legible for unfamiliar users.
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 a6293fa24..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.3.zip"
- FILENAME "ACE-6.4.3.zip"
- SHA512 1d700733ec617559f338e908b2343c66c0c856bfac7bd2230f18290970fe3bc25a394839a9d66fa74f6edd239a70f9d6cf5746585ed796fbe9f8aeca90eab84e
+ 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 2d3003935..8f078909a 100644
--- a/ports/allegro5/CONTROL
+++ b/ports/allegro5/CONTROL
@@ -1,4 +1,4 @@
Source: allegro5
-Version: 5.2.1.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 \ 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/allegro5/fix-pdb-install.patch b/ports/allegro5/fix-pdb-install.patch
index ef964b9f3..714c69cf5 100644
--- a/ports/allegro5/fix-pdb-install.patch
+++ b/ports/allegro5/fix-pdb-install.patch
@@ -1,3 +1,24 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 72348fe..c6fbecb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1010,14 +1010,9 @@ else()
+ set(PKG_CONFIG_FILES allegro ${ADDON_PKG_CONFIG_FILES})
+ endif(WANT_MONOLITH)
+
+-# Install pkg-config files on Unix, and when cross-compiling on Unix.
++# Install pkg-config files
+
+-if(UNIX AND NOT WANT_FRAMEWORKS AND NOT IPHONE)
+- set(INSTALL_PKG_CONFIG_FILES true)
+-endif()
+-if(CMAKE_CROSSCOMPILING AND CMAKE_HOST_UNIX)
+- set(INSTALL_PKG_CONFIG_FILES true)
+-endif()
++set(INSTALL_PKG_CONFIG_FILES true)
+
+ if(INSTALL_PKG_CONFIG_FILES)
+ append_lib_type_suffix(lib_type)
diff --git a/cmake/Common.cmake b/cmake/Common.cmake
index 782196f..de29535 100644
--- a/cmake/Common.cmake
diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake
index d2801d5d4..d4f74a569 100644
--- a/ports/allegro5/portfile.cmake
+++ b/ports/allegro5/portfile.cmake
@@ -11,19 +11,19 @@
#
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/allegro5-7d8892a9278c57f2d8bb1e555f9ec59cf9ed4f73)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/allegro5-e8b209bc20a60224859eb8a0cae082bd20d32ed1)
vcpkg_from_github(
OUT_SOURCE_PATH ${SOURCE_PATH}
REPO liballeg/allegro5
- REF 7d8892a9278c57f2d8bb1e555f9ec59cf9ed4f73
- SHA512 b1531fa2f22023ecd4e053d03d1c54bf0b94aa3af004a3a06245c4d8278fea64e9d354467873ebd665301903d954795fed88e2467c88441f39c273e7e0d87d6e
+ REF e8b209bc20a60224859eb8a0cae082bd20d32ed1
+ SHA512 50b30d4b539bd4a2488d2b33e9fbfc6fdfd340039d9086993a5719bab3cb020ee6fe7f6d3578755a52c8aab9816d25cd74710ce93b0b374a2f97620b6138419d
HEAD_REF master
)
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
- set(ALLEGRO_USE_STATIC -DSHARED=ON)
+ set(ALLEGRO_USE_STATIC ON)
else()
- set(ALLEGRO_USE_STATIC -DSHARED=OFF)
+ set(ALLEGRO_USE_STATIC OFF)
endif()
vcpkg_apply_patches(
@@ -39,7 +39,7 @@ vcpkg_configure_cmake(
-DWANT_DOCS=OFF
-DALLEGRO_SDL=OFF
-DWANT_DEMO=OFF
- ${ALLEGRO_USE_STATIC}
+ -DSHARED=${ALLEGRO_USE_STATIC}
-DWANT_EXAMPLES=OFF
-DWANT_CURL_EXAMPLE=OFF
-DWANT_TESTS=OFF
@@ -63,7 +63,7 @@ vcpkg_configure_cmake(
-DWANT_OPENAL=ON
-DWANT_OPENGL=ON
-DWANT_OPENSL=OFF # Not yet available on vcpkg
- -DWANT_OPUS=OFF # opus is available on vcpkg, but opusfile isn't
+ -DWANT_OPUS=ON
-DWANT_PHYSFS=ON
-DWANT_POPUP_EXAMPLES=OFF
-DWANT_PRIMITIVES=ON
diff --git a/ports/anax/CONTROL b/ports/anax/CONTROL
index ce3da2f57..7eb71786b 100644
--- a/ports/anax/CONTROL
+++ b/ports/anax/CONTROL
@@ -1,3 +1,3 @@
Source: anax
-Version: 2.1.0-1
+Version: 2.1.0-2
Description: An open source C++ entity system. <https://github.com/miguelmartin75/anax>
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/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 2e2b88692..f13d2ee20 100644
--- a/ports/assimp/CONTROL
+++ b/ports/assimp/CONTROL
@@ -1,4 +1,4 @@
Source: assimp
-Version: 4.0.0
+Version: 4.0.0-2
Description: The Open Asset import library
Build-Depends: zlib
diff --git a/ports/assimp/const-compare-worditerator.patch b/ports/assimp/const-compare-worditerator.patch
new file mode 100644
index 000000000..9b892ed82
--- /dev/null
+++ b/ports/assimp/const-compare-worditerator.patch
@@ -0,0 +1,15 @@
+diff --git a/code/X3DImporter.cpp b/code/X3DImporter.cpp
+index 1117735..669f46f 100644
+--- a/code/X3DImporter.cpp
++++ b/code/X3DImporter.cpp
+@@ -95,8 +95,8 @@ struct WordIterator: public std::iterator<std::input_iterator_tag, const char*>
+ end_ = other.end_;
+ return *this;
+ }
+- bool operator==(WordIterator &other) const { return start_ == other.start_; }
+- bool operator!=(WordIterator &other) const { return start_ != other.start_; }
++ bool operator==(const WordIterator &other) const { return start_ == other.start_; }
++ bool operator!=(const WordIterator &other) const { return start_ != other.start_; }
+ WordIterator &operator++() {
+ start_ += strcspn(start_, whitespace);
+ start_ += strspn(start_, whitespace);
diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake
index 0da9cc2a8..14564e65a 100644
--- a/ports/assimp/portfile.cmake
+++ b/ports/assimp/portfile.cmake
@@ -8,6 +8,11 @@ vcpkg_from_github(
HEAD_REF master
)
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/const-compare-worditerator.patch
+)
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS -DASSIMP_BUILD_TESTS=False
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..251e7bdf9 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.0.61-1
Description: AWS SDK for C++
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/CONTROL b/ports/blaze/CONTROL
index dd1b065ef..ca7923ffc 100644
--- a/ports/blaze/CONTROL
+++ b/ports/blaze/CONTROL
@@ -1,3 +1,3 @@
Source: blaze
-Version: 3.1
+Version: 3.2
Description: Blaze is an open-source, high-performance C++ math library for dense and sparse arithmetic.
diff --git a/ports/blaze/portfile.cmake b/ports/blaze/portfile.cmake
index cf268451c..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.1)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://bitbucket.org/blaze-lib/blaze/downloads/blaze-3.1.tar.gz"
- FILENAME "blaze-3.1.tar.gz"
- SHA512 fe03a7615d4105d6a869cfd69b3db3165b838eff53cdff7adbbd5ae9d753aa009bbab50925463c6704f9530a4c4ad5605e373b3cbaee96ca982a474a665ed756
+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/boost/CONTROL b/ports/boost/CONTROL
index 964665b96..4fc7efdec 100644
--- a/ports/boost/CONTROL
+++ b/ports/boost/CONTROL
@@ -1,4 +1,4 @@
Source: boost
-Version: 1.64-5
+Version: 1.65.1
Description: Peer-reviewed portable C++ source libraries
Build-Depends: zlib, bzip2
diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake
index 8db544237..f153aaf69 100644
--- a/ports/boost/portfile.cmake
+++ b/ports/boost/portfile.cmake
@@ -1,14 +1,16 @@
include(vcpkg_common_functions)
-set(VERSION 1_64)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/boost_${VERSION}_0)
+set(VERSION 1_65)
+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/1.64.0/boost_${VERSION}_0.tar.bz2"
- FILENAME "boost_${VERSION}_0.tar.bz2"
- SHA512 68477f148f61be617552ef48559c5c2cb90d42264cabd6d5e87215d0d5024b48fca27c4afcfc1f77e490c6220d44fb1abdf0a53703867a2e4132c2857f69fedf
+ 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})
@@ -61,7 +63,7 @@ file(MAKE_DIRECTORY
if(NOT EXISTS ${SOURCE_PATH}/b2.exe)
message(STATUS "Bootstrapping")
vcpkg_execute_required_process(
- COMMAND "${SOURCE_PATH}/bootstrap.bat"
+ COMMAND "${SOURCE_PATH}/bootstrap.bat" msvc
WORKING_DIRECTORY ${SOURCE_PATH}
LOGNAME bootstrap
)
@@ -108,7 +110,6 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore")
# --without-date_time
# --without-exception
# --without-serialization
- # --without-fiber
# --without-context
# --without-graph_parallel
# --without-signals
@@ -129,6 +130,8 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore")
--without-program_options # libs\program_options\src\parsers.cpp(194): error C2065: 'environ': undeclared identifier
--without-test
+ --without-fiber
+ --without-stacktrace
--without-filesystem # libs\filesystem\src\operations.cpp(178): error C2039: 'GetEnvironmentVariableW': is not a member of '`global namespace''
--without-thread
--without-iostreams
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..3bd8a6c37
--- /dev/null
+++ b/ports/butteraugli/CMakeLists.txt
@@ -0,0 +1,43 @@
+cmake_minimum_required(VERSION 3.8.0)
+project(butteraugli)
+
+if(MSVC)
+ add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX)
+endif()
+
+
+
+find_package(JPEG REQUIRED)
+find_package(PNG REQUIRED)
+
+include_directories("." ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIRS})
+
+if(BUILD_SHARED_LIBS)
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+endif()
+
+
+add_library(butteraugli_lib butteraugli/butteraugli.cc)
+
+add_executable(butteraugli butteraugli/butteraugli_main.cc)
+
+target_link_libraries(butteraugli butteraugli_lib ${JPEG_LIBRARIES} ${PNG_LIBRARIES})
+
+
+install(
+ TARGETS butteraugli_lib
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT DISABLE_INSTALL_TOOLS)
+ 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/catch/CONTROL b/ports/catch/CONTROL
index 3e1e1ebaf..af18c49de 100644
--- a/ports/catch/CONTROL
+++ b/ports/catch/CONTROL
@@ -1,3 +1,3 @@
Source: catch
-Version: 1.9.7
+Version: 1.10.0
Description: C++ Automated Test Cases in Headers
diff --git a/ports/catch/portfile.cmake b/ports/catch/portfile.cmake
index 10360187b..d78260cb8 100644
--- a/ports/catch/portfile.cmake
+++ b/ports/catch/portfile.cmake
@@ -1,10 +1,11 @@
include(vcpkg_common_functions)
-set(CATCH_VERSION v1.9.7)
+set(CATCH_VERSION v1.10.0)
+
vcpkg_download_distfile(HEADER
URLS "https://github.com/philsquared/Catch/releases/download/${CATCH_VERSION}/catch.hpp"
FILENAME "catch-${CATCH_VERSION}.hpp"
- SHA512 c61fc39d9388a45d9c601c05dafeeba0e7887476b3b28e30a6ab47cb00e062be626c12d9712caa49e0cbfa3fd7517874137a24e8c293d6dd23353ea87f9fbf5c
+ SHA512 275ab5b5d778cc8a91b5f3e8f241a37b680c81d1b8945ff64ad16a9708c98e6535b389746bf8cacbed07f874629f456b56bafbf1879c5a6f84fa87675c1361b6
)
vcpkg_download_distfile(LICENSE
diff --git a/ports/ccd/0001_fix_symbols_export.patch b/ports/ccd/0001_fix_symbols_export.patch
new file mode 100644
index 000000000..f9c47d79b
--- /dev/null
+++ b/ports/ccd/0001_fix_symbols_export.patch
@@ -0,0 +1,39 @@
+From 05b5718a364ac525c8766387bd74faf852f98589 Mon Sep 17 00:00:00 2001
+From: Mikhail Paulyshka <me@mixaill.tk>
+Date: Sun, 27 Aug 2017 03:39:53 +0300
+Subject: [PATCH] win32: export additional symbols, fixes FCL build on MSVC
+
+---
+ src/ccd/vec3.h | 2 +-
+ src/support.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/ccd/vec3.h b/src/ccd/vec3.h
+index b0c1b33..014531c 100644
+--- a/src/ccd/vec3.h
++++ b/src/ccd/vec3.h
+@@ -93,7 +93,7 @@ typedef struct _ccd_vec3_t ccd_vec3_t;
+ /**
+ * Holds origin (0,0,0) - this variable is meant to be read-only!
+ */
+-extern ccd_vec3_t *ccd_vec3_origin;
++extern _ccd_export ccd_vec3_t *ccd_vec3_origin;
+
+ /**
+ * Array of points uniformly distributed on unit sphere.
+diff --git a/src/support.h b/src/support.h
+index 3372f5e..2e75df7 100644
+--- a/src/support.h
++++ b/src/support.h
+@@ -37,7 +37,7 @@ _ccd_inline void ccdSupportCopy(ccd_support_t *, const ccd_support_t *s);
+ * Computes support point of obj1 and obj2 in direction dir.
+ * Support point is returned via supp.
+ */
+-void __ccdSupport(const void *obj1, const void *obj2,
++_ccd_export void __ccdSupport(const void *obj1, const void *obj2,
+ const ccd_vec3_t *dir, const ccd_t *ccd,
+ ccd_support_t *supp);
+
+--
+2.12.2.windows.2
+
diff --git a/ports/libccd/CONTROL b/ports/ccd/CONTROL
index 3a3a0252d..9246cec90 100644
--- a/ports/libccd/CONTROL
+++ b/ports/ccd/CONTROL
@@ -1,3 +1,3 @@
-Source: libccd
-Version: 2.0.0
+Source: ccd
+Version: 2.0.0-2
Description: Library for collision detection between two convex shapes
diff --git a/ports/ccd/portfile.cmake b/ports/ccd/portfile.cmake
new file mode 100644
index 000000000..0ce278220
--- /dev/null
+++ b/ports/ccd/portfile.cmake
@@ -0,0 +1,30 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO danfis/libccd
+ REF 64f02f741ac94fccd0fb660a5bffcbe6d01d9939
+ SHA512 901b09d57e119e4661b3556bbefe5a4d58cb843bff5c76ee3952fe379ff183c878a04e86e6192006c11012309c6e93d42319e9d606abdf7ad723f6d8afeea47f
+ HEAD_REF master
+)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/0001_fix_symbols_export.patch)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/ccd")
+
+file(INSTALL ${SOURCE_PATH}/BSD-LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ccd RENAME copyright)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc)
diff --git a/ports/ccfits/CONTROL b/ports/ccfits/CONTROL
new file mode 100644
index 000000000..16b36bc8a
--- /dev/null
+++ b/ports/ccfits/CONTROL
@@ -0,0 +1,4 @@
+Source: ccfits
+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
diff --git a/ports/ccfits/dll_exports.patch b/ports/ccfits/dll_exports.patch
new file mode 100644
index 000000000..4ec4a8284
--- /dev/null
+++ b/ports/ccfits/dll_exports.patch
@@ -0,0 +1,495 @@
+Index: FITS.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+--- FITS.h (date 1502267716000)
++++ FITS.h (revision )
+@@ -21,6 +21,8 @@
+ #include "HDUCreator.h"
+ // FitsError
+ #include "FitsError.h"
++//DLL Exporting
++#include "ccfits_export.h"
+
+ namespace CCfits {
+ class FITSBase;
+@@ -665,9 +667,8 @@
+
+
+
+- class FITS
+- {
+-
++ class CCFITS_EXPORT FITS
++ {
+ public:
+
+
+Index: HDU.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+--- HDU.h (date 1502267716000)
++++ HDU.h (revision )
+@@ -568,7 +568,7 @@
+
+
+
+- class HDU
++ class CCFITS_EXPORT HDU
+ {
+
+ public:
+Index: Table.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+--- Table.h (date 1502267716000)
++++ Table.h (revision )
+@@ -268,7 +268,7 @@
+
+
+
+- class Table : public ExtHDU //## Inherits: <unnamed>%3804A126EB10
++ class CCFITS_EXPORT Table : public ExtHDU //## Inherits: <unnamed>%3804A126EB10
+ {
+
+ public:
+Index: Column.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+--- Column.h (date 1502267716000)
++++ Column.h (revision )
+@@ -838,14 +838,14 @@
+
+
+
+- class Column
++ class CCFITS_EXPORT Column
+ {
+
+ public:
+
+
+
+- class RangeError : public FitsException //## Inherits: <unnamed>%3946526D031A
++ class CCFITS_EXPORT RangeError : public FitsException //## Inherits: <unnamed>%3946526D031A
+ {
+ public:
+ RangeError (const String& msg, bool silent = true);
+@@ -857,7 +857,7 @@
+
+
+
+- class InvalidDataType : public FitsException //## Inherits: <unnamed>%3947CF30033E
++ class CCFITS_EXPORT InvalidDataType : public FitsException //## Inherits: <unnamed>%3947CF30033E
+ {
+ public:
+ InvalidDataType (const String& str = string(), bool silent = true);
+@@ -869,7 +869,7 @@
+
+
+
+- class InvalidRowParameter : public FitsException //## Inherits: <unnamed>%39B5310F01A0
++ class CCFITS_EXPORT InvalidRowParameter : public FitsException //## Inherits: <unnamed>%39B5310F01A0
+ {
+ public:
+ InvalidRowParameter (const String& diag, bool silent = true);
+@@ -881,7 +881,7 @@
+
+
+
+- class WrongColumnType : public FitsException //## Inherits: <unnamed>%39B545780082
++ class CCFITS_EXPORT WrongColumnType : public FitsException //## Inherits: <unnamed>%39B545780082
+ {
+ public:
+ WrongColumnType (const String& diag, bool silent = true);
+@@ -893,7 +893,7 @@
+
+
+
+- class UnspecifiedLengths : public FitsException //## Inherits: <unnamed>%3A018C9D007D
++ class CCFITS_EXPORT UnspecifiedLengths : public FitsException //## Inherits: <unnamed>%3A018C9D007D
+ {
+ public:
+ UnspecifiedLengths (const String& diag, bool silent = true);
+@@ -905,7 +905,7 @@
+
+
+
+- class InvalidRowNumber : public FitsException //## Inherits: <unnamed>%3B0A850F0307
++ class CCFITS_EXPORT InvalidRowNumber : public FitsException //## Inherits: <unnamed>%3B0A850F0307
+ {
+ public:
+ InvalidRowNumber (const String& diag, bool silent = true);
+@@ -917,7 +917,7 @@
+
+
+
+- class InsufficientElements : public FitsException //## Inherits: <unnamed>%3B0BE611010A
++ class CCFITS_EXPORT InsufficientElements : public FitsException //## Inherits: <unnamed>%3B0BE611010A
+ {
+ public:
+ InsufficientElements (const String& msg, bool silent = true);
+@@ -929,7 +929,7 @@
+
+
+
+- class NoNullValue : public FitsException //## Inherits: <unnamed>%3B0D589A0092
++ class CCFITS_EXPORT NoNullValue : public FitsException //## Inherits: <unnamed>%3B0D589A0092
+ {
+ public:
+ NoNullValue (const String& diag, bool silent = true);
+@@ -941,7 +941,7 @@
+
+
+
+- class InvalidNumberOfRows : public FitsException //## Inherits: <unnamed>%3B20EB8B0205
++ class CCFITS_EXPORT InvalidNumberOfRows : public FitsException //## Inherits: <unnamed>%3B20EB8B0205
+ {
+ public:
+ InvalidNumberOfRows (int number, bool silent = true);
+Index: AsciiTable.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+--- AsciiTable.h (date 1502267716000)
++++ AsciiTable.h (revision )
+@@ -133,7 +133,7 @@
+
+
+
+- class AsciiTable : public Table //## Inherits: <unnamed>%3804A75CE420
++ class CCFITS_EXPORT AsciiTable : public Table //## Inherits: <unnamed>%3804A75CE420
+ {
+
+ public:
+Index: CCfits.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+--- CCfits.h (date 1502267716000)
++++ CCfits.h (revision )
+@@ -23,7 +23,7 @@
+ #include <sys/types.h>
+ #include "longnam.h"
+ #include "float.h"
+-
++#include "ccfits_export.h"
+
+ namespace CCfits {
+ /*! \namespace CCfits
+@@ -32,8 +32,8 @@
+ static const int BITPIX = -32;
+ static const int NAXIS = 2;
+ static const int MAXDIM = 99;
+- extern const unsigned long USBASE;
+- extern const unsigned long ULBASE;
++ extern const CCFITS_EXPORT unsigned long USBASE;
++ extern const CCFITS_EXPORT unsigned long ULBASE;
+
+ extern char BSCALE[7];
+ extern char BZERO[6];
+Index: FITSBase.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+--- FITSBase.h (date 1502267716000)
++++ FITSBase.h (revision )
+@@ -30,7 +30,7 @@
+
+
+
+- class FITSBase
++ class CCFITS_EXPORT FITSBase
+ {
+
+ public:
+Index: Keyword.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+--- Keyword.h (date 1502267716000)
++++ Keyword.h (revision )
+@@ -195,7 +195,7 @@
+
+
+
+- class Keyword
++ class CCFITS_EXPORT Keyword
+ {
+
+ public:
+Index: ExtHDU.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+--- ExtHDU.h (date 1502267716000)
++++ ExtHDU.h (revision )
+@@ -435,7 +435,7 @@
+
+
+
+- class ExtHDU : public HDU //## Inherits: <unnamed>%38048213E7A8
++ class CCFITS_EXPORT ExtHDU : public HDU //## Inherits: <unnamed>%38048213E7A8
+ {
+
+ public:
+Index: PHDU.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+--- PHDU.h (date 1502267716000)
++++ PHDU.h (revision )
+@@ -264,7 +264,7 @@
+
+
+
+- class PHDU : public HDU //## Inherits: <unnamed>%394E6F9800C3
++ class CCFITS_EXPORT PHDU : public HDU //## Inherits: <unnamed>%394E6F9800C3
+ {
+
+ public:
+Index: BinTable.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+--- BinTable.h (date 1502267716000)
++++ BinTable.h (revision )
+@@ -127,7 +127,7 @@
+
+
+
+- class BinTable : public Table //## Inherits: <unnamed>%3804A7E75F10
++ class CCFITS_EXPORT BinTable : public Table //## Inherits: <unnamed>%3804A7E75F10
+ {
+
+ public:
+Index: Image.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+--- Image.h (date 1502267716000)
++++ Image.h (revision )
+@@ -32,7 +32,7 @@
+
+
+ template <typename T>
+- class Image
++ class Image
+ {
+
+ public:
+Index: ColumnCreator.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+--- ColumnCreator.h (date 1502267716000)
++++ ColumnCreator.h (revision )
+@@ -28,7 +28,7 @@
+
+
+
+- class ColumnCreator
++ class CCFITS_EXPORT ColumnCreator
+ {
+
+ public:
+Index: FitsError.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+--- FitsError.h (date 1502267716000)
++++ FitsError.h (revision )
+@@ -14,6 +14,7 @@
+ //#include <iostream>
+ //#include <stl.h>
+ #include <string>
++#include "ccfits_export.h"
+ using std::string;
+
+
+@@ -90,7 +91,7 @@
+
+
+
+- class FitsException
++ class CCFITS_EXPORT FitsException
+ {
+ public:
+ FitsException (const string& msg, bool& silent);
+@@ -109,7 +110,7 @@
+
+
+
+- class FitsError : public FitsException //## Inherits: <unnamed>%399170BD017D
++ class CCFITS_EXPORT FitsError : public FitsException //## Inherits: <unnamed>%399170BD017D
+ {
+ public:
+ FitsError (int errornum, bool silent = true);
+@@ -123,7 +124,7 @@
+
+
+
+- class FitsFatal
++ class CCFITS_EXPORT FitsFatal
+ {
+ public:
+ FitsFatal (const string& diag);
+Index: HDUCreator.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+--- HDUCreator.h (date 1502267716000)
++++ HDUCreator.h (revision )
+@@ -35,7 +35,7 @@
+
+
+
+- class HDUCreator
++ class CCFITS_EXPORT HDUCreator
+ {
+
+ public:
+Index: ccfits_export.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+--- ccfits_export.h (revision )
++++ ccfits_export.h (revision )
+@@ -0,0 +1,42 @@
++
++#ifndef CCFITS_EXPORT_H
++#define CCFITS_EXPORT_H
++
++#ifdef CCFITS_STATIC_DEFINE
++# define CCFITS_EXPORT
++# define CCFITS_NO_EXPORT
++#else
++# ifndef CCFITS_EXPORT
++# ifdef CCfits_EXPORTS
++ /* We are building this library */
++# define CCFITS_EXPORT __declspec(dllexport)
++# else
++ /* We are using this library */
++# define CCFITS_EXPORT __declspec(dllimport)
++# endif
++# endif
++
++# ifndef CCFITS_NO_EXPORT
++# define CCFITS_NO_EXPORT
++# endif
++#endif
++
++#ifndef CCFITS_DEPRECATED
++# define CCFITS_DEPRECATED __declspec(deprecated)
++#endif
++
++#ifndef CCFITS_DEPRECATED_EXPORT
++# define CCFITS_DEPRECATED_EXPORT CCFITS_EXPORT CCFITS_DEPRECATED
++#endif
++
++#ifndef CCFITS_DEPRECATED_NO_EXPORT
++# define CCFITS_DEPRECATED_NO_EXPORT CCFITS_NO_EXPORT CCFITS_DEPRECATED
++#endif
++
++#if 0 /* DEFINE_NO_DEPRECATED */
++# ifndef CCFITS_NO_DEPRECATED
++# define CCFITS_NO_DEPRECATED
++# endif
++#endif
++
++#endif
+Index: FITSUtil.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+--- FITSUtil.h (date 1502267716000)
++++ FITSUtil.h (revision )
+@@ -22,6 +22,7 @@
+ #include <string>
+ // FitsError
+ #include "FitsError.h"
++#include "ccfits_export.h"
+ #include <typeinfo>
+
+
+@@ -287,21 +288,21 @@
+ template <typename T>
+ void swap(std::vector<T>& left, std::vector<T>& right);
+
+- string lowerCase(const string& inputString);
++ string CCFITS_EXPORT lowerCase(const string& inputString);
+
+- string upperCase(const string& inputString);
++ string CCFITS_EXPORT upperCase(const string& inputString);
+
+ // Check if a file name includes an image compression specifier,
+ // and return its location if it exists.
+- string::size_type checkForCompressString(const string& fileName);
++ string::size_type CCFITS_EXPORT checkForCompressString(const string& fileName);
+
+- struct InvalidConversion : public FitsException
++ struct CCFITS_EXPORT InvalidConversion : public FitsException
+ {
+ InvalidConversion(const string& diag, bool silent=false);
+
+ };
+
+- struct MatchStem : public std::binary_function<string,string,bool>
++ struct CCFITS_EXPORT MatchStem : public std::binary_function<string,string,bool>
+ {
+ bool operator()(const string& left, const string& right) const;
+ };
+@@ -323,7 +324,7 @@
+
+ char** CharArray(const std::vector<string>& inArray);
+
+- string FITSType2String( int typeInt );
++ string CCFITS_EXPORT FITSType2String( int typeInt );
+
+
+ template <typename S, typename T>
+@@ -633,7 +634,7 @@
+
+
+
+- class UnrecognizedType : public FitsException //## Inherits: <unnamed>%3CE143AB00C6
++ class CCFITS_EXPORT UnrecognizedType : public FitsException //## Inherits: <unnamed>%3CE143AB00C6
+ {
+ public:
+ UnrecognizedType (string diag, bool silent = true);
+Index: KeywordCreator.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+--- KeywordCreator.h (date 1502267716000)
++++ KeywordCreator.h (revision )
+@@ -24,7 +24,7 @@
+
+
+
+- class KeywordCreator
++ class CCFITS_EXPORT KeywordCreator
+ {
+
+ public:
diff --git a/ports/ccfits/portfile.cmake b/ports/ccfits/portfile.cmake
new file mode 100644
index 000000000..6bd9bd170
--- /dev/null
+++ b/ports/ccfits/portfile.cmake
@@ -0,0 +1,56 @@
+# 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)
+#removes current source to prevent static builds from using patched source code
+file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/CCfits)
+file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/CCfits-2.5.tar.gz.extracted)
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CCfits)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://heasarc.gsfc.nasa.gov/fitsio/ccfits/CCfits-2.5.tar.gz"
+ FILENAME "CCfits-2.5.tar.gz"
+ SHA512 63ab4d153063960510cf60651d5c832824cf85f937f84adc5390c7c2fb46eb8e9f5d8cda2554d79d24c7a4f1b6cf0b7a6e20958fb69920b65d7c362c0a5f26b5
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ vcpkg_apply_patches(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CCfits
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/dll_exports.patch"
+ )
+endif()
+
+
+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()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/CCfits.dll ${CURRENT_PACKAGES_DIR}/bin/CCfits.dll)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/CCfits.dll ${CURRENT_PACKAGES_DIR}/debug/bin/CCfits.dll)
+endif()
+
+# Remove duplicate include files
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ccfits 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
new file mode 100644
index 000000000..b25eb8026
--- /dev/null
+++ b/ports/cfitsio/CONTROL
@@ -0,0 +1,3 @@
+Source: cfitsio
+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/cfitsio/portfile.cmake b/ports/cfitsio/portfile.cmake
new file mode 100644
index 000000000..2490beb80
--- /dev/null
+++ b/ports/cfitsio/portfile.cmake
@@ -0,0 +1,29 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cfitsio)
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio3410.tar.gz"
+ FILENAME "cfitsio3410.tar.gz"
+ SHA512 b2ac31ab17e19eeeb4f1601f42f348402c0a4ab03725dbf74fe75eaabbee2f44f64f0c0ee7f0b2688bd93a9cc0dccf29f07e73b9148fff97fc78bebdbb5f6f0f
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+# Remove duplicate include files
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ # move DLLs to bin directories for dynamic builds
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/bin/cfitsio.dll)
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/debug/bin/cfitsio.dll)
+endif()
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cfitsio RENAME copyright)
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
new file mode 100644
index 000000000..226a3be92
--- /dev/null
+++ b/ports/chmlib/CONTROL
@@ -0,0 +1,3 @@
+Source: chmlib
+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
new file mode 100644
index 000000000..0cc2606fe
--- /dev/null
+++ b/ports/chmlib/chm.vcxproj
@@ -0,0 +1,211 @@
+<?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="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>15.0</VCProjectVersion>
+ <ProjectGuid>{3bafee52-fe1a-494e-ab46-89bf77ed63a7}</ProjectGuid>
+ <RootNamespace>chmLibExe1</RootNamespace>
+ <ProjectName>chm</ProjectName>
+ <WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|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|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)'=='Debug|x64'">
+ <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)'=='Debug|Win32'">
+ <!--Overriden at build time.-->
+ <OutDir>..\..\..\x86-windows-static-dbg\</OutDir>
+ <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\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <!--Overriden at build time.-->
+ <OutDir>..\..\..\x64-windows-static-dbg\</OutDir>
+ <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\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <SDLCheck>true</SDLCheck>
+ <MultiProcessorCompilation>false</MultiProcessorCompilation>
+ <PreprocessorDefinitions>WIN32;CHM_MT;CHM_DEBUG;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
+ <DisableSpecificWarnings>4018;4057;4127;4189;4244;4267;4295;4324;4458;4477;4701;4706;4800;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <CompileAs>CompileAsC</CompileAs>
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
+ <MinimalRebuild>false</MinimalRebuild>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>
+ </AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <ShowProgress>LinkVerbose</ShowProgress>
+ <IgnoreSpecificDefaultLibraries>libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib</IgnoreSpecificDefaultLibraries>
+ </Link>
+ <Lib>
+ <TreatLibWarningAsErrors>true</TreatLibWarningAsErrors>
+ <TargetMachine>MachineX86</TargetMachine>
+ <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'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <SDLCheck>true</SDLCheck>
+ <MultiProcessorCompilation>false</MultiProcessorCompilation>
+ <PreprocessorDefinitions>WIN32;CHM_MT;CHM_DEBUG;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
+ <DisableSpecificWarnings>4018;4057;4127;4189;4244;4267;4295;4324;4458;4477;4701;4706;4800;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <CompileAs>CompileAsC</CompileAs>
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
+ <MinimalRebuild>false</MinimalRebuild>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>
+ </AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <ShowProgress>LinkVerbose</ShowProgress>
+ <IgnoreSpecificDefaultLibraries>libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib</IgnoreSpecificDefaultLibraries>
+ </Link>
+ <Lib>
+ <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'">
+ <ClCompile>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <MultiProcessorCompilation>false</MultiProcessorCompilation>
+ <PreprocessorDefinitions>CHM_MT;WIN32;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
+ <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>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>
+ </AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <ShowProgress>LinkVerbose</ShowProgress>
+ </Link>
+ <Lib>
+ <TargetMachine>MachineX86</TargetMachine>
+ <SubSystem>Windows</SubSystem>
+ <Verbose>true</Verbose>
+ <IgnoreSpecificDefaultLibraries>libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib</IgnoreSpecificDefaultLibraries>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <MultiProcessorCompilation>false</MultiProcessorCompilation>
+ <PreprocessorDefinitions>CHM_MT;WIN32;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
+ <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>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>
+ </AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ <ShowProgress>LinkVerbose</ShowProgress>
+ </Link>
+ <Lib>
+ <SubSystem>Windows</SubSystem>
+ <Verbose>true</Verbose>
+ <IgnoreSpecificDefaultLibraries>libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib</IgnoreSpecificDefaultLibraries>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="chm_lib.c" />
+ <ClCompile Include="lzx.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="chm_lib.h" />
+ <ClInclude Include="lzx.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
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
new file mode 100644
index 000000000..60381bb1a
--- /dev/null
+++ b/ports/chmlib/portfile.cmake
@@ -0,0 +1,66 @@
+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)
+set(CHMLIB_FILENAME ${CHMLIB_VERSION}.zip)
+set(CHMLIB_URL http://www.jedrea.com/chmlib/${CHMLIB_FILENAME})
+set(CHMLIB_SRC ${CURRENT_BUILDTREES_DIR}/src/${CHMLIB_VERSION}/src)
+include(vcpkg_common_functions)
+
+vcpkg_download_distfile(
+ ARCHIVE
+ URLS ${CHMLIB_URL}
+ FILENAME ${CHMLIB_FILENAME}
+ SHA512 ad3b0d49fcf99e724c0c38b9c842bae9508d0e4ad47122b0f489c113160f5344223d311abb79f25cbb0b662bb00e2925d338d60dd20a0c309bda2822cda4cd24
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+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
+ 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}/${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/CONTROL b/ports/cpprestsdk/CONTROL
index f284f2b53..f22ee9854 100644
--- a/ports/cpprestsdk/CONTROL
+++ b/ports/cpprestsdk/CONTROL
@@ -1,5 +1,5 @@
Source: cpprestsdk
-Version: 2.9.0-2
-Build-Depends: zlib [windows], openssl [windows], boost [windows], websocketpp [windows]
+Version: 2.9.0-3
+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..7482760d3 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)
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/CMakeLists.txt b/ports/ctemplate/CMakeLists.txt
index c7cc211f4..63e6fc6b3 100644
--- a/ports/ctemplate/CMakeLists.txt
+++ b/ports/ctemplate/CMakeLists.txt
@@ -92,5 +92,5 @@ install(
)
if(NOT DISABLE_INSTALL_HEADERS)
- install(DIRECTORY "${COMMON_INCLUDES}/" DESTINATION include FILES_MATCHING PATTERN "*.h")
+ install(DIRECTORY "${COMMON_INCLUDES}/ctemplate" DESTINATION include FILES_MATCHING PATTERN "*.h")
endif()
diff --git a/ports/ctemplate/CONTROL b/ports/ctemplate/CONTROL
index eb78d4c0f..1125efc18 100644
--- a/ports/ctemplate/CONTROL
+++ b/ports/ctemplate/CONTROL
@@ -1,3 +1,3 @@
Source: ctemplate
-Version: 2017-06-23-44b7c5b918a08ad561c63e9d28beecb40c10ebca
+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 320d82afb..1193e114f 100644
--- a/ports/curl/CONTROL
+++ b/ports/curl/CONTROL
@@ -1,4 +1,4 @@
Source: curl
-Version: 7.55.0
+Version: 7.55.1-1
Build-Depends: zlib, openssl, libssh2
Description: A library for transferring data with URLs
diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake
index c00f813b2..c770d3f25 100644
--- a/ports/curl/portfile.cmake
+++ b/ports/curl/portfile.cmake
@@ -2,8 +2,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO curl/curl
- REF curl-7_55_0
- SHA512 7b49e7761f5864589c6cd6eb14d8e6908797c986d8bc46a3d8dc32b7bcd12d5af464259cf3f9975a4792c8e2a504f04dd071d266d2340082a31f7ee508e17d08
+ REF curl-7_55_1
+ SHA512 b5c6dd6cca8d07c08d1760feff9822f1264359adde068afd1584fc3fdcfa50c68e0e1b5ecaa277298ad0923b61019943c181ee1f0870c312399038c4c4e0e327
HEAD_REF master
)
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/ecm/CONTROL b/ports/ecm/CONTROL
index e696bd7b9..12a9fd8a9 100644
--- a/ports/ecm/CONTROL
+++ b/ports/ecm/CONTROL
@@ -1,3 +1,3 @@
Source: ecm
-Version: 5.32.0
+Version: 5.37.0-1
Description: Extra CMake Modules (ECM), extra modules and scripts for CMake
diff --git a/ports/ecm/portfile.cmake b/ports/ecm/portfile.cmake
index 9fa648a1c..0e016418c 100644
--- a/ports/ecm/portfile.cmake
+++ b/ports/ecm/portfile.cmake
@@ -1,10 +1,10 @@
#cmake-only scripts
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/extra-cmake-modules-5.32.0)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/extra-cmake-modules-5.37.0)
vcpkg_download_distfile(ARCHIVE
- URLS "https://download.kde.org/stable/frameworks/5.32/extra-cmake-modules-5.32.0.zip"
- FILENAME "extra-cmake-modules-5.32.0.zip"
- SHA512 f966820e88fdbcdea7f20ff6b76ab8a6d2f7eaf78950bc690243b7201b9f646d92c83a998c19feab3bfe2ed528ec96ad1fa36e6ae320419d226cddd28cd433e5
+ URLS "https://download.kde.org/stable/frameworks/5.37/extra-cmake-modules-5.37.0.zip"
+ FILENAME "extra-cmake-modules-5.37.0.zip"
+ SHA512 a9cd585fb5c63452fc45c955df62b6e7aca3d19e47ca2db33216f83951645f393271f37a04630e5c7f01899063562548c2b0dfe79d7afa8661bb0a8bca5ccfbf
)
vcpkg_extract_source_archive(${ARCHIVE})
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/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/expat/CONTROL b/ports/expat/CONTROL
index 5987991c8..450b8e61d 100644
--- a/ports/expat/CONTROL
+++ b/ports/expat/CONTROL
@@ -1,3 +1,3 @@
Source: expat
-Version: 2.1.1-1
+Version: 2.2.4-2
Description: XML parser library written in C
diff --git a/ports/expat/portfile.cmake b/ports/expat/portfile.cmake
index a347ac2cb..da6ddc429 100644
--- a/ports/expat/portfile.cmake
+++ b/ports/expat/portfile.cmake
@@ -1,11 +1,10 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/expat-2.1.1)
-vcpkg_download_distfile(ARCHIVE_FILE
- URLS "http://downloads.sourceforge.net/project/expat/expat/2.1.1/expat-2.1.1.tar.bz2"
- FILENAME "expat-2.1.1.tar.bz2"
- SHA512 088e2ef3434f2affd4fc79fe46f0e9826b9b4c3931ddc780cd18892f1cd1e11365169c6807f45916a56bb6abcc627dcd17a23f970be0bf464f048f5be2713628
-)
-vcpkg_extract_source_archive(${ARCHIVE_FILE})
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO libexpat/libexpat
+ REF R_2_2_4
+ SHA512 64f9deb2f75be70450a60a408ab867d1df800022e29000a31a801d85421178b400ebbf817864d1592ce998ada1012fa25fd896e5f25c6b314851ae62d94b45dc
+ HEAD_REF master)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(EXPAT_LINKAGE ON)
@@ -14,7 +13,8 @@ else()
endif()
vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
+ SOURCE_PATH ${SOURCE_PATH}/expat
+ PREFER_NINJA
OPTIONS
-DBUILD_examples=OFF
-DBUILD_tests=OFF
@@ -25,10 +25,13 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
-file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/expat RENAME copyright)
+file(INSTALL ${SOURCE_PATH}/expat/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/expat RENAME copyright)
vcpkg_copy_pdbs()
+# CMake's FindExpat currently doesn't look for expatd.lib
+file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/expatd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/expat.lib)
+
file(READ ${CURRENT_PACKAGES_DIR}/include/expat_external.h EXPAT_EXTERNAL_H)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
string(REPLACE "!defined(XML_STATIC)" "/* vcpkg static build !defined(XML_STATIC) */ 0" EXPAT_EXTERNAL_H "${EXPAT_EXTERNAL_H}")
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/0001_fix_package_detection.patch b/ports/fcl/0001_fix_package_detection.patch
new file mode 100644
index 000000000..9ae1b60e5
--- /dev/null
+++ b/ports/fcl/0001_fix_package_detection.patch
@@ -0,0 +1,81 @@
+From c43e3771cc2ec314191e5d4a5b485aab258c1b18 Mon Sep 17 00:00:00 2001
+From: Mikhail Paulyshka <me@mixaill.tk>
+Date: Sun, 27 Aug 2017 04:12:36 +0300
+Subject: [PATCH] use cmake-exports for package detection
+
+---
+ CMakeLists.txt | 48 +++---------------------------------------------
+ 1 file changed, 3 insertions(+), 45 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5a4a559..8978b61 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -65,32 +65,11 @@ if(FCL_COVERALLS)
+ endif()
+
+ # Find Octomap (optional)
+-find_package(PkgConfig QUIET)
+-
+ option(FCL_WITH_OCTOMAP "octomap library support" ON)
+ set(FCL_HAVE_OCTOMAP 0)
+ if(FCL_WITH_OCTOMAP)
+- if(PKG_CONFIG_FOUND)
+- pkg_check_modules(OCTOMAP QUIET octomap)
+- endif()
+- if(NOT OCTOMAP_FOUND)
+- # if pkgconfig is not installed, then fall back on more fragile detection
+- # of octomap
+- find_path(OCTOMAP_INCLUDE_DIRS octomap.h
+- PATH_SUFFIXES octomap)
+- find_library(OCTOMAP_LIBRARY_DIRS
+- ${CMAKE_SHARED_LIBRARY_PREFIX}octomap${CMAKE_SHARED_LIBRARY_SUFFIX})
+- if(OCTOMAP_INCLUDE_DIRS AND OCTOMAP_LIBRARY_DIRS)
+- set(OCTOMAP_LIBRARIES "octomap;octomath")
+- endif()
+- endif()
+- if (OCTOMAP_FOUND OR (OCTOMAP_INCLUDE_DIRS AND OCTOMAP_LIBRARY_DIRS))
+- string(REPLACE "." ";" VERSION_LIST ${OCTOMAP_VERSION})
+- list(GET VERSION_LIST 0 OCTOMAP_MAJOR_VERSION)
+- list(GET VERSION_LIST 1 OCTOMAP_MINOR_VERSION)
+- list(GET VERSION_LIST 2 OCTOMAP_PATCH_VERSION)
+- include_directories(${OCTOMAP_INCLUDE_DIRS})
+- link_directories(${OCTOMAP_LIBRARY_DIRS})
++ find_package(OCTOMAP REQUIRED)
++ if (OCTOMAP_FOUND)
+ set(FCL_HAVE_OCTOMAP 1)
+ message(STATUS "FCL uses Octomap")
+ else()
+@@ -116,28 +95,7 @@ endif()
+ include_directories(BEFORE "include")
+ include_directories("${CMAKE_CURRENT_BINARY_DIR}/include")
+
+-if(PKG_CONFIG_FOUND)
+- pkg_check_modules(CCD ccd)
+- # check to see if the pkg is installed under the libccd name
+- if(NOT CCD_FOUND)
+- pkg_check_modules(CCD libccd)
+- endif()
+-endif()
+-
+-if(NOT CCD_FOUND)
+- # if pkgconfig is not installed, then fall back on more fragile detection
+- # of ccd
+- find_path(CCD_INCLUDE_DIRS ccd/ccd.h)
+- find_library(CCD_LIBRARY
+- ${CMAKE_SHARED_LIBRARY_PREFIX}ccd${CMAKE_SHARED_LIBRARY_SUFFIX})
+- if(CCD_INCLUDE_DIRS AND CCD_LIBRARY)
+- set(CCD_LIBRARIES "${CCD_LIBRARY}")
+- else()
+- message(FATAL_ERROR "Libccd is required by FCL")
+- endif()
+-endif()
+-include_directories(${CCD_INCLUDE_DIRS})
+-link_directories(${CCD_LIBRARY_DIRS})
++find_package(CCD REQUIRED)
+
+ add_subdirectory(include/fcl)
+ add_subdirectory(src)
+--
+2.12.2.windows.2
+
diff --git a/ports/fcl/CONTROL b/ports/fcl/CONTROL
new file mode 100644
index 000000000..daadff075
--- /dev/null
+++ b/ports/fcl/CONTROL
@@ -0,0 +1,4 @@
+Source: fcl
+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
diff --git a/ports/fcl/portfile.cmake b/ports/fcl/portfile.cmake
new file mode 100644
index 000000000..e0cee7e02
--- /dev/null
+++ b/ports/fcl/portfile.cmake
@@ -0,0 +1,42 @@
+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 flexible-collision-library/fcl
+ REF 54e9619bc2b084ee50e986ac3308160d663481c4
+ SHA512 11bfa3fdeeda6766769a34d2248ca32b6b13ecb32b412c068aa1c7aa3495d55b3f7a82a93621965904f9813c3fd0f128a84f796ae5731d2ff15b85935a0e1261
+ HEAD_REF fcl-0.5
+)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/0001_fix_package_detection.patch)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ set(FCL_STATIC_LIBRARY ON)
+else()
+ set(FCL_STATIC_LIBRARY OFF)
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DFCL_STATIC_LIBRARY=${FCL_STATIC_LIBRARY}
+ -DFCL_BUILD_TESTS=OFF
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake/")
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fcl RENAME copyright)
diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL
index 443003d92..658c4b1f2 100644
--- a/ports/ffmpeg/CONTROL
+++ b/ports/ffmpeg/CONTROL
@@ -1,4 +1,4 @@
Source: ffmpeg
-Version: 3.2.4-3
+Version: 3.3.3
Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.
- FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations. \ No newline at end of file
+ FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.
diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake
index de17e2851..8bd7abab0 100644
--- a/ports/ffmpeg/portfile.cmake
+++ b/ports/ffmpeg/portfile.cmake
@@ -4,11 +4,11 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
endif()
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ffmpeg-3.2.4)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ffmpeg-3.3.3)
vcpkg_download_distfile(ARCHIVE
- URLS "http://ffmpeg.org/releases/ffmpeg-3.2.4.tar.bz2"
- FILENAME "ffmpeg-3.2.4.tar.bz2"
- SHA512 ba5004d0f2659faa139c7dbf2f0fc6bab1d4e017d919f4ac271a5d2e8e4a3478909176e3a4d1ad33ddf2f62ab28dd9e00ce9be1399efb7cb3276dde79134cdaa
+ URLS "http://ffmpeg.org/releases/ffmpeg-3.3.3.tar.bz2"
+ FILENAME "ffmpeg-3.3.3.tar.bz2"
+ SHA512 1cc63bf73356f4e618c0d3572a216bdf5689f10deff56b4262f6d740b0bee5a4b3eac234f45fca3d4d2da77903a507b4fba725b76d2d2070f31b6dae9e7a2dab
)
vcpkg_extract_source_archive(${ARCHIVE})
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 ad9a5e871..b70472913 100644
--- a/ports/flann/CONTROL
+++ b/ports/flann/CONTROL
@@ -1,3 +1,3 @@
Source: flann
-Version: 1.9.1-4
+Version: 1.9.1-6
Description: Fast Library for Approximate Nearest Neighbors
diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake
index ba7eca546..f1ead2ad9 100644
--- a/ports/flann/portfile.cmake
+++ b/ports/flann/portfile.cmake
@@ -25,6 +25,7 @@ vcpkg_configure_cmake(
-DBUILD_PYTHON_BINDINGS=OFF
-DBUILD_MATLAB_BINDINGS=OFF
-DCMAKE_DEBUG_POSTFIX=-gd
+ -DHDF5_NO_FIND_PACKAGE_CONFIG_FILE=ON
)
vcpkg_install_cmake()
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/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/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/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/CONTROL b/ports/gdal/CONTROL
index 2182a3d35..868a5e929 100644
--- a/ports/gdal/CONTROL
+++ b/ports/gdal/CONTROL
@@ -1,4 +1,4 @@
Source: gdal
-Version: 1.11.3-4
+Version: 1.11.3-5
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
diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake
index 96fa8fa6a..214ec2024 100644
--- a/ports/gdal/portfile.cmake
+++ b/ports/gdal/portfile.cmake
@@ -55,8 +55,8 @@ file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/expat.lib" EXPAT_LIBRARY
# Setup curl libraries + include path
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" CURL_INCLUDE_DIR)
-file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libcurl_imp.lib" CURL_LIBRARY_REL)
-file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl_imp.lib" CURL_LIBRARY_DBG)
+file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libcurl.lib" CURL_LIBRARY_REL)
+file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl.lib" CURL_LIBRARY_DBG)
# Setup sqlite3 libraries + include path
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" SQLITE_INCLUDE_DIR)
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/CMakeLists.txt b/ports/gdk-pixbuf/CMakeLists.txt
index 06a6b7032..0d56b7fad 100644
--- a/ports/gdk-pixbuf/CMakeLists.txt
+++ b/ports/gdk-pixbuf/CMakeLists.txt
@@ -34,6 +34,7 @@ add_library(gdk-pixbuf
gdk-pixbuf/gdk-pixbuf-util.c
gdk-pixbuf/gdk-pixdata.c
gdk-pixbuf/gdk-pixbuf-enum-types.c
+ gdk-pixbuf/gdk-pixbuf-marshal.c
gdk-pixbuf/io-ani.c
gdk-pixbuf/io-ani-animation.c
gdk-pixbuf/io-icns.c
diff --git a/ports/gdk-pixbuf/CONTROL b/ports/gdk-pixbuf/CONTROL
index 23edca2e0..2a0fbfaf3 100644
--- a/ports/gdk-pixbuf/CONTROL
+++ b/ports/gdk-pixbuf/CONTROL
@@ -1,4 +1,4 @@
Source: gdk-pixbuf
-Version: 2.36.6
+Version: 2.36.9-1
Description: Image loading library.
Build-Depends: gettext, zlib, libpng, glib
diff --git a/ports/gdk-pixbuf/portfile.cmake b/ports/gdk-pixbuf/portfile.cmake
index 36b64a553..72469abff 100644
--- a/ports/gdk-pixbuf/portfile.cmake
+++ b/ports/gdk-pixbuf/portfile.cmake
@@ -4,13 +4,13 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
endif()
set(GDK_PIXBUF_VERSION 2.36)
-set(GDK_PIXBUF_PATCH 6)
+set(GDK_PIXBUF_PATCH 9)
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gdk-pixbuf-${GDK_PIXBUF_VERSION}.${GDK_PIXBUF_PATCH})
vcpkg_download_distfile(ARCHIVE
URLS "http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/${GDK_PIXBUF_VERSION}/gdk-pixbuf-${GDK_PIXBUF_VERSION}.${GDK_PIXBUF_PATCH}.tar.xz"
FILENAME "gdk-pixbuf-${GDK_PIXBUF_VERSION}.${GDK_PIXBUF_PATCH}.tar.xz"
- SHA512 b963f01161b58463c83499079545aa946fd824ec5e7167e0898698ac46e0cc3fb3dcb0cac5afabd6b7d957391b9c9bba55f340294076433155fc91052d5403ec)
+ SHA512 ab8f2cda4490012936b094a1321e64b85e1fa1f8d070fae135a514f87f695201b845f4192e4a02954e2767d44314c0a95d727118853528182952d15890130261)
vcpkg_extract_source_archive(${ARCHIVE})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
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..3e9d4d7c6 100644
--- a/ports/geos/CONTROL
+++ b/ports/geos/CONTROL
@@ -1,3 +1,3 @@
Source: geos
-Version: 3.5.0
+Version: 3.5.0-1
Description: Geometry Engine Open Source
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
new file mode 100644
index 000000000..052835a34
--- /dev/null
+++ b/ports/gl2ps/CONTROL
@@ -0,0 +1,4 @@
+Source: gl2ps
+Version: 1.4.0-1
+Description: OpenGL to PostScript Printing Library
+Build-Depends: freeglut, zlib, libpng
diff --git a/ports/gl2ps/portfile.cmake b/ports/gl2ps/portfile.cmake
new file mode 100644
index 000000000..7f08f8de4
--- /dev/null
+++ b/ports/gl2ps/portfile.cmake
@@ -0,0 +1,24 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gl2ps-gl2ps_1_4_0-e7b16f8f80382e45b681651e6381de09250243a6)
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://gitlab.onelab.info/gl2ps/gl2ps/repository/archive.tar.gz?ref=gl2ps_1_4_0"
+ FILENAME "gl2ps_1_4_0.tar.gz"
+ SHA512 6ec18debdf94e8de22ca7084fe6fef72fb858fc6295a35fa3c98c3c45211f9f72e23a14224a85877f64031077da4978b8d5d81f24dfe18de8c2ec32a680eba60
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/separate-static-dynamic-build.patch"
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/COPYING.GL2PS DESTINATION ${CURRENT_PACKAGES_DIR}/share/gl2ps RENAME copyright)
+file(INSTALL ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/gl2ps RENAME copyright.LGPL)
diff --git a/ports/gl2ps/separate-static-dynamic-build.patch b/ports/gl2ps/separate-static-dynamic-build.patch
new file mode 100644
index 000000000..fe2267e6a
--- /dev/null
+++ b/ports/gl2ps/separate-static-dynamic-build.patch
@@ -0,0 +1,214 @@
+diff --git "a/CMakeLists.txt" "b/CMakeLists.txt"
+index 40da57e..39acf6b 100644
+--- "a/CMakeLists.txt"
++++ "b/CMakeLists.txt"
+@@ -1,34 +1,34 @@
+ # GL2PS, an OpenGL to PostScript Printing Library
+ # Copyright (C) 1999-2017 C. Geuzaine
+-#
++#
+ # This program is free software; you can redistribute it and/or
+ # modify it under the terms of either:
+-#
++#
+ # a) the GNU Library General Public License as published by the Free
+ # Software Foundation, either version 2 of the License, or (at your
+ # option) any later version; or
+-#
++#
+ # b) the GL2PS License as published by Christophe Geuzaine, either
+ # version 2 of the License, or (at your option) any later version.
+-#
++#
+ # This program is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either
+ # the GNU Library General Public License or the GL2PS License for
+ # more details.
+-#
++#
+ # You should have received a copy of the GNU Library General Public
+ # License along with this library in the file named "COPYING.LGPL";
+ # if not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+ # Cambridge, MA 02139, USA.
+-#
++#
+ # You should have received a copy of the GL2PS License with this
+ # library in the file named "COPYING.GL2PS"; if not, I will be glad
+ # to provide one.
+-#
++#
+ # For the latest info about gl2ps and a full list of contributors,
+ # see http://www.geuz.org/gl2ps/.
+-#
++#
+ # Please report all bugs and problems to <gl2ps@geuz.org>.
+
+ cmake_minimum_required(VERSION 2.4 FATAL_ERROR)
+@@ -55,8 +55,8 @@ set(GL2PS_EXTRA_VERSION "" CACHE STRING "GL2PS extra version string")
+ set(GL2PS_VERSION "${GL2PS_MAJOR_VERSION}.${GL2PS_MINOR_VERSION}")
+ set(GL2PS_VERSION "${GL2PS_VERSION}.${GL2PS_PATCH_VERSION}${GL2PS_EXTRA_VERSION}")
+
+-execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE DATE
+- OUTPUT_STRIP_TRAILING_WHITESPACE)
++execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE DATE
++OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(NOT DATE)
+ set(DATE "unknown")
+ endif(NOT DATE)
+@@ -113,84 +113,93 @@ endif(MATH_LIBRARY)
+
+ include_directories(${EXTERNAL_INCLUDES})
+
+-if(OPENGL_FOUND)
+- add_library(lib STATIC gl2ps.c gl2ps.h)
+- set_target_properties(lib PROPERTIES OUTPUT_NAME gl2ps)
+-
+- add_library(shared SHARED gl2ps.c gl2ps.h)
+- target_link_libraries(shared ${EXTERNAL_LIBRARIES})
+- set_target_properties(shared PROPERTIES OUTPUT_NAME gl2ps)
+- set_target_properties(shared PROPERTIES
+- VERSION ${GL2PS_MAJOR_VERSION}.${GL2PS_MINOR_VERSION}.${GL2PS_PATCH_VERSION}
+- SOVERSION ${GL2PS_MAJOR_VERSION})
+- if(MSVC)
+- set_target_properties(shared PROPERTIES COMPILE_FLAGS "-DGL2PSDLL -DGL2PSDLL_EXPORTS")
+- endif(MSVC)
+-
+- install(TARGETS lib shared DESTINATION lib${LIB_SUFFIX})
+-endif(OPENGL_FOUND)
++
++add_library(gl2ps gl2ps.c gl2ps.h)
++target_link_libraries(gl2ps ${EXTERNAL_LIBRARIES})
++set_target_properties(gl2ps PROPERTIES
++ VERSION ${GL2PS_MAJOR_VERSION}.${GL2PS_MINOR_VERSION}.${GL2PS_PATCH_VERSION}
++SOVERSION ${GL2PS_MAJOR_VERSION})
++
++if(BUILD_SHARED_LIBS)
++ target_compile_definitions(gl2ps PRIVATE -DGL2PSDLL -DGL2PSDLL_EXPORTS)
++endif()
++
++install(
++ TARGETS gl2ps
++ RUNTIME DESTINATION bin
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib
++)
++
+
+ if(WIN32)
+- set(GL2PS_DOC .)
++ set(GL2PS_DOC share/gl2ps/docs)
+ else(WIN32)
+ set(GL2PS_DOC share/doc/gl2ps)
+ endif(WIN32)
+
++if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES gl2ps.h DESTINATION include)
+ install(FILES ${CMAKE_SOURCE_DIR}/README.txt DESTINATION ${GL2PS_DOC})
+ install(FILES ${CMAKE_SOURCE_DIR}/COPYING.LGPL DESTINATION ${GL2PS_DOC})
+ install(FILES ${CMAKE_SOURCE_DIR}/COPYING.GL2PS DESTINATION ${GL2PS_DOC})
+ install(FILES ${CMAKE_SOURCE_DIR}/gl2psTest.c DESTINATION ${GL2PS_DOC})
+ install(FILES ${CMAKE_SOURCE_DIR}/gl2psTestSimple.c DESTINATION ${GL2PS_DOC})
++endif()
++
++if(BUILD_TESTS)
++
++ if(GLUT_FOUND)
++ add_executable(gl2psTest gl2psTest.c)
++ target_link_libraries(gl2psTest gl2ps ${EXTERNAL_LIBRARIES})
++ add_executable(gl2psTestSimple gl2psTestSimple.c)
++ target_link_libraries(gl2psTestSimple gl2ps ${EXTERNAL_LIBRARIES})
++ endif(GLUT_FOUND)
++
++ find_package(LATEX)
++ if(PDFLATEX_COMPILER)
++ add_custom_command(OUTPUT gl2ps.pdf DEPENDS gl2ps.tex
++ COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex
++ COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex
++ COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex
++ COMMAND ${CMAKE_COMMAND} -E copy gl2ps.pdf ${CMAKE_SOURCE_DIR})
++ add_custom_target(pdf ALL DEPENDS gl2ps.pdf)
++ install(FILES gl2ps.pdf DESTINATION ${GL2PS_DOC})
++ find_program(TTH tth)
++ if(TTH)
++ add_custom_command(OUTPUT gl2ps.html DEPENDS gl2ps.tex gl2ps.pdf
++ COMMAND ${CMAKE_COMMAND} -E copy_if_different
++ ${CMAKE_SOURCE_DIR}/gl2ps.tex ${CMAKE_BINARY_DIR}/gl2ps.tex
++ COMMAND ${TTH} ARGS -w1 gl2ps.tex)
++ add_custom_target(html DEPENDS gl2ps.html)
++ endif(TTH)
++ endif(PDFLATEX_COMPILER)
++
++endif()
+
+-if(GLUT_FOUND)
+- add_executable(gl2psTest WIN32 gl2psTest.c)
+- target_link_libraries(gl2psTest lib ${EXTERNAL_LIBRARIES})
+- add_executable(gl2psTestSimple WIN32 gl2psTestSimple.c)
+- target_link_libraries(gl2psTestSimple lib ${EXTERNAL_LIBRARIES})
+-endif(GLUT_FOUND)
+-
+-find_package(LATEX)
+-if(PDFLATEX_COMPILER)
+- add_custom_command(OUTPUT gl2ps.pdf DEPENDS gl2ps.tex
+- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex
+- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex
+- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex
+- COMMAND ${CMAKE_COMMAND} -E copy gl2ps.pdf ${CMAKE_SOURCE_DIR})
+- add_custom_target(pdf ALL DEPENDS gl2ps.pdf)
+- install(FILES gl2ps.pdf DESTINATION ${GL2PS_DOC})
+- find_program(TTH tth)
+- if(TTH)
+- add_custom_command(OUTPUT gl2ps.html DEPENDS gl2ps.tex gl2ps.pdf
+- COMMAND ${CMAKE_COMMAND} -E copy_if_different
+- ${CMAKE_SOURCE_DIR}/gl2ps.tex ${CMAKE_BINARY_DIR}/gl2ps.tex
+- COMMAND ${TTH} ARGS -w1 gl2ps.tex)
+- add_custom_target(html DEPENDS gl2ps.html)
+- endif(TTH)
+-endif(PDFLATEX_COMPILER)
+
+ set(CPACK_PACKAGE_VENDOR "Christophe Geuzaine")
+ set(CPACK_PACKAGE_VERSION_MAJOR ${GL2PS_MAJOR_VERSION})
+ set(CPACK_PACKAGE_VERSION_MINOR ${GL2PS_MINOR_VERSION})
+ set(CPACK_PACKAGE_VERSION_PATCH ${GL2PS_PATCH_VERSION})
+ set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/README.txt)
+-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
+- "An OpenGL to PostScript (and PDF, and SVG...) printing library")
+-set(CPACK_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-${GL2PS_OS})
+-set(CPACK_PACKAGE_INSTALL_DIRECTORY "gl2ps")
+-set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING.LGPL)
+-set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README.txt)
+-set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_SOURCE_DIR}/README.txt)
+-set(CPACK_PACKAGE_EXECUTABLE "gl2ps;gl2ps")
+-set(CPACK_STRIP_FILES TRUE)
+-set(CPACK_SOURCE_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-source)
+-set(CPACK_SOURCE_GENERATOR TGZ)
+-set(CPACK_SOURCE_IGNORE_FILES "TODO.txt" "${CMAKE_BINARY_DIR}" "/CVS/"
+- "/.svn" "~$" "DS_Store$" "/tmp/" "/bin/" "/lib/")
+-if(WIN32)
+- set(CPACK_GENERATOR ZIP)
+-else(WIN32)
+- set(CPACK_GENERATOR TGZ)
+-endif(WIN32)
+-
+-include(CPack)
++set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
++ "An OpenGL to PostScript (and PDF, and SVG...) printing library")
++ set(CPACK_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-${GL2PS_OS})
++ set(CPACK_PACKAGE_INSTALL_DIRECTORY "gl2ps")
++ set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING.LGPL)
++ set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README.txt)
++ set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_SOURCE_DIR}/README.txt)
++ set(CPACK_PACKAGE_EXECUTABLE "gl2ps;gl2ps")
++ set(CPACK_STRIP_FILES TRUE)
++ set(CPACK_SOURCE_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-source)
++ set(CPACK_SOURCE_GENERATOR TGZ)
++ set(CPACK_SOURCE_IGNORE_FILES "TODO.txt" "${CMAKE_BINARY_DIR}" "/CVS/"
++ "/.svn" "~$" "DS_Store$" "/tmp/" "/bin/" "/lib/")
++ if(WIN32)
++ set(CPACK_GENERATOR ZIP)
++ else(WIN32)
++ set(CPACK_GENERATOR TGZ)
++ endif(WIN32)
++
++ # include(CPack)
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 6c56fefe9..ecf948c5d 100644
--- a/ports/glew/CONTROL
+++ b/ports/glew/CONTROL
@@ -1,3 +1,3 @@
Source: glew
-Version: 2.0.0-2
-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 8ca69eb5f..30f55451a 100644
--- a/ports/glew/portfile.cmake
+++ b/ports/glew/portfile.cmake
@@ -1,13 +1,13 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/20170423/glew-2.0.0)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glew/glew-2.1.0)
vcpkg_download_distfile(ARCHIVE_FILE
- URLS "https://sourceforge.net/projects/glew/files/glew/snapshots/glew-20170423.tgz"
- FILENAME "glew-20170423.tgz"
- SHA512 2d4651196e01b4db7b210fc60505bf50ac9e37b49c8eee9c9bbfeadb4cb6f87f4c907e60e708a7371ff4b7596bee51ed35a76fba76f9a13a1f32f123121f1350
+ URLS "https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.tgz"
+ FILENAME "glew-2.1.0.tgz"
+ SHA512 9a9b4d81482ccaac4b476c34ed537585ae754a82ebb51c3efa16d953c25cc3931be46ed2e49e79c730cd8afc6a1b78c97d52cd714044a339c3bc29734cd4d2ab
)
-vcpkg_extract_source_archive(${ARCHIVE_FILE} ${CURRENT_BUILDTREES_DIR}/src/20170423)
+vcpkg_extract_source_archive(${ARCHIVE_FILE} ${CURRENT_BUILDTREES_DIR}/src/glew)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/build/cmake
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 9ae5ce296..a4e467bbc 100644
--- a/ports/glib/CONTROL
+++ b/ports/glib/CONTROL
@@ -1,4 +1,4 @@
Source: glib
-Version: 2.52.2
+Version: 2.52.3-1
Description: Portable, general-purpose utility library.
Build-Depends: zlib, pcre, libffi, gettext, libiconv
diff --git a/ports/glib/portfile.cmake b/ports/glib/portfile.cmake
index e23f5dcb9..9482b4386 100644
--- a/ports/glib/portfile.cmake
+++ b/ports/glib/portfile.cmake
@@ -10,12 +10,12 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
endif()
include(vcpkg_common_functions)
-set(GLIB_VERSION 2.52.2)
+set(GLIB_VERSION 2.52.3)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glib-${GLIB_VERSION})
vcpkg_download_distfile(ARCHIVE
URLS "https://ftp.gnome.org/pub/gnome/sources/glib/2.52/glib-${GLIB_VERSION}.tar.xz"
FILENAME "glib-${GLIB_VERSION}.tar.xz"
- SHA512 3ea49b75b6f80d9974ebd3c40518d5aaffffd9d9d008c1ae3302690fa34899b91ae59c87f8235077129bbd8b01ef19211efb89bc7fdb08d0254b07735b1ba92d)
+ SHA512 a068f2519cfb82de8d4b7f004e7c1f15e841cad4046430a83b02b359d011e0c4077cdff447a1687ed7c68f1a11b4cf66b9ed9fc23ab5f0c7c6be84eb0ddc3017)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
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/gtk/CONTROL b/ports/gtk/CONTROL
index 6a5a0e8b7..e5931156d 100644
--- a/ports/gtk/CONTROL
+++ b/ports/gtk/CONTROL
@@ -1,4 +1,4 @@
Source: gtk
-Version: 3.22.15
+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/gtk/portfile.cmake b/ports/gtk/portfile.cmake
index 29af53e58..b915ce5f3 100644
--- a/ports/gtk/portfile.cmake
+++ b/ports/gtk/portfile.cmake
@@ -1,11 +1,11 @@
include(vcpkg_common_functions)
-set(GTK_VERSION 3.22.15)
+set(GTK_VERSION 3.22.19)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gtk+-${GTK_VERSION})
vcpkg_download_distfile(ARCHIVE
URLS "https://ftp.gnome.org/pub/gnome/sources/gtk+/3.22/gtk+-${GTK_VERSION}.tar.xz"
FILENAME "gtk+-${GTK_VERSION}.tar.xz"
- SHA512 c99c4a52bc447a21be20546bdc7808081abde076af9603424c1de20af031ac3f9bd121709d4c18705db8ba2f66ace0aae9b32741347788a8d81afa358d67e758)
+ SHA512 c83198794433ee6eb29f8740d59bd7056cd36808b4bff1a99563ab1a1742e6635dab4f2a8be33317f74d3b336f0d1adc28dd91410da056b50a08c215f184dce2)
vcpkg_extract_source_archive(${ARCHIVE})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
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 5ed9e68b8..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]
+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/highfive/CONTROL b/ports/highfive/CONTROL
new file mode 100644
index 000000000..17aa55c8f
--- /dev/null
+++ b/ports/highfive/CONTROL
@@ -0,0 +1,4 @@
+Source: highfive
+Version: 1.3
+Description: HighFive is a modern C++/C++11 friendly interface for libhdf5
+Build-Depends: hdf5, boost \ No newline at end of file
diff --git a/ports/highfive/portfile.cmake b/ports/highfive/portfile.cmake
new file mode 100644
index 000000000..9fea72553
--- /dev/null
+++ b/ports/highfive/portfile.cmake
@@ -0,0 +1,13 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/HighFive-1.3)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/BlueBrain/HighFive/archive/v1.3.tar.gz"
+ FILENAME "highfive.v1.3.tar.gz"
+ SHA512 258efae1ef5eed45ac1cf93c21c79fab9ee3c340d49a36a4aa2b43c98df1c80db9167a40a0b6a59c4f99b7c190d41d545b53c0f2c5c59aabaffc4b2584b4390b
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+# Copy the highfive header files
+file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp")
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/highfive RENAME copyright)
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/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 d4ac63bd3..f04c231f8 100644
--- a/ports/jsoncpp/CONTROL
+++ b/ports/jsoncpp/CONTROL
@@ -1,3 +1,3 @@
Source: jsoncpp
-Version: 1.7.7
+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/jsoncpp/portfile.cmake b/ports/jsoncpp/portfile.cmake
index f4b89adca..4f460fda7 100644
--- a/ports/jsoncpp/portfile.cmake
+++ b/ports/jsoncpp/portfile.cmake
@@ -1,11 +1,11 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/jsoncpp-1.7.7)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.zip"
- FILENAME "jsoncpp-1.7.7.zip"
- SHA512 3801faab0b1982bc41dac3049e0f7d24ea3dc759b77afc1ca7365b95a36460f87a74a0f5c6efd4c4a315ea2ca904b38f454b0a70133cda339c4a01ae8049cecb
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO open-source-parsers/jsoncpp
+ REF 1.8.1
+ SHA512 4203826fca4c366b51d28ffc928399c914ffaba8be1cada64ff118b5742e6b469d3fc3e59344587d851447857b479794c5697d4fd11a9a55b32a3a7a801b745b
+ HEAD_REF master
)
-vcpkg_extract_source_archive(${ARCHIVE})
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(JSONCPP_STATIC OFF)
@@ -17,29 +17,21 @@ endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
OPTIONS -DJSONCPP_WITH_CMAKE_PACKAGE:BOOL=ON
-DBUILD_STATIC_LIBS:BOOL=${JSONCPP_STATIC}
-DBUILD_SHARED_LIBS:BOOL=${JSONCPP_DYNAMIC}
+ -DJSONCPP_WITH_PKGCONFIG_SUPPORT:BOOL=OFF
+ -DJSONCPP_WITH_TESTS:BOOL=OFF
)
vcpkg_install_cmake()
# Fix CMake files
-file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
-file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/jsoncpp ${CURRENT_PACKAGES_DIR}/share/jsoncpp)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
-file(READ ${CURRENT_PACKAGES_DIR}/share/jsoncpp/jsoncppConfig.cmake _contents)
-string(REPLACE "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\n\n" "\n" _contents "${_contents}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/jsoncpp/jsoncppConfig.cmake ${_contents})
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/jsoncpp)
-file(READ ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/jsoncpp/jsoncppConfig-debug.cmake _contents)
-string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" _contents "${_contents}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/jsoncpp/jsoncppConfig-debug.cmake "${_contents}")
-
-# Remove useless files in debug
+# Remove includes in debug
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jsoncpp)
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 062850e06..9fcc36254 100644
--- a/ports/jxrlib/CONTROL
+++ b/ports/jxrlib/CONTROL
@@ -1,3 +1,3 @@
Source: jxrlib
-Version: 1.1-2
+Version: 1.1-4
Description: Open source implementation of the jpegxr image format standard.
diff --git a/ports/jxrlib/portfile.cmake b/ports/jxrlib/portfile.cmake
index 57c9dc1fe..c7c089ff7 100644
--- a/ports/jxrlib/portfile.cmake
+++ b/ports/jxrlib/portfile.cmake
@@ -26,4 +26,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jxrlib)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/jxrlib/LICENSE ${CURRENT_PACKAGES_DIR}/share/jxrlib/copyright)
-vcpkg_copy_pdbs() \ No newline at end of file
+vcpkg_copy_pdbs()
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/lcms/CMakeLists.txt b/ports/lcms/CMakeLists.txt
index cd69bab3b..809fe505e 100644
--- a/ports/lcms/CMakeLists.txt
+++ b/ports/lcms/CMakeLists.txt
@@ -34,6 +34,11 @@ set(SRCS
)
add_definitions(-DUNICODE -D_UNICODE)
+
+if(BUILD_SHARED_LIBS)
+ add_definitions(-DCMS_DLL_BUILD)
+endif()
+
string(REPLACE "/utf-8" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
include_directories(
diff --git a/ports/lcms/CONTROL b/ports/lcms/CONTROL
index 2349503e9..03efca607 100644
--- a/ports/lcms/CONTROL
+++ b/ports/lcms/CONTROL
@@ -1,4 +1,4 @@
Source: lcms
-Version: 2.8-1
+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 4487cce6a..eeb12243c 100644
--- a/ports/lcms/portfile.cmake
+++ b/ports/lcms/portfile.cmake
@@ -1,22 +1,18 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/lcms2-2.8)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://sourceforge.net/projects/lcms/files/lcms/2.8/lcms2-2.8.tar.gz/download"
- FILENAME "lcms2-2.8.tar.gz"
- SHA512 a9478885b4892c79314a2ef9ab560e6655ac8f2d17abae0805e8b871138bb190e21f0e5c805398449f9dad528dc50baaf9e3cce8b8158eb8ff74179be5733f8f
-)
-vcpkg_extract_source_archive(${ARCHIVE})
-message(STATUS ${SOURCE_PATH})
-file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO mm2/Little-CMS
+ REF lcms2.8
+ SHA512 22ee94aa3333db4248607d8aa84343d324e04b30c154c46672c6f668e14a369b9b72f2557b8465218b6e9a2676cf8fa37d617b4aa13a013dc2337197a599e63a
+ HEAD_REF master
+)
-set(USE_SHARED_LIBRARY OFF)
-if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- set(USE_SHARED_LIBRARY ON)
-endif()
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
OPTIONS_DEBUG
-DSKIP_INSTALL_HEADERS=ON
)
@@ -32,4 +28,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
vcpkg_apply_patches(
SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
PATCHES "${CMAKE_CURRENT_LIST_DIR}/shared.patch")
-endif(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+endif()
diff --git a/ports/lcms/shared.patch b/ports/lcms/shared.patch
index b3e7bf75f..2d7506c52 100644
--- a/ports/lcms/shared.patch
+++ b/ports/lcms/shared.patch
@@ -4,7 +4,7 @@
#endif // CMS_USE_BIG_ENDIAN
-+#define CMS_DLL_BUILD
++#define CMS_DLL
// Calling convention -- this is hardly platform and compiler dependent
#ifdef CMS_IS_WINDOWS_
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/libccd/portfile.cmake b/ports/libccd/portfile.cmake
deleted file mode 100644
index 963000ec5..000000000
--- a/ports/libccd/portfile.cmake
+++ /dev/null
@@ -1,41 +0,0 @@
-# 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)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libccd-16b9379fb6e8610566fe5e1396166daf7106f165)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/danfis/libccd/archive/16b9379fb6e8610566fe5e1396166daf7106f165.zip"
- FILENAME "libccd-16b9379fb6e8610566fe5e1396166daf7106f165.zip"
- SHA512 6cb3ea713f1b1ac1bf48c9ee7e14cb85b3ec5c822ce239330913edc00cb84c846b49ec090cbfa226ef8de70bac97199eb2bf4c651225e3cfc6f6a9dd441aa7db
-)
-vcpkg_extract_source_archive(${ARCHIVE})
-
-vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
- # OPTIONS_RELEASE -DOPTIMIZE=1
- # OPTIONS_DEBUG -DDEBUGGABLE=1
-)
-
-vcpkg_install_cmake()
-
-# Avoid a copy of file in debug
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
-
-# Handle copyright
-file(INSTALL ${SOURCE_PATH}/BSD-LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libccd RENAME copyright)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc)
-
-# Miscellaneous cleanup
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/ccd)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/ccd)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
-
-vcpkg_copy_pdbs() \ No newline at end of file
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/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/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
new file mode 100644
index 000000000..4ca6f8c26
--- /dev/null
+++ b/ports/libharu/CONTROL
@@ -0,0 +1,4 @@
+Source: libharu
+Version: 2017-08-15-d84867ebf9f-2
+Description: libharu - free PDF library
+Build-Depends: zlib,libpng
diff --git a/ports/libharu/portfile.cmake b/ports/libharu/portfile.cmake
new file mode 100644
index 000000000..a1ae49816
--- /dev/null
+++ b/ports/libharu/portfile.cmake
@@ -0,0 +1,58 @@
+include(vcpkg_common_functions)
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO libharu/libharu
+ REF d84867ebf9f3de6afd661d2cdaff102457fbc371
+ SHA512 789579dd52c1056ae90a4ce5360c26ba92cadae5341a3901c4159afe624129a1f628fa6412952a398e048b0e5040c93f7ed5b4e4bc620a22d897098298fe2a99
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+)
+
+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"
+)
+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"
+)
+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"
+)
+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"
+)
+file(GLOB HEADERS "${SOURCE_PATH}/include/*.h" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/include/*.h")
+
+if(DLLS)
+ 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)
+endif()
+file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+
+file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+
+file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libharu RENAME copyright)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libhpdfs.lib ${CURRENT_PACKAGES_DIR}/lib/libhpdf.lib)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfsd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfd.lib)
+endif()
+
+vcpkg_copy_pdbs()
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/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/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/CMakeLists.txt b/ports/libmad/CMakeLists.txt
index 8e15017c0..522c0fbea 100644
--- a/ports/libmad/CMakeLists.txt
+++ b/ports/libmad/CMakeLists.txt
@@ -53,5 +53,5 @@ install(
install(
FILES mad.h
- DESTINATION include/mad
+ DESTINATION include
)
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/libmad/portfile.cmake b/ports/libmad/portfile.cmake
index d9e20ecb5..65b926d55 100644
--- a/ports/libmad/portfile.cmake
+++ b/ports/libmad/portfile.cmake
@@ -7,6 +7,11 @@ vcpkg_download_distfile(ARCHIVE
)
vcpkg_extract_source_archive(${ARCHIVE})
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/use_fpm_default.patch"
+)
+
#The archive only contains a Visual Studio 6.0 era DSP project file, so use a custom CMakeLists.txt
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
diff --git a/ports/libmad/use_fpm_default.patch b/ports/libmad/use_fpm_default.patch
new file mode 100644
index 000000000..f20c8265e
--- /dev/null
+++ b/ports/libmad/use_fpm_default.patch
@@ -0,0 +1,16 @@
+--- mad.h 2004-01-23 10:36:03.000000000 +0100
++++ mad.h 2017-08-12 16:03:38.060392600 +0200
+@@ -24,7 +24,7 @@
+ extern "C" {
+ # endif
+
+-# define FPM_INTEL
++# define FPM_DEFAULT
+--- msvc++/mad.h 2017-08-12 16:04:30.678146600 +0200
++++ msvc++/mad.h 2017-08-12 16:04:00.779378000 +0200
+@@ -24,7 +24,7 @@
+ extern "C" {
+ # endif
+
+-# define FPM_INTEL
++# define FPM_DEFAULT
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/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 fb4557e57..39205bd71 100644
--- a/ports/libogg/CONTROL
+++ b/ports/libogg/CONTROL
@@ -1,3 +1,3 @@
Source: libogg
-Version: 2017-07-27-cab46b19847
+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/libogg/portfile.cmake b/ports/libogg/portfile.cmake
index fb666acde..a3640c54c 100644
--- a/ports/libogg/portfile.cmake
+++ b/ports/libogg/portfile.cmake
@@ -9,6 +9,9 @@ vcpkg_from_github(
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
)
vcpkg_install_cmake()
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/CMakeLists.txt b/ports/libp7-baical/CMakeLists.txt
index c4559c603..6b1044e43 100644
--- a/ports/libp7-baical/CMakeLists.txt
+++ b/ports/libp7-baical/CMakeLists.txt
@@ -3,13 +3,14 @@ cmake_minimum_required(VERSION 3.0)
set(SOURCES "Sources/ClBaical.cpp"
"Sources/ClFile.cpp"
- "Sources/ClText.cpp"
"Sources/Client.cpp"
"Sources/ClNull.cpp"
+ "Sources/ClText.cpp"
"Sources/CRC32.cpp"
"Sources/Proxy.cpp"
"Sources/Telemetry.cpp"
- "Sources/Trace.cpp")
+ "Sources/Trace.cpp"
+)
if(WIN32)
set(RESOURCES "Sources/P7Client.rc")
diff --git a/ports/libp7-baical/CONTROL b/ports/libp7-baical/CONTROL
index df6cf94b6..215810511 100644
--- a/ports/libp7-baical/CONTROL
+++ b/ports/libp7-baical/CONTROL
@@ -1,3 +1,3 @@
Source: libp7-baical
-Version: 4.1
+Version: 4.4-2
Description: P7 is a library for high-speed sending telemetry & trace data from application
diff --git a/ports/libp7-baical/portfile.cmake b/ports/libp7-baical/portfile.cmake
index f298186e0..bb9b751f4 100644
--- a/ports/libp7-baical/portfile.cmake
+++ b/ports/libp7-baical/portfile.cmake
@@ -4,8 +4,12 @@ if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm)
message(FATAL_ERROR "libP7 does not support ARM")
endif()
-set(LIBP7_VERSION 4.1)
-set(LIBP7_HASH 6259416378f1fe60ad6097faf9facd2de1a3ea13e8015a5727d6a179caa88a7f6707b47273afceebc16b39883da4768f29feac199f7d6c354b744b643c2044ab)
+if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ message(FATAL_ERROR "libP7 does not support UWP")
+endif()
+
+set(LIBP7_VERSION 4.4)
+set(LIBP7_HASH ce33db9a0c731e4dff95646703fe5fd96015f1c528377aa5dbe2e533529b0e8c45a4b74ee2b4616a811a7f9038c12edf106b08b3c21cec9cb6bdf85ad6e1d64f)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libP7_v${LIBP7_VERSION})
vcpkg_download_distfile(ARCHIVE
diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL
index c9b3dc2d2..7899cbc8e 100644
--- a/ports/libpng/CONTROL
+++ b/ports/libpng/CONTROL
@@ -1,4 +1,4 @@
Source: libpng
-Version: 1.6.31
+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/libpng/portfile.cmake b/ports/libpng/portfile.cmake
index baa39a903..e012bb6dc 100644
--- a/ports/libpng/portfile.cmake
+++ b/ports/libpng/portfile.cmake
@@ -1,11 +1,11 @@
include(vcpkg_common_functions)
-set(LIBPNG_VERSION 1.6.31)
+set(LIBPNG_VERSION 1.6.32)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libpng-${LIBPNG_VERSION})
vcpkg_download_distfile(ARCHIVE
URLS "https://downloads.sourceforge.net/project/libpng/libpng16/${LIBPNG_VERSION}/libpng-${LIBPNG_VERSION}.tar.xz"
FILENAME "libpng-${LIBPNG_VERSION}.tar.xz"
- SHA512 714da63e19d32eadeeb44edf7f2afeaf6ac59f2756e0951015313a98c0f3c1216296886301c5704958b56f4c96b00725791ba2efe9f26b4a92cd743410cc36a9
+ SHA512 24cf4d38dc08d1db7721fc580d8bf6cee9a105afcea32f1245b7bb3727c8a8645ad733a24534782ef5dfb0d4315a5fd6b0eee9e7f0704e0c635350f80c19a708
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
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 9d355533b..4860b0a6b 100644
--- a/ports/libraw/CONTROL
+++ b/ports/libraw/CONTROL
@@ -1,4 +1,4 @@
Source: libraw
-Version: 0.18.2-2
-Build-Depends: lcms, libjpeg-turbo
+Version: 0.18.2-4
+Build-Depends: lcms, jasper
Description: raw image decoder library
diff --git a/ports/libraw/portfile.cmake b/ports/libraw/portfile.cmake
index 0b13213ad..797ca5aa0 100644
--- a/ports/libraw/portfile.cmake
+++ b/ports/libraw/portfile.cmake
@@ -23,13 +23,21 @@ file(COPY ${LIBRAW_CMAKE_SOURCE_PATH}/cmake DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
OPTIONS
-DINSTALL_CMAKE_MODULE_PATH=${CURRENT_PACKAGES_DIR}/share/libraw
)
-vcpkg_build_cmake()
vcpkg_install_cmake()
+file(READ ${CURRENT_PACKAGES_DIR}/include/libraw/libraw_types.h LIBRAW_H)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ string(REPLACE "#ifdef LIBRAW_NODLL" "#if 1" LIBRAW_H "${LIBRAW_H}")
+else()
+ string(REPLACE "#ifdef LIBRAW_NODLL" "#if 0" LIBRAW_H "${LIBRAW_H}")
+endif()
+file(WRITE ${CURRENT_PACKAGES_DIR}/include/libraw/libraw_types.h "${LIBRAW_H}")
+
# Rename thread-safe version to be "raw.lib". This is unfortunately needed
# because otherwise libraries that build on top of libraw have to choose.
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/raw.lib ${CURRENT_PACKAGES_DIR}/debug/lib/raw.lib)
diff --git a/ports/libsigcpp/CMakeLists.txt b/ports/libsigcpp/CMakeLists.txt
index 7a669a24e..30c3c610e 100644
--- a/ports/libsigcpp/CMakeLists.txt
+++ b/ports/libsigcpp/CMakeLists.txt
@@ -5,14 +5,14 @@ set(SIGCPP_API_VERSION 2.0)
add_definitions(-DSIGC_BUILD)
-include_directories(./MSVC_Net2013) # config file for windows is there
+include_directories(./MSVC_Net2017) # config file for windows is there
include_directories(.)
+
set(SICGPP_SOURCES
sigc++/connection.cc
sigc++/signal_base.cc
sigc++/trackable.cc
- sigc++/adaptors/lambda/lambda.cc
sigc++/functors/slot_base.cc)
add_library(sigc ${SICGPP_SOURCES})
@@ -20,12 +20,13 @@ set_target_properties(sigc PROPERTIES OUTPUT_NAME sigc-${SIGCPP_API_VERSION})
install(TARGETS sigc RUNTIME DESTINATION bin ARCHIVE DESTINATION lib)
if(NOT SIGCPP_SKIP_HEADERS)
- install(FILES MSVC_Net2013/sigc++config.h DESTINATION include)
+ install(FILES MSVC_Net2017/sigc++config.h DESTINATION include)
install(FILES sigc++/sigc++.h DESTINATION include/sigc++)
install(FILES sigc++/bind.h DESTINATION include/sigc++)
install(FILES sigc++/bind_return.h DESTINATION include/sigc++)
install(FILES sigc++/connection.h DESTINATION include/sigc++)
install(FILES sigc++/limit_reference.h DESTINATION include/sigc++)
+ install(FILES sigc++/member_method_trait.h DESTINATION include/sigc++)
install(FILES sigc++/reference_wrapper.h DESTINATION include/sigc++)
install(FILES sigc++/retype_return.h DESTINATION include/sigc++)
install(FILES sigc++/signal.h DESTINATION include/sigc++)
@@ -34,24 +35,30 @@ if(NOT SIGCPP_SKIP_HEADERS)
install(FILES sigc++/trackable.h DESTINATION include/sigc++)
install(FILES sigc++/type_traits.h DESTINATION include/sigc++)
install(FILES sigc++/visit_each.h DESTINATION include/sigc++)
+ install(FILES sigc++/weak_raw_ptr.h DESTINATION include/sigc++)
install(FILES sigc++/adaptors/adaptors.h DESTINATION include/sigc++/adaptors)
+ install(FILES sigc++/adaptors/adaptor_base.h DESTINATION include/sigc++/adaptors)
install(FILES sigc++/adaptors/adaptor_trait.h DESTINATION include/sigc++/adaptors)
+ install(FILES sigc++/adaptors/adapts.h DESTINATION include/sigc++/adaptors)
install(FILES sigc++/adaptors/bind.h DESTINATION include/sigc++/adaptors)
install(FILES sigc++/adaptors/bind_return.h DESTINATION include/sigc++/adaptors)
install(FILES sigc++/adaptors/bound_argument.h DESTINATION include/sigc++/adaptors)
install(FILES sigc++/adaptors/compose.h DESTINATION include/sigc++/adaptors)
- install(FILES sigc++/adaptors/deduce_result_type.h DESTINATION include/sigc++/adaptors)
install(FILES sigc++/adaptors/exception_catch.h DESTINATION include/sigc++/adaptors)
install(FILES sigc++/adaptors/hide.h DESTINATION include/sigc++/adaptors)
install(FILES sigc++/adaptors/retype.h DESTINATION include/sigc++/adaptors)
install(FILES sigc++/adaptors/retype_return.h DESTINATION include/sigc++/adaptors)
install(FILES sigc++/adaptors/track_obj.h DESTINATION include/sigc++/adaptors)
- install(FILES sigc++/adaptors/lambda/base.h DESTINATION include/sigc++/adaptors/lambda)
- install(FILES sigc++/adaptors/lambda/select.h DESTINATION include/sigc++/adaptors/lambda)
+ install(FILES sigc++/adaptors/tuple_visitor_visit_each.h DESTINATION include/sigc++/adaptors)
install(FILES sigc++/functors/functors.h DESTINATION include/sigc++/functors)
install(FILES sigc++/functors/functor_trait.h DESTINATION include/sigc++/functors)
install(FILES sigc++/functors/mem_fun.h DESTINATION include/sigc++/functors)
install(FILES sigc++/functors/ptr_fun.h DESTINATION include/sigc++/functors)
install(FILES sigc++/functors/slot.h DESTINATION include/sigc++/functors)
install(FILES sigc++/functors/slot_base.h DESTINATION include/sigc++/functors)
+ install(FILES sigc++/tuple-utils/tuple_cdr.h DESTINATION include/sigc++/tuple-utils)
+ install(FILES sigc++/tuple-utils/tuple_end.h DESTINATION include/sigc++/tuple-utils)
+ install(FILES sigc++/tuple-utils/tuple_for_each.h DESTINATION include/sigc++/tuple-utils)
+ install(FILES sigc++/tuple-utils/tuple_start.h DESTINATION include/sigc++/tuple-utils)
+ install(FILES sigc++/tuple-utils/tuple_transform_each.h DESTINATION include/sigc++/tuple-utils)
endif()
diff --git a/ports/libsigcpp/CONTROL b/ports/libsigcpp/CONTROL
index 02b2e4b83..97667dd7d 100644
--- a/ports/libsigcpp/CONTROL
+++ b/ports/libsigcpp/CONTROL
@@ -1,3 +1,3 @@
Source: libsigcpp
-Version: 2.10
+Version: 2.99-1
Description: Typesafe callback framework for C++
diff --git a/ports/libsigcpp/portfile.cmake b/ports/libsigcpp/portfile.cmake
index c98a26717..7525c1aae 100644
--- a/ports/libsigcpp/portfile.cmake
+++ b/ports/libsigcpp/portfile.cmake
@@ -1,10 +1,10 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsigc++-2.10.0)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsigc++-2.99.9)
vcpkg_download_distfile(ARCHIVE
- URLS "http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.10/libsigc++-2.10.0.tar.xz"
- FILENAME "libsigc++-2.10.0.tar.xz"
- SHA512 5b96df21d6bd6ba41520c7219e77695a86aabc60b7259262c7a9f4b8475ce0e2fd8dc37bcf7c17e24e818ff28c262d682b964c83e215b51bdbe000f3f58794ae)
+ URLS "http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.99/libsigc++-2.99.9.tar.xz"
+ FILENAME "libsigc++-2.99.9.tar.xz"
+ SHA512 3e8f8176a4618938a16b2367466415aff8ec10d83ef84de8973373a63fc0b9708d14115ad5c039c81b570385b205944651849a68e618c37c171cd748dd5b2403)
vcpkg_extract_source_archive(${ARCHIVE})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
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/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/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 bbfcda090..ba5d7e85e 100644
--- a/ports/libuv/CONTROL
+++ b/ports/libuv/CONTROL
@@ -1,3 +1,3 @@
Source: libuv
-Version: 1.13.1
-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 47447df99..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.13.1
- SHA512 5d4bbc90f353ea438e8eac3ea0c4e89c09d3f51629c1d06b52072f04d8cccfd7119189ba21ad13eb8df28575e0844fbb1b09ed903bd95f6ea806e6cba353ef1a
+ 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/libxml2/portfile.cmake b/ports/libxml2/portfile.cmake
index de98368c9..d50183f1d 100644
--- a/ports/libxml2/portfile.cmake
+++ b/ports/libxml2/portfile.cmake
@@ -9,7 +9,7 @@
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libxml2-2.9.4)
vcpkg_download_distfile(ARCHIVE
- URLS "ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz"
+ URLS "ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz" "http://xmlsoft.org/sources/libxml2-2.9.4.tar.gz"
FILENAME "libxml2-2.9.4.tar.gz"
SHA512 f5174ab1a3a0ec0037a47f47aa47def36674e02bfb42b57f609563f84c6247c585dbbb133c056953a5adb968d328f18cbc102eb0d00d48eb7c95478389e5daf9
)
@@ -29,4 +29,4 @@ vcpkg_install_cmake()
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxml2)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libxml2/COPYING ${CURRENT_PACKAGES_DIR}/share/libxml2/copyright)
-vcpkg_copy_pdbs() \ No newline at end of file
+vcpkg_copy_pdbs()
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..9b7629f42 100644
--- a/ports/llvm/CONTROL
+++ b/ports/llvm/CONTROL
@@ -1,3 +1,3 @@
Source: llvm
-Version: 4.0.0
+Version: 4.0.0-1
Description: The LLVM Compiler Infrastructure
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/CONTROL b/ports/lua/CONTROL
index 266bd153c..e34436ad0 100644
--- a/ports/lua/CONTROL
+++ b/ports/lua/CONTROL
@@ -1,3 +1,3 @@
Source: lua
-Version: 5.3.4
+Version: 5.3.4-1
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/CMakeLists.txt b/ports/lz4/CMakeLists.txt
index a5366f5ab..b082ab374 100644
--- a/ports/lz4/CMakeLists.txt
+++ b/ports/lz4/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.0)
-project(lz4)
+project(lz4 C)
if(BUILD_SHARED_LIBS)
add_definitions(-DLZ4_DLL_EXPORT)
diff --git a/ports/lz4/CONTROL b/ports/lz4/CONTROL
index b48ba5424..5e8b87bd2 100644
--- a/ports/lz4/CONTROL
+++ b/ports/lz4/CONTROL
@@ -1,3 +1,3 @@
Source: lz4
-Version: 1.7.5
+Version: 1.8.0-1
Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core.
diff --git a/ports/lz4/auto-define-import-macro.patch b/ports/lz4/auto-define-import-macro.patch
deleted file mode 100644
index 314c228db..000000000
--- a/ports/lz4/auto-define-import-macro.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/lz4.h b/lz4.h
-index 7420ad8..c1c3e56 100644
---- a/lz4.h
-+++ b/lz4.h
-@@ -73,6 +73,9 @@ extern "C" {
- * LZ4_DLL_EXPORT :
- * Enable exporting of functions when building a Windows DLL
- */
-+
-+#define LZ4_DLL_IMPORT 1
-+
- #if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1)
- # define LZ4LIB_API __declspec(dllexport)
- #elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)
-diff --git a/lz4frame.h b/lz4frame.h
-index 3104d2e..4442461 100644
---- a/lz4frame.h
-+++ b/lz4frame.h
-@@ -55,6 +55,9 @@ extern "C" {
- * LZ4_DLL_EXPORT :
- * Enable exporting of functions when building a Windows DLL
- */
-+
-+#define LZ4_DLL_IMPORT 1
-+
- #if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1)
- # define LZ4FLIB_API __declspec(dllexport)
- #elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)
diff --git a/ports/lz4/portfile.cmake b/ports/lz4/portfile.cmake
index dc6f80ed9..6664c2b79 100644
--- a/ports/lz4/portfile.cmake
+++ b/ports/lz4/portfile.cmake
@@ -1,12 +1,10 @@
-
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/lz4-1.7.5)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/lz4/lz4/archive/v1.7.5.zip"
- FILENAME "lz4-1.7.5.zip"
- SHA512 09968b67a5cd8555f6e1d95b99971a82d228c6d8d9f9dd9e9a33c9633bed9bcf1e370c2ff44e58c6ca72d103c149585b3e83061c690f3e857eb5f53d586f86a4)
-
-vcpkg_extract_source_archive(${ARCHIVE})
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO lz4/lz4
+ REF v1.8.0
+ SHA512 aea46d4a900a3ede7dd7b498ee938ecd98397d3277c5b3a85b4236a44777cba85cd68a2f32c993b872afda96c5dafe0cb3dd391101fe8181e17c9f48884c1535
+ HEAD_REF dev)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
@@ -19,12 +17,15 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
-if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- vcpkg_apply_patches(
- SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
- PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/auto-define-import-macro.patch)
-endif()
+foreach(FILE lz4.h lz4frame.h)
+ file(READ ${CURRENT_PACKAGES_DIR}/include/${FILE} LZ4_HEADER)
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ string(REPLACE "defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)" "1" LZ4_HEADER "${LZ4_HEADER}")
+ else()
+ string(REPLACE "defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)" "0" LZ4_HEADER "${LZ4_HEADER}")
+ endif()
+ file(WRITE ${CURRENT_PACKAGES_DIR}/include/${FILE} "${LZ4_HEADER}")
+endforeach()
file(COPY ${SOURCE_PATH}/lib/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/lz4)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/lz4/LICENSE ${CURRENT_PACKAGES_DIR}/share/lz4/copyright)
diff --git a/ports/lzfse/CONTROL b/ports/lzfse/CONTROL
new file mode 100644
index 000000000..34276814f
--- /dev/null
+++ b/ports/lzfse/CONTROL
@@ -0,0 +1,3 @@
+Source: lzfse
+Version: 1.0-1
+Description: Lempel-Ziv style data compressor using Finite State Entropy coding.
diff --git a/ports/lzfse/disable-cli-option.patch b/ports/lzfse/disable-cli-option.patch
new file mode 100644
index 000000000..260b7a2be
--- /dev/null
+++ b/ports/lzfse/disable-cli-option.patch
@@ -0,0 +1,51 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 336a68d..96a2a74 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -67,18 +67,20 @@ add_library(lzfse
+ src/lzvn_encode_base.c)
+ lzfse_add_compiler_flags(lzfse -Wall -Wno-unknown-pragmas -Wno-unused-variable)
+
+-add_executable(lzfse_cli
+- src/lzfse_main.c)
+-target_link_libraries(lzfse_cli lzfse)
+-set_target_properties(lzfse_cli PROPERTIES OUTPUT_NAME lzfse)
+-lzfse_add_compiler_flags(lzfse_cli -Wall -Wno-unknown-pragmas -Wno-unused-variable)
+-
+-if(CMAKE_VERSION VERSION_LESS 3.1 OR CMAKE_C_COMPLIER_ID STREQUAL "Intel")
+- lzfse_add_compiler_flags(lzfse -std=c99)
+- lzfse_add_compiler_flags(lzfse_cli -std=c99)
+-else()
+- set_property(TARGET lzfse PROPERTY C_STANDARD 99)
+- set_property(TARGET lzfse_cli PROPERTY C_STANDARD 99)
++if(NOT LZFSE_DISABLE_CLI)
++ add_executable(lzfse_cli
++ src/lzfse_main.c)
++ target_link_libraries(lzfse_cli lzfse)
++ set_target_properties(lzfse_cli PROPERTIES OUTPUT_NAME lzfse)
++ lzfse_add_compiler_flags(lzfse_cli -Wall -Wno-unknown-pragmas -Wno-unused-variable)
++
++ if(CMAKE_VERSION VERSION_LESS 3.1 OR CMAKE_C_COMPLIER_ID STREQUAL "Intel")
++ lzfse_add_compiler_flags(lzfse -std=c99)
++ lzfse_add_compiler_flags(lzfse_cli -std=c99)
++ else()
++ set_property(TARGET lzfse PROPERTY C_STANDARD 99)
++ set_property(TARGET lzfse_cli PROPERTY C_STANDARD 99)
++ endif()
+ endif()
+
+ set_target_properties(lzfse PROPERTIES
+@@ -95,7 +97,12 @@ endif()
+ if(NOT LZFSE_BUNDLE_MODE)
+ include(GNUInstallDirs)
+
+- install(TARGETS lzfse lzfse_cli
++ if(NOT LZFSE_DISABLE_CLI)
++ install(TARGETS lzfse_cli
++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
++ endif()
++
++ install(TARGETS lzfse
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
diff --git a/ports/lzfse/portfile.cmake b/ports/lzfse/portfile.cmake
new file mode 100644
index 000000000..80d9e2f10
--- /dev/null
+++ b/ports/lzfse/portfile.cmake
@@ -0,0 +1,37 @@
+if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
+ message(FATAL_ERROR "ARM build not supported")
+endif()
+
+include(vcpkg_common_functions)
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO lzfse/lzfse
+ REF lzfse-1.0
+ SHA512 9d7ca44e6d3d2bdf4b82b0eb66c14922369b8b6fe2cf891187a77c6708b8d26c2c1b2ccddec6059e85dbbbb37c497419549f02812b5f34d06238ac246a8cf912
+ HEAD_REF master)
+
+vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH}
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-cli-option.patch)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DLZFSE_DISABLE_TESTS=ON
+ -DLZFSE_DISABLE_CLI=ON)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+file(READ ${CURRENT_PACKAGES_DIR}/include/lzfse.h LZFSE_H)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ string(REPLACE "defined(LZFSE_DLL)" "1" LZFSE_H "${LZFSE_H}")
+else()
+ string(REPLACE "defined(LZFSE_DLL)" "0" LZFSE_H "${LZFSE_H}")
+endif()
+file(WRITE ${CURRENT_PACKAGES_DIR}/include/lzfse.h "${LZFSE_H}")
+
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/lzfse)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/lzfse/LICENSE ${CURRENT_PACKAGES_DIR}/share/lzfse/copyright)
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 8d77eeca5..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
-Build-Depends: libbson, openssl [uwp]
-Description: Client library written in C for MongoDB. \ No newline at end of file
+Version: 1.6.2-1
+Build-Depends: libbson, openssl (uwp)
+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/mpfr/CMakeLists.txt b/ports/mpfr/CMakeLists.txt
new file mode 100644
index 000000000..8a989ff28
--- /dev/null
+++ b/ports/mpfr/CMakeLists.txt
@@ -0,0 +1,275 @@
+cmake_minimum_required(VERSION 3.3.0)
+
+project(MPFR VERSION 3.1.5 LANGUAGES C)
+
+# Find GMP (or MPIR)
+find_library(GMP_LIBRARY NAMES gmp mpir)
+find_path(GMP_INCLUDE_DIR "gmp.h")
+
+set(GMP_LIBRARIES ${GMP_LIBRARY})
+set(GMP_INCLUDE_DIRS ${GMP_INCLUDE_DIR})
+
+# Sources
+set(SRCS
+ src/mpfr.h
+ src/mpf2mpfr.h
+ src/mpfr-gmp.h
+ src/mpfr-impl.h
+ src/mpfr-intmax.h
+ src/mpfr-longlong.h
+ src/mpfr-thread.h
+ src/exceptions.c
+ src/extract.c
+ src/uceil_exp2.c
+ src/uceil_log2.c
+ src/ufloor_log2.c
+ src/add.c
+ src/add1.c
+ src/add_ui.c
+ src/agm.c
+ src/clear.c
+ src/cmp.c
+ src/cmp_abs.c
+ src/cmp_si.c
+ src/cmp_ui.c
+ src/comparisons.c
+ src/div_2exp.c
+ src/div_2si.c
+ src/div_2ui.c
+ src/div.c
+ src/div_ui.c
+ src/dump.c
+ src/eq.c
+ src/exp10.c
+ src/exp2.c
+ src/exp3.c
+ src/exp.c
+ src/frac.c
+ src/frexp.c
+ src/get_d.c
+ src/get_exp.c
+ src/get_str.c
+ src/init.c
+ src/inp_str.c
+ src/isinteger.c
+ src/isinf.c
+ src/isnan.c
+ src/isnum.c
+ src/const_log2.c
+ src/log.c
+ src/modf.c
+ src/mul_2exp.c
+ src/mul_2si.c
+ src/mul_2ui.c
+ src/mul.c
+ src/mul_ui.c
+ src/neg.c
+ src/next.c
+ src/out_str.c
+ src/printf.c
+ src/vasprintf.c
+ src/const_pi.c
+ src/pow.c
+ src/pow_si.c
+ src/pow_ui.c
+ src/print_raw.c
+ src/print_rnd_mode.c
+ src/reldiff.c
+ src/round_prec.c
+ src/set.c
+ src/setmax.c
+ src/setmin.c
+ src/set_d.c
+ src/set_dfl_prec.c
+ src/set_exp.c
+ src/set_rnd.c
+ src/set_f.c
+ src/set_prc_raw.c
+ src/set_prec.c
+ src/set_q.c
+ src/set_si.c
+ src/set_str.c
+ src/set_str_raw.c
+ src/set_ui.c
+ src/set_z.c
+ src/sqrt.c
+ src/sqrt_ui.c
+ src/sub.c
+ src/sub1.c
+ src/sub_ui.c
+ src/rint.c
+ src/ui_div.c
+ src/ui_sub.c
+ src/urandom.c
+ src/urandomb.c
+ src/get_z_exp.c
+ src/swap.c
+ src/factorial.c
+ src/cosh.c
+ src/sinh.c
+ src/tanh.c
+ src/sinh_cosh.c
+ src/acosh.c
+ src/asinh.c
+ src/atanh.c
+ src/atan.c
+ src/cmp2.c
+ src/exp_2.c
+ src/asin.c
+ src/const_euler.c
+ src/cos.c
+ src/sin.c
+ src/tan.c
+ src/fma.c
+ src/fms.c
+ src/hypot.c
+ src/log1p.c
+ src/expm1.c
+ src/log2.c
+ src/log10.c
+ src/ui_pow.c
+ src/ui_pow_ui.c
+ src/minmax.c
+ src/dim.c
+ src/signbit.c
+ src/copysign.c
+ src/setsign.c
+ src/gmp_op.c
+ src/init2.c
+ src/acos.c
+ src/sin_cos.c
+ src/set_nan.c
+ src/set_inf.c
+ src/set_zero.c
+ src/powerof2.c
+ src/gamma.c
+ src/set_ld.c
+ src/get_ld.c
+ src/cbrt.c
+ src/volatile.c
+ src/fits_s.h
+ src/fits_sshort.c
+ src/fits_sint.c
+ src/fits_slong.c
+ src/fits_u.h
+ src/fits_ushort.c
+ src/fits_uint.c
+ src/fits_ulong.c
+ src/fits_uintmax.c
+ src/fits_intmax.c
+ src/get_si.c
+ src/get_ui.c
+ src/zeta.c
+ src/cmp_d.c
+ src/erf.c
+ src/inits.c
+ src/inits2.c
+ src/clears.c
+ src/sgn.c
+ src/check.c
+ src/sub1sp.c
+ src/version.c
+ src/mpn_exp.c
+ src/mpfr-gmp.c
+ src/mp_clz_tab.c
+ src/sum.c
+ src/add1sp.c
+ src/free_cache.c
+ src/si_op.c
+ src/cmp_ld.c
+ src/set_ui_2exp.c
+ src/set_si_2exp.c
+ src/set_uj.c
+ src/set_sj.c
+ src/get_sj.c
+ src/get_uj.c
+ src/get_z.c
+ src/iszero.c
+ src/cache.c
+ src/sqr.c
+ src/int_ceil_log2.c
+ src/isqrt.c
+ src/strtofr.c
+ src/pow_z.c
+ src/logging.c
+ src/mulders.c
+ src/get_f.c
+ src/round_p.c
+ src/erfc.c
+ src/atan2.c
+ src/subnormal.c
+ src/const_catalan.c
+ src/root.c
+ src/gen_inverse.h
+ src/sec.c
+ src/csc.c
+ src/cot.c
+ src/eint.c
+ src/sech.c
+ src/csch.c
+ src/coth.c
+ src/round_near_x.c
+ src/constant.c
+ src/abort_prec_max.c
+ src/stack_interface.c
+ src/lngamma.c
+ src/zeta_ui.c
+ src/set_d64.c
+ src/get_d64.c
+ src/jn.c
+ src/yn.c
+ src/rem1.c
+ src/get_patches.c
+ src/add_d.c
+ src/sub_d.c
+ src/d_sub.c
+ src/mul_d.c
+ src/div_d.c
+ src/d_div.c
+ src/li2.c
+ src/rec_sqrt.c
+ src/min_prec.c
+ src/buildopt.c
+ src/digamma.c
+ src/bernoulli.c
+ src/isregular.c
+ src/set_flt.c
+ src/get_flt.c
+ src/scale2.c
+ src/set_z_exp.c
+ src/ai.c
+ src/gammaonethird.c
+ src/ieee_floats.h
+ src/grandom.c)
+
+configure_file("src/mparam_h.in" "mparam.h")
+
+# Create and configure the target
+add_library(mpfr ${SRCS})
+
+# target_compile_definitions(mpfr PRIVATE HAVE_CONFIG_H)
+target_compile_definitions(mpfr PRIVATE __MPFR_WITHIN_MPFR)
+if(BUILD_SHARED_LIBS)
+ target_compile_definitions(mpfr PRIVATE __GMP_LIBGMP_DLL)
+endif()
+
+target_link_libraries(mpfr ${GMP_LIBRARIES})
+
+target_include_directories(mpfr PUBLIC ${GMP_INCLUDE_DIRS})
+target_include_directories(mpfr PRIVATE ${CMAKE_BINARY_DIR})
+target_include_directories(mpfr PRIVATE ${PROJECT_SOURCE_DIR})
+target_include_directories(mpfr PRIVATE ${PROJECT_SOURCE_DIR}/src)
+
+# Install
+install(
+ TARGETS mpfr
+ EXPORT MPFRExports
+ RUNTIME DESTINATION "bin"
+ LIBRARY DESTINATION "lib"
+ ARCHIVE DESTINATION "lib"
+ )
+
+install(
+ FILES src/mpfr.h
+ DESTINATION "include"
+) \ No newline at end of file
diff --git a/ports/mpfr/CONTROL b/ports/mpfr/CONTROL
new file mode 100644
index 000000000..2d5d4fedd
--- /dev/null
+++ b/ports/mpfr/CONTROL
@@ -0,0 +1,4 @@
+Source: mpfr
+Version: 3.1.5-1
+Description: The MPFR library is a C library for multiple-precision floating-point computations with correct rounding
+Build-Depends: mpir
diff --git a/ports/mpfr/portfile.cmake b/ports/mpfr/portfile.cmake
new file mode 100644
index 000000000..6a61d4038
--- /dev/null
+++ b/ports/mpfr/portfile.cmake
@@ -0,0 +1,23 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpfr-3.1.5)
+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
+)
+
+vcpkg_extract_source_archive(${ARCHIVE})
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpfr)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/mpfr/COPYING ${CURRENT_PACKAGES_DIR}/share/mpfr/copyright)
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/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/CONTROL b/ports/opencv/CONTROL
index 91efce30a..cb2762227 100644
--- a/ports/opencv/CONTROL
+++ b/ports/opencv/CONTROL
@@ -1,4 +1,5 @@
Source: opencv
Version: 3.3.0
-Build-Depends: zlib, libpng, libjpeg-turbo, tiff, vtk, protobuf, ceres, ffmpeg
+# Optional: Add in vtk to build with VTK and cuda to build with CUDA
+Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf, ceres, ffmpeg
Description: computer vision library
diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake
index 35df35fae..d5d1271ff 100644
--- a/ports/opencv/portfile.cmake
+++ b/ports/opencv/portfile.cmake
@@ -56,6 +56,7 @@ vcpkg_configure_cmake(
-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
@@ -65,6 +66,8 @@ vcpkg_configure_cmake(
-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
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/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/openssl/CONTROL b/ports/openssl/CONTROL
index bb00f9cc3..5490766a6 100644
--- a/ports/openssl/CONTROL
+++ b/ports/openssl/CONTROL
@@ -1,3 +1,3 @@
Source: openssl
-Version: 1.0.2l-1
+Version: 1.0.2l-2
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/fix-uwp-pathlib.patch b/ports/openssl/fix-uwp-pathlib.patch
deleted file mode 100644
index 17a1a4e10..000000000
--- a/ports/openssl/fix-uwp-pathlib.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git "a/ms/setVSvars.bat" "b/ms/setVSvars.bat"
-index e6ebc0a7..cde9afb2 100644
---- "a/ms/setVSvars.bat"
-+++ "b/ms/setVSvars.bat"
-@@ -179,7 +179,7 @@ exit /b
- call:setVar _VS14VC VisualStudio14VC
- call:setVar _WKITS10 WindowsKits10.0
- set PATH=%_VS14VCBin%;%PATH%
-- set "LIBPATH=%_WKITS10%UnionMetadata\Facade;%_VS14VC%vcpackages;%_WKITS10%references\windows.foundation.foundationcontract\1.0.0.0\;%_WKITS10%references\windows.foundation.universalapicontract\1.0.0.0\"
-+ set "LIBPATH=%_WKITS10%UnionMetadata\Facade;%_VS14VC%vcpackages;%_WKITS10%references\windows.foundation.foundationcontract\2.0.0.0\;%_WKITS10%references\windows.foundation.universalapicontract\3.0.0.0\"
- goto :eof
-
- :end
diff --git a/ports/openssl/make-openssl.bat b/ports/openssl/make-openssl.bat
index 6f0afdf74..4f6488e8d 100644
--- a/ports/openssl/make-openssl.bat
+++ b/ports/openssl/make-openssl.bat
@@ -2,13 +2,8 @@ set build=%1
perl Configure no-asm no-hw no-dso VC-WINUNIVERSAL -FS -FIWindows.h
-set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\3.0.0.0\
-set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\2.0.0.0\
-set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\1.0.0.0\
-set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\4.0.0.0\
-set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\3.0.0.0\
-set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\2.0.0.0\
-set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\1.0.0.0\
+for /D %%f in ("%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\*") do set LibPath=%LibPath%;%%f\
+for /D %%f in ("%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\*") do set LibPath=%LibPath%;%%f\
call ms\do_winuniversal.bat
diff --git a/ports/openssl/portfile-uwp.cmake b/ports/openssl/portfile-uwp.cmake
index e1f7a7932..4f83f2eed 100644
--- a/ports/openssl/portfile-uwp.cmake
+++ b/ports/openssl/portfile-uwp.cmake
@@ -43,75 +43,50 @@ vcpkg_download_distfile(ARCHIVE
vcpkg_extract_source_archive(${ARCHIVE})
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-uwp-pathlib.patch
-)
-
file(REMOVE_RECURSE ${SOURCE_PATH}/tmp32dll)
file(REMOVE_RECURSE ${SOURCE_PATH}/out32dll)
file(REMOVE_RECURSE ${SOURCE_PATH}/inc32dll)
-file(COPY
-${CMAKE_CURRENT_LIST_DIR}/make-openssl.bat
-DESTINATION ${SOURCE_PATH})
+file(
+ COPY ${CMAKE_CURRENT_LIST_DIR}/make-openssl.bat
+ DESTINATION ${SOURCE_PATH}
+)
message(STATUS "Build ${TARGET_TRIPLET}")
-
vcpkg_execute_required_process(
- COMMAND ${SOURCE_PATH}/make-openssl.bat ${UWP_PLATFORM}
+ COMMAND ${SOURCE_PATH}/make-openssl.bat ${UWP_PLATFORM}
WORKING_DIRECTORY ${SOURCE_PATH}
LOGNAME make-openssl-${TARGET_TRIPLET}
)
-
-
message(STATUS "Build ${TARGET_TRIPLET} done")
-
-
file(
COPY ${SOURCE_PATH}/inc32/openssl
DESTINATION ${CURRENT_PACKAGES_DIR}/include
)
-file(INSTALL ${SOURCE_PATH}/out32dll/libeay32.dll
- DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
-
-file(INSTALL ${SOURCE_PATH}/out32dll/libeay32.pdb
+file(INSTALL
+ ${SOURCE_PATH}/out32dll/libeay32.dll
+ ${SOURCE_PATH}/out32dll/libeay32.pdb
+ ${SOURCE_PATH}/out32dll/ssleay32.dll
+ ${SOURCE_PATH}/out32dll/ssleay32.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
-file(INSTALL ${SOURCE_PATH}/out32dll/libeay32.lib
+file(INSTALL
+ ${SOURCE_PATH}/out32dll/libeay32.lib
+ ${SOURCE_PATH}/out32dll/ssleay32.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
-file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.dll
- DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
-
-file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.pdb
- DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
-
-file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.lib
- DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
-
-
-
-file(INSTALL ${SOURCE_PATH}/out32dll/libeay32.dll
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
-
-file(INSTALL ${SOURCE_PATH}/out32dll/libeay32.pdb
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
-
-file(INSTALL ${SOURCE_PATH}/out32dll/libeay32.lib
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
-
-file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.dll
+file(INSTALL
+ ${SOURCE_PATH}/out32dll/libeay32.dll
+ ${SOURCE_PATH}/out32dll/libeay32.pdb
+ ${SOURCE_PATH}/out32dll/ssleay32.dll
+ ${SOURCE_PATH}/out32dll/ssleay32.pdb
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
-file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.pdb
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
-
-file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.lib
+file(INSTALL
+ ${SOURCE_PATH}/out32dll/libeay32.lib
+ ${SOURCE_PATH}/out32dll/ssleay32.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
-
-
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright)
diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake
index 569de6c75..f8d399abc 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
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/CMakeLists.txt b/ports/pango/CMakeLists.txt
index 7dad7dbcf..9c7e7f182 100644
--- a/ports/pango/CMakeLists.txt
+++ b/ports/pango/CMakeLists.txt
@@ -81,6 +81,7 @@ pango_add_module(pango
pango/pango-color.c
pango/pango-context.c
pango/pango-coverage.c
+ pango/pango-emoji.c
pango/pango-engine.c
pango/pango-fontmap.c
pango/pango-fontset.c
diff --git a/ports/pango/CONTROL b/ports/pango/CONTROL
index 011f33691..aa6c73e68 100644
--- a/ports/pango/CONTROL
+++ b/ports/pango/CONTROL
@@ -1,4 +1,4 @@
Source: pango
-Version: 1.40.6
+Version: 1.40.11-1
Description: Text and font handling library.
Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz
diff --git a/ports/pango/portfile.cmake b/ports/pango/portfile.cmake
index 7f28b8ca7..009953534 100644
--- a/ports/pango/portfile.cmake
+++ b/ports/pango/portfile.cmake
@@ -1,10 +1,10 @@
include(vcpkg_common_functions)
-set(PANGO_VERSION 1.40.6)
+set(PANGO_VERSION 1.40.11)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pango-${PANGO_VERSION})
vcpkg_download_distfile(ARCHIVE
URLS "http://ftp.gnome.org/pub/GNOME/sources/pango/1.40/pango-${PANGO_VERSION}.tar.xz"
FILENAME "pango-${PANGO_VERSION}.tar.xz"
- SHA512 d916b364a77de3e68779e6d841d95bca456daf89405b92eaf51dceef093a9761cbb6c48f4c2971dec47c0bbdb645a3f3f4fb9af425274bf1d1822b278575e1f7)
+ SHA512 e4ac40f8da9c326e1e4dfaf4b1d2070601b17f88f5a12991a9a8bbc58bb08640404e2a794a5c68c5ebb2e7e80d9c186d4b26cd417bb63a23f024ef8a38bb152a)
vcpkg_extract_source_archive(${ARCHIVE})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
@@ -20,7 +20,6 @@ vcpkg_configure_cmake(
OPTIONS_DEBUG
-DPANGO_SKIP_HEADERS=ON)
-vcpkg_build_cmake()
vcpkg_install_cmake()
vcpkg_copy_pdbs()
diff --git a/ports/pangolin/CONTROL b/ports/pangolin/CONTROL
new file mode 100644
index 000000000..79b7f6947
--- /dev/null
+++ b/ports/pangolin/CONTROL
@@ -0,0 +1,4 @@
+Source: pangolin
+Version: 0.5-1
+Build-Depends: eigen3
+Description: Lightweight GUI Library
diff --git a/ports/pangolin/portfile.cmake b/ports/pangolin/portfile.cmake
new file mode 100644
index 000000000..d93f9d7cd
--- /dev/null
+++ b/ports/pangolin/portfile.cmake
@@ -0,0 +1,44 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO stevenlovegrove/Pangolin
+ REF v0.5
+ SHA512 7ebeec108f33f1aa8b1ad08e3ca128a837b22d33e3fc580021f981784043b023a1bf563bbfa8b51d46863db770b336d24fc84ee3d836b85e0da1848281b2a5b2
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
+)
+
+vcpkg_install_cmake()
+
+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})
+
+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-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(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# 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..e9547c8cb 100644
--- a/ports/pcl/CONTROL
+++ b/ports/pcl/CONTROL
@@ -1,4 +1,4 @@
Source: pcl
-Version: 1.8.1
+Version: 1.8.1-1
Build-Depends: boost, eigen3, flann, qhull, vtk, openni2, qt5
Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing.
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 8a118b3e7..06d683de4 100644
--- a/ports/pcre2/CONTROL
+++ b/ports/pcre2/CONTROL
@@ -1,3 +1,3 @@
Source: pcre2
-Version: 10.23
+Version: 10.30-1
Description: PCRE2 is a re-working of the original Perl Compatible Regular Expressions library
diff --git a/ports/pcre2/portfile.cmake b/ports/pcre2/portfile.cmake
index fa7bbcf4b..0f5bee964 100644
--- a/ports/pcre2/portfile.cmake
+++ b/ports/pcre2/portfile.cmake
@@ -1,9 +1,10 @@
+set(PCRE2_VERSION 10.30)
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pcre2-10.23)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pcre2-${PCRE2_VERSION})
vcpkg_download_distfile(ARCHIVE
- URLS "https://sourceforge.net/projects/pcre/files/pcre2/10.23/pcre2-10.23.zip/download"
- FILENAME "pcre2-10.23.zip"
- SHA512 0f0638ce28ce17e18425d499cc516a30dabbfa868180ea320361ffeaa26d4f6f6975f12bc20024f7457fe3c6eed686976a9e5c66c2785d1ea63bee38131ea0d2)
+ URLS "https://sourceforge.net/projects/pcre/files/pcre2/${PCRE2_VERSION}/pcre2-${PCRE2_VERSION}.zip/download"
+ FILENAME "pcre2-${PCRE2_VERSION}.zip"
+ SHA512 03e570b946ac29498a114b27e715a0fcf25702bfc9623f9fc085ee8a3214ab3c303baccb9c0af55da6916e8ce40d931d97f1ee9628690563041a943f0aa2bc54)
vcpkg_extract_source_archive(${ARCHIVE})
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..695fa53ce 100644
--- a/ports/proj/CONTROL
+++ b/ports/proj/CONTROL
@@ -1,3 +1,3 @@
Source: proj
-Version: 4.9.3
+Version: 4.9.3-1
Description: PROJ.4 library for cartographic projections
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..dd1285cea 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,18 +15,26 @@ 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..4158820 100644
--- a/cmake/install.cmake
+++ b/cmake/install.cmake
-@@ -1,9 +1,12 @@
+@@ -1,14 +1,17 @@
include(GNUInstallDirs)
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf.pc.cmake
+set(LIBRARIES_TO_SET_DEST libprotobuf-lite libprotobuf)
+if(protobuf_BUILD_COMPILER)
+ list(APPEND LIBRARIES_TO_SET_DEST libprotoc)
+endif()
+
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libprotobuf.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc @ONLY)
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf-lite.pc.cmake
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libprotobuf-lite.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc @ONLY)
+
foreach(_library
- libprotobuf-lite
- libprotobuf
@@ -36,7 +43,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 +54,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..9fe4bbb32 100644
--- a/ports/protobuf/CONTROL
+++ b/ports/protobuf/CONTROL
@@ -1,4 +1,4 @@
Source: protobuf
-Version: 3.3.0-3
+Version: 3.4.0-2
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..804780ab4 100644
--- a/ports/protobuf/portfile.cmake
+++ b/ports/protobuf/portfile.cmake
@@ -1,16 +1,16 @@
include(vcpkg_common_functions)
-set(PROTOBUF_VERSION 3.3.0)
+set(PROTOBUF_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 ce9bd9bc818c4a8e8b08c83e8a4eba6fca008a64a5ad9d322b19683b1de2b5fa622ed99093323f3c9d0820ef23430f7ee07f6930f7f877d334e5d36df9b0be0e
)
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
+ SHA512 b874c3f47b39ac78f5675e05220318683004a365c248bf47ba50d8c66c8ed7763432451bab30524e131e1185a2bdaa6e6071b389eb61ad58b1b95974cf39d41b
)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION})
@@ -18,13 +18,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"
)
@@ -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/CMakeLists.txt b/ports/pthreads/CMakeLists.txt
new file mode 100644
index 000000000..7ae6bcc34
--- /dev/null
+++ b/ports/pthreads/CMakeLists.txt
@@ -0,0 +1,213 @@
+cmake_minimum_required(VERSION 3.9.0)
+
+project(pthreads)
+
+set(PTHREAD_PUBLIC_HEADERS pthread.h sched.h semaphore.h)
+
+set(PTHREAD_SHARED_SOURCES
+ autostatic.c
+ barrier.c
+ cancel.c
+ cleanup.c
+ condvar.c
+ create.c
+ dll.c
+ errno.c
+ exit.c
+ fork.c
+ global.c
+ misc.c
+ mutex.c
+ nonportable.c
+ private.c
+ rwlock.c
+ sched.c
+ semaphore.c
+ signal.c
+ spin.c
+ sync.c
+ tsd.c
+ attr.C
+)
+set(PTHREAD_STATIC_SOURCES
+ autostatic.c
+ cleanup.c
+ create.c
+ dll.c
+ errno.c
+ fork.c
+ global.c
+ pthread_attr_destroy.c
+ pthread_attr_getdetachstate.c
+ pthread_attr_getinheritsched.c
+ pthread_attr_getschedparam.c
+ pthread_attr_getschedpolicy.c
+ pthread_attr_getscope.c
+ pthread_attr_getstackaddr.c
+ pthread_attr_getstacksize.c
+ pthread_attr_init.c
+ pthread_attr_setdetachstate.c
+ pthread_attr_setinheritsched.c
+ pthread_attr_setschedparam.c
+ pthread_attr_setschedpolicy.c
+ pthread_attr_setscope.c
+ pthread_attr_setstackaddr.c
+ pthread_attr_setstacksize.c
+ pthread_barrier_destroy.c
+ pthread_barrier_init.c
+ pthread_barrier_wait.c
+ pthread_barrierattr_destroy.c
+ pthread_barrierattr_getpshared.c
+ pthread_barrierattr_init.c
+ pthread_barrierattr_setpshared.c
+ pthread_cancel.c
+ pthread_cond_destroy.c
+ pthread_cond_init.c
+ pthread_cond_signal.c
+ pthread_cond_wait.c
+ pthread_condattr_destroy.c
+ pthread_condattr_getpshared.c
+ pthread_condattr_init.c
+ pthread_condattr_setpshared.c
+ pthread_delay_np.c
+ pthread_detach.c
+ pthread_equal.c
+ pthread_exit.c
+ pthread_getconcurrency.c
+ pthread_getschedparam.c
+ pthread_getspecific.c
+ pthread_getunique_np.c
+ pthread_getw32threadhandle_np.c
+ pthread_join.c
+ pthread_key_create.c
+ pthread_key_delete.c
+ pthread_kill.c
+ pthread_mutex_consistent.c
+ pthread_mutex_destroy.c
+ pthread_mutex_init.c
+ pthread_mutex_lock.c
+ pthread_mutex_timedlock.c
+ pthread_mutex_trylock.c
+ pthread_mutex_unlock.c
+ pthread_mutexattr_destroy.c
+ pthread_mutexattr_getkind_np.c
+ pthread_mutexattr_getpshared.c
+ pthread_mutexattr_getrobust.c
+ pthread_mutexattr_gettype.c
+ pthread_mutexattr_init.c
+ pthread_mutexattr_setkind_np.c
+ pthread_mutexattr_setpshared.c
+ pthread_mutexattr_setrobust.c
+ pthread_mutexattr_settype.c
+ pthread_num_processors_np.c
+ pthread_once.c
+ pthread_rwlock_destroy.c
+ pthread_rwlock_init.c
+ pthread_rwlock_rdlock.c
+ pthread_rwlock_tryrdlock.c
+ pthread_rwlock_trywrlock.c
+ pthread_rwlock_unlock.c
+ pthread_rwlock_wrlock.c
+ pthread_rwlockattr_destroy.c
+ pthread_rwlockattr_getpshared.c
+ pthread_rwlockattr_init.c
+ pthread_rwlockattr_setpshared.c
+ pthread_self.c
+ pthread_setcancelstate.c
+ pthread_setcanceltype.c
+ pthread_setconcurrency.c
+ pthread_setschedparam.c
+ pthread_setspecific.c
+ pthread_spin_destroy.c
+ pthread_spin_init.c
+ pthread_spin_lock.c
+ pthread_spin_trylock.c
+ pthread_spin_unlock.c
+ pthread_testcancel.c
+ pthread_timechange_handler_np.c
+ pthread_win32_attach_detach_np.c
+ ptw32_calloc.c
+ ptw32_callUserDestroyRoutines.c
+ ptw32_cond_check_need_init.c
+ ptw32_getprocessors.c
+ ptw32_is_attr.c
+ ptw32_MCS_lock.c
+ ptw32_mutex_check_need_init.c
+ ptw32_new.c
+ ptw32_processInitialize.c
+ ptw32_processTerminate.c
+ ptw32_relmillisecs.c
+ ptw32_reuse.c
+ ptw32_rwlock_check_need_init.c
+ ptw32_semwait.c
+ ptw32_spinlock_check_need_init.c
+ ptw32_threadDestroy.c
+ ptw32_threadStart.c
+ ptw32_throw.c
+ ptw32_timespec.c
+ ptw32_tkAssocCreate.c
+ ptw32_tkAssocDestroy.c
+ sched_get_priority_max.c
+ sched_get_priority_min.c
+ sched_getscheduler.c
+ sched_setscheduler.c
+ sched_yield.c
+ sem_close.c
+ sem_destroy.c
+ sem_getvalue.c
+ sem_init.c
+ sem_open.c
+ sem_post_multiple.c
+ sem_post.c
+ sem_timedwait.c
+ sem_trywait.c
+ sem_unlink.c
+ sem_wait.c
+ signal.c
+ w32_CancelableWait.c
+)
+
+
+
+option(PTW32_ARCH "x32")
+add_definitions(-DPTW32_ARCH=${PTW32_ARCH} -DPTW32_RC_MSC -DHAVE_PTW32_CONFIG_H -D_TIMESPEC_DEFINED)
+
+if(BUILD_SHARED_LIBS)
+ set(PTHREAD_SOURCES ${PTHREAD_SHARED_SOURCES})
+ add_definitions(-DPTW32_BUILD)
+else()
+ set(PTHREAD_SOURCES ${PTHREAD_STATIC_SOURCES})
+ add_definitions(-DPTW32_STATIC_LIB)
+endif()
+
+
+if(PTHREADS_BUILD_CPP)
+ set(PTHREADS_EXCEPTION_SCHEME CE)
+ add_definitions(/__CLEANUP_CXX)
+elseif(PTHREADS_BUILD_SEH)
+ set(PTHREADS_EXCEPTION_SCHEME SE)
+ add_definitions(/__CLEANUP_SEH)
+else()
+ set(PTHREADS_EXCEPTION_SCHEME C)
+endif()
+
+set(PTHREADS_COMPATIBILITY_VERSION 2)
+set(CMAKE_DEBUG_POSTFIX d)
+set(PTHREADS_COMPILER V)
+
+set(PTHREADS_LIBRARY "pthreads${PTHREADS_COMPILER}${PTHREADS_EXCEPTION_SCHEME}${PTHREADS_COMPATIBILITY_VERSION}")
+
+include_directories(.)
+
+add_library(${PTHREADS_LIBRARY} ${PTHREAD_SOURCES})
+
+install(
+ TARGETS ${PTHREADS_LIBRARY}
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES ${PTHREAD_PUBLIC_HEADERS} DESTINATION include)
+endif()
diff --git a/ports/pthreads/CONTROL b/ports/pthreads/CONTROL
new file mode 100644
index 000000000..ee9b7b5fa
--- /dev/null
+++ b/ports/pthreads/CONTROL
@@ -0,0 +1,3 @@
+Source: pthreads
+Version: 2.9.1-1
+Description: pthreads for windows
diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake
new file mode 100644
index 000000000..cabf8a39b
--- /dev/null
+++ b/ports/pthreads/portfile.cmake
@@ -0,0 +1,34 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pthreads-w32-2-9-1-release)
+vcpkg_download_distfile(ARCHIVE
+ URLS "ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.tar.gz"
+ FILENAME "pthreads-w32-2-9-1-release.tar.gz"
+ SHA512 9c06e85310766834370c3dceb83faafd397da18a32411ca7645c8eb6b9495fea54ca2872f4a3e8d83cb5fdc5dea7f3f0464be5bb9af3222a6534574a184bd551
+)
+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 -DPTW32_ARCH=${VCPKG_TARGET_ARCHITECTURE}
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+
+vcpkg_copy_pdbs()
+
+file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/*.h")
+foreach(HEADER ${HEADERS})
+ file(READ "${HEADER}" _contents)
+ string(REPLACE "defined(_TIMESPEC_DEFINED)" "1" _contents "${_contents}")
+ string(REPLACE "defined(PTW32_RC_MSC)" "1" _contents "${_contents}")
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ string(REPLACE "!defined(PTW32_STATIC_LIB)" "0" _contents "${_contents}")
+ endif()
+ file(WRITE "${HEADER}" "${_contents}")
+endforeach()
+
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads RENAME copyright)
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/rhash/CMakeLists.txt b/ports/rhash/CMakeLists.txt
new file mode 100644
index 000000000..b395b5c9a
--- /dev/null
+++ b/ports/rhash/CMakeLists.txt
@@ -0,0 +1,15 @@
+cmake_minimum_required(VERSION 3.5)
+project(rhash C)
+
+file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/Makefile RHASH_SOURCES REGEX "^SOURCES = .*$")
+string(REPLACE "SOURCES = " "" RHASH_SOURCES "${RHASH_SOURCES}")
+string(REPLACE " " ";" RHASH_SOURCES "${RHASH_SOURCES}")
+
+add_library(rhash ${RHASH_SOURCES})
+set_target_properties(rhash PROPERTIES COMPILE_DEFINITIONS "IN_RHASH" DEFINE_SYMBOL "RHASH_EXPORTS")
+
+install(TARGETS rhash RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
+
+if(NOT RHASH_SKIP_HEADERS)
+ install(FILES rhash.h rhash_torrent.h DESTINATION include)
+endif()
diff --git a/ports/rhash/CONTROL b/ports/rhash/CONTROL
new file mode 100644
index 000000000..16b50c945
--- /dev/null
+++ b/ports/rhash/CONTROL
@@ -0,0 +1,3 @@
+Source: rhash
+Version: 1.3.5-1
+Description: C library for computing a wide variety of hash sums
diff --git a/ports/rhash/portfile.cmake b/ports/rhash/portfile.cmake
new file mode 100644
index 000000000..749501375
--- /dev/null
+++ b/ports/rhash/portfile.cmake
@@ -0,0 +1,25 @@
+if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ message(FATAL_ERROR "UWP builds not supported")
+endif()
+
+include(vcpkg_common_functions)
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO rhash/RHash
+ REF v1.3.5
+ SHA512 e8450aab0c16bfb975bf4aeee218740fb4d86d5514e426b70c3edb84e4d63865cd4051939aa95c24a87a78baaedc49e40bb509b2610e89ca3745930808b3ef6c
+ HEAD_REF master)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/librhash)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}/librhash
+ PREFER_NINJA
+ OPTIONS_DEBUG
+ -DRHASH_SKIP_HEADERS=ON)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/rhash)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/rhash/COPYING ${CURRENT_PACKAGES_DIR}/share/rhash/copyright)
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..54d72ec3c 100644
--- a/ports/sciter/CONTROL
+++ b/ports/sciter/CONTROL
@@ -1,4 +1,4 @@
Source: sciter
-Version: 4.0.2-1
+Version: 4.0.3
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..063b318e3 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.3)
+set(SCITER_REVISION 1209528289b8c8369352d648f4ba0c67826cbd8b)
+set(SCITER_SHA 9fc72dd44b22c69715b4b08c5af7a65e0bb48d849191002b2ae45ca6f5ea058fb8c64cc7f6c176215afce682af6166a1579efd8cc2ca0fb9e844ceba1160f10f)
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..ba795b93f 100644
--- a/ports/sdl2/CONTROL
+++ b/ports/sdl2/CONTROL
@@ -1,3 +1,3 @@
Source: sdl2
-Version: 2.0.5-3
+Version: 2.0.5-4
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/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..748e811f0 100644
--- a/ports/sfml/CONTROL
+++ b/ports/sfml/CONTROL
@@ -1,4 +1,4 @@
Source: sfml
-Version: 2.4.2
+Version: 2.4.2-1
Description: Simple and fast multimedia library
Build-Depends: freetype, libflac, libjpeg-turbo, libogg, libvorbis, openal-soft, stb
diff --git a/ports/shaderc/CMakeLists.txt b/ports/shaderc/CMakeLists.txt
index 3dc7be973..f4e0830c6 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/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/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/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 984b00882..230383955 100644
--- a/ports/snappy/CONTROL
+++ b/ports/snappy/CONTROL
@@ -1,3 +1,3 @@
Source: snappy
-Version: 1.1.6-be6dc3d
+Version: 1.1.7-1
Description: A fast compressor/decompressor.
diff --git a/ports/snappy/portfile.cmake b/ports/snappy/portfile.cmake
index 7e78a7f1b..f0169c8f2 100644
--- a/ports/snappy/portfile.cmake
+++ b/ports/snappy/portfile.cmake
@@ -3,8 +3,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/snappy
- REF be6dc3db83c4701e3e79694dcbfd1c3da03b91dd
- SHA512 1e01a925a2c0bab8b9a329d005384e4b620df118317fd8408ea6afdb22278a2710d26b8d51e2ef762798c757a9e01b47db55280ebb84ca290fb88ae5b18d63e3
+ REF 1.1.7
+ SHA512 32046f532606ba545a4e4825c0c66a19be449f2ca2ff760a6fa170a3603731479a7deadb683546e5f8b5033414c50f4a9a29f6d23b7a41f047e566e69eca7caf
HEAD_REF master
)
@@ -16,18 +16,6 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Snappy)
-
-if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
- foreach(CONF debug release)
- file(READ ${CURRENT_PACKAGES_DIR}/share/snappy/SnappyTargets-${CONF}.cmake CONFIG_FILE)
- string(REPLACE "lib/snappy.dll" "bin/snappy.dll" CONFIG_FILE "${CONFIG_FILE}")
- file(WRITE ${CURRENT_PACKAGES_DIR}/share/snappy/SnappyTargets-${CONF}.cmake "${CONFIG_FILE}")
- endforeach()
- file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
- file(RENAME ${CURRENT_PACKAGES_DIR}/lib/snappy.dll ${CURRENT_PACKAGES_DIR}/bin/snappy.dll)
- file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/snappy.dll ${CURRENT_PACKAGES_DIR}/debug/bin/snappy.dll)
-endif()
-
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
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
new file mode 100644
index 000000000..f6433e410
--- /dev/null
+++ b/ports/sophus/CONTROL
@@ -0,0 +1,4 @@
+Source: sophus
+Version: 1.0.0-1
+Build-Depends: eigen3, ceres
+Description: Lie group library for C++
diff --git a/ports/sophus/portfile.cmake b/ports/sophus/portfile.cmake
new file mode 100644
index 000000000..9a45e62b8
--- /dev/null
+++ b/ports/sophus/portfile.cmake
@@ -0,0 +1,27 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO strasdat/Sophus
+ REF v1.0.0
+ SHA512 569634a8be9237d2240cf30c01e2677ece75d55f1196030f1228baca62fa22460e8ceb2a63bd46afdf7f02d8eb79c59d6ed666228b852da78590de897b278fab
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Sophus")
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
+
+# Put the license file where vcpkg expects it
+file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/Sophus/)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/Sophus/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/Sophus/copyright)
diff --git a/ports/spdlog/CONTROL b/ports/spdlog/CONTROL
index 540e4eb5e..ac0b51be7 100644
--- a/ports/spdlog/CONTROL
+++ b/ports/spdlog/CONTROL
@@ -1,4 +1,4 @@
Source: spdlog
-Version: 0.13.0
+Version: 0.14.0-1
Description: Very fast, header only, C++ logging library
Build-Depends: fmt
diff --git a/ports/spdlog/portfile.cmake b/ports/spdlog/portfile.cmake
index c0adbf457..8cd05f343 100644
--- a/ports/spdlog/portfile.cmake
+++ b/ports/spdlog/portfile.cmake
@@ -3,8 +3,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO gabime/spdlog
- REF v0.13.0
- SHA512 5bb89cbeb17a054832ce70f6013d54e7641c1aa36cbad08388b4a2e63f4851943edfe292551ff01de6de1ed6325617384325a67f3e1024f346c6d22a1148c80c
+ REF v0.14.0
+ SHA512 f49b7f26f4fde57fe16f32ab89082f0c590645c627f5b4646f633a16f3eec2926b3465e742bc4899cb802e7b974978c547638205065e9955ed9696fbcaf0b444
HEAD_REF master
)
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/CMakeLists.txt b/ports/speexdsp/CMakeLists.txt
new file mode 100644
index 000000000..76a3a9118
--- /dev/null
+++ b/ports/speexdsp/CMakeLists.txt
@@ -0,0 +1,31 @@
+# CMAKE project for libspeexdsp
+cmake_minimum_required(VERSION 3.1)
+option(SOURCE_PATH "Root directory.")
+project (libspeexdsp)
+
+file(GLOB_RECURSE LIBSPEEXDSP_SOURCES "${SOURCE_PATH}/libspeexdsp/*.c")
+list(REMOVE_ITEM LIBSPEEXDSP_SOURCES "${SOURCE_PATH}/libspeexdsp/testdenoise.c"
+ "${SOURCE_PATH}/libspeexdsp/testecho.c"
+ "${SOURCE_PATH}/libspeexdsp/testjitter.c"
+ "${SOURCE_PATH}/libspeexdsp/testresample.c")
+file(GLOB_RECURSE LIBSPEEXDSP_HEADERS "${SOURCE_PATH}/libspeexdsp/*.h")
+file(GLOB_RECURSE LIBSPEEXDSP_HEADERS_PUBLIC "${SOURCE_PATH}/include/**/*.h")
+
+if (BUILD_SHARED_LIBS)
+ add_definitions(-D_WINDOWS -D_USRDLL)
+ list(APPEND LIBSPEEXDSP_SOURCES "${SOURCE_PATH}/win32/libspeexdsp.def")
+else ()
+ add_definitions(-D_LIB)
+endif ()
+
+add_definitions(-D_USE_SSE -DHAVE_CONFIG_H -D_WIN32)
+include_directories("${SOURCE_PATH}/include"
+ "${SOURCE_PATH}/win32")
+add_library(libspeexdsp ${LIBSPEEXDSP_SOURCES} ${LIBSPEEXDSP_HEADERS})
+
+set_target_properties(libspeexdsp PROPERTIES PUBLIC_HEADER "${LIBSPEEXDSP_HEADERS_PUBLIC}")
+
+install(TARGETS libspeexdsp
+ ARCHIVE DESTINATION "lib"
+ RUNTIME DESTINATION "bin"
+ PUBLIC_HEADER DESTINATION "include/speex")
diff --git a/ports/speexdsp/CONTROL b/ports/speexdsp/CONTROL
new file mode 100644
index 000000000..d7e8bac98
--- /dev/null
+++ b/ports/speexdsp/CONTROL
@@ -0,0 +1,4 @@
+Source: speexdsp
+Version: 1.2rc3-2
+Description: A patent-free, Open Source/Free Software DSP library.
+Build-Depends:
diff --git a/ports/speexdsp/portfile.cmake b/ports/speexdsp/portfile.cmake
new file mode 100644
index 000000000..7784b7313
--- /dev/null
+++ b/ports/speexdsp/portfile.cmake
@@ -0,0 +1,24 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/speexdsp-1.2rc3)
+set(CMAKE_PATH ${CMAKE_CURRENT_LIST_DIR})
+vcpkg_download_distfile(ARCHIVE_FILE
+ URLS "http://downloads.xiph.org/releases/speex/speexdsp-1.2rc3.tar.gz"
+ FILENAME "speexdsp-1.2rc3.tar.xz"
+ SHA512 29dfa8345df025eeb076561648a9b5c0485692be699b6da3c2a3734b4329187a1c2eb181252f4df12b21f1309ecdf59797437dfb123d160fd723491ab216e858
+)
+vcpkg_extract_source_archive(${ARCHIVE_FILE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${CMAKE_PATH}
+ OPTIONS -DSOURCE_PATH=${SOURCE_PATH}
+)
+
+vcpkg_install_cmake()
+
+# Remove debug include
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Copy copright information
+file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/speexdsp" RENAME "copyright")
+
+vcpkg_copy_pdbs()
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/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/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 28452b794..0222fa809 100644
--- a/ports/tiff/CONTROL
+++ b/ports/tiff/CONTROL
@@ -1,4 +1,4 @@
Source: tiff
-Version: 4.0.8
-Build-Depends: zlib, libjpeg-turbo, liblzma [windows]
+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/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/unrar/CONTROL b/ports/unrar/CONTROL
new file mode 100644
index 000000000..ce6d4dab8
--- /dev/null
+++ b/ports/unrar/CONTROL
@@ -0,0 +1,3 @@
+Source: unrar
+Version: 5.5.8
+Description: rarlab's unrar libary
diff --git a/ports/unrar/portfile.cmake b/ports/unrar/portfile.cmake
new file mode 100644
index 000000000..294fe9ac2
--- /dev/null
+++ b/ports/unrar/portfile.cmake
@@ -0,0 +1,38 @@
+include(vcpkg_common_functions)
+set(UNRAR_VERSION "5.5.8")
+set(UNRAR_SHA512 9eac83707fa47a03925e5f3e8adf47889064d748304b732d12a2d379ab525b441f1aa33216377d4ef445f45c4e8ad73d2cd0b560601ceac344c60571b77fd6aa)
+set(UNRAR_FILENAME unrarsrc-${UNRAR_VERSION}.tar.gz)
+set(UNRAR_URL http://www.rarlab.com/rar/${UNRAR_FILENAME})
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/unrar)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ message(FATAL_ERROR "A static build is included with the dynamic build. Try VCPKG INSTALL UNRAR:X86-WINDOWS UNRAR:X64-WINDOWS")
+endif()
+
+#SRC
+vcpkg_download_distfile(ARCHIVE
+ URLS ${UNRAR_URL}
+ FILENAME ${UNRAR_FILENAME}
+ SHA512 ${UNRAR_SHA512}
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_build_msbuild(
+ PROJECT_PATH "${SOURCE_PATH}/UnRARDll.vcxproj"
+ OPTIONS_DEBUG /p:OutDir=../../${TARGET_TRIPLET}-dbg/
+ OPTIONS_RELEASE /p:OutDir=../../${TARGET_TRIPLET}-rel/
+ OPTIONS /VERBOSITY:Diagnostic /DETAILEDSUMMARY
+)
+
+#INCLUDE (named dll.hpp in source, and unrar.h in all rarlabs distributions)
+file(INSTALL ${SOURCE_PATH}/dll.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME unrar.h)
+
+#DLL & LIB
+file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/unrar.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
+file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/unrar.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/unrar.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
+file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/unrar.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+vcpkg_copy_pdbs()
+
+#COPYRIGHT
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/unrar RENAME copyright)
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..fdf8d42c4 100644
--- a/ports/vtk/CONTROL
+++ b/ports/vtk/CONTROL
@@ -1,4 +1,4 @@
Source: vtk
-Version: 8.0.0-1
+Version: 8.0.0-2
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
diff --git a/ports/winpcap/CONTROL b/ports/winpcap/CONTROL
new file mode 100644
index 000000000..7483c1f24
--- /dev/null
+++ b/ports/winpcap/CONTROL
@@ -0,0 +1,3 @@
+Source: winpcap
+Version: 4.1.3
+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..69effd8fe
--- /dev/null
+++ b/ports/winpcap/portfile.cmake
@@ -0,0 +1,185 @@
+# 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/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/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/xerces-c/portfile.cmake b/ports/xerces-c/portfile.cmake
index 1208c9787..5623e9518 100644
--- a/ports/xerces-c/portfile.cmake
+++ b/ports/xerces-c/portfile.cmake
@@ -16,15 +16,13 @@ if (VCPKG_CRT_LINKAGE STREQUAL "static")
set(VCPKG_CRT_LINKAGE "dynamic")
endif()
-
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xerces-c-3.1.4)
-
-vcpkg_download_distfile(ARCHIVE
- URLS "http://www-us.apache.org/dist//xerces/c/3/sources/xerces-c-3.1.4.zip"
- FILENAME "xerces-c-3.1.4.zip"
- SHA512 3ba1bf38875bda8a294990dba73143cfd6dbfa158b17f4db1fd0ee9a08a078af969103200eaf8957756f8363c8a661983cc95124b4978eb2162dc0344a85fff8
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO apache/xerces-c
+ REF Xerces-C_3_1_4
+ SHA512 6dc3e4bb68bc32a0e8ec6dcc7ec67e21239a79c909d08ccc16c96dc5de4e73800993d1c09f589606925507baf0b2a9bf6037d28c84dae826935bf1f7a151071e
+ HEAD_REF master
)
-vcpkg_extract_source_archive(${ARCHIVE})
if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86")
set(BUILD_ARCH "Win32")
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..68c7f1a13 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-1
+Description: A compression library
diff --git a/ports/zstd/CONTROL b/ports/zstd/CONTROL
index 52713f2b8..c6c5cc8e3 100644
--- a/ports/zstd/CONTROL
+++ b/ports/zstd/CONTROL
@@ -1,3 +1,3 @@
Source: zstd
-Version: 1.3.0
+Version: 1.3.1-1
Description: Zstandard - Fast real-time compression algorithm http://www.zstd.net
diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake
index ba60826e0..1f93cac74 100644
--- a/ports/zstd/portfile.cmake
+++ b/ports/zstd/portfile.cmake
@@ -2,8 +2,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebook/zstd
- REF v1.3.0
- SHA512 5eb9e001e14d3342e76eb57b672c636fd56839ba8fc0ba9a751484ea93389c72c494ad2125dc2f9be1f72481f3af34568477123f7e9d3c7504e061e4c083cb30
+ REF v1.3.1
+ SHA512 cc2ace7b2dd19a2bbf4c43a89d64a7ce121309f712bfb4940ccfd6f9353f1466612ef7096adcd852f54eaea8663d884acf681c83ae5b274b24c9b85f21367b7c
HEAD_REF dev)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
@@ -14,6 +14,11 @@ else()
set(ZSTD_SHARED 1)
endif()
+# Enable multithreaded mode. CMake build doesn't provide a multithreaded
+# library target, but it is the default in Makefile and VS projects.
+set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} /DZSTD_MULTITHREAD")
+set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS}")
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/build/cmake
PREFER_NINJA
@@ -38,4 +43,5 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
endif()
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/zstd)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/zstd/LICENSE ${CURRENT_PACKAGES_DIR}/share/zstd/copyright)
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/zstd)
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/zstd/copyright "ZSTD is dual licensed - see LICENSE and COPYING files\n")
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/bootstrap.ps1 b/scripts/bootstrap.ps1
index b7bc5afab..b874afd8c 100644
--- a/scripts/bootstrap.ps1
+++ b/scripts/bootstrap.ps1
@@ -6,22 +6,37 @@ param(
$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition
$vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root
+Write-Verbose("vcpkg Path " + $vcpkgRootDir)
+
$gitHash = "unknownhash"
-if (Get-Command "git" -ErrorAction SilentlyContinue)
+$oldpath = $env:path
+try
+{
+ $env:path += ";$vcpkgRootDir\downloads\MinGit-2.14.1-32-bit\cmd"
+ if (Get-Command "git" -ErrorAction SilentlyContinue)
+ {
+ $gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short
+ if ($LASTEXITCODE -ne 0)
+ {
+ $gitHash = "unknownhash"
+ }
+ }
+}
+finally
{
- $gitHash = git rev-parse HEAD
+ $env:path = $oldpath
}
-Write-Verbose("Git hash is " + $gitHash)
+Write-Verbose("Git repo version string is " + $gitHash)
$vcpkgSourcesPath = "$vcpkgRootDir\toolsrc"
-Write-Verbose("vcpkg Path " + $vcpkgSourcesPath)
if (!(Test-Path $vcpkgSourcesPath))
{
New-Item -ItemType directory -Path $vcpkgSourcesPath -force | Out-Null
}
-try{
+try
+{
pushd $vcpkgSourcesPath
$msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1
$msbuildExe = $msbuildExeWithPlatformToolset[0]
@@ -34,6 +49,7 @@ try{
Copy-Item $vcpkgSourcesPath\Release\vcpkg.exe $vcpkgRootDir\vcpkg.exe | Out-Null
Copy-Item $vcpkgSourcesPath\Release\vcpkgmetricsuploader.exe $vcpkgRootDir\scripts\vcpkgmetricsuploader.exe | Out-Null
}
-finally{
+finally
+{
popd
}
diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets
index 5c24d755a..1cb338237 100644
--- a/scripts/buildsystems/msbuild/vcpkg.targets
+++ b/scripts/buildsystems/msbuild/vcpkg.targets
@@ -41,10 +41,10 @@
<ItemDefinitionGroup Condition="'$(VcpkgEnabled)' == 'true'">
<Link>
- <AdditionalDependencies Condition="'$(VcpkgConfiguration)' == 'Debug' and '$(VcpkgAutoLink)' != 'false'">%(AdditionalDependencies);$(VcpkgRoot)debug\lib\*.lib</AdditionalDependencies>
- <AdditionalDependencies Condition="'$(VcpkgConfiguration)' == 'Release' and '$(VcpkgAutoLink)' != 'false'">%(AdditionalDependencies);$(VcpkgRoot)lib\*.lib</AdditionalDependencies>
- <AdditionalLibraryDirectories Condition="'$(VcpkgConfiguration)' == 'Release'">%(AdditionalLibraryDirectories);$(VcpkgRoot)lib;$(VcpkgRoot)lib\manual-link</AdditionalLibraryDirectories>
- <AdditionalLibraryDirectories Condition="'$(VcpkgConfiguration)' == 'Debug'">%(AdditionalLibraryDirectories);$(VcpkgRoot)debug\lib;$(VcpkgRoot)debug\lib\manual-link</AdditionalLibraryDirectories>
+ <AdditionalDependencies Condition="$(VcpkgConfiguration.StartsWith('Debug')) and '$(VcpkgAutoLink)' != 'false'">%(AdditionalDependencies);$(VcpkgRoot)debug\lib\*.lib</AdditionalDependencies>
+ <AdditionalDependencies Condition="$(VcpkgConfiguration.StartsWith('Release')) and '$(VcpkgAutoLink)' != 'false'">%(AdditionalDependencies);$(VcpkgRoot)lib\*.lib</AdditionalDependencies>
+ <AdditionalLibraryDirectories Condition="$(VcpkgConfiguration.StartsWith('Release'))">%(AdditionalLibraryDirectories);$(VcpkgRoot)lib;$(VcpkgRoot)lib\manual-link</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories Condition="$(VcpkgConfiguration.StartsWith('Debug'))">%(AdditionalLibraryDirectories);$(VcpkgRoot)debug\lib;$(VcpkgRoot)debug\lib\manual-link</AdditionalLibraryDirectories>
</Link>
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(VcpkgRoot)include</AdditionalIncludeDirectories>
@@ -63,11 +63,11 @@
<WriteLinesToFile
File="$(TLogLocation)$(ProjectName).write.1u.tlog"
Lines="^$(TargetPath);$([System.IO.Path]::Combine($(ProjectDir),$(IntDir)))vcpkg.applocal.log" Encoding="Unicode"/>
- <Exec Condition="'$(VcpkgConfiguration)' == 'Debug'"
+ <Exec Condition="$(VcpkgConfiguration.StartsWith('Debug'))"
Command="powershell.exe -ExecutionPolicy Bypass -noprofile -File %22$(MSBuildThisFileDirectory)applocal.ps1%22 %22$(TargetPath)%22 %22$(VcpkgRoot)debug\bin%22 %22$(TLogLocation)$(ProjectName).write.1u.tlog%22 %22$(IntDir)vcpkg.applocal.log%22"
StandardOutputImportance="Normal">
</Exec>
- <Exec Condition="'$(VcpkgConfiguration)' == 'Release'"
+ <Exec Condition="$(VcpkgConfiguration.StartsWith('Release'))"
Command="powershell.exe -ExecutionPolicy Bypass -noprofile -File %22$(MSBuildThisFileDirectory)applocal.ps1%22 %22$(TargetPath)%22 %22$(VcpkgRoot)bin%22 %22$(TLogLocation)$(ProjectName).write.1u.tlog%22 %22$(IntDir)vcpkg.applocal.log%22"
StandardOutputImportance="Normal">
</Exec>
diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake
index 87c34c274..830022906 100644
--- a/scripts/cmake/vcpkg_acquire_msys.cmake
+++ b/scripts/cmake/vcpkg_acquire_msys.cmake
@@ -58,13 +58,13 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
set(URL "https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20161025.tar.xz/download")
set(ARCHIVE "msys2-base-x86_64-20161025.tar.xz")
set(HASH 6c4c18ec59db80b8269698d074866438a624f1ce735ee5005a01b148b02e8f2e966ae381aa1cb4c50f6226c3b7feb271e36907cf26580df084d695b3c9f5c0eb)
- set(STAMP "initialized-msys2.stamp")
+ set(STAMP "initialized-msys2_64.stamp")
else()
set(TOOLSUBPATH msys32)
set(URL "https://sourceforge.net/projects/msys2/files/Base/i686/msys2-base-i686-20161025.tar.xz/download")
set(ARCHIVE "msys2-base-i686-20161025.tar.xz")
set(HASH c9260a38e0c6bf963adeaea098c4e376449c1dd0afe07480741d6583a1ac4c138951ccb0c5388bd148e04255a5c1a23bf5ee2d58dcd6607c14f1eaa5639a7c85)
- set(STAMP "initialized-msys2_x64.stamp")
+ set(STAMP "initialized-msys2_32.stamp")
endif()
set(PATH_TO_ROOT ${TOOLPATH}/${TOOLSUBPATH})
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..fecea8f1c 100644
--- a/scripts/cmake/vcpkg_configure_cmake.cmake
+++ b/scripts/cmake/vcpkg_configure_cmake.cmake
@@ -141,22 +141,22 @@ function(vcpkg_configure_cmake)
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}"
+ "-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 /Zi ${VCPKG_CXX_FLAGS_RELEASE}"
- "-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi ${VCPKG_C_FLAGS_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(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}"
+ "-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 /Zi ${VCPKG_CXX_FLAGS_RELEASE}"
- "-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Zi ${VCPKG_C_FLAGS_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}"
)
endif()
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_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake
index fef62da53..e718fc7da 100644
--- a/scripts/cmake/vcpkg_find_acquire_program.cmake
+++ b/scripts/cmake/vcpkg_find_acquire_program.cmake
@@ -67,9 +67,9 @@ function(vcpkg_find_acquire_program VAR)
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(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")
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/fetchDependency.ps1 b/scripts/fetchDependency.ps1
index d142f57fe..4aca0c811 100644
--- a/scripts/fetchDependency.ps1
+++ b/scripts/fetchDependency.ps1
@@ -1,14 +1,8 @@
[CmdletBinding()]
param(
- [string]$Dependency,
- [ValidateNotNullOrEmpty()]
- [string]$downloadPromptOverride = "0"
+ [string]$Dependency
)
-$downloadPromptOverride_NO_OVERRIDE= 0
-$downloadPromptOverride_DO_NOT_PROMPT = 1
-$downloadPromptOverride_ALWAYS_PROMPT = 2
-
if ($PSVersionTable.PSEdition -ne "Core") {
Import-Module BitsTransfer -Verbose:$false
}
@@ -22,38 +16,6 @@ $downloadsDir = "$vcpkgRootDir\downloads"
function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
{
- function promptForDownload([string]$title, [string]$message, [string]$yesDescription, [string]$noDescription, [string]$downloadPromptOverride)
- {
- $do_not_prompt = ($downloadPromptOverride -eq $downloadPromptOverride_DO_NOT_PROMPT) -Or
- (Test-Path "$downloadsDir\AlwaysAllowEverything") -Or
- (Test-Path "$downloadsDir\AlwaysAllowDownloads")
-
- if (($downloadPromptOverride -ne $downloadPromptOverride_ALWAYS_PROMPT) -And $do_not_prompt)
- {
- return $true
- }
-
- $yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", $yesDescription
- $no = New-Object System.Management.Automation.Host.ChoiceDescription "&No", $noDescription
- $AlwaysAllowDownloads = New-Object System.Management.Automation.Host.ChoiceDescription "&Always Allow Downloads", ($yesDescription + "(Future download prompts will not be displayed)")
-
- $options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no, $AlwaysAllowDownloads)
- $result = $host.ui.PromptForChoice($title, $message, $options, 0)
-
- switch ($result)
- {
- 0 {return $true}
- 1 {return $false}
- 2 {
- New-Item "$downloadsDir\AlwaysAllowDownloads" -type file -force | Out-Null
- return $true
- }
- }
-
- throw "Unexpected result"
- }
-
-
function performDownload( [Parameter(Mandatory=$true)][string]$Dependency,
[Parameter(Mandatory=$true)][string]$url,
[Parameter(Mandatory=$true)][string]$downloadDir,
@@ -66,16 +28,8 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
return
}
- $title = "Download " + $Dependency
- $message = ("No suitable version of " + $Dependency + " was found (requires $requiredVersion or higher). Download portable version?")
- $yesDescription = "Downloads " + $Dependency + " v" + $downloadVersion +" app-locally."
- $noDescription = "Does not download " + $Dependency + "."
-
- $userAllowedDownload = promptForDownload $title $message $yesDescription $noDescription $downloadPromptOverride
- if (!$userAllowedDownload)
- {
- throw [System.IO.FileNotFoundException] ("Could not detect suitable version of " + $Dependency + " and download not allowed")
- }
+ # Can't print because vcpkg captures the output and expects only the path that is returned at the end of this script file
+ # Write-Host "A suitable version of $Dependency was not found (required v$requiredVersion). Downloading portable $Dependency v$downloadVersion..."
if (!(Test-Path $downloadDir))
{
@@ -151,12 +105,12 @@ 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.2"
+ $downloadVersion = "3.9.2"
+ $url = "https://cmake.org/files/v3.9/cmake-3.9.2-win32-x86.zip"
+ $downloadPath = "$downloadsDir\cmake-3.9.2-win32-x86.zip"
+ $expectedDownloadedFileHash = "9fe68d50f065666cb2861f53751390f15c6363c440e86a07677689378bb8329f"
+ $executableFromDownload = "$downloadsDir\cmake-3.9.2-win32-x86\bin\cmake.exe"
$extractionType = $ExtractionType_ZIP
$extractionFolder = $downloadsDir
}
@@ -202,7 +156,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
$hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA256")
$fileAsByteArray = [io.File]::ReadAllBytes($downloadPath)
$hashByteArray = $hashAlgorithm.ComputeHash($fileAsByteArray)
- $downloadedFileHash = -Join ($hashByteArray | ForEach {"{0:x2}" -f $_})
+ $downloadedFileHash = -Join ($hashByteArray | ForEach-Object {"{0:x2}" -f $_})
}
else
{
diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1
index 14bfc244b..ca807980c 100644
--- a/scripts/findVisualStudioInstallationInstances.ps1
+++ b/scripts/findVisualStudioInstallationInstances.ps1
@@ -8,7 +8,7 @@ $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root
$downloadsDir = "$vcpkgRootDir\downloads"
-$nugetexe = & $scriptsDir\fetchDependency.ps1 "nuget" 1
+$nugetexe = & $scriptsDir\fetchDependency.ps1 "nuget"
$nugetPackageDir = "$downloadsDir\nuget-packages"
$SetupAPIVersion = "1.8.24"
diff --git a/scripts/internalCI.ps1 b/scripts/internalCI.ps1
index 68c917f7a..67871acc1 100644
--- a/scripts/internalCI.ps1
+++ b/scripts/internalCI.ps1
@@ -1,7 +1,6 @@
$ErrorActionPreference = "Stop"
New-Item -type directory downloads -errorAction SilentlyContinue | Out-Null
-New-Item -type file downloads\AlwaysAllowDownloads -errorAction SilentlyContinue | Out-Null
./scripts/bootstrap.ps1
if (-not $?) { throw $? }
diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt
index 6320e715f..7e1c0e952 100644
--- a/toolsrc/VERSION.txt
+++ b/toolsrc/VERSION.txt
@@ -1 +1 @@
-"0.0.83" \ No newline at end of file
+"0.0.89" \ No newline at end of file
diff --git a/toolsrc/include/BinaryParagraph.h b/toolsrc/include/BinaryParagraph.h
index 1e12dd8a6..61e03343a 100644
--- a/toolsrc/include/BinaryParagraph.h
+++ b/toolsrc/include/BinaryParagraph.h
@@ -31,5 +31,11 @@ namespace vcpkg
std::vector<std::string> depends;
};
+ struct BinaryControlFile
+ {
+ BinaryParagraph core_paragraph;
+ std::vector<BinaryParagraph> features;
+ };
+
void serialize(const BinaryParagraph& pgh, std::string& out_str);
} \ No newline at end of file
diff --git a/toolsrc/include/PackageSpec.h b/toolsrc/include/PackageSpec.h
index 15b5e5b9b..c5ce767f9 100644
--- a/toolsrc/include/PackageSpec.h
+++ b/toolsrc/include/PackageSpec.h
@@ -1,14 +1,22 @@
#pragma once
+
#include "PackageSpecParseResult.h"
-#include "SourceParagraph.h"
#include "Triplet.h"
#include "vcpkg_expected.h"
namespace vcpkg
{
+ struct ParsedSpecifier
+ {
+ std::string name;
+ std::vector<std::string> features;
+ std::string triplet;
+
+ static ExpectedT<ParsedSpecifier, PackageSpecParseResult> from_string(const std::string& input);
+ };
+
struct PackageSpec
{
- static std::string to_string(const std::string& name, const Triplet& triplet);
static ExpectedT<PackageSpec, PackageSpecParseResult> from_name_and_triplet(const std::string& name,
const Triplet& triplet);
@@ -25,15 +33,45 @@ namespace vcpkg
Triplet m_triplet;
};
+ struct FeatureSpec
+ {
+ FeatureSpec(const PackageSpec& spec, const std::string& feature) : m_spec(spec), m_feature(feature) {}
+
+ const std::string& name() const { return m_spec.name(); }
+ const std::string& feature() const { return m_feature; }
+ const Triplet& triplet() const { return m_spec.triplet(); }
+
+ const PackageSpec& spec() const { return m_spec; }
+
+ std::string to_string() const;
+
+ static std::vector<FeatureSpec> from_strings_and_triplet(const std::vector<std::string>& depends,
+ const Triplet& t);
+
+ private:
+ PackageSpec m_spec;
+ std::string m_feature;
+ };
+
struct FullPackageSpec
{
PackageSpec package_spec;
std::vector<std::string> features;
+ static std::vector<FeatureSpec> to_feature_specs(const std::vector<FullPackageSpec>& specs);
+
static ExpectedT<FullPackageSpec, PackageSpecParseResult> from_string(const std::string& spec_as_string,
const Triplet& default_triplet);
};
+ struct Features
+ {
+ std::string name;
+ std::vector<std::string> features;
+
+ static ExpectedT<Features, PackageSpecParseResult> from_string(const std::string& input);
+ };
+
bool operator==(const PackageSpec& left, const PackageSpec& right);
bool operator!=(const PackageSpec& left, const PackageSpec& right);
}
diff --git a/toolsrc/include/Paragraphs.h b/toolsrc/include/Paragraphs.h
index 60f509266..aae46f7da 100644
--- a/toolsrc/include/Paragraphs.h
+++ b/toolsrc/include/Paragraphs.h
@@ -20,7 +20,7 @@ namespace vcpkg::Paragraphs
Parse::ParseExpected<SourceControlFile> try_load_port(const Files::Filesystem& fs, const fs::path& control_path);
- Expected<BinaryParagraph> try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec);
+ Expected<BinaryControlFile> try_load_cached_control_package(const VcpkgPaths& paths, const PackageSpec& spec);
struct LoadResults
{
diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h
index 7ddf999cc..1357b3769 100644
--- a/toolsrc/include/SourceParagraph.h
+++ b/toolsrc/include/SourceParagraph.h
@@ -1,27 +1,32 @@
#pragma once
+#include "PackageSpec.h"
#include "Span.h"
#include "vcpkg_Parse.h"
#include "vcpkg_System.h"
#include "vcpkg_expected.h"
#include <string>
-#include <unordered_map>
#include <vector>
namespace vcpkg
{
- extern bool g_feature_packages;
-
- struct Triplet;
-
struct Dependency
{
- std::string name;
+ Features depend;
std::string qualifier;
+
+ std::string name() const;
+ static Dependency parse_dependency(std::string name, std::string qualifier);
};
- const std::string& to_string(const Dependency& dep);
+ std::vector<std::string> filter_dependencies(const std::vector<Dependency>& deps, const Triplet& t);
+ std::vector<FeatureSpec> filter_dependencies_to_specs(const std::vector<Dependency>& deps, const Triplet& t);
+
+ // zlib[uwp] becomes Dependency{"zlib", "uwp"}
+ std::vector<Dependency> expand_qualified_dependencies(const std::vector<std::string>& depends);
+
+ std::string to_string(const Dependency& dep);
struct FeatureParagraph
{
@@ -58,12 +63,6 @@ namespace vcpkg
return print_error_message({&error_info_list, 1});
}
- std::vector<std::string> filter_dependencies(const std::vector<Dependency>& deps, const Triplet& t);
-
- // zlib[uwp] becomes Dependency{"zlib", "uwp"}
- std::vector<Dependency> expand_qualified_dependencies(const std::vector<std::string>& depends);
- std::vector<std::string> parse_comma_list(const std::string& str);
-
struct Supports
{
static ExpectedT<Supports, std::vector<std::string>> parse(const std::vector<std::string>& strs);
diff --git a/toolsrc/include/StatusParagraphs.h b/toolsrc/include/StatusParagraphs.h
index 2af177219..1a9ee6a03 100644
--- a/toolsrc/include/StatusParagraphs.h
+++ b/toolsrc/include/StatusParagraphs.h
@@ -17,6 +17,8 @@ namespace vcpkg
const_iterator find(const PackageSpec& spec) const { return find(spec.name(), spec.triplet()); }
const_iterator find(const std::string& name, const Triplet& triplet) const;
iterator find(const std::string& name, const Triplet& triplet);
+ std::vector<std::unique_ptr<StatusParagraph>*> find_all(const std::string& name, const Triplet& triplet);
+ iterator find(const std::string& name, const Triplet& triplet, const std::string& feature);
const_iterator find_installed(const PackageSpec& spec) const
{
diff --git a/toolsrc/include/VcpkgPaths.h b/toolsrc/include/VcpkgPaths.h
index 95cd4bc28..d55c95fe1 100644
--- a/toolsrc/include/VcpkgPaths.h
+++ b/toolsrc/include/VcpkgPaths.h
@@ -8,11 +8,19 @@
namespace vcpkg
{
+ struct ToolsetArchOption
+ {
+ CWStringView name;
+ System::CPUArchitecture host_arch;
+ System::CPUArchitecture target_arch;
+ };
+
struct Toolset
{
fs::path dumpbin;
fs::path vcvarsall;
CWStringView version;
+ std::vector<ToolsetArchOption> supported_architectures;
};
struct VcpkgPaths
@@ -21,6 +29,7 @@ namespace vcpkg
fs::path package_dir(const PackageSpec& spec) const;
fs::path port_dir(const PackageSpec& spec) const;
+ fs::path port_dir(const std::string& name) const;
fs::path build_info_file_path(const PackageSpec& spec) const;
fs::path listfile_path(const BinaryParagraph& pgh) const;
diff --git a/toolsrc/include/coff_file_reader.h b/toolsrc/include/coff_file_reader.h
index 09f6447c2..7287211a1 100644
--- a/toolsrc/include/coff_file_reader.h
+++ b/toolsrc/include/coff_file_reader.h
@@ -3,7 +3,7 @@
#include "filesystem_fs.h"
#include <vector>
-namespace vcpkg::COFFFileReader
+namespace vcpkg::CoffFileReader
{
struct DllInfo
{
diff --git a/toolsrc/include/metrics.h b/toolsrc/include/metrics.h
index 1f5ae2f32..8eae426de 100644
--- a/toolsrc/include/metrics.h
+++ b/toolsrc/include/metrics.h
@@ -2,19 +2,27 @@
#include <string>
+#include "vcpkg_Util.h"
+
namespace vcpkg::Metrics
{
- void set_send_metrics(bool should_send_metrics);
- void set_print_metrics(bool should_print_metrics);
- void set_user_information(const std::string& user_id, const std::string& first_use_time);
- void init_user_information(std::string& user_id, std::string& first_use_time);
+ struct Metrics : Util::ResourceBase
+ {
+ void set_send_metrics(bool should_send_metrics);
+ void set_print_metrics(bool should_print_metrics);
+ void set_user_information(const std::string& user_id, const std::string& first_use_time);
+ void init_user_information(std::string& user_id, std::string& first_use_time);
- 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);
- bool get_compiled_metrics_enabled();
- std::wstring get_SQM_user();
+ 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();
+ };
- void upload(const std::string& payload);
- void flush();
+ extern Util::LockGuarded<Metrics> g_metrics;
+
+ std::wstring get_SQM_user();
+ bool get_compiled_metrics_enabled();
}
diff --git a/toolsrc/include/pch.h b/toolsrc/include/pch.h
index 406d0741e..770bcf07a 100644
--- a/toolsrc/include/pch.h
+++ b/toolsrc/include/pch.h
@@ -7,6 +7,7 @@
#include <algorithm>
#include <array>
+#include <atomic>
#include <cassert>
#include <cctype>
#include <chrono>
@@ -22,6 +23,7 @@
#include <iterator>
#include <map>
#include <memory>
+#include <mutex>
#include <process.h>
#include <regex>
#include <set>
diff --git a/toolsrc/include/triplet.h b/toolsrc/include/triplet.h
index be3bcf5b3..46a52f8e6 100644
--- a/toolsrc/include/triplet.h
+++ b/toolsrc/include/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) {}
diff --git a/toolsrc/include/vcpkg_Build.h b/toolsrc/include/vcpkg_Build.h
index c4f3e6746..78e89d4de 100644
--- a/toolsrc/include/vcpkg_Build.h
+++ b/toolsrc/include/vcpkg_Build.h
@@ -9,7 +9,6 @@
#include <array>
#include <map>
-#include <unordered_map>
#include <vector>
namespace vcpkg::Build
@@ -52,13 +51,15 @@ namespace vcpkg::Build
SUCCEEDED,
BUILD_FAILED,
POST_BUILD_CHECKS_FAILED,
+ FILE_CONFLICTS,
CASCADED_DUE_TO_MISSING_DEPENDENCIES
};
- static constexpr std::array<BuildResult, 4> BuildResult_values = {
+ static constexpr std::array<BuildResult, 5> BUILD_RESULT_VALUES = {
BuildResult::SUCCEEDED,
BuildResult::BUILD_FAILED,
BuildResult::POST_BUILD_CHECKS_FAILED,
+ BuildResult::FILE_CONFLICTS,
BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES};
const std::string& to_string(const BuildResult build_result);
@@ -141,7 +142,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,
@@ -157,9 +158,9 @@ 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
{
- auto it = m_policies.find(policy);
+ const auto it = m_policies.find(policy);
if (it != m_policies.cend()) return it->second;
return false;
}
diff --git a/toolsrc/include/vcpkg_Checks.h b/toolsrc/include/vcpkg_Checks.h
index 6d8ff5711..ce486ac19 100644
--- a/toolsrc/include/vcpkg_Checks.h
+++ b/toolsrc/include/vcpkg_Checks.h
@@ -5,41 +5,50 @@
namespace vcpkg::Checks
{
+ void register_console_ctrl_handler();
+
+ // Indicate that an internal error has occurred and exit the tool. This should be used when invariants have been
+ // broken.
[[noreturn]] void unreachable(const LineInfo& line_info);
[[noreturn]] void exit_with_code(const LineInfo& line_info, const int exit_code);
+ // Exit the tool without an error message.
[[noreturn]] inline void exit_fail(const LineInfo& line_info) { exit_with_code(line_info, EXIT_FAILURE); }
+ // Exit the tool successfully.
[[noreturn]] inline void exit_success(const LineInfo& line_info) { exit_with_code(line_info, EXIT_SUCCESS); }
- // Part of the reason these exist is to not include extra headers in this one to avoid circular #includes.
- [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView errorMessage);
+ // Display an error message to the user and exit the tool.
+ [[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_Commands.h b/toolsrc/include/vcpkg_Commands.h
index 8348a64e4..590f0208c 100644
--- a/toolsrc/include/vcpkg_Commands.h
+++ b/toolsrc/include/vcpkg_Commands.h
@@ -33,6 +33,22 @@ namespace vcpkg::Commands
namespace 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,
@@ -55,12 +71,26 @@ namespace vcpkg::Commands
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);
- void install_package(const VcpkgPaths& paths,
- const BinaryParagraph& binary_paragraph,
- StatusParagraphs* status_db);
+ InstallResult install_package(const VcpkgPaths& paths,
+ const BinaryControlFile& binary_paragraph,
+ StatusParagraphs* status_db);
+
+ void perform_and_exit(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);
+
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
}
@@ -76,6 +106,19 @@ namespace vcpkg::Commands
namespace 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);
+
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);
}
@@ -167,6 +210,7 @@ namespace vcpkg::Commands
namespace Version
{
const std::string& version();
+ void warn_if_vcpkg_version_mismatch(const VcpkgPaths& paths);
void perform_and_exit(const VcpkgCmdArguments& args);
}
diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h
index e3af0fd28..d67122e48 100644
--- a/toolsrc/include/vcpkg_Dependencies.h
+++ b/toolsrc/include/vcpkg_Dependencies.h
@@ -3,6 +3,7 @@
#include "StatusParagraphs.h"
#include "VcpkgPaths.h"
#include "vcpkg_Graphs.h"
+#include "vcpkg_Util.h"
#include "vcpkg_optional.h"
#include <vector>
@@ -22,7 +23,7 @@ namespace vcpkg::Dependencies
std::vector<PackageSpec> dependencies(const Triplet& triplet) const;
Optional<StatusParagraph> status_paragraph;
- Optional<BinaryParagraph> binary_paragraph;
+ Optional<BinaryControlFile> binary_control_file;
Optional<SourceParagraph> source_paragraph;
Optional<const SourceControlFile*> source_control_file;
};
@@ -30,44 +31,6 @@ namespace vcpkg::Dependencies
namespace vcpkg::Dependencies
{
- struct FeatureSpec
- {
- PackageSpec spec;
- std::string feature_name;
- };
-
- struct FeatureNodeEdges
- {
- std::vector<FeatureSpec> remove_edges;
- std::vector<FeatureSpec> build_edges;
- bool plus = false;
- };
- std::vector<FeatureSpec> to_feature_specs(const std::vector<std::string>& depends, const Triplet& t);
-
- struct Cluster
- {
- std::vector<StatusParagraph> status_paragraphs;
- Optional<const SourceControlFile*> source_control_file;
- PackageSpec spec;
- std::unordered_map<std::string, FeatureNodeEdges> edges;
- std::unordered_set<std::string> to_install_features;
- std::unordered_set<std::string> original_features;
- bool will_remove = false;
- bool transient_uninstalled = true;
- Cluster() = default;
-
- private:
- Cluster(const Cluster&) = delete;
- Cluster& operator=(const Cluster&) = delete;
- };
-
- struct ClusterPtr
- {
- Cluster* ptr;
- };
-
- bool operator==(const ClusterPtr& l, const ClusterPtr& r);
-
enum class InstallPlanType
{
UNKNOWN,
@@ -76,20 +39,22 @@ namespace vcpkg::Dependencies
ALREADY_INSTALLED
};
- struct InstallPlanAction
+ struct InstallPlanAction : Util::MoveOnlyBase
{
static bool compare_by_name(const InstallPlanAction* left, const InstallPlanAction* right);
InstallPlanAction();
+
+ InstallPlanAction(const PackageSpec& spec,
+ const std::unordered_set<std::string>& features,
+ const RequestType& request_type);
InstallPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type);
InstallPlanAction(const PackageSpec& spec,
const SourceControlFile& any_paragraph,
const std::unordered_set<std::string>& features,
const RequestType& request_type);
- InstallPlanAction(const InstallPlanAction&) = delete;
- InstallPlanAction(InstallPlanAction&&) = default;
- InstallPlanAction& operator=(const InstallPlanAction&) = delete;
- InstallPlanAction& operator=(InstallPlanAction&&) = default;
+
+ std::string displayname() const;
PackageSpec spec;
AnyParagraph any_paragraph;
@@ -105,16 +70,12 @@ namespace vcpkg::Dependencies
REMOVE
};
- struct RemovePlanAction
+ struct RemovePlanAction : Util::MoveOnlyBase
{
static bool compare_by_name(const RemovePlanAction* left, const RemovePlanAction* right);
RemovePlanAction();
RemovePlanAction(const PackageSpec& spec, const RemovePlanType& plan_type, const RequestType& request_type);
- RemovePlanAction(const RemovePlanAction&) = delete;
- RemovePlanAction(RemovePlanAction&&) = default;
- RemovePlanAction& operator=(const RemovePlanAction&) = delete;
- RemovePlanAction& operator=(RemovePlanAction&&) = default;
PackageSpec spec;
RemovePlanType plan_type;
@@ -123,8 +84,13 @@ namespace vcpkg::Dependencies
struct AnyAction
{
+ AnyAction(InstallPlanAction&& iplan) : install_plan(std::move(iplan)) {}
+ AnyAction(RemovePlanAction&& rplan) : remove_plan(std::move(rplan)) {}
+
Optional<InstallPlanAction> install_plan;
Optional<RemovePlanAction> remove_plan;
+
+ const PackageSpec& spec() const;
};
enum class ExportPlanType
@@ -134,16 +100,12 @@ namespace vcpkg::Dependencies
ALREADY_BUILT
};
- struct ExportPlanAction
+ struct ExportPlanAction : Util::MoveOnlyBase
{
static bool compare_by_name(const ExportPlanAction* left, const ExportPlanAction* right);
ExportPlanAction();
ExportPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type);
- ExportPlanAction(const ExportPlanAction&) = delete;
- ExportPlanAction(ExportPlanAction&&) = default;
- ExportPlanAction& operator=(const ExportPlanAction&) = delete;
- ExportPlanAction& operator=(ExportPlanAction&&) = default;
PackageSpec spec;
AnyParagraph any_paragraph;
@@ -151,25 +113,21 @@ namespace vcpkg::Dependencies
RequestType request_type;
};
- __interface PortFileProvider { virtual const SourceControlFile& get_control_file(const PackageSpec& spec) const; };
+ __interface PortFileProvider { virtual const SourceControlFile& get_control_file(const std::string& spec) const; };
- struct MapPortFile : PortFileProvider
+ struct MapPortFile : Util::ResourceBase, PortFileProvider
{
- const std::unordered_map<PackageSpec, SourceControlFile>& ports;
- explicit MapPortFile(const std::unordered_map<PackageSpec, SourceControlFile>& map);
- const SourceControlFile& get_control_file(const PackageSpec& spec) const override;
+ const std::unordered_map<std::string, SourceControlFile>& ports;
+ explicit MapPortFile(const std::unordered_map<std::string, SourceControlFile>& map);
+ const SourceControlFile& get_control_file(const std::string& spec) const override;
};
- struct PathsPortFile : PortFileProvider
+ struct PathsPortFile : Util::ResourceBase, PortFileProvider
{
const VcpkgPaths& ports;
- mutable std::unordered_map<PackageSpec, SourceControlFile> cache;
+ mutable std::unordered_map<std::string, SourceControlFile> cache;
explicit PathsPortFile(const VcpkgPaths& paths);
- const SourceControlFile& get_control_file(const PackageSpec& spec) const override;
-
- private:
- PathsPortFile(const PathsPortFile&) = delete;
- PathsPortFile& operator=(const PathsPortFile&) = delete;
+ const SourceControlFile& get_control_file(const std::string& spec) const override;
};
std::vector<InstallPlanAction> create_install_plan(const PortFileProvider& port_file_provider,
@@ -182,31 +140,8 @@ namespace vcpkg::Dependencies
std::vector<ExportPlanAction> create_export_plan(const VcpkgPaths& paths,
const std::vector<PackageSpec>& specs,
const StatusParagraphs& status_db);
-}
-
-template<>
-struct std::hash<vcpkg::Dependencies::ClusterPtr>
-{
- size_t operator()(const vcpkg::Dependencies::ClusterPtr& value) const
- {
- return std::hash<vcpkg::PackageSpec>()(value.ptr->spec);
- }
-};
-namespace vcpkg::Dependencies
-{
- struct GraphPlan
- {
- Graphs::Graph<ClusterPtr> remove_graph;
- Graphs::Graph<ClusterPtr> install_graph;
- };
- bool mark_plus(const std::string& feature,
- Cluster& cluster,
- std::unordered_map<PackageSpec, Cluster>& pkg_to_cluster,
- GraphPlan& graph_plan);
- void mark_minus(Cluster& cluster, std::unordered_map<PackageSpec, Cluster>& pkg_to_cluster, GraphPlan& graph_plan);
-
- std::vector<AnyAction> create_feature_install_plan(const std::unordered_map<PackageSpec, SourceControlFile>& map,
- const std::vector<FullPackageSpec>& specs,
+ std::vector<AnyAction> create_feature_install_plan(const std::unordered_map<std::string, SourceControlFile>& map,
+ const std::vector<FeatureSpec>& specs,
const StatusParagraphs& status_db);
}
diff --git a/toolsrc/include/vcpkg_Files.h b/toolsrc/include/vcpkg_Files.h
index ad29ffa14..855e8ea45 100644
--- a/toolsrc/include/vcpkg_Files.h
+++ b/toolsrc/include/vcpkg_Files.h
@@ -38,4 +38,6 @@ namespace vcpkg::Files
bool has_invalid_chars_for_filesystem(const std::string& s);
void print_paths(const std::vector<fs::path>& paths);
+
+ std::vector<fs::path> find_from_PATH(const std::wstring& name);
}
diff --git a/toolsrc/include/vcpkg_GlobalState.h b/toolsrc/include/vcpkg_GlobalState.h
new file mode 100644
index 000000000..6522a25bf
--- /dev/null
+++ b/toolsrc/include/vcpkg_GlobalState.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include <atomic>
+
+#include "vcpkg_Chrono.h"
+#include "vcpkg_Util.h"
+
+namespace vcpkg
+{
+ struct GlobalState
+ {
+ static Util::LockGuarded<ElapsedTime> timer;
+ static std::atomic<bool> debugging;
+ static std::atomic<bool> feature_packages;
+
+ static std::atomic<int> g_init_console_cp;
+ static std::atomic<int> g_init_console_output_cp;
+ };
+} \ No newline at end of file
diff --git a/toolsrc/include/vcpkg_Parse.h b/toolsrc/include/vcpkg_Parse.h
index a2eb152dc..2dda033b3 100644
--- a/toolsrc/include/vcpkg_Parse.h
+++ b/toolsrc/include/vcpkg_Parse.h
@@ -26,11 +26,13 @@ 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:
RawParagraph&& fields;
std::vector<std::string> missing_fields;
};
+
+ std::vector<std::string> parse_comma_list(const std::string& str);
}
diff --git a/toolsrc/include/vcpkg_Strings.h b/toolsrc/include/vcpkg_Strings.h
index 325a2cb4c..61f6fab61 100644
--- a/toolsrc/include/vcpkg_Strings.h
+++ b/toolsrc/include/vcpkg_Strings.h
@@ -19,10 +19,12 @@ namespace vcpkg::Strings::details
inline long long to_printf_arg(const long long s) { return s; }
- inline double to_printf_arg(const double 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; }
+
std::string format_internal(const char* fmtstr, ...);
inline const wchar_t* to_wprintf_arg(const std::wstring& s) { return s.c_str(); }
@@ -34,6 +36,9 @@ namespace vcpkg::Strings::details
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)
{
@@ -63,20 +68,20 @@ namespace vcpkg::Strings
template<class Container, class Transformer, class CharType>
std::basic_string<CharType> join(const CharType* delimiter, const Container& v, Transformer transformer)
{
- if (v.size() == 0)
+ const auto begin = v.begin();
+ const auto end = v.end();
+
+ if (begin == end)
{
return std::basic_string<CharType>();
}
std::basic_string<CharType> output;
- size_t size = v.size();
-
- output.append(transformer(v[0]));
-
- for (size_t i = 1; i < size; ++i)
+ output.append(transformer(*begin));
+ for (auto it = std::next(begin); it != end; ++it)
{
output.append(delimiter);
- output.append(transformer(v[i]));
+ output.append(transformer(*it));
}
return output;
@@ -84,7 +89,7 @@ namespace vcpkg::Strings
template<class Container, class CharType>
std::basic_string<CharType> join(const CharType* delimiter, const Container& v)
{
- using Element = decltype(v[0]);
+ 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_System.h
index 2ea0241f6..65f80ae6d 100644
--- a/toolsrc/include/vcpkg_System.h
+++ b/toolsrc/include/vcpkg_System.h
@@ -23,7 +23,7 @@ namespace vcpkg::System
ExitCodeAndOutput cmd_execute_and_capture_output(const CWStringView cmd_line);
- std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args = L"");
+ std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args = Strings::WEMPTY);
enum class Color
{
@@ -32,6 +32,7 @@ namespace vcpkg::System
warning = 14,
};
+ void println();
void print(const CStringView message);
void println(const CStringView message);
void print(const Color c, const CStringView message);
@@ -77,9 +78,11 @@ namespace vcpkg::System
CPUArchitecture get_host_processor();
- const fs::path& get_ProgramFiles_32_bit();
+ std::vector<CPUArchitecture> get_supported_host_architectures();
- const fs::path& get_ProgramFiles_platform_bitness();
+ const fs::path& get_program_files_32_bit();
+
+ const fs::path& get_program_files_platform_bitness();
}
namespace vcpkg::Debug
diff --git a/toolsrc/include/vcpkg_Util.h b/toolsrc/include/vcpkg_Util.h
index 671997e7e..c76ca01ac 100644
--- a/toolsrc/include/vcpkg_Util.h
+++ b/toolsrc/include/vcpkg_Util.h
@@ -1,20 +1,19 @@
#pragma once
#include <map>
+#include <mutex>
#include <utility>
#include <vector>
namespace vcpkg::Util
{
template<class Cont, class Func>
- using FmapOut = decltype(std::declval<Func>()(std::declval<Cont>()[0]));
+ using FmapOut = decltype(std::declval<Func>()(*begin(std::declval<Cont>())));
template<class Cont, class Func, class Out = FmapOut<Cont, Func>>
- std::vector<Out> fmap(const Cont& xs, Func&& f)
+ std::vector<Out> fmap(Cont&& xs, Func&& f)
{
- using O = decltype(f(xs[0]));
-
- std::vector<O> ret;
+ std::vector<Out> ret;
ret.reserve(xs.size());
for (auto&& x : xs)
@@ -23,6 +22,21 @@ namespace vcpkg::Util
return ret;
}
+ template<class Cont, class Func>
+ using FmapFlattenOut = std::decay_t<decltype(*begin(std::declval<Func>()(*begin(std::declval<Cont>()))))>;
+
+ template<class Cont, class Func, class Out = FmapFlattenOut<Cont, Func>>
+ std::vector<Out> fmap_flatten(Cont&& xs, Func&& f)
+ {
+ std::vector<Out> ret;
+
+ for (auto&& x : xs)
+ for (auto&& y : f(x))
+ ret.push_back(std::move(y));
+
+ return ret;
+ }
+
template<class Container, class Pred>
void unstable_keep_if(Container& cont, Pred pred)
{
@@ -62,4 +76,54 @@ namespace vcpkg::Util
(*output)[key].push_back(&element);
}
}
+
+ struct MoveOnlyBase
+ {
+ MoveOnlyBase() = default;
+ MoveOnlyBase(const MoveOnlyBase&) = delete;
+ MoveOnlyBase(MoveOnlyBase&&) = default;
+
+ MoveOnlyBase& operator=(const MoveOnlyBase&) = delete;
+ MoveOnlyBase& operator=(MoveOnlyBase&&) = default;
+ };
+
+ struct ResourceBase
+ {
+ ResourceBase() = default;
+ ResourceBase(const ResourceBase&) = delete;
+ ResourceBase(ResourceBase&&) = delete;
+
+ ResourceBase& operator=(const ResourceBase&) = delete;
+ ResourceBase& operator=(ResourceBase&&) = delete;
+ };
+
+ template<class T>
+ struct LockGuardPtr;
+
+ template<class T>
+ struct LockGuarded
+ {
+ friend struct LockGuardPtr<T>;
+
+ LockGuardPtr<T> lock() { return *this; }
+
+ private:
+ std::mutex m_mutex;
+ T m_t;
+ };
+
+ template<class T>
+ struct LockGuardPtr
+ {
+ T& operator*() { return m_ptr; }
+ T* operator->() { return &m_ptr; }
+
+ T* get() { return &m_ptr; }
+
+ LockGuardPtr(LockGuarded<T>& sync) : m_lock(sync.m_mutex), m_ptr(sync.m_t) {}
+
+ private:
+ std::unique_lock<std::mutex> m_lock;
+ T& m_ptr;
+ };
} \ No newline at end of file
diff --git a/toolsrc/include/vcpkglib.h b/toolsrc/include/vcpkglib.h
index bd2400b77..0bb75f9b5 100644
--- a/toolsrc/include/vcpkglib.h
+++ b/toolsrc/include/vcpkglib.h
@@ -6,8 +6,6 @@
namespace vcpkg
{
- extern bool g_debugging;
-
StatusParagraphs database_load_check(const VcpkgPaths& paths);
void write_update(const VcpkgPaths& paths, const StatusParagraph& p);
@@ -36,5 +34,5 @@ namespace vcpkg
const fs::path& cmake_script,
const std::vector<CMakeVariable>& pass_variables);
- std::string shorten_description(const std::string& desc);
+ std::string shorten_text(const std::string& desc, size_t length);
} // namespace vcpkg
diff --git a/toolsrc/src/BinaryParagraph.cpp b/toolsrc/src/BinaryParagraph.cpp
index 49e9d58e5..1504912ab 100644
--- a/toolsrc/src/BinaryParagraph.cpp
+++ b/toolsrc/src/BinaryParagraph.cpp
@@ -56,7 +56,7 @@ namespace vcpkg
this->default_features = parse_comma_list(parser.optional_field(Fields::DEFAULTFEATURES));
}
- if (auto err = parser.error_info(this->spec.to_string()))
+ if (const auto err = parser.error_info(this->spec.to_string()))
{
System::println(
System::Color::error, "Error: while parsing the Binary Paragraph for %s", this->spec.to_string());
@@ -80,14 +80,18 @@ 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 = "";
+ this->version = Strings::EMPTY;
this->feature = fpgh.name;
this->description = fpgh.description;
- this->maintainer = "";
+ this->maintainer = Strings::EMPTY;
this->depends = filter_dependencies(fpgh.depends, triplet);
}
- std::string BinaryParagraph::displayname() const { return this->spec.to_string(); }
+ std::string BinaryParagraph::displayname() const
+ {
+ const auto f = this->feature.empty() ? "core" : this->feature;
+ return Strings::format("%s[%s]:%s", this->spec.name(), f, this->spec.triplet());
+ }
std::string BinaryParagraph::dir() const { return this->spec.dir(); }
diff --git a/toolsrc/src/MachineType.cpp b/toolsrc/src/MachineType.cpp
index 2f44ce21a..af6378c88 100644
--- a/toolsrc/src/MachineType.cpp
+++ b/toolsrc/src/MachineType.cpp
@@ -7,7 +7,7 @@ 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/PackageSpec.cpp b/toolsrc/src/PackageSpec.cpp
index a7e5648cd..890de8899 100644
--- a/toolsrc/src/PackageSpec.cpp
+++ b/toolsrc/src/PackageSpec.cpp
@@ -1,8 +1,11 @@
#include "pch.h"
#include "PackageSpec.h"
+#include "vcpkg_Parse.h"
#include "vcpkg_Util.h"
+using vcpkg::Parse::parse_comma_list;
+
namespace vcpkg
{
static bool is_valid_package_spec_char(char c)
@@ -10,55 +13,69 @@ namespace vcpkg
return (c == '-') || isdigit(c) || (isalpha(c) && islower(c)) || (c == '[') || (c == ']');
}
- ExpectedT<FullPackageSpec, PackageSpecParseResult> FullPackageSpec::from_string(const std::string& spec_as_string,
- const Triplet& default_triplet)
+ std::string FeatureSpec::to_string() const
{
- auto pos = spec_as_string.find(':');
- auto pos_l_bracket = spec_as_string.find('[');
- auto pos_r_bracket = spec_as_string.find(']');
+ if (feature().empty()) return spec().to_string();
+ return Strings::format("%s[%s]:%s", name(), feature(), triplet());
+ }
- FullPackageSpec f;
- if (pos == std::string::npos && pos_l_bracket == std::string::npos)
- {
- f.package_spec =
- PackageSpec::from_name_and_triplet(spec_as_string, default_triplet).value_or_exit(VCPKG_LINE_INFO);
- return f;
- }
- else if (pos == std::string::npos)
+ std::vector<FeatureSpec> FeatureSpec::from_strings_and_triplet(const std::vector<std::string>& depends,
+ const Triplet& triplet)
+ {
+ std::vector<FeatureSpec> f_specs;
+ for (auto&& depend : depends)
{
- if (pos_r_bracket == std::string::npos || pos_l_bracket >= pos_r_bracket)
+ auto maybe_spec = ParsedSpecifier::from_string(depend);
+ if (auto spec = maybe_spec.get())
{
- return PackageSpecParseResult::INVALID_CHARACTERS;
+ Checks::check_exit(VCPKG_LINE_INFO,
+ spec->triplet.empty(),
+ "error: triplets cannot currently be specified in this context: %s",
+ depend);
+ PackageSpec pspec =
+ PackageSpec::from_name_and_triplet(spec->name, triplet).value_or_exit(VCPKG_LINE_INFO);
+
+ for (auto&& feature : spec->features)
+ f_specs.push_back(FeatureSpec{pspec, feature});
+
+ if (spec->features.empty()) f_specs.push_back(FeatureSpec{pspec, Strings::EMPTY});
}
- const std::string name = spec_as_string.substr(0, pos_l_bracket);
- f.package_spec = PackageSpec::from_name_and_triplet(name, default_triplet).value_or_exit(VCPKG_LINE_INFO);
- f.features = parse_comma_list(spec_as_string.substr(pos_l_bracket + 1, pos_r_bracket - pos_l_bracket - 1));
- return f;
- }
- else if (pos_l_bracket == std::string::npos && pos_r_bracket == std::string::npos)
- {
- const std::string name = spec_as_string.substr(0, pos);
- const Triplet triplet = Triplet::from_canonical_name(spec_as_string.substr(pos + 1));
- f.package_spec = PackageSpec::from_name_and_triplet(name, triplet).value_or_exit(VCPKG_LINE_INFO);
- }
- else
- {
- if (pos_r_bracket == std::string::npos || pos_l_bracket >= pos_r_bracket)
+ else
{
- return PackageSpecParseResult::INVALID_CHARACTERS;
+ Checks::exit_with_message(VCPKG_LINE_INFO,
+ "error while parsing feature list: %s: %s",
+ vcpkg::to_string(maybe_spec.error()),
+ depend);
}
- const std::string name = spec_as_string.substr(0, pos_l_bracket);
- f.features = parse_comma_list(spec_as_string.substr(pos_l_bracket + 1, pos_r_bracket - pos_l_bracket - 1));
- const Triplet triplet = Triplet::from_canonical_name(spec_as_string.substr(pos + 1));
- f.package_spec = PackageSpec::from_name_and_triplet(name, triplet).value_or_exit(VCPKG_LINE_INFO);
}
+ return f_specs;
+ }
- auto pos2 = spec_as_string.find(':', pos + 1);
- if (pos2 != std::string::npos)
+ std::vector<FeatureSpec> FullPackageSpec::to_feature_specs(const std::vector<FullPackageSpec>& specs)
+ {
+ std::vector<FeatureSpec> ret;
+ for (auto&& spec : specs)
{
- return PackageSpecParseResult::TOO_MANY_COLONS;
+ ret.emplace_back(spec.package_spec, Strings::EMPTY);
+ for (auto&& feature : spec.features)
+ ret.emplace_back(spec.package_spec, feature);
}
- return f;
+ return ret;
+ }
+
+ ExpectedT<FullPackageSpec, PackageSpecParseResult> FullPackageSpec::from_string(const std::string& spec_as_string,
+ const Triplet& default_triplet)
+ {
+ auto res = ParsedSpecifier::from_string(spec_as_string);
+ if (auto p = res.get())
+ {
+ FullPackageSpec fspec;
+ Triplet t = p->triplet.empty() ? default_triplet : Triplet::from_canonical_name(p->triplet);
+ fspec.package_spec = PackageSpec::from_name_and_triplet(p->name, t).value_or_exit(VCPKG_LINE_INFO);
+ fspec.features = std::move(p->features);
+ return fspec;
+ }
+ return res.error();
}
ExpectedT<PackageSpec, PackageSpecParseResult> PackageSpec::from_name_and_triplet(const std::string& name,
@@ -81,11 +98,7 @@ namespace vcpkg
std::string PackageSpec::dir() const { return Strings::format("%s_%s", this->m_name, this->m_triplet); }
- std::string PackageSpec::to_string(const std::string& name, const Triplet& triplet)
- {
- return Strings::format("%s:%s", name, triplet);
- }
- std::string PackageSpec::to_string() const { return to_string(this->name(), this->triplet()); }
+ std::string PackageSpec::to_string() const { return Strings::format("%s:%s", this->name(), this->triplet()); }
bool operator==(const PackageSpec& left, const PackageSpec& right)
{
@@ -93,4 +106,70 @@ namespace vcpkg
}
bool operator!=(const PackageSpec& left, const PackageSpec& right) { return !(left == right); }
+
+ ExpectedT<ParsedSpecifier, PackageSpecParseResult> ParsedSpecifier::from_string(const std::string& input)
+ {
+ auto pos = input.find(':');
+ auto pos_l_bracket = input.find('[');
+ auto pos_r_bracket = input.find(']');
+
+ ParsedSpecifier f;
+ if (pos == std::string::npos && pos_l_bracket == std::string::npos)
+ {
+ f.name = input;
+ return f;
+ }
+ else if (pos == std::string::npos)
+ {
+ if (pos_r_bracket == std::string::npos || pos_l_bracket >= pos_r_bracket)
+ {
+ return PackageSpecParseResult::INVALID_CHARACTERS;
+ }
+ const std::string name = input.substr(0, pos_l_bracket);
+ f.name = name;
+ f.features = parse_comma_list(input.substr(pos_l_bracket + 1, pos_r_bracket - pos_l_bracket - 1));
+ return f;
+ }
+ else if (pos_l_bracket == std::string::npos && pos_r_bracket == std::string::npos)
+ {
+ const std::string name = input.substr(0, pos);
+ f.triplet = input.substr(pos + 1);
+ f.name = name;
+ }
+ else
+ {
+ if (pos_r_bracket == std::string::npos || pos_l_bracket >= pos_r_bracket)
+ {
+ return PackageSpecParseResult::INVALID_CHARACTERS;
+ }
+ const std::string name = input.substr(0, pos_l_bracket);
+ f.features = parse_comma_list(input.substr(pos_l_bracket + 1, pos_r_bracket - pos_l_bracket - 1));
+ f.triplet = input.substr(pos + 1);
+ f.name = name;
+ }
+
+ auto pos2 = input.find(':', pos + 1);
+ if (pos2 != std::string::npos)
+ {
+ return PackageSpecParseResult::TOO_MANY_COLONS;
+ }
+ return f;
+ }
+
+ ExpectedT<Features, PackageSpecParseResult> Features::from_string(const std::string& name)
+ {
+ auto maybe_spec = ParsedSpecifier::from_string(name);
+ if (auto spec = maybe_spec.get())
+ {
+ Checks::check_exit(
+ VCPKG_LINE_INFO, spec->triplet.empty(), "error: triplet not allowed in specifier: %s", name);
+
+ Features f;
+ f.name = spec->name;
+ f.features = spec->features;
+ return f;
+ }
+
+ return maybe_spec.error();
+ }
}
diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp
index 3749e919e..a7dee4fd3 100644
--- a/toolsrc/src/Paragraphs.cpp
+++ b/toolsrc/src/Paragraphs.cpp
@@ -3,6 +3,8 @@
#include "ParagraphParseResult.h"
#include "Paragraphs.h"
#include "vcpkg_Files.h"
+#include "vcpkg_GlobalState.h"
+#include "vcpkg_Util.h"
using namespace vcpkg::Parse;
@@ -209,7 +211,7 @@ namespace vcpkg::Paragraphs
if (auto vector_pghs = pghs.get())
{
auto csf = SourceControlFile::parse_control_file(std::move(*vector_pghs));
- if (!g_feature_packages)
+ if (!GlobalState::feature_packages)
{
if (auto ptr = csf.get())
{
@@ -226,14 +228,21 @@ namespace vcpkg::Paragraphs
return error_info;
}
- Expected<BinaryParagraph> try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec)
+ Expected<BinaryControlFile> try_load_cached_control_package(const VcpkgPaths& paths, const PackageSpec& spec)
{
- Expected<std::unordered_map<std::string, std::string>> pghs =
- get_single_paragraph(paths.get_filesystem(), paths.package_dir(spec) / "CONTROL");
+ Expected<std::vector<std::unordered_map<std::string, std::string>>> pghs =
+ get_paragraphs(paths.get_filesystem(), paths.package_dir(spec) / "CONTROL");
if (auto p = pghs.get())
{
- return BinaryParagraph(*p);
+ BinaryControlFile bcf;
+ bcf.core_paragraph = BinaryParagraph(p->front());
+ p->erase(p->begin());
+
+ bcf.features =
+ Util::fmap(*p, [&](auto&& raw_feature) -> BinaryParagraph { return BinaryParagraph(raw_feature); });
+
+ return bcf;
}
return pghs.error();
diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp
index a5d923ad2..1fd48d3ec 100644
--- a/toolsrc/src/PostBuildLint.cpp
+++ b/toolsrc/src/PostBuildLint.cpp
@@ -10,9 +10,9 @@
#include "vcpkg_System.h"
#include "vcpkg_Util.h"
-using vcpkg::Build::PreBuildInfo;
using vcpkg::Build::BuildInfo;
using vcpkg::Build::BuildPolicy;
+using vcpkg::Build::PreBuildInfo;
namespace vcpkg::PostBuildLint
{
@@ -40,7 +40,7 @@ namespace vcpkg::PostBuildLint
const std::vector<OutdatedDynamicCrt>& get_outdated_dynamic_crts()
{
- 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,
@@ -369,12 +369,12 @@ namespace vcpkg::PostBuildLint
std::vector<FileAndArch> binaries_with_invalid_architecture)
{
System::println(System::Color::warning, "The following files were built for an incorrect architecture:");
- System::println("");
+ System::println();
for (const FileAndArch& b : binaries_with_invalid_architecture)
{
System::println(" %s", b.file.generic_string());
System::println("Expected %s, but was: %s", expected_architecture, b.actual_arch);
- System::println("");
+ System::println();
}
}
@@ -389,7 +389,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 +418,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?
@@ -487,7 +487,7 @@ namespace vcpkg::PostBuildLint
System::println(System::Color::warning, "Release binaries were not found");
}
- System::println("");
+ System::println();
return LintStatus::ERROR_DETECTED;
}
@@ -580,7 +580,7 @@ namespace vcpkg::PostBuildLint
return LintStatus::SUCCESS;
}
- struct BuildType_and_file
+ struct BuildTypeAndFile
{
fs::path file;
BuildType build_type;
@@ -594,7 +594,7 @@ 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)
{
@@ -621,12 +621,12 @@ namespace vcpkg::PostBuildLint
System::println(System::Color::warning,
"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)
+ System::println();
+ for (const BuildTypeAndFile btf : libs_with_invalid_crt)
{
System::println(" %s: %s", btf.file.generic_string(), btf.build_type.to_string());
}
- System::println("");
+ System::println();
System::println(System::Color::warning,
"To inspect the lib files, use:\n dumpbin.exe /directives mylibfile.lib");
@@ -636,12 +636,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,7 +650,7 @@ 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)
{
@@ -675,12 +675,12 @@ namespace vcpkg::PostBuildLint
if (!dlls_with_outdated_crt.empty())
{
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)
+ System::println();
+ for (const OutdatedDynamicCrtAndFile btf : dlls_with_outdated_crt)
{
System::println(" %s: %s", btf.file.generic_string(), btf.outdated_crt.name);
}
- System::println("");
+ System::println();
System::println(System::Color::warning,
"To inspect the dll files, use:\n dumpbin.exe /dependents mydllfile.dll");
diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp
index a34167db7..171689ce7 100644
--- a/toolsrc/src/SourceParagraph.cpp
+++ b/toolsrc/src/SourceParagraph.cpp
@@ -1,5 +1,6 @@
#include "pch.h"
+#include "PackageSpec.h"
#include "SourceParagraph.h"
#include "Triplet.h"
#include "vcpkg_Checks.h"
@@ -12,7 +13,6 @@ namespace vcpkg
{
using namespace vcpkg::Parse;
- bool g_feature_packages = false;
namespace Fields
{
static const std::string BUILD_DEPENDS = "Build-Depends";
@@ -28,7 +28,11 @@ namespace vcpkg
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,
+ Fields::SOURCE,
+ Fields::VERSION,
+ Fields::DESCRIPTION,
+ Fields::MAINTAINER,
+ Fields::BUILD_DEPENDS,
};
return valid_fields;
@@ -133,7 +137,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();
@@ -143,7 +147,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();
@@ -152,57 +156,45 @@ namespace vcpkg
return std::move(control_file);
}
+ Dependency Dependency::parse_dependency(std::string name, std::string qualifier)
+ {
+ Dependency dep;
+ dep.qualifier = qualifier;
+ if (auto maybe_features = Features::from_string(name))
+ dep.depend = *maybe_features.get();
+ else
+ Checks::exit_with_message(
+ VCPKG_LINE_INFO, "error while parsing dependency: %s: %s", to_string(maybe_features.error()), name);
+ return dep;
+ }
+
+ std::string Dependency::name() const
+ {
+ if (this->depend.features.empty()) return this->depend.name;
+
+ 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)
{
return Util::fmap(depends, [&](const std::string& depend_string) -> Dependency {
auto pos = depend_string.find(' ');
- if (pos == std::string::npos) return {depend_string, ""};
+ if (pos == std::string::npos) return Dependency::parse_dependency(depend_string, Strings::EMPTY);
// expect of the form "\w+ \[\w+\]"
Dependency dep;
- dep.name = depend_string.substr(0, pos);
- if (depend_string.c_str()[pos + 1] != '[' || depend_string[depend_string.size() - 1] != ']')
+
+ dep.depend.name = depend_string.substr(0, pos);
+ if (depend_string.c_str()[pos + 1] != '(' || depend_string[depend_string.size() - 1] != ')')
{
// Error, but for now just slurp the entire string.
- return {depend_string, ""};
+ return Dependency::parse_dependency(depend_string, Strings::EMPTY);
}
dep.qualifier = depend_string.substr(pos + 2, depend_string.size() - pos - 3);
return dep;
});
}
- std::vector<std::string> parse_comma_list(const std::string& str)
- {
- if (str.empty())
- {
- return {};
- }
-
- std::vector<std::string> out;
-
- size_t cur = 0;
- do
- {
- auto pos = str.find(',', cur);
- if (pos == std::string::npos)
- {
- out.push_back(str.substr(cur));
- break;
- }
- out.push_back(str.substr(cur, pos - cur));
-
- // skip comma and space
- ++pos;
- if (str[pos] == ' ')
- {
- ++pos;
- }
-
- cur = pos;
- } while (cur != std::string::npos);
-
- return out;
- }
-
std::vector<std::string> filter_dependencies(const std::vector<vcpkg::Dependency>& deps, const Triplet& t)
{
std::vector<std::string> ret;
@@ -210,13 +202,18 @@ namespace vcpkg
{
if (dep.qualifier.empty() || t.canonical_name().find(dep.qualifier) != std::string::npos)
{
- ret.push_back(dep.name);
+ ret.emplace_back(dep.name());
}
}
return ret;
}
- const std::string& to_string(const Dependency& dep) { return dep.name; }
+ std::vector<FeatureSpec> filter_dependencies_to_specs(const std::vector<Dependency>& deps, const Triplet& t)
+ {
+ return FeatureSpec::from_strings_and_triplet(filter_dependencies(deps, t), t);
+ }
+
+ std::string to_string(const Dependency& dep) { return dep.name(); }
ExpectedT<Supports, std::vector<std::string>> Supports::parse(const std::vector<std::string>& strs)
{
@@ -255,7 +252,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/StatusParagraph.cpp
index 5b5c3978f..f8ae293c2 100644
--- a/toolsrc/src/StatusParagraph.cpp
+++ b/toolsrc/src/StatusParagraph.cpp
@@ -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/StatusParagraphs.cpp
index 27f3c30a2..aaba95eb9 100644
--- a/toolsrc/src/StatusParagraphs.cpp
+++ b/toolsrc/src/StatusParagraphs.cpp
@@ -27,6 +27,30 @@ namespace vcpkg
});
}
+ std::vector<std::unique_ptr<StatusParagraph>*> StatusParagraphs::find_all(const std::string& name,
+ const Triplet& triplet)
+ {
+ std::vector<std::unique_ptr<StatusParagraph>*> spghs;
+ for (auto&& p : *this)
+ {
+ if (p->package.spec.name() == name && p->package.spec.triplet() == triplet)
+ {
+ spghs.emplace_back(&p);
+ }
+ }
+ return spghs;
+ }
+
+ StatusParagraphs::iterator StatusParagraphs::find(const std::string& name,
+ const Triplet& triplet,
+ const std::string& feature)
+ {
+ return std::find_if(begin(), end(), [&](const std::unique_ptr<StatusParagraph>& pgh) {
+ const PackageSpec& spec = pgh->package.spec;
+ return spec.name() == name && spec.triplet() == triplet && pgh->package.feature == feature;
+ });
+ }
+
StatusParagraphs::const_iterator StatusParagraphs::find_installed(const std::string& name,
const Triplet& triplet) const
{
@@ -43,7 +67,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());
+ 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/VcpkgCmdArguments.cpp b/toolsrc/src/VcpkgCmdArguments.cpp
index ebf4c5fc5..cb261930e 100644
--- a/toolsrc/src/VcpkgCmdArguments.cpp
+++ b/toolsrc/src/VcpkgCmdArguments.cpp
@@ -3,6 +3,7 @@
#include "VcpkgCmdArguments.h"
#include "metrics.h"
#include "vcpkg_Commands.h"
+#include "vcpkg_GlobalState.h"
#include "vcpkg_System.h"
namespace vcpkg
@@ -15,7 +16,7 @@ namespace vcpkg
if (arg_begin == arg_end)
{
System::println(System::Color::error, "Error: expected value after %s", option_name);
- Metrics::track_property("error", "error option name");
+ Metrics::g_metrics.lock()->track_property("error", "error option name");
Commands::Help::print_usage();
Checks::exit_fail(VCPKG_LINE_INFO);
}
@@ -23,7 +24,7 @@ namespace vcpkg
if (option_field != nullptr)
{
System::println(System::Color::error, "Error: %s specified multiple times", option_name);
- Metrics::track_property("error", "error option specified multiple times");
+ Metrics::g_metrics.lock()->track_property("error", "error option specified multiple times");
Commands::Help::print_usage();
Checks::exit_fail(VCPKG_LINE_INFO);
}
@@ -36,7 +37,7 @@ namespace vcpkg
if (option_field && option_field != new_setting)
{
System::println(System::Color::error, "Error: conflicting values specified for --%s", option_name);
- Metrics::track_property("error", "error conflicting switches");
+ Metrics::g_metrics.lock()->track_property("error", "error conflicting switches");
Commands::Help::print_usage();
Checks::exit_fail(VCPKG_LINE_INFO);
}
@@ -70,7 +71,7 @@ namespace vcpkg
if (arg[0] == '-' && arg[1] != '-')
{
- Metrics::track_property("error", "error short options are not supported");
+ Metrics::g_metrics.lock()->track_property("error", "error short options are not supported");
Checks::exit_with_message(VCPKG_LINE_INFO, "Error: short options are not supported: %s", arg);
}
@@ -119,11 +120,11 @@ namespace vcpkg
}
if (arg == "--featurepackages")
{
- g_feature_packages = true;
+ GlobalState::feature_packages = true;
continue;
}
- auto eq_pos = arg.find('=');
+ const auto eq_pos = arg.find('=');
if (eq_pos != std::string::npos)
{
args.optional_command_arguments.emplace(arg.substr(0, eq_pos), arg.substr(eq_pos + 1));
@@ -157,7 +158,7 @@ namespace vcpkg
auto options_copy = this->optional_command_arguments;
for (const std::string& option : valid_switches)
{
- auto it = options_copy.find(option);
+ const auto it = options_copy.find(option);
if (it != options_copy.end())
{
if (it->second.has_value())
@@ -176,7 +177,7 @@ namespace vcpkg
for (const std::string& option : valid_settings)
{
- auto it = options_copy.find(option);
+ const auto it = options_copy.find(option);
if (it != options_copy.end())
{
if (!it->second.has_value())
@@ -221,17 +222,17 @@ namespace vcpkg
void VcpkgCmdArguments::check_max_arg_count(const size_t expected_arg_count) const
{
- return check_max_arg_count(expected_arg_count, "");
+ return check_max_arg_count(expected_arg_count, Strings::EMPTY);
}
void VcpkgCmdArguments::check_min_arg_count(const size_t expected_arg_count) const
{
- return check_min_arg_count(expected_arg_count, "");
+ return check_min_arg_count(expected_arg_count, Strings::EMPTY);
}
void VcpkgCmdArguments::check_exact_arg_count(const size_t expected_arg_count) const
{
- return check_exact_arg_count(expected_arg_count, "");
+ return check_exact_arg_count(expected_arg_count, Strings::EMPTY);
}
void VcpkgCmdArguments::check_max_arg_count(const size_t expected_arg_count, const std::string& example_text) const
diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp
index 60204bcdd..29edbb260 100644
--- a/toolsrc/src/VcpkgPaths.cpp
+++ b/toolsrc/src/VcpkgPaths.cpp
@@ -13,24 +13,24 @@ namespace vcpkg
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+))###");
+ static const std::regex RE(R"###((\d+)\.(\d+)\.(\d+))###");
- auto rc = System::cmd_execute_and_capture_output(Strings::wformat(LR"(%s)", version_cmd));
+ const 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);
+ const 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());
+ 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]))
{
@@ -58,26 +58,15 @@ namespace vcpkg
return nullopt;
}
- static std::vector<fs::path> find_from_PATH(const std::wstring& name)
- {
- const std::wstring cmd = Strings::wformat(L"where.exe %s", name);
- auto out = System::cmd_execute_and_capture_output(cmd);
- if (out.exit_code != 0)
- {
- return {};
- }
-
- return Util::fmap(Strings::split(out.output, "\n"), [](auto&& s) { return fs::path(s); });
- }
-
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);
+ const auto install_cmd =
+ System::create_powershell_script_cmd(script, Strings::wformat(L"-Dependency %s", tool_name));
+ const 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]);
@@ -87,14 +76,17 @@ namespace vcpkg
"(No sufficient installed version was found)",
Strings::to_utf8(tool_name),
version_as_string);
- Metrics::track_property("error", "powershell install failed");
- Metrics::track_property("installcmd", install_cmd);
+ {
+ 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;
- auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, 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",
@@ -105,71 +97,71 @@ namespace vcpkg
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";
+ static constexpr std::array<int, 3> EXPECTED_VERSION = {3, 9, 2};
+ 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 = find_from_PATH(L"cmake");
+ const fs::path downloaded_copy = downloads_folder / "cmake-3.9.2-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");
+ 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");
const Optional<fs::path> path =
- find_if_has_equal_or_greater_version(candidate_paths, version_check_arguments, expected_version);
- if (auto p = path.get())
+ 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, L"cmake", downloaded_copy, expected_version);
+ 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 = L"";
+ 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 = find_from_PATH(L"nuget");
+ 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())
+ auto 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, L"nuget", downloaded_copy, expected_version);
+ 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";
+ 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 = find_from_PATH(L"git");
+ 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");
+ 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");
const Optional<fs::path> path =
- find_if_has_equal_or_greater_version(candidate_paths, version_check_arguments, expected_version);
- if (auto p = path.get())
+ 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, L"git", downloaded_copy, expected_version);
+ return fetch_dependency(scripts_folder, L"git", downloaded_copy, EXPECTED_VERSION);
}
Expected<VcpkgPaths> VcpkgPaths::create(const fs::path& vcpkg_root_dir)
@@ -186,7 +178,7 @@ namespace vcpkg
if (paths.root.empty())
{
- Metrics::track_property("error", "Invalid vcpkg root directory");
+ 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());
}
@@ -214,6 +206,7 @@ namespace vcpkg
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
{
@@ -229,7 +222,7 @@ namespace vcpkg
{
for (auto&& path : get_filesystem().get_files_non_recursive(this->triplets))
{
- std::string triplet_file_name = path.stem().generic_u8string();
+ const 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
@@ -254,19 +247,19 @@ namespace vcpkg
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)
+ 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);
+ 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 VS 2017 instances");
return Strings::split(ec_data.output, "\n");
}
- static Optional<fs::path> get_VS2015_installation_instance()
+ 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())
+ if (const 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
@@ -278,17 +271,19 @@ namespace vcpkg
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);
+ 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 Optional<fs::path> vs_2015_installation_instance = get_vs2015_installation_instance();
+ if (const auto v = vs_2015_installation_instance.get())
{
const fs::path vs2015_vcvarsall_bat = *v / "VC" / "vcvarsall.bat";
@@ -297,24 +292,57 @@ namespace vcpkg
{
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"});
+ 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)
+ for (const std::string& instance : vs2017_installation_instances)
{
- const fs::path vc_dir = instance / "VC";
+ const fs::path vc_dir = fs::path{instance} / "VC";
// Skip any instances that do not have vcvarsall.
- const fs::path vcvarsall_bat = vc_dir / "Auxiliary" / "Build" / "vcvarsall.bat";
+ 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);
@@ -331,11 +359,11 @@ namespace vcpkg
paths_examined.push_back(dumpbin_path);
if (fs.exists(dumpbin_path))
{
- vs2017_toolset = Toolset{dumpbin_path, vcvarsall_bat, L"v141"};
+ vs2017_toolset = Toolset{dumpbin_path, vcvarsall_bat, L"v141", supported_architectures};
break;
}
}
- if (auto value = vs2017_toolset.get())
+ if (const auto value = vs2017_toolset.get())
{
found_toolsets.push_back(*value);
break;
@@ -365,15 +393,12 @@ namespace vcpkg
{
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;
- }
+
+ const auto toolset = Util::find_if(
+ vs_toolsets, [&](const Toolset& t) { return toolset_version == Strings::to_utf8(t.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/coff_file_reader.cpp b/toolsrc/src/coff_file_reader.cpp
index 6c38c452b..bb3a6cefd 100644
--- a/toolsrc/src/coff_file_reader.cpp
+++ b/toolsrc/src/coff_file_reader.cpp
@@ -5,7 +5,7 @@
using namespace std;
-namespace vcpkg::COFFFileReader
+namespace vcpkg::CoffFileReader
{
template<class T>
static T reinterpret_bytes(const char* data)
@@ -24,7 +24,7 @@ namespace vcpkg::COFFFileReader
template<class T>
static T peek_value_from_stream(fstream& fs)
{
- fpos_t original_pos = fs.tellg().seekpos();
+ const fpos_t original_pos = fs.tellg().seekpos();
T data;
fs.read(reinterpret_cast<char*>(&data), sizeof data);
fs.seekg(original_pos);
@@ -236,7 +236,7 @@ namespace vcpkg::COFFFileReader
read_and_verify_PE_signature(fs);
CoffFileHeader header = CoffFileHeader::read(fs);
- MachineType machine = header.machine_type();
+ const MachineType machine = header.machine_type();
return {machine};
}
@@ -282,7 +282,7 @@ namespace vcpkg::COFFFileReader
marker.advance_by(ArchiveMemberHeader::HEADER_SIZE + second_linker_member_header.member_size());
marker.seek_to_marker(fs);
- bool hasLongnameMemberHeader = peek_value_from_stream<uint16_t>(fs) == 0x2F2F;
+ const bool hasLongnameMemberHeader = peek_value_from_stream<uint16_t>(fs) == 0x2F2F;
if (hasLongnameMemberHeader)
{
const ArchiveMemberHeader longnames_member_header = ArchiveMemberHeader::read(fs);
diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp
index 4da9cede2..a69958058 100644
--- a/toolsrc/src/commands_build.cpp
+++ b/toolsrc/src/commands_build.cpp
@@ -29,8 +29,8 @@ namespace vcpkg::Commands::BuildCommand
const PackageSpec& spec = full_spec.package_spec;
if (options.find(OPTION_CHECKS_ONLY) != options.end())
{
- auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, spec.triplet());
- auto build_info = Build::read_build_info(paths.get_filesystem(), paths.build_info_file_path(spec));
+ 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);
@@ -45,7 +45,7 @@ namespace vcpkg::Commands::BuildCommand
Checks::exit_fail(VCPKG_LINE_INFO);
}
- for (std::string str : full_spec.features)
+ for (const std::string& str : full_spec.features)
{
System::println("%s \n", str);
}
@@ -56,8 +56,8 @@ namespace vcpkg::Commands::BuildCommand
scf->core_paragraph->name,
spec.name());
- StatusParagraphs status_db = database_load_check(paths);
- Build::BuildPackageOptions build_package_options{Build::UseHeadVersion::NO, Build::AllowDownloads::YES};
+ 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};
@@ -68,12 +68,12 @@ namespace vcpkg::Commands::BuildCommand
System::println(System::Color::error,
"The build command requires all dependencies to be already installed.");
System::println("The following dependencies are missing:");
- System::println("");
+ System::println();
for (const auto& p : result.unmet_dependencies)
{
System::println(" %s", p);
}
- System::println("");
+ System::println();
Checks::exit_fail(VCPKG_LINE_INFO);
}
@@ -89,11 +89,11 @@ namespace vcpkg::Commands::BuildCommand
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
- std::string command_argument = args.command_arguments.at(0);
- const FullPackageSpec spec = Input::check_and_get_full_package_spec(command_argument, default_triplet, example);
+ static const std::string EXAMPLE = Commands::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});
diff --git a/toolsrc/src/commands_build_external.cpp b/toolsrc/src/commands_build_external.cpp
index ff70e9cf2..7e85f2250 100644
--- a/toolsrc/src/commands_build_external.cpp
+++ b/toolsrc/src/commands_build_external.cpp
@@ -2,17 +2,16 @@
#include "vcpkg_Commands.h"
#include "vcpkg_Input.h"
-#include "vcpkg_System.h"
namespace vcpkg::Commands::BuildExternal
{
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet)
{
- static const std::string example =
+ 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);
+ 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({});
diff --git a/toolsrc/src/commands_cache.cpp b/toolsrc/src/commands_cache.cpp
index 75de78461..5b65b197f 100644
--- a/toolsrc/src/commands_cache.cpp
+++ b/toolsrc/src/commands_cache.cpp
@@ -15,7 +15,7 @@ namespace vcpkg::Commands::Cache
{
const Expected<std::unordered_map<std::string, std::string>> pghs =
Paragraphs::get_single_paragraph(paths.get_filesystem(), path / "CONTROL");
- if (auto p = pghs.get())
+ if (const auto p = pghs.get())
{
const BinaryParagraph binary_paragraph = BinaryParagraph(*p);
output.push_back(binary_paragraph);
@@ -27,10 +27,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);
+ 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/commands_ci.cpp b/toolsrc/src/commands_ci.cpp
index f781adf69..75ff65556 100644
--- a/toolsrc/src/commands_ci.cpp
+++ b/toolsrc/src/commands_ci.cpp
@@ -13,9 +13,9 @@
namespace vcpkg::Commands::CI
{
+ using Build::BuildResult;
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,
@@ -30,8 +30,8 @@ namespace vcpkg::Commands::CI
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);
+ 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;
@@ -41,57 +41,19 @@ namespace vcpkg::Commands::CI
StatusParagraphs status_db = database_load_check(paths);
const auto& paths_port_file = Dependencies::PathsPortFile(paths);
- const std::vector<InstallPlanAction> install_plan =
+ 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]++;
- }
+ const std::vector<Dependencies::AnyAction> action_plan =
+ Util::fmap(install_plan, [](InstallPlanAction& install_action) {
+ return Dependencies::AnyAction(std::move(install_action));
+ });
- System::println("\n\nSUMMARY");
- for (const std::pair<const BuildResult, int>& entry : summary)
- {
- System::println(" %s: %d", Build::to_string(entry.first), entry.second);
- }
+ Install::perform_and_exit(
+ 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/commands_contact.cpp
index 7f4161802..8374350ee 100644
--- a/toolsrc/src/commands_contact.cpp
+++ b/toolsrc/src/commands_contact.cpp
@@ -7,8 +7,8 @@ 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_create.cpp b/toolsrc/src/commands_create.cpp
index 7f85b776a..6898f7399 100644
--- a/toolsrc/src/commands_create.cpp
+++ b/toolsrc/src/commands_create.cpp
@@ -2,7 +2,6 @@
#include "vcpkg_Commands.h"
#include "vcpkg_Files.h"
-#include "vcpkg_Input.h"
#include "vcpkg_System.h"
#include "vcpkglib.h"
@@ -10,10 +9,10 @@ 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 = Commands::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);
diff --git a/toolsrc/src/commands_depends.cpp b/toolsrc/src/commands_depends.cpp
index 2d1fb658b..17cd9c881 100644
--- a/toolsrc/src/commands_depends.cpp
+++ b/toolsrc/src/commands_depends.cpp
@@ -10,8 +10,8 @@ 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 = Commands::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 =
@@ -33,7 +33,7 @@ namespace vcpkg::Commands::DependInfo
for (const Dependency& dependency : source_paragraph.depends)
{
- if (Strings::case_insensitive_ascii_contains(dependency.name, filter))
+ if (Strings::case_insensitive_ascii_contains(dependency.name(), filter))
{
return false;
}
@@ -46,7 +46,7 @@ namespace vcpkg::Commands::DependInfo
for (auto&& source_control_file : source_control_files)
{
const SourceParagraph& source_paragraph = *source_control_file->core_paragraph;
- auto s = Strings::join(", ", source_paragraph.depends, [](const Dependency& d) { return d.name; });
+ const auto s = Strings::join(", ", source_paragraph.depends, [](const Dependency& d) { return d.name(); });
System::println("%s: %s", source_paragraph.name, s);
}
diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp
index 4e83fcca8..823c87534 100644
--- a/toolsrc/src/commands_edit.cpp
+++ b/toolsrc/src/commands_edit.cpp
@@ -6,77 +6,81 @@
namespace vcpkg::Commands::Edit
{
+ static std::vector<fs::path> find_from_registry()
+ {
+ static const std::array<const wchar_t*, 3> REGKEYS = {
+ LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)",
+ LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1287CAD5-7C8D-410D-88B9-0D1EE4A83FF2}_is1)",
+ LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)",
+ };
+
+ std::vector<fs::path> output;
+ for (auto&& keypath : REGKEYS)
+ {
+ const Optional<std::wstring> code_installpath =
+ System::get_registry_string(HKEY_LOCAL_MACHINE, keypath, L"InstallLocation");
+ if (const auto c = code_installpath.get())
+ {
+ const fs::path install_path = fs::path(*c);
+ output.push_back(install_path / "Code - Insiders.exe");
+ output.push_back(install_path / "Code.exe");
+ }
+ }
+ return output;
+ }
+
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");
- args.check_exact_arg_count(1, example);
- args.check_and_get_optional_command_arguments({});
+ static const std::string EXAMPLE = Commands::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});
const std::string port_name = args.command_arguments.at(0);
const fs::path portpath = paths.ports / port_name;
Checks::check_exit(VCPKG_LINE_INFO, fs.is_directory(portpath), R"(Could not find port named "%s")", port_name);
- // Find the user's selected editor
- std::wstring env_EDITOR;
+ std::vector<fs::path> candidate_paths;
+ const std::vector<fs::path> from_path = Files::find_from_PATH(L"EDITOR");
+ candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend());
+ 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);
- if (env_EDITOR.empty())
- {
- const Optional<std::wstring> env_EDITOR_optional = System::get_environment_variable(L"EDITOR");
- if (auto e = env_EDITOR_optional.get())
- {
- env_EDITOR = *e;
- }
- }
+ const std::vector<fs::path> from_registry = find_from_registry();
+ candidate_paths.insert(candidate_paths.end(), from_registry.cbegin(), from_registry.cend());
- if (env_EDITOR.empty())
+ auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { return fs.exists(p); });
+ if (it == candidate_paths.cend())
{
- const fs::path CODE_EXE_PATH = System::get_ProgramFiles_32_bit() / "Microsoft VS Code/Code.exe";
- if (fs.exists(CODE_EXE_PATH))
- {
- env_EDITOR = CODE_EXE_PATH;
- }
+ System::println(System::Color::error,
+ "Error: Visual Studio Code was not found and the environment variable EDITOR is not set.");
+ System::println("The following paths were examined:");
+ Files::print_paths(candidate_paths);
+ System::println("You can also set the environmental variable EDITOR to your editor of choice.");
+ Checks::exit_fail(VCPKG_LINE_INFO);
}
- if (env_EDITOR.empty())
+ const fs::path env_editor = *it;
+ if (options.find(OPTION_BUILDTREES) != options.cend())
{
- 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)",
- };
- for (auto&& keypath : regkeys)
- {
- const Optional<std::wstring> code_installpath =
- System::get_registry_string(HKEY_LOCAL_MACHINE, keypath, L"InstallLocation");
- if (auto c = code_installpath.get())
- {
- auto p = fs::path(*c) / "Code.exe";
- if (fs.exists(p))
- {
- env_EDITOR = p.native();
- break;
- }
- auto p_insiders = fs::path(*c) / "Code - Insiders.exe";
- if (fs.exists(p_insiders))
- {
- env_EDITOR = p_insiders.native();
- break;
- }
- }
- }
- }
+ const auto buildtrees_current_dir = paths.buildtrees / port_name;
- if (env_EDITOR.empty())
- {
- Checks::exit_with_message(
- VCPKG_LINE_INFO, "Visual Studio Code was not found and the environment variable EDITOR is not set");
+ const std::wstring cmd_line =
+ Strings::wformat(LR"("%s" "%s" -n)", env_editor, buildtrees_current_dir.native());
+ Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line));
}
- std::wstring cmdLine = Strings::wformat(
- LR"("%s" "%s" "%s" -n)", env_EDITOR, portpath.native(), (portpath / "portfile.cmake").native());
- Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmdLine));
+ const std::wstring cmd_line = Strings::wformat(
+ LR"("%s" "%s" "%s" -n)", env_editor, portpath.native(), (portpath / "portfile.cmake").native());
+ Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line));
}
}
diff --git a/toolsrc/src/commands_env.cpp b/toolsrc/src/commands_env.cpp
index dd7172b89..073c501f5 100644
--- a/toolsrc/src/commands_env.cpp
+++ b/toolsrc/src/commands_env.cpp
@@ -8,12 +8,13 @@ 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)");
- args.check_exact_arg_count(0, example);
+ static const std::string EXAMPLE = Commands::Help::create_example_string(R"(env --Triplet x64-windows)");
+ args.check_exact_arg_count(0, EXAMPLE);
args.check_and_get_optional_command_arguments({});
- 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 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");
Checks::exit_success(VCPKG_LINE_INFO);
}
diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp
index 4adfbc0f6..b416a6f3c 100644
--- a/toolsrc/src/commands_export.cpp
+++ b/toolsrc/src/commands_export.cpp
@@ -11,17 +11,17 @@
namespace vcpkg::Commands::Export
{
- using Install::InstallDir;
using Dependencies::ExportPlanAction;
- using Dependencies::RequestType;
using Dependencies::ExportPlanType;
+ using Dependencies::RequestType;
+ using Install::InstallDir;
static std::string create_nuspec_file_contents(const std::string& raw_exported_dir,
const std::string& targets_redirect_path,
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 +40,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,12 +62,12 @@ 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)
{
- 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;
@@ -151,7 +151,7 @@ namespace vcpkg::Commands::Export
enum class BackingEnum
{
ZIP = 1,
- _7ZIP,
+ SEVEN_ZIP,
};
constexpr ArchiveFormat() = delete;
@@ -174,7 +174,7 @@ namespace vcpkg::Commands::Export
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 SEVEN_ZIP(ArchiveFormat::BackingEnum::SEVEN_ZIP, L"7z", L"7zip");
}
static fs::path do_archive_export(const VcpkgPaths& paths,
@@ -205,11 +205,9 @@ namespace vcpkg::Commands::Export
static Optional<std::string> maybe_lookup(std::unordered_map<std::string, std::string> const& m,
std::string const& key)
{
- auto it = m.find(key);
- if (it != m.end())
- return it->second;
- else
- return nullopt;
+ const auto it = m.find(key);
+ if (it != m.end()) return it->second;
+ return nullopt;
}
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet)
@@ -218,38 +216,43 @@ namespace vcpkg::Commands::Export
static const std::string OPTION_RAW = "--raw";
static const std::string OPTION_NUGET = "--nuget";
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";
// input sanitization
- static const std::string example =
+ static const std::string EXAMPLE =
Commands::Help::create_example_string("export zlib zlib:x64-windows boost --nuget");
- args.check_min_arg_count(1, example);
+ 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);
+ 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_ZIP, OPTION_7ZIP,
+ OPTION_DRY_RUN,
+ OPTION_RAW,
+ OPTION_NUGET,
+ OPTION_ZIP,
+ OPTION_SEVEN_ZIP,
},
{
- OPTION_NUGET_ID, OPTION_NUGET_VERSION,
+ OPTION_NUGET_ID,
+ OPTION_NUGET_VERSION,
});
- const bool dryRun = options.switches.find(OPTION_DRY_RUN) != options.switches.cend();
+ const bool dry_run = 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();
+ const bool seven_zip = options.switches.find(OPTION_SEVEN_ZIP) != options.switches.cend();
- if (!raw && !nuget && !zip && !_7zip && !dryRun)
+ if (!raw && !nuget && !zip && !seven_zip && !dry_run)
{
System::println(System::Color::error, "Must provide at least one export type: --raw --nuget --zip --7zip");
- System::print(example);
+ System::print(EXAMPLE);
Checks::exit_fail(VCPKG_LINE_INFO);
}
@@ -261,7 +264,7 @@ namespace vcpkg::Commands::Export
VCPKG_LINE_INFO, !maybe_nuget_version || nuget, "--nuget-version is only valid with --nuget");
// create the plan
- StatusParagraphs status_db = database_load_check(paths);
+ 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");
@@ -280,7 +283,7 @@ namespace vcpkg::Commands::Export
"Additional packages (*) need to be exported to complete this operation.");
}
- auto it = group_by_plan_type.find(ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT);
+ 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.");
@@ -290,14 +293,14 @@ namespace vcpkg::Commands::Export
Util::erase_remove_if(
unbuilt, [](const ExportPlanAction* a) { return a->request_type != RequestType::USER_REQUESTED; });
- auto s = Strings::join(" ", unbuilt, [](const ExportPlanAction* a) { return a->spec.to_string(); });
+ 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 (dryRun)
+ if (dry_run)
{
Checks::exit_success(VCPKG_LINE_INFO);
}
@@ -323,7 +326,7 @@ namespace vcpkg::Commands::Export
System::println("Exporting package %s... ", display_name);
const BinaryParagraph& binary_paragraph =
- action.any_paragraph.binary_paragraph.value_or_exit(VCPKG_LINE_INFO);
+ 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(),
@@ -355,7 +358,7 @@ namespace vcpkg::Commands::Export
Checks::check_exit(VCPKG_LINE_INFO, !ec);
}
- auto print_next_step_info = [](const fs::path& prefix) {
+ 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());
@@ -404,11 +407,11 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console
print_next_step_info("[...]");
}
- if (_7zip)
+ if (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("[...]");
diff --git a/toolsrc/src/commands_hash.cpp b/toolsrc/src/commands_hash.cpp
index 0da2b031f..b3211b9f8 100644
--- a/toolsrc/src/commands_hash.cpp
+++ b/toolsrc/src/commands_hash.cpp
@@ -6,22 +6,22 @@
namespace vcpkg::Commands::Hash
{
- static void do_file_hash(fs::path const& path, std::wstring const& hashType)
+ static void do_file_hash(fs::path const& path, std::wstring const& hash_type)
{
- auto cmd_line = Strings::wformat(LR"(CertUtil.exe -hashfile "%s" %s)", path.c_str(), hashType);
- auto ec_data = System::cmd_execute_and_capture_output(cmd_line);
+ 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;
- auto start = output.find_first_of("\r\n");
+ 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));
- auto end = output.find_first_of("\r\n", start + 1);
+ 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",
@@ -34,11 +34,11 @@ namespace vcpkg::Commands::Hash
void perform_and_exit(const VcpkgCmdArguments& args)
{
- static const std::string example =
+ 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_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)
diff --git a/toolsrc/src/commands_import.cpp b/toolsrc/src/commands_import.cpp
index 5db1885b2..412a03d7f 100644
--- a/toolsrc/src/commands_import.cpp
+++ b/toolsrc/src/commands_import.cpp
@@ -28,7 +28,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 +46,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 +59,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 +82,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 = Commands::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_install.cpp b/toolsrc/src/commands_install.cpp
index 2ce5b6c62..aca25996e 100644
--- a/toolsrc/src/commands_install.cpp
+++ b/toolsrc/src/commands_install.cpp
@@ -6,6 +6,7 @@
#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"
@@ -13,11 +14,7 @@
namespace vcpkg::Commands::Install
{
- using Dependencies::InstallPlanAction;
- using Dependencies::RequestType;
- using Dependencies::InstallPlanType;
- using Dependencies::RemovePlanAction;
- using Dependencies::RemovePlanType;
+ using namespace Dependencies;
InstallDir InstallDir::from_destination_root(const fs::path& destination_root,
const std::string& destination_subdirectory,
@@ -62,7 +59,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());
@@ -176,45 +173,10 @@ namespace vcpkg::Commands::Install
return SortedVector<std::string>(std::move(installed_files));
}
- static void print_plan(const std::map<InstallPlanType, std::vector<const InstallPlanAction*>>& group_by_plan_type)
+ InstallResult install_package(const VcpkgPaths& paths, const BinaryControlFile& bcf, StatusParagraphs* status_db)
{
- static constexpr std::array<InstallPlanType, 3> order = {
- InstallPlanType::ALREADY_INSTALLED, InstallPlanType::BUILD_AND_INSTALL, InstallPlanType::INSTALL};
-
- for (const InstallPlanType plan_type : order)
- {
- auto it = group_by_plan_type.find(plan_type);
- if (it == group_by_plan_type.cend())
- {
- continue;
- }
-
- std::vector<const InstallPlanAction*> cont = it->second;
- std::sort(cont.begin(), cont.end(), &InstallPlanAction::compare_by_name);
- const std::string as_string = Strings::join("\n", cont, [](const InstallPlanAction* p) {
- return Dependencies::to_output_string(p->request_type, p->spec.to_string());
- });
-
- switch (plan_type)
- {
- case InstallPlanType::ALREADY_INSTALLED:
- System::println("The following packages are already installed:\n%s", as_string);
- continue;
- case InstallPlanType::BUILD_AND_INSTALL:
- System::println("The following packages will be built and installed:\n%s", as_string);
- continue;
- case InstallPlanType::INSTALL:
- System::println("The following packages will be installed:\n%s", as_string);
- continue;
- default: Checks::unreachable(VCPKG_LINE_INFO);
- }
- }
- }
-
- void install_package(const VcpkgPaths& paths, const BinaryParagraph& binary_paragraph, StatusParagraphs* status_db)
- {
- const fs::path package_dir = paths.package_dir(binary_paragraph.spec);
- const Triplet& triplet = binary_paragraph.spec.triplet();
+ const fs::path package_dir = paths.package_dir(bcf.core_paragraph.spec);
+ const Triplet& triplet = bcf.core_paragraph.spec.triplet();
const std::vector<StatusParagraphAndAssociatedFiles> pgh_and_files = get_installed_files(paths, *status_db);
const SortedVector<std::string> package_files =
@@ -234,35 +196,52 @@ namespace vcpkg::Commands::Install
System::println(System::Color::error,
"The following files are already installed in %s and are in conflict with %s",
triplet_install_path.generic_string(),
- binary_paragraph.spec);
+ bcf.core_paragraph.spec);
System::print("\n ");
System::println(Strings::join("\n ", intersection));
- System::println("");
- Checks::exit_fail(VCPKG_LINE_INFO);
+ System::println();
+ return InstallResult::FILE_CONFLICTS;
}
StatusParagraph source_paragraph;
- source_paragraph.package = binary_paragraph;
+ source_paragraph.package = bcf.core_paragraph;
source_paragraph.want = Want::INSTALL;
source_paragraph.state = InstallState::HALF_INSTALLED;
- for (auto&& dep : source_paragraph.package.depends)
- {
- if (status_db->find_installed(dep, source_paragraph.package.spec.triplet()) == status_db->end())
- {
- Checks::unreachable(VCPKG_LINE_INFO);
- }
- }
+
write_update(paths, source_paragraph);
status_db->insert(std::make_unique<StatusParagraph>(source_paragraph));
+ std::vector<StatusParagraph> features_spghs;
+ for (auto&& feature : bcf.features)
+ {
+ features_spghs.emplace_back();
+
+ StatusParagraph& feature_paragraph = features_spghs.back();
+ feature_paragraph.package = feature;
+ feature_paragraph.want = Want::INSTALL;
+ feature_paragraph.state = InstallState::HALF_INSTALLED;
+
+ write_update(paths, feature_paragraph);
+ status_db->insert(std::make_unique<StatusParagraph>(feature_paragraph));
+ }
+
const InstallDir install_dir = InstallDir::from_destination_root(
- paths.installed, triplet.to_string(), paths.listfile_path(binary_paragraph));
+ paths.installed, triplet.to_string(), paths.listfile_path(bcf.core_paragraph));
install_files_and_write_listfile(paths.get_filesystem(), package_dir, install_dir);
source_paragraph.state = InstallState::INSTALLED;
write_update(paths, source_paragraph);
status_db->insert(std::make_unique<StatusParagraph>(source_paragraph));
+
+ for (auto&& feature_paragraph : features_spghs)
+ {
+ feature_paragraph.state = InstallState::INSTALLED;
+ write_update(paths, feature_paragraph);
+ status_db->insert(std::make_unique<StatusParagraph>(feature_paragraph));
+ }
+
+ return InstallResult::SUCCESS;
}
using Build::BuildResult;
@@ -274,6 +253,8 @@ namespace vcpkg::Commands::Install
{
const InstallPlanType& plan_type = action.plan_type;
const std::string display_name = action.spec.to_string();
+ const std::string display_name_with_features =
+ GlobalState::feature_packages ? action.displayname() : display_name;
const bool is_user_requested = action.request_type == RequestType::USER_REQUESTED;
const bool use_head_version = to_bool(build_package_options.use_head_version);
@@ -281,75 +262,65 @@ namespace vcpkg::Commands::Install
if (plan_type == InstallPlanType::ALREADY_INSTALLED)
{
if (use_head_version && is_user_requested)
- {
System::println(
System::Color::warning, "Package %s is already installed -- not building from HEAD", display_name);
- }
else
- {
System::println(System::Color::success, "Package %s is already installed", display_name);
- }
return BuildResult::SUCCEEDED;
}
- if (plan_type == InstallPlanType::BUILD_AND_INSTALL && !g_feature_packages)
+ if (plan_type == InstallPlanType::BUILD_AND_INSTALL)
{
if (use_head_version)
- System::println("Building package %s from HEAD... ", display_name);
+ System::println("Building package %s from HEAD... ", display_name_with_features);
else
- System::println("Building package %s... ", display_name);
-
- const Build::BuildPackageConfig build_config{
- action.any_paragraph.source_paragraph.value_or_exit(VCPKG_LINE_INFO),
- action.spec.triplet(),
- paths.port_dir(action.spec),
- build_package_options};
- const auto result = Build::build_package(paths, build_config, status_db);
+ System::println("Building package %s... ", display_name_with_features);
+
+ const auto result = [&]() -> Build::ExtendedBuildResult {
+ if (GlobalState::feature_packages)
+ {
+ const Build::BuildPackageConfig build_config{
+ *action.any_paragraph.source_control_file.value_or_exit(VCPKG_LINE_INFO),
+ action.spec.triplet(),
+ paths.port_dir(action.spec),
+ build_package_options,
+ action.feature_list};
+ return Build::build_package(paths, build_config, status_db);
+ }
+ else
+ {
+ const Build::BuildPackageConfig build_config{
+ action.any_paragraph.source_paragraph.value_or_exit(VCPKG_LINE_INFO),
+ action.spec.triplet(),
+ paths.port_dir(action.spec),
+ build_package_options};
+ return Build::build_package(paths, build_config, status_db);
+ }
+ }();
+
if (result.code != Build::BuildResult::SUCCEEDED)
{
System::println(System::Color::error, Build::create_error_message(result.code, action.spec));
return result.code;
}
- System::println("Building package %s... done", display_name);
- const BinaryParagraph bpgh =
- Paragraphs::try_load_cached_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO);
- System::println("Installing package %s... ", display_name);
- install_package(paths, bpgh, &status_db);
- System::println(System::Color::success, "Installing package %s... done", display_name);
- return BuildResult::SUCCEEDED;
- }
+ System::println("Building package %s... done", display_name_with_features);
- if (plan_type == InstallPlanType::BUILD_AND_INSTALL && g_feature_packages)
- {
- if (use_head_version)
- System::println("Building package %s from HEAD... ", display_name);
- else
- System::println("Building package %s... ", display_name);
-
- const Build::BuildPackageConfig build_config{
- *action.any_paragraph.source_control_file.value_or_exit(VCPKG_LINE_INFO),
- action.spec.triplet(),
- paths.port_dir(action.spec),
- build_package_options,
- action.feature_list};
- const auto result = Build::build_package(paths, build_config, status_db);
- if (result.code != Build::BuildResult::SUCCEEDED)
+ 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);
+ const auto install_result = install_package(paths, bcf, &status_db);
+ switch (install_result)
{
- System::println(System::Color::error, Build::create_error_message(result.code, action.spec));
- return result.code;
+ case InstallResult::SUCCESS:
+ System::println(System::Color::success, "Installing package %s... done", display_name);
+ return BuildResult::SUCCEEDED;
+ case InstallResult::FILE_CONFLICTS: return BuildResult::FILE_CONFLICTS;
+ default: Checks::unreachable(VCPKG_LINE_INFO);
}
- System::println("Building package %s... done", display_name);
-
- const BinaryParagraph bpgh =
- Paragraphs::try_load_cached_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO);
- System::println("Installing package %s... ", display_name);
- install_package(paths, bpgh, &status_db);
- System::println(System::Color::success, "Installing package %s... done", display_name);
- return BuildResult::SUCCEEDED;
}
- if (plan_type == InstallPlanType::INSTALL && !g_feature_packages)
+ if (plan_type == InstallPlanType::INSTALL)
{
if (use_head_version && is_user_requested)
{
@@ -357,83 +328,286 @@ 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);
- install_package(paths, action.any_paragraph.binary_paragraph.value_or_exit(VCPKG_LINE_INFO), &status_db);
- System::println(System::Color::success, "Installing package %s... done", display_name);
- return BuildResult::SUCCEEDED;
+ const auto install_result = install_package(
+ paths, action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO), &status_db);
+ switch (install_result)
+ {
+ case InstallResult::SUCCESS:
+ System::println(System::Color::success, "Installing package %s... done", display_name);
+ return BuildResult::SUCCEEDED;
+ case InstallResult::FILE_CONFLICTS: return BuildResult::FILE_CONFLICTS;
+ default: Checks::unreachable(VCPKG_LINE_INFO);
+ }
}
Checks::unreachable(VCPKG_LINE_INFO);
}
+ static void print_plan(const std::vector<AnyAction>& action_plan, bool is_recursive)
+ {
+ std::vector<const RemovePlanAction*> remove_plans;
+ std::vector<const InstallPlanAction*> rebuilt_plans;
+ std::vector<const InstallPlanAction*> only_install_plans;
+ std::vector<const InstallPlanAction*> new_plans;
+ std::vector<const InstallPlanAction*> already_installed_plans;
+
+ const bool has_non_user_requested_packages = Util::find_if(action_plan, [](const AnyAction& package) -> bool {
+ if (auto iplan = package.install_plan.get())
+ return iplan->request_type != RequestType::USER_REQUESTED;
+ else
+ return false;
+ }) != action_plan.cend();
+
+ for (auto&& action : action_plan)
+ {
+ if (auto install_action = action.install_plan.get())
+ {
+ // remove plans are guaranteed to come before install plans, so we know the plan will be contained if at
+ // all.
+ auto it = Util::find_if(
+ remove_plans, [&](const RemovePlanAction* plan) { return plan->spec == install_action->spec; });
+ if (it != remove_plans.end())
+ {
+ rebuilt_plans.emplace_back(install_action);
+ }
+ else
+ {
+ switch (install_action->plan_type)
+ {
+ case InstallPlanType::INSTALL: only_install_plans.emplace_back(install_action); break;
+ case InstallPlanType::ALREADY_INSTALLED:
+ if (install_action->request_type == RequestType::USER_REQUESTED)
+ already_installed_plans.emplace_back(install_action);
+ break;
+ case InstallPlanType::BUILD_AND_INSTALL: new_plans.emplace_back(install_action); break;
+ default: Checks::unreachable(VCPKG_LINE_INFO);
+ }
+ }
+ }
+ else if (auto remove_action = action.remove_plan.get())
+ {
+ remove_plans.emplace_back(remove_action);
+ }
+ }
+
+ std::sort(remove_plans.begin(), remove_plans.end(), &RemovePlanAction::compare_by_name);
+ std::sort(rebuilt_plans.begin(), rebuilt_plans.end(), &InstallPlanAction::compare_by_name);
+ std::sort(only_install_plans.begin(), only_install_plans.end(), &InstallPlanAction::compare_by_name);
+ std::sort(new_plans.begin(), new_plans.end(), &InstallPlanAction::compare_by_name);
+ std::sort(already_installed_plans.begin(), already_installed_plans.end(), &InstallPlanAction::compare_by_name);
+
+ if (already_installed_plans.size() > 0)
+ {
+ const std::string already_string =
+ Strings::join("\n", already_installed_plans, [](const InstallPlanAction* p) {
+ return to_output_string(p->request_type, p->displayname());
+ });
+ System::println("The following packages are already installed:\n%s", already_string);
+ }
+
+ if (rebuilt_plans.size() > 0)
+ {
+ const std::string rebuilt_string = Strings::join("\n", rebuilt_plans, [](const InstallPlanAction* p) {
+ return to_output_string(p->request_type, p->displayname());
+ });
+ System::println("The following packages will be rebuilt:\n%s", rebuilt_string);
+ }
+
+ if (new_plans.size() > 0)
+ {
+ const std::string new_string = Strings::join("\n", new_plans, [](const InstallPlanAction* p) {
+ return to_output_string(p->request_type, p->displayname());
+ });
+ System::println("The following packages will be built and installed:\n%s", new_string);
+ }
+
+ if (only_install_plans.size() > 0)
+ {
+ const std::string only_install_string =
+ Strings::join("\n", only_install_plans, [](const InstallPlanAction* p) {
+ return to_output_string(p->request_type, p->displayname());
+ });
+ System::println("The following packages will be directly installed:\n%s", only_install_string);
+ }
+
+ if (has_non_user_requested_packages)
+ System::println("Additional packages (*) will be installed to complete this operation.");
+
+ if (remove_plans.size() > 0 && !is_recursive)
+ {
+ System::println(System::Color::warning,
+ "If you are sure you want to rebuild the above packages, run the command with the "
+ "--recurse option");
+ Checks::exit_fail(VCPKG_LINE_INFO);
+ }
+ }
+
+ void perform_and_exit(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)
+ {
+ std::vector<BuildResult> results;
+ std::vector<std::string> timing;
+ const ElapsedTime timer = ElapsedTime::create_started();
+ size_t counter = 0;
+ const size_t package_count = action_plan.size();
+
+ for (const auto& action : action_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);
+
+ 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);
+ }
+
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet)
{
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";
// input sanitization
- static const std::string example =
+ static const std::string EXAMPLE =
Commands::Help::create_example_string("install zlib zlib:x64-windows curl boost");
- args.check_min_arg_count(1, example);
+ 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);
+ const std::vector<FullPackageSpec> specs = Util::fmap(args.command_arguments, [&](auto&& arg) {
+ return Input::check_and_get_full_package_spec(arg, default_triplet, EXAMPLE);
});
+
for (auto&& spec : specs)
- Input::check_triplet(spec.triplet(), paths);
+ {
+ Input::check_triplet(spec.package_spec.triplet(), paths);
+ if (!spec.features.empty() && !GlobalState::feature_packages)
+ {
+ Checks::exit_with_message(
+ VCPKG_LINE_INFO, "Feature packages are experimentally available under the --featurepackages flag.");
+ }
+ }
const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments(
- {OPTION_DRY_RUN, OPTION_USE_HEAD_VERSION, OPTION_NO_DOWNLOADS});
- 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());
// create the plan
StatusParagraphs status_db = database_load_check(paths);
- Dependencies::PathsPortFile paths_port_file(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");
-
- // log the plan
- const std::string specs_string =
- Strings::join(",", install_plan, [](const InstallPlanAction& plan) { return plan.spec.to_string(); });
- Metrics::track_property("installplan", specs_string);
-
- std::map<InstallPlanType, std::vector<const InstallPlanAction*>> group_by_plan_type;
- Util::group_by(install_plan, &group_by_plan_type, [](const InstallPlanAction& p) { return p.plan_type; });
- print_plan(group_by_plan_type);
+ const Build::BuildPackageOptions install_plan_options = {Build::to_use_head_version(use_head_version),
+ Build::to_allow_downloads(!no_downloads)};
- const bool has_non_user_requested_packages =
- Util::find_if(install_plan, [](const InstallPlanAction& package) -> bool {
- return package.request_type != RequestType::USER_REQUESTED;
- }) != install_plan.cend();
+ std::vector<AnyAction> action_plan;
- if (has_non_user_requested_packages)
+ if (GlobalState::feature_packages)
{
- System::println("Additional packages (*) will be installed to complete this operation.");
+ 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)
+ {
+ scf_map[port->core_paragraph->name] = std::move(*port);
+ }
+ action_plan = create_feature_install_plan(scf_map, FullPackageSpec::to_feature_specs(specs), status_db);
}
-
- if (dryRun)
+ else
{
- Checks::exit_success(VCPKG_LINE_INFO);
+ Dependencies::PathsPortFile paths_port_file(paths);
+ auto install_plan = Dependencies::create_install_plan(
+ paths_port_file, Util::fmap(specs, [](auto&& spec) { return spec.package_spec; }), status_db);
+
+ action_plan = Util::fmap(
+ install_plan, [](InstallPlanAction& install_action) { return AnyAction(std::move(install_action)); });
}
- const Build::BuildPackageOptions install_plan_options = {Build::to_use_head_version(use_head_version),
- Build::to_allow_downloads(!no_downloads)};
+ // install plan will be empty if it is already installed - need to change this at status paragraph part
+ Checks::check_exit(VCPKG_LINE_INFO, !action_plan.empty(), "Install plan cannot be empty");
- // execute the plan
- for (const InstallPlanAction& action : install_plan)
+ // log the plan
+ const std::string specs_string = Strings::join(",", action_plan, [](const AnyAction& action) {
+ if (auto iaction = action.install_plan.get())
+ return iaction->spec.to_string();
+ else if (auto raction = action.remove_plan.get())
+ return "R$" + raction->spec.to_string();
+ Checks::unreachable(VCPKG_LINE_INFO);
+ });
+
+ Metrics::g_metrics.lock()->track_property("installplan", specs_string);
+
+ print_plan(action_plan, is_recursive);
+
+ if (dry_run)
{
- const BuildResult result = perform_install_plan_action(paths, action, install_plan_options, status_db);
- if (result != BuildResult::SUCCEEDED)
- {
- System::println(Build::create_user_troubleshooting_message(action.spec));
- Checks::exit_fail(VCPKG_LINE_INFO);
- }
+ Checks::exit_success(VCPKG_LINE_INFO);
}
+ perform_and_exit(action_plan, install_plan_options, keep_going, PrintSummary::NO, paths, status_db);
+
Checks::exit_success(VCPKG_LINE_INFO);
}
}
diff --git a/toolsrc/src/commands_integrate.cpp b/toolsrc/src/commands_integrate.cpp
index c5942f9fc..1bf26910c 100644
--- a/toolsrc/src/commands_integrate.cpp
+++ b/toolsrc/src/commands_integrate.cpp
@@ -8,11 +8,11 @@
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 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";
static std::string create_appdata_targets_shortcut(const std::string& target_path) noexcept
{
@@ -82,7 +82,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 +99,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;
@@ -113,36 +113,36 @@ namespace vcpkg::Commands::Integrate
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))
+ SHELLEXECUTEINFO 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 = "runas";
+ sh_ex_info.lpFile = "cmd"; // Application to start
+
+ sh_ex_info.lpParameters = param.c_str(); // Additional parameters
+ sh_ex_info.lpDirectory = nullptr;
+ sh_ex_info.nShow = SW_HIDE;
+ sh_ex_info.hInstApp = nullptr;
+
+ if (!ShellExecuteExA(&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;
}
static fs::path get_appdata_targets_path()
{
- static const fs::path local_app_data =
+ 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";
+ return LOCAL_APP_DATA / "vcpkg" / "vcpkg.user.targets";
}
static void integrate_install(const VcpkgPaths& paths)
@@ -150,13 +150,13 @@ namespace vcpkg::Commands::Integrate
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 +174,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 +193,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 +207,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 +217,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)
{
@@ -245,7 +245,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());
@@ -317,10 +317,10 @@ 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 (args.command_arguments[0] == "install")
diff --git a/toolsrc/src/commands_list.cpp b/toolsrc/src/commands_list.cpp
index 9bc9bcc08..640885860 100644
--- a/toolsrc/src/commands_list.cpp
+++ b/toolsrc/src/commands_list.cpp
@@ -8,27 +8,27 @@ 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("%-27s %-16s %s", pgh.package.displayname(), pgh.package.version, pgh.package.description);
+ System::println("%-30s %-16s %s", pgh.package.displayname(), pgh.package.version, pgh.package.description);
}
else
{
- System::println("%-27s %-16s %s",
- pgh.package.displayname(),
- pgh.package.version,
- vcpkg::shorten_description(pgh.package.description));
+ System::println("%-30s %-16s %s",
+ vcpkg::shorten_text(pgh.package.displayname(), 30),
+ vcpkg::shorten_text(pgh.package.version, 16),
+ vcpkg::shorten_text(pgh.package.description, 71));
}
}
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);
+ 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/commands_owns.cpp
index 757292e96..718a0277f 100644
--- a/toolsrc/src/commands_owns.cpp
+++ b/toolsrc/src/commands_owns.cpp
@@ -25,9 +25,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",
+ 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);
+ 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/commands_portsdiff.cpp
index 83d62896f..32bc3de3c 100644
--- a/toolsrc/src/commands_portsdiff.cpp
+++ b/toolsrc/src/commands_portsdiff.cpp
@@ -2,7 +2,6 @@
#include "Paragraphs.h"
#include "SortedVector.h"
-#include "SourceParagraph.h"
#include "vcpkg_Commands.h"
#include "vcpkg_Maps.h"
#include "vcpkg_System.h"
@@ -117,11 +116,11 @@ namespace vcpkg::Commands::PortsDiff
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
{
- static const std::string example =
+ 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);
+ 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();
@@ -139,8 +138,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 = Maps::extract_keys(current_names_and_versions);
+ const std::vector<std::string> previous_ports = Maps::extract_keys(previous_names_and_versions);
const SetElementPresence<std::string> setp =
SetElementPresence<std::string>::create(current_ports, previous_ports);
diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp
index eabf2b9ae..a9f1b2564 100644
--- a/toolsrc/src/commands_remove.cpp
+++ b/toolsrc/src/commands_remove.cpp
@@ -17,15 +17,21 @@ namespace vcpkg::Commands::Remove
void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db)
{
auto& fs = paths.get_filesystem();
- StatusParagraph& pkg = **status_db->find(spec.name(), spec.triplet());
+ auto spghs = status_db->find_all(spec.name(), spec.triplet());
+ const auto core_pkg = **status_db->find(spec.name(), spec.triplet(), Strings::EMPTY);
- pkg.want = Want::PURGE;
- pkg.state = InstallState::HALF_INSTALLED;
- write_update(paths, pkg);
+ for (auto&& spgh : spghs)
+ {
+ StatusParagraph& pkg = **spgh;
+ if (pkg.state != InstallState::INSTALLED) continue;
+ pkg.want = Want::PURGE;
+ pkg.state = InstallState::HALF_INSTALLED;
+ write_update(paths, pkg);
+ }
- auto maybe_lines = fs.read_lines(paths.listfile_path(pkg.package));
+ 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)
@@ -36,7 +42,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());
@@ -66,7 +72,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))
@@ -80,20 +86,25 @@ namespace vcpkg::Commands::Remove
}
}
- fs.remove(paths.listfile_path(pkg.package));
+ fs.remove(paths.listfile_path(core_pkg.package));
}
- pkg.state = InstallState::NOT_INSTALLED;
- write_update(paths, pkg);
+ for (auto&& spgh : spghs)
+ {
+ StatusParagraph& pkg = **spgh;
+ if (pkg.state != InstallState::HALF_INSTALLED) continue;
+ pkg.state = InstallState::NOT_INSTALLED;
+ write_update(paths, pkg);
+ }
}
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;
@@ -118,6 +129,37 @@ 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);
+ }
+ }
+
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet)
{
static const std::string OPTION_PURGE = "--purge";
@@ -125,7 +167,7 @@ namespace vcpkg::Commands::Remove
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 =
+ static const std::string EXAMPLE =
Commands::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});
@@ -134,37 +176,38 @@ 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; });
if (specs.empty())
{
- System::println(System::Color::success, "There are no oudated packages.");
+ System::println(System::Color::success, "There are no outdated packages.");
Checks::exit_success(VCPKG_LINE_INFO);
}
}
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");
@@ -183,7 +226,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");
@@ -191,37 +234,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/commands_search.cpp b/toolsrc/src/commands_search.cpp
index fee99a5db..1ccec9fbe 100644
--- a/toolsrc/src/commands_search.cpp
+++ b/toolsrc/src/commands_search.cpp
@@ -3,6 +3,7 @@
#include "Paragraphs.h"
#include "SourceParagraph.h"
#include "vcpkg_Commands.h"
+#include "vcpkg_GlobalState.h"
#include "vcpkg_System.h"
#include "vcpkglib.h"
@@ -39,7 +40,7 @@ namespace vcpkg::Commands::Search
s.append(Strings::format("%s;", name));
for (const Dependency& d : source_paragraph.depends)
{
- const std::string dependency_name = replace_dashes_with_underscore(d.name);
+ const std::string dependency_name = replace_dashes_with_underscore(d.name());
s.append(Strings::format("%s -> %s;", name, dependency_name));
}
}
@@ -57,9 +58,9 @@ namespace vcpkg::Commands::Search
else
{
System::println("%-20s %-16s %s",
- source_paragraph.name,
- source_paragraph.version,
- vcpkg::shorten_description(source_paragraph.description));
+ vcpkg::shorten_text(source_paragraph.name, 20),
+ vcpkg::shorten_text(source_paragraph.version, 16),
+ vcpkg::shorten_text(source_paragraph.description, 81));
}
}
@@ -72,17 +73,17 @@ namespace vcpkg::Commands::Search
else
{
System::println("%-37s %s",
- name + "[" + feature_paragraph.name + "]",
- vcpkg::shorten_description(feature_paragraph.description));
+ vcpkg::shorten_text(name + "[" + feature_paragraph.name + "]", 37),
+ vcpkg::shorten_text(feature_paragraph.description, 81));
}
}
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);
+ 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});
@@ -90,7 +91,7 @@ namespace vcpkg::Commands::Search
if (!sources_and_errors.errors.empty())
{
- if (vcpkg::g_debugging)
+ if (GlobalState::debugging)
{
print_error_message(sources_and_errors.errors);
}
diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp
index 35f24af12..71ea4b063 100644
--- a/toolsrc/src/commands_update.cpp
+++ b/toolsrc/src/commands_update.cpp
@@ -2,7 +2,6 @@
#include "Paragraphs.h"
#include "vcpkg_Commands.h"
-#include "vcpkg_Files.h"
#include "vcpkg_System.h"
#include "vcpkglib.h"
@@ -22,7 +21,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 +68,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/commands_version.cpp b/toolsrc/src/commands_version.cpp
index cd21f2561..5744ea9ef 100644
--- a/toolsrc/src/commands_version.cpp
+++ b/toolsrc/src/commands_version.cpp
@@ -13,15 +13,44 @@ namespace vcpkg::Commands::Version
{
const std::string& version()
{
- static const std::string s_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;
+ + std::string(Metrics::get_compiled_metrics_enabled() ? Strings::EMPTY : "-external");
+ return S_VERSION;
+ }
+
+ 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 = sscanf_s(version_contents->c_str(), "\"%d.%d.%d\"", &maj1, &min1, &rev1);
+
+ int maj2, min2, rev2;
+ const 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(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)
diff --git a/toolsrc/src/metrics.cpp b/toolsrc/src/metrics.cpp
index 7992f3e51..8a0050bfc 100644
--- a/toolsrc/src/metrics.cpp
+++ b/toolsrc/src/metrics.cpp
@@ -8,6 +8,8 @@
namespace vcpkg::Metrics
{
+ Util::LockGuarded<Metrics> g_metrics;
+
static std::string get_current_date_time()
{
struct tm newtime;
@@ -18,12 +20,12 @@ namespace vcpkg::Metrics
_ftime_s(&timebuffer);
time_t now = timebuffer.time;
- int milli = timebuffer.millitm;
+ const int milli = timebuffer.millitm;
- errno_t err = gmtime_s(&newtime, &now);
+ const errno_t err = gmtime_s(&newtime, &now);
if (err)
{
- return "";
+ return Strings::EMPTY;
}
strftime(&date[0], date.size(), "%Y-%m-%dT%H:%M:%S", &newtime);
@@ -32,7 +34,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;
@@ -48,7 +50,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)
{
@@ -79,8 +81,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)
@@ -99,11 +101,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,21 +120,21 @@ namespace vcpkg::Metrics
{
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 "";
+ const auto versz = GetFileVersionInfoSizeW(path.c_str(), nullptr);
+ if (versz == 0) return Strings::EMPTY;
std::vector<char> verbuf;
verbuf.resize(versz);
- if (!GetFileVersionInfoW(path.c_str(), 0, static_cast<DWORD>(verbuf.size()), &verbuf[0])) return "";
+ if (!GetFileVersionInfoW(path.c_str(), 0, static_cast<DWORD>(verbuf.size()), &verbuf[0])) return Strings::EMPTY;
void* rootblock;
UINT rootblocksize;
- if (!VerQueryValueW(&verbuf[0], L"\\", &rootblock, &rootblocksize)) return "";
+ if (!VerQueryValueW(&verbuf[0], L"\\", &rootblock, &rootblocksize)) return Strings::EMPTY;
auto rootblock_ffi = static_cast<VS_FIXEDFILEINFO*>(rootblock);
@@ -150,7 +152,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));
@@ -158,7 +160,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));
@@ -223,25 +225,25 @@ namespace vcpkg::Metrics
return hkcu_sqmclient.value_or(L"{}");
}
- void set_user_information(const std::string& user_id, const std::string& first_use_time)
+ void Metrics::set_user_information(const std::string& user_id, const std::string& first_use_time)
{
g_metricmessage.user_id = user_id;
g_metricmessage.user_timestamp = first_use_time;
}
- void init_user_information(std::string& user_id, std::string& first_use_time)
+ void Metrics::init_user_information(std::string& user_id, std::string& first_use_time)
{
user_id = generate_random_UUID();
first_use_time = get_current_date_time();
}
- void set_send_metrics(bool should_send_metrics) { g_should_send_metrics = should_send_metrics; }
+ void Metrics::set_send_metrics(bool should_send_metrics) { g_should_send_metrics = should_send_metrics; }
- void set_print_metrics(bool should_print_metrics) { g_should_print_metrics = should_print_metrics; }
+ void Metrics::set_print_metrics(bool should_print_metrics) { g_should_print_metrics = should_print_metrics; }
- void track_metric(const std::string& name, double value) { g_metricmessage.TrackMetric(name, value); }
+ void Metrics::track_metric(const std::string& name, double value) { g_metricmessage.track_metric(name, value); }
- void track_property(const std::string& name, const std::wstring& 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;
@@ -249,85 +251,85 @@ namespace vcpkg::Metrics
std::transform(
value.begin(), value.end(), converted_value.begin(), [](wchar_t ch) { return static_cast<char>(ch); });
- g_metricmessage.TrackProperty(name, converted_value);
+ g_metricmessage.track_property(name, converted_value);
}
- void track_property(const std::string& name, const std::string& 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 upload(const std::string& payload)
+ void Metrics::upload(const std::string& payload)
{
- HINTERNET hSession = nullptr, hConnect = nullptr, hRequest = nullptr;
- BOOL bResults = FALSE;
+ 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();
@@ -336,22 +338,22 @@ namespace vcpkg::Metrics
#endif
}
- if (hRequest) WinHttpCloseHandle(hRequest);
- if (hConnect) WinHttpCloseHandle(hConnect);
- if (hSession) WinHttpCloseHandle(hSession);
+ if (request) WinHttpCloseHandle(request);
+ if (connect) WinHttpCloseHandle(connect);
+ if (session) WinHttpCloseHandle(session);
}
static fs::path get_bindir()
{
wchar_t buf[_MAX_PATH];
- int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH);
+ const int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH);
if (bytes == 0) std::abort();
return fs::path(buf, buf + bytes);
}
- void flush()
+ void Metrics::flush()
{
- std::string payload = g_metricmessage.format_event_data_template();
+ 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;
@@ -375,7 +377,7 @@ namespace vcpkg::Metrics
path = vcpkgdir / "scripts" / "vcpkgmetricsuploader.exe";
if (fs.exists(path)) return path;
- return L"";
+ return Strings::WEMPTY;
}();
std::error_code ec;
@@ -386,8 +388,8 @@ 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 =
+ const std::wstring cmd_line =
Strings::wformat(L"start %s %s", temp_folder_path_exe.native(), vcpkg_metrics_txt_path.native());
- System::cmd_execute_clean(cmdLine);
+ System::cmd_execute_clean(cmd_line);
}
}
diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/test_install_plan.cpp
index d02af5662..6c9311264 100644
--- a/toolsrc/src/test_install_plan.cpp
+++ b/toolsrc/src/test_install_plan.cpp
@@ -6,32 +6,62 @@ using namespace Microsoft::VisualStudio::CppUnitTestFramework;
using namespace vcpkg;
-namespace UnitTest1
+namespace Microsoft::VisualStudio::CppUnitTestFramework
{
- class InstallPlanTests : public TestClass<InstallPlanTests>
+ template<>
+ inline std::wstring ToString<vcpkg::Dependencies::InstallPlanType>(const vcpkg::Dependencies::InstallPlanType& t)
{
- struct PackageSpecMap
+ switch (t)
{
- std::unordered_map<PackageSpec, SourceControlFile> map;
- Triplet triplet;
- PackageSpecMap(const Triplet& t) { triplet = t; }
+ case Dependencies::InstallPlanType::ALREADY_INSTALLED: return L"ALREADY_INSTALLED";
+ case Dependencies::InstallPlanType::BUILD_AND_INSTALL: return L"BUILD_AND_INSTALL";
+ case Dependencies::InstallPlanType::INSTALL: return L"INSTALL";
+ case Dependencies::InstallPlanType::UNKNOWN: return L"UNKNOWN";
+ default: return ToString((int)t);
+ }
+ }
- PackageSpec get_package_spec(std::vector<std::unordered_map<std::string, std::string>>&& fields)
- {
- auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::move(fields));
- Assert::IsTrue(m_pgh.has_value());
- auto& scf = *m_pgh.get();
+ template<>
+ inline std::wstring ToString<vcpkg::Dependencies::RequestType>(const vcpkg::Dependencies::RequestType& t)
+ {
+ switch (t)
+ {
+ case Dependencies::RequestType::AUTO_SELECTED: return L"AUTO_SELECTED";
+ case Dependencies::RequestType::USER_REQUESTED: return L"USER_REQUESTED";
+ case Dependencies::RequestType::UNKNOWN: return L"UNKNOWN";
+ default: return ToString((int)t);
+ }
+ }
+}
- auto spec = PackageSpec::from_name_and_triplet(scf->core_paragraph->name, triplet);
- Assert::IsTrue(spec.has_value());
- map.emplace(*spec.get(), std::move(*scf.get()));
- return PackageSpec{*spec.get()};
- }
- PackageSpec set_package_map(std::string source, std::string version, std::string build_depends)
+namespace UnitTest1
+{
+ class InstallPlanTests : public TestClass<InstallPlanTests>
+ {
+ static std::unique_ptr<SourceControlFile> make_control_file(
+ const char* name,
+ const char* depends,
+ const std::vector<std::pair<const char*, const char*>>& features = {})
+ {
+ using Pgh = std::unordered_map<std::string, std::string>;
+ std::vector<Pgh> scf_pghs;
+ scf_pghs.push_back(Pgh{
+ {"Source", name},
+ {"Version", "0"},
+ {"Build-Depends", depends},
+ });
+ for (auto&& feature : features)
{
- return get_package_spec({{{"Source", source}, {"Version", version}, {"Build-Depends", build_depends}}});
+ scf_pghs.push_back(Pgh{
+ {"Feature", feature.first},
+ {"Description", "feature"},
+ {"Build-Depends", feature.second},
+ });
}
- };
+ auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::move(scf_pghs));
+ Assert::IsTrue(m_pgh.has_value());
+ return std::move(*m_pgh.get());
+ }
static void features_check(Dependencies::AnyAction* install_action,
std::string pkg_name,
@@ -68,16 +98,60 @@ namespace UnitTest1
Assert::AreEqual(pkg_name.c_str(), plan.spec.name().c_str());
}
+ static std::unique_ptr<StatusParagraph> make_status_pgh(const char* name, const char* depends = "")
+ {
+ using Pgh = std::unordered_map<std::string, std::string>;
+ return std::make_unique<StatusParagraph>(Pgh{{"Package", name},
+ {"Version", "1"},
+ {"Architecture", "x86-windows"},
+ {"Multi-Arch", "same"},
+ {"Depends", depends},
+ {"Status", "install ok installed"}});
+ }
+ static std::unique_ptr<StatusParagraph> make_status_feature_pgh(const char* name,
+ const char* feature,
+ const char* depends = "")
+ {
+ using Pgh = std::unordered_map<std::string, std::string>;
+ return std::make_unique<StatusParagraph>(Pgh{{"Package", name},
+ {"Version", "1"},
+ {"Feature", feature},
+ {"Architecture", "x86-windows"},
+ {"Multi-Arch", "same"},
+ {"Depends", depends},
+ {"Status", "install ok installed"}});
+ }
+ struct PackageSpecMap
+ {
+ std::unordered_map<std::string, SourceControlFile> map;
+ Triplet triplet;
+ PackageSpecMap(const Triplet& t) { triplet = t; }
+
+ PackageSpec emplace(const char* name,
+ const char* depends = "",
+ const std::vector<std::pair<const char*, const char*>>& features = {})
+ {
+ return emplace(std::move(*make_control_file(name, depends, features)));
+ }
+ PackageSpec emplace(vcpkg::SourceControlFile&& scf)
+ {
+ auto spec = PackageSpec::from_name_and_triplet(scf.core_paragraph->name, triplet);
+ Assert::IsTrue(spec.has_value());
+ map.emplace(scf.core_paragraph->name, std::move(scf));
+ return PackageSpec{*spec.get()};
+ }
+ };
+
TEST_METHOD(basic_install_scheme)
{
std::vector<std::unique_ptr<StatusParagraph>> status_paragraphs;
PackageSpecMap spec_map(Triplet::X86_WINDOWS);
- auto spec_a = spec_map.set_package_map("a", "1.2.8", "b");
- auto spec_b = spec_map.set_package_map("b", "1.3", "c");
- auto spec_c = spec_map.set_package_map("c", "2.5.3", "");
+ auto spec_a = spec_map.emplace("a", "b");
+ auto spec_b = spec_map.emplace("b", "c");
+ auto spec_c = spec_map.emplace("c");
- auto map_port = Dependencies::MapPortFile(spec_map.map);
+ Dependencies::MapPortFile map_port(spec_map.map);
auto install_plan =
Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs)));
@@ -92,16 +166,16 @@ namespace UnitTest1
std::vector<std::unique_ptr<StatusParagraph>> status_paragraphs;
PackageSpecMap spec_map(Triplet::X86_WINDOWS);
- auto spec_a = spec_map.set_package_map("a", "1.2.8", "d");
- auto spec_b = spec_map.set_package_map("b", "1.3", "d, e");
- auto spec_c = spec_map.set_package_map("c", "2.5.3", "e, h");
- auto spec_d = spec_map.set_package_map("d", "4.0", "f, g, h");
- auto spec_e = spec_map.set_package_map("e", "1.0", "g");
- auto spec_f = spec_map.set_package_map("f", "1.0", "");
- auto spec_g = spec_map.set_package_map("g", "1.0", "");
- auto spec_h = spec_map.set_package_map("h", "1.0", "");
-
- auto map_port = Dependencies::MapPortFile(spec_map.map);
+ auto spec_a = spec_map.emplace("a", "d");
+ auto spec_b = spec_map.emplace("b", "d, e");
+ auto spec_c = spec_map.emplace("c", "e, h");
+ auto spec_d = spec_map.emplace("d", "f, g, h");
+ auto spec_e = spec_map.emplace("e", "g");
+ auto spec_f = spec_map.emplace("f");
+ auto spec_g = spec_map.emplace("g");
+ auto spec_h = spec_map.emplace("h");
+
+ Dependencies::MapPortFile map_port(spec_map.map);
auto install_plan = Dependencies::create_install_plan(
map_port, {spec_a, spec_b, spec_c}, StatusParagraphs(std::move(status_paragraphs)));
@@ -127,37 +201,74 @@ namespace UnitTest1
Assert::IsTrue(e_pos > g_pos);
}
+ TEST_METHOD(existing_package_scheme)
+ {
+ std::vector<std::unique_ptr<StatusParagraph>> status_paragraphs;
+ status_paragraphs.push_back(make_status_pgh("a"));
+
+ PackageSpecMap spec_map(Triplet::X86_WINDOWS);
+ auto spec_a = FullPackageSpec{spec_map.emplace("a")};
+
+ auto install_plan =
+ Dependencies::create_feature_install_plan(spec_map.map,
+ FullPackageSpec::to_feature_specs({spec_a}),
+ StatusParagraphs(std::move(status_paragraphs)));
+
+ Assert::AreEqual(size_t(1), install_plan.size());
+ auto p = install_plan[0].install_plan.get();
+ Assert::IsNotNull(p);
+ Assert::AreEqual("a", p->spec.name().c_str());
+ Assert::AreEqual(Dependencies::InstallPlanType::ALREADY_INSTALLED, p->plan_type);
+ Assert::AreEqual(Dependencies::RequestType::USER_REQUESTED, p->request_type);
+ }
+
+ TEST_METHOD(user_requested_package_scheme)
+ {
+ std::vector<std::unique_ptr<StatusParagraph>> status_paragraphs;
+
+ PackageSpecMap spec_map(Triplet::X86_WINDOWS);
+ auto spec_a = FullPackageSpec{spec_map.emplace("a", "b")};
+ auto spec_b = FullPackageSpec{spec_map.emplace("b")};
+
+ auto install_plan =
+ Dependencies::create_feature_install_plan(spec_map.map,
+ FullPackageSpec::to_feature_specs({spec_a}),
+ StatusParagraphs(std::move(status_paragraphs)));
+
+ Assert::AreEqual(size_t(2), install_plan.size());
+ auto p = install_plan[0].install_plan.get();
+ Assert::IsNotNull(p);
+ Assert::AreEqual("b", p->spec.name().c_str());
+ Assert::AreEqual(Dependencies::InstallPlanType::BUILD_AND_INSTALL, p->plan_type);
+ Assert::AreEqual(Dependencies::RequestType::AUTO_SELECTED, p->request_type);
+
+ auto p2 = install_plan[1].install_plan.get();
+ Assert::IsNotNull(p2);
+ Assert::AreEqual("a", p2->spec.name().c_str());
+ Assert::AreEqual(Dependencies::InstallPlanType::BUILD_AND_INSTALL, p2->plan_type);
+ Assert::AreEqual(Dependencies::RequestType::USER_REQUESTED, p2->request_type);
+ }
+
TEST_METHOD(long_install_scheme)
{
- using Pgh = std::unordered_map<std::string, std::string>;
std::vector<std::unique_ptr<StatusParagraph>> status_paragraphs;
- status_paragraphs.push_back(std::make_unique<StatusParagraph>(Pgh{{"Package", "j"},
- {"Version", "1.2.8"},
- {"Architecture", "x86-windows"},
- {"Multi-Arch", "same"},
- {"Depends", "k"},
- {"Status", "install ok installed"}}));
- status_paragraphs.push_back(std::make_unique<StatusParagraph>(Pgh{{"Package", "k"},
- {"Version", "1.2.8"},
- {"Architecture", "x86-windows"},
- {"Multi-Arch", "same"},
- {"Depends", ""},
- {"Status", "install ok installed"}}));
+ status_paragraphs.push_back(make_status_pgh("j", "k"));
+ status_paragraphs.push_back(make_status_pgh("k"));
PackageSpecMap spec_map(Triplet::X86_WINDOWS);
- auto spec_a = spec_map.set_package_map("a", "1.2.8", "b, c, d, e, f, g, h, j, k");
- auto spec_b = spec_map.set_package_map("b", "1.2.8", "c, d, e, f, g, h, j, k");
- auto spec_c = spec_map.set_package_map("c", "1.2.8", "d, e, f, g, h, j, k");
- auto spec_d = spec_map.set_package_map("d", "1.2.8", "e, f, g, h, j, k");
- auto spec_e = spec_map.set_package_map("e", "1.2.8", "f, g, h, j, k");
- auto spec_f = spec_map.set_package_map("f", "1.2.8", "g, h, j, k");
- auto spec_g = spec_map.set_package_map("g", "1.2.8", "h, j, k");
- auto spec_h = spec_map.set_package_map("h", "1.2.8", "j, k");
- auto spec_j = spec_map.set_package_map("j", "1.2.8", "k");
- auto spec_k = spec_map.set_package_map("k", "1.2.8", "");
-
- auto map_port = Dependencies::MapPortFile(spec_map.map);
+ auto spec_a = spec_map.emplace("a", "b, c, d, e, f, g, h, j, k");
+ auto spec_b = spec_map.emplace("b", "c, d, e, f, g, h, j, k");
+ auto spec_c = spec_map.emplace("c", "d, e, f, g, h, j, k");
+ auto spec_d = spec_map.emplace("d", "e, f, g, h, j, k");
+ auto spec_e = spec_map.emplace("e", "f, g, h, j, k");
+ auto spec_f = spec_map.emplace("f", "g, h, j, k");
+ auto spec_g = spec_map.emplace("g", "h, j, k");
+ auto spec_h = spec_map.emplace("h", "j, k");
+ auto spec_j = spec_map.emplace("j", "k");
+ auto spec_k = spec_map.emplace("k");
+
+ Dependencies::MapPortFile map_port(spec_map.map);
auto install_plan =
Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs)));
@@ -174,162 +285,85 @@ namespace UnitTest1
TEST_METHOD(basic_feature_test_1)
{
- using Pgh = std::unordered_map<std::string, std::string>;
-
std::vector<std::unique_ptr<StatusParagraph>> status_paragraphs;
- status_paragraphs.push_back(std::make_unique<StatusParagraph>(Pgh{{"Package", "a"},
- {"Default-Features", ""},
- {"Version", "1.3.8"},
- {"Architecture", "x86-windows"},
- {"Multi-Arch", "same"},
- {"Depends", "b, b[beefeatureone]"},
- {"Status", "install ok installed"}}));
- status_paragraphs.push_back(std::make_unique<StatusParagraph>(Pgh{{"Package", "b"},
- {"Feature", "beefeatureone"},
- {"Architecture", "x86-windows"},
- {"Multi-Arch", "same"},
- {"Depends", ""},
- {"Status", "install ok installed"}}));
- status_paragraphs.push_back(std::make_unique<StatusParagraph>(Pgh{{"Package", "b"},
- {"Default-Features", "beefeatureone"},
- {"Version", "1.3"},
- {"Architecture", "x86-windows"},
- {"Multi-Arch", "same"},
- {"Depends", ""},
- {"Status", "install ok installed"}}));
+ status_paragraphs.push_back(make_status_pgh("a", "b, b[b1]"));
+ status_paragraphs.push_back(make_status_pgh("b"));
+ status_paragraphs.push_back(make_status_feature_pgh("b", "b1"));
PackageSpecMap spec_map(Triplet::X86_WINDOWS);
- auto spec_a =
- FullPackageSpec{spec_map.get_package_spec({
- {{"Source", "a"}, {"Version", "1.3.8"}, {"Build-Depends", "b, b[beefeatureone]"}},
- {{"Feature", "featureone"},
- {"Description", "the first feature for a"},
- {"Build-Depends", "b[beefeaturetwo]"}},
- }),
- {"featureone"}};
- auto spec_b = FullPackageSpec{spec_map.get_package_spec({
- {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}},
- {{"Feature", "beefeatureone"}, {"Description", "the first feature for b"}, {"Build-Depends", ""}},
- {{"Feature", "beefeaturetwo"}, {"Description", "the second feature for b"}, {"Build-Depends", ""}},
- {{"Feature", "beefeaturethree"}, {"Description", "the third feature for b"}, {"Build-Depends", ""}},
- })};
+ auto spec_a = FullPackageSpec{spec_map.emplace("a", "b, b[b1]", {{"a1", "b[b2]"}}), {"a1"}};
+ auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}, {"b3", ""}})};
- auto install_plan = Dependencies::create_feature_install_plan(
- spec_map.map, {spec_a}, StatusParagraphs(std::move(status_paragraphs)));
+ auto install_plan =
+ Dependencies::create_feature_install_plan(spec_map.map,
+ FullPackageSpec::to_feature_specs({spec_a}),
+ StatusParagraphs(std::move(status_paragraphs)));
Assert::AreEqual(size_t(4), install_plan.size());
remove_plan_check(&install_plan[0], "a");
remove_plan_check(&install_plan[1], "b");
- features_check(&install_plan[2], "b", {"beefeatureone", "core", "beefeatureone"});
- features_check(&install_plan[3], "a", {"featureone", "core"});
+ features_check(&install_plan[2], "b", {"b1", "core", "b1"});
+ features_check(&install_plan[3], "a", {"a1", "core"});
}
TEST_METHOD(basic_feature_test_2)
{
- using Pgh = std::unordered_map<std::string, std::string>;
-
std::vector<std::unique_ptr<StatusParagraph>> status_paragraphs;
PackageSpecMap spec_map(Triplet::X86_WINDOWS);
- auto spec_a =
- FullPackageSpec{spec_map.get_package_spec(
- {{{"Source", "a"}, {"Version", "1.3.8"}, {"Build-Depends", "b[beefeatureone]"}},
- {{"Feature", "featureone"},
- {"Description", "the first feature for a"},
- {"Build-Depends", "b[beefeaturetwo]"}}
-
- }),
- {"featureone"}};
- auto spec_b = FullPackageSpec{spec_map.get_package_spec({
- {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}},
- {{"Feature", "beefeatureone"}, {"Description", "the first feature for b"}, {"Build-Depends", ""}},
- {{"Feature", "beefeaturetwo"}, {"Description", "the second feature for b"}, {"Build-Depends", ""}},
- {{"Feature", "beefeaturethree"}, {"Description", "the third feature for b"}, {"Build-Depends", ""}},
- })};
+ auto spec_a = FullPackageSpec{spec_map.emplace("a", "b[b1]", {{"a1", "b[b2]"}}), {"a1"}};
+ auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}, {"b3", ""}})};
- auto install_plan = Dependencies::create_feature_install_plan(
- spec_map.map, {spec_a}, StatusParagraphs(std::move(status_paragraphs)));
+ auto install_plan =
+ Dependencies::create_feature_install_plan(spec_map.map,
+ FullPackageSpec::to_feature_specs({spec_a}),
+ StatusParagraphs(std::move(status_paragraphs)));
Assert::AreEqual(size_t(2), install_plan.size());
- features_check(&install_plan[0], "b", {"beefeatureone", "beefeaturetwo", "core"});
- features_check(&install_plan[1], "a", {"featureone", "core"});
+ features_check(&install_plan[0], "b", {"b1", "b2", "core"});
+ features_check(&install_plan[1], "a", {"a1", "core"});
}
TEST_METHOD(basic_feature_test_3)
{
- using Pgh = std::unordered_map<std::string, std::string>;
-
std::vector<std::unique_ptr<StatusParagraph>> status_paragraphs;
- status_paragraphs.push_back(std::make_unique<StatusParagraph>(Pgh{{"Package", "a"},
- {"Default-Features", ""},
- {"Version", "1.3"},
- {"Architecture", "x86-windows"},
- {"Multi-Arch", "same"},
- {"Depends", ""},
- {"Status", "install ok installed"}}));
+ status_paragraphs.push_back(make_status_pgh("a"));
PackageSpecMap spec_map(Triplet::X86_WINDOWS);
- auto spec_a = FullPackageSpec{
- spec_map.get_package_spec(
- {{{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", "b"}},
- {{"Feature", "one"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}}),
- {"core"}};
- auto spec_b = FullPackageSpec{spec_map.get_package_spec({
- {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}},
- })};
- auto spec_c = FullPackageSpec{spec_map.get_package_spec({
- {{"Source", "c"}, {"Version", "1.3"}, {"Build-Depends", "a[one]"}},
- }),
- {"core"}};
+ auto spec_a = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}};
+ auto spec_b = FullPackageSpec{spec_map.emplace("b")};
+ auto spec_c = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}};
- auto install_plan = Dependencies::create_feature_install_plan(
- spec_map.map, {spec_c, spec_a}, StatusParagraphs(std::move(status_paragraphs)));
+ auto install_plan =
+ Dependencies::create_feature_install_plan(spec_map.map,
+ FullPackageSpec::to_feature_specs({spec_c, spec_a}),
+ StatusParagraphs(std::move(status_paragraphs)));
Assert::AreEqual(size_t(4), install_plan.size());
remove_plan_check(&install_plan[0], "a");
features_check(&install_plan[1], "b", {"core"});
- features_check(&install_plan[2], "a", {"one", "core"});
+ features_check(&install_plan[2], "a", {"a1", "core"});
features_check(&install_plan[3], "c", {"core"});
}
TEST_METHOD(basic_feature_test_4)
{
- using Pgh = std::unordered_map<std::string, std::string>;
-
std::vector<std::unique_ptr<StatusParagraph>> status_paragraphs;
- status_paragraphs.push_back(std::make_unique<StatusParagraph>(Pgh{{"Package", "a"},
- {"Default-Features", ""},
- {"Version", "1.3"},
- {"Architecture", "x86-windows"},
- {"Multi-Arch", "same"},
- {"Depends", ""},
- {"Status", "install ok installed"}}));
- status_paragraphs.push_back(std::make_unique<StatusParagraph>(Pgh{{"Package", "a"},
- {"Feature", "one"},
- {"Architecture", "x86-windows"},
- {"Multi-Arch", "same"},
- {"Depends", ""},
- {"Status", "install ok installed"}}));
+ status_paragraphs.push_back(make_status_pgh("a"));
+ status_paragraphs.push_back(make_status_feature_pgh("a", "a1", ""));
PackageSpecMap spec_map(Triplet::X86_WINDOWS);
- auto spec_a = FullPackageSpec{
- spec_map.get_package_spec(
- {{{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", "b"}},
- {{"Feature", "one"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}}),
- };
- auto spec_b = FullPackageSpec{spec_map.get_package_spec({
- {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}},
- })};
- auto spec_c = FullPackageSpec{spec_map.get_package_spec({
- {{"Source", "c"}, {"Version", "1.3"}, {"Build-Depends", "a[one]"}},
- }),
- {"core"}};
+ auto spec_a = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}})};
+ auto spec_b = FullPackageSpec{spec_map.emplace("b")};
+ auto spec_c = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}};
- auto install_plan = Dependencies::create_feature_install_plan(
- spec_map.map, {spec_c}, StatusParagraphs(std::move(status_paragraphs)));
+ auto install_plan =
+ Dependencies::create_feature_install_plan(spec_map.map,
+ FullPackageSpec::to_feature_specs({spec_c}),
+ StatusParagraphs(std::move(status_paragraphs)));
Assert::AreEqual(size_t(1), install_plan.size());
features_check(&install_plan[0], "c", {"core"});
@@ -337,168 +371,93 @@ namespace UnitTest1
TEST_METHOD(basic_feature_test_5)
{
- using Pgh = std::unordered_map<std::string, std::string>;
-
std::vector<std::unique_ptr<StatusParagraph>> status_paragraphs;
PackageSpecMap spec_map(Triplet::X86_WINDOWS);
- auto spec_a = FullPackageSpec{
- spec_map.get_package_spec(
- {{{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", ""}},
- {{"Feature", "1"}, {"Description", "the first feature for a"}, {"Build-Depends", "b[1]"}},
- {{"Feature", "2"}, {"Description", "the first feature for a"}, {"Build-Depends", "b[2]"}},
- {{"Feature", "3"}, {"Description", "the first feature for a"}, {"Build-Depends", "a[2]"}}}),
- {"3"}};
- auto spec_b = FullPackageSpec{spec_map.get_package_spec({
- {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}},
- {{"Feature", "1"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}},
- {{"Feature", "2"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}},
- })};
+ auto spec_a =
+ FullPackageSpec{spec_map.emplace("a", "", {{"a1", "b[b1]"}, {"a2", "b[b2]"}, {"a3", "a[a2]"}}), {"a3"}};
+ auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}})};
- auto install_plan = Dependencies::create_feature_install_plan(
- spec_map.map, {spec_a}, StatusParagraphs(std::move(status_paragraphs)));
+ auto install_plan =
+ Dependencies::create_feature_install_plan(spec_map.map,
+ FullPackageSpec::to_feature_specs({spec_a}),
+ StatusParagraphs(std::move(status_paragraphs)));
Assert::AreEqual(size_t(2), install_plan.size());
- features_check(&install_plan[0], "b", {"core", "2"});
- features_check(&install_plan[1], "a", {"core", "3", "2"});
+ features_check(&install_plan[0], "b", {"core", "b2"});
+ features_check(&install_plan[1], "a", {"core", "a3", "a2"});
}
TEST_METHOD(basic_feature_test_6)
{
- using Pgh = std::unordered_map<std::string, std::string>;
-
std::vector<std::unique_ptr<StatusParagraph>> status_paragraphs;
- status_paragraphs.push_back(std::make_unique<StatusParagraph>(Pgh{{"Package", "b"},
- {"Default-Features", ""},
- {"Version", "1.3"},
- {"Architecture", "x86-windows"},
- {"Multi-Arch", "same"},
- {"Depends", ""},
- {"Status", "install ok installed"}}));
- PackageSpecMap spec_map(Triplet::X86_WINDOWS);
+ status_paragraphs.push_back(make_status_pgh("b"));
- auto spec_a = FullPackageSpec{spec_map.get_package_spec({
- {{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", "b[core]"}},
- }),
- {"core"}};
- auto spec_b = FullPackageSpec{
- spec_map.get_package_spec({
- {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}},
- {{"Feature", "1"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}},
- }),
- {"1"}};
+ PackageSpecMap spec_map(Triplet::X86_WINDOWS);
+ auto spec_a = FullPackageSpec{spec_map.emplace("a", "b[core]"), {"core"}};
+ auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}}), {"b1"}};
- auto install_plan = Dependencies::create_feature_install_plan(
- spec_map.map, {spec_a, spec_b}, StatusParagraphs(std::move(status_paragraphs)));
+ auto install_plan =
+ Dependencies::create_feature_install_plan(spec_map.map,
+ FullPackageSpec::to_feature_specs({spec_a, spec_b}),
+ StatusParagraphs(std::move(status_paragraphs)));
Assert::AreEqual(size_t(3), install_plan.size());
remove_plan_check(&install_plan[0], "b");
- features_check(&install_plan[1], "b", {"core", "1"});
+ features_check(&install_plan[1], "b", {"core", "b1"});
features_check(&install_plan[2], "a", {"core"});
}
TEST_METHOD(basic_feature_test_7)
{
- using Pgh = std::unordered_map<std::string, std::string>;
-
std::vector<std::unique_ptr<StatusParagraph>> status_paragraphs;
- status_paragraphs.push_back(std::make_unique<StatusParagraph>(Pgh{{"Package", "x"},
- {"Default-Features", ""},
- {"Version", "1.3"},
- {"Architecture", "x86-windows"},
- {"Multi-Arch", "same"},
- {"Depends", "b"},
- {"Status", "install ok installed"}}));
- status_paragraphs.push_back(std::make_unique<StatusParagraph>(Pgh{{"Package", "b"},
- {"Default-Features", ""},
- {"Version", "1.3"},
- {"Architecture", "x86-windows"},
- {"Multi-Arch", "same"},
- {"Depends", ""},
- {"Status", "install ok installed"}}));
+ status_paragraphs.push_back(make_status_pgh("x", "b"));
+ status_paragraphs.push_back(make_status_pgh("b"));
+
PackageSpecMap spec_map(Triplet::X86_WINDOWS);
- auto spec_a = FullPackageSpec{spec_map.get_package_spec({
- {{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", ""}},
- })};
- auto spec_x = FullPackageSpec{spec_map.get_package_spec({
- {{"Source", "x"}, {"Version", "1.3"}, {"Build-Depends", "a"}},
- }),
- {"core"}};
- auto spec_b = FullPackageSpec{
- spec_map.get_package_spec({
- {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}, {"Default-Features", ""}},
- {{"Feature", "1"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}},
- }),
- {"1"}};
+ auto spec_a = FullPackageSpec{spec_map.emplace("a")};
+ auto spec_x = FullPackageSpec{spec_map.emplace("x", "a"), {"core"}};
+ auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}}), {"b1"}};
- auto install_plan = Dependencies::create_feature_install_plan(
- spec_map.map, {spec_b, spec_x}, StatusParagraphs(std::move(status_paragraphs)));
+ auto install_plan =
+ Dependencies::create_feature_install_plan(spec_map.map,
+ FullPackageSpec::to_feature_specs({spec_b}),
+ StatusParagraphs(std::move(status_paragraphs)));
Assert::AreEqual(size_t(5), install_plan.size());
remove_plan_check(&install_plan[0], "x");
remove_plan_check(&install_plan[1], "b");
// TODO: order here may change but A < X, and B anywhere
- features_check(&install_plan[2], "a", {"core"});
- features_check(&install_plan[3], "x", {"core"});
- features_check(&install_plan[4], "b", {"core", "1"});
+ features_check(&install_plan[2], "b", {"core", "b1"});
+ features_check(&install_plan[3], "a", {"core"});
+ features_check(&install_plan[4], "x", {"core"});
}
TEST_METHOD(basic_feature_test_8)
{
- using Pgh = std::unordered_map<std::string, std::string>;
-
std::vector<std::unique_ptr<StatusParagraph>> status_paragraphs;
- status_paragraphs.push_back(std::make_unique<StatusParagraph>(Pgh{{"Package", "a"},
- {"Default-Features", ""},
- {"Version", "1.3"},
- {"Architecture", "x64-windows"},
- {"Multi-Arch", "same"},
- {"Depends", ""},
- {"Status", "install ok installed"}}));
- status_paragraphs.push_back(std::make_unique<StatusParagraph>(Pgh{{"Package", "a"},
- {"Default-Features", ""},
- {"Version", "1.3"},
- {"Architecture", "x86-windows"},
- {"Multi-Arch", "same"},
- {"Depends", ""},
- {"Status", "install ok installed"}}));
+ status_paragraphs.push_back(make_status_pgh("a"));
+ status_paragraphs.push_back(make_status_pgh("a"));
+ status_paragraphs.back()->package.spec =
+ PackageSpec::from_name_and_triplet("a", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO);
PackageSpecMap spec_map(Triplet::X64_WINDOWS);
-
- auto spec_a_64 = FullPackageSpec{
- spec_map.get_package_spec(
- {{{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", "b"}},
- {{"Feature", "one"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}}),
- {"core"}};
- auto spec_b_64 = FullPackageSpec{spec_map.get_package_spec({
- {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}},
- })};
- auto spec_c_64 = FullPackageSpec{spec_map.get_package_spec({
- {{"Source", "c"}, {"Version", "1.3"}, {"Build-Depends", "a[one]"}},
- }),
- {"core"}};
+ auto spec_a_64 = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}};
+ auto spec_b_64 = FullPackageSpec{spec_map.emplace("b")};
+ auto spec_c_64 = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}};
spec_map.triplet = Triplet::X86_WINDOWS;
- auto spec_a_86 = FullPackageSpec{
- spec_map.get_package_spec(
- {{{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", "b"}},
- {{"Feature", "one"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}}),
- {"core"}};
- auto spec_b_86 = FullPackageSpec{spec_map.get_package_spec({
- {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}},
- })};
- auto spec_c_86 = FullPackageSpec{spec_map.get_package_spec({
- {{"Source", "c"}, {"Version", "1.3"}, {"Build-Depends", "a[one]"}},
- }),
- {"core"}};
+ auto spec_a_86 = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}};
+ auto spec_b_86 = FullPackageSpec{spec_map.emplace("b")};
+ auto spec_c_86 = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}};
- auto install_plan =
- Dependencies::create_feature_install_plan(spec_map.map,
- {spec_c_64, spec_a_86, spec_a_64, spec_c_86},
- StatusParagraphs(std::move(status_paragraphs)));
+ auto install_plan = Dependencies::create_feature_install_plan(
+ spec_map.map,
+ FullPackageSpec::to_feature_specs({spec_c_64, spec_a_86, spec_a_64, spec_c_86}),
+ StatusParagraphs(std::move(status_paragraphs)));
/*Assert::AreEqual(size_t(8), install_plan.size());
auto iterator_pos = [&](const PackageSpec& spec, size_t start) -> int {
@@ -517,10 +476,10 @@ namespace UnitTest1
remove_plan_check(&install_plan[0], "a", Triplet::X64_WINDOWS);
remove_plan_check(&install_plan[1], "a");
features_check(&install_plan[2], "b", {"core"}, Triplet::X64_WINDOWS);
- features_check(&install_plan[3], "a", {"one", "core"}, Triplet::X64_WINDOWS);
+ features_check(&install_plan[3], "a", {"a1", "core"}, Triplet::X64_WINDOWS);
features_check(&install_plan[4], "c", {"core"}, Triplet::X64_WINDOWS);
features_check(&install_plan[5], "b", {"core"});
- features_check(&install_plan[6], "a", {"one", "core"});
+ features_check(&install_plan[6], "a", {"a1", "core"});
features_check(&install_plan[7], "c", {"core"});
}
};
diff --git a/toolsrc/src/tests_dependencies.cpp b/toolsrc/src/tests_dependencies.cpp
index 995d46873..6a6981d73 100644
--- a/toolsrc/src/tests_dependencies.cpp
+++ b/toolsrc/src/tests_dependencies.cpp
@@ -8,6 +8,7 @@
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
using namespace vcpkg;
+using Parse::parse_comma_list;
namespace UnitTest1
{
@@ -15,15 +16,15 @@ namespace UnitTest1
{
TEST_METHOD(parse_depends_one)
{
- auto v = expand_qualified_dependencies(parse_comma_list("libA [windows]"));
+ auto v = expand_qualified_dependencies(parse_comma_list("libA (windows)"));
Assert::AreEqual(size_t(1), v.size());
- Assert::AreEqual("libA", v[0].name.c_str());
+ Assert::AreEqual("libA", v[0].depend.name.c_str());
Assert::AreEqual("windows", v[0].qualifier.c_str());
}
TEST_METHOD(filter_depends)
{
- auto deps = expand_qualified_dependencies(parse_comma_list("libA [windows], libB, libC [uwp]"));
+ auto deps = expand_qualified_dependencies(parse_comma_list("libA (windows), libB, libC (uwp)"));
auto v = filter_dependencies(deps, Triplet::X64_WINDOWS);
Assert::AreEqual(size_t(2), v.size());
Assert::AreEqual("libA", v[0].c_str());
@@ -41,7 +42,15 @@ namespace UnitTest1
TEST_METHOD(parse_supports_all)
{
auto v = Supports::parse({
- "x64", "x86", "arm", "windows", "uwp", "v140", "v141", "crt-static", "crt-dynamic",
+ "x64",
+ "x86",
+ "arm",
+ "windows",
+ "uwp",
+ "v140",
+ "v141",
+ "crt-static",
+ "crt-dynamic",
});
Assert::AreNotEqual(uintptr_t(0), uintptr_t(v.get()));
@@ -74,7 +83,9 @@ namespace UnitTest1
TEST_METHOD(parse_supports_some)
{
auto v = Supports::parse({
- "x64", "x86", "windows",
+ "x64",
+ "x86",
+ "windows",
});
Assert::AreNotEqual(uintptr_t(0), uintptr_t(v.get()));
diff --git a/toolsrc/src/tests_package_spec.cpp b/toolsrc/src/tests_package_spec.cpp
new file mode 100644
index 000000000..fa201b372
--- /dev/null
+++ b/toolsrc/src/tests_package_spec.cpp
@@ -0,0 +1,119 @@
+#include "BinaryParagraph.h"
+#include "CppUnitTest.h"
+#include "Paragraphs.h"
+#include "vcpkg_Strings.h"
+
+#pragma comment(lib, "version")
+#pragma comment(lib, "winhttp")
+
+using namespace Microsoft::VisualStudio::CppUnitTestFramework;
+
+namespace Microsoft::VisualStudio::CppUnitTestFramework
+{
+ template<>
+ inline std::wstring ToString<vcpkg::PackageSpecParseResult>(const vcpkg::PackageSpecParseResult& t)
+ {
+ return ToString(static_cast<uint32_t>(t));
+ }
+
+ template<>
+ inline std::wstring ToString<vcpkg::PackageSpec>(const vcpkg::PackageSpec& t)
+ {
+ return ToString(t.to_string());
+ }
+}
+
+namespace Strings = vcpkg::Strings;
+
+namespace UnitTest1
+{
+ using namespace vcpkg;
+
+ class SpecifierConversion : public TestClass<SpecifierConversion>
+ {
+ TEST_METHOD(full_package_spec_to_feature_specs)
+ {
+ auto a_spec = PackageSpec::from_name_and_triplet("a", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO);
+ auto b_spec = PackageSpec::from_name_and_triplet("b", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO);
+
+ auto fspecs = FullPackageSpec::to_feature_specs({{a_spec, {"0", "1"}}, {b_spec, {"2", "3"}}});
+
+ Assert::AreEqual(size_t(6), fspecs.size());
+
+ 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)
+ {
+ Assert::AreEqual(features[i], fspecs[i].feature().c_str());
+ Assert::AreEqual(*specs[i], fspecs[i].spec());
+ }
+ }
+ };
+
+ class SpecifierParsing : public TestClass<SpecifierParsing>
+ {
+ TEST_METHOD(parsed_specifier_from_string)
+ {
+ auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib");
+ Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error());
+ auto spec = maybe_spec.get();
+ Assert::AreEqual("zlib", spec->name.c_str());
+ Assert::AreEqual(size_t(0), spec->features.size());
+ Assert::AreEqual("", spec->triplet.c_str());
+ }
+
+ TEST_METHOD(parsed_specifier_from_string_with_triplet)
+ {
+ auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib:x64-uwp");
+ Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error());
+ auto spec = maybe_spec.get();
+ Assert::AreEqual("zlib", spec->name.c_str());
+ Assert::AreEqual("x64-uwp", spec->triplet.c_str());
+ }
+
+ TEST_METHOD(parsed_specifier_from_string_with_colons)
+ {
+ auto ec = vcpkg::ParsedSpecifier::from_string("zlib:x86-uwp:").error();
+ Assert::AreEqual(vcpkg::PackageSpecParseResult::TOO_MANY_COLONS, ec);
+ }
+
+ TEST_METHOD(parsed_specifier_from_string_with_feature)
+ {
+ auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib[feature]:x64-uwp");
+ Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error());
+ auto spec = maybe_spec.get();
+ Assert::AreEqual("zlib", spec->name.c_str());
+ Assert::IsTrue(spec->features.size() == 1);
+ Assert::AreEqual("feature", spec->features.front().c_str());
+ Assert::AreEqual("x64-uwp", spec->triplet.c_str());
+ }
+
+ TEST_METHOD(parsed_specifier_from_string_with_many_features)
+ {
+ auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib[0, 1,2]");
+ Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error());
+ auto spec = maybe_spec.get();
+ Assert::AreEqual("zlib", spec->name.c_str());
+ Assert::IsTrue(spec->features.size() == 3);
+ Assert::AreEqual("0", spec->features[0].c_str());
+ Assert::AreEqual("1", spec->features[1].c_str());
+ Assert::AreEqual("2", spec->features[2].c_str());
+ Assert::AreEqual("", spec->triplet.c_str());
+ }
+
+ TEST_METHOD(utf8_to_utf16)
+ {
+ auto str = vcpkg::Strings::to_utf16("abc");
+ Assert::AreEqual(L"abc", str.c_str());
+ }
+
+ TEST_METHOD(utf8_to_utf16_with_whitespace)
+ {
+ auto str = vcpkg::Strings::to_utf16("abc -x86-windows");
+ Assert::AreEqual(L"abc -x86-windows", str.c_str());
+ }
+ };
+
+ TEST_CLASS(Metrics){};
+}
diff --git a/toolsrc/src/tests_paragraph.cpp b/toolsrc/src/tests_paragraph.cpp
index dd9a40160..47a07e12d 100644
--- a/toolsrc/src/tests_paragraph.cpp
+++ b/toolsrc/src/tests_paragraph.cpp
@@ -27,7 +27,8 @@ namespace UnitTest1
{
auto m_pgh =
vcpkg::SourceControlFile::parse_control_file(std::vector<std::unordered_map<std::string, std::string>>{{
- {"Source", "zlib"}, {"Version", "1.2.8"},
+ {"Source", "zlib"},
+ {"Version", "1.2.8"},
}});
Assert::IsTrue(m_pgh.has_value());
@@ -59,7 +60,7 @@ namespace UnitTest1
Assert::AreEqual("m", pgh->core_paragraph->maintainer.c_str());
Assert::AreEqual("d", pgh->core_paragraph->description.c_str());
Assert::AreEqual(size_t(1), pgh->core_paragraph->depends.size());
- Assert::AreEqual("bd", pgh->core_paragraph->depends[0].name.c_str());
+ Assert::AreEqual("bd", pgh->core_paragraph->depends[0].name().c_str());
Assert::AreEqual(size_t(1), pgh->core_paragraph->supports.size());
Assert::AreEqual("x64", pgh->core_paragraph->supports[0].c_str());
}
@@ -68,36 +69,42 @@ namespace UnitTest1
{
auto m_pgh =
vcpkg::SourceControlFile::parse_control_file(std::vector<std::unordered_map<std::string, std::string>>{{
- {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "z, openssl"},
+ {"Source", "zlib"},
+ {"Version", "1.2.8"},
+ {"Build-Depends", "z, openssl"},
}});
Assert::IsTrue(m_pgh.has_value());
auto& pgh = *m_pgh.get();
Assert::AreEqual(size_t(2), pgh->core_paragraph->depends.size());
- Assert::AreEqual("z", pgh->core_paragraph->depends[0].name.c_str());
- Assert::AreEqual("openssl", pgh->core_paragraph->depends[1].name.c_str());
+ Assert::AreEqual("z", pgh->core_paragraph->depends[0].name().c_str());
+ Assert::AreEqual("openssl", pgh->core_paragraph->depends[1].name().c_str());
}
TEST_METHOD(SourceParagraph_Three_Depends)
{
auto m_pgh =
vcpkg::SourceControlFile::parse_control_file(std::vector<std::unordered_map<std::string, std::string>>{{
- {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "z, openssl, xyz"},
+ {"Source", "zlib"},
+ {"Version", "1.2.8"},
+ {"Build-Depends", "z, openssl, xyz"},
}});
Assert::IsTrue(m_pgh.has_value());
auto& pgh = *m_pgh.get();
Assert::AreEqual(size_t(3), pgh->core_paragraph->depends.size());
- Assert::AreEqual("z", pgh->core_paragraph->depends[0].name.c_str());
- Assert::AreEqual("openssl", pgh->core_paragraph->depends[1].name.c_str());
- Assert::AreEqual("xyz", pgh->core_paragraph->depends[2].name.c_str());
+ Assert::AreEqual("z", pgh->core_paragraph->depends[0].name().c_str());
+ Assert::AreEqual("openssl", pgh->core_paragraph->depends[1].name().c_str());
+ Assert::AreEqual("xyz", pgh->core_paragraph->depends[2].name().c_str());
}
TEST_METHOD(SourceParagraph_Three_Supports)
{
auto m_pgh =
vcpkg::SourceControlFile::parse_control_file(std::vector<std::unordered_map<std::string, std::string>>{{
- {"Source", "zlib"}, {"Version", "1.2.8"}, {"Supports", "x64, windows, uwp"},
+ {"Source", "zlib"},
+ {"Version", "1.2.8"},
+ {"Supports", "x64, windows, uwp"},
}});
Assert::IsTrue(m_pgh.has_value());
auto& pgh = *m_pgh.get();
@@ -112,7 +119,9 @@ namespace UnitTest1
{
auto m_pgh =
vcpkg::SourceControlFile::parse_control_file(std::vector<std::unordered_map<std::string, std::string>>{{
- {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "libA [windows], libB [uwp]"},
+ {"Source", "zlib"},
+ {"Version", "1.2.8"},
+ {"Build-Depends", "libA (windows), libB (uwp)"},
}});
Assert::IsTrue(m_pgh.has_value());
auto& pgh = *m_pgh.get();
@@ -122,16 +131,19 @@ namespace UnitTest1
Assert::AreEqual("", pgh->core_paragraph->maintainer.c_str());
Assert::AreEqual("", pgh->core_paragraph->description.c_str());
Assert::AreEqual(size_t(2), pgh->core_paragraph->depends.size());
- Assert::AreEqual("libA", pgh->core_paragraph->depends[0].name.c_str());
+ Assert::AreEqual("libA", pgh->core_paragraph->depends[0].name().c_str());
Assert::AreEqual("windows", pgh->core_paragraph->depends[0].qualifier.c_str());
- Assert::AreEqual("libB", pgh->core_paragraph->depends[1].name.c_str());
+ Assert::AreEqual("libB", pgh->core_paragraph->depends[1].name().c_str());
Assert::AreEqual("uwp", pgh->core_paragraph->depends[1].qualifier.c_str());
}
TEST_METHOD(BinaryParagraph_Construct_Minimum)
{
vcpkg::BinaryParagraph pgh({
- {"Package", "zlib"}, {"Version", "1.2.8"}, {"Architecture", "x86-windows"}, {"Multi-Arch", "same"},
+ {"Package", "zlib"},
+ {"Version", "1.2.8"},
+ {"Architecture", "x86-windows"},
+ {"Multi-Arch", "same"},
});
Assert::AreEqual("zlib", pgh.spec.name().c_str());
@@ -320,7 +332,10 @@ namespace UnitTest1
TEST_METHOD(BinaryParagraph_serialize_min)
{
vcpkg::BinaryParagraph pgh({
- {"Package", "zlib"}, {"Version", "1.2.8"}, {"Architecture", "x86-windows"}, {"Multi-Arch", "same"},
+ {"Package", "zlib"},
+ {"Version", "1.2.8"},
+ {"Architecture", "x86-windows"},
+ {"Multi-Arch", "same"},
});
std::string ss = Strings::serialize(pgh);
auto pghs = vcpkg::Paragraphs::parse_paragraphs(ss).value_or_exit(VCPKG_LINE_INFO);
@@ -369,45 +384,5 @@ namespace UnitTest1
Assert::AreEqual(size_t(1), pghs.size());
Assert::AreEqual("a, b, c", pghs[0]["Depends"].c_str());
}
-
- TEST_METHOD(package_spec_parse)
- {
- vcpkg::ExpectedT<vcpkg::FullPackageSpec, vcpkg::PackageSpecParseResult> spec =
- vcpkg::FullPackageSpec::from_string("zlib", vcpkg::Triplet::X86_WINDOWS);
- Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, spec.error());
- Assert::AreEqual("zlib", spec.get()->package_spec.name().c_str());
- Assert::AreEqual(vcpkg::Triplet::X86_WINDOWS.canonical_name(),
- spec.get()->package_spec.triplet().canonical_name());
- }
-
- TEST_METHOD(package_spec_parse_with_arch)
- {
- vcpkg::ExpectedT<vcpkg::FullPackageSpec, vcpkg::PackageSpecParseResult> spec =
- vcpkg::FullPackageSpec::from_string("zlib:x64-uwp", vcpkg::Triplet::X86_WINDOWS);
- Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, spec.error());
- Assert::AreEqual("zlib", spec.get()->package_spec.name().c_str());
- Assert::AreEqual(vcpkg::Triplet::X64_UWP.canonical_name(),
- spec.get()->package_spec.triplet().canonical_name());
- }
-
- TEST_METHOD(package_spec_parse_with_multiple_colon)
- {
- auto ec = vcpkg::FullPackageSpec::from_string("zlib:x86-uwp:", vcpkg::Triplet::X86_WINDOWS).error();
- Assert::AreEqual(vcpkg::PackageSpecParseResult::TOO_MANY_COLONS, ec);
- }
-
- TEST_METHOD(utf8_to_utf16)
- {
- auto str = vcpkg::Strings::to_utf16("abc");
- Assert::AreEqual(L"abc", str.c_str());
- }
-
- TEST_METHOD(utf8_to_utf16_with_whitespace)
- {
- auto str = vcpkg::Strings::to_utf16("abc -x86-windows");
- Assert::AreEqual(L"abc -x86-windows", str.c_str());
- }
};
-
- TEST_CLASS(Metrics){};
}
diff --git a/toolsrc/src/triplet.cpp b/toolsrc/src/triplet.cpp
index 451deb040..3b56da02a 100644
--- a/toolsrc/src/triplet.cpp
+++ b/toolsrc/src/triplet.cpp
@@ -15,7 +15,7 @@ namespace vcpkg
bool operator==(const TripletInstance& o) const { return o.value == value; }
};
- const TripletInstance Triplet::default_instance({});
+ const TripletInstance Triplet::DEFAULT_INSTANCE({});
}
template<>
@@ -41,10 +41,10 @@ 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(), '-');
+ const 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/vcpkg.cpp b/toolsrc/src/vcpkg.cpp
index 738b7b284..f4300a73c 100644
--- a/toolsrc/src/vcpkg.cpp
+++ b/toolsrc/src/vcpkg.cpp
@@ -6,6 +6,7 @@
#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"
@@ -26,14 +27,14 @@ void invalid_command(const std::string& cmd)
static void inner(const VcpkgCmdArguments& args)
{
- Metrics::track_property("command", args.command);
+ Metrics::g_metrics.lock()->track_property("command", args.command);
if (args.command.empty())
{
Commands::Help::print_usage();
Checks::exit_fail(VCPKG_LINE_INFO);
}
- if (auto command_function = Commands::find(args.command, Commands::get_available_commands_type_c()))
+ if (const auto command_function = Commands::find(args.command, Commands::get_available_commands_type_c()))
{
return command_function(args);
}
@@ -46,7 +47,7 @@ static void inner(const VcpkgCmdArguments& args)
else
{
const Optional<std::wstring> vcpkg_root_dir_env = System::get_environment_variable(L"VCPKG_ROOT");
- if (auto v = vcpkg_root_dir_env.get())
+ if (const auto v = vcpkg_root_dir_env.get())
{
vcpkg_root_dir = fs::stdfs::absolute(*v);
}
@@ -66,10 +67,11 @@ 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);
- int exit_code = _wchdir(paths.root.c_str());
+ const int exit_code = _wchdir(paths.root.c_str());
Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Changing the working dir failed");
+ Commands::Version::warn_if_vcpkg_version_mismatch(paths);
- if (auto command_function = Commands::find(args.command, Commands::get_available_commands_type_b()))
+ if (const auto command_function = Commands::find(args.command, Commands::get_available_commands_type_b()))
{
return command_function(args, paths);
}
@@ -83,7 +85,7 @@ static void inner(const VcpkgCmdArguments& args)
{
const Optional<std::wstring> vcpkg_default_triplet_env =
System::get_environment_variable(L"VCPKG_DEFAULT_TRIPLET");
- if (auto v = vcpkg_default_triplet_env.get())
+ if (const auto v = vcpkg_default_triplet_env.get())
{
default_triplet = Triplet::from_canonical_name(Strings::to_utf8(*v));
}
@@ -95,7 +97,7 @@ static void inner(const VcpkgCmdArguments& args)
Input::check_triplet(default_triplet, paths);
- if (auto command_function = Commands::find(args.command, Commands::get_available_commands_type_a()))
+ if (const auto command_function = Commands::find(args.command, Commands::get_available_commands_type_a()))
{
return command_function(args, paths, default_triplet);
}
@@ -103,7 +105,7 @@ static void inner(const VcpkgCmdArguments& args)
return invalid_command(args.command);
}
-static void loadConfig()
+static void load_config()
{
fs::path localappdata;
{
@@ -117,7 +119,7 @@ static void loadConfig()
try
{
auto maybe_pghs = Paragraphs::get_paragraphs(Files::get_real_filesystem(), localappdata / "vcpkg" / "config");
- if (auto p_pghs = maybe_pghs.get())
+ if (const auto p_pghs = maybe_pghs.get())
{
const auto& pghs = *p_pghs;
@@ -134,7 +136,7 @@ static void loadConfig()
auto user_time = keys["User-Since"];
if (!user_id.empty() && !user_time.empty())
{
- Metrics::set_user_information(user_id, user_time);
+ Metrics::g_metrics.lock()->set_user_information(user_id, user_time);
return;
}
}
@@ -145,8 +147,11 @@ static void loadConfig()
// config file not found, could not be read, or invalid
std::string user_id, user_time;
- Metrics::init_user_information(user_id, user_time);
- Metrics::set_user_information(user_id, user_time);
+ {
+ auto locked_metrics = Metrics::g_metrics.lock();
+ locked_metrics->init_user_information(user_id, user_time);
+ locked_metrics->set_user_information(user_id, user_time);
+ }
try
{
std::error_code ec;
@@ -184,34 +189,37 @@ static std::string trim_path_from_command_line(const std::string& full_command_l
return std::string(it, full_command_line.cend());
}
-static ElapsedTime g_timer;
-
int wmain(const int argc, const wchar_t* const* const argv)
{
if (argc == 0) std::abort();
- g_timer = ElapsedTime::create_started();
- atexit([]() {
- auto elapsed_us = g_timer.microseconds();
- Metrics::track_metric("elapsed_us", elapsed_us);
- g_debugging = false;
- Metrics::flush();
- });
+ GlobalState::g_init_console_cp = GetConsoleCP();
+ GlobalState::g_init_console_output_cp = GetConsoleOutputCP();
+
+ SetConsoleCP(65001);
+ SetConsoleOutputCP(65001);
- Metrics::track_property("version", Commands::Version::version());
+ *GlobalState::timer.lock() = ElapsedTime::create_started();
const std::string trimmed_command_line = trim_path_from_command_line(Strings::to_utf8(GetCommandLineW()));
- Metrics::track_property("cmdline", trimmed_command_line);
- loadConfig();
- Metrics::track_property("sqmuser", Metrics::get_SQM_user());
+
+ {
+ auto locked_metrics = Metrics::g_metrics.lock();
+ locked_metrics->track_property("version", Commands::Version::version());
+ locked_metrics->track_property("cmdline", trimmed_command_line);
+ }
+ load_config();
+ Metrics::g_metrics.lock()->track_property("sqmuser", Metrics::get_SQM_user());
const VcpkgCmdArguments args = VcpkgCmdArguments::create_from_command_line(argc, argv);
- if (auto p = args.printmetrics.get()) Metrics::set_print_metrics(*p);
- if (auto p = args.sendmetrics.get()) Metrics::set_send_metrics(*p);
- if (auto p = args.debug.get()) g_debugging = *p;
+ if (const auto p = args.printmetrics.get()) Metrics::g_metrics.lock()->set_print_metrics(*p);
+ if (const auto p = args.sendmetrics.get()) Metrics::g_metrics.lock()->set_send_metrics(*p);
+ if (const auto p = args.debug.get()) GlobalState::debugging = *p;
+
+ Checks::register_console_ctrl_handler();
- if (g_debugging)
+ if (GlobalState::debugging)
{
inner(args);
Checks::exit_fail(VCPKG_LINE_INFO);
@@ -231,7 +239,7 @@ int wmain(const int argc, const wchar_t* const* const argv)
{
exc_msg = "unknown error(...)";
}
- Metrics::track_property("error", exc_msg);
+ Metrics::g_metrics.lock()->track_property("error", exc_msg);
fflush(stdout);
System::print("vcpkg.exe has crashed.\n"
diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp
index a0d690f37..d40140aca 100644
--- a/toolsrc/src/vcpkg_Build.cpp
+++ b/toolsrc/src/vcpkg_Build.cpp
@@ -8,6 +8,7 @@
#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"
@@ -29,46 +30,27 @@ namespace vcpkg::Build
CWStringView to_vcvarsall_target(const std::string& cmake_system_name)
{
- if (cmake_system_name == "") return L"";
- if (cmake_system_name == "Windows") return L"";
+ 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";
Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported vcvarsall target %s", cmake_system_name);
}
- CWStringView to_vcvarsall_toolchain(const std::string& target_architecture)
+ CWStringView to_vcvarsall_toolchain(const std::string& target_architecture, const Toolset& toolset)
{
- using CPU = System::CPUArchitecture;
+ auto maybe_target_arch = System::to_cpu_architecture(target_architecture);
+ Checks::check_exit(
+ VCPKG_LINE_INFO, maybe_target_arch.has_value(), "Invalid architecture string: %s", target_architecture);
+ auto target_arch = maybe_target_arch.value_or_exit(VCPKG_LINE_INFO);
+ auto host_architectures = System::get_supported_host_architectures();
- struct ArchOption
+ for (auto&& host : host_architectures)
{
- CWStringView name;
- CPU host_arch;
- CPU target_arch;
- };
-
- static constexpr ArchOption X86 = {L"x86", CPU::X86, CPU::X86};
- static constexpr ArchOption X86_X64 = {L"x86_x64", CPU::X86, CPU::X64};
- static constexpr ArchOption X86_ARM = {L"x86_arm", CPU::X86, CPU::ARM};
- static constexpr ArchOption X86_ARM64 = {L"x86_arm64", CPU::X86, CPU::ARM64};
-
- static constexpr ArchOption X64 = {L"amd64", CPU::X64, CPU::X64};
- static constexpr ArchOption X64_X86 = {L"amd64_x86", CPU::X64, CPU::X86};
- static constexpr ArchOption X64_ARM = {L"amd64_arm", CPU::X64, CPU::ARM};
- static constexpr ArchOption X64_ARM64 = {L"amd64_arm64", CPU::X64, CPU::ARM64};
-
- static constexpr std::array<ArchOption, 8> VALUES = {
- X86, X86_X64, X86_ARM, X86_ARM64, X64, X64_X86, X64_ARM, X64_ARM64};
-
- auto target_arch = System::to_cpu_architecture(target_architecture);
- auto host_arch = System::get_host_processor();
-
- for (auto&& value : VALUES)
- {
- if (target_arch == value.target_arch && host_arch == value.host_arch)
- {
- return value.name;
- }
+ auto it = Util::find_if(toolset.supported_architectures, [&](const ToolsetArchOption& opt) {
+ return host == opt.host_arch && target_arch == opt.target_arch;
+ });
+ if (it != toolset.supported_architectures.end()) return it->name;
}
Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported toolchain combination %s", target_architecture);
@@ -77,40 +59,48 @@ namespace vcpkg::Build
std::wstring make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset)
{
const wchar_t* tonull = L" >nul";
- if (g_debugging)
+ if (GlobalState::debugging)
{
- tonull = L"";
+ tonull = Strings::WEMPTY;
}
- auto arch = to_vcvarsall_toolchain(pre_build_info.target_architecture);
- auto target = to_vcvarsall_target(pre_build_info.cmake_system_name);
+ 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);
}
- static void create_binary_control_file(const VcpkgPaths& paths,
- const SourceParagraph& source_paragraph,
+ static void create_binary_feature_control_file(const SourceParagraph& source_paragraph,
+ const FeatureParagraph& feature_paragraph,
+ const Triplet& triplet,
+ BinaryControlFile& bcf)
+ {
+ BinaryParagraph bpgh(source_paragraph, feature_paragraph, triplet);
+ bcf.features.emplace_back(std::move(bpgh));
+ }
+
+ static void create_binary_control_file(const SourceParagraph& source_paragraph,
const Triplet& triplet,
- const BuildInfo& build_info)
+ const BuildInfo& build_info,
+ BinaryControlFile& bcf)
{
- BinaryParagraph bpgh = BinaryParagraph(source_paragraph, triplet);
- if (auto p_ver = build_info.version.get())
+ BinaryParagraph bpgh(source_paragraph, triplet);
+ if (const auto p_ver = build_info.version.get())
{
bpgh.version = *p_ver;
}
- const fs::path binary_control_file = paths.packages / bpgh.dir() / "CONTROL";
- paths.get_filesystem().write_contents(binary_control_file, Strings::serialize(bpgh));
+ bcf.core_paragraph = std::move(bpgh);
}
- static void create_binary_feature_control_file(const VcpkgPaths& paths,
- const SourceParagraph& source_paragraph,
- const FeatureParagraph& feature_paragraph,
- const Triplet& triplet,
- const BuildInfo& build_info)
+ static void write_binary_control_file(const VcpkgPaths& paths, BinaryControlFile bcf)
{
- BinaryParagraph bpgh = BinaryParagraph(source_paragraph, feature_paragraph, triplet);
- const fs::path binary_control_file = paths.packages / bpgh.dir() / "CONTROL";
- paths.get_filesystem().write_contents(binary_control_file, Strings::serialize(bpgh));
+ std::string start = Strings::serialize(bcf.core_paragraph);
+ for (auto&& feature : bcf.features)
+ {
+ start += "\n" + Strings::serialize(feature);
+ }
+ const fs::path binary_control_file = paths.packages / bcf.core_paragraph.dir() / "CONTROL";
+ paths.get_filesystem().write_contents(binary_control_file, start);
}
ExtendedBuildResult build_package(const VcpkgPaths& paths,
@@ -142,12 +132,12 @@ namespace vcpkg::Build
const fs::path& git_exe_path = paths.get_git_exe();
const fs::path ports_cmake_script_path = paths.ports_cmake;
- auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet);
+ 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 (g_feature_packages)
+ if (GlobalState::feature_packages)
{
if (config.feature_list)
{
@@ -181,26 +171,33 @@ namespace vcpkg::Build
const ElapsedTime timer = ElapsedTime::create_started();
- int return_code = System::cmd_execute_clean(command);
- auto buildtimeus = timer.microseconds();
+ const int return_code = System::cmd_execute_clean(command);
+ const auto buildtimeus = timer.microseconds();
const auto spec_string = spec.to_string();
- Metrics::track_metric("buildtimeus-" + spec_string, buildtimeus);
- if (return_code != 0)
{
- Metrics::track_property("error", "build failed");
- Metrics::track_property("build_error", spec_string);
- return {BuildResult::BUILD_FAILED, {}};
+ auto locked_metrics = Metrics::g_metrics.lock();
+ locked_metrics->track_metric("buildtimeus-" + spec_string, buildtimeus);
+ if (return_code != 0)
+ {
+ locked_metrics->track_property("error", "build failed");
+ locked_metrics->track_property("build_error", spec_string);
+ return {BuildResult::BUILD_FAILED, {}};
+ }
}
- auto build_info = read_build_info(paths.get_filesystem(), paths.build_info_file_path(spec));
+ const BuildInfo build_info = 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);
+ BinaryControlFile bcf;
+
+ create_binary_control_file(config.src, triplet, build_info, bcf);
+
if (error_count != 0)
{
return {BuildResult::POST_BUILD_CHECKS_FAILED, {}};
}
- if (g_feature_packages)
+ if (GlobalState::feature_packages)
{
if (config.feature_list)
{
@@ -209,13 +206,13 @@ namespace vcpkg::Build
for (auto&& f_pgh : config.scf->feature_paragraphs)
{
if (f_pgh->name == feature)
- create_binary_feature_control_file(
- paths, *config.scf->core_paragraph, *f_pgh, triplet, build_info);
+ create_binary_feature_control_file(*config.scf->core_paragraph, *f_pgh, triplet, bcf);
}
}
}
}
- create_binary_control_file(paths, config.src, triplet, build_info);
+
+ write_binary_control_file(paths, bcf);
// const fs::path port_buildtrees_dir = paths.buildtrees / spec.name;
// delete_directory(port_buildtrees_dir);
@@ -228,6 +225,7 @@ namespace vcpkg::Build
static const std::string NULLVALUE_STRING = Enums::nullvalue_to_string("vcpkg::Commands::Build::BuildResult");
static const std::string SUCCEEDED_STRING = "SUCCEEDED";
static const std::string BUILD_FAILED_STRING = "BUILD_FAILED";
+ static const std::string FILE_CONFLICTS_STRING = "FILE_CONFLICTS";
static const std::string POST_BUILD_CHECKS_FAILED_STRING = "POST_BUILD_CHECKS_FAILED";
static const std::string CASCADED_DUE_TO_MISSING_DEPENDENCIES_STRING = "CASCADED_DUE_TO_MISSING_DEPENDENCIES";
@@ -238,6 +236,7 @@ namespace vcpkg::Build
case BuildResult::BUILD_FAILED: return BUILD_FAILED_STRING;
case BuildResult::POST_BUILD_CHECKS_FAILED: return POST_BUILD_CHECKS_FAILED_STRING;
case BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES: return CASCADED_DUE_TO_MISSING_DEPENDENCIES_STRING;
+ case BuildResult::FILE_CONFLICTS: return FILE_CONFLICTS_STRING;
default: Checks::unreachable(VCPKG_LINE_INFO);
}
}
@@ -270,7 +269,7 @@ namespace vcpkg::Build
parser.required_field(BuildInfoRequiredField::CRT_LINKAGE, crt_linkage_as_string);
auto crtlinkage = to_linkage_type(crt_linkage_as_string);
- if (auto p = crtlinkage.get())
+ if (const auto p = crtlinkage.get())
build_info.crt_linkage = *p;
else
Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid crt linkage type: [%s]", crt_linkage_as_string);
@@ -280,7 +279,7 @@ namespace vcpkg::Build
std::string library_linkage_as_string;
parser.required_field(BuildInfoRequiredField::LIBRARY_LINKAGE, library_linkage_as_string);
auto liblinkage = to_linkage_type(library_linkage_as_string);
- if (auto p = liblinkage.get())
+ if (const auto p = liblinkage.get())
build_info.library_linkage = *p;
else
Checks::exit_with_message(
@@ -290,12 +289,11 @@ 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;
- else if (setting == "enabled")
+ if (setting.empty()) continue;
+ if (setting == "enabled")
policies.emplace(policy, true);
else if (setting == "disabled")
policies.emplace(policy, false);
@@ -304,7 +302,7 @@ namespace vcpkg::Build
VCPKG_LINE_INFO, "Unknown setting for policy '%s': %s", to_string(policy), setting);
}
- if (auto err = parser.error_info("PostBuildInformation"))
+ if (const auto err = parser.error_info("PostBuildInformation"))
{
print_error_message(err);
Checks::exit_fail(VCPKG_LINE_INFO);
@@ -338,14 +336,14 @@ namespace vcpkg::Build
});
const std::wstring command = Strings::wformat(LR"(%s)", cmd_launch_cmake);
- auto ec_data = System::cmd_execute_and_capture_output(command);
+ const auto ec_data = System::cmd_execute_and_capture_output(command);
Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0);
const std::vector<std::string> lines = Strings::split(ec_data.output, "\n");
PreBuildInfo pre_build_info;
- auto e = lines.cend();
+ const auto e = lines.cend();
auto cur = std::find(lines.cbegin(), e, FLAG_GUID);
if (cur != e) ++cur;
@@ -361,7 +359,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 ? "" : s.at(1);
+ const std::string variable_value = variable_with_no_value ? Strings::EMPTY : s.at(1);
if (variable_name == "VCPKG_TARGET_ARCHITECTURE")
{
diff --git a/toolsrc/src/vcpkg_Checks.cpp b/toolsrc/src/vcpkg_Checks.cpp
index 2674b889a..e7c9046a4 100644
--- a/toolsrc/src/vcpkg_Checks.cpp
+++ b/toolsrc/src/vcpkg_Checks.cpp
@@ -1,11 +1,45 @@
#include "pch.h"
+#include "metrics.h"
#include "vcpkg_Checks.h"
+#include "vcpkg_GlobalState.h"
#include "vcpkg_System.h"
#include "vcpkglib.h"
namespace vcpkg::Checks
{
+ [[noreturn]] static void cleanup_and_exit(const int exit_code)
+ {
+ 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();
+
+ SetConsoleCP(GlobalState::g_init_console_cp);
+ SetConsoleOutputCP(GlobalState::g_init_console_output_cp);
+
+ fflush(nullptr);
+
+ ::TerminateProcess(::GetCurrentProcess(), exit_code);
+ }
+
+ static BOOL ctrl_handler(DWORD fdw_ctrl_type)
+ {
+ {
+ auto locked_metrics = Metrics::g_metrics.lock();
+ 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(reinterpret_cast<PHANDLER_ROUTINE>(ctrl_handler), TRUE);
+ }
+
[[noreturn]] void unreachable(const LineInfo& line_info)
{
System::println(System::Color::error, "Error: Unreachable code was reached");
@@ -13,19 +47,19 @@ namespace vcpkg::Checks
#ifndef NDEBUG
std::abort();
#else
- ::exit(EXIT_FAILURE);
+ cleanup_and_exit(EXIT_FAILURE);
#endif
}
[[noreturn]] void exit_with_code(const LineInfo& line_info, const int exit_code)
{
Debug::println(System::Color::error, line_info.to_string());
- ::exit(exit_code);
+ 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);
}
@@ -33,15 +67,15 @@ namespace vcpkg::Checks
{
if (!expression)
{
- exit_with_message(line_info, "");
+ exit_with_message(line_info, Strings::EMPTY);
}
}
- 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_Chrono.cpp
index d70f4a054..d96f30987 100644
--- a/toolsrc/src/vcpkg_Chrono.cpp
+++ b/toolsrc/src/vcpkg_Chrono.cpp
@@ -7,43 +7,43 @@ namespace vcpkg
{
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/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp
index 820e51b33..8dd60a2eb 100644
--- a/toolsrc/src/vcpkg_Dependencies.cpp
+++ b/toolsrc/src/vcpkg_Dependencies.cpp
@@ -7,12 +7,105 @@
#include "vcpkg_Dependencies.h"
#include "vcpkg_Files.h"
#include "vcpkg_Graphs.h"
+#include "vcpkg_Strings.h"
#include "vcpkg_Util.h"
#include "vcpkglib.h"
namespace vcpkg::Dependencies
{
+ struct FeatureNodeEdges
+ {
+ std::vector<FeatureSpec> remove_edges;
+ std::vector<FeatureSpec> build_edges;
+ bool plus = false;
+ };
+
+ struct Cluster : Util::MoveOnlyBase
+ {
+ std::vector<StatusParagraph*> status_paragraphs;
+ Optional<const SourceControlFile*> source_control_file;
+ PackageSpec spec;
+ std::unordered_map<std::string, FeatureNodeEdges> edges;
+ std::unordered_set<std::string> to_install_features;
+ std::unordered_set<std::string> original_features;
+ bool will_remove = false;
+ bool transient_uninstalled = true;
+ RequestType request_type = RequestType::AUTO_SELECTED;
+ };
+
+ struct ClusterPtr
+ {
+ Cluster* ptr;
+
+ Cluster* operator->() const { return ptr; }
+ };
+
bool operator==(const ClusterPtr& l, const ClusterPtr& r) { return l.ptr == r.ptr; }
+}
+
+template<>
+struct std::hash<vcpkg::Dependencies::ClusterPtr>
+{
+ size_t operator()(const vcpkg::Dependencies::ClusterPtr& value) const
+ {
+ return std::hash<vcpkg::PackageSpec>()(value.ptr->spec);
+ }
+};
+
+namespace vcpkg::Dependencies
+{
+ struct GraphPlan
+ {
+ Graphs::Graph<ClusterPtr> remove_graph;
+ Graphs::Graph<ClusterPtr> install_graph;
+ };
+
+ struct ClusterGraph : Util::MoveOnlyBase
+ {
+ explicit ClusterGraph(std::unordered_map<std::string, const SourceControlFile*>&& ports)
+ : m_ports(std::move(ports))
+ {
+ }
+
+ Cluster& get(const PackageSpec& spec)
+ {
+ auto it = m_graph.find(spec);
+ if (it == m_graph.end())
+ {
+ // Load on-demand from m_ports
+ auto it_ports = m_ports.find(spec.name());
+ if (it_ports != m_ports.end())
+ {
+ auto& clust = m_graph[spec];
+ clust.spec = spec;
+ cluster_from_scf(*it_ports->second, clust);
+ return clust;
+ }
+ return m_graph[spec];
+ }
+ return it->second;
+ }
+
+ private:
+ void cluster_from_scf(const SourceControlFile& scf, Cluster& out_cluster) const
+ {
+ FeatureNodeEdges core_dependencies;
+ core_dependencies.build_edges =
+ filter_dependencies_to_specs(scf.core_paragraph->depends, out_cluster.spec.triplet());
+ out_cluster.edges.emplace("core", std::move(core_dependencies));
+
+ for (const auto& feature : scf.feature_paragraphs)
+ {
+ FeatureNodeEdges added_edges;
+ added_edges.build_edges = filter_dependencies_to_specs(feature->depends, out_cluster.spec.triplet());
+ out_cluster.edges.emplace(feature->name, std::move(added_edges));
+ }
+ out_cluster.source_control_file = &scf;
+ }
+
+ std::unordered_map<PackageSpec, Cluster> m_graph;
+ std::unordered_map<std::string, const SourceControlFile*> m_ports;
+ };
std::vector<PackageSpec> AnyParagraph::dependencies(const Triplet& triplet) const
{
@@ -27,9 +120,11 @@ namespace vcpkg::Dependencies
return to_package_specs(p->package.depends);
}
- if (auto p = this->binary_paragraph.get())
+ if (auto p = this->binary_control_file.get())
{
- return to_package_specs(p->depends);
+ auto deps = Util::fmap_flatten(p->features, [](const BinaryParagraph& pgh) { return pgh.depends; });
+ deps.insert(deps.end(), p->core_paragraph.depends.begin(), p->core_paragraph.depends.end());
+ return to_package_specs(deps);
}
if (auto p = this->source_paragraph.get())
@@ -51,54 +146,57 @@ namespace vcpkg::Dependencies
}
}
- InstallPlanAction::InstallPlanAction()
- : spec(), any_paragraph(), plan_type(InstallPlanType::UNKNOWN), request_type(RequestType::UNKNOWN)
- {
- }
+ InstallPlanAction::InstallPlanAction() : plan_type(InstallPlanType::UNKNOWN), request_type(RequestType::UNKNOWN) {}
InstallPlanAction::InstallPlanAction(const PackageSpec& spec,
const SourceControlFile& any_paragraph,
const std::unordered_set<std::string>& features,
const RequestType& request_type)
- : InstallPlanAction()
+ : spec(spec), plan_type(InstallPlanType::BUILD_AND_INSTALL), request_type(request_type), feature_list(features)
{
- this->spec = spec;
- this->request_type = request_type;
-
- this->plan_type = InstallPlanType::BUILD_AND_INSTALL;
this->any_paragraph.source_control_file = &any_paragraph;
- this->feature_list = features;
+ }
+
+ InstallPlanAction::InstallPlanAction(const PackageSpec& spec,
+ const std::unordered_set<std::string>& features,
+ const RequestType& request_type)
+ : spec(spec), plan_type(InstallPlanType::ALREADY_INSTALLED), request_type(request_type), feature_list(features)
+ {
}
InstallPlanAction::InstallPlanAction(const PackageSpec& spec,
const AnyParagraph& any_paragraph,
const RequestType& request_type)
- : InstallPlanAction()
+ : spec(spec), any_paragraph(any_paragraph), plan_type(InstallPlanType::UNKNOWN), request_type(request_type)
{
- this->spec = spec;
- this->request_type = request_type;
if (auto p = any_paragraph.status_paragraph.get())
{
this->plan_type = InstallPlanType::ALREADY_INSTALLED;
- this->any_paragraph.status_paragraph = *p;
return;
}
- if (auto p = any_paragraph.binary_paragraph.get())
+ if (auto p = any_paragraph.binary_control_file.get())
{
this->plan_type = InstallPlanType::INSTALL;
- this->any_paragraph.binary_paragraph = *p;
return;
}
if (auto p = any_paragraph.source_paragraph.get())
{
this->plan_type = InstallPlanType::BUILD_AND_INSTALL;
- this->any_paragraph.source_paragraph = *p;
return;
}
+ }
+
+ std::string InstallPlanAction::displayname() const
+ {
+ if (this->feature_list.empty())
+ {
+ return this->spec.to_string();
+ }
- this->plan_type = InstallPlanType::UNKNOWN;
+ const std::string features = Strings::join(",", this->feature_list);
+ return Strings::format("%s[%s]:%s", this->spec.name(), features, this->spec.triplet());
}
bool InstallPlanAction::compare_by_name(const InstallPlanAction* left, const InstallPlanAction* right)
@@ -115,39 +213,44 @@ namespace vcpkg::Dependencies
{
}
- bool ExportPlanAction::compare_by_name(const ExportPlanAction* left, const ExportPlanAction* right)
+ const PackageSpec& AnyAction::spec() const
{
- return left->spec.name() < right->spec.name();
+ 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");
}
- ExportPlanAction::ExportPlanAction()
- : spec(), any_paragraph(), plan_type(ExportPlanType::UNKNOWN), request_type(RequestType::UNKNOWN)
+ bool ExportPlanAction::compare_by_name(const ExportPlanAction* left, const ExportPlanAction* right)
{
+ return left->spec.name() < right->spec.name();
}
+ ExportPlanAction::ExportPlanAction() : plan_type(ExportPlanType::UNKNOWN), request_type(RequestType::UNKNOWN) {}
+
ExportPlanAction::ExportPlanAction(const PackageSpec& spec,
const AnyParagraph& any_paragraph,
const RequestType& request_type)
- : ExportPlanAction()
+ : spec(spec), any_paragraph(any_paragraph), plan_type(ExportPlanType::UNKNOWN), request_type(request_type)
{
- this->spec = spec;
- this->request_type = request_type;
-
- if (auto p = any_paragraph.binary_paragraph.get())
+ if (auto p = any_paragraph.binary_control_file.get())
{
this->plan_type = ExportPlanType::ALREADY_BUILT;
- this->any_paragraph.binary_paragraph = *p;
return;
}
if (auto p = any_paragraph.source_paragraph.get())
{
this->plan_type = ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT;
- this->any_paragraph.source_paragraph = *p;
return;
}
-
- this->plan_type = ExportPlanType::UNKNOWN;
}
bool RemovePlanAction::compare_by_name(const RemovePlanAction* left, const RemovePlanAction* right)
@@ -155,9 +258,9 @@ namespace vcpkg::Dependencies
return left->spec.name() < right->spec.name();
}
- MapPortFile::MapPortFile(const std::unordered_map<PackageSpec, SourceControlFile>& map) : ports(map) {}
+ MapPortFile::MapPortFile(const std::unordered_map<std::string, SourceControlFile>& map) : ports(map) {}
- const SourceControlFile& MapPortFile::get_control_file(const PackageSpec& spec) const
+ const SourceControlFile& MapPortFile::get_control_file(const std::string& spec) const
{
auto scf = ports.find(spec);
if (scf == ports.end())
@@ -169,9 +272,9 @@ namespace vcpkg::Dependencies
PathsPortFile::PathsPortFile(const VcpkgPaths& paths) : ports(paths) {}
- const SourceControlFile& PathsPortFile::get_control_file(const PackageSpec& spec) const
+ const SourceControlFile& PathsPortFile::get_control_file(const std::string& spec) const
{
- std::unordered_map<PackageSpec, SourceControlFile>::iterator cache_it = cache.find(spec);
+ auto cache_it = cache.find(spec);
if (cache_it != cache.end())
{
return cache_it->second;
@@ -219,7 +322,9 @@ namespace vcpkg::Dependencies
auto it = status_db.find_installed(spec);
if (it != status_db.end()) return InstallPlanAction{spec, {*it->get(), nullopt, nullopt}, request_type};
return InstallPlanAction{
- spec, {nullopt, nullopt, *port_file_provider.get_control_file(spec).core_paragraph}, request_type};
+ spec,
+ {nullopt, nullopt, *port_file_provider.get_control_file(spec.name()).core_paragraph},
+ request_type};
}
};
@@ -319,9 +424,9 @@ namespace vcpkg::Dependencies
? RequestType::USER_REQUESTED
: RequestType::AUTO_SELECTED;
- Expected<BinaryParagraph> maybe_bpgh = Paragraphs::try_load_cached_package(paths, spec);
- if (auto bpgh = maybe_bpgh.get())
- return ExportPlanAction{spec, {nullopt, *bpgh, nullopt}, request_type};
+ Expected<BinaryControlFile> maybe_bpgh = Paragraphs::try_load_cached_control_package(paths, spec);
+ if (auto bcf = maybe_bpgh.get())
+ return ExportPlanAction{spec, AnyParagraph{nullopt, std::move(*bcf), nullopt}, request_type};
auto maybe_scf = Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec));
if (auto scf = maybe_scf.get())
@@ -339,93 +444,79 @@ namespace vcpkg::Dependencies
return toposort;
}
- std::vector<FeatureSpec> to_feature_specs(const std::vector<std::string>& depends, const Triplet& triplet)
+ enum class MarkPlusResult
{
- std::vector<FeatureSpec> f_specs;
- for (auto&& depend : depends)
- {
- int end = (int)depend.find(']');
- if (end != std::string::npos)
- {
- int start = (int)depend.find('[');
-
- auto feature_name = depend.substr(start + 1, end - start - 1);
- auto package_name = depend.substr(0, start);
- auto p_spec = PackageSpec::from_name_and_triplet(package_name, triplet).value_or_exit(VCPKG_LINE_INFO);
- auto feature_spec = FeatureSpec{p_spec, feature_name};
- f_specs.emplace_back(std::move(feature_spec));
- }
- else
- {
- auto p_spec = PackageSpec::from_name_and_triplet(depend, triplet).value_or_exit(VCPKG_LINE_INFO);
+ FEATURE_NOT_FOUND,
+ SUCCESS,
+ };
- auto feature_spec = FeatureSpec{p_spec, ""};
- f_specs.emplace_back(std::move(feature_spec));
- }
- }
- return f_specs;
- }
+ MarkPlusResult mark_plus(const std::string& feature,
+ Cluster& cluster,
+ ClusterGraph& pkg_to_cluster,
+ GraphPlan& graph_plan);
+ void mark_minus(Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan);
- bool mark_plus(const std::string& feature,
- Cluster& cluster,
- std::unordered_map<PackageSpec, Cluster>& pkg_to_cluster,
- GraphPlan& graph_plan)
+ MarkPlusResult mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan)
{
- auto it = cluster.edges.find(feature);
- std::string updated_feature = feature;
- if (updated_feature == "")
- {
- updated_feature = "core";
- it = cluster.edges.find("core");
- }
- if (it == cluster.edges.end())
+ if (feature.empty())
{
- Checks::unreachable(VCPKG_LINE_INFO);
+ // Indicates that core was not specified in the reference
+ return mark_plus("core", cluster, graph, graph_plan);
}
- if (cluster.edges[updated_feature].plus) return true;
+ auto it = cluster.edges.find(feature);
+ if (it == cluster.edges.end()) return MarkPlusResult::FEATURE_NOT_FOUND;
- if (cluster.original_features.find(updated_feature) == cluster.original_features.end())
+ if (cluster.edges[feature].plus) return MarkPlusResult::SUCCESS;
+
+ if (cluster.original_features.find(feature) == cluster.original_features.end())
{
cluster.transient_uninstalled = true;
}
if (!cluster.transient_uninstalled)
{
- return false;
+ return MarkPlusResult::SUCCESS;
}
- cluster.edges[updated_feature].plus = true;
+ cluster.edges[feature].plus = true;
if (!cluster.original_features.empty())
{
- mark_minus(cluster, pkg_to_cluster, graph_plan);
+ mark_minus(cluster, graph, graph_plan);
}
graph_plan.install_graph.add_vertex({&cluster});
auto& tracked = cluster.to_install_features;
- tracked.insert(updated_feature);
- if (tracked.find("core") == tracked.end() && tracked.find("") == tracked.end())
+ tracked.insert(feature);
+
+ if (feature != "core")
{
- cluster.to_install_features.insert("core");
- for (auto&& depend : cluster.edges["core"].build_edges)
- {
- auto& depend_cluster = pkg_to_cluster[depend.spec];
- mark_plus(depend.feature_name, depend_cluster, pkg_to_cluster, graph_plan);
- graph_plan.install_graph.add_edge({&cluster}, {&depend_cluster});
- }
+ // All features implicitly depend on core
+ auto res = mark_plus("core", cluster, graph, graph_plan);
+
+ // Should be impossible for "core" to not exist
+ Checks::check_exit(VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS);
}
- for (auto&& depend : cluster.edges[updated_feature].build_edges)
+ for (auto&& depend : cluster.edges[feature].build_edges)
{
- auto& depend_cluster = pkg_to_cluster[depend.spec];
- mark_plus(depend.feature_name, depend_cluster, pkg_to_cluster, graph_plan);
+ auto& depend_cluster = graph.get(depend.spec());
+ auto res = mark_plus(depend.feature(), depend_cluster, graph, graph_plan);
+
+ Checks::check_exit(VCPKG_LINE_INFO,
+ res == MarkPlusResult::SUCCESS,
+ "Error: Unable to satisfy dependency %s of %s",
+ depend,
+ FeatureSpec(cluster.spec, feature));
+
if (&depend_cluster == &cluster) continue;
graph_plan.install_graph.add_edge({&cluster}, {&depend_cluster});
}
- return true;
+
+ return MarkPlusResult::SUCCESS;
}
- void mark_minus(Cluster& cluster, std::unordered_map<PackageSpec, Cluster>& pkg_to_cluster, GraphPlan& graph_plan)
+ void mark_minus(Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan)
{
if (cluster.will_remove) return;
cluster.will_remove = true;
@@ -436,89 +527,93 @@ namespace vcpkg::Dependencies
auto& remove_edges_edges = pair.second.remove_edges;
for (auto&& depend : remove_edges_edges)
{
- auto& depend_cluster = pkg_to_cluster[depend.spec];
+ auto& depend_cluster = graph.get(depend.spec());
graph_plan.remove_graph.add_edge({&cluster}, {&depend_cluster});
- depend_cluster.transient_uninstalled = true;
- mark_minus(depend_cluster, pkg_to_cluster, graph_plan);
+ mark_minus(depend_cluster, graph, graph_plan);
}
}
+
+ cluster.transient_uninstalled = true;
for (auto&& original_feature : cluster.original_features)
{
- cluster.transient_uninstalled = true;
- mark_plus(original_feature, cluster, pkg_to_cluster, graph_plan);
+ auto res = mark_plus(original_feature, cluster, graph, graph_plan);
+ if (res != MarkPlusResult::SUCCESS)
+ {
+ System::println(System::Color::warning,
+ "Warning: could not reinstall feature %s",
+ FeatureSpec{cluster.spec, original_feature});
+ }
}
}
- std::vector<AnyAction> create_feature_install_plan(const std::unordered_map<PackageSpec, SourceControlFile>& map,
- const std::vector<FullPackageSpec>& specs,
- const StatusParagraphs& status_db)
+
+ static ClusterGraph create_feature_install_graph(const std::unordered_map<std::string, SourceControlFile>& map,
+ const StatusParagraphs& status_db)
{
- std::unordered_map<PackageSpec, Cluster> pkg_spec_to_package_node;
+ std::unordered_map<std::string, const SourceControlFile*> ptr_map;
+ for (auto&& p : map)
+ ptr_map.emplace(p.first, &p.second);
+ ClusterGraph graph(std::move(ptr_map));
+
+ auto installed_ports = get_installed_ports(status_db);
- for (const auto& it : map)
+ for (auto&& status_paragraph : installed_ports)
{
- Cluster& node = pkg_spec_to_package_node[it.first];
+ Cluster& cluster = graph.get(status_paragraph->package.spec);
- node.spec = it.first;
- FeatureNodeEdges core_dependencies;
- auto core_depends = filter_dependencies(it.second.core_paragraph->depends, node.spec.triplet());
- core_dependencies.build_edges = to_feature_specs(core_depends, node.spec.triplet());
- node.edges["core"] = std::move(core_dependencies);
+ cluster.transient_uninstalled = false;
- for (const auto& feature : it.second.feature_paragraphs)
+ cluster.status_paragraphs.emplace_back(status_paragraph);
+
+ auto& status_paragraph_feature = status_paragraph->package.feature;
+ // In this case, empty string indicates the "core" paragraph for a package.
+ if (status_paragraph_feature.empty())
{
- FeatureNodeEdges added_edges;
- auto depends = filter_dependencies(feature->depends, node.spec.triplet());
- added_edges.build_edges = to_feature_specs(depends, node.spec.triplet());
- node.edges.emplace(feature->name, std::move(added_edges));
+ cluster.original_features.insert("core");
+ }
+ else
+ {
+ cluster.original_features.insert(status_paragraph_feature);
}
- node.source_control_file = &it.second;
}
- for (auto&& status_paragraph : get_installed_ports(status_db))
+ for (auto&& status_paragraph : installed_ports)
{
auto& spec = status_paragraph->package.spec;
auto& status_paragraph_feature = status_paragraph->package.feature;
- Cluster& cluster = pkg_spec_to_package_node[spec];
-
- cluster.transient_uninstalled = false;
- auto reverse_edges =
- to_feature_specs(status_paragraph->package.depends, status_paragraph->package.spec.triplet());
+ auto reverse_edges = FeatureSpec::from_strings_and_triplet(status_paragraph->package.depends,
+ status_paragraph->package.spec.triplet());
for (auto&& dependency : reverse_edges)
{
- auto pkg_node = pkg_spec_to_package_node.find(dependency.spec);
- auto depends_name = dependency.feature_name;
- if (depends_name == "")
- {
- for (auto&& default_feature : status_paragraph->package.default_features)
- {
- auto& target_node = pkg_node->second.edges[default_feature];
- target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature});
- }
- depends_name = "core";
- }
- auto& target_node = pkg_node->second.edges[depends_name];
+ auto& dep_cluster = graph.get(dependency.spec());
+
+ auto depends_name = dependency.feature();
+ if (depends_name.empty()) depends_name = "core";
+
+ auto& target_node = dep_cluster.edges[depends_name];
target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature});
}
- cluster.status_paragraphs.emplace_back(*status_paragraph);
- if (status_paragraph_feature == "")
- {
- cluster.original_features.insert("core");
- }
- else
- {
- cluster.original_features.insert(status_paragraph_feature);
- }
}
+ return graph;
+ }
+
+ std::vector<AnyAction> create_feature_install_plan(const std::unordered_map<std::string, SourceControlFile>& map,
+ const std::vector<FeatureSpec>& specs,
+ const StatusParagraphs& status_db)
+ {
+ ClusterGraph graph = create_feature_install_graph(map, status_db);
GraphPlan graph_plan;
for (auto&& spec : specs)
{
- Cluster& spec_cluster = pkg_spec_to_package_node[spec.package_spec];
- for (auto&& feature : spec.features)
- {
- mark_plus(feature, spec_cluster, pkg_spec_to_package_node, graph_plan);
- }
+ Cluster& spec_cluster = graph.get(spec.spec());
+ spec_cluster.request_type = RequestType::USER_REQUESTED;
+ auto res = mark_plus(spec.feature(), spec_cluster, graph, graph_plan);
+
+ Checks::check_exit(
+ VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec);
+
+ graph_plan.install_graph.add_vertex(ClusterPtr{&spec_cluster});
}
Graphs::GraphAdjacencyProvider<ClusterPtr> adjacency_remove_graph(graph_plan.remove_graph.adjacency_list());
@@ -529,38 +624,46 @@ namespace vcpkg::Dependencies
auto insert_vertex_list = graph_plan.install_graph.vertex_list();
auto insert_toposort = Graphs::topological_sort(insert_vertex_list, adjacency_install_graph);
- std::vector<AnyAction> install_plan;
+ std::vector<AnyAction> plan;
- for (auto&& like_cluster : remove_toposort)
+ for (auto&& p_cluster : remove_toposort)
{
- auto scf = *like_cluster.ptr->source_control_file.get();
-
- AnyAction any_plan;
- any_plan.remove_plan = RemovePlanAction{
- PackageSpec::from_name_and_triplet(scf->core_paragraph->name, like_cluster.ptr->spec.triplet())
- .value_or_exit(VCPKG_LINE_INFO),
+ auto scf = *p_cluster->source_control_file.get();
+ auto spec = PackageSpec::from_name_and_triplet(scf->core_paragraph->name, p_cluster->spec.triplet())
+ .value_or_exit(VCPKG_LINE_INFO);
+ plan.emplace_back(RemovePlanAction{
+ std::move(spec),
RemovePlanType::REMOVE,
- RequestType::AUTO_SELECTED};
-
- install_plan.emplace_back(std::move(any_plan));
+ p_cluster->request_type,
+ });
}
- for (auto&& like_cluster : insert_toposort)
+ for (auto&& p_cluster : insert_toposort)
{
- if (!like_cluster.ptr->transient_uninstalled) continue;
-
- auto scf = *like_cluster.ptr->source_control_file.get();
- auto pkg_spec =
- PackageSpec::from_name_and_triplet(scf->core_paragraph->name, like_cluster.ptr->spec.triplet())
- .value_or_exit(VCPKG_LINE_INFO);
- auto action =
- InstallPlanAction{pkg_spec, *scf, like_cluster.ptr->to_install_features, RequestType::AUTO_SELECTED};
-
- AnyAction any_plan;
- any_plan.install_plan = std::move(action);
- install_plan.emplace_back(std::move(any_plan));
+ if (p_cluster->transient_uninstalled)
+ {
+ // If it will be transiently uninstalled, we need to issue a full installation command
+ auto pscf = p_cluster->source_control_file.value_or_exit(VCPKG_LINE_INFO);
+ Checks::check_exit(VCPKG_LINE_INFO, pscf != nullptr);
+ plan.emplace_back(InstallPlanAction{
+ p_cluster->spec,
+ *pscf,
+ p_cluster->to_install_features,
+ p_cluster->request_type,
+ });
+ }
+ else
+ {
+ // If the package isn't transitively installed, still include it if the user explicitly requested it
+ if (p_cluster->request_type != RequestType::USER_REQUESTED) continue;
+ plan.emplace_back(InstallPlanAction{
+ p_cluster->spec,
+ p_cluster->original_features,
+ p_cluster->request_type,
+ });
+ }
}
- return install_plan;
+ return plan;
}
}
diff --git a/toolsrc/src/vcpkg_Files.cpp b/toolsrc/src/vcpkg_Files.cpp
index 29da7e684..ad1fcebc6 100644
--- a/toolsrc/src/vcpkg_Files.cpp
+++ b/toolsrc/src/vcpkg_Files.cpp
@@ -2,6 +2,7 @@
#include "vcpkg_Files.h"
#include "vcpkg_System.h"
+#include "vcpkg_Util.h"
#include <thread>
namespace vcpkg::Files
@@ -186,11 +187,23 @@ namespace vcpkg::Files
void print_paths(const std::vector<fs::path>& paths)
{
- System::println("");
+ System::println();
for (const fs::path& p : paths)
{
System::println(" %s", p.generic_string());
}
- System::println("");
+ System::println();
+ }
+
+ std::vector<fs::path> find_from_PATH(const std::wstring& name)
+ {
+ const std::wstring cmd = Strings::wformat(L"where.exe %s", name);
+ auto out = System::cmd_execute_and_capture_output(cmd);
+ if (out.exit_code != 0)
+ {
+ return {};
+ }
+
+ return Util::fmap(Strings::split(out.output, "\n"), [](auto&& s) { return fs::path(s); });
}
}
diff --git a/toolsrc/src/vcpkg_GlobalState.cpp b/toolsrc/src/vcpkg_GlobalState.cpp
new file mode 100644
index 000000000..2221222c0
--- /dev/null
+++ b/toolsrc/src/vcpkg_GlobalState.cpp
@@ -0,0 +1,13 @@
+#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_Input.cpp b/toolsrc/src/vcpkg_Input.cpp
index f4e9a07c2..f1cac9632 100644
--- a/toolsrc/src/vcpkg_Input.cpp
+++ b/toolsrc/src/vcpkg_Input.cpp
@@ -13,7 +13,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};
}
@@ -29,7 +29,7 @@ namespace vcpkg::Input
if (!paths.is_valid_triplet(t))
{
System::println(System::Color::error, "Error: invalid triplet: %s", t);
- Metrics::track_property("error", "invalid triplet: " + t.to_string());
+ Metrics::g_metrics.lock()->track_property("error", "invalid triplet: " + t.to_string());
Commands::Help::help_topic_valid_triplet(paths);
Checks::exit_fail(VCPKG_LINE_INFO);
}
@@ -41,7 +41,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/vcpkg_Parse.cpp b/toolsrc/src/vcpkg_Parse.cpp
index 659af2939..e671a1a05 100644
--- a/toolsrc/src/vcpkg_Parse.cpp
+++ b/toolsrc/src/vcpkg_Parse.cpp
@@ -23,14 +23,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("");
+ return remove_field(&fields, fieldname).value_or(Strings::EMPTY);
}
std::unique_ptr<ParseControlErrorInfo> ParagraphParser::error_info(const std::string& name) const
{
@@ -44,4 +44,37 @@ namespace vcpkg::Parse
}
return nullptr;
}
+
+ std::vector<std::string> parse_comma_list(const std::string& str)
+ {
+ if (str.empty())
+ {
+ return {};
+ }
+
+ std::vector<std::string> out;
+
+ size_t cur = 0;
+ do
+ {
+ auto pos = str.find(',', cur);
+ if (pos == std::string::npos)
+ {
+ out.push_back(str.substr(cur));
+ break;
+ }
+ out.push_back(str.substr(cur, pos - cur));
+
+ // skip comma and space
+ ++pos;
+ if (str[pos] == ' ')
+ {
+ ++pos;
+ }
+
+ cur = pos;
+ } while (cur != std::string::npos);
+
+ return out;
+ }
}
diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp
index 0c1c1f9f9..5ad951399 100644
--- a/toolsrc/src/vcpkg_Strings.cpp
+++ b/toolsrc/src/vcpkg_Strings.cpp
@@ -130,12 +130,17 @@ namespace vcpkg::Strings
trim(&s);
}
- Util::erase_remove_if(*strings, [](const std::string& s) { return s == ""; });
+ Util::erase_remove_if(*strings, [](const std::string& s) { return s.empty(); });
}
std::vector<std::string> split(const std::string& s, const std::string& delimiter)
{
std::vector<std::string> output;
+
+ if(delimiter.empty()){
+ output.push_back(s);
+ return output;
+ }
size_t i = 0;
for (size_t pos = s.find(delimiter); pos != std::string::npos; pos = s.find(delimiter, pos))
diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp
index 883fe6612..40e335117 100644
--- a/toolsrc/src/vcpkg_System.cpp
+++ b/toolsrc/src/vcpkg_System.cpp
@@ -1,6 +1,7 @@
#include "pch.h"
#include "vcpkg_Checks.h"
+#include "vcpkg_GlobalState.h"
#include "vcpkg_System.h"
#include "vcpkglib.h"
@@ -18,7 +19,7 @@ namespace vcpkg::System
fs::path get_exe_path_of_current_process()
{
wchar_t buf[_MAX_PATH];
- int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH);
+ const int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH);
if (bytes == 0) std::abort();
return fs::path(buf, buf + bytes);
}
@@ -36,18 +37,32 @@ namespace vcpkg::System
CPUArchitecture get_host_processor()
{
auto w6432 = get_environment_variable(L"PROCESSOR_ARCHITEW6432");
- if (auto p = w6432.get()) return to_cpu_architecture(Strings::to_utf8(*p)).value_or_exit(VCPKG_LINE_INFO);
+ if (const auto p = w6432.get()) return to_cpu_architecture(Strings::to_utf8(*p)).value_or_exit(VCPKG_LINE_INFO);
- auto procarch = get_environment_variable(L"PROCESSOR_ARCHITECTURE").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);
}
+ std::vector<CPUArchitecture> get_supported_host_architectures()
+ {
+ std::vector<CPUArchitecture> supported_architectures;
+ supported_architectures.push_back(get_host_processor());
+
+ // AMD64 machines support to run x86 applications
+ if (supported_architectures.back() == CPUArchitecture::X64)
+ {
+ supported_architectures.push_back(CPUArchitecture::X86);
+ }
+
+ return supported_architectures;
+ }
+
int cmd_execute_clean(const CWStringView 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);
+ 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);
std::vector<std::wstring> env_wstrings = {
L"ALLUSERSPROFILE",
@@ -94,47 +109,84 @@ namespace vcpkg::System
};
// Flush stdout before launching external process
- fflush(nullptr);
+ fflush(nullptr);
- std::vector<const wchar_t*> env_cstr;
- env_cstr.reserve(env_wstrings.size() + 2);
+ std::wstring env_cstr;
for (auto&& env_wstring : env_wstrings)
{
const Optional<std::wstring> value = System::get_environment_variable(env_wstring);
- auto v = value.get();
+ const auto v = value.get();
if (!v || v->empty()) continue;
- env_wstring.push_back(L'=');
- env_wstring.append(*v);
- env_cstr.push_back(env_wstring.c_str());
+ env_cstr.append(env_wstring);
+ env_cstr.push_back(L'=');
+ env_cstr.append(*v);
+ env_cstr.push_back(L'\0');
}
- env_cstr.push_back(new_PATH.c_str());
- env_cstr.push_back(nullptr);
+ env_cstr.append(NEW_PATH);
+ env_cstr.push_back(L'\0');
+
+ STARTUPINFOW startup_info;
+ memset(&startup_info, 0, sizeof(STARTUPINFOW));
+ startup_info.cb = sizeof(STARTUPINFOW);
+
+ PROCESS_INFORMATION process_info;
+ memset(&process_info, 0, sizeof(PROCESS_INFORMATION));
// Basically we are wrapping it in quotes
- const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s")###", cmd_line);
- Debug::println("_wspawnlpe(cmd.exe /c %s)", Strings::to_utf8(actual_cmd_line));
- auto exit_code =
- _wspawnlpe(_P_WAIT, L"cmd.exe", L"cmd.exe", L"/c", actual_cmd_line.c_str(), nullptr, env_cstr.data());
- Debug::println("_wspawnlpe() returned %d", exit_code);
+ std::wstring actual_cmd_line = Strings::wformat(LR"###(cmd.exe /c "%s")###", cmd_line);
+ Debug::println("CreateProcessW(%s)", Strings::to_utf8(actual_cmd_line));
+ bool succeeded = TRUE == CreateProcessW(nullptr,
+ actual_cmd_line.data(),
+ nullptr,
+ nullptr,
+ FALSE,
+ BELOW_NORMAL_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT,
+ env_cstr.data(),
+ nullptr,
+ &startup_info,
+ &process_info);
+
+ Checks::check_exit(VCPKG_LINE_INFO, succeeded, "Process creation failed with error code: %lu", GetLastError());
+
+ CloseHandle(process_info.hThread);
+
+ const DWORD result = WaitForSingleObject(process_info.hProcess, INFINITE);
+ Checks::check_exit(VCPKG_LINE_INFO, result != WAIT_FAILED, "WaitForSingleObject failed");
+
+ DWORD exit_code = 0;
+ GetExitCodeProcess(process_info.hProcess, &exit_code);
+
+ Debug::println("CreateProcessW() returned %lu", exit_code);
return static_cast<int>(exit_code);
}
int cmd_execute(const CWStringView cmd_line)
{
// Flush stdout before launching external process
- fflush(nullptr);
+ 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));
- int exit_code = _wsystem(actual_cmd_line.c_str());
+ const int exit_code = _wsystem(actual_cmd_line.c_str());
Debug::println("_wsystem() returned %d", exit_code);
return exit_code;
}
+ // 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_mark(std::wstring* s)
+ {
+ const wchar_t* a = s->c_str();
+ // This is the UTF-8 byte-order mark
+ if (a[0] == 0xEF && a[1] == 0xBB && a[2] == 0xBF)
+ {
+ s->erase(0, 3);
+ }
+ }
+
ExitCodeAndOutput cmd_execute_and_capture_output(const CWStringView cmd_line)
{
// Flush stdout before launching external process
@@ -143,24 +195,26 @@ namespace vcpkg::System
const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s 2>&1")###", cmd_line);
Debug::println("_wpopen(%s)", Strings::to_utf8(actual_cmd_line));
- std::string output;
- char buf[1024];
- auto pipe = _wpopen(actual_cmd_line.c_str(), L"r");
+ std::wstring output;
+ wchar_t buf[1024];
+ const auto pipe = _wpopen(actual_cmd_line.c_str(), L"r");
if (pipe == nullptr)
{
- return {1, output};
+ return {1, Strings::to_utf8(output)};
}
- while (fgets(buf, 1024, pipe))
+ while (fgetws(buf, 1024, pipe))
{
output.append(buf);
}
if (!feof(pipe))
{
- return {1, output};
+ return {1, Strings::to_utf8(output)};
}
- auto ec = _pclose(pipe);
- Debug::println("_wpopen() returned %d", ec);
- return {ec, output};
+
+ const auto ec = _pclose(pipe);
+ Debug::println("_pclose() returned %d", ec);
+ remove_byte_order_mark(&output);
+ return {ec, Strings::to_utf8(output)};
}
std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args)
@@ -170,6 +224,8 @@ namespace vcpkg::System
LR"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.native(), args);
}
+ void println() { println(Strings::EMPTY); }
+
void print(const CStringView message) { fputs(message, stdout); }
void println(const CStringView message)
@@ -180,15 +236,15 @@ namespace vcpkg::System
void print(const Color c, const CStringView message)
{
- HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
+ const HANDLE console_handle = GetStdHandle(STD_OUTPUT_HANDLE);
- CONSOLE_SCREEN_BUFFER_INFO consoleScreenBufferInfo{};
- GetConsoleScreenBufferInfo(hConsole, &consoleScreenBufferInfo);
- auto original_color = consoleScreenBufferInfo.wAttributes;
+ CONSOLE_SCREEN_BUFFER_INFO console_screen_buffer_info{};
+ GetConsoleScreenBufferInfo(console_handle, &console_screen_buffer_info);
+ const auto original_color = console_screen_buffer_info.wAttributes;
- SetConsoleTextAttribute(hConsole, static_cast<WORD>(c) | (original_color & 0xF0));
+ SetConsoleTextAttribute(console_handle, static_cast<WORD>(c) | (original_color & 0xF0));
print(message);
- SetConsoleTextAttribute(hConsole, original_color);
+ SetConsoleTextAttribute(console_handle, original_color);
}
void println(const Color c, const CStringView message)
@@ -199,13 +255,13 @@ namespace vcpkg::System
Optional<std::wstring> get_environment_variable(const CWStringView varname) noexcept
{
- auto sz = GetEnvironmentVariableW(varname, nullptr, 0);
+ const auto sz = GetEnvironmentVariableW(varname, nullptr, 0);
if (sz == 0) return nullopt;
std::wstring ret(sz, L'\0');
Checks::check_exit(VCPKG_LINE_INFO, MAXDWORD >= ret.size());
- auto sz2 = GetEnvironmentVariableW(varname, ret.data(), static_cast<DWORD>(ret.size()));
+ const auto sz2 = GetEnvironmentVariableW(varname, ret.data(), static_cast<DWORD>(ret.size()));
Checks::check_exit(VCPKG_LINE_INFO, sz2 + 1 == sz);
ret.pop_back();
return ret;
@@ -216,59 +272,59 @@ namespace vcpkg::System
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 subKey, const CWStringView valuename)
+ Optional<std::wstring> get_registry_string(HKEY base, const CWStringView sub_key, const CWStringView valuename)
{
HKEY k = nullptr;
- LSTATUS ec = RegOpenKeyExW(base, subKey, NULL, KEY_READ, &k);
+ const LSTATUS ec = RegOpenKeyExW(base, sub_key, NULL, KEY_READ, &k);
if (ec != ERROR_SUCCESS) return nullopt;
- DWORD dwBufferSize = 0;
- DWORD dwType = 0;
- auto rc = RegQueryValueExW(k, valuename, nullptr, &dwType, nullptr, &dwBufferSize);
- if (rc != ERROR_SUCCESS || !is_string_keytype(dwType) || dwBufferSize == 0 ||
- dwBufferSize % sizeof(wchar_t) != 0)
+ DWORD dw_buffer_size = 0;
+ DWORD dw_type = 0;
+ auto rc = RegQueryValueExW(k, valuename, 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(dwBufferSize / sizeof(wchar_t));
+ ret.resize(dw_buffer_size / sizeof(wchar_t));
- rc = RegQueryValueExW(k, valuename, nullptr, &dwType, reinterpret_cast<LPBYTE>(ret.data()), &dwBufferSize);
- if (rc != ERROR_SUCCESS || !is_string_keytype(dwType) || dwBufferSize != sizeof(wchar_t) * ret.size())
+ rc = RegQueryValueExW(k, valuename, 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;
}
- 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(L"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 {
+ static const fs::path PATH = []() -> fs::path {
auto value = System::get_environment_variable(L"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 {
+ static const fs::path PATH = []() -> fs::path {
auto value = System::get_environment_variable(L"ProgramW6432");
if (auto v = value.get())
{
return std::move(*v);
}
- return get_ProgramFiles();
+ return get_program_files();
}();
- return p;
+ return PATH;
}
}
@@ -276,7 +332,7 @@ namespace vcpkg::Debug
{
void println(const CStringView message)
{
- if (g_debugging)
+ if (GlobalState::debugging)
{
System::println("[DEBUG] %s", message);
}
@@ -284,7 +340,7 @@ namespace vcpkg::Debug
void println(const System::Color c, const CStringView message)
{
- if (g_debugging)
+ if (GlobalState::debugging)
{
System::println(c, "[DEBUG] %s", message);
}
diff --git a/toolsrc/src/vcpkg_metrics_uploader.cpp b/toolsrc/src/vcpkg_metrics_uploader.cpp
index 38bf7ff9c..cef4f4756 100644
--- a/toolsrc/src/vcpkg_metrics_uploader.cpp
+++ b/toolsrc/src/vcpkg_metrics_uploader.cpp
@@ -11,5 +11,8 @@ int WINAPI WinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPSTR, _In_ int)
LPWSTR* szArgList = CommandLineToArgvW(GetCommandLineW(), &argCount);
Checks::check_exit(VCPKG_LINE_INFO, argCount == 2, "Requires exactly one argument, the path to the payload file");
- Metrics::upload(Files::get_real_filesystem().read_contents(szArgList[1]).value_or_exit(VCPKG_LINE_INFO));
+ auto v = Files::get_real_filesystem().read_contents(szArgList[1]).value_or_exit(VCPKG_LINE_INFO);
+ Metrics::g_metrics.lock()->upload(v);
+ LocalFree(szArgList);
+ return 0;
}
diff --git a/toolsrc/src/vcpkglib.cpp b/toolsrc/src/vcpkglib.cpp
index 6b180b532..5cdafdbc8 100644
--- a/toolsrc/src/vcpkglib.cpp
+++ b/toolsrc/src/vcpkglib.cpp
@@ -9,8 +9,6 @@
namespace vcpkg
{
- bool g_debugging = false;
-
static StatusParagraphs load_current_database(Files::Filesystem& fs,
const fs::path& vcpkg_dir_status_file,
const fs::path& vcpkg_dir_status_file_old)
@@ -41,7 +39,7 @@ namespace vcpkg
{
auto& fs = paths.get_filesystem();
- auto updates_dir = paths.vcpkg_dir_updates;
+ const auto updates_dir = paths.vcpkg_dir_updates;
std::error_code ec;
fs.create_directory(paths.installed, ec);
@@ -92,9 +90,9 @@ namespace vcpkg
static int update_id = 0;
auto& fs = paths.get_filesystem();
- auto my_update_id = update_id++;
- auto tmp_update_filename = paths.vcpkg_dir_updates / "incomplete";
- auto update_filename = paths.vcpkg_dir_updates / std::to_string(my_update_id);
+ const auto my_update_id = update_id++;
+ const auto tmp_update_filename = paths.vcpkg_dir_updates / "incomplete";
+ const auto update_filename = paths.vcpkg_dir_updates / std::to_string(my_update_id);
fs.write_contents(tmp_update_filename, Strings::serialize(p));
fs.rename(tmp_update_filename, update_filename);
@@ -119,7 +117,7 @@ namespace vcpkg
if (!was_tracked)
{
was_tracked = true;
- Metrics::track_property("listfile", "update to new format");
+ Metrics::g_metrics.lock()->track_property("listfile", "update to new format");
}
// The files are sorted such that directories are placed just before the files they contain
@@ -191,7 +189,7 @@ namespace vcpkg
for (const std::unique_ptr<StatusParagraph>& pgh : status_db)
{
- if (pgh->state != InstallState::INSTALLED)
+ if (pgh->state != InstallState::INSTALLED || !pgh->package.feature.empty())
{
continue;
}
@@ -235,14 +233,15 @@ namespace vcpkg
const fs::path& cmake_script,
const std::vector<CMakeVariable>& pass_variables)
{
- std::wstring cmd_cmake_pass_variables = Strings::join(L" ", pass_variables, [](auto&& v) { return v.s; });
+ 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());
}
- std::string shorten_description(const std::string& desc)
+ std::string shorten_text(const std::string& desc, size_t length)
{
+ Checks::check_exit(VCPKG_LINE_INFO, length >= 3);
auto simple_desc = std::regex_replace(desc, std::regex("\\s+"), " ");
- return simple_desc.size() <= 52 ? simple_desc : simple_desc.substr(0, 49) + "...";
+ return simple_desc.size() <= length ? simple_desc : simple_desc.substr(0, length - 3) + "...";
}
}
diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj
index 200f91d1c..edecd7720 100644
--- a/toolsrc/vcpkglib/vcpkglib.vcxproj
+++ b/toolsrc/vcpkglib/vcpkglib.vcxproj
@@ -161,6 +161,7 @@
<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" />
@@ -227,6 +228,7 @@
<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" />
diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters
index 4f51dfa9a..2fbf3d929 100644
--- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters
+++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters
@@ -177,6 +177,9 @@
<ClCompile Include="..\src\vcpkg_Parse.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\src\vcpkg_GlobalState.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\SourceParagraph.h">
@@ -302,5 +305,8 @@
<ClInclude Include="..\include\vcpkg_Parse.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\include\vcpkg_GlobalState.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj b/toolsrc/vcpkgtest/vcpkgtest.vcxproj
index ca66260d4..041e74d31 100644
--- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj
+++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj
@@ -21,6 +21,7 @@
<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" />
</ItemGroup>
diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters
index e376e59f4..b31dbd951 100644
--- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters
+++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters
@@ -27,5 +27,8 @@
<ClCompile Include="..\src\test_install_plan.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\src\tests_package_spec.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
</Project> \ No newline at end of file