diff --git a/.gitignore b/.gitignore index aa272483c71..befc51d8e7d 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,9 @@ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ -vcpkg +# Ignore the executable +/vcpkg +/vcpkg.exe # Visual Studio 2015 cache/options directory .vs/ @@ -274,14 +276,20 @@ __pycache__/ ############################################################ .vscode/ -buildtrees/ -build*/ -downloads/ -installed*/ -packages/ -scripts/buildsystems/tmp/ +*.code-workspace +/buildtrees/ +/build*/ +/downloads/ +/installed*/ +/packages/ +/scripts/buildsystems/tmp/ +/toolsrc/build.rel/ +/toolsrc/msbuild.x86.debug/ +/toolsrc/msbuild.x86.release/ +/toolsrc/msbuild.x64.debug/ +/toolsrc/msbuild.x64.release/ #ignore custom triplets -triplets/* +/triplets/* #add vcpkg-designed triplets back in !triplets/arm-uwp.cmake !triplets/arm-windows.cmake diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f275866d8a..ed5dbbe5a61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,810 @@ +vcpkg (2018.11.23) +-------------- + * Add ports: + - aixlog 1.2.1 + - civetweb 1.11-1 + - cli11 1.6.1 + - cub 1.8.0 + - cutelyst2 2.5.2-1 + - easyloggingpp 9.96.5-1 + - ecsutil 1.0.1.2-1 + - fdlibm 5.3-2 + - fizz 2018.10.15.00 + - fmi4cpp 0.4.0 + - fribidi 1.0.5 + - glad 0.1.28-3 + - igloo 1.1.1 + - libtins 4.0-2 + - linalg 2.1 + - miniupnpc 2.1 + - nanovg master + - orc 1.5.2-f47e02c-2 + - pixel 0.3 + - plustache 0.4.0-1 + - prometheus-cpp 0.6.0 + - rapidcheck 2018-11-05-1 + - reproc v1.0.0 + - sdl1 1.2.15-3 + - sdl1-net 1.2.8-2 + - snowhouse 3.0.1 + - so5extra 1.2.1 + - socket-io-client 1.6.1 + - stlab 1.3.3 + - tl-optional 0.5-1 + - trompeloeil 32-1 + - vulkan 1.1.82.1 + * Update ports: + - abseil 2018-09-18-3 -> 2018-11-08 + - args 2018-06-28 -> 2018-10-25 + - asio 1.12.1 -> 1.12.1-1 + - asmjit 673dcefaa048c5f5a2bf8b85daf8f7b9978d018a -> 2018-11-08 + - assimp 4.1.0-2 -> 4.1.0-3 + - aws-sdk-cpp 1.6.12-1 -> 1.6.47 + - azure-c-shared-utility 1.1.5 -> 1.1.10-1 + - azure-iot-sdk-c 1.2.3 -> 1.2.10-1 + - azure-storage-cpp 5.1.1 -> 5.2.0 + - azure-uamqp-c 1.2.3 -> 1.2.10-1 + - azure-uhttp-c LTS_01_2018_Ref01 -> 1.1.10-1 + - azure-umqtt-c 1.1.5 -> 1.1.10-1 + - berkeleydb 4.8.30 -> 4.8.30-2 + - boost-modular-build-helper 2018-08-21 -> 2018-10-19 + - brynet 0.9.0 -> 1.0.0 + - bzip2 1.0.6-2 -> 1.0.6-3 + - c-ares cares-1_14_0 -> cares-1_15_0 + - catch2 2.4.0 -> 2.4.2 + - celero 2.3.0-1 -> 2.4.0 + - cgal 4.13-1 -> 4.13-2 + - chakracore 1.11.1-1 -> 1.11.2 + - cimg 2.3.6 -> 2.4.1 + - clara 2018-04-02 -> 2018-11-01 + - corrade 2018.04-1 -> 2018.10-1 + - cpprestsdk 2.10.6-1 -> 2.10.6-3 + - cxxopts 2.1.0-1 -> 2.1.1 + - dimcli 3.1.1-2 -> 4.0.1-1 + - directxmesh aug2018 -> oct2018 + - directxtex aug2018b -> oct2018 + - directxtk aug2018 -> oct2018b + - doctest 2.0.0 -> 2.0.1 + - double-conversion 3.1.0 -> 3.1.0-1 + - eastl 3.12.01 -> 3.12.04 + - egl-registry 2018-06-30 -> 2018-06-30-1 + - entityx 1.2.0-1 -> 1.2.0-2 + - entt 2.7.3 -> 2.7.3-1 + - exiv2 2018-09-18 -> 2018-11-08 + - exprtk 2018.09.30-9836f21 -> 2018-10-11 + - fastcdr 1.0.6-1 -> 1.0.6-2 + - fftw3 3.3.7-2 -> 3.3.8 + - flann 1.9.1-7 -> 1.9.1-8 + - fmt 5.2.0 -> 5.2.1 + - folly 2018.09.17.00 -> 2018.11.05.00 + - forest 9.0.5 -> 9.0.6 + - freeimage 3.17.0-4 -> 3.18.0-2 + - gdcm2 2.8.7 -> 2.8.8 + - glm 0.9.9.2 -> 0.9.9.3 + - google-cloud-cpp 0.1.0-1 -> 0.3.0-1 + - gtest 1.8.0-9 -> 1.8.1-1 + - gtk 3.22.19-1 -> 3.22.19-2 + - hunspell 1.6.1-2 -> 1.6.1-3 + - jsonnet 2018-09-18 -> 2018-11-01 + - libfreenect2 0.2.0 -> 0.2.0-1 + - libgd 2.2.4-3 -> 2.2.4-4 + - libgeotiff 1.4.2-4 -> 1.4.2-6 + - liblinear 2.20 -> 221 + - libpng 1.6.35 -> 1.6.35-1 + - libpq 9.6.1-4 -> 9.6.1-5 + - libusb 1.0.21-fc99620 -> 1.0.22-1 + - libuv 1.23.0 -> 1.24.0 + - libwebm 1.0.0.27-2 -> 1.0.0.27-3 + - magnum 2018.04-1 -> 2018.10-1 + - magnum-extras 2018.04-1 -> 2018.10-1 + - magnum-integration 2018.04-1 -> 2018.10-1 + - magnum-plugins 2018.04-1 -> 2018.10-1 + - matio 1.5.12 -> 1.5.13 + - metis 5.1.0-1 -> 5.1.0-2 + - minizip 1.2.11-2 -> 1.2.11-3 + - mpir 3.0.0-4 -> 3.0.0-5 + - ms-gsl 2018-09-18 -> 2018-11-08 + - nghttp2 1.33.0 -> 1.34.0 + - nlohmann-json 3.3.0 -> 3.4.0 + - nng 1.0.1 -> 1.1.0 + - nuklear 2018-09-18 -> 2018-11-01 + - openal-soft 1.19.0 -> 1.19.1 + - opencv 3.4.1 -> 3.4.3-3 + - opengl-registry 2018-06-30 -> 2018-06-30-1 + - openimageio Release-1.8.13 -> 1.8.16 + - openssl-unix 1.0.2p -> 1.0.2p-1 + - opus 1.2.1-1 -> 1.3 + - osgearth 2.9-1 -> 2.9-2 + - pcl 1.8.1-12 -> 1.9.0-1 + - pixman 0.34.0-4 -> 0.34.0-5 + - portaudio 19.0.6.00-2 -> 19.0.6.00-4 + - qhull 2015.2-2 -> 2015.2-3 + - qscintilla 2.10-4 -> 2.10-7 + - qt5 5.9.2-1 -> 5.11.2 + - qt5-3d 5.9.2-0 -> 5.11.2 + - qt5-activeqt 5.9.2-0 -> 5.11.2 + - qt5-base 5.9.2-7 -> 5.11.2-1 + - qt5-charts 5.9.2-0 -> 5.11.2 + - qt5-datavis3d 5.9.2-0 -> 5.11.2 + - qt5-declarative 5.9.2-0 -> 5.11.2 + - qt5-gamepad 5.9.2-0 -> 5.11.2 + - qt5-graphicaleffects 5.9.2-0 -> 5.11.2 + - qt5-imageformats 5.9.2-0 -> 5.11.2 + - qt5-modularscripts 4 -> 2018-11-01-1 + - qt5-multimedia 5.9.2-0 -> 5.11.2 + - qt5-networkauth 5.9.2-0 -> 5.11.2 + - qt5-quickcontrols 5.9.2-1 -> 5.11.2 + - qt5-quickcontrols2 5.9.2-1 -> 5.11.2 + - qt5-script 5.9.2 -> 5.11.2 + - qt5-scxml 5.9.2-0 -> 5.11.2 + - qt5-serialport 5.9.2-0 -> 5.11.2 + - qt5-speech 5.9.2-0 -> 5.11.2 + - qt5-svg 5.9.2-0 -> 5.11.2 + - qt5-tools 5.9.2-0 -> 5.11.2 + - qt5-virtualkeyboard 5.9.2-0 -> 5.11.2 + - qt5-websockets 5.9.2-0 -> 5.11.2 + - qt5-winextras 5.9.2-0 -> 5.11.2 + - qt5-xmlpatterns 5.9.2-0 -> 5.11.2 + - qwt 6.1.3-5 -> 6.1.3-6 + - range-v3 0.3.5 -> 0.4.0-20181122 + - rapidjson 1.1.0-1 -> 1.1.0-2 + - re2 2018-09-18 -> 2018-11-01 + - rocksdb 5.14.2 -> 5.15.10 + - rs-core-lib 2018-09-18 -> 2018-10-25 + - rttr 0.9.5-2 -> 0.9.5-3 + - scintilla 4.0.3 -> 4.1.2 + - sdl2 2.0.8-1 -> 2.0.9-1 + - sfml 2.5.0-2 -> 2.5.1 + - sobjectizer 5.5.22.1 -> 5.5.23 + - spdlog 1.0.0 -> 1.2.1 + - sqlite3 3.24.0-1 -> 3.25.2 + - suitesparse 4.5.5-4 -> 5.1.2 + - tbb 2018_U5-4 -> 2018_U6 + - thrift 2018-09-18 -> 2018-11-01 + - tiff 4.0.9-4 -> 4.0.10 + - tiny-dnn 2018-09-18 -> 2018-10-25 + - unicorn 2018-09-18 -> 2018-10-25 + - unicorn-lib 2018-09-18 -> 2018-10-25 + - uriparser 0.8.6 -> 0.9.0 + - vtk 8.1.0-1 -> 8.1.0-3 + - vxl 20180414-7a130cf-1 -> v1.18.0-2 + - wangle v2018.07.30.00-1 -> 2018.11.05.00 + - websocketpp 0.7.0-1 -> 0.8.1 + - winpcap 4.1.3-1 -> 4.1.3-2 + - xalan-c 1.11-1 -> 1.11-4 + - xerces-c 3.1.4-3 -> 3.2.2-5 + - yoga 1.9.0 -> 1.10.0 + - zeromq 2018-09-18 -> 2018-11-01 + * `vcpkg install`: Improve error messages + * `vcpkg hash`: Now also tries `shaABCsum tools`, instead of only `shasum`. Allows building in OSes like Alpine. + * `vcpkg edit`: No longer launches the editor in a clean (purged) environment. + * `vcpkg upgrade`: now tab-completed in powershell (it was missing before). + * Add new function: `vcpkg_from_git()` + * Enable Visual Studio versions greater than 15. + * Add Visual Studio Code autotection on OSX (#4589) + * Work-around hash issue caused by NuGet adding signatures to all their files. + * Improve building `vcpkg.exe` (Windows-only): + - Builds out of source + - Temporary files are removed after bootstrap + - User Property Pages are ignored (#4620) + * `vcpkg` now prints URL and filepath, when downloading a tool (#4640) + * Bump version of `cmake` to 3.12.4 + * Bump version of `git` to 2.9.1 + +-- vcpkg team FRI, 23 Nov 2018 14:30:00 -0800 + + +vcpkg (2018.10.20) +-------------- + * Add ports: + - 3fd 2.6.2 + - argtable2 2.13-1 + - asyncplusplus 1.0-1 + - bde 3.2.0.0 + - boost-hana-msvc 1.67.0-1 + - boost-yap 1.68.0 + - check 0.12.0-1 + - concurrentqueue 1.0.0-beta + - crossguid 0.2.2-2018-06-16 + - darts-clone 1767ab87cffe + - dcmtk 3.6.3 + - docopt 2018-04-16-2 + - egl-registry 2018-06-30 + - embree2 2.16.4-3 + - embree3 3.2.0-2 + - esaxx ca7cb332011ec37 + - fastfeat 391d5e9 + - fmilib 2.0.3 + - fruit 3.4.0-1 + - getopt 0 + - getopt-win32 0.1 + - gmmlib 18.3.pre2-1 + - graphqlparser v0.7.0 + - ideviceinstaller 1.1.2.23-1 + - idevicerestore 1.0.12-1 + - inih 42 + - intelrdfpmathlib 20U2 + - io2d 0.1-1 + - json11 2017-06-20 + - kangaru 4.1.2 + - kf5archive 5.50.0 + - kf5holidays 5.50.0 + - laszip 3.2.2-1 + - libdshowcapture 0.6.0 + - libideviceactivation 1.0.38-1 + - libimobiledevice 1.2.1.215-1 + - libirecovery 1.0.25-2 + - liblemon 1.3.1-2 + - libmaxminddb 1.3.2-1 + - libmodbus 3.1.4-1 + - libmorton 2018-19-07 + - libplist 2.0.1.197-2 + - libusbmuxd 1.0.107-2 + - libyaml 0.2.1-1 + - linenoise-ng 4754bee2d8eb3 + - luabridge 2.1-1 + - milerius-sfml-imgui 1.1 + - minisat-master-keying 2.2-mod-1 + - mio 2018-10-18-1 + - modp-base64 + - morton-nd 2.0.0 + - nanorange 0.0.0 + - nng 1.0.1 + - ogdf 2018-03-28-2 + - opengl-registry 2018-06-30 + - openssl-unix 1.0.2p + - openssl-uwp 1.0.2l-winrt + - openssl-windows 1.0.2p-1 + - osg-qt 3.5.7 + - parquet 1.4.0 + - pcg 0.98.1 + - pegtl 2.7.1 + - plib 1.8.5-2 + - pngwriter 0.7.0-1 + - python2 2.7.15-1 + - qt5-activeqt 5.9.2-0 + - qt5-script 5.9.2 + - readerwriterqueue 1.0.0 + - readline 0 + - readline-win32 5.0-2 + - restbed 4.16-07-28-2018 + - safeint 3.19.2 + - sais 2.4.1 + - selene 0.1.1 + - shiva 1.0 + - shiva-sfml 1.0 + - simpleini 2018-08-31-1 + - soil 2008.07.07-1 + - sol2 2.20.4 + - spaceland 7.8.2-0 + - spirv-cross 2018-08-07-1 + - tinyfiledialogs 3.3.7-1 + - tinyobjloader 1.2.0-1 + - tinyspline 0.2.0-1 + - tinyutf8 2.1.1-1 + - tl-expected 0.3-1 + - tmx 1.0.0 + - tmxparser 2.1.0-1 + - usbmuxd 1.1.1.133-1 + - usrsctp 35c1d97020a + - uvw 1.11.2 + - vtk-dicom 0.8.8-alpha-1 + - vulkan-memory-allocator 2.1.0-1 + - wangle v2018.07.30.00-1 + - woff2 1.0.2 + * Update ports: + - abseil 2018-05-01-1 -> 2018-09-18-3 + - ace 6.4.8 -> 6.5.2 + - alembic 1.7.8 -> 1.7.9 + - allegro5 5.2.3.0 -> 5.2.4.0 + - angle 2017-06-14-8d471f-4 -> 2017-06-14-8d471f-5 + - apr 1.6.3 -> 1.6.5 + - args 2018-05-17 -> 2018-06-28 + - arrow 0.6.0-1 -> 0.9.0-1 + - asio 1.12.0-2 -> 1.12.1 + - assimp 4.1.0-1 -> 4.1.0-2 + - aws-sdk-cpp 1.4.52 -> 1.6.12-1 + - azure-c-shared-utility 1.1.3 -> 1.1.5 + - azure-storage-cpp 4.0.0 -> 5.1.1 + - azure-uhttp-c 2018-02-09 -> LTS_01_2018_Ref01 + - azure-umqtt-c 1.1.3 -> 1.1.5 + - benchmark 1.4.0 -> 1.4.1 + - blaze 3.3 -> 3.4-1 + - boost 1.67.0 -> 1.68.0 + - boost-accumulators 1.67.0 -> 1.68.0 + - boost-algorithm 1.67.0 -> 1.68.0 + - boost-align 1.67.0 -> 1.68.0 + - boost-any 1.67.0 -> 1.68.0 + - boost-array 1.67.0 -> 1.68.0 + - boost-asio 1.67.0-1 -> 1.68.0-1 + - boost-assert 1.67.0 -> 1.68.0 + - boost-assign 1.67.0 -> 1.68.0 + - boost-atomic 1.67.0 -> 1.68.0 + - boost-beast 1.67.0 -> 1.68.0 + - boost-bimap 1.67.0 -> 1.68.0 + - boost-bind 1.67.0 -> 1.68.0 + - boost-build 1.67.0 -> 1.68.0 + - boost-callable-traits 1.67.0 -> 1.68.0 + - boost-chrono 1.67.0 -> 1.68.0 + - boost-circular-buffer 1.67.0 -> 1.68.0 + - boost-compatibility 1.67.0 -> 1.68.0 + - boost-compute 1.67.0 -> 1.68.0 + - boost-concept-check 1.67.0 -> 1.68.0 + - boost-config 1.67.0 -> 1.68.0 + - boost-container 1.67.0 -> 1.68.0 + - boost-container-hash 1.67.0 -> 1.68.0 + - boost-context 1.67.0 -> 1.68.0-1 + - boost-contract 1.67.0 -> 1.68.0 + - boost-conversion 1.67.0 -> 1.68.0 + - boost-convert 1.67.0 -> 1.68.0 + - boost-core 1.67.0 -> 1.68.0 + - boost-coroutine 1.67.0 -> 1.68.0 + - boost-coroutine2 1.67.0 -> 1.68.0 + - boost-crc 1.67.0 -> 1.68.0 + - boost-date-time 1.67.0 -> 1.68.0 + - boost-detail 1.67.0 -> 1.68.0 + - boost-di 1.0.1 -> 1.0.2 + - boost-disjoint-sets 1.67.0 -> 1.68.0 + - boost-dll 1.67.0 -> 1.68.0 + - boost-dynamic-bitset 1.67.0 -> 1.68.0 + - boost-endian 1.67.0 -> 1.68.0 + - boost-exception 1.67.0 -> 1.68.0 + - boost-fiber 1.67.0 -> 1.68.0 + - boost-filesystem 1.67.0 -> 1.68.0 + - boost-flyweight 1.67.0 -> 1.68.0 + - boost-foreach 1.67.0 -> 1.68.0 + - boost-format 1.67.0 -> 1.68.0 + - boost-function 1.67.0 -> 1.68.0 + - boost-function-types 1.67.0 -> 1.68.0 + - boost-functional 1.67.0 -> 1.68.0 + - boost-fusion 1.67.0 -> 1.68.0 + - boost-geometry 1.67.0 -> 1.68.0 + - boost-gil 1.67.0 -> 1.68.0 + - boost-graph 1.67.0 -> 1.68.0 + - boost-graph-parallel 1.67.0 -> 1.68.0 + - boost-hana 1.67.0 -> 1.68.0-1 + - boost-heap 1.67.0 -> 1.68.0 + - boost-hof 1.67.0 -> 1.68.0 + - boost-icl 1.67.0 -> 1.68.0 + - boost-integer 1.67.0 -> 1.68.0 + - boost-interprocess 1.67.0 -> 1.68.0 + - boost-interval 1.67.0 -> 1.68.0 + - boost-intrusive 1.67.0 -> 1.68.0 + - boost-io 1.67.0 -> 1.68.0 + - boost-iostreams 1.67.0 -> 1.68.0 + - boost-iterator 1.67.0 -> 1.68.0 + - boost-lambda 1.67.0 -> 1.68.0 + - boost-lexical-cast 1.67.0 -> 1.68.0 + - boost-local-function 1.67.0 -> 1.68.0 + - boost-locale 1.67.0 -> 1.68.0 + - boost-lockfree 1.67.0 -> 1.68.0-1 + - boost-log 1.67.0 -> 1.68.0 + - boost-logic 1.67.0 -> 1.68.0 + - boost-math 1.67.0 -> 1.68.0 + - boost-metaparse 1.67.0 -> 1.68.0 + - boost-modular-build-helper 2018-05-14 -> 2018-08-21 + - boost-move 1.67.0 -> 1.68.0 + - boost-mp11 1.67.0 -> 1.68.0 + - boost-mpi 1.67.0-1 -> 1.68.0-1 + - boost-mpl 1.67.0 -> 1.68.0 + - boost-msm 1.67.0 -> 1.68.0 + - boost-multi-array 1.67.0 -> 1.68.0 + - boost-multi-index 1.67.0 -> 1.68.0 + - boost-multiprecision 1.67.0 -> 1.68.0 + - boost-numeric-conversion 1.67.0 -> 1.68.0 + - boost-odeint 1.67.0 -> 1.68.0 + - boost-optional 1.67.0 -> 1.68.0 + - boost-parameter 1.67.0 -> 1.68.0 + - boost-phoenix 1.67.0 -> 1.68.0 + - boost-poly-collection 1.67.0 -> 1.68.0 + - boost-polygon 1.67.0 -> 1.68.0 + - boost-pool 1.67.0 -> 1.68.0 + - boost-predef 1.67.0 -> 1.68.0 + - boost-preprocessor 1.67.0 -> 1.68.0 + - boost-process 1.67.0 -> 1.68.0 + - boost-program-options 1.67.0 -> 1.68.0 + - boost-property-map 1.67.0 -> 1.68.0 + - boost-property-tree 1.67.0 -> 1.68.0 + - boost-proto 1.67.0 -> 1.68.0 + - boost-ptr-container 1.67.0 -> 1.68.0 + - boost-python 1.67.0-1 -> 1.68.0-2 + - boost-qvm 1.67.0 -> 1.68.0 + - boost-random 1.67.0 -> 1.68.0 + - boost-range 1.67.0 -> 1.68.0 + - boost-ratio 1.67.0 -> 1.68.0 + - boost-rational 1.67.0 -> 1.68.0 + - boost-regex 1.67.0 -> 1.68.0 + - boost-scope-exit 1.67.0 -> 1.68.0 + - boost-serialization 1.67.0 -> 1.68.0 + - boost-signals 1.67.0 -> 1.68.0 + - boost-signals2 1.67.0 -> 1.68.0 + - boost-smart-ptr 1.67.0 -> 1.68.0 + - boost-sort 1.67.0 -> 1.68.0 + - boost-spirit 1.67.0 -> 1.68.0 + - boost-stacktrace 1.67.0 -> 1.68.0 + - boost-statechart 1.67.0 -> 1.68.0 + - boost-static-assert 1.67.0 -> 1.68.0 + - boost-system 1.67.0 -> 1.68.0 + - boost-test 1.67.0-2 -> 1.68.0-2 + - boost-thread 1.67.0 -> 1.68.0 + - boost-throw-exception 1.67.0 -> 1.68.0 + - boost-timer 1.67.0 -> 1.68.0 + - boost-tokenizer 1.67.0 -> 1.68.0 + - boost-tti 1.67.0 -> 1.68.0 + - boost-tuple 1.67.0 -> 1.68.0 + - boost-type-erasure 1.67.0 -> 1.68.0 + - boost-type-index 1.67.0 -> 1.68.0 + - boost-type-traits 1.67.0 -> 1.68.0 + - boost-typeof 1.67.0 -> 1.68.0 + - boost-ublas 1.67.0 -> 1.68.0 + - boost-units 1.67.0 -> 1.68.0 + - boost-unordered 1.67.0 -> 1.68.0 + - boost-utility 1.67.0 -> 1.68.0 + - boost-uuid 1.67.0 -> 1.68.0 + - boost-variant 1.67.0 -> 1.68.0 + - boost-vmd 1.67.0 -> 1.68.0 + - boost-wave 1.67.0 -> 1.68.0 + - boost-winapi 1.67.0 -> 1.68.0 + - boost-xpressive 1.67.0 -> 1.68.0 + - botan 2.0.1 -> 2.8.0 + - breakpad 2018-04-17 -> 2018-09-18 + - brotli 1.0.2-3 -> 1.0.2-4 + - cairo 1.15.8-1 -> 1.15.8-3 + - cartographer 0.3.0-4 -> 0.3.0-5 + - catch2 2.2.2 -> 2.4.0 + - celero 2.1.0-2 -> 2.3.0-1 + - cgal 4.12 -> 4.13-1 + - chaiscript 6.0.0 -> 6.1.0 + - chakracore 1.8.4 -> 1.11.1-1 + - cimg 2.2.3 -> 2.3.6 + - clockutils 1.1.1-3651f232c27074c4ceead169e223edf5f00247c5-1 -> 1.1.1-3651f232c27074c4ceead169e223edf5f00247c5-2 + - cmark 0.28.3-1 -> 0.28.3-2 + - coolprop 6.1.0-3 -> 6.1.0-4 + - cpprestsdk 2.10.2-1 -> 2.10.6-1 + - crc32c 1.0.5 -> 1.0.5-1 + - cryptopp 6.1.0-2 -> 7.0.0 + - curl 7.60.0 -> 7.61.1-1 + - cxxopts 1.3.0 -> 2.1.0-1 + - dimcli 3.1.1-1 -> 3.1.1-2 + - directxmesh may2018 -> aug2018 + - directxtex may2018 -> aug2018b + - directxtk may2018 -> aug2018 + - discord-rpc 3.3.0 -> 3.3.0-1 + - dlib 19.10-1 -> 19.16 + - doctest 1.2.9 -> 2.0.0 + - double-conversion 3.0.0-2 -> 3.1.0 + - draco 1.2.5 -> 1.3.3 + - eastl 3.09.00 -> 3.12.01 + - ecm 5.40.0 -> 5.50.0 + - eigen3 3.3.4-2 -> 3.3.5 + - entt 2.5.0 -> 2.7.3 + - exiv2 2018-05-17 -> 2018-09-18 + - expat 2.2.5 -> 2.2.6 + - exprtk 2018.04.30-46877b6 -> 2018.09.30-9836f21 + - fastrtps 1.5.0 -> 1.5.0-1 + - fdk-aac 2018-05-17 -> 2018-07-08 + - flatbuffers 1.8.0-2 -> 1.9.0-2 + - fmt 4.1.0 -> 5.2.0 + - folly 2018.05.14.00 -> 2018.09.17.00 + - fontconfig 2.12.4-1 -> 2.12.4-7 + - forest 7.0.7 -> 9.0.5 + - freeglut 3.0.0-4 -> 3.0.0-5 + - freetype-gl 2018-02-25 -> 2018-09-18 + - gdal 2.3.0-1 -> 2.3.2 + - gdcm2 2.8.6 -> 2.8.7 + - geogram 1.6.0-1 -> 1.6.4 + - geos 3.6.2-3 -> 3.6.3-2 + - glbinding 2.1.1-3 -> 3.0.2-3 + - glfw3 3.2.1-2 -> 3.2.1-3 + - glib 2.52.3-9 -> 2.52.3-11 + - glm 0.9.8.5-1 -> 0.9.9.2 + - globjects 1.0.0-1 -> 1.1.0-2018-09-19 + - glslang 2018-03-02 -> 2018-03-02-1 + - google-cloud-cpp 0.1.0 -> 0.1.0-1 + - graphicsmagick 1.3.28 -> 1.3.30-1 + - graphite2 1.3.10 -> 1.3.12 + - grpc 1.10.1-2 -> 1.14.1 + - gtest 1.8.0-8 -> 1.8.0-9 + - guetzli 2017-09-02-cb5e4a86f69628-1 -> 2018-07-30 + - gumbo 0.10.1-1 -> 0.10.1-2 + - harfbuzz 1.7.6-1 -> 1.8.4-2 + - http-parser 2.7.1-3 -> 2.8.1 + - hwloc 1.11.7-2 -> 1.11.7-3 + - icu 61.1-1 -> 61.1-4 + - imgui 1.60 -> 1.65 + - json-dto 0.2.5 -> 0.2.6 + - jsonnet 2018-05-17 -> 2018-09-18 + - kf5plotting 5.37.0 -> 5.50.0 + - lcms 2.8-4 -> 2.8-5 + - leptonica 1.74.4-3 -> 1.76.0 + - libarchive 3.3.2-1 -> 3.3.3-2 + - libflac 1.3.2-5 -> 1.3.2-6 + - libgeotiff 1.4.2-3 -> 1.4.2-4 + - libgit2 0.26.0 -> 0.27.4-2 + - libgo 2.7 -> 2.8-2 + - liblzma 5.2.3-2 -> 5.2.4 + - libmariadb 3.0.2 -> 3.0.2-1 + - libmysql 8.0.4-2 -> 8.0.4-3 + - libodb 2.4.0-2 -> 2.4.0-3 + - libodb-mysql 2.4.0-1 -> 2.4.0-2 + - libp7-baical 4.4-2 -> 4.4-3 + - libpng 1.6.34-3 -> 1.6.35 + - libpqxx 6.0.0 -> 6.0.0-1 + - libraw 0.18.2-5 -> 0.19.0-1 + - libsndfile 1.0.29-6830c42-3 -> 1.0.29-6830c42-5 + - libssh 0.7.5-4 -> 0.7.6 + - libssh2 1.8.0-3 -> 1.8.0-4 + - libuv 1.20.3-2 -> 1.23.0 + - libvorbis 1.3.5-143caf4-3 -> 1.3.6-112d3bd-1 + - libwebsockets 3.0.0 -> 3.0.1 + - libzip rel-1-5-1 -> rel-1-5-1-vcpkg1 + - live555 2018.02.28 -> latest + - llvm 6.0.0-1 -> 7.0.0 + - log4cplus REL_2_0_0-RC2 -> REL_2_0_1 + - luasocket 2018-02-25 -> 2018-09-18 + - lz4 1.8.2 -> 1.8.3 + - mbedtls 2.6.1 -> 2.13.1 + - mongo-cxx-driver 3.1.1-2 -> 3.1.1-3 + - monkeys-audio 4.3.3 -> 4.3.3-1 + - mosquitto 1.4.15 -> 1.5.0 + - ms-gsl 2018-05-17 -> 2018-09-18 + - mujs 2018-05-17 -> 2018-07-30 + - nana 1.5.5 -> 1.6.2 + - nanodbc 2.12.4-1 -> 2.12.4-2 + - nanomsg 1.1.2 -> 1.1.4 + - nghttp2 1.30.0-1 -> 1.33.0 + - nlohmann-json 3.1.2 -> 3.3.0 + - nlopt 2.4.2-c43afa08d~vcpkg1-1 -> 2.4.2-1226c127 + - nuklear 2018-05-17 -> 2018-09-18 + - octomap cefed0c1d79afafa5aeb05273cf1246b093b771c-2 -> cefed0c1d79afafa5aeb05273cf1246b093b771c-3 + - openal-soft 1.18.2-2 -> 1.19.0 + - openimageio Release-1.9.2dev -> Release-1.8.13 + - openmama 6.2.1-a5a93a24d2f89a0def0145552c8cd4a53c69e2de -> 6.2.2 + - openmesh 6.3 -> 7.0 + - openssl 1.0.2o-2 -> 0 + - openvr 1.0.15 -> 1.0.16 + - opusfile 0.9-1 -> 0.11-1 + - osg 3.5.6-2 -> 3.6.2 + - osgearth 2.9 -> 2.9-1 + - paho-mqtt 1.2.0-3 -> 1.2.1 + - parson 2018-05-17 -> 2018-09-18 + - pcl 1.8.1-10 -> 1.8.1-12 + - pdal 1.7.1-2 -> 1.7.1-3 + - pdcurses 3.4-1 -> 3.6 + - picosha2 2018-02-25 -> 2018-07-30 + - pixman 0.34.0-2 -> 0.34.0-4 + - plibsys 0.0.3-1 -> 0.0.4-1 + - pmdk 1.4-2 -> 1.4.2 + - poco 1.9.0 -> 1.9.0-1 + - podofo 0.9.5-2 -> 0.9.6 + - protobuf 3.5.1-4 -> 3.6.1-4 + - pybind11 2.2.1 -> 2.2.3-1 + - python3 3.6.4-1 -> 3.6.4-2 + - qpid-proton 0.18.1 -> 0.24.0 + - qt5-base 5.9.2-6 -> 5.9.2-7 + - qt5-modularscripts 3 -> 4 + - re2 2018-05-17 -> 2018-09-18 + - realsense2 2.10.4 -> 2.16.1 + - restinio 0.4.5.1 -> 0.4.8 + - rocksdb 5.13.1 -> 5.14.2 + - rs-core-lib 2018-05-17 -> 2018-09-18 + - sciter 4.1.7 -> 4.2.2 + - sdl2-image 2.0.2-1 -> 2.0.2-3 + - sfgui 0.3.2-1 -> 0.3.2-2 + - sfml 2.4.2-3 -> 2.5.0-2 + - shaderc 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da-1 -> 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da-2 + - signalrclient 1.0.0-beta1-3 -> 1.0.0-beta1-4 + - sobjectizer 5.5.22 -> 5.5.22.1 + - soci 2016.10.22-1 -> 3.2.3-1 + - spdlog 0.16.3 -> 1.0.0 + - sqlite-modern-cpp 3.2 -> 3.2-e2248fa + - sqlite-orm 1.1 -> 1.2 + - sqlite3 3.23.1-1 -> 3.24.0-1 + - string-theory 1.7 -> 2.1 + - strtk 2018.05.07-48c9554 -> 2018.09.30-b887974 + - sundials 2.7.0-1 -> 3.1.1 + - tbb 2018_U3 -> 2018_U5-4 + - tesseract 3.05.01-3 -> 3.05.02 + - thor 2.0-1 -> 2.0-2 + - thrift 2018-05-17 -> 2018-09-18 + - tiff 4.0.9 -> 4.0.9-4 + - tiny-dnn 2018-03-13 -> 2018-09-18 + - torch-th 20180131-89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8-2 -> 2018-07-03 + - unicorn 2018-05-17 -> 2018-09-18 + - unicorn-lib 2018-05-17 -> 2018-09-18 + - uriparser 0.8.5 -> 0.8.6 + - wt 4.0.3 -> 4.0.4 + - x264 152-e9a5903edf8ca59-1 -> 157-303c484ec828ed0 + - xlnt 1.2.0-1 -> 1.3.0-1 + - yaml-cpp 0.6.2 -> 0.6.2-2 + - yara e3439e4ead4ed5d3b75a0b46eaf15ddda2110bb9 -> e3439e4ead4ed5d3b75a0b46eaf15ddda2110bb9-1 + - yoga 1.8.0-1 -> 1.9.0 + - zeromq 2018-05-17 -> 2018-09-18 + * Change version format of the `vcpkg` tool to a date + * Improve handling of ctrl-c inside `install` or `build` + * Improvements in `vcpkg edit`: + - Fix console blocking when using VSCode and no other instance of VSCode is running + - `--all` option now opens package folders + - Now checks the default user-wide installation dir of VSCode (in addition to system-wide) + * `vcpkg env`: add argument to execute a command in the environment of the selected triplet + - e.g. `vcpkg env --triplet x64-windows "cl.exe"` + * Survey message changes: + - Survey message may pop-up only in `install`, `remove`, `export`, `update`. This prevents issues with parsing the output of other more script-oriented commands + - Adjust the survey frequency to 6 months, with an additional once after 10 days of use + - Improve metrics performance on Windows + * Fix OSX build for old gcc versions + * Fix handling of symlink when installing or removing a library + * Use -fPIC in all builds to enable mixing static libs with shared objects. + * Move graph options to `vcpkg depend-info` (from `vcpkg search`) + * Add `vcpkg_from_gitlab` function + * Documentation improvements in various `vcpkg_*` cmake functions + +-- vcpkg team SAT, 20 Oct 2018 17:00:00 -0800 + + +vcpkg (0.0.113) +-------------- + * Add ports: + - json-dto 0.2.5 + - keystone 0.9.1 + - osgearth 2.9 + - pdal 1.7.1-2 + - sdl2pp 0.16.0-1 + * Update ports: + - args 2018-02-23 -> 2018-05-17 + - aws-sdk-cpp 1.4.40 -> 1.4.52 + - chakracore 1.8.3 -> 1.8.4 + - cimg 2.2.2 -> 2.2.3 + - curl 7_59_0-2 -> 7.60.0 + - directxmesh apr2018 -> may2018 + - directxtex apr2018 -> may2018 + - directxtk apr2018 -> may2018 + - doctest 1.2.8 -> 1.2.9 + - entt 2.4.2-1 -> 2.5.0 + - exiv2 2018-04-25 -> 2018-05-17 + - fdk-aac 2018-03-07 -> 2018-05-17 + - forest 7.0.6 -> 7.0.7 + - gdal 2.2.2-1 -> 2.3.0-1 + - grpc 1.10.1-1 -> 1.10.1-2 + - jsonnet 2018-05-01 -> 2018-05-17 + - libuv 1.20.2 -> 1.20.3-2 + - libwebsockets 2.4.2 -> 3.0.0 + - lodepng 2018-02-25 -> 2018-05-17 + - mpg123 1.25.8-4 -> 1.25.8-5 + - ms-gsl 2018-05-01 -> 2018-05-17 + - mujs 2018-05-01 -> 2018-05-17 + - nuklear 2018-04-25 -> 2018-05-17 + - opus 1.2.1 -> 1.2.1-1 + - parson 2018-04-17 -> 2018-05-17 + - pmdk 1.4-1 -> 1.4-2 + - podofo 0.9.5-1 -> 0.9.5-2 + - re2 2018-05-01 -> 2018-05-17 + - rocksdb 5.12.4 -> 5.13.1 + - rs-core-lib 2018-05-01 -> 2018-05-17 + - sdl2-mixer 2.0.2-2 -> 2.0.2-4 + - thrift 2018-05-01 -> 2018-05-17 + - unicorn 2018-04-25 -> 2018-05-17 + - unicorn-lib 2018-05-01 -> 2018-05-17 + - uwebsockets 0.14.8-1 -> 0.14.8-2 + - wtl 10.0 -> 10.0-1 + - zeromq 2018-05-01 -> 2018-05-17 + * `vcpkg` no longer calls `powershell` from `cmake`. + - This completes the fix for the issue where `vcpkg.exe` would change the console's font when invoking `powershell`. + - `Powershell` is no longer called other than for bootstrap and powershell integration for tab-completion. + +-- vcpkg team SAT, 16 May 2018 19:30:00 -0800 + + +vcpkg (0.0.112) +-------------- + * Add ports: + - robin-map 0.2.0 + * Update ports: + - abseil 2018-04-25-1 -> 2018-05-01-1 + - ace 6.4.7 -> 6.4.8 + - aws-sdk-cpp 1.4.38 -> 1.4.40 + - azure-storage-cpp 3.2.1 -> 4.0.0 + - blosc 1.13.5 -> 1.13.5-1 + - boost-modular-build-helper 2018-04-16-4 -> 2018-05-14 + - brotli 1.0.2-2 -> 1.0.2-3 + - catch-classic 1.12.1 -> 1.12.2 + - folly 2018.04.23.00 -> 2018.05.14.00 + - jsonnet 2018-04-25 -> 2018-05-01 + - ms-gsl 2018-04-25 -> 2018-05-01 + - mujs 25821e6d74fab5fcc200fe5e818362e03e114428 -> 2018-05-01 + - openimageio 1.8.10 -> Release-1.9.2dev + - openvr 1.0.14 -> 1.0.15 + - protobuf 3.5.1-3 -> 3.5.1-4 + - re2 2018-03-17 -> 2018-05-01 + - rs-core-lib 2018-04-25 -> 2018-05-01 + - sol 2.20.0 -> 2.20.0-1 + - thrift 2018-04-25 -> 2018-05-01 + - unicorn-lib 2018-04-09 -> 2018-05-01 + - zeromq 2018-04-25 -> 2018-05-01 + * `vcpkg` no longer calls powershell for downloading/extracting and detecting Visual Studio. + - This also fixes an issue where `vcpkg.exe` would change the console's font when invoking `powershell`. + +-- vcpkg team WED, 16 May 2018 19:00:00 -0800 + + +vcpkg (0.0.111) +-------------- + * Add ports: + - cmark 0.28.3-1 + - inja 1.0.0 + - libgo 2.7 + - range-v3-vs2015 20151130-vcpkg5 + - restinio 0.4.5.1 + - treehopper 1.11.3-1 + - yajl 2.1.0-1 + - yato 1.0-1 + * Update ports: + - abseil 2018-04-12 -> 2018-04-25-1 + - alembic 1.7.7 -> 1.7.8 + - aws-sdk-cpp 1.4.33 -> 1.4.38 + - bigint 2010.04.30-1 -> 2010.04.30-2 + - box2d 2.3.1-374664b -> 2.3.1-374664b-1 + - brotli 1.0.2-1 -> 1.0.2-2 + - cgal 4.11.1 -> 4.12 + - corrade 2018.02-1 -> 2018.04-1 + - directxmesh feb2018-eb751e0b631b05aa25c36c08e7d6bbf09f5e94a9 -> apr2018 + - directxtex feb2018b -> apr2018 + - directxtk feb2018 -> apr2018 + - discord-rpc 3.2.0 -> 3.3.0 + - exiv2 2018-04-12 -> 2018-04-25 + - exprtk 2018.01.01-f32d2b4 -> 2018.04.30-46877b6 + - folly 2018.04.16.00 -> 2018.04.23.00 + - freeglut 3.0.0-3 -> 3.0.0-4 + - gainput 1.0.0 -> 1.0.0-1 + - geos 3.6.2-2 -> 3.6.2-3 + - http-parser 2.7.1-2 -> 2.7.1-3 + - imgui 1.53 -> 1.60 + - ismrmrd 1.3.2-1 -> 1.3.2-2 + - jsonnet 2018-04-17 -> 2018-04-25 + - leveldb 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73-1 -> 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73-2 + - libflac 1.3.2-4 -> 1.3.2-5 + - libqrencode 4.0.0-1 -> 4.0.0-2 + - libuv 1.20.0 -> 1.20.2 + - libxmlpp 2.40.1-1 -> 2.40.1-2 + - llvm 6.0.0 -> 6.0.0-1 + - magnum 2018.02-2 -> 2018.04-1 + - magnum-extras 2018.02-2 -> 2018.04-1 + - magnum-integration 2018.02-1 -> 2018.04-1 + - magnum-plugins 2018.02-2 -> 2018.04-1 + - ms-gsl 2018-03-17 -> 2018-04-25 + - nuklear 2018-04-17 -> 2018-04-25 + - openal-soft 1.18.2-1 -> 1.18.2-2 + - physfs 2.0.3-2 -> 3.0.1 + - poco 1.8.1-1 -> 1.9.0 + - python3 3.6.4 -> 3.6.4-1 + - quirc 1.0-1 -> 1.0-2 + - range-v3 20151130-vcpkg5 -> 0.3.5 + - rapidjson 1.1.0 -> 1.1.0-1 + - realsense2 2.10.1-1 -> 2.10.4 + - rhash 1.3.5-1 -> 1.3.6 + - rocksdb 5.12.2 -> 5.12.4 + - rs-core-lib 2018-04-12 -> 2018-04-25 + - sciter 4.1.5 -> 4.1.7 + - sfml 2.4.2-2 -> 2.4.2-3 + - sobjectizer 5.5.21 -> 5.5.22 + - sol 2.19.5 -> 2.20.0 + - sqlite3 3.23.0 -> 3.23.1-1 + - strtk 2018.01.01-5579ed1 -> 2018.05.07-48c9554 + - thrift 2018-04-17 -> 2018-04-25 + - unicorn 2018-03-20 -> 2018-04-25 + - uwebsockets 0.14.7-1 -> 0.14.8-1 + - vlpp 0.9.3.1 -> 0.9.3.1-1 + - zeromq 2018-04-17 -> 2018-04-25 + - zstd 1.3.3 -> 1.3.4 + * Add clean patching for vcpkg_from_github() + - `vcpkg_from_github()` now takes a PATCHES argument (see the azure-storage-cpp [portfile](ports\azure-storage-cpp\portfile.cmake) as an example) + - A unique directory name is derived from the source hash and the patch hashes + - Modifying the patches would previously cause the new patches to fail to apply if sources with a previous version of the patches were present in the buildtrees. This is no longer the case. + * Fix various cross-platform issues + +-- vcpkg team FRI, 11 May 2018 21:45:00 -0800 + + vcpkg (0.0.110) -------------- * `vcpkg` is now available for Linux and MacOS. More information [here](https://blogs.msdn.microsoft.com/vcblog/2018/04/24/announcing-a-single-c-library-manager-for-linux-macos-and-windows-vcpkg/). diff --git a/README.md b/README.md index c35c597d933..93262a1cab5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# Vcpkg ![](https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/8476/badge) +# Vcpkg ## Overview -Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This tool and ecosystem are currently in a preview state; your involvement is vital to its success! +Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This tool and ecosystem are constantly evolving; your involvement is vital to its success! For short description of available commands, run `vcpkg help`. @@ -10,34 +10,34 @@ Prerequisites: - Windows 10, 8.1, 7, Linux, or MacOS - Visual Studio 2017 or Visual Studio 2015 Update 3 (on Windows) - Git -- *Optional: CMake 3.10.2* +- *Optional:* CMake 3.12.4 To get started: ``` -> git clone https://github.com/Microsoft/vcpkg +> git clone https://github.com/Microsoft/vcpkg.git > cd vcpkg PS> .\bootstrap-vcpkg.bat -Ubuntu:~/$ ./bootstrap-vcpkg.sh +Linux:~/$ ./bootstrap-vcpkg.sh ``` -Then, to hook up user-wide integration, run (note: requires admin on first use) +Then, to hook up user-wide [integration](docs/users/integration.md), run (note: requires admin on first use) ``` PS> .\vcpkg integrate install -Ubuntu:~/$ ./vcpkg integrate install +Linux:~/$ ./vcpkg integrate install ``` Install any packages with ``` PS> .\vcpkg install sdl2 curl -Ubuntu:~/$ ./vcpkg install sdl2 curl +Linux:~/$ ./vcpkg install sdl2 curl ``` The best way to use installed libraries with CMake is via the toolchain file `scripts\buildsystems\vcpkg.cmake`. To use this file, you simply need to add it onto your CMake command line as `-DCMAKE_TOOLCHAIN_FILE=[vcpkg root]\scripts\buildsystems\vcpkg.cmake`. In Visual Studio, you can create a New Project (or open an existing one). All installed libraries are immediately ready to be `#include`'d and used in your project without additional configuration. -For more information, see our [using a package](docs/examples/using-sqlite.md) example for the specifics. +For more information, see our [using a package](docs/examples/installing-and-using-packages.md) example for the specifics. Additional notes on macOS and Linux support can be found in the [official announcement](https://blogs.msdn.microsoft.com/vcblog/2018/04/24/announcing-a-single-c-library-manager-for-linux-macos-and-windows-vcpkg/). @@ -50,7 +50,7 @@ and restart Powershell. ## Examples -See the [documentation](docs/index.md) for specific walkthroughs, including [using a package](docs/examples/using-sqlite.md) and [adding a new package](docs/examples/packaging-zlib.md). +See the [documentation](docs/index.md) for specific walkthroughs, including [installing and using a package](docs/examples/installing-and-using-packages.md), [adding a new package from a zipfile](docs/examples/packaging-zipfiles.md), and [adding a new package from a GitHub repo](docs/examples/packaging-github-repos.md). Our docs are now also available online at ReadTheDocs: ! diff --git a/bootstrap-vcpkg.bat b/bootstrap-vcpkg.bat index c74f275241e..1f9baa3d0b6 100644 --- a/bootstrap-vcpkg.bat +++ b/bootstrap-vcpkg.bat @@ -1,2 +1,2 @@ @echo off -powershell.exe -NoProfile -ExecutionPolicy Bypass "& {& '%~dp0scripts\bootstrap.ps1'}" +powershell.exe -NoProfile -ExecutionPolicy Bypass "& {& '%~dp0scripts\bootstrap.ps1' %*}" diff --git a/bootstrap-vcpkg.sh b/bootstrap-vcpkg.sh index b77b74890e1..a7643894caf 100755 --- a/bootstrap-vcpkg.sh +++ b/bootstrap-vcpkg.sh @@ -1,4 +1,4 @@ #!/bin/sh vcpkgRootDir=$(X= cd -- "$(dirname -- "$0")" && pwd -P) -. $vcpkgRootDir/scripts/bootstrap.sh +. "$vcpkgRootDir/scripts/bootstrap.sh" diff --git a/docs/about/faq.md b/docs/about/faq.md index b345b4fd055..b7c9d67c88a 100644 --- a/docs/about/faq.md +++ b/docs/about/faq.md @@ -10,12 +10,12 @@ Yes! See [the `export` command](../users/integration.md#export). The `vcpkg update` command lists all packages which are out-of-sync with your current portfiles. To update a package, follow the instructions in the command. ## How do I get more libraries? -The list of libraries is enumerated from the [`ports\`](https://github.com/Microsoft/vcpkg/blob/master/ports) directory. By design, you can add and remove libraries from this directory as you see fit for yourself or your company -- see [Example #2](../examples/packaging-zlib.md). +The list of libraries is enumerated from the [`ports\`](https://github.com/Microsoft/vcpkg/blob/master/ports) directory. By design, you can add and remove libraries from this directory as you see fit for yourself or your company -- see our examples on packaging [zipfiles](../examples/packaging-zipfiles.md) and [GitHub repos](../examples/packaging-github-repos.md). We recommend cloning directly from [GitHub](https://github.com/microsoft/vcpkg) and using `git pull` to update the list of portfiles. Once you've updated your portfiles, `vcpkg update` will indicate any installed libraries that are now out of date. ## Can I build a private library with this tool? -Yes. Follow [our Packaging zlib Example](../examples/packaging-zlib.md) for creating a portfile using a fake URL. Then, either pre-seed the `downloads\` folder with a zip containing your private sources or replace the normal calls to `vcpkg_download_distfile` and `vcpkg_extract_source_archive` with functions that unpack your source code. +Yes. Follow [our packaging zlib Example](../examples/packaging-zipfiles.md) for creating a portfile using a fake URL. Then, either pre-seed the `downloads\` folder with a zip containing your private sources or replace the normal calls to `vcpkg_download_distfile` and `vcpkg_extract_source_archive` with functions that unpack your source code. ## Can I use a prebuilt private library with this tool? Yes. The `portfile.cmake` for a library is fundamentally a script that places the headers and binaries into the correct arrangement in the `${CURRENT_PACKAGES_DIR}`, so to pull in prebuilt binaries you can write a portfile which directly downloads and arranges the files. @@ -26,7 +26,7 @@ To see an example of this, look at [`ports\opengl\portfile.cmake`](https://githu We currently target Windows Desktop (x86 and x64) as well as the Universal Windows Platform (x86, x64, and ARM). See `vcpkg help triplet` for the current list. ## Does Vcpkg run on Linux/OSX? -No, for this preview we are focusing on Windows as a host platform. If you'd be interested in having Vcpkg run on Linux or OSX, please let us know in [this issue](https://github.com/microsoft/vcpkg/issues/57)! +Yes! We continously test on OSX and Ubuntu 16.04, however we know users have been successful with Arch, Fedora, and FreeBSD. If you have trouble with your favorite Linux distribution, let us know in an issue and we'd be happy to help! ## How do I use different versions of a library on one machine? Within a single instance of Vcpkg (e.g. one set of `installed\`, `packages\`, `ports\` and so forth), you can only have one version of a library installed (otherwise, the headers would conflict with each other!). For those with experience with system-wide package managers, packages in Vcpkg correspond to the `X-dev` or `X-devel` packages. @@ -35,14 +35,14 @@ To use different versions of a library for different projects, we recommend maki If your application is very sensitive to the versions of libraries, we recommend checking in the specific set of portfiles you need into your source control along with your project sources and using the `--vcpkg-root` option to redirect the working directory of `vcpkg.exe`. -## How does Vcpkg protect my Privacy? +## How does Vcpkg protect my privacy? See the [Privacy document](privacy.md) for all information regarding privacy. ## Can I use my own CMake toolchain file with Vcpkg's toolchain file? Yes. If you already have a CMake toolchain file, you will need to include our toolchain file at the end of yours. This should be as simple as an `include(\scripts\buildsystems\vcpkg.cmake)` directive. Alternatively, you could copy the contents of our `scripts\buildsystems\vcpkg.cmake` into the end of your existing toolchain file. ## Can I use my own/specific flags for rebuilding libs? -Yes. In the current preview, there is not yet a standardized global way to change them, however you can edit individual portfiles and tweak the exact build process however you'd like. +Yes. In the current version, there is not yet a standardized global way to change them, however you can edit individual portfiles and tweak the exact build process however you'd like. 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. @@ -93,7 +93,7 @@ Enabling user-wide integration (`vcpkg integrate install`) changes the default f ## Why not NuGet? NuGet is a package manager for .NET libraries with a strong dependency on MSBuild. It does not meet the specific needs of Native C++ customers in at least three ways. -- **Compilation Flavors**. With so many possible combinations of compilation options, the task of providing a truly complete set of options is intrinsicly impossible. Furthermore, the download size for reasonably complete binary packages becomes enormous. This makes it a requirement to split the results into multiple packages, but then searching becomes very difficult. +- **Compilation Flavors**. With so many possible combinations of compilation options, the task of providing a truly complete set of options is intrinsically impossible. Furthermore, the download size for reasonably complete binary packages becomes enormous. This makes it a requirement to split the results into multiple packages, but then searching becomes very difficult. - **Binary vs Source**. Very closely tied to the first point, NuGet is designed from the ground up to provide relatively small, prebuilt binaries. Due to the nature of native code, developers need to have access to the source code to ensure ABI compatibility, performance, integrity, and debuggability. @@ -108,7 +108,7 @@ Conan.io is a publicly-federated, project-centric, cross-platform, C++ package m - **Cross-platform vs single-platform**. While being hosted on many platforms is an excellent north star, we believe the level of system integration and stability provided by apt-get, yum, and homebrew is well worth needing to exchange `apt-get install libboost-all-dev` with `brew install boost` in automated scripts. We chose to make our system as easy as possible to integrate into a world with these very successful system managers -- one more line for `vcpkg install boost` -- instead of attempting to replace them where they are already so successful and well-loved. -- **C++/CMake vs python**. While Python is an excellent language loved by many, we believe that transparency and familiarity are the most important factors when choosing a tool as important to your workflow as a package manager. Consequently, we chose to make the implementation languages be as universally accepted as possible: C++ should be used in a C++ package manager for C++ programmers. You should not be required to learn another language just to understand your package manager. +- **C++/CMake vs python**. While Python is an excellent language loved by many, we believe that transparency and familiarity are the most important factors when choosing a tool as important to your workflow as a package manager. Consequently, we chose to make the implementation languages be as universally accepted as possible: C++ should be used in a C++ package manager for C++ programmers. You should not be required to learn another programming language just to understand your package manager. ## Why not Chocolatey? Chocolatey is an excellent system for managing applications. However, it is not currently designed to acquire redistributable developer assets and help you with debugging. Vcpkg, in comparison, is designed to get you the libraries you need to build your application and help you deliver through any platform you'd like (including Chocolatey!). diff --git a/docs/about/privacy.md b/docs/about/privacy.md index 9ff0e7a4756..91d7093721c 100644 --- a/docs/about/privacy.md +++ b/docs/about/privacy.md @@ -7,7 +7,14 @@ We do collect telemetry data from usage of "vcpkg.exe". We explicitly ONLY colle ## What telemetry is collected? -We collect the command line used, the time of invocation, and how long the command took. Some commands also add additional calculated information (such as the full set of libraries to install). We generate a completely random UUID on first use and attach it to each event. For this preview, we do not offer a mechanism to disable this data collection since it is critical for improving the product. In the full release, you will be able to opt-out with a simple configuration. For more information about how Microsoft protects your privacy, see https://privacy.microsoft.com/en-us/privacy. +We collect the command line used, the time of invocation, and how long execution took. Some commands also add additional calculated information (such as the full set of libraries to install). We generate a completely random UUID on first use and attach it to each event. +In order to opt-out of data collection, you can re-run the boostrap script with the following flag, for Windows and Linux/OSX, respectively: + +```PS> .\bootstrap-vcpkg.bat -disableMetrics``` + +```~/$ ./bootstrap-vcpkg.sh -disableMetrics``` + +For more information about how Microsoft protects your privacy, see https://privacy.microsoft.com/en-us/privacy. Here is an example of an event for the command line `vcpkg install zlib`: ```json diff --git a/docs/examples/using-sqlite.md b/docs/examples/installing-and-using-packages.md similarity index 96% rename from docs/examples/using-sqlite.md rename to docs/examples/installing-and-using-packages.md index d12695bfb29..50200c8778a 100644 --- a/docs/examples/using-sqlite.md +++ b/docs/examples/installing-and-using-packages.md @@ -1,4 +1,4 @@ -# Example: Using Sqlite +## Installing and Using Packages Example: SQLite - [Step 1: Install](#install) - [Step 2: Use](#use) @@ -10,7 +10,7 @@ ## Step 1: Install -First, we need to know what name [Sqlite](https://sqlite.org) goes by in the ports tree. To do that, we'll run the `search` command and inspect the output: +First, we need to know what name [SQLite](https://sqlite.org) goes by in the ports tree. To do that, we'll run the `search` command and inspect the output: ```no-highlight PS D:\src\vcpkg> .\vcpkg search sqlite libodb-sqlite 2.4.0 Sqlite support for the ODB ORM library @@ -71,7 +71,7 @@ See `.\vcpkg help triplet` for all supported targets. #### VS/MSBuild Project (User-wide integration) -The recommended and most productive way to use vcpkg is via user-wide integration, making the system available for all projects you build. The user-wide integration will prompt for administrator access the first time it is used on a given machine, but afterwords is no longer required and the integration is configured on a per-user basis. +The recommended and most productive way to use vcpkg is via user-wide integration, making the system available for all projects you build. The user-wide integration will prompt for administrator access the first time it is used on a given machine, but afterwards is no longer required and the integration is configured on a per-user basis. ```no-highlight PS D:\src\vcpkg> .\vcpkg integrate install Applied user-wide integration for this vcpkg root. @@ -82,7 +82,7 @@ Installing new libraries will make them instantly available. ``` *Note: You will need to restart Visual Studio or perform a Build to update intellisense with the changes.* -You can now simply use File -> New Project in Visual Studio 2015 or Visual Studio 2017 and the library will be automatically available. For Sqlite, you can try out their [C/C++ sample](https://sqlite.org/quickstart.html). +You can now simply use File -> New Project in Visual Studio 2015 or Visual Studio 2017 and the library will be automatically available. For SQLite, you can try out their [C/C++ sample](https://sqlite.org/quickstart.html). To remove the integration for your user, you can use `.\vcpkg integrate remove`. diff --git a/docs/examples/packaging-github-repos.md b/docs/examples/packaging-github-repos.md new file mode 100644 index 00000000000..af2e6141ac6 --- /dev/null +++ b/docs/examples/packaging-github-repos.md @@ -0,0 +1,59 @@ +## Packaging Github Repos Example: libogg +### Create the CONTROL file +The `CONTROL` file is a simple set of fields describing the package's metadata. + +*For libogg, we'll create the file `ports\libogg\CONTROL` with the following contents:* +```no-highlight +Source: libogg +Version: 1.3.3 +Description: Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs. +``` + +### Create the portfile +`portfile.cmake` describes how to build and install the package. First we include `vcpkg_common_functions` to give us utilities for carrying this out: + +```no-highlight +include(vcpkg_common_functions) +``` + +Now we download the project from Github with [`vcpkg_from_github`](../maintainers/vcpkg_from_github.md): + +```no-highlight +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/ogg + REF v1.3.3 + SHA512 0bd6095d647530d4cb1f509eb5e99965a25cc3dd9b8125b93abd6b248255c890cf20710154bdec40568478eb5c4cde724abfb2eff1f3a04e63acef0fbbc9799b + HEAD_REF master +) +``` + +The important parts to update are `REPO` for the GitHub repository path, `REF` for a stable tag/commit to use, and `SHA512` with the checksum of the downloaded zipfile (you can get this easily by setting it to `1`, trying to install the package, and copying the checksum). + +Finally, we configure the project with CMake, install the package, and copy over the license file: + +```no-highlight +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libogg RENAME copyright) +``` + +Check the documentation for [`vcpkg_configure_cmake`](../maintainers/vcpkg_configure_cmake.md) and [`vcpkg_install_cmake`](../maintainers/vcpkg_install_cmake.md) if your package needs additional options. + +Now you can run `vcpkg install libogg` to build and install the package. + +### Suggested example portfiles +In the `ports\` directory are many libraries that can be used as examples, including many that are not based on CMake. + +- Header only libraries + - rapidjson + - range-v3 +- MSBuild-based + - cppunit + - mpg123 +- Non-CMake, custom buildsystem + - openssl + - ffmpeg diff --git a/docs/examples/packaging-zlib.md b/docs/examples/packaging-zipfiles.md similarity index 93% rename from docs/examples/packaging-zlib.md rename to docs/examples/packaging-zipfiles.md index ce176d45129..ed63637fd71 100644 --- a/docs/examples/packaging-zlib.md +++ b/docs/examples/packaging-zipfiles.md @@ -1,9 +1,9 @@ -## Example 2: Packaging zlib +## Packaging Zipfiles Example: zlib ### Bootstrap with `create` First, locate a globally accessible archive of the library's sources. Zip, gzip, and bzip are all supported. Strongly prefer official sources or mirrors over unofficial mirrors. -*Looking at zlib's website, the URL http://zlib.net/zlib128.zip looks appropriate.* +*Looking at zlib's website, the URL http://zlib.net/zlib1211.zip looks appropriate.* Second, determine a suitable package name. This should be ASCII, lowercase, and recognizable to someone who knows the library's "human name". If the library is already packaged in another package manager, prefer that name. @@ -11,7 +11,7 @@ Second, determine a suitable package name. This should be ASCII, lowercase, and Finally, if the server's name for the archive is not very descriptive (such as downloading a zipped commit or branch from GitHub), choose a nice archive name of the form `-.zip`. -*`zlib128.zip` is a fine name, so no change needed.* +*`zlib1211.zip` is a fine name, so no change needed.* All this information can then be passed into the `create` command, which will download the sources and bootstrap the packaging process inside `ports\`. @@ -21,12 +21,12 @@ PS D:\src\vcpkg> .\vcpkg create zlib2 http://zlib.net/zlib-1.2.11.tar.gz zlib-1. ``` ### Create the CONTROL file -In addition to the generated `ports\\portfile.cmake`, we also need a `ports\\CONTROL` file. This file is a simply formatted set of fields describing the package's metadata. +In addition to the generated `ports\\portfile.cmake`, we also need a `ports\\CONTROL` file. This file is a simple set of fields describing the package's metadata. *For zlib2, we'll create the file `ports\zlib2\CONTROL` with the following contents:* ```no-highlight Source: zlib2 -Version: 1.2.8 +Version: 1.2.11 Description: A Massively Spiffy Yet Delicately Unobtrusive Compression Library ``` diff --git a/docs/examples/patching-libpng.md b/docs/examples/patching.md similarity index 99% rename from docs/examples/patching-libpng.md rename to docs/examples/patching.md index 2337b73dac9..98115400eec 100644 --- a/docs/examples/patching-libpng.md +++ b/docs/examples/patching.md @@ -1,4 +1,4 @@ -## Example 3: Patching libpng to work for x86-uwp +## Patching Example: Patching libpng to work for x86-uwp ### Initial error logs First, try building: diff --git a/docs/index.md b/docs/index.md index 1d12b282ece..69dbdcd1e90 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,14 +1,15 @@ ### Quick Start -Vcpkg helps you get C and C++ libraries on Windows. This tool and ecosystem are currently in a preview state; your involvement is vital to its success. +Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This tool and ecosystem are constantly evolving; your involvement are vital to its success! -- [How to use Sqlite in your application](examples/using-sqlite.md) +- [Installing and Using Packages Example: sqlite](examples/installing-and-using-packages.md) ### Examples -- [Example 1: Using Sqlite](examples/using-sqlite.md) -- [Example 2: Packaging zlib](examples/packaging-zlib.md) -- [Example 3: Patching libpng for x86-uwp](examples/patching-libpng.md) +- [Installing and Using Packages Example: sqlite](examples/installing-and-using-packages.md) +- [Packaging Zipfiles Example: zlib](examples/packaging-zipfiles.md) +- [Packaging GitHub Repositories Example: libogg](examples/packaging-github-repos.md) +- [Patching Example: Patching libpng to work for x86-uwp](examples/patching.md) ### User Help @@ -26,6 +27,7 @@ Vcpkg helps you get C and C++ libraries on Windows. This tool and ecosystem are ### Blog posts - [Announcing a single C++ library manager for Linux, macOS and Windows: Vcpkg](https://blogs.msdn.microsoft.com/vcblog/2018/04/24/announcing-a-single-c-library-manager-for-linux-macos-and-windows-vcpkg/) +- [Vcpkg: Using multiple enlistments to handle multiple versions of a library](https://blogs.msdn.microsoft.com/vcblog/2017/10/23/vcpkg-using-multiple-enlistments/) - [Vcpkg: introducing the export command](https://blogs.msdn.microsoft.com/vcblog/2017/05/03/vcpkg-introducing-export-command/) - [Binary Compatibility and Pain-free Upgrade Why Moving to Visual Studio 2017 is almost "too easy"](https://blogs.msdn.microsoft.com/vcblog/2017/03/07/binary-compatibility-and-pain-free-upgrade-why-moving-to-visual-studio-2017-is-almost-too-easy/) - [Vcpkg recent enhancements](https://blogs.msdn.microsoft.com/vcblog/2017/02/14/vcpkg-recent-enhancements/) diff --git a/docs/maintainers/portfile-functions.md b/docs/maintainers/portfile-functions.md index e16147f7df9..f159f7f64f3 100644 --- a/docs/maintainers/portfile-functions.md +++ b/docs/maintainers/portfile-functions.md @@ -2,16 +2,24 @@ # Portfile helper functions - [vcpkg\_acquire\_msys](vcpkg_acquire_msys.md) +- [vcpkg\_add\_to\_path](vcpkg_add_to_path.md) - [vcpkg\_apply\_patches](vcpkg_apply_patches.md) - [vcpkg\_build\_cmake](vcpkg_build_cmake.md) - [vcpkg\_build\_msbuild](vcpkg_build_msbuild.md) +- [vcpkg\_check\_linkage](vcpkg_check_linkage.md) +- [vcpkg\_clean\_msbuild](vcpkg_clean_msbuild.md) - [vcpkg\_configure\_cmake](vcpkg_configure_cmake.md) - [vcpkg\_copy\_pdbs](vcpkg_copy_pdbs.md) - [vcpkg\_copy\_tool\_dependencies](vcpkg_copy_tool_dependencies.md) - [vcpkg\_download\_distfile](vcpkg_download_distfile.md) - [vcpkg\_execute\_required\_process](vcpkg_execute_required_process.md) - [vcpkg\_extract\_source\_archive](vcpkg_extract_source_archive.md) +- [vcpkg\_extract\_source\_archive\_ex](vcpkg_extract_source_archive_ex.md) - [vcpkg\_find\_acquire\_program](vcpkg_find_acquire_program.md) - [vcpkg\_from\_bitbucket](vcpkg_from_bitbucket.md) +- [vcpkg\_from\_git](vcpkg_from_git.md) - [vcpkg\_from\_github](vcpkg_from_github.md) +- [vcpkg\_from\_gitlab](vcpkg_from_gitlab.md) - [vcpkg\_install\_cmake](vcpkg_install_cmake.md) +- [vcpkg\_install\_msbuild](vcpkg_install_msbuild.md) +- [vcpkg\_test\_cmake](vcpkg_test_cmake.md) diff --git a/docs/maintainers/vcpkg_add_to_path.md b/docs/maintainers/vcpkg_add_to_path.md new file mode 100644 index 00000000000..3657a5ea7be --- /dev/null +++ b/docs/maintainers/vcpkg_add_to_path.md @@ -0,0 +1,20 @@ +# vcpkg_add_to_path + +Add a directory to the PATH environment variable + +## Usage +```cmake +vcpkg_add_to_path([PREPEND] <${PYTHON3_DIR}>) +``` + +## Parameters +### +The directory to add + +### PREPEND +Prepends the directory. + +The default is to append. + +## Source +[scripts/cmake/vcpkg_add_to_path.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_add_to_path.cmake) diff --git a/docs/maintainers/vcpkg_build_cmake.md b/docs/maintainers/vcpkg_build_cmake.md index ddfa46f6b14..1e17eb97553 100644 --- a/docs/maintainers/vcpkg_build_cmake.md +++ b/docs/maintainers/vcpkg_build_cmake.md @@ -15,6 +15,9 @@ The underlying buildsystem will be instructed to not parallelize The target passed to the cmake build command (`cmake --build . --target `). If not specified, no target will be passed. +### ADD_BIN_TO_PATH +Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs. + ## Notes: This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md). You can use the alias [`vcpkg_install_cmake()`](vcpkg_configure_cmake.md) function if your CMake script supports the diff --git a/docs/maintainers/vcpkg_build_msbuild.md b/docs/maintainers/vcpkg_build_msbuild.md index 37f8d8df273..862587eb4f1 100644 --- a/docs/maintainers/vcpkg_build_msbuild.md +++ b/docs/maintainers/vcpkg_build_msbuild.md @@ -1,6 +1,6 @@ # vcpkg_build_msbuild -Build an msbuild-based project. +Build an msbuild-based project. Deprecated in favor of `vcpkg_install_msbuild()`. ## Usage ```cmake @@ -15,6 +15,7 @@ vcpkg_build_msbuild( [OPTIONS ...] [OPTIONS_RELEASE ...] [OPTIONS_DEBUG ...] + [USE_VCPKG_INTEGRATION] ) ``` diff --git a/docs/maintainers/vcpkg_check_linkage.md b/docs/maintainers/vcpkg_check_linkage.md new file mode 100644 index 00000000000..406325dba08 --- /dev/null +++ b/docs/maintainers/vcpkg_check_linkage.md @@ -0,0 +1,34 @@ +# vcpkg_check_linkage + +Asserts the available library and CRT linkage options for the port. + +## Usage +```cmake +vcpkg_check_linkage( + [ONLY_STATIC_LIBRARY | ONLY_DYNAMIC_LIBRARY] + [ONLY_STATIC_CRT | ONLY_DYNAMIC_CRT] +) +``` + +## Parameters +### ONLY_STATIC_LIBRARY +Indicates that this port can only be built with static library linkage. + +### ONLY_DYNAMIC_LIBRARY +Indicates that this port can only be built with dynamic/shared library linkage. + +### ONLY_STATIC_CRT +Indicates that this port can only be built with static CRT linkage. + +### ONLY_DYNAMIC_CRT +Indicates that this port can only be built with dynamic/shared CRT linkage. + +## Notes +This command will either alter the settings for `VCPKG_LIBRARY_LINKAGE` or fail, depending on what was requested by the user versus what the library supports. + +## Examples + +* [libimobiledevice](https://github.com/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_check_linkage.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_check_linkage.cmake) diff --git a/docs/maintainers/vcpkg_clean_msbuild.md b/docs/maintainers/vcpkg_clean_msbuild.md new file mode 100644 index 00000000000..39d07077b14 --- /dev/null +++ b/docs/maintainers/vcpkg_clean_msbuild.md @@ -0,0 +1,15 @@ +# vcpkg_clean_msbuild + +Clean intermediate files generated by `vcpkg_install_msbuild()`. + +## Usage +```cmake +vcpkg_clean_msbuild() +``` + +## Examples + +* [xalan-c](https://github.com/Microsoft/vcpkg/blob/master/ports/xalan-c/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_clean_msbuild.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_clean_msbuild.cmake) diff --git a/docs/maintainers/vcpkg_copy_pdbs.md b/docs/maintainers/vcpkg_copy_pdbs.md index 6bfa488dbf7..1583f777ff2 100644 --- a/docs/maintainers/vcpkg_copy_pdbs.md +++ b/docs/maintainers/vcpkg_copy_pdbs.md @@ -4,12 +4,18 @@ Automatically locate pdbs in the build tree and copy them adjacent to all DLLs. ## Usage ```cmake -vcpkg_copy_pdbs() +vcpkg_copy_pdbs([BUILD_PATHS <${CURRENT_PACKAGES_DIR}/bin/*.dll> ...]) ``` ## Notes This command should always be called by portfiles after they have finished rearranging the binary output. +## Parameters +### BUILD_PATHS +Path patterns passed to `file(GLOB_RECURSE)` for locating dlls. + +Defaults to `${CURRENT_PACKAGES_DIR}/bin/*.dll` and `${CURRENT_PACKAGES_DIR}/debug/bin/*.dll`. + ## Examples * [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) diff --git a/docs/maintainers/vcpkg_extract_source_archive.md b/docs/maintainers/vcpkg_extract_source_archive.md index 104032ffc9e..4971df96041 100644 --- a/docs/maintainers/vcpkg_extract_source_archive.md +++ b/docs/maintainers/vcpkg_extract_source_archive.md @@ -1,6 +1,6 @@ # vcpkg_extract_source_archive -Extract an archive into the source directory. +Extract an archive into the source directory. Deprecated in favor of [`vcpkg_extract_source_archive_ex`](vcpkg_extract_source_archive_ex.md). ## Usage ```cmake diff --git a/docs/maintainers/vcpkg_extract_source_archive_ex.md b/docs/maintainers/vcpkg_extract_source_archive_ex.md new file mode 100644 index 00000000000..92c90b2960e --- /dev/null +++ b/docs/maintainers/vcpkg_extract_source_archive_ex.md @@ -0,0 +1,52 @@ +# vcpkg_extract_source_archive_ex + +Extract an archive into the source directory. Replaces [`vcpkg_extract_source_archive`](vcpkg_extract_source_archive.md). + +## Usage +```cmake +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH + ARCHIVE <${ARCHIVE}> + [REF <1.0.0>] + [NO_REMOVE_ONE_LEVEL] + [WORKING_DIRECTORY <${CURRENT_BUILDTREES_DIR}/src>] + [PATCHES ...] +) +``` +## Parameters +### OUT_SOURCE_PATH +Specifies the out-variable that will contain the extracted location. + +This should be set to `SOURCE_PATH` by convention. + +### ARCHIVE +The full path to the archive to be extracted. + +This is usually obtained from calling [`vcpkg_download_distfile`](vcpkg_download_distfile.md). + +### REF +A friendly name that will be used instead of the filename of the archive. + +By convention, this is set to the version number or tag fetched + +### WORKING_DIRECTORY +If specified, the archive will be extracted into the working directory instead of `${CURRENT_BUILDTREES_DIR}/src/`. + +Note that the archive will still be extracted into a subfolder underneath that directory (`${WORKING_DIRECTORY}/${REF}-${HASH}/`). + +### PATCHES +A list of patches to be applied to the extracted sources. + +Relative paths are based on the port directory. + +### NO_REMOVE_ONE_LEVEL +Specifies that the default removal of the top level folder should not occur. + +## Examples + +* [bzip2](https://github.com/Microsoft/vcpkg/blob/master/ports/bzip2/portfile.cmake) +* [sqlite3](https://github.com/Microsoft/vcpkg/blob/master/ports/sqlite3/portfile.cmake) +* [cairo](https://github.com/Microsoft/vcpkg/blob/master/ports/cairo/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_extract_source_archive_ex.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_extract_source_archive_ex.cmake) diff --git a/docs/maintainers/vcpkg_find_acquire_program.md b/docs/maintainers/vcpkg_find_acquire_program.md index 8107c8dd2d5..57a2bf75a37 100644 --- a/docs/maintainers/vcpkg_find_acquire_program.md +++ b/docs/maintainers/vcpkg_find_acquire_program.md @@ -25,6 +25,7 @@ The current list of programs includes: - NASM - NINJA - YASM +- ARIA2 (Downloader) Note that msys2 has a dedicated helper function: [`vcpkg_acquire_msys`](vcpkg_acquire_msys.md). diff --git a/docs/maintainers/vcpkg_from_bitbucket.md b/docs/maintainers/vcpkg_from_bitbucket.md index c8850b72508..7e699f8eadf 100644 --- a/docs/maintainers/vcpkg_from_bitbucket.md +++ b/docs/maintainers/vcpkg_from_bitbucket.md @@ -11,6 +11,7 @@ vcpkg_from_bitbucket( [REF ] [SHA512 <45d0d7f8cc350...>] [HEAD_REF ] + [PATCHES ...] ) ``` @@ -40,6 +41,11 @@ 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. +### PATCHES +A list of patches to be applied to the extracted sources. + +Relative paths are based on the port directory. + ## Notes: At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. diff --git a/docs/maintainers/vcpkg_from_git.md b/docs/maintainers/vcpkg_from_git.md new file mode 100644 index 00000000000..6b24a558dd0 --- /dev/null +++ b/docs/maintainers/vcpkg_from_git.md @@ -0,0 +1,48 @@ +# vcpkg_from_git + +Download and extract a project from git + +## Usage: +```cmake +vcpkg_from_git( + OUT_SOURCE_PATH + URL + REF <59f7335e4d...> + SHA512 + [PATCHES ...] +) +``` + +## Parameters: +### OUT_SOURCE_PATH +Specifies the out-variable that will contain the extracted location. + +This should be set to `SOURCE_PATH` by convention. + +### URL +The url of the git repository. + +### SHA512 +The SHA512 hash that should match the archive form of the commit. + +This is most easily determined by first setting it to `0`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. + +### REF +A stable git commit-ish (ideally a tag or commit) 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. + +### PATCHES +A list of patches to be applied to the extracted sources. + +Relative paths are based on the port directory. + +## Notes: +`OUT_SOURCE_PATH`, `REF`, `SHA512`, and `URL` must be specified. + +## Examples: + +* [fdlibm](https://github.com/Microsoft/vcpkg/blob/master/ports/fdlibm/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_from_git.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_git.cmake) diff --git a/docs/maintainers/vcpkg_from_github.md b/docs/maintainers/vcpkg_from_github.md index cf50dc44584..8f9731629d9 100644 --- a/docs/maintainers/vcpkg_from_github.md +++ b/docs/maintainers/vcpkg_from_github.md @@ -10,6 +10,7 @@ vcpkg_from_github( [REF ] [SHA512 <45d0d7f8cc350...>] [HEAD_REF ] + [PATCHES ...] ) ``` @@ -23,7 +24,7 @@ This should be set to `SOURCE_PATH` by convention. The organization or user and repository on GitHub. ### REF -A stable git commit-ish (ideally a tag) that will not change contents. **This should not be a branch.** +A stable git commit-ish (ideally a tag or commit) 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. @@ -39,6 +40,11 @@ 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. +### PATCHES +A list of patches to be applied to the extracted sources. + +Relative paths are based on the port directory. + ## Notes: At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. diff --git a/docs/maintainers/vcpkg_from_gitlab.md b/docs/maintainers/vcpkg_from_gitlab.md new file mode 100644 index 00000000000..bc312f37a44 --- /dev/null +++ b/docs/maintainers/vcpkg_from_gitlab.md @@ -0,0 +1,61 @@ +# vcpkg_from_gitlab + +Download and extract a project from Gitlab instances. Enables support for `install --head`. + +## Usage: +```cmake +vcpkg_from_gitlab( + GITLAB_URL + OUT_SOURCE_PATH + REPO + [REF ] + [SHA512 <45d0d7f8cc350...>] + [HEAD_REF ] + [PATCHES ...] +) +``` + +## Parameters: + +### GITLAB_URL +The URL of the Gitlab instance to use. + +### 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 plus the repository name on the Gitlab instance. + +### 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 (${GITLAB_URL}/${REPO}/-/archive/${REF}/${REPO_NAME}-${REF}.tar.gz). +The REPO_NAME variable is parsed from the value of REPO. + +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. + +### PATCHES +A list of patches to be applied to the extracted sources. + +Relative paths are based on the port directory. + +## 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. + + +## Source +[scripts/cmake/vcpkg_from_gitlab.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_gitlab.cmake) diff --git a/docs/maintainers/vcpkg_install_msbuild.md b/docs/maintainers/vcpkg_install_msbuild.md new file mode 100644 index 00000000000..1de68ce700c --- /dev/null +++ b/docs/maintainers/vcpkg_install_msbuild.md @@ -0,0 +1,93 @@ +# vcpkg_install_msbuild + +Build and install an msbuild-based project. This replaces `vcpkg_build_msbuild()`. + +## Usage +```cmake +vcpkg_install_msbuild( + SOURCE_PATH <${SOURCE_PATH}> + PROJECT_SUBPATH + [INCLUDES_SUBPATH ] + [LICENSE_SUBPATH ] + [RELEASE_CONFIGURATION ] + [DEBUG_CONFIGURATION ] + [TARGET ] + [TARGET_PLATFORM_VERSION <10.0.15063.0>] + [PLATFORM <${TRIPLET_SYSTEM_ARCH}>] + [PLATFORM_TOOLSET <${VCPKG_PLATFORM_TOOLSET}>] + [OPTIONS ...] + [OPTIONS_RELEASE ...] + [OPTIONS_DEBUG ...] + [USE_VCPKG_INTEGRATION] + [ALLOW_ROOT_INCLUDES | REMOVE_ROOT_INCLUDES] +) +``` + +## Parameters +### SOURCE_PATH +The path to the root of the source tree. + +Because MSBuild uses in-source builds, the source tree will be copied into a temporary location for the build. This +parameter is the base for that copy and forms the base for all XYZ_SUBPATH options. + +### USE_VCPKG_INTEGRATION +Apply the normal `integrate install` integration for building the project. + +By default, projects built with this command will not automatically link libraries or have header paths set. + +### PROJECT_SUBPATH +The subpath to the solution (`.sln`) or project (`.vcxproj`) file relative to `SOURCE_PATH`. + +### LICENSE_SUBPATH +The subpath to the license file relative to `SOURCE_PATH`. + +### INCLUDES_SUBPATH +The subpath to the includes directory relative to `SOURCE_PATH`. + +This parameter should be a directory and should not end in a trailing slash. + +### ALLOW_ROOT_INCLUDES +Indicates that top-level include files (e.g. `include/zlib.h`) should be allowed. + +### REMOVE_ROOT_INCLUDES +Indicates that top-level include files (e.g. `include/Makefile.am`) should be removed. + +### SKIP_CLEAN +Indicates that the intermediate files should not be removed. + +Ports using this option should later call [`vcpkg_clean_msbuild()`](vcpkg_clean_msbuild.md) to manually clean up. + +### RELEASE_CONFIGURATION +The configuration (``/p:Configuration`` msbuild parameter) used for Release builds. + +### DEBUG_CONFIGURATION +The configuration (``/p:Configuration`` msbuild parameter) used for Debug builds. + +### TARGET_PLATFORM_VERSION +The WindowsTargetPlatformVersion (``/p:WindowsTargetPlatformVersion`` msbuild parameter) + +### TARGET +The MSBuild target to build. (``/t:``) + +### PLATFORM +The platform (``/p:Platform`` msbuild parameter) used for the build. + +### PLATFORM_TOOLSET +The platform toolset (``/p:PlatformToolset`` msbuild parameter) used for the build. + +### OPTIONS +Additional options passed to msbuild for all builds. + +### OPTIONS_RELEASE +Additional options passed to msbuild for Release builds. These are in addition to `OPTIONS`. + +### OPTIONS_DEBUG +Additional options passed to msbuild for Debug builds. These are in addition to `OPTIONS`. + +## Examples + +* [xalan-c](https://github.com/Microsoft/vcpkg/blob/master/ports/xalan-c/portfile.cmake) +* [libimobiledevice](https://github.com/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_install_msbuild.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_msbuild.cmake) diff --git a/docs/maintainers/vcpkg_test_cmake.md b/docs/maintainers/vcpkg_test_cmake.md new file mode 100644 index 00000000000..15b3ad797b2 --- /dev/null +++ b/docs/maintainers/vcpkg_test_cmake.md @@ -0,0 +1,20 @@ +# vcpkg_test_cmake + +Tests a built package for CMake `find_package()` integration. + +## Usage: +```cmake +vcpkg_test_cmake(PACKAGE_NAME [MODULE]) +``` + +## Parameters: + +### PACKAGE_NAME +The expected name to find with `find_package()`. + +### MODULE +Indicates that the library expects to be found via built-in CMake targets. + + +## Source +[scripts/cmake/vcpkg_test_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_test_cmake.cmake) diff --git a/docs/users/integration.md b/docs/users/integration.md index f1b5014bf19..fbaea41d915 100644 --- a/docs/users/integration.md +++ b/docs/users/integration.md @@ -35,15 +35,37 @@ cmake ../my/project -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.c ``` Projects configured with the Vcpkg toolchain file will have the appropriate Vcpkg folders added to the cmake search paths. This makes all libraries available to be found through `find_package()`, `find_path()`, and `find_library()`. -See [Example: Using Sqlite](../examples/using-sqlite.md) for a fully worked example using our CMake toolchain. +See [Installing and Using Packages Example: sqlite](../examples/installing-and-using-packages.md) for a fully worked example using our CMake toolchain. Note that we do not automatically add ourselves to your compiler include paths. To use a header-only library, simply use `find_path()`, which will correctly work on all platforms: ```cmake # To find and use catch -find_path(CATCH_INCLUDE_DIR catch.hpp) +find_path(CATCH_INCLUDE_DIR NAMES catch.hpp PATH_SUFFIXES catch2) include_directories(${CATCH_INCLUDE_DIR}) ``` +##### Using an environment variable instead of a command line option + +The `CMAKE_TOOLCHAIN_FILE` setting simply must be set before the `project()` directive is first called. This means that you can easily read from an environment variable to avoid passing it on the configure line: + +```cmake +if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE) + set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" + CACHE STRING "") +endif() + +project(myproject CXX) +``` + +##### Using multiple toolchain files + +To use an external toolchain file with a project using vcpkg, you can set the cmake variable `VCPKG_CHAINLOAD_TOOLCHAIN_FILE` on the configure line: +```no-highlight +cmake ../my/project \ + -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake \ + -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=../my/project/compiler-settings-toolchain.cmake +``` + #### Linking NuGet file We also provide individual VS project integration through a NuGet package. This will modify the project file, so we do not recommend this approach for open source projects. diff --git a/docs/users/triplets.md b/docs/users/triplets.md index eb83aeb1070..9ff372aedbd 100644 --- a/docs/users/triplets.md +++ b/docs/users/triplets.md @@ -12,10 +12,10 @@ To change the triplet used by your project, such as to enable static linking, se ### VCPKG_TARGET_ARCHITECTURE Specifies the target machine architecture. -Valid options are `x86`, `x64`, and `arm`. +Valid options are `x86`, `x64`, `arm`, and `arm64`. ### VCPKG_CRT_LINKAGE -Specifies the desired MSVCRT linkage. +Specifies the desired CRT linkage (for MSVC). Valid options are `dynamic` and `static`. @@ -27,30 +27,78 @@ Valid options are `dynamic` and `static`. Note that libraries can ignore this se ### VCPKG_CMAKE_SYSTEM_NAME Specifies the target platform. -Valid options are `WindowsStore` or empty. Empty corresponds to Windows Desktop and `WindowsStore` corresponds to UWP. -When setting this variable to `WindowsStore`, you must also set `VCPKG_CMAKE_SYSTEM_VERSION` to `10.0`. +Valid options include any CMake system name, such as: +- Empty (Windows Desktop for legacy reasons) +- `WindowsStore` (Universal Windows Platform) +- `Darwin` (Mac OSX) +- `Linux` (Linux) ### VCPKG_PLATFORM_TOOLSET -Specifies the C/C++ compiler toolchain to use. +Specifies the VS-based C/C++ compiler toolchain to use. This can be set to `v141`, `v140`, or left blank. If left blank, we select the latest compiler toolset available on your machine. +Visual Studio 2015 platform toolset is `v140` +Visual Studio 2017 platform toolset is `v141` + +### VCPKG_VISUAL_STUDIO_PATH +Specifies the Visual Studio installation to use. + +When unspecified, a Visual Studio instance is selected automatically, preferring Stable 2017, then Preview 2017, then 2015. + +The path should be absolute, formatted with backslashes, and have no trailing slash: +```cmake +set(VCPKG_VISUAL_STUDIO_PATH "C:\\Program Files (x86)\\Microsoft Visual Studio\\Preview\\Community") +``` + +### VCPKG_CHAINLOAD_TOOLCHAIN_FILE +Specifies an alternate CMake Toolchain file to use. + +This (if set) will override all other compiler detection logic. By default, a toolchain file is selected from `scripts/toolchains/` appropriate to the platform. + +See also the CMake documentation for toolchain files: https://cmake.org/cmake/help/v3.11/manual/cmake-toolchains.7.html. + +### VCPKG_CXX_FLAGS +Sets additional compiler flags to be used when not using `VCPKG_CHAINLOAD_TOOLCHAIN_FILE`. + +This option also has forms for configuration-specific and C flags: +- `VCPKG_CXX_FLAGS` +- `VCPKG_CXX_FLAGS_DEBUG` +- `VCPKG_CXX_FLAGS_RELEASE` +- `VCPKG_C_FLAGS` +- `VCPKG_C_FLAGS_DEBUG` +- `VCPKG_C_FLAGS_RELEASE` + +## macOS Variables + +### VCPKG_INSTALL_NAME_DIR +Sets the install name used when building macOS dynamic libraries. Default value is `@rpath`. See the CMake documentation for [CMAKE_INSTALL_NAME_DIR](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_NAME_DIR.html) for more information. + +### VCPKG_OSX_DEPLOYMENT_TARGET +Sets the minimum macOS version for compiled binaries. This also changes what versions of the macOS platform SDK that CMake will search for. See the CMake documentation for [CMAKE_OSX_DEPLOYMENT_TARGET](https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html) for more information. + +### VCPKG_OSX_SYSROOT +Set the name or path of the macOS platform SDK that will be used by CMake. See the CMake documentation for [CMAKE_OSX_SYSROOT](https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_SYSROOT.html) for more information. + ## Per-port customization The CMake Macro `PORT` will be set when interpreting the triplet file and can be used to change settings (such as `VCPKG_LIBRARY_LINKAGE`) on a per-port basis. Example: ```cmake set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_CRT_LINKAGE dynamic) if(PORT MATCHES "qt5-") set(VCPKG_LIBRARY_LINKAGE dynamic) endif() ``` -This will build all the `qt5-*` libraries as DLLs against the dynamic CRT, but every other library as a static library (still against the dynamic CRT). +This will build all the `qt5-*` libraries as DLLs, but every other library as a static library. For an example in a real project, see https://github.com/Intelight/vcpkg/blob/master/triplets/x86-windows-mixed.cmake. ## Additional Remarks -The default triplet when running any vcpkg command is `%VCPKG_DEFAULT_TRIPLET%` or `x86-windows` if that environment variable is undefined. +The default triplet when running any vcpkg command is `%VCPKG_DEFAULT_TRIPLET%` or a platform-specific choice if that environment variable is undefined. + +- Windows: `x86-windows` +- Linux: `x64-linux` +- OSX: `x64-osx` We recommend using a systematic naming scheme when creating new triplets. The Android toolchain naming scheme is a good source of inspiration: https://developer.android.com/ndk/guides/standalone_toolchain.html. diff --git a/ports/3fd/CONTROL b/ports/3fd/CONTROL new file mode 100644 index 00000000000..13f769c9ca5 --- /dev/null +++ b/ports/3fd/CONTROL @@ -0,0 +1,4 @@ +Source: 3fd +Version: 2.6.2 +Description: C++ Framework For Fast Development +Build-Depends: boost-lockfree (windows), boost-regex (windows), poco (windows), sqlite3, rapidxml diff --git a/ports/3fd/portfile.cmake b/ports/3fd/portfile.cmake new file mode 100644 index 00000000000..69fc60ccb6d --- /dev/null +++ b/ports/3fd/portfile.cmake @@ -0,0 +1,111 @@ +include(vcpkg_common_functions) + +# Check architecture: +if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(BUILD_ARCH "Win32") +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(BUILD_ARCH "x64") +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(BUILD_ARCH "ARM") +else() + message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +# Check library linkage: +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("3FD only supports static library linkage. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +# Check CRT linkage: +if (VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "3FD can only be built with dynamic linkage to CRT!") +endif() + +# Get source code: +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO faburaya/3FD + REF v2.6.2 + SHA512 a2444cc07d8741540c6071ac59bc8c63785db52e412a843aa18a5dfa0144b5001d428e44bcb520238e3d476440bc74526343f025005f05d534e732645f59cbe0 + HEAD_REF master + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/remove-seekpos.patch" +) + +# Copy the sources to ensure a clean, out-of-source build +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all) +file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all) +file(COPY ${SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all) +get_filename_component(LAST_DIR_NAME "${SOURCE_PATH}" NAME) +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all/${LAST_DIR_NAME}") + +# Build: +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") # UWP: + vcpkg_build_msbuild( + USE_VCPKG_INTEGRATION + PROJECT_PATH ${SOURCE_PATH}/3FD/3FD.WinRT.UWP.vcxproj + PLATFORM ${BUILD_ARCH} + ) +elseif (NOT VCPKG_CMAKE_SYSTEM_NAME) # Win32: + vcpkg_build_msbuild( + USE_VCPKG_INTEGRATION + PROJECT_PATH ${SOURCE_PATH}/3FD/3FD.vcxproj + PLATFORM ${BUILD_ARCH} + TARGET Build + ) +else() + message(FATAL_ERROR "Unsupported system: 3FD is not currently ported to VCPKG in ${VCPKG_CMAKE_SYSTEM_NAME}!") +endif() + +# Install: +file(GLOB HEADER_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/3FD/*.h") +file(INSTALL + ${HEADER_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/3FD + PATTERN "*_impl*.h" EXCLUDE + PATTERN "*example*.h" EXCLUDE + PATTERN "stdafx.h" EXCLUDE + PATTERN "targetver.h" EXCLUDE +) + +file(INSTALL ${SOURCE_PATH}/btree DESTINATION ${CURRENT_PACKAGES_DIR}/include/3FD) +file(INSTALL ${SOURCE_PATH}/OpenCL/CL DESTINATION ${CURRENT_PACKAGES_DIR}/include/3FD) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/3FD) +file(INSTALL + ${SOURCE_PATH}/3FD/3fd-config-template.xml + DESTINATION ${CURRENT_PACKAGES_DIR}/share/3FD +) + +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") # Visual C++, UWP app: + file(INSTALL + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.WinRT.UWP/3FD.WinRT.UWP.lib + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.WinRT.UWP/_3FD_WinRT_UWP.pri + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/WinRT.UWP/3FD.WinRT.UWP.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(INSTALL + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.WinRT.UWP/3FD.WinRT.UWP.lib + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.WinRT.UWP/_3FD_WinRT_UWP.pri + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/WinRT.UWP/3FD.WinRT.UWP.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) +else() # Visual C++, Win32 app: + file(INSTALL + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.lib + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(INSTALL + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.lib + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/3fd RENAME copyright) +file(INSTALL ${SOURCE_PATH}/Acknowledgements.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/3fd) + +vcpkg_copy_pdbs() diff --git a/ports/3fd/remove-seekpos.patch b/ports/3fd/remove-seekpos.patch new file mode 100644 index 00000000000..6c77cdc64a5 --- /dev/null +++ b/ports/3fd/remove-seekpos.patch @@ -0,0 +1,13 @@ +diff --git a/3fd/web_wws_impl_host.cpp b/3fd/web_wws_impl_host.cpp +index b87dc75..1cff45f 100644 +--- a/3fd/web_wws_impl_host.cpp ++++ b/3fd/web_wws_impl_host.cpp +@@ -48,7 +48,7 @@ namespace wws + throw AppException(oss.str()); + } + +- const auto fileSizeBytes = inputStream.seekg(0, std::ios::end).tellg().seekpos(); // move cursor to the end to get the zize ++ const auto fileSizeBytes = inputStream.seekg(0, std::ios::end).tellg(); // move cursor to the end to get the zize + + // File is not trunked: + if (fileSizeBytes > 0) diff --git a/ports/abseil/CMakeLists.txt b/ports/abseil/CMakeLists.txt index ced5b14ca99..d98914e604e 100644 --- a/ports/abseil/CMakeLists.txt +++ b/ports/abseil/CMakeLists.txt @@ -16,9 +16,8 @@ endif() function(add_sublibrary LIB) file(GLOB_RECURSE SOURCES "absl/${LIB}/*.cc") - list(FILTER SOURCES EXCLUDE REGEX "_test(ing)?(_.+)?.cc$|_nonprod.cc$") - file(GLOB HEADERS "absl/${LIB}/*.h" "absl/${LIB}/*.inc") - file(GLOB INTERNAL_HEADERS "absl/${LIB}/internal/*.h") + list(FILTER SOURCES EXCLUDE REGEX "_test(ing)?(_.+)?.cc$|_nonprod.cc$|test_util.cc$|_benchmark.cc$") + file(GLOB_RECURSE HEADERS "absl/${LIB}/*.h" "absl/${LIB}/*.inc") if(SOURCES) if("STATIC" IN_LIST ARGN) @@ -33,7 +32,6 @@ function(add_sublibrary LIB) target_include_directories(${LIB} INTERFACE $ $) endif() - install(TARGETS ${LIB} EXPORT unofficial-abseil-targets RUNTIME DESTINATION bin LIBRARY DESTINATION lib @@ -42,10 +40,11 @@ function(add_sublibrary LIB) if(INSTALL_HEADERS) if(HEADERS) - install(FILES ${HEADERS} DESTINATION "include/absl/${LIB}") - endif() - if(INTERNAL_HEADERS) - install(FILES ${INTERNAL_HEADERS} DESTINATION "include/absl/${LIB}/internal") + foreach(file IN LISTS HEADERS) + get_filename_component(dir ${file} DIRECTORY) + file(RELATIVE_PATH rel_dir ${CMAKE_SOURCE_DIR}/absl/${LIB} ${dir}) + install(FILES ${file} DESTINATION "include/absl/${LIB}/${rel_dir}") + endforeach() endif() endif() endfunction() @@ -63,6 +62,7 @@ add_sublibrary(algorithm) add_sublibrary(base) add_sublibrary(container) add_sublibrary(debugging) +add_sublibrary(hash) add_sublibrary(memory) add_sublibrary(meta) add_sublibrary(numeric) @@ -75,6 +75,8 @@ add_sublibrary(utility) target_link_public_libraries(algorithm base meta) target_link_public_libraries(container algorithm base memory) +target_link_public_libraries(debugging base) +target_link_public_libraries(hash base) target_link_public_libraries(memory meta) target_link_public_libraries(meta base) target_link_public_libraries(numeric base) @@ -84,9 +86,6 @@ target_link_public_libraries(utility base meta) target_link_public_libraries(time base numeric) target_link_public_libraries(synchronization base time) -find_package(unofficial-cctz REQUIRED) -target_link_libraries(time PUBLIC unofficial::cctz) - install( EXPORT unofficial-abseil-targets FILE unofficial-abseil-config.cmake diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index b1a1def7fe5..95191fcf00e 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,7 +1,6 @@ Source: abseil -Version: 2018-04-12 +Version: 2018-11-08-1 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole. -Build-Depends: cctz diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 71d26de6945..cc70f725093 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF a7e522daf1ec9cda69b356472f662142dd0c1215 - SHA512 250b602fc3f5a4c3b6522ef0f49bdf63db0070289cb415cb31bb672b95b35dc9494f881adeb1b090927b1cd942c3674b6142747f601c8f7233bd12d4078583f3 + REF 070f6e47b33a2909d039e620c873204f78809492 + SHA512 84bc7b17519d3cae471f0e2602ed32111e99d20abfdff26f1e36fd712ff9013b9768b3d37b9179dc40cb1b4a350da1b6955a881c5300ea9b608f97a3101c2762 HEAD_REF master ) diff --git a/ports/ace/CONTROL b/ports/ace/CONTROL index 9baa763dc4f..ed08a12c228 100644 --- a/ports/ace/CONTROL +++ b/ports/ace/CONTROL @@ -1,3 +1,3 @@ Source: ace -Version: 6.4.7 +Version: 6.5.3 Description: The ADAPTIVE Communication Environment diff --git a/ports/ace/portfile.cmake b/ports/ace/portfile.cmake index 25eeabb0b1c..e10e82e0e24 100644 --- a/ports/ace/portfile.cmake +++ b/ports/ace/portfile.cmake @@ -9,9 +9,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.7.zip" - FILENAME "ACE-6.4.7.zip" - SHA512 931c7e5902f3999ed05c13f9d2c53a605e9b59b4ce78f33b42238ac25286aa13fb510e2f780b6aea9505d03edf834109ab4481870327fec1b5bb11d29cfbafdc + URLS "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-6_5_3/ACE-6.5.3.zip" + FILENAME ACE-6.5.3.zip + SHA512 1c24c7a138b6580e0f2a71d3e797ed846a3c046854c19d10175198dc519b610b2ac684d6e0e3999705319304b6eee3f09405cb43ce48a869d2f1446342da469d ) vcpkg_extract_source_archive(${ARCHIVE}) diff --git a/ports/aixlog/CONTROL b/ports/aixlog/CONTROL new file mode 100644 index 00000000000..12e2a88c9ea --- /dev/null +++ b/ports/aixlog/CONTROL @@ -0,0 +1,3 @@ +Source: aixlog +Version: 1.2.1 +Description: Header-only C++ logging library diff --git a/ports/sol/portfile.cmake b/ports/aixlog/portfile.cmake similarity index 53% rename from ports/sol/portfile.cmake rename to ports/aixlog/portfile.cmake index c6520238029..4838372d67a 100644 --- a/ports/sol/portfile.cmake +++ b/ports/aixlog/portfile.cmake @@ -1,25 +1,32 @@ -# 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 = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# -include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO ThePhD/sol2 - REF v2.19.5 - SHA512 c004c2331e2eb0aae4467c10609f73879246c3ab5b7421e5b6fcb91b0c6595d999e5fd4c70b1859af1febb374631640d6727bf236a0cd176e40f631813e243a9 - HEAD_REF develop -) - -file(INSTALL ${SOURCE_PATH}/single/sol/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/) - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sol RENAME copyright) +# 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 = +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO badaix/aixlog + REF v1.2.1 + SHA512 776558fdd911f0cc9e8d467bf8e00a1930d2e51bb8ccd5f36f95955fefecab65faf575a80fdaacfe83fd32808f8b9c2e0323b16823e0431300df7bc0c1dfde12 + ) + + + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) + + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aixlog) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/aixlog/LICENSE ${CURRENT_PACKAGES_DIR}/share/aixlog/copyright) + +# Post-build test for cmake libraries +# vcpkg_test_cmake(PACKAGE_NAME aixlog) diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL index 4e24aab9b3e..a2aefabec78 100644 --- a/ports/alembic/CONTROL +++ b/ports/alembic/CONTROL @@ -1,4 +1,4 @@ Source: alembic -Version: 1.7.7 +Version: 1.7.9 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/alembic/portfile.cmake b/ports/alembic/portfile.cmake index a44771ab258..295afa34a9e 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO alembic/alembic - REF 1.7.7 - SHA512 0ebcf6b9304e84bc60f1c146d0b5e5c5b1de43974ec0725293c444b48b22640945f5883eb9afd46c1ac9f0c260d6f22ff29b4866d6525c416339877be984b149 + REF 1.7.9 + SHA512 8025c20525ffbd5bdc9dd5a33ad8238e49f063d244ab9d112e7d1ddb7ee7cf9b36ceb74cb45d658ce22d3033552c89bddf6b818cf466ea46aa1a70a41fdeddb2 HEAD_REF master ) diff --git a/ports/allegro5/CONTROL b/ports/allegro5/CONTROL index 6cf78f2a048..a1515adfffe 100644 --- a/ports/allegro5/CONTROL +++ b/ports/allegro5/CONTROL @@ -1,4 +1,4 @@ Source: allegro5 -Version: 5.2.3.0 +Version: 5.2.4.0 Description: Allegro is a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform. However, Allegro is not a game engine: you are free to design and structure your program as you like. Build-Depends: opengl, zlib, freetype, libogg, libvorbis, libflac, openal-soft, libpng, bzip2, physfs, libtheora, opus, opusfile diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index d22a0ecd9eb..bb96735362d 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -14,8 +14,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO liballeg/allegro5 - REF 5.2.3.0 - SHA512 419f036d0265062dbec0e9306b153de5af5375186f7b5b2fe62a80549fc0e2c2a6afff81a6772effa7624fe2e452ed0a2830872ef25cc3b23fea93af99f60ba9 + REF 5.2.4.0 + SHA512 46a7c7b65ffb49ae5c81e5a33d850b4ae94b59135fc9b15174ffe86133445ff328c623c2c48298d3f631cc6310d51f4f3f07b8b952ecbd360755001292cbda8b HEAD_REF master ) diff --git a/ports/angle/CMakeLists.txt b/ports/angle/CMakeLists.txt index 53fff2223f8..d553c9dbbb4 100644 --- a/ports/angle/CMakeLists.txt +++ b/ports/angle/CMakeLists.txt @@ -1,210 +1,302 @@ -cmake_minimum_required(VERSION 3.8) -project(angle CXX) - -if(WIN32 AND NOT WINDOWS_STORE) - set(WINDOWS_DESKTOP 1) -else() - set(WINDOWS_DESKTOP 0) -endif() - -add_compile_options(/d2guard4 /Wv:18) -set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /guard:cf") - -add_definitions( - -D_CRT_SECURE_NO_DEPRECATE - -D_SCL_SECURE_NO_WARNINGS - -D_HAS_EXCEPTIONS=0 - -DNOMINMAX - -DANGLE_STANDALONE_BUILD - -DANGLE_ENABLE_DEBUG_ANNOTATIONS -) - -configure_file(commit.h include/id/commit.h COPYONLY) -include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) - -########## -# angle::common -file(GLOB ANGLE_COMMON_SOURCES "src/common/*.h" "src/common/*.inl" "src/common/*.cpp" "src/common/third_party/base/*.h") -list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|_linux|_mac") -add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES}) -target_include_directories(angle_common PUBLIC src/common/third_party/base) -add_library(angle::common ALIAS angle_common) - -########## -# angle::image_util -file(GLOB ANGLE_IMAGE_UTIL_SOURCES "src/image_util/*.h" "src/image_util/*.inl" "src/image_util/*.cpp") -add_library(angle_image_util STATIC ${ANGLE_IMAGE_UTIL_SOURCES}) -target_link_libraries(angle_image_util PRIVATE angle::common) -add_library(angle::image_util ALIAS angle_image_util) - -########## -# angle::translator -file(GLOB TRANSLATOR_SOURCES - "src/compiler/translator/glslang.l" - "src/compiler/translator/glslang.y" - "src/compiler/translator/*.h" - "src/compiler/translator/*.cpp" - "src/third_party/compiler/ArrayBoundsClamper.cpp" -) -add_library(angle_translator STATIC ${TRANSLATOR_SOURCES}) -target_compile_definitions(angle_translator PUBLIC - -DANGLE_ENABLE_ESSL - -DANGLE_ENABLE_GLSL - -DANGLE_ENABLE_HLSL -) -target_link_libraries(angle_translator PRIVATE angle::common) -add_library(angle::translator ALIAS angle_translator) - -########## -# angle::preprocessor -file(GLOB PREPROCESSOR_SOURCES - "src/compiler/preprocessor/*.h" - "src/compiler/preprocessor/*.cpp" -) -add_library(angle_preprocessor STATIC ${PREPROCESSOR_SOURCES}) -target_link_libraries(angle_preprocessor PRIVATE angle::common) -add_library(angle::preprocessor ALIAS angle_preprocessor) - -########## -# libANGLE - -## OpenGL Renderer -if(WINDOWS_DESKTOP) - file(GLOB LIBANGLE_GL_SOURCES - "src/libANGLE/renderer/gl/*.cpp" - "src/libANGLE/renderer/gl/*.inl" - "src/libANGLE/renderer/gl/*.h" - - "src/libANGLE/renderer/gl/wgl/*.cpp" - "src/libANGLE/renderer/gl/wgl/*.inl" - "src/libANGLE/renderer/gl/wgl/*.h" - ) - list(FILTER LIBANGLE_GL_SOURCES EXCLUDE REGEX "_unittest") - add_library(angle_renderer_opengl INTERFACE) - target_sources(angle_renderer_opengl INTERFACE ${LIBANGLE_GL_SOURCES}) - target_compile_definitions(angle_renderer_opengl INTERFACE -DANGLE_ENABLE_OPENGL) - add_library(angle::renderer::opengl ALIAS angle_renderer_opengl) -endif() - -## All D3D Sources -file(GLOB_RECURSE LIBANGLE_D3D_SOURCES - "src/libANGLE/renderer/d3d/*.cpp" - "src/libANGLE/renderer/d3d/*.inl" - "src/libANGLE/renderer/d3d/*.h" -) -list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest") - -## WinRT D3D Renderer -if(WINDOWS_STORE) - set(LIBANGLE_D3D_WINRT_SOURCES ${LIBANGLE_D3D_SOURCES}) - list(FILTER LIBANGLE_D3D_WINRT_SOURCES INCLUDE REGEX "winrt") - add_library(angle_renderer_winrt INTERFACE) - target_sources(angle_renderer_winrt INTERFACE ${LIBANGLE_D3D_WINRT_SOURCES}) - add_library(angle::renderer::winrt ALIAS angle_renderer_winrt) -endif() - -## Win32/d3d9 D3D Renderer -if(WINDOWS_DESKTOP) - set(LIBANGLE_D3D_DESKTOP_SOURCES ${LIBANGLE_D3D_SOURCES}) - list(FILTER LIBANGLE_D3D_DESKTOP_SOURCES INCLUDE REGEX "d3d9|win32") - find_library(D3D9_LIB NAMES d3d9) - add_library(angle_renderer_win32 INTERFACE) - target_sources(angle_renderer_win32 INTERFACE ${LIBANGLE_D3D_DESKTOP_SOURCES}) - target_compile_definitions(angle_renderer_win32 INTERFACE -DANGLE_ENABLE_D3D9) - target_link_libraries(angle_renderer_win32 INTERFACE ${D3D9_LIB}) - add_library(angle::renderer::win32 ALIAS angle_renderer_win32) -endif() - -## D3D11 Base renderer -list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "winrt|d3d9|win32") -find_library(DXGUID_LIB NAMES dxguid) -find_library(D3D11_LIB NAMES d3d11) -add_library(angle_renderer_d3d INTERFACE) -target_sources(angle_renderer_d3d INTERFACE ${LIBANGLE_D3D_SOURCES}) -target_compile_definitions(angle_renderer_d3d INTERFACE - -DANGLE_ENABLE_D3D11 - "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" -) -target_link_libraries(angle_renderer_d3d INTERFACE ${D3D11_LIB} ${DXGUID_LIB}) -add_library(angle::renderer::d3d ALIAS angle_renderer_d3d) - -## Core libANGLE library -file(GLOB LIBANGLE_SOURCES - "src/third_party/systeminfo/SystemInfo.cpp" - "src/common/third_party/murmurhash/MurmurHash3.cpp" - "src/common/event_tracer.cpp" - - "src/libANGLE/*.cpp" - "src/libANGLE/*.inl" - "src/libANGLE/*.h" - - "src/libANGLE/renderer/*.cpp" - "src/libANGLE/renderer/*.inl" - "src/libANGLE/renderer/*.h" - - "src/libANGLE/renderer/null/*.cpp" - "src/libANGLE/renderer/null/*.inl" - "src/libANGLE/renderer/null/*.h" -) -list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest") - -add_library(libANGLE STATIC ${LIBANGLE_SOURCES}) -target_link_libraries(libANGLE PRIVATE - angle::common - angle::image_util - angle::translator - angle::preprocessor - angle::renderer::d3d - $<$:angle::renderer::winrt> - $<$:angle::renderer::win32> - $<$:angle::renderer::opengl> -) -target_include_directories(libANGLE PRIVATE "src/third_party/khronos") -target_compile_definitions(libANGLE - PRIVATE -DANGLE_ENABLE_NULL - PUBLIC -DLIBANGLE_IMPLEMENTATION -) -add_library(angle::libANGLE ALIAS libANGLE) - -########## -# libGLESv2 -file(GLOB LIBGLESV2_SOURCES "src/libGLESv2/*.h" "src/libGLESv2/*.cpp" "src/libGLESv2/libGLESv2.def") -add_library(libGLESv2 ${LIBGLESV2_SOURCES}) -target_link_libraries(libGLESv2 PRIVATE angle::common angle::libANGLE) -target_compile_definitions(libGLESv2 - PRIVATE -DLIBGLESV2_IMPLEMENTATION - PUBLIC - -DGL_GLEXT_PROTOTYPES - -DGL_APICALL= - -DEGLAPI= -) -target_include_directories(libGLESv2 PUBLIC "$") - -########## -# libEGL -add_library(libEGL - "src/libEGL/libEGL.def" - "src/libEGL/libEGL.cpp" - "src/libEGL/libEGL.rc" - "src/libEGL/resource.h" -) -target_link_libraries(libEGL PRIVATE angle::common angle::libANGLE libGLESv2) -target_include_directories(libEGL PUBLIC "$") - -install(TARGETS libEGL libGLESv2 EXPORT ANGLEExport - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -install(EXPORT ANGLEExport FILE unofficial-angle-config.cmake NAMESPACE unofficial::angle:: DESTINATION share/unofficial-angle) - -if(NOT DISABLE_INSTALL_HEADERS) - install( - DIRECTORY include/ - DESTINATION include - FILES_MATCHING PATTERN "*.h" - PATTERN "GLSLANG" EXCLUDE - PATTERN "export.h" EXCLUDE - ) -endif() +cmake_minimum_required(VERSION 3.8) +project(angle CXX) + +if(WIN32 AND NOT WINDOWS_STORE) + set(WINDOWS_DESKTOP 1) +else() + set(WINDOWS_DESKTOP 0) +endif() +if (WINDOWS_DESKTOP OR WINDOWS_STORE) + set(WINDOWS_ANY 1) +else() + set(WINDOWS_ANY 0) +endif() + +if(UNIX AND NOT APPLE) + set(LINUX 1) +else() + set(LINUX 0) +endif() + +if(WINDOWS_ANY) + add_compile_options(/d2guard4 /Wv:18 /guard:cf) +else() + add_compile_options(-std=c++17 -fPIC) +endif() + +if (APPLE) + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -framework Cocoa -framework OpenGL -framework IOKit -framework CoreFoundation -framework IOSurface -framework QuartzCore -framework CoreGraphics") +endif() +set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}") +set(CMAKE_STATIC_LIBRARY_PREFIX "") + +add_definitions( + -D_CRT_SECURE_NO_DEPRECATE + -D_SCL_SECURE_NO_WARNINGS + -D_HAS_EXCEPTIONS=0 + -DNOMINMAX + -DANGLE_STANDALONE_BUILD + -DANGLE_ENABLE_DEBUG_ANNOTATIONS +) + +configure_file(commit.h include/id/commit.h COPYONLY) +include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) + +########## +# angle::common +if(WINDOWS_ANY) + set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_mac") +elseif(LINUX) + set(ANGLE_COMMON_PLATFORM_FILTER "_win|_mac") +elseif(APPLE) + set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_win") +endif() +file(GLOB ANGLE_COMMON_SOURCES "src/common/*.h" "src/common/*.inl" "src/common/*.cpp" "src/common/third_party/base/*.h") +list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|${ANGLE_COMMON_PLATFORM_FILTER}") +add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES}) +target_include_directories(angle_common PUBLIC src/common/third_party/base) +add_library(angle::common ALIAS angle_common) + +########## +# angle::image_util +file(GLOB ANGLE_IMAGE_UTIL_SOURCES "src/image_util/*.h" "src/image_util/*.inl" "src/image_util/*.cpp") +add_library(angle_image_util STATIC ${ANGLE_IMAGE_UTIL_SOURCES}) +target_link_libraries(angle_image_util PRIVATE angle::common) +add_library(angle::image_util ALIAS angle_image_util) + +########## +# angle::translator +file(GLOB TRANSLATOR_SOURCES + "src/compiler/translator/glslang.l" + "src/compiler/translator/glslang.y" + "src/compiler/translator/*.h" + "src/compiler/translator/*.cpp" + "src/third_party/compiler/ArrayBoundsClamper.cpp" +) +add_library(angle_translator STATIC ${TRANSLATOR_SOURCES}) +target_compile_definitions(angle_translator PUBLIC + -DANGLE_ENABLE_ESSL + -DANGLE_ENABLE_GLSL + -DANGLE_ENABLE_HLSL +) +target_link_libraries(angle_translator PRIVATE angle::common) +add_library(angle::translator ALIAS angle_translator) + +########## +# angle::preprocessor +file(GLOB PREPROCESSOR_SOURCES + "src/compiler/preprocessor/*.h" + "src/compiler/preprocessor/*.cpp" +) +add_library(angle_preprocessor STATIC ${PREPROCESSOR_SOURCES}) +target_link_libraries(angle_preprocessor PRIVATE angle::common) +add_library(angle::preprocessor ALIAS angle_preprocessor) + +########## +# libANGLE + +## OpenGL Renderer +if(WINDOWS_DESKTOP OR LINUX OR APPLE) + if(WINDOWS_DESKTOP) + set(ANGLE_RENDERER_OPENGL_PLATFORM + "src/libANGLE/renderer/gl/wgl/*.cpp" + "src/libANGLE/renderer/gl/wgl/*.inl" + "src/libANGLE/renderer/gl/wgl/*.h" + ) + elseif(APPLE) + set(ANGLE_RENDERER_OPENGL_PLATFORM + "src/libANGLE/renderer/gl/cgl/*.mm" + "src/libANGLE/renderer/gl/cgl/*.cpp" + "src/libANGLE/renderer/gl/cgl/*.inl" + "src/libANGLE/renderer/gl/cgl/*.h" + "gpu_info_util/SystemInfo_mac.mm" + ) + elseif(LINUX) + set(ANGLE_RENDERER_OPENGL_PLATFORM + "src/libANGLE/renderer/gl/glx/*.cpp" + "src/libANGLE/renderer/gl/glx/*.inl" + "src/libANGLE/renderer/gl/glx/*.h" + ) + endif() + + file(GLOB LIBANGLE_GL_SOURCES + "src/libANGLE/renderer/gl/*.cpp" + "src/libANGLE/renderer/gl/*.inl" + "src/libANGLE/renderer/gl/*.h" + + ${ANGLE_RENDERER_OPENGL_PLATFORM} + ) + list(FILTER LIBANGLE_GL_SOURCES EXCLUDE REGEX "_unittest") + add_library(angle_renderer_opengl INTERFACE) + target_sources(angle_renderer_opengl INTERFACE ${LIBANGLE_GL_SOURCES}) + target_compile_definitions(angle_renderer_opengl INTERFACE -DANGLE_ENABLE_OPENGL) + add_library(angle::renderer::opengl ALIAS angle_renderer_opengl) +endif() + +# D3D Renderers +if(WINDOWS_ANY) + ## All D3D Sources + file(GLOB_RECURSE LIBANGLE_D3D_SOURCES + "src/libANGLE/renderer/d3d/*.cpp" + "src/libANGLE/renderer/d3d/*.inl" + "src/libANGLE/renderer/d3d/*.h" + ) + list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest") + + ## WinRT D3D Renderer + if(WINDOWS_STORE) + set(LIBANGLE_D3D_WINRT_SOURCES ${LIBANGLE_D3D_SOURCES}) + list(FILTER LIBANGLE_D3D_WINRT_SOURCES INCLUDE REGEX "winrt") + add_library(angle_renderer_winrt INTERFACE) + target_sources(angle_renderer_winrt INTERFACE ${LIBANGLE_D3D_WINRT_SOURCES}) + add_library(angle::renderer::winrt ALIAS angle_renderer_winrt) + endif() + + ## Win32/d3d9 D3D Renderer + if(WINDOWS_DESKTOP) + set(LIBANGLE_D3D_DESKTOP_SOURCES ${LIBANGLE_D3D_SOURCES}) + list(FILTER LIBANGLE_D3D_DESKTOP_SOURCES INCLUDE REGEX "d3d9|win32") + find_library(D3D9_LIB NAMES d3d9) + add_library(angle_renderer_win32 INTERFACE) + target_sources(angle_renderer_win32 INTERFACE ${LIBANGLE_D3D_DESKTOP_SOURCES}) + target_compile_definitions(angle_renderer_win32 INTERFACE -DANGLE_ENABLE_D3D9) + target_link_libraries(angle_renderer_win32 INTERFACE ${D3D9_LIB}) + add_library(angle::renderer::win32 ALIAS angle_renderer_win32) + endif() + + ## D3D11 Base renderer + list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "winrt|d3d9|win32") + find_library(DXGUID_LIB NAMES dxguid) + find_library(D3D11_LIB NAMES d3d11) + add_library(angle_renderer_d3d INTERFACE) + target_sources(angle_renderer_d3d INTERFACE ${LIBANGLE_D3D_SOURCES}) + target_compile_definitions(angle_renderer_d3d INTERFACE + -DANGLE_ENABLE_D3D11 + "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" + ) + target_link_libraries(angle_renderer_d3d INTERFACE ${D3D11_LIB} ${DXGUID_LIB}) + add_library(angle::renderer::d3d ALIAS angle_renderer_d3d) +endif() + +## Core libANGLE library +if(WINDOWS_ANY) + set(LIBANGLE_SOURCES_PLATFORM + "src/third_party/systeminfo/SystemInfo.cpp" + ) +else() + set(LIBANGLE_SOURCES_PLATFORM ) +endif() + +file(GLOB LIBANGLE_SOURCES + "src/common/third_party/murmurhash/MurmurHash3.cpp" + "src/common/event_tracer.cpp" + + "src/libANGLE/*.cpp" + "src/libANGLE/*.inl" + "src/libANGLE/*.h" + + "src/libANGLE/renderer/*.cpp" + "src/libANGLE/renderer/*.inl" + "src/libANGLE/renderer/*.h" + + "src/libANGLE/renderer/null/*.cpp" + "src/libANGLE/renderer/null/*.inl" + "src/libANGLE/renderer/null/*.h" + + ${LIBANGLE_SOURCES_PLATFORM} +) +list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest") + +if(LINUX OR APPLE) + set(LIBANGLE_RENDERER_PLATFORM + angle::renderer::opengl + ) +elseif(WINDOWS_STORE) + set(LIBANGLE_RENDERER_PLATFORM + angle::renderer::d3d + angle::renderer::winrt + ) +elseif(WINDOWS_DESKTOP) + set(LIBANGLE_RENDERER_PLATFORM + angle::renderer::d3d + angle::renderer::win32 + angle::renderer::opengl + ) +else() + set(LIBANGLE_RENDERER_PLATFORM ) +endif() + +if(LINUX) + set(LIBANGLE_RENDERER_COMPILEDEF + -DANGLE_USE_X11 + ) +else() + set(LIBANGLE_RENDERER_COMPILEDEF ) +endif() + +add_library(libANGLE STATIC ${LIBANGLE_SOURCES}) +target_link_libraries(libANGLE PRIVATE + angle::common + angle::image_util + angle::translator + angle::preprocessor + ${LIBANGLE_RENDERER_PLATFORM} +) +target_include_directories(libANGLE PRIVATE "src/third_party/khronos") +target_compile_definitions(libANGLE + PRIVATE -DANGLE_ENABLE_NULL + PUBLIC + -DLIBANGLE_IMPLEMENTATION + ${LIBANGLE_RENDERER_COMPILEDEF} +) +add_library(angle::libANGLE ALIAS libANGLE) + +########## +# libGLESv2 +file(GLOB LIBGLESV2_SOURCES "src/libGLESv2/*.h" "src/libGLESv2/*.cpp" "src/libGLESv2/libGLESv2.def") +add_library(libGLESv2 ${LIBGLESV2_SOURCES}) +target_link_libraries(libGLESv2 PRIVATE angle::common angle::libANGLE) +target_compile_definitions(libGLESv2 + PRIVATE -DLIBGLESV2_IMPLEMENTATION + PUBLIC + -DGL_GLEXT_PROTOTYPES + -DGL_APICALL= + -DEGLAPI= +) +target_include_directories(libGLESv2 PUBLIC "$") + +########## +# libEGL +add_library(libEGL + "src/libEGL/libEGL.def" + "src/libEGL/libEGL.cpp" + "src/libEGL/libEGL.rc" + "src/libEGL/resource.h" +) +target_link_libraries(libEGL PRIVATE angle::common angle::libANGLE libGLESv2) +target_include_directories(libEGL PUBLIC "$") + + +SET_TARGET_PROPERTIES(libANGLE PROPERTIES PREFIX "") +SET_TARGET_PROPERTIES(libGLESv2 PROPERTIES PREFIX "") +SET_TARGET_PROPERTIES(libEGL PROPERTIES PREFIX "") + +install(TARGETS libEGL libGLESv2 EXPORT ANGLEExport + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(EXPORT ANGLEExport FILE unofficial-angle-config.cmake NAMESPACE unofficial::angle:: DESTINATION share/unofficial-angle) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + DIRECTORY include/ + DESTINATION include + FILES_MATCHING PATTERN "*.h" + PATTERN "GLSLANG" EXCLUDE + PATTERN "EGL" EXCLUDE + PATTERN "KHR" EXCLUDE + PATTERN "export.h" EXCLUDE + ) +endif() diff --git a/ports/angle/CONTROL b/ports/angle/CONTROL index 12f912ac85a..46e3407e8ff 100644 --- a/ports/angle/CONTROL +++ b/ports/angle/CONTROL @@ -1,4 +1,5 @@ Source: angle -Version: 2017-06-14-8d471f-4 +Version: 2017-06-14-8d471f-5 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. +Build-Depends: egl-registry diff --git a/ports/apr/CONTROL b/ports/apr/CONTROL index 1f771a0ed09..b4ea1f2137c 100644 --- a/ports/apr/CONTROL +++ b/ports/apr/CONTROL @@ -1,3 +1,3 @@ Source: apr -Version: 1.6.3 +Version: 1.6.5 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/apr/portfile.cmake b/ports/apr/portfile.cmake index 22bd260c88e..40ced30496c 100644 --- a/ports/apr/portfile.cmake +++ b/ports/apr/portfile.cmake @@ -4,13 +4,13 @@ endif() include(vcpkg_common_functions) -set(VERSION 1.6.3) +set(VERSION 1.6.5) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/apr-${VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://www.apache.org/dist/apr/apr-${VERSION}.tar.bz2" FILENAME "apr-${VERSION}.tar.bz2" - SHA512 f6b8679ae7fafff793c825c78775c84a646267c441710a50664589850e13148719b4eab48ab6e7c95b7aed085cff831115687434a7b160dcc2faa0eae63ac996 + SHA512 d3511e320457b5531f565813e626e7941f6b82864852db6aa03dd298a65dbccdcdc4bd580f5314f8be45d268388edab25efe88cf8340b7d2897a4dbe9d0a41fc ) vcpkg_extract_source_archive(${ARCHIVE}) diff --git a/ports/args/CONTROL b/ports/args/CONTROL index ee2a6a09a3d..7ab2310aa77 100644 --- a/ports/args/CONTROL +++ b/ports/args/CONTROL @@ -1,3 +1,3 @@ Source: args -Version: 2018-02-23 +Version: 2018-10-25 Description: A simple header-only C++ argument parser library. diff --git a/ports/args/portfile.cmake b/ports/args/portfile.cmake index 29d76b81f2f..e319975e0ed 100644 --- a/ports/args/portfile.cmake +++ b/ports/args/portfile.cmake @@ -4,14 +4,19 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Taywee/args - REF 7bf17000aa0969b8ca3178c72ec834b105944a41 - SHA512 38f038f2ea3cdbf62678112a28f6b9a2b46b7b291ec9a7c78393c28b1169dc393a086393f24534804188d434583896d9eaedca964c00a2db032fb337ebc9c214 + REF a82a9d6c94d7c58d8b96c65bdc1aba09a4f3e5db + SHA512 0a7caf231117827eb2dbbca3d51259c701c1b8da61518565e5cfe379edd03f34a2dac2d35cdba659042e19e7b3076ef4b6aa6e01d2f9b66db59d1672f9f18f12 HEAD_REF master ) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + # Put the licence file where vcpkg expects it -file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/args) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/args/license ${CURRENT_PACKAGES_DIR}/share/args/copyright) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/args) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/args/LICENSE ${CURRENT_PACKAGES_DIR}/share/args/copyright) # Copy the args header files file(INSTALL ${SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.hxx") diff --git a/ports/argtable2/CONTROL b/ports/argtable2/CONTROL new file mode 100644 index 00000000000..1d9b5bc0e1c --- /dev/null +++ b/ports/argtable2/CONTROL @@ -0,0 +1,3 @@ +Source: argtable2 +Version: 2.13-1 +Description: Argtable is an ANSI C library for parsing GNU style command line options with a minimum of fuss. diff --git a/ports/argtable2/fix-install-dirs.patch b/ports/argtable2/fix-install-dirs.patch new file mode 100644 index 00000000000..cc1b9254331 --- /dev/null +++ b/ports/argtable2/fix-install-dirs.patch @@ -0,0 +1,24 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 3427487..a9b8be0 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,5 +1,4 @@ +-# for now, install in subdirectory of source directory by default +-SET( CMAKE_INSTALL_PREFIX .. ) ++include(GNUInstallDirs) + + IF( WIN32 ) + ADD_LIBRARY( argtable2 arg_dbl.c arg_end.c arg_file.c arg_int.c arg_lit.c arg_rem.c arg_str.c argtable2.c argtable2.h getopt.c getopt.h getopt1.c ) +@@ -7,5 +6,9 @@ ELSE( WIN32 ) + ADD_LIBRARY( argtable2 arg_date.c arg_dbl.c arg_end.c arg_file.c arg_int.c arg_lit.c arg_rem.c arg_rex.c arg_str.c argtable2.c argtable2.h getopt.c getopt.h getopt1.c ) + ENDIF( WIN32 ) + +-INSTALL( TARGETS argtable2 ARCHIVE DESTINATION lib) +-SET_TARGET_PROPERTIES( argtable2 PROPERTIES DEBUG_POSTFIX d ) +\ No newline at end of file ++INSTALL(TARGETS argtable2 ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++) ++INSTALL(FILES argtable2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/ports/argtable2/portfile.cmake b/ports/argtable2/portfile.cmake new file mode 100644 index 00000000000..6123335ab51 --- /dev/null +++ b/ports/argtable2/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/argtable2-13) +vcpkg_download_distfile(ARCHIVE + URLS "http://prdownloads.sourceforge.net/argtable/argtable2-13.tar.gz" + FILENAME "argtable-2.13.zip" + SHA512 3d8303f3ba529e3241d918c0127a16402ece951efb964d14a06a3a7d29a252812ad3c44e96da28798871e9923e73a2cfe7ebc84139c1397817d632cae25c4585 +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install-dirs.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # Due to missing dllexport flags we export all symbols + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE + -DCMAKE_DEBUG_POSTFIX=d +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Remove duplicate include installs +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/argtable2 RENAME copyright) diff --git a/ports/arrow/CONTROL b/ports/arrow/CONTROL index 000b8a6d62e..dd7bea53c07 100644 --- a/ports/arrow/CONTROL +++ b/ports/arrow/CONTROL @@ -1,4 +1,4 @@ Source: arrow -Version: 0.6.0-1 +Version: 0.9.0-1 Build-Depends: boost-system, boost-filesystem, boost-multiprecision, boost-algorithm, 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 index 6e0d175c31f..bb67ec13ffd 100644 --- a/ports/arrow/all.patch +++ b/ports/arrow/all.patch @@ -1,51 +1,91 @@ -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)) +diff --git a/cpp/cmake_modules/FindBrotli.cmake b/cpp/cmake_modules/FindBrotli.cmake +index ea971f0..3e98ede 100644 +--- a/cpp/cmake_modules/FindBrotli.cmake ++++ b/cpp/cmake_modules/FindBrotli.cmake +@@ -43,53 +43,31 @@ find_path( BROTLI_INCLUDE_DIR NAMES brotli/decode.h + NO_DEFAULT_PATH + PATH_SUFFIXES "include" ) + +-find_library( BROTLI_LIBRARY_ENC NAMES libbrotlienc.a libbrotlienc-static.a brotlienc ++find_library( BROTLI_LIBRARY_ENC NAMES libbrotlienc libbrotlienc-static brotlienc brotlienc-static + PATHS ${_brotli_roots} + NO_DEFAULT_PATH + PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib" ) + +-find_library( BROTLI_LIBRARY_DEC NAMES libbrotlidec.a libbrotlidec-static.a brotlidec ++find_library( BROTLI_LIBRARY_DEC NAMES libbrotlidec libbrotlidec-static brotlidec brotlidec-static + PATHS ${_brotli_roots} + NO_DEFAULT_PATH + PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib" ) + +-find_library( BROTLI_LIBRARY_COMMON NAMES libbrotlicommon.a libbrotlicommon-static.a brotlicommon ++find_library( BROTLI_LIBRARY_COMMON NAMES libbrotlicommon libbrotlicommon-static brotlicommon brotlicommon-static + PATHS ${_brotli_roots} + NO_DEFAULT_PATH + PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib" ) + + set(BROTLI_LIBRARIES ${BROTLI_LIBRARY_ENC} ${BROTLI_LIBRARY_DEC} + ${BROTLI_LIBRARY_COMMON}) +- ++ + 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) +- get_filename_component( BROTLI_LIBS ${BROTLI_LIBRARY_ENC} PATH ) +- set(BROTLI_LIB_NAME brotli) +- if (BROTLI_MSVC_STATIC_LIB_SUFFIX) +- set(BROTLI_STATIC_LIB_SUFFIX "${BROTLI_MSVC_STATIC_LIB_SUFFIX}") - 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 +- if (NOT BROTLI_STATIC_LIB_SUFFIX) +- if (EXISTS "${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc-static${CMAKE_STATIC_LIBRARY_SUFFIX}") +- set(BROTLI_STATIC_LIB_SUFFIX -static) +- else() +- if (MSVC) +- set(BROTLI_STATIC_LIB_SUFFIX _static) +- else() +- set(BROTLI_STATIC_LIB_SUFFIX "") +- endif() +- endif() +- endif() +- set(BROTLI_STATIC_LIB +- ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc${BROTLI_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX} +- ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}dec${BROTLI_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX} +- ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}common${BROTLI_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) +- set(BROTLI_STATIC_LIBRARY_ENC ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc${BROTLI_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) +- set(BROTLI_STATIC_LIBRARY_DEC ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}dec${BROTLI_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) +- set(BROTLI_STATIC_LIBRARY_COMMON ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}common${BROTLI_STATIC_LIB_SUFFIX}${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} +- ${BROTLI_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${BROTLI_LIB_NAME}common${CMAKE_SHARED_LIBRARY_SUFFIX}) ++ set(BROTLI_STATIC_LIB ${BROTLI_LIBRARIES}) ++ set(BROTLI_STATIC_LIBRARY_ENC ${BROTLI_LIBRARY_ENC}) ++ set(BROTLI_STATIC_LIBRARY_DEC ${BROTLI_LIBRARY_DEC}) ++ set(BROTLI_STATIC_LIBRARY_COMMON ${BROTLI_LIBRARY_COMMON}) ++ set(BROTLI_SHARED_LIB ${BROTLI_LIBRARIES}) + else () + set(BROTLI_FOUND FALSE) + endif () +diff --git a/cpp/cmake_modules/FindFlatbuffers.cmake b/cpp/cmake_modules/FindFlatbuffers.cmake +index 804f479..baac84e 100644 +--- a/cpp/cmake_modules/FindFlatbuffers.cmake ++++ b/cpp/cmake_modules/FindFlatbuffers.cmake @@ -53,6 +53,7 @@ endif () find_program(FLATBUFFERS_COMPILER flatc "${FLATBUFFERS_HOME}/bin" -+ "${FLATBUFFERS_HOME}/tools" ++ "${FLATBUFFERS_HOME}/tools/flatbuffers" /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 ) +diff --git a/cpp/cmake_modules/FindLz4.cmake b/cpp/cmake_modules/FindLz4.cmake +index 3a89c8d..3157197 100644 +--- a/cpp/cmake_modules/FindLz4.cmake ++++ b/cpp/cmake_modules/FindLz4.cmake +@@ -29,21 +29,11 @@ elseif ( Lz4_HOME ) list( APPEND _lz4_roots ${Lz4_HOME} ) endif() --if (MSVC AND NOT LZ4_MSVC_STATIC_LIB_SUFFIX) +-if (MSVC AND NOT DEFINED LZ4_MSVC_STATIC_LIB_SUFFIX) - set(LZ4_MSVC_STATIC_LIB_SUFFIX "_static") -endif() - @@ -54,14 +94,20 @@ index 07707cf..9cbf67d 100644 - -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 + NO_DEFAULT_PATH + PATH_SUFFIXES "include" ) +-find_library(LZ4_STATIC_LIB NAMES ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} ++find_library(LZ4_STATIC_LIB NAMES lz4 liblz4 + PATHS ${_lz4_roots} + NO_DEFAULT_PATH + PATH_SUFFIXES "lib" ) +diff --git a/cpp/cmake_modules/FindSnappy.cmake b/cpp/cmake_modules/FindSnappy.cmake index 867963c..8a432db 100644 ---- a/cmake_modules/FindSnappy.cmake -+++ b/cmake_modules/FindSnappy.cmake +--- a/cpp/cmake_modules/FindSnappy.cmake ++++ b/cpp/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}) @@ -71,60 +117,31 @@ index 867963c..8a432db 100644 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)) +diff --git a/cpp/cmake_modules/FindZLIB.cmake b/cpp/cmake_modules/FindZLIB.cmake +index 78b84f2..56cc887 100644 +--- a/cpp/cmake_modules/FindZLIB.cmake ++++ b/cpp/cmake_modules/FindZLIB.cmake +@@ -61,9 +61,7 @@ if (ZLIB_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR ZLIB_LIBRARIES)) + set(ZLIB_HEADER ${ZLIB_INCLUDE_DIR}/${ZLIB_HEADER_NAME}) set(ZLIB_LIB_NAME z) if (MSVC) - if (NOT ZLIB_MSVC_STATIC_LIB_SUFFIX) +- if (NOT ZLIB_MSVC_STATIC_LIB_SUFFIX) - set(ZLIB_MSVC_STATIC_LIB_SUFFIX libstatic) -+ set(ZLIB_MSVC_STATIC_LIB_SUFFIX lib) - endif() +- endif() ++ set(ZLIB_MSVC_STATIC_LIB_SUFFIX lib) 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 + set(ZLIB_STATIC_LIB ${ZLIB_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${ZLIB_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) +diff --git a/cpp/cmake_modules/FindZSTD.cmake b/cpp/cmake_modules/FindZSTD.cmake +index 810e5c0..b483471 100644 +--- a/cpp/cmake_modules/FindZSTD.cmake ++++ b/cpp/cmake_modules/FindZSTD.cmake +@@ -43,7 +43,7 @@ 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 ++find_library(ZSTD_STATIC_LIB NAMES zstd ${ZSTD_STATIC_LIB_NAME} lib${ZSTD_STATIC_LIB_NAME} 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 a462d3e9b23..4bd745ebf5e 100644 --- a/ports/arrow/portfile.cmake +++ b/ports/arrow/portfile.cmake @@ -7,20 +7,19 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/arrow - REF apache-arrow-0.6.0 - SHA512 c0e89b959dfe75e895a3427edd4eee663be5ee542e9ea13f7311d0775fe7a00188eafa07ba524e3d3c0a71fc8e11213f10fe4ebfdf451754816062249ffa7f3d + REF apache-arrow-0.9.0 + SHA512 789d0948eee3af20eb922e09c14eb721f20fa041ca3c0cf57bd869718fc9919b45590bd72714efafdf19196f35abb6bdbe0a3972ca74fcc2af92c1f9ade8fa00 HEAD_REF master ) set(CPP_SOURCE_PATH "${SOURCE_PATH}/cpp") vcpkg_apply_patches( - SOURCE_PATH ${CPP_SOURCE_PATH} + SOURCE_PATH ${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) diff --git a/ports/asio/CONTROL b/ports/asio/CONTROL index ec8ab41a879..295b01db8ea 100644 --- a/ports/asio/CONTROL +++ b/ports/asio/CONTROL @@ -1,3 +1,3 @@ Source: asio -Version: 1.12.0-2 +Version: 1.12.1-1 Description: Asio is a cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach. diff --git a/ports/asio/portfile.cmake b/ports/asio/portfile.cmake index 284e2530086..60d329ed81c 100644 --- a/ports/asio/portfile.cmake +++ b/ports/asio/portfile.cmake @@ -4,14 +4,13 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO chriskohlhoff/asio - REF asio-1-12-0 - SHA512 a0e341fd6a848784e1533df84d1e6b361c8468f59d4fbde68c1500c1f8a2124ad78db0169098dbbc594ce26717eb9760f37af13cb288a549e2bda563eecf2be3 + REF asio-1-12-1 + SHA512 e335eea05c27a72faae95dd5d5ca997ac8bb144cd5fb68e5538129ea6afb3b4d88e2be1c31a1effdbbbe4c93e07ee274a7e5817453c29faf56abf9ab692b2dd6 HEAD_REF master ) # Handle copyright -file(COPY ${SOURCE_PATH}/asio/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) +file(INSTALL ${SOURCE_PATH}/asio/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) # Copy the asio header files file(INSTALL ${SOURCE_PATH}/asio/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp" PATTERN "*.ipp") diff --git a/ports/asmjit/CONTROL b/ports/asmjit/CONTROL index 37e16b63a86..f4a9931f851 100644 --- a/ports/asmjit/CONTROL +++ b/ports/asmjit/CONTROL @@ -1,3 +1,3 @@ Source: asmjit -Version: 673dcefaa048c5f5a2bf8b85daf8f7b9978d018a +Version: 2018-11-08 Description: Complete x86/x64 JIT and Remote Assembler for C++ diff --git a/ports/asmjit/portfile.cmake b/ports/asmjit/portfile.cmake index 3efe1e0258e..5d2e7b230ac 100644 --- a/ports/asmjit/portfile.cmake +++ b/ports/asmjit/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO asmjit/asmjit - REF 673dcefaa048c5f5a2bf8b85daf8f7b9978d018a - SHA512 f3cf4b603424ec0bf7e00463ad94e157bd549265730be66e5e29af31182ca3a6a318ff4c1b1d0fcd2595163df51ad6d34041583b8cbe73be1155562739c25555 + REF 771d66b301e60ebc3ffa69b11765622c547df6ab + SHA512 02ae822a33d50810fc0833b647bd6c29851b147ae4e388fd29d54567e6ed928173b961d3f3f323b243719092c2947bd6f374bc5d6051817e8153688868473830 HEAD_REF master ) diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL index a2cb8e7808d..fc52411f91d 100644 --- a/ports/assimp/CONTROL +++ b/ports/assimp/CONTROL @@ -1,4 +1,4 @@ Source: assimp -Version: 4.1.0-1 +Version: 4.1.0-3 Description: The Open Asset import library -Build-Depends: zlib +Build-Depends: zlib, rapidjson diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index 6d4a7ec1dff..ecca8727777 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -6,26 +6,33 @@ vcpkg_from_github( REF v4.1.0 SHA512 5f1292de873ae16c9921d1d44f2871474d74c0ddfd76cc928a7d9b3e03aa6eca4cc72af0513da20a86d09c55d48646e610fd4a4f2b05364f08ad09cf27cbc67a HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - "${CMAKE_CURRENT_LIST_DIR}/dont-overwrite-prefix-path.patch" - "${CMAKE_CURRENT_LIST_DIR}/uninitialized-variable.patch" + dont-overwrite-prefix-path.patch + uninitialized-variable.patch ) file(REMOVE ${SOURCE_PATH}/cmake-modules/FindZLIB.cmake) +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/zlib ${SOURCE_PATH}/contrib/gtest ${SOURCE_PATH}/contrib/rapidjson) + set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS") set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DASSIMP_BUILD_TESTS=OFF -DASSIMP_BUILD_ASSIMP_VIEW=OFF -DASSIMP_BUILD_ZLIB=OFF -DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_INSTALL_PDB=OFF + -DZLIB_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DZLIB_FOUND=1 + OPTIONS_RELEASE + -DZLIB_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/zlib.lib + -DZLIB_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/zlib.lib + OPTIONS_DEBUG + -DZLIB_LIBRARIES=${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib + -DZLIB_LIBRARY=${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib ) vcpkg_install_cmake() @@ -40,10 +47,8 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(READ ${CURRENT_PACKAGES_DIR}/share/assimp/assimp-config.cmake ASSIMP_CONFIG) string(REPLACE "get_filename_component(ASSIMP_ROOT_DIR \"\${_PREFIX}\" PATH)" "set(ASSIMP_ROOT_DIR \${_PREFIX})" ASSIMP_CONFIG ${ASSIMP_CONFIG}) -string(REPLACE "assimp\${ASSIMP_LIBRARY_SUFFIX}" - "assimp\${ASSIMP_LIBRARY_SUFFIX}.lib" ASSIMP_CONFIG ${ASSIMP_CONFIG}) string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})" - "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES})" ASSIMP_CONFIG ${ASSIMP_CONFIG}) + "set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES}.lib debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/\${ASSIMP_LIBRARIES}d.lib)" ASSIMP_CONFIG ${ASSIMP_CONFIG}) file(WRITE ${CURRENT_PACKAGES_DIR}/share/assimp/assimp-config.cmake "${ASSIMP_CONFIG}") # Handle copyright diff --git a/ports/asyncplusplus/CONTROL b/ports/asyncplusplus/CONTROL new file mode 100644 index 00000000000..eb82afe70fe --- /dev/null +++ b/ports/asyncplusplus/CONTROL @@ -0,0 +1,3 @@ +Source: asyncplusplus +Version: 1.0-1 +Description: Async++ is a lightweight concurrency framework for C++11 diff --git a/ports/asyncplusplus/portfile.cmake b/ports/asyncplusplus/portfile.cmake new file mode 100644 index 00000000000..d348dc83e92 --- /dev/null +++ b/ports/asyncplusplus/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Amanieu/asyncplusplus + REF v1.0 + SHA512 bb1fc032d2d8de49b4505e0629d48e5cfa99edfcafbf17848f160ceb320bcd993f1549095248d1a0ef8fc1ec07ecbaad6b634a770ddc1974092d373a508a5fe3 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/Async++.cmake ${CURRENT_PACKAGES_DIR}/cmake/Async++Targets.cmake) + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/async++) + +file(RENAME ${CURRENT_PACKAGES_DIR}/share/async++/Async++Targets.cmake ${CURRENT_PACKAGES_DIR}/share/async++/Async++.cmake) + +file(READ ${CURRENT_PACKAGES_DIR}/share/async++/Async++Config.cmake _contents) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/async++/Async++Config.cmake "include(CMakeFindDependencyMacro)\n${_contents}") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/asyncplusplus) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/asyncplusplus/LICENSE ${CURRENT_PACKAGES_DIR}/share/asyncplusplus/copyright) + +vcpkg_test_cmake(PACKAGE_NAME Async++) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index fbc86b58f5d..18d0bbaa936 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,8 +1,8 @@ Source: aws-sdk-cpp -Version: 1.4.33 +Version: 1.6.47 Description: AWS SDK for C++ Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows) -Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs +Default-Features: dynamodb, s3, kinesis # Automatically generated by generateFeatures.ps1 Feature: access-management diff --git a/ports/aws-sdk-cpp/CONTROL.in b/ports/aws-sdk-cpp/CONTROL.in index 184374de607..13b206bfabd 100644 --- a/ports/aws-sdk-cpp/CONTROL.in +++ b/ports/aws-sdk-cpp/CONTROL.in @@ -2,4 +2,4 @@ Source: aws-sdk-cpp Version: 1.4.30-1 Description: AWS SDK for C++ Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows) -Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs +Default-Features: dynamodb, s3, kinesis diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 815926ddd17..a7b1b6a6803 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.4.33 - SHA512 ebe8e402107b7b70a9b397c94ad981ff02d97e10e6fd8337f19b732185ecbb79e132eecd513300ce733a765fd780dd765c1d2b34479e5e1d891fa771722bad81 + REF 1.6.47 + SHA512 84d8ec8672f5de97735587aa25af410e77a4e827648379ab9683911133c2a05517e0a435fa1b8e0931cae8aa8f0e74500fa8ed8e75d493171919dfcc665bbf1c HEAD_REF master ) diff --git a/ports/azure-c-shared-utility/CONTROL b/ports/azure-c-shared-utility/CONTROL index 08fecee673b..c5e51adaf08 100644 --- a/ports/azure-c-shared-utility/CONTROL +++ b/ports/azure-c-shared-utility/CONTROL @@ -1,3 +1,4 @@ Source: azure-c-shared-utility -Version: 1.1.3 +Version: 1.1.11-1 Description: Azure C SDKs common code +Build-Depends: curl (linux), openssl (linux) diff --git a/ports/azure-c-shared-utility/portfile.cmake b/ports/azure-c-shared-utility/portfile.cmake index 6b706aae3a8..838528ce4b4 100644 --- a/ports/azure-c-shared-utility/portfile.cmake +++ b/ports/azure-c-shared-utility/portfile.cmake @@ -1,20 +1,15 @@ include(vcpkg_common_functions) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - message("azure-c-shared-utility only supports static linkage") - set(VCPKG_LIBRARY_LINKAGE "static") -endif() +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-c-shared-utility - REF 1.1.3 - SHA512 8c69f39ccca30d11a7e665a46e3ec33826af062657a87d32f68e80c6182b15d5e02839f9e541f5dc840219e3256ac090452f4873b6a1a62b3fe6682780314056 + REF bcf6393b1ce3cecf0fcdf8988621fd6e4d414df3 + SHA512 e5ae3c895777df90e725da7686939b46fa4df19ce5626bbe13a5aaf1b844ee56c96ddf2a9ad8426a96cdc34e8be338c95b6759e618143e19445c5180fb0f7ed1 HEAD_REF master ) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_AS_DYNAMIC) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -22,7 +17,7 @@ vcpkg_configure_cmake( -Dskip_samples=ON -Duse_installed_dependencies=ON -Duse_default_uuid=ON - -Dbuild_as_dynamic=${BUILD_AS_DYNAMIC} + -Dbuild_as_dynamic=OFF ) vcpkg_install_cmake() @@ -33,8 +28,6 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR file(COPY ${SOURCE_PATH}/configs/azure_iot_build_rules.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-c-shared-utility) -file(INSTALL - ${SOURCE_PATH}/LICENSE - DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-c-shared-utility RENAME copyright) +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-c-shared-utility/copyright COPYONLY) vcpkg_copy_pdbs() diff --git a/ports/azure-iot-sdk-c/CONTROL b/ports/azure-iot-sdk-c/CONTROL index a706b195c9d..9c9410bfef7 100644 --- a/ports/azure-iot-sdk-c/CONTROL +++ b/ports/azure-iot-sdk-c/CONTROL @@ -1,4 +1,4 @@ Source: azure-iot-sdk-c -Version: 1.2.3 +Version: 1.2.11-1 Build-Depends: azure-uamqp-c, azure-umqtt-c, azure-c-shared-utility, parson Description: A C99 SDK for connecting devices to Microsoft Azure IoT services diff --git a/ports/azure-iot-sdk-c/improve-external-deps-2.patch b/ports/azure-iot-sdk-c/improve-external-deps-2.patch deleted file mode 100644 index 04795fa1f25..00000000000 --- a/ports/azure-iot-sdk-c/improve-external-deps-2.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index aa2dfad..f1656ea 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -129,15 +129,6 @@ endif() - #Use solution folders. - set_property(GLOBAL PROPERTY USE_FOLDERS ON) - --# build the parson library for json parsing --add_library(parson -- ./deps/parson/parson.c -- ./deps/parson/parson.h --) --if(MSVC) -- set_source_files_properties(../deps/parson/parson.c PROPERTIES COMPILE_FLAGS "/wd4244 /wd4232") --endif() -- - if(IN_OPENWRT) - ADD_DEFINITIONS("$ENV{TARGET_LDFLAGS}" "$ENV{TARGET_CPPFLAGS}" "$ENV{TARGET_CFLAGS}") - INCLUDE_DIRECTORIES("$ENV{TOOLCHAIN_DIR}/usr/include" "$ENV{TARGET_LDFLAGS}" "$ENV{TARGET_CPPFLAGS}" "$ENV{TARGET_CFLAGS}") diff --git a/ports/azure-iot-sdk-c/improve-external-deps.patch b/ports/azure-iot-sdk-c/improve-external-deps.patch index d96e0fe3866..171964bafc5 100644 --- a/ports/azure-iot-sdk-c/improve-external-deps.patch +++ b/ports/azure-iot-sdk-c/improve-external-deps.patch @@ -1,3 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a8011fb..9fc05c7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -155,17 +155,6 @@ endif() + # Use solution folders. + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +-# build the parson library for json parsing +-add_library(parson +- ./deps/parson/parson.c +- ./deps/parson/parson.h +-) +-if (MSVC) +- set_source_files_properties(../deps/parson/parson.c PROPERTIES COMPILE_FLAGS "/wd4244 /wd4232") +-endif() +-set(parson_h_install_files ./deps/parson/parson.h) +-set(parson_install_libs parson) +- + if (IN_OPENWRT) + ADD_DEFINITIONS("$ENV{TARGET_LDFLAGS}" "$ENV{TARGET_CPPFLAGS}" "$ENV{TARGET_CFLAGS}") + INCLUDE_DIRECTORIES("$ENV{TOOLCHAIN_DIR}/usr/include" "$ENV{TARGET_LDFLAGS}" "$ENV{TARGET_CPPFLAGS}" "$ENV{TARGET_CFLAGS}") diff --git a/configs/azure_iot_sdksConfig.cmake b/configs/azure_iot_sdksConfig.cmake index b9c62e8..edf5847 100644 --- a/configs/azure_iot_sdksConfig.cmake @@ -14,16 +36,17 @@ index b9c62e8..edf5847 100644 include("${CMAKE_CURRENT_LIST_DIR}/azure_iot_sdksTargets.cmake") diff --git a/dependencies.cmake b/dependencies.cmake -index 063733a..71bfc7d 100644 +index fd06df6..c0e06fa 100644 --- a/dependencies.cmake +++ b/dependencies.cmake -@@ -18,6 +18,8 @@ if(${use_installed_dependencies}) - endif() - endif() +@@ -18,6 +18,9 @@ if(${use_installed_dependencies}) + endif () + endif () + find_package(unofficial-parson REQUIRED) + link_libraries(unofficial::parson::parson) - else() ++ + else () add_subdirectory(c-utility) diff --git a/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt b/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt @@ -78,10 +101,10 @@ index d05d654..5872c8d 100644 ) diff --git a/iothub_service_client/CMakeLists.txt b/iothub_service_client/CMakeLists.txt -index 11a9a9a..4097293 100644 +index e47473e..b073513 100644 --- a/iothub_service_client/CMakeLists.txt +++ b/iothub_service_client/CMakeLists.txt -@@ -72,9 +72,7 @@ endif() +@@ -81,9 +81,7 @@ endif() setSdkTargetBuildProperties(iothub_service_client) if(NOT ${nuget_e2e_tests}) diff --git a/ports/azure-iot-sdk-c/portfile.cmake b/ports/azure-iot-sdk-c/portfile.cmake index 0abffcb0f59..6ec8ba3eb7b 100644 --- a/ports/azure-iot-sdk-c/portfile.cmake +++ b/ports/azure-iot-sdk-c/portfile.cmake @@ -1,29 +1,18 @@ include(vcpkg_common_functions) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - message("azure-iot-sdk-c only supports static linkage") - set(VCPKG_LIBRARY_LINKAGE "static") -endif() +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-iot-sdk-c - REF 1.2.3 - SHA512 6192d454bb2ecb01989f7636751acd6919021b55b772f4ea25a6d0ddd263e7f988275f7fb0b1c304d4ebd30418c9f870eb1c504a4a504f2faeb712ef8e669d5a + REF acff8b1677150cb165a7b111745144cf8fab76cc + SHA512 7e7e0679d48e76539a607a593b1c9ccc57eeb4f8bf33fb49051ad99203d1568f0ac2a38fe32ba0b3670cea32a2318e8c135c709ba5712f95cd8005ff21572e28 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/improve-external-deps.patch - ${CMAKE_CURRENT_LIST_DIR}/improve-external-deps-2.patch + PATCHES improve-external-deps.patch ) file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/azure-c-shared-utility/configs/) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_AS_DYNAMIC) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -31,7 +20,7 @@ vcpkg_configure_cmake( -Dskip_samples=ON -Duse_installed_dependencies=ON -Duse_default_uuid=ON - -Dbuild_as_dynamic=${BUILD_AS_DYNAMIC} + -Dbuild_as_dynamic=OFF ) vcpkg_install_cmake() @@ -40,8 +29,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/azure_iot_sdks) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL - ${SOURCE_PATH}/LICENSE - DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-iot-sdk-c RENAME copyright) +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-iot-sdk-c/copyright COPYONLY) vcpkg_copy_pdbs() diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL index c68552bba32..d6e0080db0b 100644 --- a/ports/azure-storage-cpp/CONTROL +++ b/ports/azure-storage-cpp/CONTROL @@ -1,5 +1,5 @@ Source: azure-storage-cpp -Version: 3.2.1 -Build-Depends: cpprestsdk, atlmfc (windows), boost-log (!windows&!uwp), boost-locale (!windows&!uwp), glibmm (!windows&!uwp), libxmlpp (!windows&!uwp), libuuid (!windows&!uwp) +Version: 5.2.0 +Build-Depends: cpprestsdk[core], atlmfc (windows), boost-log (!windows&!uwp), boost-locale (!windows&!uwp), libxml2 (!windows&!uwp), libuuid (!windows&!uwp) 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/ diff --git a/ports/azure-storage-cpp/cmake.patch b/ports/azure-storage-cpp/cmake.patch deleted file mode 100644 index 96fdace2d9a..00000000000 --- a/ports/azure-storage-cpp/cmake.patch +++ /dev/null @@ -1,169 +0,0 @@ -diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -index 07878c2..8d1c47e 100644 ---- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt -+++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -@@ -51,20 +51,25 @@ if(UNIX) - find_package(UnitTest++ REQUIRED) - endif() - -- option(BUILD_SHARED_LIBS "Build shared Libraries." ON) - -- file(GLOB WAS_HEADERS includes/was/*.h) -- install(FILES ${WAS_HEADERS} DESTINATION include/was) -- file(GLOB WASCORE_HEADERS includes/wascore/*.h) -- install(FILES ${WASCORE_HEADERS} DESTINATION include/wascore) -- file(GLOB WASCORE_DATA includes/wascore/*.dat) -- install(FILES ${WASCORE_DATA} DESTINATION include/wascore) -+elseif(WIN32) -+ message("-- Setting WIN32 options") -+ find_package(Casablanca REQUIRED) -+ add_definitions(-DUNICODE -D_UNICODE -D_WIN32) - else() - message("-- Unsupported Build Platform.") - endif() - -+option(BUILD_SHARED_LIBS "Build shared Libraries." ON) -+option(WASTORE_INSTALL_HEADERS "Install header files." ON) -+if(WASTORE_INSTALL_HEADERS) -+ file(GLOB WAS_HEADERS includes/was/*.h) -+ file(GLOB WASCORE_HEADERS includes/wascore/basic_types.h includes/wascore/constants.h) -+ file(GLOB WASCORE_DATA includes/wascore/*.dat) -+endif() -+ - # Compiler (not platform) specific settings --if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") -+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") - message("-- Setting gcc options") - - set(WARNINGS "-Wall -Wextra -Wunused-parameter -Wcast-align -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls -Wunreachable-code") -@@ -81,22 +86,29 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") - add_definitions(-DBOOST_LOG_DYN_LINK) - endif() - add_definitions(-D_TURN_OFF_PLATFORM_STRING) --elseif((CMAKE_CXX_COMPILER_ID MATCHES "Clang")) -- message("-- Setting clang options") -+elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") -+ message("-- Setting clang options") - -- set(WARNINGS "-Wall -Wextra -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls") -- set(OSX_SUPPRESSIONS "-Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-reorder -Wno-unused-local-typedefs") -- set(WARNINGS "${WARNINGS} ${OSX_SUPPRESSIONS}") -+ set(WARNINGS "-Wall -Wextra -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls") -+ set(OSX_SUPPRESSIONS "-Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-reorder -Wno-unused-local-typedefs") -+ set(WARNINGS "${WARNINGS} ${OSX_SUPPRESSIONS}") - -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration") -- set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") -- set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration") -+ set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") -+ set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11") - -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing") -- if (BUILD_SHARED_LIBS) -- add_definitions(-DBOOST_LOG_DYN_LINK) -- endif() -- add_definitions(-D_TURN_OFF_PLATFORM_STRING) -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing") -+ if (BUILD_SHARED_LIBS) -+ add_definitions(-DBOOST_LOG_DYN_LINK) -+ endif() -+ add_definitions(-D_TURN_OFF_PLATFORM_STRING) -+elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") -+ message("-- Setting MSVC options") -+ add_compile_options(/bigobj) -+ add_compile_options(/MP) -+ if(BUILD_SHARED_LIBS) -+ add_definitions(-DWASTORAGE_DLL -D_USRDLL) -+ endif() - else() - message("-- Unknown compiler, success is doubtful.") - endif() -@@ -109,7 +121,6 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) - set(AZURESTORAGE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/includes) - set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${LibXML++_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${Glibmm_INCLUDE_DIRS}) - -- - set(AZURESTORAGE_LIBRARY azurestorage) - set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARIES} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${LibXML++_LIBRARIES} ${UUID_LIBRARIES} ${Glibmm_LIBRARIES}) - -diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake -index 5c1df3c..da66eb4 100644 ---- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake -+++ b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake -@@ -27,6 +27,7 @@ find_path(CASABLANCA_INCLUDE_DIR - find_library(CASABLANCA_LIBRARY - NAMES - cpprest -+ cpprest_2_9.lib - PATHS - ${CASABLANCA_PKGCONF_LIBRARY_DIRS} - ${CASABLANCA_DIR} -diff --git a/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt -index b08111f..74ba2fb 100644 ---- a/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt -+++ b/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt -@@ -2,7 +2,7 @@ include_directories(${Boost_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR}) - include_directories(${AZURESTORAGE_INCLUDE_DIRS}) - - # THE ORDER OF FILES IS VERY /VERY/ IMPORTANT --if(UNIX) -+if(UNIX OR WIN32) - set(SOURCES - xmlhelpers.cpp - response_parsers.cpp -@@ -64,24 +64,46 @@ if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") - endif() - if (APPLE) -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS}") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS}") - else() -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") -+endif() -+ -+if(MSVC) -+ add_compile_options(/Yustdafx.h) -+ set_source_files_properties(stdafx.cpp PROPERTIES COMPILE_FLAGS "/Ycstdafx.h") -+ -+ if (NOT CMAKE_GENERATOR MATCHES "Visual Studio .*") -+ set_property(SOURCE stdafx.cpp APPEND PROPERTY OBJECT_OUTPUTS "${CMAKE_CURRENT_BINARY_DIR}/stdafx.pch") -+ set_property(SOURCE ${SOURCES} APPEND PROPERTY OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/stdafx.pch") -+ endif() -+ -+ list(APPEND SOURCES stdafx.cpp) - endif() - - add_library(${AZURESTORAGE_LIBRARY} ${SOURCES}) - - target_link_libraries(${AZURESTORAGE_LIBRARIES}) -+if(WIN32) -+ target_link_libraries(${AZURESTORAGE_LIBRARY} Ws2_32.lib rpcrt4.lib xmllite.lib bcrypt.lib) -+endif() - - # Portions specific to azure storage binary versioning and installation. - if(UNIX) - set_target_properties(${AZURESTORAGE_LIBRARY} PROPERTIES - SOVERSION ${AZURESTORAGE_VERSION_MAJOR} - VERSION ${AZURESTORAGE_VERSION_MAJOR}.${AZURESTORAGE_VERSION_MINOR}) -- -- install( -- TARGETS ${AZURESTORAGE_LIBRARY} -- LIBRARY DESTINATION lib -- ARCHIVE DESTINATION lib -- ) -+elseif(WIN32) -+ set_target_properties(${AZURESTORAGE_LIBRARY} PROPERTIES OUTPUT_NAME "wastorage") - endif() -+ -+install(FILES ${WAS_HEADERS} DESTINATION include/was) -+install(FILES ${WASCORE_HEADERS} DESTINATION include/wascore) -+install(FILES ${WASCORE_DATA} DESTINATION include/wascore) -+ -+install( -+ TARGETS ${AZURESTORAGE_LIBRARY} -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib -+) diff --git a/ports/azure-storage-cpp/glibmm-cmake.patch b/ports/azure-storage-cpp/glibmm-cmake.patch deleted file mode 100644 index 4d3e4a8cd8e..00000000000 --- a/ports/azure-storage-cpp/glibmm-cmake.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindGlibmm.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindGlibmm.cmake -index 79a4bcb..fe130bd 100644 ---- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindGlibmm.cmake -+++ b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindGlibmm.cmake -@@ -36,7 +36,7 @@ find_path(GlibmmConfig_INCLUDE_DIR - ) - - find_library(Glibmm_LIBRARY -- NAMES glibmm-2.4 -+ NAMES glibmm glibmm-2.4 - PATHS - ${Glibmm_PKGCONF_LIBRARY_DIRS} - /usr diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake index 56dbc2ca312..97f27ccee86 100644 --- a/ports/azure-storage-cpp/portfile.cmake +++ b/ports/azure-storage-cpp/portfile.cmake @@ -7,14 +7,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-storage-cpp - REF v3.2.1 - SHA512 8d1e8de439e52f53eb28b77e8adf394468f4861c2c4c1f79ec1437c72e3fc0bc871e4e2662ee58090748915b0f12ce6736a7cc6ede619d332686b9fb6a026c9f + REF v5.2.0 + SHA512 345ddfcececc7b38e65dff96c971eadc41ce7255131f1bc9995dd8fed0c69cc3b48c6838152e30c57014bf2017bde0c819a09b7d6b4abaa089a7ae023633262e HEAD_REF master PATCHES - ${CMAKE_CURRENT_LIST_DIR}/cmake.patch - ${CMAKE_CURRENT_LIST_DIR}/static-builds.patch - ${CMAKE_CURRENT_LIST_DIR}/support-cpprest-findpackage.patch - ${CMAKE_CURRENT_LIST_DIR}/glibmm-cmake.patch ${CMAKE_CURRENT_LIST_DIR}/pplx-do-while.patch ) diff --git a/ports/azure-storage-cpp/static-builds.patch b/ports/azure-storage-cpp/static-builds.patch deleted file mode 100644 index 09b2f1077f0..00000000000 --- a/ports/azure-storage-cpp/static-builds.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -index 8d1c47e..3b4d1c0 100644 ---- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt -+++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -@@ -108,6 +108,8 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - add_compile_options(/MP) - if(BUILD_SHARED_LIBS) - add_definitions(-DWASTORAGE_DLL -D_USRDLL) -+ else() -+ add_definitions(-D_NO_WASTORAGE_API) - endif() - else() - message("-- Unknown compiler, success is doubtful.") diff --git a/ports/azure-storage-cpp/support-cpprest-findpackage.patch b/ports/azure-storage-cpp/support-cpprest-findpackage.patch deleted file mode 100644 index 5cd805208e0..00000000000 --- a/ports/azure-storage-cpp/support-cpprest-findpackage.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -index 3b4d1c0..d8818ac 100644 ---- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt -+++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -@@ -1,5 +1,5 @@ - set(CMAKE_LEGACY_CYGWIN_WIN32 0) --cmake_minimum_required(VERSION 2.6) -+cmake_minimum_required(VERSION 3.8) - project(azurestorage) - - enable_testing() -diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake -index da66eb4..40e1767 100644 ---- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake -+++ b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake -@@ -23,6 +23,16 @@ find_path(CASABLANCA_INCLUDE_DIR - include - ) - -+find_package(cpprestsdk) -+ -+if(cpprestsdk_FOUND) -+ set(CASABLANCA_LIBRARY cpprestsdk::cpprest) -+ set(CASABLANCA_PROCESS_LIBS CASABLANCA_LIBRARY) -+ set(CASABLANCA_PROCESS_INCLUDES CASABLANCA_INCLUDE_DIR) -+ libfind_process(CASABLANCA) -+ return() -+endif() -+ - # Library - find_library(CASABLANCA_LIBRARY - NAMES diff --git a/ports/azure-uamqp-c/CONTROL b/ports/azure-uamqp-c/CONTROL index 098209ac9bc..8f5f63c082e 100644 --- a/ports/azure-uamqp-c/CONTROL +++ b/ports/azure-uamqp-c/CONTROL @@ -1,4 +1,4 @@ Source: azure-uamqp-c -Version: 1.2.3 +Version: 1.2.11-1 Build-Depends: azure-c-shared-utility Description: AMQP library for C diff --git a/ports/azure-uamqp-c/glob-headers.patch b/ports/azure-uamqp-c/glob-headers.patch deleted file mode 100644 index 245744f2b34..00000000000 --- a/ports/azure-uamqp-c/glob-headers.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index dbf79e5..aec44e5 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -74,7 +74,8 @@ if(WIN32) - include_directories($ENV{OpenSSLDir}/include) - endif() - --set(uamqp_h_files -+file(GLOB uamqp_h_files -+ ./inc/azure_uamqp_c/* - ./inc/azure_uamqp_c/amqp_definitions.h - ./inc/azure_uamqp_c/amqp_frame_codec.h - ./inc/azure_uamqp_c/amqp_management.h diff --git a/ports/azure-uamqp-c/portfile.cmake b/ports/azure-uamqp-c/portfile.cmake index c037010f1a6..0f759109958 100644 --- a/ports/azure-uamqp-c/portfile.cmake +++ b/ports/azure-uamqp-c/portfile.cmake @@ -1,31 +1,24 @@ include(vcpkg_common_functions) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - message("azure-uamqp-c only supports static linkage") - set(VCPKG_LIBRARY_LINKAGE "static") -endif() +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-uamqp-c - REF 1.2.3 - SHA512 18fc978517371fcb19e1c078f07d06b3bf8ec046c5cba955dd3cfe0a364d8775542acc970d81fa42384942ea4db7fb60d8939e80e90baf582c9d9e6ff0b577b5 + REF 075b5a669f49b9d3b68b7bf9b465fe92e1c740aa + SHA512 54b7c9ebdaca13d44634e99a064aac54e9eadaedcbed723aabc62c70414ef54d62c5f58ddc836e8020eba4ca0d03d27c2d73391d4071f973fda228866215ec58 HEAD_REF master ) -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/glob-headers.patch) - file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/azure-c-shared-utility/configs/) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_AS_DYNAMIC) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -Dskip_samples=ON -Duse_installed_dependencies=ON - -Dbuild_as_dynamic=${BUILD_AS_DYNAMIC} + -Dbuild_as_dynamic=OFF ) vcpkg_install_cmake() @@ -34,8 +27,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/uamqp) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL - ${SOURCE_PATH}/LICENSE - DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-uamqp-c RENAME copyright) +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-uamqp-c/copyright COPYONLY) vcpkg_copy_pdbs() diff --git a/ports/azure-uhttp-c/CONTROL b/ports/azure-uhttp-c/CONTROL index 3711a7dfef4..e4154368739 100644 --- a/ports/azure-uhttp-c/CONTROL +++ b/ports/azure-uhttp-c/CONTROL @@ -1,4 +1,4 @@ Source: azure-uhttp-c -Version: 2018-02-09 +Version: 1.1.11-2 Build-Depends: azure-c-shared-utility Description: Azure HTTP Library written in C diff --git a/ports/azure-uhttp-c/portfile.cmake b/ports/azure-uhttp-c/portfile.cmake index a04290ec182..de34ba4dddf 100644 --- a/ports/azure-uhttp-c/portfile.cmake +++ b/ports/azure-uhttp-c/portfile.cmake @@ -1,29 +1,24 @@ include(vcpkg_common_functions) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - message("azure-uhttp-c only supports static linkage") - set(VCPKG_LIBRARY_LINKAGE "static") -endif() +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-uhttp-c - REF 2018-02-09 - SHA512 0668be0f7624d021b6d24e81c21c606ab4a59990eb3d83fea6d2c6cf9ea3f2c6904ad021afcf9645c3c5f2238e9b83146f36522c662b0a2626d928cb4a0218ba + REF ed7d104c4ab96aaa68e429066953874f12be70eb + SHA512 512f8fd46dbc40ff79ffdbc2ea881a29aaa72db4c36f16f96f30a224220183e295d8e39a4965d788f92f4976fa6d37b197c04b32bbd187d456d5c5d516b95c9f HEAD_REF master ) file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/c-utility/configs/) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_AS_DYNAMIC) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -Dskip_samples=ON -Duse_installed_dependencies=ON - -Dbuild_as_dynamic=${BUILD_AS_DYNAMIC} + -Dbuild_as_dynamic=OFF -DCMAKE_INSTALL_INCLUDEDIR=include ) @@ -33,8 +28,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/uhttp) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL - ${SOURCE_PATH}/LICENSE - DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-uhttp-c RENAME copyright) +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-uhttp-c/copyright COPYONLY) vcpkg_copy_pdbs() diff --git a/ports/azure-umqtt-c/CONTROL b/ports/azure-umqtt-c/CONTROL index 68cfaaa05a9..9a5f5e030ff 100644 --- a/ports/azure-umqtt-c/CONTROL +++ b/ports/azure-umqtt-c/CONTROL @@ -1,4 +1,4 @@ Source: azure-umqtt-c -Version: 1.1.3 +Version: 1.1.11-1 Build-Depends: azure-c-shared-utility Description: General purpose library for communication over the mqtt protocol diff --git a/ports/azure-umqtt-c/portfile.cmake b/ports/azure-umqtt-c/portfile.cmake index f24e087bfff..cb14cfaa8ae 100644 --- a/ports/azure-umqtt-c/portfile.cmake +++ b/ports/azure-umqtt-c/portfile.cmake @@ -1,29 +1,24 @@ include(vcpkg_common_functions) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - message("azure-umqtt-c only supports static linkage") - set(VCPKG_LIBRARY_LINKAGE "static") -endif() +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-umqtt-c - REF 1.1.3 - SHA512 5c57fe40dce8166e1e138db45b642152a337dbbbc4d85998ac99b016627c0135b99bd7b189d249c6278837ef4af5ba4e4f964a9b65788acef37d7b37ae125b16 + REF ff05514c9b4742ae8d7785719a399a7fe6eac09b + SHA512 d750390d38555ab00e5d5cc5aa0b07ae452afd2e2af0dade5fc1c55f63ad367688b5ff7e97e65ab00f0153340b8bcc1e5039e80e5795b9f9c0cd2c48eedad081 HEAD_REF master ) file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/c-utility/configs/) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_AS_DYNAMIC) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -Dskip_samples=ON -Duse_installed_dependencies=ON - -Dbuild_as_dynamic=${BUILD_AS_DYNAMIC} + -Dbuild_as_dynamic=OFF ) vcpkg_install_cmake() @@ -32,8 +27,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/umqtt) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL - ${SOURCE_PATH}/LICENSE - DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-umqtt-c RENAME copyright) +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-umqtt-c/copyright COPYONLY) vcpkg_copy_pdbs() diff --git a/ports/bde/CONTROL b/ports/bde/CONTROL new file mode 100644 index 00000000000..129bf83499d --- /dev/null +++ b/ports/bde/CONTROL @@ -0,0 +1,3 @@ +Source: bde +Version: 3.2.0.0 +Description: Basic Development Environment - a set of foundational C++ libraries used at Bloomberg. diff --git a/ports/bde/portfile.cmake b/ports/bde/portfile.cmake new file mode 100644 index 00000000000..5c72156e131 --- /dev/null +++ b/ports/bde/portfile.cmake @@ -0,0 +1,141 @@ +include(vcpkg_common_functions) +set(BDE_VERSION 3.2.0.0) +set(BDE_TOOLS_VERSION 1.x) + +# Paths used in build +set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bde-${BDE_VERSION}) +set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bde-${BDE_VERSION}) + +# Acquire Python 2 and add it to PATH +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_EXE_PATH ${PYTHON2} DIRECTORY) + +# Acquire BDE Tools and add them to PATH +vcpkg_from_github( + OUT_SOURCE_PATH TOOLS_PATH + REPO "bloomberg/bde-tools" + REF d4b1a7670829228f4ec81ecdccc598ce03ae8e80 + SHA512 80af734c080adb225d5369157301ae0af18e02b1912351e34d23f5f2ba4e19f9ae2b5a367923f036330c9f9afd11a90cdf12680eb3e59b4297a312a1b713f17f + HEAD_REF master +) +message(STATUS "Configure bde-tools-v${BDE_TOOLS_VERSION}") +if(VCPKG_CMAKE_SYSTEM_NAME) + set(ENV{PATH} "$ENV{PATH}:${PYTHON2_EXE_PATH}") + set(ENV{PATH} "$ENV{PATH}:${TOOLS_PATH}/bin") +else() + set(ENV{PATH} "$ENV{PATH};${PYTHON2_EXE_PATH}") + set(ENV{PATH} "$ENV{PATH};${TOOLS_PATH}/bin") +endif() + +# Acquire BDE sources +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "bloomberg/bde" + REF 3720d132d0879f19b9084cca62ebc75f1f24e1a3 + SHA512 234ebb71997f5b7d3951584235ead10f977689cef323ae1c198629a6b1995b1481d8a1515d827c46df10209bdc66e1f3cc7780dafee9ca0ff4172be47c460d78 + HEAD_REF master +) + +# Clean up previous builds +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + +# Identify waf executable and calculate configure args +if(VCPKG_CMAKE_SYSTEM_NAME) + set(WAF_COMMAND waf) +else() + set(WAF_COMMAND waf.bat) +endif() +set(CONFIGURE_COMMON_ARGS --use-flat-include-dir) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(CONFIGURE_COMMON_ARGS ${CONFIGURE_COMMON_ARGS} --abi-bits=32) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(CONFIGURE_COMMON_ARGS ${CONFIGURE_COMMON_ARGS} --abi-bits=64) +else() + message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(CONFIGURE_COMMON_ARGS ${CONFIGURE_COMMON_ARGS} --library-type=static) +else() + message(FATAL_ERROR "Unsupported library linkage: ${VCPKG_LIBRARY_LINKAGE}") +endif() +if(NOT VCPKG_CMAKE_SYSTEM_NAME) + if(VCPKG_CRT_LINKAGE STREQUAL static) + set(CONFIGURE_COMMON_ARGS ${CONFIGURE_COMMON_ARGS} --msvc-runtime-type=static) + else() + set(CONFIGURE_COMMON_ARGS ${CONFIGURE_COMMON_ARGS} --msvc-runtime-type=dynamic) + endif() +endif() + +# Configure debug +message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") +vcpkg_execute_required_process( + COMMAND ${WAF_COMMAND} configure ${CONFIGURE_COMMON_ARGS} + --prefix=${CURRENT_PACKAGES_DIR}/debug --out=${SOURCE_PATH_DEBUG} + --build-type=debug + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME configure-${TARGET_TRIPLET}--dbg +) +message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + +# Build debug +message(STATUS "Building ${TARGET_TRIPLET}-dbg") +vcpkg_execute_required_process( + COMMAND ${WAF_COMMAND} build + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}--dbg +) +message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + +# Install debug +message(STATUS "Installing ${TARGET_TRIPLET}-dbg") +vcpkg_execute_required_process( + COMMAND ${WAF_COMMAND} install + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME install-${TARGET_TRIPLET}--dbg +) +# Include files should not be duplicated +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# pkg-config files should point to correct include directory +file(GLOB PC_FILES "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/*.pc") +foreach(PC_FILE_NAME ${PC_FILES}) + file(READ "${PC_FILE_NAME}" _contents) + string(REPLACE "includedir=\${prefix}/include" "includedir=\${prefix}/../include" _contents "${_contents}") + file(WRITE "${PC_FILE_NAME}" "${_contents}") +endforeach() +message(STATUS "Installing ${TARGET_TRIPLET}-dbg done") + +# Configure release +message(STATUS "Configuring ${TARGET_TRIPLET}-rel") +vcpkg_execute_required_process( + COMMAND ${WAF_COMMAND} configure ${CONFIGURE_COMMON_ARGS} + --prefix=${CURRENT_PACKAGES_DIR} --out=${SOURCE_PATH_RELEASE} + --build-type=release + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME configure-${TARGET_TRIPLET}--rel +) +message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + +# Build release +message(STATUS "Building ${TARGET_TRIPLET}-rel") +vcpkg_execute_required_process( + COMMAND ${WAF_COMMAND} build + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}--rel +) +message(STATUS "Building ${TARGET_TRIPLET}-rel done") + +# Install release +message(STATUS "Installing ${TARGET_TRIPLET}-rel") +vcpkg_execute_required_process( + COMMAND ${WAF_COMMAND} install + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME install-${TARGET_TRIPLET}--rel +) +message(STATUS "Installing ${TARGET_TRIPLET}-rel done") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/bde + RENAME copyright +) diff --git a/ports/benchmark/CONTROL b/ports/benchmark/CONTROL index 9853a1509f8..ffdb53881f2 100644 --- a/ports/benchmark/CONTROL +++ b/ports/benchmark/CONTROL @@ -1,3 +1,3 @@ Source: benchmark -Version: 1.4.0 +Version: 1.4.1 Description: A library to support the benchmarking of functions, similar to unit-tests. diff --git a/ports/benchmark/portfile.cmake b/ports/benchmark/portfile.cmake index d724bf5eee1..4528caa3b70 100644 --- a/ports/benchmark/portfile.cmake +++ b/ports/benchmark/portfile.cmake @@ -2,11 +2,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "${PORT} does not currently support UWP") endif() -if(VCPKG_CRT_LINKAGE STREQUAL static) - message(FATAL_ERROR "Google benchmark only supports dynamic crt linkage.") -endif() - -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") message(STATUS "Warning: Dynamic building not supported yet. Building static.") set(VCPKG_LIBRARY_LINKAGE static) endif() @@ -16,8 +12,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/benchmark - REF v1.4.0 - SHA512 4bb5119fe6c0558e5a8b39486169ffcbf24e877ec7f28636dfab1692936b77334f76d28bda2cdada18e5070579da7a5bf0617bfbb6a09848f0b071df8e694d76 + REF v1.4.1 + SHA512 e9d71b4679cb4e4d755f7bb4101e131b37e209b6aebd0853e0c63eb11c42b75faa5da4ff8c265149808a475f3a1cfb140c5b49f877acfda908a4bb7add983aae HEAD_REF master ) diff --git a/ports/berkeleydb/CMakeLists.txt b/ports/berkeleydb/CMakeLists.txt index 1eb130c3e78..9297aacefa6 100644 --- a/ports/berkeleydb/CMakeLists.txt +++ b/ports/berkeleydb/CMakeLists.txt @@ -9,16 +9,18 @@ add_definitions( -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_LIB + -DUNICODE + -D_UNICODE ) if (BUILD_SHARED_LIBS) add_definitions( - -D_LIB + -DDB_CREATE_DLL + -D_USRDLL ) else() add_definitions( - -DDB_CREATE_DLL - -D_USRDLL + -D_LIB ) endif() diff --git a/ports/berkeleydb/CONTROL b/ports/berkeleydb/CONTROL index a0ac528b79e..e77e5793a43 100644 --- a/ports/berkeleydb/CONTROL +++ b/ports/berkeleydb/CONTROL @@ -1,3 +1,3 @@ Source: berkeleydb -Version: 4.8.30 +Version: 4.8.30-2 Description: A high-performance embedded database for key/value data. diff --git a/ports/bitserializer-cpprestjson/CONTROL b/ports/bitserializer-cpprestjson/CONTROL new file mode 100644 index 00000000000..f75cd41a2dd --- /dev/null +++ b/ports/bitserializer-cpprestjson/CONTROL @@ -0,0 +1,4 @@ +Source: bitserializer-cpprestjson +Version: 0.8 +Build-Depends: bitserializer, cpprestsdk +Description: This is an implementation of the BitSerializer archive for serialization JSON (based on CppRestSDK library). diff --git a/ports/bitserializer-cpprestjson/portfile.cmake b/ports/bitserializer-cpprestjson/portfile.cmake new file mode 100644 index 00000000000..28430d5908f --- /dev/null +++ b/ports/bitserializer-cpprestjson/portfile.cmake @@ -0,0 +1,13 @@ +include(vcpkg_common_functions) +vcpkg_from_bitbucket( + OUT_SOURCE_PATH SOURCE_PATH + REPO Pavel_Kisliak/BitSerializer + REF 0.8 + SHA512 6df5b3f7a472a55ba0aace22c44cb2adaf178fbc7f920dcaf7d7015f81badde98d64911ddb620e99a708214140d7c29561775c1b0fe60fef6f24d465a4eac093 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/archives/bitserializer_cpprest_json DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/bitserializer-cpprestjson RENAME copyright) diff --git a/ports/bitserializer-rapidjson/CONTROL b/ports/bitserializer-rapidjson/CONTROL new file mode 100644 index 00000000000..db65c52aefb --- /dev/null +++ b/ports/bitserializer-rapidjson/CONTROL @@ -0,0 +1,4 @@ +Source: bitserializer-rapidjson +Version: 0.8 +Build-Depends: bitserializer, rapidjson +Description: This is an implementation of the BitSerializer archive for serialization JSON (based on the RapidJson library). diff --git a/ports/bitserializer-rapidjson/portfile.cmake b/ports/bitserializer-rapidjson/portfile.cmake new file mode 100644 index 00000000000..4050b73bc9a --- /dev/null +++ b/ports/bitserializer-rapidjson/portfile.cmake @@ -0,0 +1,13 @@ +include(vcpkg_common_functions) +vcpkg_from_bitbucket( + OUT_SOURCE_PATH SOURCE_PATH + REPO Pavel_Kisliak/BitSerializer + REF 0.8 + SHA512 6df5b3f7a472a55ba0aace22c44cb2adaf178fbc7f920dcaf7d7015f81badde98d64911ddb620e99a708214140d7c29561775c1b0fe60fef6f24d465a4eac093 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/archives/bitserializer_rapidjson DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/bitserializer-rapidjson RENAME copyright) diff --git a/ports/bitserializer/CONTROL b/ports/bitserializer/CONTROL index 95e36f5b9f1..35e02fe0308 100644 --- a/ports/bitserializer/CONTROL +++ b/ports/bitserializer/CONTROL @@ -1,4 +1,3 @@ Source: bitserializer -Version: 0.7 -Build-Depends: cpprestsdk -Description: The library for simple serialization of arbitrary C++ types to various output formats (currently just supported JSON based on CppRestSDK). +Version: 0.8 +Description: The core part of library for serialization of arbitrary C++ types to various output formats. diff --git a/ports/bitserializer/portfile.cmake b/ports/bitserializer/portfile.cmake index 5e59f0c71d0..50eb93481b1 100644 --- a/ports/bitserializer/portfile.cmake +++ b/ports/bitserializer/portfile.cmake @@ -2,12 +2,12 @@ include(vcpkg_common_functions) vcpkg_from_bitbucket( OUT_SOURCE_PATH SOURCE_PATH REPO Pavel_Kisliak/BitSerializer - REF 0.7 - SHA512 3a50b1b3077115f60d298f4257ae6a5a350c1d8b3d575af83b4f0746757ab3393da7c81ac9c7db4e30540fe94f1742b1d39de724b2dec080faf727b885bb19a4 + REF 0.8 + SHA512 6df5b3f7a472a55ba0aace22c44cb2adaf178fbc7f920dcaf7d7015f81badde98d64911ddb620e99a708214140d7c29561775c1b0fe60fef6f24d465a4eac093 HEAD_REF master ) -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${SOURCE_PATH}/core/bitserializer DESTINATION ${CURRENT_PACKAGES_DIR}/include) # Handle copyright file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/bitserializer RENAME copyright) diff --git a/ports/blaze/CONTROL b/ports/blaze/CONTROL index c72f7086589..dc80b4c41be 100644 --- a/ports/blaze/CONTROL +++ b/ports/blaze/CONTROL @@ -1,4 +1,4 @@ Source: blaze -Version: 3.3 +Version: 3.4-1 Build-Depends: clapack, boost-exception Description: Blaze is an open-source, high-performance C++ math library for dense and sparse arithmetic. diff --git a/ports/blaze/avoid-src-dir-generation.patch b/ports/blaze/avoid-src-dir-generation.patch new file mode 100644 index 00000000000..c57d6a42903 --- /dev/null +++ b/ports/blaze/avoid-src-dir-generation.patch @@ -0,0 +1,113 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7ecc993..793ec34 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -63,8 +63,8 @@ endif() + #================================================================================================== + + find_package(LAPACK REQUIRED) +-target_link_libraries(blaze INTERFACE ${LAPACK_LIBRARIES}) +-target_compile_options(blaze INTERFACE ${LAPACK_LINKER_FLAGS}) ++target_link_libraries(blaze INTERFACE $) ++target_compile_options(blaze INTERFACE $) + + + #================================================================================================== +@@ -72,7 +72,7 @@ target_compile_options(blaze INTERFACE ${LAPACK_LINKER_FLAGS}) + #================================================================================================== + + find_package(Boost 1.54.0 REQUIRED) +-target_include_directories(blaze INTERFACE ${Boost_INCLUDE_DIRS}) ++target_include_directories(blaze INTERFACE $) + + + #================================================================================================== +@@ -163,7 +163,7 @@ endif () + set(BLAZE_CACHE_SIZE ${BLAZE_CACHE_SIZE} CACHE STRING "Cache size of the CPU in bytes." FORCE) + + configure_file ("${CMAKE_CURRENT_LIST_DIR}/cmake/CacheSize.h.in" +- "${CMAKE_CURRENT_LIST_DIR}/blaze/config/CacheSize.h") ++ "${CMAKE_CURRENT_BINARY_DIR}/blaze/config/CacheSize.h") + + + #================================================================================================== +@@ -216,7 +216,7 @@ else () + endif () + + configure_file ("${CMAKE_CURRENT_LIST_DIR}/cmake/BLAS.h.in" +- "${CMAKE_CURRENT_LIST_DIR}/blaze/config/BLAS.h") ++ "${CMAKE_CURRENT_BINARY_DIR}/blaze/config/BLAS.h") + + + #================================================================================================== +@@ -227,7 +227,7 @@ set(BLAZE_TRANSPOSE_FLAG "columnVector" CACHE STRING "Specify the default transp + set_property(CACHE BLAZE_TRANSPOSE_FLAG PROPERTY STRINGS "columnVector;rowVector") + + configure_file ("${CMAKE_CURRENT_LIST_DIR}/cmake/TransposeFlag.h.in" +- "${CMAKE_CURRENT_LIST_DIR}/blaze/config/TransposeFlag.h") ++ "${CMAKE_CURRENT_BINARY_DIR}/blaze/config/TransposeFlag.h") + + + #================================================================================================== +@@ -238,7 +238,7 @@ set(BLAZE_STORAGE_ORDER "rowMajor" CACHE STRING "Specify the default storage ord + set_property(CACHE BLAZE_STORAGE_ORDER PROPERTY STRINGS "rowMajor;columnMajor") + + configure_file ("${CMAKE_CURRENT_LIST_DIR}/cmake/StorageOrder.h.in" +- "${CMAKE_CURRENT_LIST_DIR}/blaze/config/StorageOrder.h") ++ "${CMAKE_CURRENT_BINARY_DIR}/blaze/config/StorageOrder.h") + + + #================================================================================================== +@@ -254,7 +254,7 @@ else () + endif () + + configure_file ("${CMAKE_CURRENT_LIST_DIR}/cmake/Vectorization.h.in" +- "${CMAKE_CURRENT_LIST_DIR}/blaze/config/Vectorization.h") ++ "${CMAKE_CURRENT_BINARY_DIR}/blaze/config/Vectorization.h") + + + #================================================================================================== +@@ -300,7 +300,7 @@ elseif (BLAZE_SMP_THREADS STREQUAL "HPX") + endif () + + configure_file ("${CMAKE_CURRENT_LIST_DIR}/cmake/SMP.h.in" +- "${CMAKE_CURRENT_LIST_DIR}/blaze/config/SMP.h") ++ "${CMAKE_CURRENT_BINARY_DIR}/blaze/config/SMP.h") + + + #================================================================================================== +@@ -316,7 +316,7 @@ else () + endif () + + configure_file ("${CMAKE_CURRENT_LIST_DIR}/cmake/Restrict.h.in" +- "${CMAKE_CURRENT_LIST_DIR}/blaze/config/Restrict.h") ++ "${CMAKE_CURRENT_BINARY_DIR}/blaze/config/Restrict.h") + + + #================================================================================================== +@@ -346,7 +346,7 @@ else () + endif () + + configure_file ("${CMAKE_CURRENT_LIST_DIR}/cmake/Optimizations.h.in" +- "${CMAKE_CURRENT_LIST_DIR}/blaze/config/Optimizations.h") ++ "${CMAKE_CURRENT_BINARY_DIR}/blaze/config/Optimizations.h") + + + #================================================================================================== +@@ -364,7 +364,7 @@ else () + endif () + + configure_file ("${CMAKE_CURRENT_LIST_DIR}/cmake/Inline.h.in" +- "${CMAKE_CURRENT_LIST_DIR}/blaze/config/Inline.h") ++ "${CMAKE_CURRENT_BINARY_DIR}/blaze/config/Inline.h") + + + #================================================================================================== +@@ -379,6 +379,7 @@ write_basic_package_version_file( + COMPATIBILITY SameMajorVersion + ) + ++install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/blaze DESTINATION include) + install(DIRECTORY blaze DESTINATION include) + install(TARGETS blaze EXPORT blazeTargets) + diff --git a/ports/blaze/no-absolute-paths-in-install.patch b/ports/blaze/no-absolute-paths-in-install.patch deleted file mode 100644 index a601a37e7f0..00000000000 --- a/ports/blaze/no-absolute-paths-in-install.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0d102ab..5d918b8 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -36,7 +36,7 @@ cmake_minimum_required(VERSION 3.5) - add_library(blaze INTERFACE) - target_include_directories(blaze INTERFACE - $ -- $ -+ $ - ) - - target_compile_options(blaze INTERFACE -@@ -48,8 +48,8 @@ target_compile_options(blaze INTERFACE - #================================================================================================== - - find_package(LAPACK REQUIRED) --target_link_libraries(blaze INTERFACE ${LAPACK_LIBRARIES}) --target_compile_options(blaze INTERFACE ${LAPACK_LINKER_FLAGS}) -+target_link_libraries(blaze INTERFACE $) -+target_compile_options(blaze INTERFACE $) - - - #================================================================================================== -@@ -57,7 +57,7 @@ target_compile_options(blaze INTERFACE ${LAPACK_LINKER_FLAGS}) - #================================================================================================== - - find_package(Boost 1.54.0 REQUIRED) --target_include_directories(blaze INTERFACE ${Boost_INCLUDE_DIRS}) -+target_include_directories(blaze INTERFACE $) - - - #================================================================================================== diff --git a/ports/blaze/portfile.cmake b/ports/blaze/portfile.cmake index 6de95aeb574..a4480824985 100644 --- a/ports/blaze/portfile.cmake +++ b/ports/blaze/portfile.cmake @@ -3,14 +3,11 @@ include(vcpkg_common_functions) vcpkg_from_bitbucket( OUT_SOURCE_PATH SOURCE_PATH REPO blaze-lib/blaze - REF v3.3 - SHA512 1210db57fca04832ff9382cbb904f22f70eab3acbc355a1d22435bfe042d6acac7f86a908d8654cf49517c2ad825cd8be19f85b20b1ebd46a79d474a424653c8 + REF bbe39c81b68eb0d8647da703899e1ee4a82cdfd3 + SHA512 84eb8226672d9d11d194d165e7aaa333a0d49ca090bb94472f19242e5f2ad0c3e08a30cdafe055cff51b210b603533f879800bd6784f3ffdb0d9eeca65d58b25 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/no-absolute-paths-in-install.patch" + PATCHES + avoid-src-dir-generation.patch ) vcpkg_configure_cmake( diff --git a/ports/blosc/CONTROL b/ports/blosc/CONTROL index d6ec941e12d..1a2378aed74 100644 --- a/ports/blosc/CONTROL +++ b/ports/blosc/CONTROL @@ -1,4 +1,4 @@ Source: blosc -Version: 1.13.5 +Version: 1.13.5-1 Build-Depends: lz4, snappy, zlib, zstd Description: A blocking, shuffling and loss-less compression library that can be faster than `memcpy()` diff --git a/ports/blosc/portfile.cmake b/ports/blosc/portfile.cmake index d2107b10652..33d6f729a02 100644 --- a/ports/blosc/portfile.cmake +++ b/ports/blosc/portfile.cmake @@ -16,6 +16,8 @@ else() set(BLOSC_SHARED ON) endif() +file(REMOVE_RECURSE ${SOURCE_PATH}/internal-complibs) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DPREFER_EXTERNAL_LZ4=ON diff --git a/ports/boost-accumulators/CONTROL b/ports/boost-accumulators/CONTROL index 7c3b8aedcfa..4b72307caaa 100644 --- a/ports/boost-accumulators/CONTROL +++ b/ports/boost-accumulators/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-accumulators -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-array, boost-assert, boost-circular-buffer, boost-concept-check, boost-config, boost-core, boost-detail, boost-fusion, boost-interval, boost-iterator, boost-mpl, boost-numeric-conversion, boost-odeint, boost-parameter, boost-preprocessor, boost-range, boost-static-assert, boost-throw-exception, boost-tuple, boost-typeof, boost-type-traits, boost-ublas, boost-utility, boost-vcpkg-helpers Description: Boost accumulators module diff --git a/ports/boost-accumulators/portfile.cmake b/ports/boost-accumulators/portfile.cmake index f4e5abf16f4..1dc10c58078 100644 --- a/ports/boost-accumulators/portfile.cmake +++ b/ports/boost-accumulators/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/accumulators - REF boost-1.67.0 - SHA512 f68e35b502f22af605d8d5c1648b856cbdeaa2f592ad1a7732ea2be6d9207271f4842320875bde693651479c39a394055fb2315e5422a6ebb623412fb44b2a04 + REF boost-1.68.0 + SHA512 a85e2f307a2f6c08378f595bca14d458da6ffb1b0f078d2be789a4ae8290296b2256ba91ed22ed89542a585efd8f6c1f7041711d8000649bd6141b22f1c77b81 HEAD_REF master ) diff --git a/ports/boost-algorithm/CONTROL b/ports/boost-algorithm/CONTROL index bf9846b26c1..2d392879d01 100644 --- a/ports/boost-algorithm/CONTROL +++ b/ports/boost-algorithm/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-algorithm -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-array, boost-assert, boost-bind, boost-concept-check, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-iterator, boost-mpl, boost-range, boost-regex, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers Description: Boost algorithm module diff --git a/ports/boost-algorithm/portfile.cmake b/ports/boost-algorithm/portfile.cmake index 55f8ddad1bd..631f9305301 100644 --- a/ports/boost-algorithm/portfile.cmake +++ b/ports/boost-algorithm/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/algorithm - REF boost-1.67.0 - SHA512 74509b979d71c1aa21734555022c056b4ab508e01e715d469b0021704654cc27db91ce41266bb567b62d5cfafe0f92d1c0fda67f917b5198b0326713240c2e77 + REF boost-1.68.0 + SHA512 e5d6fd1a64d2c153b8135a12ce8fdd830a8e8138ac34dca8c0737eee5ec95238159dcd7422377f1cc50860ab47d918faa3ae802bfcab0d3e86dce689c2933114 HEAD_REF master ) diff --git a/ports/boost-align/CONTROL b/ports/boost-align/CONTROL index 11f7f209027..f53211a115f 100644 --- a/ports/boost-align/CONTROL +++ b/ports/boost-align/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-align -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-config, boost-core, boost-static-assert, boost-throw-exception, boost-vcpkg-helpers Description: Boost align module diff --git a/ports/boost-align/portfile.cmake b/ports/boost-align/portfile.cmake index 28c878dc434..74656ba7528 100644 --- a/ports/boost-align/portfile.cmake +++ b/ports/boost-align/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/align - REF boost-1.67.0 - SHA512 4dfbe372e977787067b7d270bd54f66919e48620300552f76ec3075e02e4514214d3bd8b5ff83599b7f277a8cafa95e550620231bfe366f38aa26ee51c6ef942 + REF boost-1.68.0 + SHA512 70379431769ffbfd3e5a6f1d9580a0d70933925ba7cf6a862fbe0f257b4ccb66b86ece6af7d78c16835d836012811708f179da2956c0851388f4ce38ff056b5c HEAD_REF master ) diff --git a/ports/boost-any/CONTROL b/ports/boost-any/CONTROL index c420de0d9bf..f41679d93aa 100644 --- a/ports/boost-any/CONTROL +++ b/ports/boost-any/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-any -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-core, boost-mpl, boost-static-assert, boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost any module diff --git a/ports/boost-any/portfile.cmake b/ports/boost-any/portfile.cmake index a5fbf52790a..3020577abd3 100644 --- a/ports/boost-any/portfile.cmake +++ b/ports/boost-any/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/any - REF boost-1.67.0 - SHA512 1fd58fdd94cb08078f77d9131568255f35afb63e52a66379d14b35d5d9572f97468fc8a70b966d2c13b28149ccc8659ec0ba70c3cbda62ae08b8f8f1961c15e4 + REF boost-1.68.0 + SHA512 bf9a7c3c761496a67a25cbb00ea5b7858ea629a6f99627f946a55e60b6c65c9eb0facd2e6aa613247001eebe4da34983083325e198869dc07854f7a41a799478 HEAD_REF master ) diff --git a/ports/boost-array/CONTROL b/ports/boost-array/CONTROL index 429743ad5c1..04b1dc0397a 100644 --- a/ports/boost-array/CONTROL +++ b/ports/boost-array/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-array -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-static-assert, boost-throw-exception, boost-vcpkg-helpers Description: Boost array module diff --git a/ports/boost-array/portfile.cmake b/ports/boost-array/portfile.cmake index e0245f551f0..817cdc01af5 100644 --- a/ports/boost-array/portfile.cmake +++ b/ports/boost-array/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/array - REF boost-1.67.0 - SHA512 db8ae6ffa7b29405d3e140acc22dd5bba9c7eade435fa2235b4c54e1c45c1bb28b927e4168ce4811a0206b83fe99580feffc6ae36a8c6cf99f6b13a2eb0682cd + REF boost-1.68.0 + SHA512 cf6fa97a21f688888fc2c8c3982681602ddcba04f7821c6af0ad512074983c9a93befdf8e0dcf4336f5dc6d26117f4376fecc508b4ada9bb7f186ce7592a1102 HEAD_REF master ) diff --git a/ports/boost-asio/CONTROL b/ports/boost-asio/CONTROL index 2fdc3dc0a33..b85abb53209 100644 --- a/ports/boost-asio/CONTROL +++ b/ports/boost-asio/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-asio -Version: 1.67.0-1 -Build-Depends: boost-coroutine (!uwp), boost-date-time, boost-regex, boost-system, boost-vcpkg-helpers, openssl +Version: 1.68.0-1 +Build-Depends: boost-core, boost-coroutine (!uwp), boost-date-time, boost-integer, boost-regex, boost-smart-ptr, boost-system, boost-vcpkg-helpers, openssl Description: Boost asio module diff --git a/ports/boost-asio/portfile.cmake b/ports/boost-asio/portfile.cmake index de750d6d36c..ec0ccbee6bd 100644 --- a/ports/boost-asio/portfile.cmake +++ b/ports/boost-asio/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/asio - REF boost-1.67.0 - SHA512 b7497608afa49580eeb9a74feefc624eb66a3e6db21f2a65291ccb287fe60dc8d923a9143bc10e73b8508ec2ef094e6caf2ef96528790c5324b6aceced55f29f + REF boost-1.68.0 + SHA512 287aa7b4e37e97df10d196b1b409d38c19a025c18228df1ba9bb7dc19d53c9f51b69699e71b04ddee030710e08cb9c4b34eb08f8284d3fa88a762ed6fd096dbe HEAD_REF master ) diff --git a/ports/boost-assert/CONTROL b/ports/boost-assert/CONTROL index 701ae791f04..c2fa170a7e1 100644 --- a/ports/boost-assert/CONTROL +++ b/ports/boost-assert/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-assert -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-vcpkg-helpers Description: Boost assert module diff --git a/ports/boost-assert/portfile.cmake b/ports/boost-assert/portfile.cmake index d37ed3beea9..1b162fd25b1 100644 --- a/ports/boost-assert/portfile.cmake +++ b/ports/boost-assert/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/assert - REF boost-1.67.0 - SHA512 e0559f543bffc1acd6a95bf54978a29eff42c6e8c5f825a7b93cb652a5260bcfd5eb1a09b2859e9a3621c3438e7670e4e4132735acdce4d43608cfdf426e5444 + REF boost-1.68.0 + SHA512 fd5ffc755f9f0926adeb1d0f3ceea448094e5dcd94c3c9eaa203676bb790729c8e02e66633535f7eaa1df186d88eeb983ed894c181666489a6a3bf9323a8eac0 HEAD_REF master ) diff --git a/ports/boost-assign/CONTROL b/ports/boost-assign/CONTROL index 1f304632039..8426616995c 100644 --- a/ports/boost-assign/CONTROL +++ b/ports/boost-assign/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-assign -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-array, boost-config, boost-detail, boost-mpl, boost-preprocessor, boost-ptr-container, boost-range, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-vcpkg-helpers Description: Boost assign module diff --git a/ports/boost-assign/portfile.cmake b/ports/boost-assign/portfile.cmake index a8b01985bba..e223ea18b53 100644 --- a/ports/boost-assign/portfile.cmake +++ b/ports/boost-assign/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/assign - REF boost-1.67.0 - SHA512 e7fd39fc4bcf7cc97c3f987a2cc7434c51d23fe47dbd480ac9203209c61db0883b479582adcfdef22b9f007df3467b43da72bef8b186ea8c5883a85013394dd2 + REF boost-1.68.0 + SHA512 95c2d653e5523d54664e7ed7844d0aa2ccb01c73be2c777b6f8f3c1c738f1bd41c20332d52add7fc6c46621558a09c986a6757b6374a0a54dddfba004a9bb3a0 HEAD_REF master ) diff --git a/ports/boost-atomic/CONTROL b/ports/boost-atomic/CONTROL index 488cbe7de2d..b207ebc10f2 100644 --- a/ports/boost-atomic/CONTROL +++ b/ports/boost-atomic/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-atomic -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-build, boost-config, boost-integer, boost-modular-build-helper, boost-type-traits, boost-vcpkg-helpers Description: Boost atomic module diff --git a/ports/boost-atomic/portfile.cmake b/ports/boost-atomic/portfile.cmake index 12f25380589..ae7fd3141d2 100644 --- a/ports/boost-atomic/portfile.cmake +++ b/ports/boost-atomic/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/atomic - REF boost-1.67.0 - SHA512 4a4ab037e17c6c2a5a1ae5acb880392f863daa4cc87ca22349d9da565b229d68ce1befe96d7457778dddd40afb95266d6cb45552a46d9679f7bc935e8fb16b85 + REF boost-1.68.0 + SHA512 651c02ce0b58458114d4e196eecaf614a781c383ae9b42646d040b3e84babf9983efebed08bb60343eb9beeb566a6ae508ad230ffebae1e7731053529c723eab HEAD_REF master ) diff --git a/ports/boost-beast/CONTROL b/ports/boost-beast/CONTROL index 867f090088c..71ac84478ba 100644 --- a/ports/boost-beast/CONTROL +++ b/ports/boost-beast/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-beast -Version: 1.67.0 -Build-Depends: boost-asio, boost-assert, boost-bind, boost-config, boost-container, boost-core, boost-endian, boost-intrusive, boost-optional, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Version: 1.68.0 +Build-Depends: boost-align, boost-asio, boost-assert, boost-bind, boost-config, boost-container, boost-core, boost-endian, boost-intrusive, boost-optional, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost beast module diff --git a/ports/boost-beast/portfile.cmake b/ports/boost-beast/portfile.cmake index 355d5bc3e66..2a9658e119a 100644 --- a/ports/boost-beast/portfile.cmake +++ b/ports/boost-beast/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/beast - REF boost-1.67.0 - SHA512 7530553985c8beee0b24b1ba77b8c6e2279315c74c20f8d6d2f2028fb6fed6c80f81eacb8a2de6fce651fcb6bf0c9d67f65234cb2e1fd433e0f6ceda1566e5b6 + REF boost-1.68.0 + SHA512 889b5285dd7cca86561bc81c8d152dbc1c281b6b9fedfdb95710de94c8582aaaa150ee1a9d9e11f18f79ef1b336ff44dbd2f7614b06342ea9d7b6ad8f2eb60dc HEAD_REF master ) diff --git a/ports/boost-bimap/CONTROL b/ports/boost-bimap/CONTROL index 9bffc6bbc40..64e293c972a 100644 --- a/ports/boost-bimap/CONTROL +++ b/ports/boost-bimap/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-bimap -Version: 1.67.0 -Build-Depends: boost-concept-check, boost-config, boost-functional, boost-iterator, boost-lambda, boost-mpl, boost-multi-index, boost-preprocessor, boost-property-map, boost-serialization, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-concept-check, boost-config, boost-container-hash, boost-functional, boost-iterator, boost-lambda, boost-mpl, boost-multi-index, boost-preprocessor, boost-property-map, boost-serialization, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost bimap module diff --git a/ports/boost-bimap/portfile.cmake b/ports/boost-bimap/portfile.cmake index a9b8e0e128f..51ee94385cf 100644 --- a/ports/boost-bimap/portfile.cmake +++ b/ports/boost-bimap/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/bimap - REF boost-1.67.0 - SHA512 c142c149fcfd0a33e130779a0a9f9be41d077703137b6537bfc8c8ed7ff9031fd8e196f076791e00450a286c1ace56979ee7a0c59348f304f2d41daf12aba355 + REF boost-1.68.0 + SHA512 f8e994043e41eef2270f78e7d310ac3b86e667be93e7aa04e0fb97a207f75ee1c587fd4cfda741ab19e0e7e8313b24dafe57e93d9d78a6a08cc306fdff3f41d6 HEAD_REF master ) diff --git a/ports/boost-bind/CONTROL b/ports/boost-bind/CONTROL index bdc97f0964a..bb6c1825d45 100644 --- a/ports/boost-bind/CONTROL +++ b/ports/boost-bind/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-bind -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-core, boost-detail, boost-vcpkg-helpers Description: Boost bind module diff --git a/ports/boost-bind/portfile.cmake b/ports/boost-bind/portfile.cmake index e55b9105534..3f7696f316c 100644 --- a/ports/boost-bind/portfile.cmake +++ b/ports/boost-bind/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/bind - REF boost-1.67.0 - SHA512 4172a426fad408f06f7e36f90396158b8fb345ff7b4147ec3471771d465335c9b01f7e7dda040c842684a5c6eef596ea4c8f7b803489fbddfb016e48e3fcf8fd + REF boost-1.68.0 + SHA512 da8c25851bf1083aceafe2972393544009ddefedbdfc40184c95e6a7fe9403ca73cbdfc4a8d583503952cefb6fe14c2f7068eb8019916100fe00aaf205198470 HEAD_REF master ) diff --git a/ports/boost-build/CONTROL b/ports/boost-build/CONTROL index 678914811d0..db12d3b3d32 100644 --- a/ports/boost-build/CONTROL +++ b/ports/boost-build/CONTROL @@ -1,3 +1,3 @@ Source: boost-build -Version: 1.67.0 +Version: 1.68.0 Description: Boost.Build diff --git a/ports/boost-build/portfile.cmake b/ports/boost-build/portfile.cmake index dfd50799784..e420fc1a59e 100644 --- a/ports/boost-build/portfile.cmake +++ b/ports/boost-build/portfile.cmake @@ -11,20 +11,20 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/build - REF boost-1.67.0 - SHA512 93aa3f0c76245fefe2ceabde9c287e7738f79cdab71eeb42ba426f06e7846b5da5c00fc7581d7f31135687e10660521d34c7ffb1ce7299b70d7330a81b0e5acc + REF boost-1.68.0 + SHA512 ede4ea6bba966bfdc590ea21b8787f090c690db851fd6eb19644f089de8828b6cec504a7f4be203d57017de2a0288f0e12772e50d9017287221520dca1676a79 HEAD_REF master ) vcpkg_download_distfile(ARCHIVE - URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.67.0/LICENSE_1_0.txt" + URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.68.0/LICENSE_1_0.txt" FILENAME "boost_LICENSE_1_0.txt" SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 ) vcpkg_download_distfile(BOOSTCPP_ARCHIVE - URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.67.0/boostcpp.jam" - FILENAME "boost-1.67.0-boostcpp.jam" + URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.68.0/boostcpp.jam" + FILENAME "boost-1.68.0-boostcpp.jam" SHA512 4d887b05b4873e651fd9bc20f04fc072c7d801fd50445c989517cd39c3a8aa132ed46c407fb0efb35825fc0fc1035393d5ac0da5922be2c120cf2bfff952b3bc ) diff --git a/ports/boost-callable-traits/CONTROL b/ports/boost-callable-traits/CONTROL index 4951e77c528..637b50d0e72 100644 --- a/ports/boost-callable-traits/CONTROL +++ b/ports/boost-callable-traits/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-callable-traits -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-vcpkg-helpers Description: Boost callable_traits module diff --git a/ports/boost-callable-traits/portfile.cmake b/ports/boost-callable-traits/portfile.cmake index 7d262945ff7..166fb666acb 100644 --- a/ports/boost-callable-traits/portfile.cmake +++ b/ports/boost-callable-traits/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/callable_traits - REF boost-1.67.0 - SHA512 5a6dedd5b8c4f57d4e896dbd963927459a42cc2488dd09628b5cc484327d21b32d7f5f2d976a55b4a62783faa4688b6f020983030bfc1f4307acf7f66b179fbc + REF boost-1.68.0 + SHA512 1c8d7e95d92996a046cc849216e00ee781b1ad8d9f6e4b7d584ea77bedf7a86a17ba0b43863d445f870a1a7991022e9c1a34fa7039de6fbd419a1bbc2e0e94e5 HEAD_REF master ) diff --git a/ports/boost-chrono/CONTROL b/ports/boost-chrono/CONTROL index 5295266539c..2b34389d5f9 100644 --- a/ports/boost-chrono/CONTROL +++ b/ports/boost-chrono/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-chrono -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-integer, boost-modular-build-helper, boost-move, boost-mpl, boost-predef, boost-ratio, boost-static-assert, boost-system, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost chrono module diff --git a/ports/boost-chrono/portfile.cmake b/ports/boost-chrono/portfile.cmake index 2918d3e9db4..c743a191928 100644 --- a/ports/boost-chrono/portfile.cmake +++ b/ports/boost-chrono/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/chrono - REF boost-1.67.0 - SHA512 ce86585c30b7500dd9f75074325428b57278e5bd88e6accbee235477ff73a0056fffae40ec0d88bcd28bfa59c4b37f290a618dc5af684dc6fc89302358d5d049 + REF boost-1.68.0 + SHA512 a124d6588839405163dcf5de1a81bb8bc57cc0e8914b16ba1dc4cd2dd5497617a03c940c7ef53328ed724a3ee518169454af439168b7f257ad0b6ea8219c986c HEAD_REF master ) diff --git a/ports/boost-circular-buffer/CONTROL b/ports/boost-circular-buffer/CONTROL index 53c0acf5827..01fb2cc3615 100644 --- a/ports/boost-circular-buffer/CONTROL +++ b/ports/boost-circular-buffer/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-circular-buffer -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-container, boost-core, boost-detail, boost-iterator, boost-move, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost circular_buffer module diff --git a/ports/boost-circular-buffer/portfile.cmake b/ports/boost-circular-buffer/portfile.cmake index ad1753f8e5a..24c85c55b3a 100644 --- a/ports/boost-circular-buffer/portfile.cmake +++ b/ports/boost-circular-buffer/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/circular_buffer - REF boost-1.67.0 - SHA512 1c1f085f81def77135b95fd3255ef0280c84c7f899b632b91c28bdc33dcfff8eaef3f9f233a356499756305a11c4a33022b72a46b990ec56db73ac4036711c45 + REF boost-1.68.0 + SHA512 da2f34f331b3fb24ed6147a67b242f3f4d14eac5fdf524ff57ac6acff0fe73b91bd1d374e61f0314465d5f09d3002bdb442cf2ac5c505b1276d4dbdf75b8cc2a HEAD_REF master ) diff --git a/ports/boost-compatibility/CONTROL b/ports/boost-compatibility/CONTROL index 3379e76da60..d7aab8193fa 100644 --- a/ports/boost-compatibility/CONTROL +++ b/ports/boost-compatibility/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-compatibility -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-vcpkg-helpers Description: Boost compatibility module diff --git a/ports/boost-compatibility/portfile.cmake b/ports/boost-compatibility/portfile.cmake index 41f9b81fbc8..4f3b3258f15 100644 --- a/ports/boost-compatibility/portfile.cmake +++ b/ports/boost-compatibility/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/compatibility - REF boost-1.67.0 - SHA512 d8733176ab4d208d5d44fe2a14c73d0309f62be5c2b9b9f50558c44c034c4f727260787185696bbaf5051b359bb14435cdc467644251e5d67b0b945d8f3b84a1 + REF boost-1.68.0 + SHA512 73124528957098af9480e776419d3a5ed86ec954695c020075e16730de5bbfd8f104e9463bdbc8996423d89ab5a775dc76b5b9127a44a2f53e4691324776bf17 HEAD_REF master ) diff --git a/ports/boost-compute/CONTROL b/ports/boost-compute/CONTROL index 094eae8b6a3..2bcd3d1e15a 100644 --- a/ports/boost-compute/CONTROL +++ b/ports/boost-compute/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-compute -Version: 1.67.0 -Build-Depends: boost-algorithm, boost-array, boost-assert, boost-chrono, boost-config, boost-core, boost-filesystem (!uwp), boost-function, boost-function-types, boost-fusion, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-preprocessor, boost-property-tree, boost-proto, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-uuid, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-algorithm, boost-array, boost-assert, boost-chrono, boost-config, boost-core, boost-filesystem (!uwp), boost-function, boost-function-types, boost-fusion, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-preprocessor, boost-property-tree, boost-proto, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost compute module diff --git a/ports/boost-compute/portfile.cmake b/ports/boost-compute/portfile.cmake index a31f9d8974c..61441381fc2 100644 --- a/ports/boost-compute/portfile.cmake +++ b/ports/boost-compute/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/compute - REF boost-1.67.0 - SHA512 d7f470eb2dcf96198d68d61edf8d53491819f8e29452f80e4140e34a11e044ecd45cfdbcd28cc29da2e905c6f324872704d4a834c62242050a0d5fc46deda029 + REF boost-1.68.0 + SHA512 f80233128e18b68a592c0585c3721254378a45615a79f8d379ad1654548428a86defe7a5147caa8ad955f3f45a568b81e7d97c08cde46f36f7908e670162ed3f HEAD_REF master ) diff --git a/ports/boost-concept-check/CONTROL b/ports/boost-concept-check/CONTROL index c5f814b2059..3d215f84846 100644 --- a/ports/boost-concept-check/CONTROL +++ b/ports/boost-concept-check/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-concept-check -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-mpl, boost-vcpkg-helpers Description: Boost concept_check module diff --git a/ports/boost-concept-check/portfile.cmake b/ports/boost-concept-check/portfile.cmake index fae7c074c28..69ba3a7d2f0 100644 --- a/ports/boost-concept-check/portfile.cmake +++ b/ports/boost-concept-check/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/concept_check - REF boost-1.67.0 - SHA512 82b67cf07b455b4775bc10a872d3b181af6bf689c7b3cd14160da9434965607840dd200a33f9286cde6c8aabad13a0af863c584d93eb1510bfb8a099d0169076 + REF boost-1.68.0 + SHA512 6f7f819fb8e8d03eb8f2f323e50dda583254e4ead58093c74d84271cb4d2ea5c25cac0c0aeffe97a8e209425d844dd6d7fcd687d0690e09b5e8c6edcd0ea6af2 HEAD_REF master ) diff --git a/ports/boost-config/CONTROL b/ports/boost-config/CONTROL index ba249ccb32a..49fc221ac87 100644 --- a/ports/boost-config/CONTROL +++ b/ports/boost-config/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-config -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-vcpkg-helpers Description: Boost config module diff --git a/ports/boost-config/portfile.cmake b/ports/boost-config/portfile.cmake index 0e705c2b706..899814d498d 100644 --- a/ports/boost-config/portfile.cmake +++ b/ports/boost-config/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/config - REF boost-1.67.0 - SHA512 517dc632e009c052f7d594c715342a2d94a95e0bcf466c3e3fbab1de38b7314846733f98e7010c386a5bab81d365fb6a08be04d21bee8c93450df97c53a12791 + REF boost-1.68.0 + SHA512 2b10be87e3d1a9a64b8b4459ca3427bf6187c53eeaf4551cf3755e4ee6b45e16a28539db0780e6392a3bf862feccffb38042cfb3a8d7f230caa5139ee94b713e HEAD_REF master ) diff --git a/ports/boost-container-hash/CONTROL b/ports/boost-container-hash/CONTROL index 1e50b4400f0..2facaaa42a9 100644 --- a/ports/boost-container-hash/CONTROL +++ b/ports/boost-container-hash/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-container-hash -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-compatibility, boost-config, boost-core, boost-detail, boost-integer, boost-static-assert, boost-type-traits, boost-vcpkg-helpers Description: Boost container_hash module diff --git a/ports/boost-container-hash/portfile.cmake b/ports/boost-container-hash/portfile.cmake index c9692bd7643..223bd63eb39 100644 --- a/ports/boost-container-hash/portfile.cmake +++ b/ports/boost-container-hash/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/container_hash - REF boost-1.67.0 - SHA512 6d9916c1ad2483c6877ecf5141c724319a9d65b672ad1c0d7cf5ee396755788cee78955b8cd4a1bf5f5351c68d78b0cc8a4993c70379639eb1a85cae940c06f3 + REF boost-1.68.0 + SHA512 a0d259fbf66444edbebfcbc02215d2c9bda1a7affa841caca49635bf627a434a8bcde6a8f8e8a49ca6a506d2705d5b6d9a62c7da2fa0626a84690f7c4515991b HEAD_REF master ) diff --git a/ports/boost-container/CONTROL b/ports/boost-container/CONTROL index bd2afdfc1b0..7f1ebd197d7 100644 --- a/ports/boost-container/CONTROL +++ b/ports/boost-container/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-container -Version: 1.67.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-functional, boost-integer, boost-intrusive, boost-modular-build-helper, boost-move, boost-static-assert, boost-type-traits, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-container-hash, boost-core, boost-integer, boost-intrusive, boost-modular-build-helper, boost-move, boost-static-assert, boost-type-traits, boost-vcpkg-helpers Description: Boost container module diff --git a/ports/boost-container/portfile.cmake b/ports/boost-container/portfile.cmake index 58ab998b4fb..cebcd4034de 100644 --- a/ports/boost-container/portfile.cmake +++ b/ports/boost-container/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/container - REF boost-1.67.0 - SHA512 559479466cf75ee7ce8f88d1c465f9c375722c954f2a833e842c732ba3dfc70bd30ae10e42e11afc043edc52767cddcf1f925b3c88f9d2c026f3e422ababd397 + REF boost-1.68.0 + SHA512 648fe7ee8442ac56604e515d64a7932f852319a216b345745714db4d37fce80cf46140a8b14d939c25d12372fb6ee3db55ebaf23f0928388735330d8ddeff7c1 HEAD_REF master ) diff --git a/ports/boost-context/CONTROL b/ports/boost-context/CONTROL index 5797590fefe..72a71a27fa7 100644 --- a/ports/boost-context/CONTROL +++ b/ports/boost-context/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-context -Version: 1.67.0 +Version: 1.68.0-1 Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-integer, boost-modular-build-helper, boost-pool, boost-predef, boost-smart-ptr, boost-vcpkg-helpers Description: Boost context module diff --git a/ports/boost-context/portfile.cmake b/ports/boost-context/portfile.cmake index ecdfe4d6934..fbfdb98f01b 100644 --- a/ports/boost-context/portfile.cmake +++ b/ports/boost-context/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/context - REF boost-1.67.0 - SHA512 4d6f7c0211c6941c8089d844b4ceae45322c2089ce41c029a21ef9b4fabdc0030a0c99fcc6c6be43d10372a171726b03a62aecae0241b8f2427439a2a283c306 + REF boost-1.68.0 + SHA512 6010cac31d408a9e4a47640b521da810240c697b529e85f97650f022397a55f1b509baf72076fa6e9ebec556c7a38d3da5045e9584c4dbde3d85fa61a5f91043 HEAD_REF master ) @@ -19,3 +19,9 @@ include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) + +# boost-context removed all.hpp, which is used by FindBoost to determine that context is installed +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include/boost/context/all.hpp) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/boost/context/all.hpp + "#error \"#include is no longer supported by boost_context.\"") +endif() \ No newline at end of file diff --git a/ports/boost-contract/CONTROL b/ports/boost-contract/CONTROL index b881538b1cb..55bd2d2f698 100644 --- a/ports/boost-contract/CONTROL +++ b/ports/boost-contract/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-contract -Version: 1.67.0 -Build-Depends: boost-any, boost-assert, boost-build, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-function-types, boost-modular-build-helper, boost-mpl, boost-optional, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-thread (!uwp), boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-any, boost-assert, boost-build, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-function-types, boost-modular-build-helper, boost-mpl, boost-optional, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-thread (!arm), boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost contract module diff --git a/ports/boost-contract/portfile.cmake b/ports/boost-contract/portfile.cmake index a83fe112d4a..98dc19d9365 100644 --- a/ports/boost-contract/portfile.cmake +++ b/ports/boost-contract/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/contract - REF boost-1.67.0 - SHA512 f0d069773d9c152be01ef803f05f134ee85190f44eec3147b8d9c025b7bf21f8b674141add0e249b0d8bb66b8d5d24f4f0e2d5b6e838ea72e38d3c64aa76c436 + REF boost-1.68.0 + SHA512 bcf68ae08245449f9bbe5987c7afc3a20b2b77c80d615e2463b6f215331032cefdf217976077e0c9622f1376d0226b53aae64ae4b4e53265179d208a0a0f743f HEAD_REF master ) diff --git a/ports/boost-conversion/CONTROL b/ports/boost-conversion/CONTROL index 5164347260a..9d59d42ff51 100644 --- a/ports/boost-conversion/CONTROL +++ b/ports/boost-conversion/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-conversion -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-vcpkg-helpers Description: Boost conversion module diff --git a/ports/boost-conversion/portfile.cmake b/ports/boost-conversion/portfile.cmake index 067f58c6633..4821ee6a0b2 100644 --- a/ports/boost-conversion/portfile.cmake +++ b/ports/boost-conversion/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/conversion - REF boost-1.67.0 - SHA512 6a8bdcec46a08b6b29a9288c24e6dd868c694ebd33ae8062c8ee9784be91d12031cda27841ea9f6212cdb8f0e9b9b21d68ccb96c3d38011cad5c93bfc62a568d + REF boost-1.68.0 + SHA512 7b207134766cf68607e575374cb936c3718328a4d0e9ae1cc245bb0ef727a9d6961a11974cffb2b9abe99f82948d0f7b7f1e9404a55091d88fbce9aab1d673f5 HEAD_REF master ) diff --git a/ports/boost-convert/CONTROL b/ports/boost-convert/CONTROL index 807fe0380b9..96f967ed53e 100644 --- a/ports/boost-convert/CONTROL +++ b/ports/boost-convert/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-convert -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-core, boost-function-types, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-parameter, boost-range, boost-spirit, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost convert module diff --git a/ports/boost-convert/portfile.cmake b/ports/boost-convert/portfile.cmake index 693a9178d6c..5b85d0a775e 100644 --- a/ports/boost-convert/portfile.cmake +++ b/ports/boost-convert/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/convert - REF boost-1.67.0 - SHA512 c51909030b2263a7f837e3732824d75b2fdf8b585c560f58e90ca8d2e6e3c48584cdc52e70f1058ef1e7fbe66085abd6053484025d14fb26201beddcf89c91ff + REF boost-1.68.0 + SHA512 8493a2dcba56c6d7fe9cfb1cea1c4225be5112903071c450a2044462adc46e81bc4c98e3a1a5096b146069686250895dae00d0bdb7e1fbc2627325666e9b744d HEAD_REF master ) diff --git a/ports/boost-core/CONTROL b/ports/boost-core/CONTROL index 2a765e76f30..82b3cf76799 100644 --- a/ports/boost-core/CONTROL +++ b/ports/boost-core/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-core -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-config, boost-vcpkg-helpers Description: Boost core module diff --git a/ports/boost-core/portfile.cmake b/ports/boost-core/portfile.cmake index 29a2b6a1ff4..1273a72c9eb 100644 --- a/ports/boost-core/portfile.cmake +++ b/ports/boost-core/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/core - REF boost-1.67.0 - SHA512 3b00c5893012e420c0faf6de3b43c0c4ae4645ced19b7f10403c6a7cd194954df7a4462999ca78226b29858848690223657e4eef9b6cf36d92828d5642057381 + REF boost-1.68.0 + SHA512 3870a595e146172a9e126d0894b4809bc776d66490f3f77112ca34f2c5c559576c732e3dd381d9366b25e46ace6a548741875b9992949aafa7cb5d395e3c9c48 HEAD_REF master ) diff --git a/ports/boost-coroutine/CONTROL b/ports/boost-coroutine/CONTROL index 6a0a4a69eb1..e2fcae43d41 100644 --- a/ports/boost-coroutine/CONTROL +++ b/ports/boost-coroutine/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-coroutine -Version: 1.67.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-context (!uwp), boost-detail, boost-exception, boost-integer, boost-modular-build-helper, boost-move, boost-range, boost-system, boost-thread (!uwp), boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-context (!uwp), boost-detail, boost-exception, boost-integer, boost-modular-build-helper, boost-move, boost-range, boost-system, boost-thread (!arm), boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost coroutine module diff --git a/ports/boost-coroutine/portfile.cmake b/ports/boost-coroutine/portfile.cmake index 4b0e88cd1af..6f4f8d92f07 100644 --- a/ports/boost-coroutine/portfile.cmake +++ b/ports/boost-coroutine/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/coroutine - REF boost-1.67.0 - SHA512 c636fc88a981d983f29cf5721c056d4c2cedbd48fe54d0aa4f2069ccb2c7438ee661167ff87298c22d7d84f6c61b1dd677d1ea91733e5e8fb04f7033d1559f63 + REF boost-1.68.0 + SHA512 47edf91ffdcd4ec8acb98b54f7baa19f280b4d865a6810ee26bbb13cc8f9233e8bbeb8771fa796e2b2fef393352981b737c7987da31095ef65f48f62a8a2d092 HEAD_REF master ) diff --git a/ports/boost-coroutine2/CONTROL b/ports/boost-coroutine2/CONTROL index b9701bcb1a1..c5ba714e054 100644 --- a/ports/boost-coroutine2/CONTROL +++ b/ports/boost-coroutine2/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-coroutine2 -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-config, boost-context (!uwp), boost-detail, boost-vcpkg-helpers Description: Boost coroutine2 module diff --git a/ports/boost-coroutine2/portfile.cmake b/ports/boost-coroutine2/portfile.cmake index 55d637732a2..9ede6c0046e 100644 --- a/ports/boost-coroutine2/portfile.cmake +++ b/ports/boost-coroutine2/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/coroutine2 - REF boost-1.67.0 - SHA512 9ff6607abb4006a503da52915d2f8f653d68a64fd0501962eee49393229be7d9fa35f0f4564306413271f08d33317e55475c0789e36639a178044f1424215097 + REF boost-1.68.0 + SHA512 62601d2081a592394ce443b295a9e755513a5e0b10c8791c33dbc4436c37775765a9ac9e49a8a74182759796e1953d1d9fa13e6dcb021b602386eae77d6eda78 HEAD_REF master ) diff --git a/ports/boost-crc/CONTROL b/ports/boost-crc/CONTROL index 2c51d06299d..bd8f4315125 100644 --- a/ports/boost-crc/CONTROL +++ b/ports/boost-crc/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-crc -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-compatibility, boost-config, boost-integer, boost-vcpkg-helpers Description: Boost crc module diff --git a/ports/boost-crc/portfile.cmake b/ports/boost-crc/portfile.cmake index a045eedee8f..03f0a43de92 100644 --- a/ports/boost-crc/portfile.cmake +++ b/ports/boost-crc/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/crc - REF boost-1.67.0 - SHA512 9168aed67125e955abd8e689bbbcb780adc16345447e1b781344b13d66827ab24ad2af038e10153c64bc458b66cf2cfe2961ddb22a3c494a86429dab60349a18 + REF boost-1.68.0 + SHA512 8d29e20bae0b86bb7592b08a25d0a5c2b8ff83c1ee5aeef1cb9f1b97fe798f743b4ad6c3f1dc59fec54761b2440fc6c8cdfe6f7f4eb7c7352a3ff90c383abf87 HEAD_REF master ) diff --git a/ports/boost-date-time/CONTROL b/ports/boost-date-time/CONTROL index 89af5c17ea0..34829026164 100644 --- a/ports/boost-date-time/CONTROL +++ b/ports/boost-date-time/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-date-time -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-algorithm, boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-integer, boost-io, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-mpl, boost-numeric-conversion, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost date_time module diff --git a/ports/boost-date-time/portfile.cmake b/ports/boost-date-time/portfile.cmake index fd5ce947d6e..0e664c2dedc 100644 --- a/ports/boost-date-time/portfile.cmake +++ b/ports/boost-date-time/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/date_time - REF boost-1.67.0 - SHA512 e164bc45bb7e4836521b31cb75a0fa3e960d0bdd0c7dabc4f8f457056c54b54bbd06f44a934aa5c7f2ee680f2f994b9fba47a0e460287c8e2d22b49450fc0872 + REF boost-1.68.0 + SHA512 c48d488cf72bc2a7e10e6068fe1b541718bf1f402ec20bbae56da4b0f712804e21ed7613dbcd5fcc6f90adc59d867bb88c4ddd35d3200e50d291ec9d213660f3 HEAD_REF master ) diff --git a/ports/boost-detail/CONTROL b/ports/boost-detail/CONTROL index ab5e1efd33b..3782d89006c 100644 --- a/ports/boost-detail/CONTROL +++ b/ports/boost-detail/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-detail -Version: 1.67.0 -Build-Depends: boost-compatibility, boost-config, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-compatibility, boost-config, boost-core, boost-vcpkg-helpers Description: Boost detail module diff --git a/ports/boost-detail/portfile.cmake b/ports/boost-detail/portfile.cmake index 93fe10eb1c0..0a4e1b2e172 100644 --- a/ports/boost-detail/portfile.cmake +++ b/ports/boost-detail/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/detail - REF boost-1.67.0 - SHA512 3746e61719cee4e7307677633edf170f8824b8fbd9aa7f159c9ff1feac662fc73f9a4bbe06fad9d9c5fbe356d6ec398d53223ddb7d85c01f906fe698f217f8b4 + REF boost-1.68.0 + SHA512 0e8188bc2ec189754a078b2b875d996dd485972ac995a999bf5ebbc6379ef299e7ba8d38066efac2d37d6a12e7ed6ee97d120ac334ea022a54609a18bd2447ec HEAD_REF master ) diff --git a/ports/boost-di/CONTROL b/ports/boost-di/CONTROL index 60ac13ceb9d..29105119e09 100644 --- a/ports/boost-di/CONTROL +++ b/ports/boost-di/CONTROL @@ -1,3 +1,3 @@ Source: boost-di -Version: 1.0.1 +Version: 1.0.2 Description: C++14 Dependency Injection Library. \ No newline at end of file diff --git a/ports/boost-di/portfile.cmake b/ports/boost-di/portfile.cmake index 38a1f99bd64..83ab057d1ae 100644 --- a/ports/boost-di/portfile.cmake +++ b/ports/boost-di/portfile.cmake @@ -1,11 +1,11 @@ #header-only library include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/di-1.0.1) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/di-1.0.2) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/boost-experimental/di/archive/v1.0.1.tar.gz" - FILENAME "di-1.0.1.tar.gz" - SHA512 4e7270be51e7c8d0dcb6e0ba4bcf8e12904016086bdd59667954815f4acb03fc62447775885594a8403f5067a20b2520717fe979926d740dff0efa0c97ebf20c + URLS "https://github.com/boost-experimental/di/archive/v1.0.2.tar.gz" + FILENAME "di-1.0.2.tar.gz" + SHA512 1a5fc3738db2c3c18c198ce58e82a60f4f3d39fb66c9dc2b465df89da66a19ffca79eca148e68cd70c76524185ba2145e2857504a25eda4fa70ffd2f05f3be40 ) vcpkg_extract_source_archive(${ARCHIVE}) diff --git a/ports/boost-disjoint-sets/CONTROL b/ports/boost-disjoint-sets/CONTROL index a3ea6717d9f..bce4318a609 100644 --- a/ports/boost-disjoint-sets/CONTROL +++ b/ports/boost-disjoint-sets/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-disjoint-sets -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-graph, boost-vcpkg-helpers Description: Boost disjoint_sets module diff --git a/ports/boost-disjoint-sets/portfile.cmake b/ports/boost-disjoint-sets/portfile.cmake index 8115c4d8ba4..71afb65e0e7 100644 --- a/ports/boost-disjoint-sets/portfile.cmake +++ b/ports/boost-disjoint-sets/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/disjoint_sets - REF boost-1.67.0 - SHA512 cc792b79935983656b40785520e3eef9b578a69fcc3c54b3ba24d60a8a36fccc86722dfc4ea621aec727d6c73b22586dbd38f253293dc46730cc418f6832bc33 + REF boost-1.68.0 + SHA512 3ce49942da8b37ad9a094bfbb7eda38efea2d50f70192246e955d4d34970b1069e1c04bdfa1272e6d92a31875b335e2eb2333ed66dbb8231d8206c5faac618a4 HEAD_REF master ) diff --git a/ports/boost-dll/CONTROL b/ports/boost-dll/CONTROL index f5b9f1b633a..f1787f9e1b0 100644 --- a/ports/boost-dll/CONTROL +++ b/ports/boost-dll/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-dll -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-core, boost-filesystem (!uwp), boost-integer, boost-move, boost-mpl, boost-predef, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-throw-exception, boost-type-index, boost-type-traits, boost-vcpkg-helpers, boost-winapi Description: Boost dll module diff --git a/ports/boost-dll/portfile.cmake b/ports/boost-dll/portfile.cmake index 51ce40f96ca..485476cc7ae 100644 --- a/ports/boost-dll/portfile.cmake +++ b/ports/boost-dll/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/dll - REF boost-1.67.0 - SHA512 bf8bb5e422abd2cded6aa1181570db487f2db786ce8261ed1816eae7e6a8386795f91d8c5ded981a691c19d82a5bffb2aabfe6f5c95ceccc6e22de35c854b21c + REF boost-1.68.0 + SHA512 5f45561397b8860da4cf9839bb7dbc79127c90f4134d038933414eb44cd1b2af422ee83df08ff6561e7dbab408159e64ef1c34594d1037a978478bd3fb4fa3ca HEAD_REF master ) diff --git a/ports/boost-dynamic-bitset/CONTROL b/ports/boost-dynamic-bitset/CONTROL index 7910a40107b..9f7c179e298 100644 --- a/ports/boost-dynamic-bitset/CONTROL +++ b/ports/boost-dynamic-bitset/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-dynamic-bitset -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-serialization, boost-vcpkg-helpers Description: Boost dynamic_bitset module diff --git a/ports/boost-dynamic-bitset/portfile.cmake b/ports/boost-dynamic-bitset/portfile.cmake index a612a4a7ea6..8ff4350fbbf 100644 --- a/ports/boost-dynamic-bitset/portfile.cmake +++ b/ports/boost-dynamic-bitset/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/dynamic_bitset - REF boost-1.67.0 - SHA512 242c7f79a50c98357017bfd09a3d2b27b2a9f1f8e12518eb497bd684ac9cf2dd6afdffb417a135a3648e40f4efb10c0f45703cff302212b8bdcf35ab1428955f + REF boost-1.68.0 + SHA512 7fa486d3088966fedcc30cced1282b997da39134dc1dcae3382a532c5b64a1965b761f8fd130ca7901aabd77375a84c66597c509c612ba1f99c238c0a754974c HEAD_REF master ) diff --git a/ports/boost-endian/CONTROL b/ports/boost-endian/CONTROL index 80aff90adca..325a29aa113 100644 --- a/ports/boost-endian/CONTROL +++ b/ports/boost-endian/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-endian -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-config, boost-core, boost-integer, boost-predef, boost-static-assert, boost-system, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost endian module diff --git a/ports/boost-endian/portfile.cmake b/ports/boost-endian/portfile.cmake index 18ff7dfaadc..79adace7ea4 100644 --- a/ports/boost-endian/portfile.cmake +++ b/ports/boost-endian/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/endian - REF boost-1.67.0 - SHA512 198cb5eb9b9f9a4ca6bd069c79f9222e748248d7f7f8231ab9b288334f3f77c37b398abc5d097463a4ce69b4f0de209f247d5f15b1ccdd0fcbf036009ddd73ad + REF boost-1.68.0 + SHA512 40d7b241198f3146b0dc4ff7ea637f8fdc28b2dca12badaeea6434ba1c56f2bd6ab0027e84da3805ba57daf9e3f99994bb2fbcac491eca39bec4e16b363c7da1 HEAD_REF master ) diff --git a/ports/boost-exception/CONTROL b/ports/boost-exception/CONTROL index 0a64b7cb99e..f1d18a0473a 100644 --- a/ports/boost-exception/CONTROL +++ b/ports/boost-exception/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-exception -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-modular-build-helper, boost-smart-ptr, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost exception module diff --git a/ports/boost-exception/portfile.cmake b/ports/boost-exception/portfile.cmake index 19c6c205896..e84166be932 100644 --- a/ports/boost-exception/portfile.cmake +++ b/ports/boost-exception/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/exception - REF boost-1.67.0 - SHA512 b5b27177ea5e434b7d8898b281a43ad1e74b02ce80b9cc184b34bebc3d43e39fe72b84003096f320b2fade1d0cfaa0a56d0a228fd96782cdd32c2fb143b78ae2 + REF boost-1.68.0 + SHA512 91eb014c73afe3dcedeacc827e12705530d97f1f3797cadcd17972ce016df630bb22eff27c5f2aec7380047264b90072ba4f17d37e93dbccd5cac7fdd7e32b2e HEAD_REF master ) diff --git a/ports/boost-fiber/CONTROL b/ports/boost-fiber/CONTROL index 1e200489f68..1dd685de9d1 100644 --- a/ports/boost-fiber/CONTROL +++ b/ports/boost-fiber/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-fiber -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-algorithm, boost-assert, boost-build, boost-config, boost-context (!uwp), boost-core, boost-detail, boost-filesystem (!uwp), boost-format, boost-intrusive, boost-modular-build-helper, boost-predef, boost-smart-ptr, boost-vcpkg-helpers Description: Boost fiber module diff --git a/ports/boost-fiber/portfile.cmake b/ports/boost-fiber/portfile.cmake index 244192dca48..7fddd97ef3c 100644 --- a/ports/boost-fiber/portfile.cmake +++ b/ports/boost-fiber/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/fiber - REF boost-1.67.0 - SHA512 2f29021b781a853fb0b00cb7a6e0a541f17d71af4f33e9a47fd875e06d3073e703dfba5cdc7a349b735a1083eff5039ebb227204f7e56f4ad949cafc485095b0 + REF boost-1.68.0 + SHA512 54325a9b6fcb7d153fd8705a44a802ad34d55af042bee9b74beebda6c66e470cf08bfe49ada6c8d9f2603847d7b695ceba7ebed8eaf1dc3fdf069d07717a47a9 HEAD_REF master ) diff --git a/ports/boost-filesystem/CONTROL b/ports/boost-filesystem/CONTROL index 503a4af37f9..cf685a086a0 100644 --- a/ports/boost-filesystem/CONTROL +++ b/ports/boost-filesystem/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-filesystem -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-functional, boost-integer, boost-io, boost-iterator, boost-modular-build-helper, boost-range, boost-smart-ptr, boost-static-assert, boost-system, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost filesystem module diff --git a/ports/boost-filesystem/portfile.cmake b/ports/boost-filesystem/portfile.cmake index c80609e3781..d177e7b181f 100644 --- a/ports/boost-filesystem/portfile.cmake +++ b/ports/boost-filesystem/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/filesystem - REF boost-1.67.0 - SHA512 a81dbf5dcf1b7bde572b02276ee25f78c5673d64aee8b5f864e6b2e04f29cdbf8ecd469b1f039bcda3b490372d3387121a896bf7faf30f767f63c107a1cf581d + REF boost-1.68.0 + SHA512 0861e64016e5c133f811735701814e0d35b99366835fdb9de0238e6c194b1c029d8fae9a1bb32e518729eab33f4e65700f8a5e5f14f06c64085873946dbb9163 HEAD_REF master ) diff --git a/ports/boost-flyweight/CONTROL b/ports/boost-flyweight/CONTROL index 49feb377c37..0817a8d62f0 100644 --- a/ports/boost-flyweight/CONTROL +++ b/ports/boost-flyweight/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-flyweight -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-functional, boost-interprocess, boost-mpl, boost-multi-index, boost-parameter, boost-preprocessor, boost-serialization, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost flyweight module diff --git a/ports/boost-flyweight/portfile.cmake b/ports/boost-flyweight/portfile.cmake index ab0e36ed350..cf4c0a141f3 100644 --- a/ports/boost-flyweight/portfile.cmake +++ b/ports/boost-flyweight/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/flyweight - REF boost-1.67.0 - SHA512 eec64c8c0d473e6bb07968c8cb2dd9c12788a72008d59c8b53b14ea15ada18e740c518df6bcece1cecd13f9511898c69e00693a769404d4e51e2f7efb6c00754 + REF boost-1.68.0 + SHA512 0d27d844d3f0899013d70f29c507cbefc67b76a4b9803aada0201946907705b1ac81aefda88855252806284e3ea9e074769f26eb65ae1d82e3ffec4a0ab59951 HEAD_REF master ) diff --git a/ports/boost-foreach/CONTROL b/ports/boost-foreach/CONTROL index 72cc98a56a8..914f3b5656e 100644 --- a/ports/boost-foreach/CONTROL +++ b/ports/boost-foreach/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-foreach -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-core, boost-detail, boost-iterator, boost-mpl, boost-range, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost foreach module diff --git a/ports/boost-foreach/portfile.cmake b/ports/boost-foreach/portfile.cmake index 59977a213a5..4e84360d89b 100644 --- a/ports/boost-foreach/portfile.cmake +++ b/ports/boost-foreach/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/foreach - REF boost-1.67.0 - SHA512 67cce17f58564a1ab09f85f9da3c73135dab2171be9487723e69d1bf10cb1abef2aae3747d39ca605510505510943a114d7637d49dd5f3b097c191b4993052b5 + REF boost-1.68.0 + SHA512 501f7caf4f0f4119e110aaacd6530cc7ed6df75b39e9fbd4e3423e4089f7ebdf2ae918a09ae140fdee4ef4eb9f787df21fe1c664aa031cdf1bf4fc447c9c69b0 HEAD_REF master ) diff --git a/ports/boost-format/CONTROL b/ports/boost-format/CONTROL index 0b8cf858d0c..c23ee8cf77b 100644 --- a/ports/boost-format/CONTROL +++ b/ports/boost-format/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-format -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-compatibility, boost-config, boost-core, boost-detail, boost-optional, boost-smart-ptr, boost-throw-exception, boost-utility, boost-vcpkg-helpers Description: Boost format module diff --git a/ports/boost-format/portfile.cmake b/ports/boost-format/portfile.cmake index d88559d644d..7e0537e0637 100644 --- a/ports/boost-format/portfile.cmake +++ b/ports/boost-format/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/format - REF boost-1.67.0 - SHA512 31d355d0986f18f32373a45ee6a5d4d8f688dcc3bd13fdf388dd77166459871deb33bc7ecc9dbbc46fcf546ba3ed8a475c5f4fdcf6377af320ec18d15a9a35d4 + REF boost-1.68.0 + SHA512 556acda0d0c7f7dc16cb83d0184aaa14dd0b1978f09c52dacc02a3e86d5d39a18e58d46818a18be36f781177538aa927c74cc48cc7bf5647aafc0ff1d4097d56 HEAD_REF master ) diff --git a/ports/boost-function-types/CONTROL b/ports/boost-function-types/CONTROL index bad8d7e563b..9a9bcb58c4d 100644 --- a/ports/boost-function-types/CONTROL +++ b/ports/boost-function-types/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-function-types -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-core, boost-detail, boost-mpl, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers Description: Boost function_types module diff --git a/ports/boost-function-types/portfile.cmake b/ports/boost-function-types/portfile.cmake index ee327ef33e1..06ea8e7d32c 100644 --- a/ports/boost-function-types/portfile.cmake +++ b/ports/boost-function-types/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/function_types - REF boost-1.67.0 - SHA512 843c87d527615c70524cd537252619187aa8088aa5e7f46bffa7d1bd75ba8852901ee89a15490ea90b0be331712d0e8b4db369f9aede83c150b7201b430f0adc + REF boost-1.68.0 + SHA512 1b3c41f5bb63b2ac6e2c303c66846c0e0041c536630dc0fe8260d72e91997d991fede951dc22809523c56f6bd951bf61e5c26f9fcef5d0b1721a1fcfa678008d HEAD_REF master ) diff --git a/ports/boost-function/CONTROL b/ports/boost-function/CONTROL index c9b474fd956..67885ee6b4a 100644 --- a/ports/boost-function/CONTROL +++ b/ports/boost-function/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-function -Version: 1.67.0 -Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-integer, boost-mpl, boost-preprocessor, boost-type-index, boost-typeof, boost-type-traits, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-detail, boost-integer, boost-mpl, boost-preprocessor, boost-type-index, boost-typeof, boost-type-traits, boost-vcpkg-helpers Description: Boost function module diff --git a/ports/boost-function/portfile.cmake b/ports/boost-function/portfile.cmake index b8c0a68417c..277bfb99a87 100644 --- a/ports/boost-function/portfile.cmake +++ b/ports/boost-function/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/function - REF boost-1.67.0 - SHA512 8484b7bcab099a0c96dc021a0a33551ecb0b56fee4bbc6c5a43becc0a82f307f3836204857bfc45aa2db255c7faf61831e8a46f537ebf9bd5730a408c7103c7c + REF boost-1.68.0 + SHA512 71e472987e07a3b60a60231b8e8e18a5ea7883ac9535741fd3ee1e95358e92ac4e00ed94f2428e31483f68632504704b245ad9bc42500a987eb11bbdbce9a7cd HEAD_REF master ) diff --git a/ports/boost-functional/CONTROL b/ports/boost-functional/CONTROL index 7b5b90be48e..5abca38fbf0 100644 --- a/ports/boost-functional/CONTROL +++ b/ports/boost-functional/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-functional -Version: 1.67.0 -Build-Depends: boost-config, boost-mpl, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-config, boost-core, boost-iterator, boost-mpl, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost functional module diff --git a/ports/boost-functional/portfile.cmake b/ports/boost-functional/portfile.cmake index 89ac3b17a22..0dc76ca8007 100644 --- a/ports/boost-functional/portfile.cmake +++ b/ports/boost-functional/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/functional - REF boost-1.67.0 - SHA512 05f8149975166b68a32e0e98b08b91e41b19d2304416afd62dfceaabf76323ee4b711aedc0e5379520d9e4decaeead1e6b8121737732f524d31664a3777670ba + REF boost-1.68.0 + SHA512 ca784716ed5fe2991cffd60534088e810854fcae1286fc9483d972e2d3c4f5fa6141943d276afcd3064a85f7407ee6db44fd3fb29580501972f6f3ebb8d3bcf2 HEAD_REF master ) diff --git a/ports/boost-fusion/CONTROL b/ports/boost-fusion/CONTROL index 62c087b1406..679e8267b28 100644 --- a/ports/boost-fusion/CONTROL +++ b/ports/boost-fusion/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-fusion -Version: 1.67.0 -Build-Depends: boost-config, boost-core, boost-detail, boost-functional, boost-function-types, boost-mpl, boost-preprocessor, boost-static-assert, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-config, boost-container-hash, boost-core, boost-detail, boost-function-types, boost-mpl, boost-preprocessor, boost-static-assert, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost fusion module diff --git a/ports/boost-fusion/portfile.cmake b/ports/boost-fusion/portfile.cmake index 164c4f70def..0a384809932 100644 --- a/ports/boost-fusion/portfile.cmake +++ b/ports/boost-fusion/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/fusion - REF boost-1.67.0 - SHA512 2ac1af4f1a9aa9b90fb7057a8133e668207225a46e23c5ec1e65020b8a63c6daeabbf799f0b7aa9946fc5f9dded1003e00c68645363fa9e15014f2af7ea1498b + REF boost-1.68.0 + SHA512 335400ecf1e9ce1e2cb40beb449a06e4d620d018c17383ffb6ee26a5fd676e2add905636db777e839d63639724b5745b740a65d92578e213b25ce2041afe14f6 HEAD_REF master ) diff --git a/ports/boost-geometry/CONTROL b/ports/boost-geometry/CONTROL index 52879d02412..1d044e1a21b 100644 --- a/ports/boost-geometry/CONTROL +++ b/ports/boost-geometry/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-geometry -Version: 1.67.0 -Build-Depends: boost-algorithm, boost-array, boost-assert, boost-concept-check, boost-config, boost-container, boost-core, boost-detail, boost-function-types, boost-fusion, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-move, boost-mpl, boost-multiprecision, boost-numeric-conversion, boost-polygon, boost-qvm, boost-range, boost-rational, boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-algorithm, boost-array, boost-assert, boost-concept-check, boost-config, boost-container, boost-core, boost-detail, boost-function-types, boost-fusion, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-move, boost-mpl, boost-multiprecision, boost-numeric-conversion, boost-polygon, boost-qvm, boost-range, boost-rational, boost-serialization, boost-smart-ptr, boost-static-assert, boost-thread (!arm), boost-throw-exception, boost-tokenizer, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers Description: Boost geometry module diff --git a/ports/boost-geometry/portfile.cmake b/ports/boost-geometry/portfile.cmake index 9b63741e936..320e8f6cafc 100644 --- a/ports/boost-geometry/portfile.cmake +++ b/ports/boost-geometry/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/geometry - REF boost-1.67.0 - SHA512 25a2a758804597054442747f9a3288989aee92e42212b1837562d3c629aa1ed0c210e86cb83f4501f7e4280550b194a727ef26ed222ef627a8d260549781bcd3 + REF boost-1.68.0 + SHA512 eecfacd3398238651d3bf02d6d8a8eaac15b262fca8652c6a5a60292ce6ded940176a061a705acdf7176732f48fe20ae388fff65c96b5742275506dd0a587e3c HEAD_REF master ) diff --git a/ports/boost-gil/CONTROL b/ports/boost-gil/CONTROL index 94770b5ee16..0326d13183d 100644 --- a/ports/boost-gil/CONTROL +++ b/ports/boost-gil/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-gil -Version: 1.67.0 -Build-Depends: boost-bind, boost-concept-check, boost-config, boost-integer, boost-iterator, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-algorithm, boost-bind, boost-concept-check, boost-config, boost-core, boost-filesystem (!uwp), boost-function, boost-integer, boost-iterator, boost-lambda, boost-mpl, boost-numeric-conversion, boost-preprocessor, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost gil module diff --git a/ports/boost-gil/portfile.cmake b/ports/boost-gil/portfile.cmake index 94e470ac99b..e278c7e99a0 100644 --- a/ports/boost-gil/portfile.cmake +++ b/ports/boost-gil/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/gil - REF boost-1.67.0 - SHA512 a40b89a97444d62ed1c6ba2c4ccf6442df9d8afddd7a9af8eacb0a587eb2952faabbd608ebd17030c10a3ce77f32dc6d4bed846fa78a0f57f4b992c0333a2d33 + REF boost-1.68.0 + SHA512 d3a965aca410f91c214d8f433273e08eefcc20f0e470baa2aba3385ce45a0e18307aae3b81ea619abe39066e4fd924476b7f29c8f45e1aff25a2a7d3eb4062fb HEAD_REF master ) diff --git a/ports/boost-graph-parallel/CONTROL b/ports/boost-graph-parallel/CONTROL index e7435bd2a54..d633943365c 100644 --- a/ports/boost-graph-parallel/CONTROL +++ b/ports/boost-graph-parallel/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-graph-parallel -Version: 1.67.0 -Build-Depends: boost-assert, boost-compatibility, boost-config, boost-detail, boost-dynamic-bitset, boost-function, boost-functional, boost-graph, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-container-hash, boost-detail, boost-dynamic-bitset, boost-function, boost-graph, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers Description: Boost graph_parallel module diff --git a/ports/boost-graph-parallel/portfile.cmake b/ports/boost-graph-parallel/portfile.cmake index 71b44bef28d..26323675b98 100644 --- a/ports/boost-graph-parallel/portfile.cmake +++ b/ports/boost-graph-parallel/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/graph_parallel - REF boost-1.67.0 - SHA512 f83c9bfb65c519e545657bd2e2752b37ce45d5e21877dd8a8fc36c895c5612cf0284508188be6b46719a5a5b771d5ad1e0fcb00a3082f7f9c5fb0788f2b9d560 + REF boost-1.68.0 + SHA512 668f8d2569cad12e5b5b173b0da012c1c43eb27e4a74d036b7bacdee3417a5148c8b30ecccbbd1b2cd30a8ffc92b6272a268b5595d5965a22a068779f8c2d1c7 HEAD_REF master ) diff --git a/ports/boost-graph/CONTROL b/ports/boost-graph/CONTROL index a3345ffa05e..ffc3d629f28 100644 --- a/ports/boost-graph/CONTROL +++ b/ports/boost-graph/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-graph -Version: 1.67.0 -Build-Depends: boost-algorithm, boost-any, boost-array, boost-assert, boost-bimap, boost-bind, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-conversion, boost-core, boost-detail, boost-foreach, boost-function, boost-functional, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-multi-index, boost-optional, boost-parameter, boost-preprocessor, boost-property-map, boost-property-tree, boost-random, boost-range, boost-regex, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-test (!uwp), boost-throw-exception, boost-tti, boost-tuple, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers, boost-xpressive +Version: 1.68.0 +Build-Depends: boost-algorithm, boost-any, boost-array, boost-assert, boost-bimap, boost-bind, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-container-hash, boost-conversion, boost-core, boost-detail, boost-foreach, boost-function, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-multi-index, boost-optional, boost-parameter, boost-preprocessor, boost-property-map, boost-property-tree, boost-random, boost-range, boost-regex, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-test (!uwp), boost-throw-exception, boost-tti, boost-tuple, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers, boost-xpressive Description: Boost graph module diff --git a/ports/boost-graph/portfile.cmake b/ports/boost-graph/portfile.cmake index 75048b8b601..b8285391c34 100644 --- a/ports/boost-graph/portfile.cmake +++ b/ports/boost-graph/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/graph - REF boost-1.67.0 - SHA512 afcfa95744da4f4ceefced30601d64a40fa600e3d41311f6140588d8a23e54fcb05226c381fcef0b8b992d61b95a915c867e50221c5290b6c54b915546b3935e + REF boost-1.68.0 + SHA512 97c05b444d5a4fbf8a881d5f674098b88afc6a331867357ff46c5372bd666847431e49e5f9fdca39a54bb1f56654c8c23a3cbfcf254e56743e7e9b20fe7fcd30 HEAD_REF master ) diff --git a/ports/boost-hana-msvc/CONTROL b/ports/boost-hana-msvc/CONTROL new file mode 100644 index 00000000000..0d2f178f836 --- /dev/null +++ b/ports/boost-hana-msvc/CONTROL @@ -0,0 +1,4 @@ +Source: boost-hana-msvc +Version: 1.67.0-1 +Build-Depends: boost-config, boost-core, boost-fusion, boost-mpl, boost-tuple, boost-vcpkg-helpers +Description: Boost hana module diff --git a/ports/boost-hana-msvc/portfile.cmake b/ports/boost-hana-msvc/portfile.cmake new file mode 100644 index 00000000000..a736e9324c9 --- /dev/null +++ b/ports/boost-hana-msvc/portfile.cmake @@ -0,0 +1,12 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/hana + REF 7f1ae3b1bb52f6eb329300a93dc02309c94dfe01 + SHA512 5fe1962ae270901b58eec83750edd02cc7192b4fae4add72849efbb9989dd5f9a0e3a85f3e3a7525fce38e6ef5bca210993b89d04a1c39bd0421bd0a6f4c92cb + HEAD_REF develop +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-hana/CONTROL b/ports/boost-hana/CONTROL index 0cdc62ad679..df3af582a13 100644 --- a/ports/boost-hana/CONTROL +++ b/ports/boost-hana/CONTROL @@ -1,5 +1,5 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 but has edits Source: boost-hana -Version: 1.67.0 -Build-Depends: boost-config, boost-core, boost-fusion, boost-mpl, boost-tuple, boost-vcpkg-helpers +Version: 1.68.0-1 +Build-Depends: boost-config, boost-core, boost-fusion, boost-mpl, boost-tuple, boost-vcpkg-helpers, boost-hana-msvc (windows), boost-hana-msvc (uwp) Description: Boost hana module diff --git a/ports/boost-hana/portfile.cmake b/ports/boost-hana/portfile.cmake index 5a48a4e9edf..ebc34aac34a 100644 --- a/ports/boost-hana/portfile.cmake +++ b/ports/boost-hana/portfile.cmake @@ -1,14 +1,20 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 but has edits include(vcpkg_common_functions) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + message("The current MSVC releases can't compile boost hana yet.") + message("Use a fork from boost 1.67 which has source workarounds instead.") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +else() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/hana - REF boost-1.67.0 - SHA512 45e8b9da8c09bd6cb74f52068f0e4af43f40126227ad5c557e111c8edce2e8857f5a11c6ecc6c57833041a38d9355a7c0263f9b84cc335725c994a9cb029411b + REF boost-1.68.0 + SHA512 93b20dc496ac6fa58ae75d523b8782b7c17398e93286698b48666e59af0c7df7410153dc02a8c4ca940d02ed8b948ea6f47b8f884ae2867e0cc8741e09e643ff HEAD_REF master ) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) +endif() diff --git a/ports/boost-heap/CONTROL b/ports/boost-heap/CONTROL index 5724d68e862..9dbacc49b95 100644 --- a/ports/boost-heap/CONTROL +++ b/ports/boost-heap/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-heap -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-array, boost-assert, boost-bind, boost-concept-check, boost-integer, boost-intrusive, boost-iterator, boost-mpl, boost-parameter, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost heap module diff --git a/ports/boost-heap/portfile.cmake b/ports/boost-heap/portfile.cmake index bdccbce0d36..4ac883b0562 100644 --- a/ports/boost-heap/portfile.cmake +++ b/ports/boost-heap/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/heap - REF boost-1.67.0 - SHA512 e8c511c8e1cdf0f9f20cf5923657f5a6dff2348a50570b0590444764106030bb40d7efa6e2087818ca71a11bf5fe62642ea08a4a8d7b2b25051f68a46c383a6d + REF boost-1.68.0 + SHA512 3aac4ee8f4ce4c578f83fefb19532aa859c966fa807a2f156a2428c4e9d44e3e5c09ff4588b43a9dfe46f32dadde03e942f8025551c267e677b3aad20343cbd1 HEAD_REF master ) diff --git a/ports/boost-hof/CONTROL b/ports/boost-hof/CONTROL index 886630ca5c4..38d3ebc6332 100644 --- a/ports/boost-hof/CONTROL +++ b/ports/boost-hof/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-hof -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-vcpkg-helpers Description: Boost hof module diff --git a/ports/boost-hof/portfile.cmake b/ports/boost-hof/portfile.cmake index 59fc833816c..5b8d97df011 100644 --- a/ports/boost-hof/portfile.cmake +++ b/ports/boost-hof/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/hof - REF boost-1.67.0 - SHA512 797240bb1a3ac0ed5335dd858db7816f7f07ce99794e5d7b16b08de82ae1d80e7de9f029673569d9f880cc616037299d50571ad7ffb94e30b2d7b08392b4d1c3 + REF boost-1.68.0 + SHA512 2400bd9f4329813802e569c608cf997c8fa571e042ab3811e780f7f95e69dc91ae9a31fc591aee75f80e85218147c442ed1b95aad533c5c4843310b5f9ced4ed HEAD_REF master ) diff --git a/ports/boost-icl/CONTROL b/ports/boost-icl/CONTROL index 2923589ef9c..1464e6c7c44 100644 --- a/ports/boost-icl/CONTROL +++ b/ports/boost-icl/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-icl -Version: 1.67.0 -Build-Depends: boost-assert, boost-concept-check, boost-config, boost-date-time, boost-detail, boost-iterator, boost-move, boost-mpl, boost-rational, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-assert, boost-concept-check, boost-config, boost-date-time, boost-detail, boost-iterator, boost-move, boost-mpl, boost-range, boost-rational, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost icl module diff --git a/ports/boost-icl/portfile.cmake b/ports/boost-icl/portfile.cmake index 0877698963a..8ab45b5f1eb 100644 --- a/ports/boost-icl/portfile.cmake +++ b/ports/boost-icl/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/icl - REF boost-1.67.0 - SHA512 1234057200f4329631041a6c1bc644e3096cb24df3e3b3c19bddbe9915e2b2e27148640666befa61e165e6143f47f83280e3a89f84b70c93fa07e6ab38d7c854 + REF boost-1.68.0 + SHA512 cdeba509b2b41c8dfcd808c5c6d478035cf48b0110e66889a8f9bc2183a8f5635e263f761894a3370d5ca421a08f2ab8c4f03b384ff3fe3eaeb9dce113d3c2e5 HEAD_REF master ) diff --git a/ports/boost-integer/CONTROL b/ports/boost-integer/CONTROL index adde53632b7..795c28fe90a 100644 --- a/ports/boost-integer/CONTROL +++ b/ports/boost-integer/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-integer -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-compatibility, boost-config, boost-core, boost-detail, boost-static-assert, boost-vcpkg-helpers Description: Boost integer module diff --git a/ports/boost-integer/portfile.cmake b/ports/boost-integer/portfile.cmake index 17bd4fbcb3f..6c9e8140a20 100644 --- a/ports/boost-integer/portfile.cmake +++ b/ports/boost-integer/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/integer - REF boost-1.67.0 - SHA512 bac11eb68d0f0a29919df25e29352daca3f24ab4c183f2f052fbbe1e4c93ac15657b24f9bd450b31910b33c68234581e834d51651585bbba7e69b10646ab224f + REF boost-1.68.0 + SHA512 3d257bb5b8313c2a884fa9959efe1f6d287c06e1b5746cbc4f9ae5694e61dfb2821d07b355d7e544594c9922a1ec86009dc8f92de9fc4d7b74db3383a817b3ba HEAD_REF master ) diff --git a/ports/boost-interprocess/CONTROL b/ports/boost-interprocess/CONTROL index 72f7f45a689..eaab7fe54ef 100644 --- a/ports/boost-interprocess/CONTROL +++ b/ports/boost-interprocess/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-interprocess -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-compatibility, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-integer, boost-intrusive, boost-move, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers Description: Boost interprocess module diff --git a/ports/boost-interprocess/portfile.cmake b/ports/boost-interprocess/portfile.cmake index b46d0dd9197..8a6ab0b6043 100644 --- a/ports/boost-interprocess/portfile.cmake +++ b/ports/boost-interprocess/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/interprocess - REF boost-1.67.0 - SHA512 ea4ece14b396220549bd3887330cd4a49149f303c936c03e27e232683235f62f759f44f0a473e24d3466bbadfd785633589caacaf620f861cddf03750c270467 + REF boost-1.68.0 + SHA512 f3899c4b6aa4619ff93715c2cca13782c7504cbb871adfb2e74e57534bd130b132a109726ecd5c3e9cf63794a90fd39c19f34f4011f702e6c427058bdaf9aad0 HEAD_REF master ) diff --git a/ports/boost-interval/CONTROL b/ports/boost-interval/CONTROL index c9f43b7d1e4..43d56a64460 100644 --- a/ports/boost-interval/CONTROL +++ b/ports/boost-interval/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-interval -Version: 1.67.0 -Build-Depends: boost-compatibility, boost-config, boost-logic (!uwp), boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-compatibility, boost-config, boost-logic, boost-vcpkg-helpers Description: Boost interval module diff --git a/ports/boost-interval/portfile.cmake b/ports/boost-interval/portfile.cmake index 373fe4777a2..dda65b7bcac 100644 --- a/ports/boost-interval/portfile.cmake +++ b/ports/boost-interval/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/interval - REF boost-1.67.0 - SHA512 fb02438e6e29ab3ce21fbb87cd8562d278f9f352b3964cb7a62a6f0ea0b38567af5bfd12973cdd48c6235283b0b7b6ef9ecfd9c9a130b14c22a9764aec6c2102 + REF boost-1.68.0 + SHA512 68596d0516e21132d9ea490ad7cdc66ed17e58f27a4f2a602481ba5e1b38fa51d6d4300108c2eaa1c457493212ee36ecd6f1d2a4b6ca3d1a4fbee23ad0216b38 HEAD_REF master ) diff --git a/ports/boost-intrusive/CONTROL b/ports/boost-intrusive/CONTROL index d7d7ae3f0ca..7a2fb5c15ce 100644 --- a/ports/boost-intrusive/CONTROL +++ b/ports/boost-intrusive/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-intrusive -Version: 1.67.0 -Build-Depends: boost-assert, boost-config, boost-core, boost-functional, boost-move, boost-static-assert, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-assert, boost-config, boost-container-hash, boost-core, boost-integer, boost-move, boost-static-assert, boost-vcpkg-helpers Description: Boost intrusive module diff --git a/ports/boost-intrusive/portfile.cmake b/ports/boost-intrusive/portfile.cmake index 73f5d7673e9..20e28c3103e 100644 --- a/ports/boost-intrusive/portfile.cmake +++ b/ports/boost-intrusive/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/intrusive - REF boost-1.67.0 - SHA512 9181b1c7ea651c4c8aa0ae226b2a35cb65521da105249b12af899e294ed1f20868002846a3f200b40d51c795c0a6e6b3b2b2f41ea59e817a842cb09aadcf9f9e + REF boost-1.68.0 + SHA512 f37c6b1198dc811a8b169b9161ad89eb84db2283456b25f7d5eab770f2fe9ff1991da3655dceff23bc3d7bbf3b0d266f0f6f7e6e35fb44a3a6bdf8af651d4208 HEAD_REF master ) diff --git a/ports/boost-io/CONTROL b/ports/boost-io/CONTROL index 26764cae4dd..8167e9047a8 100644 --- a/ports/boost-io/CONTROL +++ b/ports/boost-io/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-io -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-detail, boost-vcpkg-helpers Description: Boost io module diff --git a/ports/boost-io/portfile.cmake b/ports/boost-io/portfile.cmake index 729e221751c..cfd71f00ee8 100644 --- a/ports/boost-io/portfile.cmake +++ b/ports/boost-io/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/io - REF boost-1.67.0 - SHA512 a0549634a0d2afe1646437dab5b018a139f9e1b98fb3cb2a5730262700d64aa54a87a9676901ac192676fc5ee4b61aee11205f20acaa0da5746844ac292a913a + REF boost-1.68.0 + SHA512 a1971233e7deccc8354abeb6ab9b4e5955e4ed8b37ab563c0b07e8afaeec6f5c218f06dd60b19df8b836125f431a7032fad4f8b25e14484db5fac1eb9d1cbe01 HEAD_REF master ) diff --git a/ports/boost-iostreams/CONTROL b/ports/boost-iostreams/CONTROL index 249031a5a4a..f88cc5424a2 100644 --- a/ports/boost-iostreams/CONTROL +++ b/ports/boost-iostreams/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-iostreams -Version: 1.67.0 -Build-Depends: boost-assert, boost-bind, boost-build, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-modular-build-helper, boost-mpl, boost-preprocessor, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, bzip2, zlib, liblzma +Version: 1.68.0 +Build-Depends: boost-assert, boost-bind, boost-build, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-modular-build-helper, boost-mpl, boost-preprocessor, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, bzip2, liblzma, zlib Description: Boost iostreams module diff --git a/ports/boost-iostreams/Removeseekpos.patch b/ports/boost-iostreams/Removeseekpos.patch new file mode 100644 index 00000000000..c2a5d4770ad --- /dev/null +++ b/ports/boost-iostreams/Removeseekpos.patch @@ -0,0 +1,13 @@ +diff --git a/include/boost/iostreams/positioning.hpp b/include/boost/iostreams/positioning.hpp +index 12f2afc..709da7d 100644 +--- a/include/boost/iostreams/positioning.hpp ++++ b/include/boost/iostreams/positioning.hpp +@@ -93,7 +93,7 @@ inline stream_offset fpos_t_to_offset(std::fpos_t pos) + inline std::fpos_t streampos_to_fpos_t(std::streampos pos) + { + # if defined (_CPPLIB_VER) || defined(__IBMCPP__) +- return pos.seekpos(); ++ return pos; + # else + return pos.get_fpos_t(); + # endif diff --git a/ports/boost-iostreams/portfile.cmake b/ports/boost-iostreams/portfile.cmake index c929f9ed771..4463749be8d 100644 --- a/ports/boost-iostreams/portfile.cmake +++ b/ports/boost-iostreams/portfile.cmake @@ -5,9 +5,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/iostreams - REF boost-1.67.0 - SHA512 73fada0b6e236e0b86f28d8cf75e71dfb6b6a84622986cd72f39de3a310442e6122c91d22ba95bd29381dd559f5cac52a1e28cf97e7e8a6f0c70ccc4f38ceeba + REF boost-1.68.0 + SHA512 a0c008537c2ceb8ea4f9d1fe7e66fea01f55d753e3b349aa3f664f7a0cd129f11770e520645a18feabde4110f6471194e8bae2479b95ac6d13d8b42be43c5f2e HEAD_REF master + PATCHES "${CURRENT_PORT_DIR}/Removeseekpos.patch" ) vcpkg_download_distfile(LICENSE diff --git a/ports/boost-iterator/CONTROL b/ports/boost-iterator/CONTROL index f6acb2afadc..e428601ec1c 100644 --- a/ports/boost-iterator/CONTROL +++ b/ports/boost-iterator/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-iterator -Version: 1.67.0 -Build-Depends: boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-function-types, boost-fusion, boost-mpl, boost-optional, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-conversion, boost-core, boost-detail, boost-function-types, boost-fusion, boost-mpl, boost-optional, boost-smart-ptr, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost iterator module diff --git a/ports/boost-iterator/portfile.cmake b/ports/boost-iterator/portfile.cmake index e2163a62052..88a664b8f64 100644 --- a/ports/boost-iterator/portfile.cmake +++ b/ports/boost-iterator/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/iterator - REF boost-1.67.0 - SHA512 245a63416ae578b494328798d578fe3f253e339abd10c047a14137181759b99d02a9eef4fa4872b794154378a1b80b12fd502849d67b8b13012e6b08b66b650e + REF boost-1.68.0 + SHA512 e8e223bc5b9334618d676e2aefdeffdde6f31097b634d2ca1fa3d6e73976c42dd123ed76081e13d1f023a7d39f49cc53d63b28e541c2aae858cbf569818bd14e HEAD_REF master ) diff --git a/ports/boost-lambda/CONTROL b/ports/boost-lambda/CONTROL index a1996dfbf75..9355d323f70 100644 --- a/ports/boost-lambda/CONTROL +++ b/ports/boost-lambda/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-lambda -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-bind, boost-config, boost-detail, boost-mpl, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost lambda module diff --git a/ports/boost-lambda/portfile.cmake b/ports/boost-lambda/portfile.cmake index b14d46c9769..b8303375c62 100644 --- a/ports/boost-lambda/portfile.cmake +++ b/ports/boost-lambda/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/lambda - REF boost-1.67.0 - SHA512 d95b3df3321639c4ced7db0fa10e5f204d20961a95d185080a40477520a591b5806974ec7cb28256bbb8b58e2f635cac60fff47eefabe29c5c3fabda211e276f + REF boost-1.68.0 + SHA512 7395399071a6d63027685e00f67af1db87e1f89bba54f7f78ee05d1e80d0c7253382f451dcff7c077088f6075f5bdd52d0dfdc745b8a337f575075c5bfd87f6f HEAD_REF master ) diff --git a/ports/boost-lexical-cast/CONTROL b/ports/boost-lexical-cast/CONTROL index 68b6e1e0548..24004d4598d 100644 --- a/ports/boost-lexical-cast/CONTROL +++ b/ports/boost-lexical-cast/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-lexical-cast -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-array, boost-assert, boost-compatibility, boost-config, boost-container, boost-core, boost-detail, boost-integer, boost-mpl, boost-numeric-conversion, boost-range, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost lexical_cast module diff --git a/ports/boost-lexical-cast/portfile.cmake b/ports/boost-lexical-cast/portfile.cmake index 877a8cf8460..bd61dffc017 100644 --- a/ports/boost-lexical-cast/portfile.cmake +++ b/ports/boost-lexical-cast/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/lexical_cast - REF boost-1.67.0 - SHA512 b3c0c4e94265784001d8b9fc317a2bafe4c83aede9311a7172a76b1c0bf47cc811f7963e9580d0d3f0527f16531abb204b9201c0cc611dd322bcfce2671fa54d + REF boost-1.68.0 + SHA512 212bc947b64e07e2c3f41663dba157960895539a7662e13d53ccd3327c0cfb506d2294badd1b6c6f102ebc851ba602c384d1eaf85a4875e9d538dc23340cba75 HEAD_REF master ) diff --git a/ports/boost-local-function/CONTROL b/ports/boost-local-function/CONTROL index 415cba13d73..ae5ba558019 100644 --- a/ports/boost-local-function/CONTROL +++ b/ports/boost-local-function/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-local-function -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-mpl, boost-preprocessor, boost-scope-exit, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost local_function module diff --git a/ports/boost-local-function/portfile.cmake b/ports/boost-local-function/portfile.cmake index 95d8334f6a0..b28718cb920 100644 --- a/ports/boost-local-function/portfile.cmake +++ b/ports/boost-local-function/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/local_function - REF boost-1.67.0 - SHA512 dfe717ff4fd46a44422162fa00289a1f57aaed42215d238b4219d493bf4945564e1d6103599c0c3d90ed196eff2dc7ad6f0949e284ddfc9c6f400620b63ebaf8 + REF boost-1.68.0 + SHA512 063158b6a66f82521298b22a597442671219e76a038452cb163de6f095682cfbfaf998a2b69adcd2913f9cf8a633b7e99b1e540a60e3c95092162806b92d23f0 HEAD_REF master ) diff --git a/ports/boost-locale/CONTROL b/ports/boost-locale/CONTROL index eca61edd42f..3bc4af16645 100644 --- a/ports/boost-locale/CONTROL +++ b/ports/boost-locale/CONTROL @@ -1,7 +1,7 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-locale -Version: 1.67.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-function, boost-integer, boost-iterator, boost-modular-build-helper, boost-smart-ptr, boost-static-assert, boost-thread (!uwp), boost-type-traits, boost-unordered, boost-vcpkg-helpers, libiconv (!uwp&!windows) +Version: 1.68.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-function, boost-integer, boost-iterator, boost-modular-build-helper, boost-smart-ptr, boost-static-assert, boost-thread (!arm), boost-type-traits, boost-unordered, boost-vcpkg-helpers, libiconv (!uwp&!windows) Description: Boost locale module Feature: icu diff --git a/ports/boost-locale/portfile.cmake b/ports/boost-locale/portfile.cmake index c4dbf922968..a6678b5055a 100644 --- a/ports/boost-locale/portfile.cmake +++ b/ports/boost-locale/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/locale - REF boost-1.67.0 - SHA512 220ed43884722e7a342b8fa5010e8659ccebcd106907c38052b411d710f110924a2b4622cb10e1302ad0553cf350430f02c63e3e66d45bb38b47d7eb022d01d9 + REF boost-1.68.0 + SHA512 6e7c85a307ff8c8f41b1002e02c5c68d9ca5c89e95063adc0f134a5c96be728334f1a0548f92c07f85ed639b73588e49df1b0c2d964fa83cee86c746634d5b94 HEAD_REF master ) diff --git a/ports/boost-lockfree/CONTROL b/ports/boost-lockfree/CONTROL index ca9746fdc79..bc193d0ecdc 100644 --- a/ports/boost-lockfree/CONTROL +++ b/ports/boost-lockfree/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-lockfree -Version: 1.67.0 -Build-Depends: boost-align, boost-array, boost-assert, boost-atomic, boost-config, boost-core, boost-integer, boost-mpl, boost-parameter, boost-predef, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.68.0-1 +Build-Depends: boost-align, boost-array, boost-assert, boost-atomic, boost-config, boost-core, boost-integer, boost-mpl, boost-parameter, boost-predef, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-iterator, boost-vcpkg-helpers Description: Boost lockfree module diff --git a/ports/boost-lockfree/portfile.cmake b/ports/boost-lockfree/portfile.cmake index af6f8045486..d3563af0c55 100644 --- a/ports/boost-lockfree/portfile.cmake +++ b/ports/boost-lockfree/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/lockfree - REF boost-1.67.0 - SHA512 d4287c5782191469a077f7cebfa64d72733f186fe627e9fa97a3856168423f9f606168bb67b47814ef2047f0b7434c02dc6ff93ba3f817923d3dff22f46360f9 + REF boost-1.68.0 + SHA512 ccdd2e1e1815140c6ef5f7ca7d2b5551038f14b4cebcc5ce95c15ee0799a2e9cc2c1027d166be975d06d9027386992ab5c40f8c1b633b9c82eb087c9ad648d8b HEAD_REF master ) diff --git a/ports/boost-log/CONTROL b/ports/boost-log/CONTROL index 6f4116b03e5..0d386058779 100644 --- a/ports/boost-log/CONTROL +++ b/ports/boost-log/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-log -Version: 1.67.0 -Build-Depends: boost-align, boost-array, boost-asio, boost-assert, boost-atomic, boost-bind, boost-build, boost-compatibility, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-exception, boost-filesystem (!uwp), boost-function-types, boost-fusion, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iterator, boost-lexical-cast, boost-locale (!uwp), boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-optional, boost-parameter, boost-phoenix, boost-predef, boost-preprocessor, boost-property-tree, boost-proto, boost-random, boost-range, boost-regex, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-thread (!uwp), boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi, boost-xpressive +Version: 1.68.0 +Build-Depends: boost-align, boost-array, boost-asio, boost-assert, boost-atomic, boost-bind, boost-build, boost-compatibility, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-exception, boost-filesystem (!uwp), boost-function-types, boost-fusion, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iterator, boost-lexical-cast, boost-locale (!uwp), boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-optional, boost-parameter, boost-phoenix, boost-predef, boost-preprocessor, boost-property-tree, boost-proto, boost-random, boost-range, boost-regex, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-thread (!arm), boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi, boost-xpressive Description: Boost log module diff --git a/ports/boost-log/portfile.cmake b/ports/boost-log/portfile.cmake index 5d9dbb622d3..cbc96ef8741 100644 --- a/ports/boost-log/portfile.cmake +++ b/ports/boost-log/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/log - REF boost-1.67.0 - SHA512 68046c749156e11c8c1aa256a54bc89d809b2fa627565051ef09481378cb401eeaec533585f34ce065abb1e416381be536ca19ad972d35b3096e4332d1ffee9d + REF boost-1.68.0 + SHA512 d12f9b2d8f782e4df5df16fe6c5267c87266348f6c7c400a9c6ff0b1b7af34ee8baf3d0b4dc4aef20b0a5faf4582d5c90d3429df84d903773bef3e61df93a0d9 HEAD_REF master ) diff --git a/ports/boost-logic/CONTROL b/ports/boost-logic/CONTROL index 32310be7c1f..cad7c4d1c93 100644 --- a/ports/boost-logic/CONTROL +++ b/ports/boost-logic/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-logic -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-core, boost-detail, boost-vcpkg-helpers Description: Boost logic module diff --git a/ports/boost-logic/portfile.cmake b/ports/boost-logic/portfile.cmake index fce91a705a5..65810e540a9 100644 --- a/ports/boost-logic/portfile.cmake +++ b/ports/boost-logic/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/logic - REF boost-1.67.0 - SHA512 2a82bbfcea9d1a4ed8563374dc8796873b05ab474edebaea9a9e983148c80ce9bd76625d2bf7e40942c328321cf259ddc70f89550f43a4c6c3e36cb7e5cbe569 + REF boost-1.68.0 + SHA512 9d37657394355cad8286bafceefd93112552c2b867e2d4508a16eae8f051922f14f67f3a2cf903f8c371618c4eeed7d70a4bf9067b8404b66b6f224fda5ad85e HEAD_REF master ) diff --git a/ports/boost-math/CONTROL b/ports/boost-math/CONTROL index d9cc1cf1ac4..3667203a46f 100644 --- a/ports/boost-math/CONTROL +++ b/ports/boost-math/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-math -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-array, boost-assert, boost-atomic, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-fusion, boost-integer, boost-lambda, boost-lexical-cast, boost-modular-build-helper, boost-mpl, boost-predef, boost-range, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost math module diff --git a/ports/boost-math/portfile.cmake b/ports/boost-math/portfile.cmake index cfeb034fa0a..3ad1251b81b 100644 --- a/ports/boost-math/portfile.cmake +++ b/ports/boost-math/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/math - REF boost-1.67.0 - SHA512 7d84aacd9a39daf61f836cf522331ea21b18413b28716a2620fcf49c05b32e0e2f7e14f7bd207fc1df7a6b450356158891ef2576335911b0d6a3f78326eb8c62 + REF boost-1.68.0 + SHA512 3727b6245fe3e6ba3af06f4653251b7d553dc01b83b06b812760e20fb9cd0bbbb2fe0bd7d3cc8b035f503d93e82e51ddb129b1e844944c1284560b212f663748 HEAD_REF master ) diff --git a/ports/boost-metaparse/CONTROL b/ports/boost-metaparse/CONTROL index 86ddf75f1dd..23d84cff62c 100644 --- a/ports/boost-metaparse/CONTROL +++ b/ports/boost-metaparse/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-metaparse -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-mpl, boost-predef, boost-preprocessor, boost-static-assert, boost-type-traits, boost-vcpkg-helpers Description: Boost metaparse module diff --git a/ports/boost-metaparse/portfile.cmake b/ports/boost-metaparse/portfile.cmake index d25238629ab..b07eff75f94 100644 --- a/ports/boost-metaparse/portfile.cmake +++ b/ports/boost-metaparse/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/metaparse - REF boost-1.67.0 - SHA512 d92a78f3dd56083464bb2544427e87c5208d716f509452ada3150fb1beb43caae4dba16daf6626ae0783d1ae0812bbe49be23a638138bccdca873037857ec7a4 + REF boost-1.68.0 + SHA512 2ab40e9ea0d14d4aa0b98b619a520d5fe974be9f89604d27eed0f1164762e239ce1b2d936faaed0574020dd5162dcc74a89a0ddf9835380abfa5aa10882cbe7a HEAD_REF master ) diff --git a/ports/boost-modular-build-helper/CMakeLists.txt b/ports/boost-modular-build-helper/CMakeLists.txt index f75a6ee669b..df109c57e2e 100644 --- a/ports/boost-modular-build-helper/CMakeLists.txt +++ b/ports/boost-modular-build-helper/CMakeLists.txt @@ -28,8 +28,10 @@ else() list(APPEND B2_OPTIONS link=static) endif() -if(CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64") +if(CMAKE_SIZEOF_VOID_P EQUAL 8) list(APPEND B2_OPTIONS address-model=64) +else() + list(APPEND B2_OPTIONS address-model=32) endif() if(APPLE) @@ -38,7 +40,39 @@ else() list(APPEND B2_OPTIONS target-os=linux toolset=gcc) endif() -string(REPLACE " " " " CXXFLAGS "${CMAKE_CXX_FLAGS}") +# Properly handle compiler and linker flags passed by VCPKG +if(CMAKE_BUILD_TYPE STREQUAL "Release") + set(CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}") + set(CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}") + if(BUILD_SHARED_LIBS) + set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") + else() + set(LDFLAGS "${CMAKE_STATIC_LINKER_FLAGS} ${CMAKE_STATIC_LINKER_FLAGS_RELEASE}") + endif() +elseif(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}") + set(CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG}") + if(BUILD_SHARED_LIBS) + set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_DEBUG}") + else() + set(LDFLAGS "${CMAKE_STATIC_LINKER_FLAGS} ${CMAKE_STATIC_LINKER_FLAGS_DEBUG}") + endif() +endif() + +string(STRIP "${CXXFLAGS}" CXXFLAGS) +string(STRIP "${CFLAGS}" CFLAGS) +string(STRIP "${LDFLAGS}" LDFLAGS) + +if(NOT CXXFLAGS STREQUAL "") + string(REPLACE " " " " CXXFLAGS "${CXXFLAGS}") +endif() +if(NOT CFLAGS STREQUAL "") + string(REPLACE " " " " CFLAGS "${CFLAGS}") +endif() +if(NOT LDLAGS STREQUAL "") + string(REPLACE " " " " LDFLAGS "${LDFLAGS}") +endif() + #set(CXXFLAGS "${CXXFLAGS} -Wno-error=unused-command-line-argument") if(CMAKE_CXX_COMPILER_TARGET) set(CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_TARGET} ${CMAKE_CXX_COMPILER_TARGET}") diff --git a/ports/boost-modular-build-helper/CONTROL b/ports/boost-modular-build-helper/CONTROL index 7324d6ba091..a598c741dc4 100644 --- a/ports/boost-modular-build-helper/CONTROL +++ b/ports/boost-modular-build-helper/CONTROL @@ -1,2 +1,2 @@ Source: boost-modular-build-helper -Version: 2018-04-16-4 +Version: 2018-10-19 diff --git a/ports/boost-modular-build-helper/Jamroot.jam b/ports/boost-modular-build-helper/Jamroot.jam index 8c24fff866c..997c1234e5e 100644 --- a/ports/boost-modular-build-helper/Jamroot.jam +++ b/ports/boost-modular-build-helper/Jamroot.jam @@ -1,5 +1,5 @@ -constant BOOST_VERSION : 1.67.0 ; -constant BOOST_VERSION_ABI_TAG : 1_67 ; +constant BOOST_VERSION : 1.68.0 ; +constant BOOST_VERSION_ABI_TAG : 1_68 ; constant BOOST_JAMROOT_MODULE : $(__name__) ; import boostcpp ; diff --git a/ports/boost-modular-build-helper/boost-modular-build.cmake b/ports/boost-modular-build-helper/boost-modular-build.cmake index d2876217556..2dfb19f6b26 100644 --- a/ports/boost-modular-build-helper/boost-modular-build.cmake +++ b/ports/boost-modular-build-helper/boost-modular-build.cmake @@ -164,6 +164,45 @@ function(boost_modular_build) -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}/lib" ) + # Properly handle compiler and linker flags passed by VCPKG + if(VCPKG_CXX_FLAGS) + list(APPEND _bm_OPTIONS cxxflags="${VCPKG_CXX_FLAGS}") + endif() + + if(VCPKG_CXX_FLAGS_RELEASE) + list(APPEND _bm_OPTIONS_REL cxxflags="${VCPKG_CXX_FLAGS_RELEASE}") + endif() + + if(VCPKG_CXX_FLAGS_DEBUG) + list(APPEND _bm_OPTIONS_DBG cxxflags="${VCPKG_CXX_FLAGS_DEBUG}") + endif() + + + if(VCPKG_C_FLAGS) + list(APPEND _bm_OPTIONS cflags="${VCPKG_C_FLAGS}") + endif() + + if(VCPKG_C_FLAGS_RELEASE) + list(APPEND _bm_OPTIONS_REL cflags="${VCPKG_C_FLAGS_RELEASE}") + endif() + + if(VCPKG_C_FLAGS_DEBUG) + list(APPEND _bm_OPTIONS_DBG cflags="${VCPKG_C_FLAGS_DEBUG}") + endif() + + + if(VCPKG_LINKER_FLAGS) + list(APPEND _bm_OPTIONS linkflags="${VCPKG_LINKER_FLAGS}") + endif() + + if(VCPKG_LINKER_FLAGS_RELEASE) + list(APPEND _bm_OPTIONS_REL linkflags="${VCPKG_LINKER_FLAGS_RELEASE}") + endif() + + if(VCPKG_LINKER_FLAGS_DEBUG) + list(APPEND _bm_OPTIONS_DBG linkflags="${VCPKG_LINKER_FLAGS_DEBUG}") + endif() + # Add build type specific options if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") @@ -309,7 +348,7 @@ function(boost_modular_build) string(REPLACE "-x64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries string(REPLACE "-a32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries string(REPLACE "-a64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries - string(REPLACE "-1_67" "" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake > 3.10 to locate the binaries + string(REPLACE "-1_68" "" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake > 3.10 to locate the binaries string(REPLACE "_python3-" "_python-" NEW_FILENAME ${NEW_FILENAME}) if("${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}" STREQUAL "${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}") # nothing to do diff --git a/ports/boost-modular-build-helper/user-config.jam b/ports/boost-modular-build-helper/user-config.jam index abefc7faed8..78677c0ab2e 100644 --- a/ports/boost-modular-build-helper/user-config.jam +++ b/ports/boost-modular-build-helper/user-config.jam @@ -14,6 +14,8 @@ else @CMAKE_RANLIB@ @CMAKE_AR@ @CXXFLAGS@ + @CFLAGS@ + @LDFLAGS@ # MINGW here causes b2 to not run cygpath mingw ; diff --git a/ports/boost-move/CONTROL b/ports/boost-move/CONTROL index 4f68406d41b..bfefee6c012 100644 --- a/ports/boost-move/CONTROL +++ b/ports/boost-move/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-move -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-config, boost-detail, boost-integer, boost-static-assert, boost-vcpkg-helpers Description: Boost move module diff --git a/ports/boost-move/portfile.cmake b/ports/boost-move/portfile.cmake index f0b02398d62..c7b0a93875a 100644 --- a/ports/boost-move/portfile.cmake +++ b/ports/boost-move/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/move - REF boost-1.67.0 - SHA512 4ff739fbd59db18b4e8ec6b2bd85072422a6253b964d5f12c49e8c0f022ad5760927f753c4b1e75bcb7c38fd8e6f7a9b31aa58b5f8672eb273011a8602dfeb80 + REF boost-1.68.0 + SHA512 7d7032d182a37ba8feb4d60520aac6c31e00c81f2dd7523846f9dddf5def6b78fc74d0f7dc769609d252fdac81a1cbf2e4897b862f35313084b69f6539abb7fa HEAD_REF master ) diff --git a/ports/boost-mp11/CONTROL b/ports/boost-mp11/CONTROL index fa92b50d1ca..a251cdc331f 100644 --- a/ports/boost-mp11/CONTROL +++ b/ports/boost-mp11/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-mp11 -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-vcpkg-helpers Description: Boost mp11 module diff --git a/ports/boost-mp11/portfile.cmake b/ports/boost-mp11/portfile.cmake index 95aa349b255..b64e20813da 100644 --- a/ports/boost-mp11/portfile.cmake +++ b/ports/boost-mp11/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/mp11 - REF boost-1.67.0 - SHA512 baf1127b837db0902576bbb7f4bb09ad8f38f19ae45025879ae49ba9fef723647460b35a58f81d6bb7cf7dbbf94ff81cd32a948540e276660c8b8de5318f474b + REF boost-1.68.0 + SHA512 828efcb915b5702c0ff673cbd1543110c60dbd06718fe225e6156d173926b9663bd56c3c7e11c2444245447d776e4135f280f0dfc0424ee1f224a49f95360be0 HEAD_REF master ) diff --git a/ports/boost-mpi/CONTROL b/ports/boost-mpi/CONTROL index c6d33eb26cc..9ec537adcff 100644 --- a/ports/boost-mpi/CONTROL +++ b/ports/boost-mpi/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-mpi -Version: 1.67.0-1 +Version: 1.68.0-1 Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-foreach, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-mpl, boost-optional, boost-property-map, boost-python (windows), boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, msmpi Description: Boost mpi module diff --git a/ports/boost-mpi/portfile.cmake b/ports/boost-mpi/portfile.cmake index ac67bd677cf..583ee1c5668 100644 --- a/ports/boost-mpi/portfile.cmake +++ b/ports/boost-mpi/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/mpi - REF boost-1.67.0 - SHA512 fd9c5795db268dbd16bfc051344f6f58ca691dafefb05e2f89521db84d57c6f0ee3f750a75d06b3aaefb14261d0bc40f5e002932383ae0f03c6456d0086c6b8e + REF boost-1.68.0 + SHA512 63d6d7d37a96aa5456c90d7c219603d9a36e94de5009af0cfbab7839f1756188ebda8c55f7333124e6d61a7d73e68a9c2dab6eb12f6b4c7ecd06ff5cad0bb231 HEAD_REF master ) diff --git a/ports/boost-mpl/CONTROL b/ports/boost-mpl/CONTROL index 350007a5311..c267b373802 100644 --- a/ports/boost-mpl/CONTROL +++ b/ports/boost-mpl/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-mpl -Version: 1.67.0 -Build-Depends: boost-config, boost-core, boost-detail, boost-predef, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-bind, boost-config, boost-core, boost-detail, boost-predef, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers Description: Boost mpl module diff --git a/ports/boost-mpl/portfile.cmake b/ports/boost-mpl/portfile.cmake index 92f6df54b81..dca0d86d803 100644 --- a/ports/boost-mpl/portfile.cmake +++ b/ports/boost-mpl/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/mpl - REF boost-1.67.0 - SHA512 90143065ae6a180dd542ad50ceb111d221b587e6e109707c3421582996f0918828f42df69d1e44071981996f30fe59e969efa2271a8b70e70a10516f9b83b1f4 + REF boost-1.68.0 + SHA512 a35139c56fd06c560783844cb5b3ddc4643aa6aa7e3bce76e0b4f24d5b7ace962a0ade60973ab21083a06e824a4701c7b6c534376b2323934a21cda438f1de61 HEAD_REF master ) diff --git a/ports/boost-msm/CONTROL b/ports/boost-msm/CONTROL index 704e55defc4..7fbe896b430 100644 --- a/ports/boost-msm/CONTROL +++ b/ports/boost-msm/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-msm -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-any, boost-assert, boost-bind, boost-circular-buffer, boost-config, boost-core, boost-detail, boost-function, boost-fusion, boost-mpl, boost-parameter, boost-phoenix, boost-preprocessor, boost-proto, boost-serialization, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost msm module diff --git a/ports/boost-msm/portfile.cmake b/ports/boost-msm/portfile.cmake index c22d53aa322..e376c8e708f 100644 --- a/ports/boost-msm/portfile.cmake +++ b/ports/boost-msm/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/msm - REF boost-1.67.0 - SHA512 073afc97247d0cf6eb579cffafbd43696390b28125d7e104cba4b5e2ac6120b24f64c5fa167f5e5958d7e7fb93eb7ea698b660f9fcee781bd84068919f6512e7 + REF boost-1.68.0 + SHA512 166b5c7b3ced589c196c951b24461ee3cdb46c0d19823a32b5cb0f1577eaaf6738b9cce2a721a2ca5a4c7be009a7a4b890d5353132ba443a97bcff6108a70728 HEAD_REF master ) diff --git a/ports/boost-multi-array/CONTROL b/ports/boost-multi-array/CONTROL index efa6049e723..62dfc32dc97 100644 --- a/ports/boost-multi-array/CONTROL +++ b/ports/boost-multi-array/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-multi-array -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-compatibility, boost-config, boost-vcpkg-helpers Description: Boost multi_array module diff --git a/ports/boost-multi-array/portfile.cmake b/ports/boost-multi-array/portfile.cmake index 93ff6b0aab1..c89522d5273 100644 --- a/ports/boost-multi-array/portfile.cmake +++ b/ports/boost-multi-array/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/multi_array - REF boost-1.67.0 - SHA512 a1f58b1223ffc6935d3ff9dd599dea294af36e9532adef471be0c971450ffd5ebafed6b0ab61637663df22e933b066eccac1fa50c783961d7a4bcf209c7d0fbb + REF boost-1.68.0 + SHA512 ed2bc9d838644e814b83ea771d1952d88a8f997649bfcdeec1b8463946aa842139e8a8a269aada447428346e7d31b6aeb17ffa372fb2ade2e17dbffbaeac67f8 HEAD_REF master ) diff --git a/ports/boost-multi-index/CONTROL b/ports/boost-multi-index/CONTROL index 86e7733dd86..96f917b710c 100644 --- a/ports/boost-multi-index/CONTROL +++ b/ports/boost-multi-index/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-multi-index -Version: 1.67.0 -Build-Depends: boost-assert, boost-bind, boost-compatibility, boost-config, boost-core, boost-detail, boost-foreach, boost-functional, boost-integer, boost-iterator, boost-move, boost-mpl, boost-preprocessor, boost-serialization, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-assert, boost-bind, boost-compatibility, boost-config, boost-container-hash, boost-core, boost-detail, boost-foreach, boost-functional, boost-integer, boost-iterator, boost-move, boost-mpl, boost-preprocessor, boost-serialization, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost multi_index module diff --git a/ports/boost-multi-index/portfile.cmake b/ports/boost-multi-index/portfile.cmake index cc458c95a83..a23f85ad4c0 100644 --- a/ports/boost-multi-index/portfile.cmake +++ b/ports/boost-multi-index/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/multi_index - REF boost-1.67.0 - SHA512 6630d086a99b5e36d344643030a1639ab1d9393ccc93b112d56cb6c674e97f67b4a9245e51d0b43416274f50d2af094551c814822c9b17abc19b52227042ad91 + REF boost-1.68.0 + SHA512 6e39d37e79c01ae952e3ba7ab12a2a69f6916d4a846bff3af98c1d5fc2b8ba83b59a782b610817a82c076496e087040a7f44fbb97ce4b6d1b4e87ef2595c4f5b HEAD_REF master ) diff --git a/ports/boost-multiprecision/CONTROL b/ports/boost-multiprecision/CONTROL index b78a0211364..532079c9aa2 100644 --- a/ports/boost-multiprecision/CONTROL +++ b/ports/boost-multiprecision/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-multiprecision -Version: 1.67.0 -Build-Depends: boost-array, boost-assert, boost-config, boost-detail, boost-functional, boost-integer, boost-lexical-cast, boost-math, boost-mpl, boost-random, boost-rational, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-array, boost-assert, boost-config, boost-container-hash, boost-detail, boost-functional, boost-integer, boost-lexical-cast, boost-math, boost-mpl, boost-random, boost-rational, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost multiprecision module diff --git a/ports/boost-multiprecision/portfile.cmake b/ports/boost-multiprecision/portfile.cmake index 5ded1a0d859..d51ab1ce13b 100644 --- a/ports/boost-multiprecision/portfile.cmake +++ b/ports/boost-multiprecision/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/multiprecision - REF boost-1.67.0 - SHA512 a2481ad9856ab5024d86097967f187596f18eada71effa51313fb72b02809f5177582fe13bfa5db647f31b5a667b209bf044bc0598385408494c0f6284d0c8a2 + REF boost-1.68.0 + SHA512 5a90b41141829f38720b556252f32fae5e31d56deda779af371149c64f74f196cf9c2a5c466b945f1006ec1c44f497767e29f482cba248223bb762da32fd3f3c HEAD_REF master ) diff --git a/ports/boost-numeric-conversion/CONTROL b/ports/boost-numeric-conversion/CONTROL index 674e4ca0a19..5e0c9ab27ff 100644 --- a/ports/boost-numeric-conversion/CONTROL +++ b/ports/boost-numeric-conversion/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-numeric-conversion -Version: 1.67.0 -Build-Depends: boost-config, boost-core, boost-detail, boost-integer, boost-preprocessor, boost-throw-exception, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-config, boost-conversion, boost-core, boost-detail, boost-integer, boost-preprocessor, boost-throw-exception, boost-vcpkg-helpers Description: Boost numeric_conversion module diff --git a/ports/boost-numeric-conversion/portfile.cmake b/ports/boost-numeric-conversion/portfile.cmake index b14d2401177..722fca4821d 100644 --- a/ports/boost-numeric-conversion/portfile.cmake +++ b/ports/boost-numeric-conversion/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/numeric_conversion - REF boost-1.67.0 - SHA512 0c1d46e4529bcec8eeb5b138f9ded9974688e14923eb148dc8e89f7fce93d07236be5448d28d9812f7b87bdd11391f0ab8ca57b659b7bedc820d0080b3a3f5d1 + REF boost-1.68.0 + SHA512 08fadfb49b2996b118684a90e450d8426ea20270ca2c0a677c61f88b033f3e77139559fa9507a1fa0dbd84621f44502f7bf2949166c8915411da2da543178c01 HEAD_REF master ) diff --git a/ports/boost-odeint/CONTROL b/ports/boost-odeint/CONTROL index 86baeb6a674..41d1cee438a 100644 --- a/ports/boost-odeint/CONTROL +++ b/ports/boost-odeint/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-odeint -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-array, boost-assert, boost-bind, boost-compute, boost-config, boost-core, boost-function, boost-fusion, boost-iterator, boost-math, boost-mpl, boost-multi-array, boost-preprocessor, boost-range, boost-static-assert, boost-throw-exception, boost-type-traits, boost-units, boost-utility, boost-vcpkg-helpers Description: Boost odeint module diff --git a/ports/boost-odeint/portfile.cmake b/ports/boost-odeint/portfile.cmake index 38293012edc..c95fbf0c712 100644 --- a/ports/boost-odeint/portfile.cmake +++ b/ports/boost-odeint/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/odeint - REF boost-1.67.0 - SHA512 9c18b9ec2f02c9b36afb06c80ad9e881ab7c41580c2fca5b5c5a62c0aa6e1c3e9bb72c8a28670749e3723ce4bce4397db45547ba4db76acd6088f07644cadaa0 + REF boost-1.68.0 + SHA512 2e7832eb60623f9dabe8a3c2adea0c89fe0c43f9723cdc4a4f30af573186818f462fb66f33b585e0c6e50bbcb1b2e18d598e1d1905e68e54bda7febf09c71350 HEAD_REF master ) diff --git a/ports/boost-optional/CONTROL b/ports/boost-optional/CONTROL index d20c879af06..b7057d42e0e 100644 --- a/ports/boost-optional/CONTROL +++ b/ports/boost-optional/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-optional -Version: 1.67.0 -Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-move, boost-mpl, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-move, boost-mpl, boost-predef, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost optional module diff --git a/ports/boost-optional/portfile.cmake b/ports/boost-optional/portfile.cmake index 261634e1230..00ba276658c 100644 --- a/ports/boost-optional/portfile.cmake +++ b/ports/boost-optional/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/optional - REF boost-1.67.0 - SHA512 a161c9bc69cb39d9828be89d9113766d930ef0c1b12de113b5d103e8139fceabdaac0081664f14ef96f1f9df1fac0b36469010766da3ba4c054910244c452bc8 + REF boost-1.68.0 + SHA512 995436e8805a441e13a3fb8040b78dde9363759bd49db789744ba5afe1a90af05b05de882267aef1c76fe68c410172233e2c8b0559e74f6764b3b1a1207a6b9b HEAD_REF master ) diff --git a/ports/boost-parameter/CONTROL b/ports/boost-parameter/CONTROL index 360daf3a3a4..b86aa90d2d4 100644 --- a/ports/boost-parameter/CONTROL +++ b/ports/boost-parameter/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-parameter -Version: 1.67.0 -Build-Depends: boost-detail, boost-mpl, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-core, boost-detail, boost-mpl, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers Description: Boost parameter module diff --git a/ports/boost-parameter/portfile.cmake b/ports/boost-parameter/portfile.cmake index 3e5ae71bcbd..7a95348a338 100644 --- a/ports/boost-parameter/portfile.cmake +++ b/ports/boost-parameter/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/parameter - REF boost-1.67.0 - SHA512 f49f1cbedc0b09de484af7ffd9d00e129e9e8cc88fd82d47a95f89b06eae909973843347d1fe09936d686d026d2266384cf23b7dd9a5d7df2d8889629fea1684 + REF boost-1.68.0 + SHA512 28d4538ccc544884fa9641ffca89c8a7a4f4098330540d1929b798ea69bf571e6073c65b9d4162b9b357b127da798c0fa613410b6b8e24e3af6681d465532d2f HEAD_REF master ) diff --git a/ports/boost-phoenix/CONTROL b/ports/boost-phoenix/CONTROL index f6cf5316bf4..dd0fb4d4891 100644 --- a/ports/boost-phoenix/CONTROL +++ b/ports/boost-phoenix/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-phoenix -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-detail, boost-function, boost-fusion, boost-mpl, boost-predef, boost-preprocessor, boost-proto, boost-range, boost-smart-ptr, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost phoenix module diff --git a/ports/boost-phoenix/portfile.cmake b/ports/boost-phoenix/portfile.cmake index 3df599d310e..cb12b27d9d8 100644 --- a/ports/boost-phoenix/portfile.cmake +++ b/ports/boost-phoenix/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/phoenix - REF boost-1.67.0 - SHA512 38095cd0de7a2fb03e4acaf27364a9f9797e1c92315b956f78a5f3d478fbd65a0b97dba53e9081418223864222f9a560f679b6c973ed994233e68b39fd3a5d63 + REF boost-1.68.0 + SHA512 5ce43db16a9f9e14d151475eb52120c497fbf7082a912af6fa64b4a4e59af9b33938968fb524a4f8f73be039fcfeb4ced19dfc7a3012fe2dc1eb85b621c5eb08 HEAD_REF master ) diff --git a/ports/boost-poly-collection/CONTROL b/ports/boost-poly-collection/CONTROL index 9cdae8e7301..aafb24154ed 100644 --- a/ports/boost-poly-collection/CONTROL +++ b/ports/boost-poly-collection/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-poly-collection -Version: 1.67.0 -Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-iterator, boost-mpl, boost-type-erasure (!uwp), boost-type-traits, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-iterator, boost-mp11, boost-mpl, boost-type-erasure (!arm), boost-type-traits, boost-vcpkg-helpers Description: Boost poly_collection module diff --git a/ports/boost-poly-collection/portfile.cmake b/ports/boost-poly-collection/portfile.cmake index f6d495b04d2..72eb529e12d 100644 --- a/ports/boost-poly-collection/portfile.cmake +++ b/ports/boost-poly-collection/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/poly_collection - REF boost-1.67.0 - SHA512 9ebf5a9a682f0d79ee80dbc1a097dbd06f7c7d064798e25d72a369fa771beb6c37ed9553bc3b8cdbbcb40bc89a628155a850807f5487c714655d2fdb85102b66 + REF boost-1.68.0 + SHA512 c4b93a5dceaa1e41b3f585f79a34bf05d8bed30f78af86cdf829d910a6ea791420880f087063180a5332eb065b4427cf6c98d9d71a9375d10c0f33defbdb1bd6 HEAD_REF master ) diff --git a/ports/boost-polygon/CONTROL b/ports/boost-polygon/CONTROL index ea01f4bb089..36fb2238657 100644 --- a/ports/boost-polygon/CONTROL +++ b/ports/boost-polygon/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-polygon -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-integer, boost-mpl, boost-utility, boost-vcpkg-helpers Description: Boost polygon module diff --git a/ports/boost-polygon/portfile.cmake b/ports/boost-polygon/portfile.cmake index 83d6d5b5e4e..5fe881759d4 100644 --- a/ports/boost-polygon/portfile.cmake +++ b/ports/boost-polygon/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/polygon - REF boost-1.67.0 - SHA512 d6fbf84a808065a5d6946ff0eae8af41d280dc6e30d34c1d1e6f9e5860884f94466d976db4b9537e94c40a76129ae0567cebd05a1116b80ff66629c423520753 + REF boost-1.68.0 + SHA512 ebb34e0d693215db2919096600ed9bea6b239a2486135f48a1a3bd683410b0c86c3b455bc2d58f7b6efad50020895d3fd8f4b4b0ee897eacdb7a980d0979e9ad HEAD_REF master ) diff --git a/ports/boost-pool/CONTROL b/ports/boost-pool/CONTROL index 7013cb6c446..b1de7679694 100644 --- a/ports/boost-pool/CONTROL +++ b/ports/boost-pool/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-pool -Version: 1.67.0 -Build-Depends: boost-assert, boost-compatibility, boost-config, boost-detail, boost-integer, boost-thread (!uwp), boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-detail, boost-integer, boost-thread (!arm), boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost pool module diff --git a/ports/boost-pool/portfile.cmake b/ports/boost-pool/portfile.cmake index e85dd3329db..5c52588d17f 100644 --- a/ports/boost-pool/portfile.cmake +++ b/ports/boost-pool/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/pool - REF boost-1.67.0 - SHA512 fe6f9a5e147806e80fa706e7f02a1b4b6f48e044c6b2a7d7fce6685ec2ada960c17a1ae3fb8cf19661ca8e9e3b1b3a49a30328f9e5ca12f15514810733a1c299 + REF boost-1.68.0 + SHA512 b1b3d91ac85469c0b06d48bcc159b22974dc446f44d84aee459ba26f1bd114600819efec3b1679be87b91525a0d55ba9a9fbde4828b6436bad4013d9de4652e6 HEAD_REF master ) diff --git a/ports/boost-predef/CONTROL b/ports/boost-predef/CONTROL index 92b0e35cd60..540b2026da9 100644 --- a/ports/boost-predef/CONTROL +++ b/ports/boost-predef/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-predef -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-vcpkg-helpers Description: Boost predef module diff --git a/ports/boost-predef/portfile.cmake b/ports/boost-predef/portfile.cmake index 5b495ed8d04..b4f21e883f0 100644 --- a/ports/boost-predef/portfile.cmake +++ b/ports/boost-predef/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/predef - REF boost-1.67.0 - SHA512 c67076cb04de0ad0bfdc2fabc4112fe4a1ffb6c21a42e4e11a63e173ef3573e614fe515e7ad7af0cf6628a90fa44aad45013f79ae68d5f35df034953f84b75e1 + REF boost-1.68.0 + SHA512 fb353184d4a1cbe7a621d3076bff10061c38912ecfc94d4dab54e43eb40fda62455866b3076c4193d94338cc2fb3fe8bd31f5e20ac56931cd16c2413d6c426f7 HEAD_REF master ) diff --git a/ports/boost-preprocessor/CONTROL b/ports/boost-preprocessor/CONTROL index f6f683423c2..ac86f712860 100644 --- a/ports/boost-preprocessor/CONTROL +++ b/ports/boost-preprocessor/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-preprocessor -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-vcpkg-helpers Description: Boost preprocessor module diff --git a/ports/boost-preprocessor/portfile.cmake b/ports/boost-preprocessor/portfile.cmake index 0626080f452..d829c5c138b 100644 --- a/ports/boost-preprocessor/portfile.cmake +++ b/ports/boost-preprocessor/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/preprocessor - REF boost-1.67.0 - SHA512 9bb18c25144c1428c6e9a32a670c041bc6165b862636b5c626e8b66959906988605f75548fc61539f91c32282b72c150b8b398f7fcee2fa2e5720032b74fd80f + REF boost-1.68.0 + SHA512 7c16f996dc9ba6afbc748acc854e3dadc852d76a1a02fc9a61d46fe92edb412c889cfba72c5de5a8f85913711a7f0ad2df3e9d7c4fb20e6422c321847e17399a HEAD_REF master ) diff --git a/ports/boost-process/CONTROL b/ports/boost-process/CONTROL index a5654c920af..4105702ed42 100644 --- a/ports/boost-process/CONTROL +++ b/ports/boost-process/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-process -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-algorithm, boost-asio, boost-config, boost-core, boost-filesystem (!uwp), boost-fusion, boost-iterator, boost-move, boost-optional, boost-system, boost-tokenizer, boost-type-index, boost-vcpkg-helpers, boost-winapi Description: Boost process module diff --git a/ports/boost-process/portfile.cmake b/ports/boost-process/portfile.cmake index d59399e5f1e..c93860190f1 100644 --- a/ports/boost-process/portfile.cmake +++ b/ports/boost-process/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/process - REF boost-1.67.0 - SHA512 a279fcd351c2f8a2087438b67e973f74e150c24585cf586fd59f81c0ec712f8c042768549823268618c7c9c106ed5d8153a7d020fc415ac40f5d78a2a7e93bb6 + REF boost-1.68.0 + SHA512 6e75874c9eb95e30c8ef098a724e61ce986d14846325b778433467c8940b3cdd5177b5467c36103a8712e8c2234e2a6a00755e440e457d1e03dc16b59a22aad0 HEAD_REF master ) diff --git a/ports/boost-program-options/CONTROL b/ports/boost-program-options/CONTROL index f37b745ba88..ced795473e1 100644 --- a/ports/boost-program-options/CONTROL +++ b/ports/boost-program-options/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-program-options -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-any, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-vcpkg-helpers Description: Boost program_options module diff --git a/ports/boost-program-options/portfile.cmake b/ports/boost-program-options/portfile.cmake index 4f86243619d..e33d189a3fc 100644 --- a/ports/boost-program-options/portfile.cmake +++ b/ports/boost-program-options/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/program_options - REF boost-1.67.0 - SHA512 eccb93bbc8ba6808afb06764577184c3b58cb260e0a5ead5a79c43300379744b4c9649ecf18b9c88b3c22c9f1a28d4c7bcf77f638693a97f38bfd15e48b58804 + REF boost-1.68.0 + SHA512 debbeb71fd8b4b0a4cef0297b3de6f94758948a117eeff4ccb713ea733c2304ce5f0c17673a066c5faa8b87c3aa2e4602908c4d52d76e53d7c4c2120f76ab4f2 HEAD_REF master ) diff --git a/ports/boost-property-map/CONTROL b/ports/boost-property-map/CONTROL index f8142fa4183..7ac2bc12a30 100644 --- a/ports/boost-property-map/CONTROL +++ b/ports/boost-property-map/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-property-map -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-any, boost-assert, boost-bind, boost-concept-check, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-multi-index, boost-optional, boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost property_map module diff --git a/ports/boost-property-map/portfile.cmake b/ports/boost-property-map/portfile.cmake index c2c4561fdb5..33c5c322833 100644 --- a/ports/boost-property-map/portfile.cmake +++ b/ports/boost-property-map/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/property_map - REF boost-1.67.0 - SHA512 07360357577815c6545473d3b5ac64e6851031cc926bcc72419e0bbc49b291477a1e15663e79916044f2e8b946dee397dc1aede7eb2286d506fd86c87e81db48 + REF boost-1.68.0 + SHA512 57d8ad9bd9854702c18c3d0875d6d26386a1dff58cd4b21f9446f33752455715b78027f212a0954e40ea62fc98f5823cfef2e5ea6f6ce7c7e516bb3fa3d26a37 HEAD_REF master ) diff --git a/ports/boost-property-tree/CONTROL b/ports/boost-property-tree/CONTROL index cbb168eaee5..c4ff3e9615c 100644 --- a/ports/boost-property-tree/CONTROL +++ b/ports/boost-property-tree/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-property-tree -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-any, boost-assert, boost-bind, boost-compatibility, boost-config, boost-core, boost-format, boost-iterator, boost-mpl, boost-multi-index, boost-optional, boost-range, boost-serialization, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost property_tree module diff --git a/ports/boost-property-tree/portfile.cmake b/ports/boost-property-tree/portfile.cmake index 8a87f7410da..245919b9cc2 100644 --- a/ports/boost-property-tree/portfile.cmake +++ b/ports/boost-property-tree/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/property_tree - REF boost-1.67.0 - SHA512 b22b596af0a6a39a4671c44aa099cd4c2235a5f51e1400f14df2925a5a17487d8910253228c61b1198f0184e58e6e2940c7fde5c193549c21efe737bed363d67 + REF boost-1.68.0 + SHA512 07410c78fdb9ae1d8a16c6c2ed65caea3136365c04828b78c02074ee523cccbf8f9a7117fcb5524711a0204c8ed77f56adcb47313fa16f63e15801043c3e1763 HEAD_REF master ) diff --git a/ports/boost-proto/CONTROL b/ports/boost-proto/CONTROL index 9b6adca8fbb..42b2d3d4d50 100644 --- a/ports/boost-proto/CONTROL +++ b/ports/boost-proto/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-proto -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-core, boost-detail, boost-fusion, boost-mpl, boost-preprocessor, boost-range, boost-static-assert, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost proto module diff --git a/ports/boost-proto/portfile.cmake b/ports/boost-proto/portfile.cmake index 34691bdf383..b5e42f617f2 100644 --- a/ports/boost-proto/portfile.cmake +++ b/ports/boost-proto/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/proto - REF boost-1.67.0 - SHA512 ed20abaad9b61d9a82f544a9ae3d05e1f908551958ea0a86b6325a2440a30c94c30caddc5354b603428df070a9eb418adad487d2cc3f2ea0c9a4bf361e8b2ca8 + REF boost-1.68.0 + SHA512 af03f0ad4d67d7d029fc9afec830e78295d34f0dd7af8dea57c3d931d042645f8a8458f1234112826072fb2eb9507ef39375ec412072b2be618621cec2934635 HEAD_REF master ) diff --git a/ports/boost-ptr-container/CONTROL b/ports/boost-ptr-container/CONTROL index 9c664a05d49..e23e8bb6759 100644 --- a/ports/boost-ptr-container/CONTROL +++ b/ports/boost-ptr-container/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-ptr-container -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-array, boost-assert, boost-circular-buffer, boost-config, boost-core, boost-iterator, boost-mpl, boost-range, boost-serialization, boost-smart-ptr, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers Description: Boost ptr_container module diff --git a/ports/boost-ptr-container/portfile.cmake b/ports/boost-ptr-container/portfile.cmake index 0f1892ddad4..9f36d70411e 100644 --- a/ports/boost-ptr-container/portfile.cmake +++ b/ports/boost-ptr-container/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/ptr_container - REF boost-1.67.0 - SHA512 d8349a2b3ebff817ffc42301b61d13536c341def39dd3ec9bf5f5abfa0c7ad545f6b5f8babd3cc276b7c171e55760ea2d0a03dcc0653ac7a245246c89d1b7117 + REF boost-1.68.0 + SHA512 bf800d67f0692485a04ab46dc9bbb04d542bfe941710796d82bd8d3e6b085d4c75b02d45507f145407317591734ffd83e4b0f9e823a4bee7071485fe94a88302 HEAD_REF master ) diff --git a/ports/boost-python/CONTROL b/ports/boost-python/CONTROL index 36bb42387e8..31bd0178844 100644 --- a/ports/boost-python/CONTROL +++ b/ports/boost-python/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-python -Version: 1.67.0-1 -Build-Depends: boost-bind, boost-config, boost-core, boost-detail, boost-graph, boost-integer, boost-iterator, boost-mpl, boost-preprocessor, boost-property-map, boost-smart-ptr, boost-static-assert, boost-tuple, boost-utility, boost-vcpkg-helpers, python3 +Version: 1.68.0-2 +Build-Depends: boost-bind, boost-config, boost-conversion, boost-core, boost-detail, boost-graph, boost-integer, boost-iterator, boost-mpl, boost-preprocessor, boost-property-map, boost-smart-ptr, boost-static-assert, boost-tuple, boost-utility, boost-vcpkg-helpers, python3 Description: Boost python module diff --git a/ports/boost-python/portfile.cmake b/ports/boost-python/portfile.cmake index 73980e6409c..bdbe49f2564 100644 --- a/ports/boost-python/portfile.cmake +++ b/ports/boost-python/portfile.cmake @@ -5,9 +5,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/python - REF boost-1.67.0 - SHA512 59091af63626cc6e33f76bded8733b5fb044f7139197e6c887e8e279831954c1e8b67341b6b2f3c9dce97e67a166996321ea439609d225dab7f68762423d6211 + REF boost-1.68.0 + SHA512 17aacec09a653b718e1925f13fbce1a22a09d44011534e451a953600f4fef47b0e8a759d4e1588b74dbfc71ef38f1f13200d77668eca2ad1bc5b1e470e231a2f HEAD_REF master + PATCHES unwind-type.patch ) # Find Python. Can't use find_package here, but we already know where everything is diff --git a/ports/boost-python/unwind-type.patch b/ports/boost-python/unwind-type.patch new file mode 100644 index 00000000000..62e9c8185ba --- /dev/null +++ b/ports/boost-python/unwind-type.patch @@ -0,0 +1,31 @@ +diff --git a/include/boost/python/detail/unwind_type.hpp b/include/boost/python/detail/unwind_type.hpp +index f6cdab6..da9633b 100644 +--- a/include/boost/python/detail/unwind_type.hpp ++++ b/include/boost/python/detail/unwind_type.hpp +@@ -11,7 +11,7 @@ + + namespace boost { namespace python { namespace detail { + +-#ifndef _MSC_VER //if forward declared, msvc6.5 does not recognize them as inline ++#if !defined(_MSC_VER) || _MSC_VER >= 1915 //if forward declared, msvc6.5 does not recognize them as inline + // forward declaration, required (at least) by Tru64 cxx V6.5-042 + template + inline typename Generator::result_type +@@ -83,7 +83,7 @@ struct unwind_helper + + template + inline typename Generator::result_type +-#ifndef _MSC_VER ++#if !defined(_MSC_VER) || _MSC_VER >= 1915 + unwind_type(U const& p, Generator*) + #else + unwind_type(U const& p, Generator* = 0) +@@ -148,7 +148,7 @@ struct unwind_helper2 + // why bother? + template + inline typename Generator::result_type +-#ifndef _MSC_VER ++#if !defined(_MSC_VER) || _MSC_VER >= 1915 + unwind_type(boost::type*, Generator*) + #else + unwind_type(boost::type*p =0, Generator* =0) diff --git a/ports/boost-qvm/CONTROL b/ports/boost-qvm/CONTROL index ee0044271f8..5e6306563a8 100644 --- a/ports/boost-qvm/CONTROL +++ b/ports/boost-qvm/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-qvm -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-exception, boost-static-assert, boost-throw-exception, boost-utility, boost-vcpkg-helpers Description: Boost qvm module diff --git a/ports/boost-qvm/portfile.cmake b/ports/boost-qvm/portfile.cmake index 014723f280b..c9cb0a1042a 100644 --- a/ports/boost-qvm/portfile.cmake +++ b/ports/boost-qvm/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/qvm - REF boost-1.67.0 - SHA512 dce723e782bb19737a51e99c3535ab7101569ad217a475b25c742d4a35fd774d5b02883a3604b75a4141f8cbb385c82ed1496051032d1d993fb6218549885095 + REF boost-1.68.0 + SHA512 1e9babfa993b59cba1cd4c7fa2184576a50ca0f6acd6db91b2e7e1fa3931f1c32de7bae76a8990bdd6cf69551482e74900b66a5bfb1c91c46e2a72d90491a4a3 HEAD_REF master ) diff --git a/ports/boost-random/CONTROL b/ports/boost-random/CONTROL index e9f6824330f..df1f7553261 100644 --- a/ports/boost-random/CONTROL +++ b/ports/boost-random/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-random -Version: 1.67.0 -Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-integer, boost-io, boost-math, boost-modular-build-helper, boost-mpl, boost-range, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-dynamic-bitset, boost-integer, boost-io, boost-math, boost-modular-build-helper, boost-mpl, boost-range, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost random module diff --git a/ports/boost-random/portfile.cmake b/ports/boost-random/portfile.cmake index 6112ed2c3b9..1f5c32b867d 100644 --- a/ports/boost-random/portfile.cmake +++ b/ports/boost-random/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/random - REF boost-1.67.0 - SHA512 482a25fed9c420407cb83c8003a78dc518bb3942e23c3b206a0f0e050148fbed91aa0526b78614189d162d7c65d7a3ffb566a1735b23e1d0d5d592af0cdc499f + REF boost-1.68.0 + SHA512 dc9a4f65610324a021daf834443a49364a71b45d68ab3ec193221c464ffd1e824a48930da10633718ac4652c720db3cbb62d47114b3da98b31f4383c83bfc6b4 HEAD_REF master ) diff --git a/ports/boost-range/CONTROL b/ports/boost-range/CONTROL index a9c7421eac3..ed079d74ce0 100644 --- a/ports/boost-range/CONTROL +++ b/ports/boost-range/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-range -Version: 1.67.0 -Build-Depends: boost-array, boost-assert, boost-concept-check, boost-config, boost-core, boost-detail, boost-functional, boost-integer, boost-iterator, boost-mpl, boost-optional, boost-preprocessor, boost-regex, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-array, boost-assert, boost-concept-check, boost-config, boost-container-hash, boost-core, boost-detail, boost-integer, boost-iterator, boost-mpl, boost-optional, boost-preprocessor, boost-regex, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost range module diff --git a/ports/boost-range/portfile.cmake b/ports/boost-range/portfile.cmake index c649c87ffbe..b3a68e39a8c 100644 --- a/ports/boost-range/portfile.cmake +++ b/ports/boost-range/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/range - REF boost-1.67.0 - SHA512 f6c400a40937b09eee02eecbd579d67530fd4cae5f5f9a02cd3914cbcf6d4170870fa6c05a5a018e070f9ddc8c75c43dd93171f57a032ff5294ed19a3cc299af + REF boost-1.68.0 + SHA512 a95bb972fa862e210aa77a214d803b5206dba238f1bdedd238bfd0ca3203b0b7c57b6c1738032d696e303049693028237f7eaa12766fa2c667ce6d8d27b6032f HEAD_REF master ) diff --git a/ports/boost-ratio/CONTROL b/ports/boost-ratio/CONTROL index a58bbdab06a..7e5543bd86a 100644 --- a/ports/boost-ratio/CONTROL +++ b/ports/boost-ratio/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-ratio -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-core, boost-integer, boost-mpl, boost-rational, boost-static-assert, boost-type-traits, boost-vcpkg-helpers Description: Boost ratio module diff --git a/ports/boost-ratio/portfile.cmake b/ports/boost-ratio/portfile.cmake index 45caa9299bf..1b637a1e846 100644 --- a/ports/boost-ratio/portfile.cmake +++ b/ports/boost-ratio/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/ratio - REF boost-1.67.0 - SHA512 0ff5a25d9e9798c52cc017df6a7b52a2c13becb84ab6dda06244a92459f1602ff3843e71cda205ed9c831b4727929cbebc688e8b028e029005ffb8f04e39f259 + REF boost-1.68.0 + SHA512 0e4e7097ae51c30ae6ccbf112943a54d00421fa1c95f516554543b8f9c4fdde4602ff69e4b5c780a166058dbbe2d073162c0f857be3c07f7b20cc4842f9913f1 HEAD_REF master ) diff --git a/ports/boost-rational/CONTROL b/ports/boost-rational/CONTROL index fcc4de99f5b..2078f7f0a97 100644 --- a/ports/boost-rational/CONTROL +++ b/ports/boost-rational/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-rational -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-config, boost-integer, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost rational module diff --git a/ports/boost-rational/portfile.cmake b/ports/boost-rational/portfile.cmake index 5ced4677062..5db179cc108 100644 --- a/ports/boost-rational/portfile.cmake +++ b/ports/boost-rational/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/rational - REF boost-1.67.0 - SHA512 27fece61a7de96bf783a5f5d5b290934f76741848466fbe256c5517fb5671105d68e3126fd4b135c73a0290cbd81cff9849b599d14cdd948897d1ecc573ab016 + REF boost-1.68.0 + SHA512 a259b492d3ed3cc3d4bfae1bc6dfe3abe2678ea6379a1d4a48bd0b176952f5d0d0bd3c1cfbaa5a8e566fc0e59f3d4f267cf039f5f5a9d38e635fd4b999784fa0 HEAD_REF master ) diff --git a/ports/boost-regex/CONTROL b/ports/boost-regex/CONTROL index edfbe867280..14ae738a38d 100644 --- a/ports/boost-regex/CONTROL +++ b/ports/boost-regex/CONTROL @@ -1,7 +1,7 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-regex -Version: 1.67.0 -Build-Depends: boost-assert, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-container-hash, boost-core, boost-detail, boost-functional, boost-integer, boost-iterator, boost-modular-build-helper, boost-mpl, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-container-hash, boost-core, boost-detail, boost-integer, boost-iterator, boost-modular-build-helper, boost-mpl, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost regex module Feature: icu diff --git a/ports/boost-regex/portfile.cmake b/ports/boost-regex/portfile.cmake index 8895931d61d..0ab65b58dfa 100644 --- a/ports/boost-regex/portfile.cmake +++ b/ports/boost-regex/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/regex - REF boost-1.67.0 - SHA512 e3b3aaaf866aa9e6a4148c545f4d4a4ab8037dc8882ed7cd4eecd7727976d1a137a4c4e5599283f5d6f3616e865369d80733070f571fdb990555e4769f59ab83 + REF boost-1.68.0 + SHA512 57ea3b825011172e332f52aead9aae4b7d17dfceef68c5cc017607570c6818adfc73780f4d405a57aa93c3a7a3ca09bb74de2a9cb97e72c78700098ed6d2e63e HEAD_REF master ) diff --git a/ports/boost-scope-exit/CONTROL b/ports/boost-scope-exit/CONTROL index fff7088b29f..229ea3c8b36 100644 --- a/ports/boost-scope-exit/CONTROL +++ b/ports/boost-scope-exit/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-scope-exit -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-detail, boost-function, boost-mpl, boost-preprocessor, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost scope_exit module diff --git a/ports/boost-scope-exit/portfile.cmake b/ports/boost-scope-exit/portfile.cmake index 61add486608..32d208047b5 100644 --- a/ports/boost-scope-exit/portfile.cmake +++ b/ports/boost-scope-exit/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/scope_exit - REF boost-1.67.0 - SHA512 31386f5e44669a01c3396df8fa001c85c7c6231413f4ed788602bb2861db3535e0ed01c61c4b9bdccdcc0020ce92dbbf2bc02711abbbf8dbafe089305d21fb5a + REF boost-1.68.0 + SHA512 fb1bf400f025836c64604994bd7de0d66227f2bb1bf5f3caf7b7e4db599702dd0ea229ff4c7b3a4efcab9545db8f20ac20d4b4354609047dd1e8b278d2220f43 HEAD_REF master ) diff --git a/ports/boost-serialization/CONTROL b/ports/boost-serialization/CONTROL index d2c4357bea9..c513a6384d6 100644 --- a/ports/boost-serialization/CONTROL +++ b/ports/boost-serialization/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-serialization -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-array, boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-io, boost-iterator, boost-modular-build-helper, boost-move, boost-mpl, boost-optional, boost-preprocessor, boost-smart-ptr, boost-spirit, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers Description: Boost serialization module diff --git a/ports/boost-serialization/portfile.cmake b/ports/boost-serialization/portfile.cmake index b8229d3ecb6..f574fdf2892 100644 --- a/ports/boost-serialization/portfile.cmake +++ b/ports/boost-serialization/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/serialization - REF boost-1.67.0 - SHA512 719b69945ebdf9eca9849c74bfab38ce1e2c8b4a11ea7cdf98c3da6250887f1712c841b18e428c5bac421b007e3bd0efce9b2c12893395982df98826621dc3bc + REF boost-1.68.0 + SHA512 13c35139ef8c67e297ca99fa2695b203f45a44788dc0c343075295baba07d0de113132314ddc4438d0d6cd87ad542510160e8cbe773a0f1d7fb24f377809d0b9 HEAD_REF master ) diff --git a/ports/boost-signals/CONTROL b/ports/boost-signals/CONTROL index 47f3c23828d..10f1465f30d 100644 --- a/ports/boost-signals/CONTROL +++ b/ports/boost-signals/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-signals -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-any, boost-build, boost-config, boost-core, boost-function, boost-iterator, boost-modular-build-helper, boost-optional, boost-smart-ptr, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost signals module diff --git a/ports/boost-signals/portfile.cmake b/ports/boost-signals/portfile.cmake index 32d456803ec..a5df93cddc4 100644 --- a/ports/boost-signals/portfile.cmake +++ b/ports/boost-signals/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/signals - REF boost-1.67.0 - SHA512 420281efef7ad8742ead144e924b21a8aaac500e8075c0bdf9e1d835d2069b4514f9d0af9ff9b00270334413cbe501acee7cb3eb7a218a53aed0479ff4e8367b + REF boost-1.68.0 + SHA512 3d5a26de28050e03779a26f6af5f96bdab0023d6be3047be9652a660c607e7839b46b3abb257ec5b1791e2e4dc5cbcbefe433244ddc6140ee64ae531b2c0b01d HEAD_REF master ) diff --git a/ports/boost-signals2/CONTROL b/ports/boost-signals2/CONTROL index 0d90874bab3..ce1b2ea243a 100644 --- a/ports/boost-signals2/CONTROL +++ b/ports/boost-signals2/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-signals2 -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-detail, boost-function, boost-iterator, boost-mpl, boost-multi-index, boost-optional, boost-parameter, boost-predef, boost-preprocessor, boost-smart-ptr, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers Description: Boost signals2 module diff --git a/ports/boost-signals2/portfile.cmake b/ports/boost-signals2/portfile.cmake index 56ee81f08d8..f33e5548356 100644 --- a/ports/boost-signals2/portfile.cmake +++ b/ports/boost-signals2/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/signals2 - REF boost-1.67.0 - SHA512 5c691c9275ac2f640a46a1f5a03debd326ce1c64905af6475ebe6caced3ffa4fe27a3a6b91ce60c72bcf06fcd5fbeba79afaef8314f2be655b1ad648d5a046e4 + REF boost-1.68.0 + SHA512 288e818d126fd2f4a6cededf802b74a5e3230483437e2338f179de6d9f22dbdad32c8040c56af2713811e7558326bd7c18a98e327eedcc5990dc9e25d0b35f26 HEAD_REF master ) diff --git a/ports/boost-smart-ptr/CONTROL b/ports/boost-smart-ptr/CONTROL index 6a6f5fb2828..bdf02ec3a28 100644 --- a/ports/boost-smart-ptr/CONTROL +++ b/ports/boost-smart-ptr/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-smart-ptr -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-integer, boost-move, boost-predef, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost smart_ptr module diff --git a/ports/boost-smart-ptr/portfile.cmake b/ports/boost-smart-ptr/portfile.cmake index a83bc4a227f..942a9816369 100644 --- a/ports/boost-smart-ptr/portfile.cmake +++ b/ports/boost-smart-ptr/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/smart_ptr - REF boost-1.67.0 - SHA512 f8e9aaf7dce69fa21c1023bd990cc10957e2965261c9ac54cc4a045a6a4675f9e6a4796ec2e359f967d9670126434ec49ff0ba72fec0d041a86a569463e16d4c + REF boost-1.68.0 + SHA512 5c791dd11d0b7d7662bfa936955dfbf9ff7e2e1993051a03997dbfee6b9b28e606ac94bad06a6eb112e8e089cf28721a4140761620a0c268ab8871d913e913d1 HEAD_REF master ) diff --git a/ports/boost-sort/CONTROL b/ports/boost-sort/CONTROL index 9a52c06cc9f..80cb3c99b04 100644 --- a/ports/boost-sort/CONTROL +++ b/ports/boost-sort/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-sort -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-integer, boost-range, boost-serialization, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost sort module diff --git a/ports/boost-sort/portfile.cmake b/ports/boost-sort/portfile.cmake index a8f9990300c..67040df746c 100644 --- a/ports/boost-sort/portfile.cmake +++ b/ports/boost-sort/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/sort - REF boost-1.67.0 - SHA512 dfd8f61aa342c226a88390f8b05d394fd8c019ebc8d008dbb3022bca4716d4e9623e9d2024fd3143ead3de89441b470dc234252b96d80dcd3d6e2be5ce4bd090 + REF boost-1.68.0 + SHA512 011642be7224c2892b63c01a589210dc0562d768a750a13622c181d0e8884cb0c8e2ab68f178bfaee2c895fdf8dd78815f6c8c1d58126e4db5d043068340d676 HEAD_REF master ) diff --git a/ports/boost-spirit/CONTROL b/ports/boost-spirit/CONTROL index ee973c0b422..a9d82f0ccae 100644 --- a/ports/boost-spirit/CONTROL +++ b/ports/boost-spirit/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-spirit -Version: 1.67.0 -Build-Depends: boost-algorithm, boost-array, boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-endian, boost-filesystem (!uwp), boost-foreach, boost-function, boost-function-types, boost-fusion, boost-integer, boost-io, boost-iostreams (!uwp), boost-iterator, boost-lexical-cast, boost-locale (!uwp), boost-math, boost-move, boost-mpl, boost-optional, boost-phoenix, boost-pool, boost-preprocessor, boost-proto, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-thread (!uwp), boost-throw-exception, boost-tti, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-algorithm, boost-array, boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-endian, boost-filesystem (!uwp), boost-foreach, boost-function, boost-function-types, boost-fusion, boost-integer, boost-io, boost-iostreams (!uwp), boost-iterator, boost-lexical-cast, boost-locale (!uwp), boost-math, boost-move, boost-mpl, boost-optional, boost-phoenix, boost-pool, boost-preprocessor, boost-proto, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-thread (!arm), boost-throw-exception, boost-tti, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers Description: Boost spirit module diff --git a/ports/boost-spirit/portfile.cmake b/ports/boost-spirit/portfile.cmake index f7b3f04f8f0..fd31b103ce1 100644 --- a/ports/boost-spirit/portfile.cmake +++ b/ports/boost-spirit/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/spirit - REF boost-1.67.0 - SHA512 c5afd70ff38112232966e204e543b83316693a941f9da0300e9214ad3198601c805b2259f7e9ce58afc03b9e91403d98f94852b0e4eaa71b9e94157ca37aac9b + REF boost-1.68.0 + SHA512 39e1824fcf0fb1358ab5c0df7c524ef0d27c40762e230f68f959e5e7f708c1bd2dffeaeff9ab2b420710bd3a089d48915a05ccfb1117056c96d3ddd66939696b HEAD_REF master ) diff --git a/ports/boost-stacktrace/CONTROL b/ports/boost-stacktrace/CONTROL index bba967212b6..b8c901dfffa 100644 --- a/ports/boost-stacktrace/CONTROL +++ b/ports/boost-stacktrace/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-stacktrace -Version: 1.67.0 -Build-Depends: boost-array, boost-build, boost-config, boost-container-hash, boost-core, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-static-assert, boost-type-traits, boost-vcpkg-helpers, boost-winapi +Version: 1.68.0 +Build-Depends: boost-array, boost-build, boost-config, boost-container-hash, boost-core, boost-modular-build-helper, boost-static-assert, boost-type-traits, boost-vcpkg-helpers, boost-winapi Description: Boost stacktrace module diff --git a/ports/boost-stacktrace/portfile.cmake b/ports/boost-stacktrace/portfile.cmake index 5cb9ac5bc97..84818f4ab18 100644 --- a/ports/boost-stacktrace/portfile.cmake +++ b/ports/boost-stacktrace/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/stacktrace - REF boost-1.67.0 - SHA512 30e425d113c155b7a1a9f5802ce5c0efa91223825e09bf6dc596e208b1fec7e1adacbabe6950f5d35037a8bd4e2c3841e95cb9a02419a652beabfb083c460edc + REF boost-1.68.0 + SHA512 2700d80620a5b66e965c00a5e407aec2e075b0e567fe2031bd3671303fb4c4b3a4dc3d3ddb1cfb6058325470a0b51589aedf2a2ea0b46d53cbb754a2d3fb6027 HEAD_REF master ) diff --git a/ports/boost-statechart/CONTROL b/ports/boost-statechart/CONTROL index b98913b82d9..6425190a985 100644 --- a/ports/boost-statechart/CONTROL +++ b/ports/boost-statechart/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-statechart -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-bind, boost-config, boost-conversion, boost-core, boost-detail, boost-function, boost-mpl, boost-smart-ptr, boost-static-assert, boost-type-traits, boost-vcpkg-helpers Description: Boost statechart module diff --git a/ports/boost-statechart/portfile.cmake b/ports/boost-statechart/portfile.cmake index a768821241c..73971e1c273 100644 --- a/ports/boost-statechart/portfile.cmake +++ b/ports/boost-statechart/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/statechart - REF boost-1.67.0 - SHA512 2b63d4664b3fc20adf12106607ef1485700d5aeea9bbfc9005a9ac08984034a8a31c037a4ae3e99b4787187ed797844d26afb1140f73ef5009504549be64a6cf + REF boost-1.68.0 + SHA512 f3d2a8d12bd85327928cba9f572e22f438721597675dd9ea22936a06d38a241aa6ef9ca6b5fc183dce20d76c2f306901d2337c12463e917d1ecf1c6d586735bf HEAD_REF master ) diff --git a/ports/boost-static-assert/CONTROL b/ports/boost-static-assert/CONTROL index 58be1dfc730..7a39b5c239d 100644 --- a/ports/boost-static-assert/CONTROL +++ b/ports/boost-static-assert/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-static-assert -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-detail, boost-vcpkg-helpers Description: Boost static_assert module diff --git a/ports/boost-static-assert/portfile.cmake b/ports/boost-static-assert/portfile.cmake index 125f80bbbe1..9d5eb8adf3a 100644 --- a/ports/boost-static-assert/portfile.cmake +++ b/ports/boost-static-assert/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/static_assert - REF boost-1.67.0 - SHA512 6ffffe8c9bb799851dd5b3f03ec3038c7545ee55429a2c9124c6b7c5abbe43b8cb0cc860d758fbbeaa1810775da8f0ad1bfd25362a78866c1ecf5242bdb548eb + REF boost-1.68.0 + SHA512 af109c668d083a9d7dc63b123b6621b919eab132589bad55a05c0fcdbb0939516a5a787512a87964a04362a4dd73af572293c3a3c2035d41401e78be34ca877e HEAD_REF master ) diff --git a/ports/boost-system/CONTROL b/ports/boost-system/CONTROL index 01985fbe6d7..8b06ccc8ef1 100644 --- a/ports/boost-system/CONTROL +++ b/ports/boost-system/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-system -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-integer, boost-modular-build-helper, boost-predef, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost system module diff --git a/ports/boost-system/portfile.cmake b/ports/boost-system/portfile.cmake index d61109754cb..fa81b9e0e6e 100644 --- a/ports/boost-system/portfile.cmake +++ b/ports/boost-system/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/system - REF boost-1.67.0 - SHA512 3d7c8d9e0c4f3f5be95cf897e265adb1f2c96faa5dbc13b8050f988ddc94b9510531718b1726b147ab3484bff1ccf7bf18179084dcea968dcf80fd2f1c68686c + REF boost-1.68.0 + SHA512 408c0219c9a7d284f7f6053c45c102843b18a52aca9120c9cf88ad752d6480dde21d883e2e4d9a6ecefada0d3bf02364e90d91f5f9cc61a53fd75ebc6e16a0ea HEAD_REF master ) diff --git a/ports/boost-test/CONTROL b/ports/boost-test/CONTROL index 182c9ccf613..a4730649418 100644 --- a/ports/boost-test/CONTROL +++ b/ports/boost-test/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-test -Version: 1.67.0-2 +Version: 1.68.0-2 Build-Depends: boost-algorithm, boost-assert, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-io, boost-iterator, boost-modular-build-helper, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-timer, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost test module diff --git a/ports/boost-test/portfile.cmake b/ports/boost-test/portfile.cmake index d5834c60da7..7db1284c00b 100644 --- a/ports/boost-test/portfile.cmake +++ b/ports/boost-test/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/test - REF boost-1.67.0 - SHA512 9af937ef02982039b5aab54e142b877fef6c46f71b7cc8c83d81f850f4b4229ee93425ab8a88e6888952686e1e23da6591da072432a06c1bceae83c793a43cf5 + REF boost-1.68.0 + SHA512 e576311fea904ca64fcbb7d3f9cd435e5b5f68810ee73eaa8d73fe6dfe15663fd4c943308aaa632a7db4e51e3a48ed8e7fcb98b54a70752305cd9a3edbde97e0 HEAD_REF master ) diff --git a/ports/boost-thread/CONTROL b/ports/boost-thread/CONTROL index 6eeb13ebc4b..2929ec0b8d3 100644 --- a/ports/boost-thread/CONTROL +++ b/ports/boost-thread/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-thread -Version: 1.67.0 -Build-Depends: boost-algorithm, boost-assert, boost-atomic, boost-bind, boost-build, boost-chrono, boost-concept-check, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-exception, boost-function, boost-functional, boost-integer, boost-intrusive, boost-io, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-optional, boost-predef, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Version: 1.68.0 +Build-Depends: boost-algorithm, boost-assert, boost-atomic, boost-bind, boost-build, boost-chrono, boost-concept-check, boost-config, boost-container, boost-container-hash, boost-core, boost-date-time, boost-detail, boost-exception, boost-function, boost-integer, boost-intrusive, boost-io, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-optional, boost-predef, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost thread module diff --git a/ports/boost-thread/avoid-winapi.patch b/ports/boost-thread/avoid-winapi.patch new file mode 100644 index 00000000000..ed6a89ee757 --- /dev/null +++ b/ports/boost-thread/avoid-winapi.patch @@ -0,0 +1,13 @@ +diff --git a/include/boost/thread/win32/thread_primitives.hpp b/include/boost/thread/win32/thread_primitives.hpp +index 5e378f7..6144621 100644 +--- a/include/boost/thread/win32/thread_primitives.hpp ++++ b/include/boost/thread/win32/thread_primitives.hpp +@@ -70,7 +70,7 @@ namespace boost + { + namespace win32 + { +- namespace detail { typedef ticks_type (WINAPI *gettickcount64_t)(); } ++ namespace detail { typedef ticks_type (__stdcall *gettickcount64_t)(); } + extern BOOST_THREAD_DECL boost::detail::win32::detail::gettickcount64_t gettickcount64; + + enum event_type diff --git a/ports/boost-thread/portfile.cmake b/ports/boost-thread/portfile.cmake index 30f203d31e7..d260bcae9b1 100644 --- a/ports/boost-thread/portfile.cmake +++ b/ports/boost-thread/portfile.cmake @@ -5,9 +5,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/thread - REF boost-1.67.0 - SHA512 e641484c2d021d0a8b77955bd9ee7f53f4a4c7f003b9260aa17c78b236a8cda4b1ec59c9fb16aab823b7be9d6da6a67c2d333308d8b1d5c9bbaa6a0de9018479 + REF boost-1.68.0 + SHA512 ccb1283550347d367390d26c7b64d630cefbdd69ed18d0bdd42a82c726942a76a10a06729630b6e8788d553cf6fee8123feebc3f5b751254cef7a022475b02e8 HEAD_REF master + PATCHES avoid-winapi.patch ) include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) diff --git a/ports/boost-throw-exception/CONTROL b/ports/boost-throw-exception/CONTROL index d6b606c78f4..3f5d2c688dd 100644 --- a/ports/boost-throw-exception/CONTROL +++ b/ports/boost-throw-exception/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-throw-exception -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-detail, boost-vcpkg-helpers Description: Boost throw_exception module diff --git a/ports/boost-throw-exception/portfile.cmake b/ports/boost-throw-exception/portfile.cmake index dca2f1ac4dc..a376fe37de5 100644 --- a/ports/boost-throw-exception/portfile.cmake +++ b/ports/boost-throw-exception/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/throw_exception - REF boost-1.67.0 - SHA512 ce049466973f338071acd51dab620c0a428eb6777384003f5ffc1a90128cf87d7f8283aeb351ca576a8cfabe46e603b7d748fbe2f03b46227b6eb9faf292f106 + REF boost-1.68.0 + SHA512 7ec624763becab452f437eaa6e03c0882f672735a2bc4c1edfa92ccf2acd1c667905ccf15ae0f40091f64b425d83025c7ade4b55bd7418e542b12d575a1c8f60 HEAD_REF master ) diff --git a/ports/boost-timer/CONTROL b/ports/boost-timer/CONTROL index 67537375df2..69056033b7b 100644 --- a/ports/boost-timer/CONTROL +++ b/ports/boost-timer/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-timer -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-build, boost-chrono, boost-compatibility, boost-config, boost-core, boost-integer, boost-io, boost-modular-build-helper, boost-system, boost-throw-exception, boost-vcpkg-helpers Description: Boost timer module diff --git a/ports/boost-timer/portfile.cmake b/ports/boost-timer/portfile.cmake index 1f3b9dcdac3..029bdc2d308 100644 --- a/ports/boost-timer/portfile.cmake +++ b/ports/boost-timer/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/timer - REF boost-1.67.0 - SHA512 6028432edbdee4318d3295c9834417d31816efd8e16c5a0bcc41c0b1ffdd422c31eadb01cb0934684421bb07079476ecae41ec64d314c60d19d02ed9d995c682 + REF boost-1.68.0 + SHA512 5c84057890b0fc57f45f902c59d3f15ba9472d4538d13896b95232591cb2cde123df610b34eb2e3eec13e1cd9b13f652c558170466e0b7e7fe462bd167f84432 HEAD_REF master ) diff --git a/ports/boost-tokenizer/CONTROL b/ports/boost-tokenizer/CONTROL index ed1cb640ed0..0aab59b9102 100644 --- a/ports/boost-tokenizer/CONTROL +++ b/ports/boost-tokenizer/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-tokenizer -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-config, boost-detail, boost-iterator, boost-mpl, boost-throw-exception, boost-vcpkg-helpers Description: Boost tokenizer module diff --git a/ports/boost-tokenizer/portfile.cmake b/ports/boost-tokenizer/portfile.cmake index 15ebbe89ca0..e572b1d4095 100644 --- a/ports/boost-tokenizer/portfile.cmake +++ b/ports/boost-tokenizer/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/tokenizer - REF boost-1.67.0 - SHA512 2240809c63060f267c9b62171fcc1d959a199d8de65647de767c9829068a81e600d9084a8af0681bb09152e82789df2f13975a7ff1f0cd9ab6789347fe3154c6 + REF boost-1.68.0 + SHA512 f885c49fcafb3cfa4d1028722123d35fc42721cdda1894ccaf918aa25d88429bc8c2a9d73e15154a3982a2122e17bdfb08649578c2bd48f68e82a302e2bbce3b HEAD_REF master ) diff --git a/ports/boost-tti/CONTROL b/ports/boost-tti/CONTROL index fb2d59aa3c7..e2b7b093f1c 100644 --- a/ports/boost-tti/CONTROL +++ b/ports/boost-tti/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-tti -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-detail, boost-function-types, boost-mpl, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers Description: Boost tti module diff --git a/ports/boost-tti/portfile.cmake b/ports/boost-tti/portfile.cmake index 4e15f409512..99e5820318b 100644 --- a/ports/boost-tti/portfile.cmake +++ b/ports/boost-tti/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/tti - REF boost-1.67.0 - SHA512 e46b2a5cfd84c46577c499ee643f62804daf376fecaf15d3425b73d0221ab34dc2f882e31d7f8906adabafd271fc3707c6c5a2d99da8446a88951c4e828567f3 + REF boost-1.68.0 + SHA512 b14f7abbf2fe5f56b744803a4c803131ebe1b3762d2c85f624ead670619909db30fbd3ee3e5f1787b1f7377c25e5044553cf4df609c31209bbd9c2572b874247 HEAD_REF master ) diff --git a/ports/boost-tuple/CONTROL b/ports/boost-tuple/CONTROL index 7129158e3b7..8cd3cf3f85c 100644 --- a/ports/boost-tuple/CONTROL +++ b/ports/boost-tuple/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-tuple -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-core, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost tuple module diff --git a/ports/boost-tuple/portfile.cmake b/ports/boost-tuple/portfile.cmake index be031628cb7..96e2ae7573f 100644 --- a/ports/boost-tuple/portfile.cmake +++ b/ports/boost-tuple/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/tuple - REF boost-1.67.0 - SHA512 de9e0836ec0f923483d2738de44f1738a5d9c00cd4ea3f0c61192e892bf026d16a5719f874811b04c6e9d27b0ee7ac80a3b88b30198ca06d54df181640b374b8 + REF boost-1.68.0 + SHA512 b3c31e1b0ccff578f2311cd315118f5d5f37c110ef6537266078cdd23af184806bbaf58fd39e32ebcd4e231117241b16f6c7734717bd3b9344935ce3e2ad2faf HEAD_REF master ) diff --git a/ports/boost-type-erasure/CONTROL b/ports/boost-type-erasure/CONTROL index 579b091a02b..6c92109bba8 100644 --- a/ports/boost-type-erasure/CONTROL +++ b/ports/boost-type-erasure/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-type-erasure -Version: 1.67.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-fusion, boost-iterator, boost-modular-build-helper, boost-mp11, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-thread (!uwp), boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-vmd +Version: 1.68.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-fusion, boost-iterator, boost-modular-build-helper, boost-mp11, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-thread (!arm), boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-vmd Description: Boost type_erasure module diff --git a/ports/boost-type-erasure/portfile.cmake b/ports/boost-type-erasure/portfile.cmake index c6c07eb1b03..20016b7b1f1 100644 --- a/ports/boost-type-erasure/portfile.cmake +++ b/ports/boost-type-erasure/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/type_erasure - REF boost-1.67.0 - SHA512 45bcade387e21315ea94f69981531ca38c367d6e7e8bcc82e67b86360d4f0e6a786ff94935a10a7b2e6bed21c0847008bbfa70e8adc5f3704f4eafef54664d86 + REF boost-1.68.0 + SHA512 d4f1f2063408e2de67ce660f13017be092b414e7a6fed90f6b460715bdb38ead27763244aa48888646501a6f031c981416d2e5076ab42d619b8a494e99f89ce3 HEAD_REF master ) diff --git a/ports/boost-type-index/CONTROL b/ports/boost-type-index/CONTROL index ec217ec273c..fbcda2c7837 100644 --- a/ports/boost-type-index/CONTROL +++ b/ports/boost-type-index/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-type-index -Version: 1.67.0 -Build-Depends: boost-config, boost-container-hash, boost-core, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-config, boost-container-hash, boost-core, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost type_index module diff --git a/ports/boost-type-index/portfile.cmake b/ports/boost-type-index/portfile.cmake index 1554e1258c7..e955e244df1 100644 --- a/ports/boost-type-index/portfile.cmake +++ b/ports/boost-type-index/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/type_index - REF boost-1.67.0 - SHA512 31a471bedaa8e30eb84e22e7f059938ffb25c649a80b203067da1c63bcb8d1fcd9cf61bff593fcdb6d463408bc6cb2775dbb589ac04bc6de7e0bc351e0b3abd9 + REF boost-1.68.0 + SHA512 5d31df2b8f92599d655ff46bdad6342dbce5f4e042054705d61d13b576e4c8d933a4fdb7ec9e5fca14f43dfc1c307911a269041f1742c2894690a94eb5d23b52 HEAD_REF master ) diff --git a/ports/boost-type-traits/CONTROL b/ports/boost-type-traits/CONTROL index f7eab32a763..368cafe9ee8 100644 --- a/ports/boost-type-traits/CONTROL +++ b/ports/boost-type-traits/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-type-traits -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-core, boost-detail, boost-static-assert, boost-vcpkg-helpers Description: Boost type_traits module diff --git a/ports/boost-type-traits/portfile.cmake b/ports/boost-type-traits/portfile.cmake index 0ae0417b251..427b9c6992e 100644 --- a/ports/boost-type-traits/portfile.cmake +++ b/ports/boost-type-traits/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/type_traits - REF boost-1.67.0 - SHA512 3a2c0b3498c9a71d668fcb0f0b46b7c97275396f5fe3703ceb2534a34bc497af10a655da72570ab9073a0a92db6ed079ed4ddd14fff54c791784d734a54d24bc + REF boost-1.68.0 + SHA512 d9bdb5eb2e602085bf1f6d4339a7895c2f1a7227889e7c20088cc9fe35da5f1c44ff297c043f1713a8831b0785ef871b5ac02c8ad2b7ee305c1a6310678b5985 HEAD_REF master ) diff --git a/ports/boost-typeof/CONTROL b/ports/boost-typeof/CONTROL index 25c345a3e1c..a7ea199cfbc 100644 --- a/ports/boost-typeof/CONTROL +++ b/ports/boost-typeof/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-typeof -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-mpl, boost-preprocessor, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost typeof module diff --git a/ports/boost-typeof/portfile.cmake b/ports/boost-typeof/portfile.cmake index 2e7aaca5b7e..54693f1cb91 100644 --- a/ports/boost-typeof/portfile.cmake +++ b/ports/boost-typeof/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/typeof - REF boost-1.67.0 - SHA512 91b29446146a44aa0983c953086e45863b40e7d053670a0ef78f703d2419db7ac1615b42b7eca70e70088b7da9e9c37687e9ac570fc3995a74a9e78cae78280c + REF boost-1.68.0 + SHA512 c01723f5e50b7bd7d190df73e4b5b7ffe6512c89d76080061dcd1d4a7dac45b450dda4e3edc7452613a7aad230414ad8ad728d56ed392f9d5571a99281315ada HEAD_REF master ) diff --git a/ports/boost-ublas/CONTROL b/ports/boost-ublas/CONTROL index a6dd9d24ea1..68e20cac5d7 100644 --- a/ports/boost-ublas/CONTROL +++ b/ports/boost-ublas/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-ublas -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-concept-check, boost-config, boost-core, boost-iterator, boost-mpl, boost-range, boost-serialization, boost-smart-ptr, boost-static-assert, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost ublas module diff --git a/ports/boost-ublas/portfile.cmake b/ports/boost-ublas/portfile.cmake index db221b6cd2c..2829e600bb7 100644 --- a/ports/boost-ublas/portfile.cmake +++ b/ports/boost-ublas/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/ublas - REF boost-1.67.0 - SHA512 5ff9cbbd1e9dd33eb1230e2d5247d80526be1d5f5d3e145dbdb2f95c1f61b86438a937174936cf4489fac81111b72ee317a6e653ae6c3d84b58bdc1cd2ce7a82 + REF boost-1.68.0 + SHA512 26bf61e43551a199e9a62d2d7f21fcb9407e9dc97b20317b17561d5c95256eced961eb30b1d8937533c1d9b77d56a148dfb82471b2228a92a3c53b63982cb02f HEAD_REF master ) diff --git a/ports/boost-units/CONTROL b/ports/boost-units/CONTROL index 2d85d080ace..e6645b1a3f3 100644 --- a/ports/boost-units/CONTROL +++ b/ports/boost-units/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-units -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-config, boost-core, boost-integer, boost-io, boost-lambda, boost-math, boost-mpl, boost-preprocessor, boost-serialization, boost-static-assert, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost units module diff --git a/ports/boost-units/portfile.cmake b/ports/boost-units/portfile.cmake index df480dbb5d9..50041db80ae 100644 --- a/ports/boost-units/portfile.cmake +++ b/ports/boost-units/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/units - REF boost-1.67.0 - SHA512 33ce1386e67982d4b6f45fa78ce787332c7a753463650762a66da1064741fc6f9909fe1929416ec7918060300cedda93642fd6adb4a2d5f4c689f4d48b2a720f + REF boost-1.68.0 + SHA512 8ec422fb52cf1761bd0e4f822807e8c9ed7a3c1642dc96e7447ffd903c9c38c045699b897a69714516e5654252b670fc5b7c795f6e6e54aeb7aed3adebdbccb8 HEAD_REF master ) diff --git a/ports/boost-unordered/CONTROL b/ports/boost-unordered/CONTROL index 50cd43f5f78..62bcadd488f 100644 --- a/ports/boost-unordered/CONTROL +++ b/ports/boost-unordered/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-unordered -Version: 1.67.0 -Build-Depends: boost-assert, boost-compatibility, boost-config, boost-container, boost-core, boost-detail, boost-functional, boost-move, boost-predef, boost-preprocessor, boost-smart-ptr, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-container, boost-container-hash, boost-core, boost-detail, boost-functional, boost-move, boost-predef, boost-preprocessor, boost-smart-ptr, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost unordered module diff --git a/ports/boost-unordered/portfile.cmake b/ports/boost-unordered/portfile.cmake index 02fae389995..3c89877e954 100644 --- a/ports/boost-unordered/portfile.cmake +++ b/ports/boost-unordered/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/unordered - REF boost-1.67.0 - SHA512 8eb086d4993ff7079b0919b0ad39ac16b37b4951eb9cf4d5f388aff37cf2b7ae42621277a23f8d870a35ff571de44ee1dc7b0faf108fdbf1ccdd8ed2d6be51d4 + REF boost-1.68.0 + SHA512 71b34649d70a610efa6d2e98019ee5db57aa5f09a4a388c8bf54e4a1ff02de8b581a249f7b917be58663e260599732eaaedeb297e7c20046013a811997991c16 HEAD_REF master ) diff --git a/ports/boost-utility/CONTROL b/ports/boost-utility/CONTROL index 481427860ac..271c5a718ba 100644 --- a/ports/boost-utility/CONTROL +++ b/ports/boost-utility/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-utility -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-config, boost-core, boost-detail, boost-integer, boost-preprocessor, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost utility module diff --git a/ports/boost-utility/portfile.cmake b/ports/boost-utility/portfile.cmake index 1a919c18a4a..6d1af49f775 100644 --- a/ports/boost-utility/portfile.cmake +++ b/ports/boost-utility/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/utility - REF boost-1.67.0 - SHA512 4123a71af8234789b2b68f2a3b6e13e7ad3e46484e8b06ee2159d7337d101a2b1c8b8e7ca70ce29f0b71802f45014e1db03253e1f6515a6ad2f9d5ebced77caf + REF boost-1.68.0 + SHA512 ee6ef15cd7291b5001f4a3a96e95790cfab2017b76f6eac3b9672983e56440d6184cb896257a9c4e365fe1e71b3c721b3b98a4d36d793a8bdf8d1c78585408e3 HEAD_REF master ) diff --git a/ports/boost-uuid/CONTROL b/ports/boost-uuid/CONTROL index 09af27bd7db..dce43427708 100644 --- a/ports/boost-uuid/CONTROL +++ b/ports/boost-uuid/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-uuid -Version: 1.67.0 -Build-Depends: boost-assert, boost-compatibility, boost-config, boost-core, boost-integer, boost-io, boost-numeric-conversion, boost-predef, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tti, boost-type-traits, boost-vcpkg-helpers, boost-winapi +Version: 1.68.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-container-hash, boost-core, boost-integer, boost-io, boost-move, boost-numeric-conversion, boost-predef, boost-random, boost-serialization, boost-static-assert, boost-throw-exception, boost-tti, boost-type-traits, boost-vcpkg-helpers, boost-winapi Description: Boost uuid module diff --git a/ports/boost-uuid/portfile.cmake b/ports/boost-uuid/portfile.cmake index b68c1f68b00..41f903735c0 100644 --- a/ports/boost-uuid/portfile.cmake +++ b/ports/boost-uuid/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/uuid - REF boost-1.67.0 - SHA512 224324198b24c4606ca0c3c370c8d344730e6851ccdff012eaa6024ede958b342c5b728ddbb0a5c52dedcd0ac628bf12213de14654348c3e18eb20aa73d8b7e4 + REF boost-1.68.0 + SHA512 cb03182301283785e123a77060426dfcc054c21663ce76d05c1d8dc57c529a8bceadb0c26deadff1ee5070d3bc687050819f272b8afe51ecfafe679631162fc1 HEAD_REF master ) diff --git a/ports/boost-variant/CONTROL b/ports/boost-variant/CONTROL index 246ee73554a..b2f106c548b 100644 --- a/ports/boost-variant/CONTROL +++ b/ports/boost-variant/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-variant -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-detail, boost-functional, boost-integer, boost-move, boost-mpl, boost-preprocessor, boost-static-assert, boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost variant module diff --git a/ports/boost-variant/portfile.cmake b/ports/boost-variant/portfile.cmake index 8449a21aac6..9a0f5a8da57 100644 --- a/ports/boost-variant/portfile.cmake +++ b/ports/boost-variant/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/variant - REF boost-1.67.0 - SHA512 1fc6a0a98cdb2eca64f8a380e31724c70a9a0260ab2e433ad5812c580c9e2a867c6faf7ee17b0c6cf94b6410af1e509ac5d51e93b6fa1174b3d1c55ca62a10c7 + REF boost-1.68.0 + SHA512 532999093f3dbc2f6a96ce7230cf0f1248f079e185f07f99a7162e0a8e75b75fbfda89d21f13fd01d4f5740853e932d46b0e7f9301a9cef0ff15017f1c8cae98 HEAD_REF master ) diff --git a/ports/boost-vcpkg-helpers/generate-ports.ps1 b/ports/boost-vcpkg-helpers/generate-ports.ps1 index 0635608fd10..07b2e7a25d6 100644 --- a/ports/boost-vcpkg-helpers/generate-ports.ps1 +++ b/ports/boost-vcpkg-helpers/generate-ports.ps1 @@ -1,13 +1,36 @@ [CmdletBinding()] param ( $libraries = @(), - $version = "1.67.0" + $version = "1.68.0" ) $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition -$libsDisabledInLinux = "python|fiber" -$libsDisabledInUWP = "iostreams|filesystem|thread|context|contract|python|stacktrace|program[_-]options|coroutine`$|fiber|locale|test|type[_-]erasure|wave|log" +function TransformReference() +{ + param ( + [string]$library + ) + + if ($library -match "python|fiber") + { + # These two only work on windows desktop + "$library (windows)" + } + elseif ($library -match "thread|type[_-]erasure|contract") + { + # thread only works on x86-based processors + "$library (!arm)" + } + elseif ($library -match "iostreams|filesystem|context|stacktrace|coroutine`$|locale|test|wave|log`$") + { + "$library (!uwp)" + } + else + { + "$library" + } +} function Generate() { @@ -244,7 +267,7 @@ foreach ($library in $libraries) if (!(Test-Path $archive)) { "Downloading boost/$library..." - & "$scriptsDir\..\..\downloads\tools\aria2-18.01.0-windows\aria2-1.33.1-win-32bit-build1\aria2c.exe" "https://github.com/boostorg/$library/archive/boost-$version.tar.gz" -d "$scriptsDir/downloads" -o "$library-boost-$version.tar.gz" + & @(vcpkg fetch aria2)[-1] "https://github.com/boostorg/$library/archive/boost-$version.tar.gz" -d "$scriptsDir/downloads" -o "$library-boost-$version.tar.gz" } $hash = vcpkg hash $archive $unpacked = "$scriptsDir/libs/$library-boost-$version" @@ -266,10 +289,16 @@ foreach ($library in $libraries) try { $groups = $( - findstr /si /C:"#include ).*", "`$1" -replace "/|\.hp?p?| ","" } | group | % name | % { + % { $_ ` + -replace "^[^:]*:","" ` + -replace "boost/numeric/conversion/","boost/numeric_conversion/" ` + -replace "boost/functional/hash.hpp","boost/container_hash/hash.hpp" ` + -replace "boost/detail/([^/]+)/","boost/`$1/" ` + -replace "#include ?).*", "`$1" ` + -replace "/|\.hp?p?| ","" } | group | % name | % { # mappings Write-Verbose "${library}: $_" if ($_ -match "aligned_storage") { "type_traits" } @@ -308,14 +337,15 @@ foreach ($library in $libraries) $deps = @($groups | ? { $libraries_found -contains $_ }) - if ($library -eq "regex") - { - $deps += @("container_hash") - } - $deps = @($deps | ? { # Boost contains cycles, so remove a few dependencies to break the loop. - (($library -notmatch "core|assert|mpl|detail|type_traits") -or ($_ -notmatch "utility")) ` + (($library -notmatch "core|assert|mpl|detail|throw_exception|type_traits") -or ($_ -notmatch "utility")) ` + -and ` + (($library -notmatch "range") -or ($_ -notmatch "algorithm"))` + -and ` + (($library -ne "config") -or ($_ -notmatch "integer"))` + -and ` + (($library -notmatch "random") -or ($_ -notmatch "multiprecision"))` -and ` (($library -notmatch "lexical_cast") -or ($_ -notmatch "math"))` -and ` @@ -329,18 +359,7 @@ foreach ($library in $libraries) -and ` (($library -notmatch "utility|concept_check") -or ($_ -notmatch "iterator")) } | % { "boost-$_" -replace "_","-" } | % { - if ($_ -match $libsDisabledInLinux -and $_ -match $libsDisabledInUWP) - { - "$_ (windows)" - } - elseif ($_ -match $libsDisabledInUWP) - { - "$_ (!uwp)" - } - else - { - $_ - } + TransformReference $_ }) $deps += @("boost-vcpkg-helpers") @@ -359,7 +378,7 @@ foreach ($library in $libraries) } elseif ($library -eq "iostreams") { - $deps += @("zlib", "bzip2") + $deps += @("zlib", "bzip2", "liblzma") } elseif ($library -eq "locale") { @@ -380,19 +399,7 @@ foreach ($library in $libraries) -Depends $deps ` -NeedsBuild $needsBuild - if ($library -match $libsDisabledInLinux -and $library -match $libsDisabledInUWP) - { - $libraries_in_boost_port += @("$library (windows)") - } - elseif ($library -match $libsDisabledInUWP) - { - $libraries_in_boost_port += @("$library (!uwp)") - } - else - { - $libraries_in_boost_port += @($library) - } - + $libraries_in_boost_port += @(TransformReference $library) } finally { diff --git a/ports/boost-vmd/CONTROL b/ports/boost-vmd/CONTROL index b6bea6cff01..a126cf99788 100644 --- a/ports/boost-vmd/CONTROL +++ b/ports/boost-vmd/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-vmd -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-preprocessor, boost-vcpkg-helpers Description: Boost vmd module diff --git a/ports/boost-vmd/portfile.cmake b/ports/boost-vmd/portfile.cmake index 0d96a660678..460e5ff1de3 100644 --- a/ports/boost-vmd/portfile.cmake +++ b/ports/boost-vmd/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/vmd - REF boost-1.67.0 - SHA512 479b816decaf5bba27f6aee25af950bfce2df62ebd1e278cf62ad6260bb590ac93c284f09de43fc96d0504093937507d55bffd1ae751af6120a4632da02409d6 + REF boost-1.68.0 + SHA512 5d12edebb0beabb8b82d2aab15b50b35555e171eb5e289d67872c67d30fadcbd890f7c61db9a1b599572b5eebbb6978accf8673e86c6373181ff66c5c56b3cc8 HEAD_REF master ) diff --git a/ports/boost-wave/CONTROL b/ports/boost-wave/CONTROL index aa1a8e707a2..7df45759c4c 100644 --- a/ports/boost-wave/CONTROL +++ b/ports/boost-wave/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-wave -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-build, boost-concept-check, boost-config, boost-core, boost-detail, boost-filesystem (!uwp), boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-mpl, boost-multi-index, boost-pool, boost-preprocessor, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost wave module diff --git a/ports/boost-wave/portfile.cmake b/ports/boost-wave/portfile.cmake index 479770e92c2..b58a6f64301 100644 --- a/ports/boost-wave/portfile.cmake +++ b/ports/boost-wave/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/wave - REF boost-1.67.0 - SHA512 e298b903dbeae5577938e92559b699a0f89abcff9299781c1857c401503b6c31b56420908aed6f0063b25508e97e978c39282352a1355d0924012e384994094b + REF boost-1.68.0 + SHA512 988caa39d1958defdca1a89790bb1028d51060b1c8bf33047d175fe990c9565c4f60ba4d32215f9af6a433f286fe0201e1a9d45b365b3eac6148d0902d997080 HEAD_REF master ) diff --git a/ports/boost-winapi/CONTROL b/ports/boost-winapi/CONTROL index 9f3242243ef..aae04fe68b0 100644 --- a/ports/boost-winapi/CONTROL +++ b/ports/boost-winapi/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-winapi -Version: 1.67.0 -Build-Depends: boost-config, boost-integer, boost-predef, boost-vcpkg-helpers +Version: 1.68.0 +Build-Depends: boost-config, boost-predef, boost-vcpkg-helpers Description: Boost winapi module diff --git a/ports/boost-winapi/portfile.cmake b/ports/boost-winapi/portfile.cmake index 30c36ee1f5e..0080662c9f6 100644 --- a/ports/boost-winapi/portfile.cmake +++ b/ports/boost-winapi/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/winapi - REF boost-1.67.0 - SHA512 1a0935132e8058b3f592406aaf6bb6fa8df6c96c35e61e09d84e39c6ab00c50b87346789d309fdfb7de8f6252134a76a59c0dc214fe1f4ee25d82c379cf63a3c + REF boost-1.68.0 + SHA512 640b144502bfc3ed06267d90a01d7eb7812898596c61e16048baaf98f49a27bffe5ccfddd6070d835c12d154c4669d1e2b862521f095a23868b192e62e439af1 HEAD_REF master ) diff --git a/ports/boost-xpressive/CONTROL b/ports/boost-xpressive/CONTROL index baa3e721634..f7202426de1 100644 --- a/ports/boost-xpressive/CONTROL +++ b/ports/boost-xpressive/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-xpressive -Version: 1.67.0 +Version: 1.68.0 Build-Depends: boost-assert, boost-compatibility, boost-config, boost-conversion, boost-core, boost-detail, boost-exception, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-proto, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost xpressive module diff --git a/ports/boost-xpressive/portfile.cmake b/ports/boost-xpressive/portfile.cmake index 2d4791918d1..5eae3397241 100644 --- a/ports/boost-xpressive/portfile.cmake +++ b/ports/boost-xpressive/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/xpressive - REF boost-1.67.0 - SHA512 3883764ee2d0c5cfcf444319ae5c7ec547d27d0f54c1e2f4e4b134be25c3fbc7954bae1f783cac96386a63984dcff4197bd98176644c1d6bc50926256f39069d + REF boost-1.68.0 + SHA512 3038a336a13232e567e1017b005bb6b95ffbc7ad0bcb55385afb33ba545d0d860edd79e1902263cd4e99703c75ca6d57d06be95ddec430f3b54b1f31fb05b84d HEAD_REF master ) diff --git a/ports/boost-yap/CONTROL b/ports/boost-yap/CONTROL new file mode 100644 index 00000000000..70b4727e64c --- /dev/null +++ b/ports/boost-yap/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-yap +Version: 1.68.0 +Build-Depends: boost-hana, boost-preprocessor, boost-type-index, boost-vcpkg-helpers +Description: Boost yap module diff --git a/ports/boost-yap/portfile.cmake b/ports/boost-yap/portfile.cmake new file mode 100644 index 00000000000..3d99e46fa9c --- /dev/null +++ b/ports/boost-yap/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/yap + REF boost-1.68.0 + SHA512 a8d920b8a0f60b26db2a0eff7718184dcd6f0405f9ebb5ca7a7c0bcb7b824e52a17a63f786c09a4de566a24c3a5178e9916e5d1b05dd13fd82083c2d4749d523 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 23fc8ef599d..13c43fb8bd0 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,8 +1,8 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost -Version: 1.67.0 +Version: 1.68.0 Description: Peer-reviewed portable C++ source libraries -Build-Depends: boost-accumulators, boost-algorithm, boost-align, boost-any, boost-array, boost-asio, boost-assert, boost-assign, boost-atomic, boost-beast, boost-bimap, boost-bind, boost-callable-traits, boost-chrono, boost-circular-buffer, boost-compatibility, boost-compute, boost-concept-check, boost-config, boost-container, boost-container-hash, boost-context (!uwp), boost-contract (!uwp), boost-conversion, boost-convert, boost-core, boost-coroutine (!uwp), boost-coroutine2, boost-crc, boost-date-time, boost-detail, boost-disjoint-sets, boost-dll, boost-dynamic-bitset, boost-endian, boost-exception, boost-fiber (windows), boost-filesystem (!uwp), boost-flyweight, boost-foreach, boost-format, boost-function, boost-functional, boost-function-types, boost-fusion, boost-geometry, boost-gil, boost-graph, boost-graph-parallel, boost-hana, boost-heap, boost-hof, boost-icl, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iostreams (!uwp), boost-iterator, boost-lambda, boost-lexical-cast, boost-locale (!uwp), boost-local-function, boost-lockfree, boost-log (!uwp), boost-logic (!uwp), boost-math, boost-metaparse, boost-move, boost-mp11, boost-mpl, boost-msm, boost-multiprecision, boost-multi-array, boost-multi-index, boost-numeric-conversion, boost-interval, boost-odeint, boost-ublas, boost-optional, boost-parameter, boost-phoenix, boost-polygon, boost-poly-collection, boost-pool, boost-predef, boost-preprocessor, boost-process, boost-program-options (!uwp), boost-property-map, boost-property-tree, boost-proto, boost-ptr-container, boost-python (windows), boost-qvm, boost-random, boost-range, boost-ratio, boost-rational, boost-regex, boost-scope-exit, boost-serialization, boost-signals, boost-signals2, boost-smart-ptr, boost-sort, boost-spirit, boost-stacktrace (!uwp), boost-statechart, boost-static-assert, boost-system, boost-test (!uwp), boost-thread (!uwp), boost-throw-exception, boost-timer, boost-tokenizer, boost-tti, boost-tuple, boost-typeof, boost-type-erasure (!uwp), boost-type-index, boost-type-traits, boost-units, boost-unordered, boost-utility, boost-uuid, boost-variant, boost-vmd, boost-wave (!uwp), boost-winapi, boost-xpressive +Build-Depends: boost-accumulators, boost-algorithm, boost-align, boost-any, boost-array, boost-asio, boost-assert, boost-assign, boost-atomic, boost-beast, boost-bimap, boost-bind, boost-callable-traits, boost-chrono, boost-circular-buffer, boost-compatibility, boost-compute, boost-concept-check, boost-config, boost-container, boost-container-hash, boost-context (!uwp), boost-contract (!arm), boost-conversion, boost-convert, boost-core, boost-coroutine (!uwp), boost-coroutine2, boost-crc, boost-date-time, boost-detail, boost-disjoint-sets, boost-dll, boost-dynamic-bitset, boost-endian, boost-exception, boost-fiber (windows), boost-filesystem (!uwp), boost-flyweight, boost-foreach, boost-format, boost-function, boost-functional, boost-function-types, boost-fusion, boost-geometry, boost-gil, boost-graph, boost-graph-parallel, boost-hana, boost-heap, boost-hof, boost-icl, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iostreams (!uwp), boost-iterator, boost-lambda, boost-lexical-cast, boost-locale (!uwp), boost-local-function, boost-lockfree, boost-log (!uwp), boost-logic, boost-math, boost-metaparse, boost-move, boost-mp11, boost-mpl, boost-msm, boost-multiprecision, boost-multi-array, boost-multi-index, boost-numeric-conversion, boost-interval, boost-odeint, boost-ublas, boost-optional, boost-parameter, boost-phoenix, boost-polygon, boost-poly-collection, boost-pool, boost-predef, boost-preprocessor, boost-process, boost-program-options, boost-property-map, boost-property-tree, boost-proto, boost-ptr-container, boost-python (windows), boost-qvm, boost-random, boost-range, boost-ratio, boost-rational, boost-regex, boost-scope-exit, boost-serialization, boost-signals, boost-signals2, boost-smart-ptr, boost-sort, boost-spirit, boost-stacktrace (!uwp), boost-statechart, boost-static-assert, boost-system, boost-test (!uwp), boost-thread (!arm), boost-throw-exception, boost-timer, boost-tokenizer, boost-tti, boost-tuple, boost-typeof, boost-type-erasure (!arm), boost-type-index, boost-type-traits, boost-units, boost-unordered, boost-utility, boost-uuid, boost-variant, boost-vmd, boost-wave (!uwp), boost-winapi, boost-xpressive, boost-yap Feature: mpi Description: Build with MPI support diff --git a/ports/botan/0001-fix-crt-linking.patch b/ports/botan/0001-fix-crt-linking.patch deleted file mode 100644 index d1fdc2d709b..00000000000 --- a/ports/botan/0001-fix-crt-linking.patch +++ /dev/null @@ -1,56 +0,0 @@ -From b41cc93b63c99525e71291424466cdd45d92f770 Mon Sep 17 00:00:00 2001 -From: Mikhail Paulyshka -Date: Sun, 12 Mar 2017 04:34:10 +0300 -Subject: [PATCH] fix CRT linking for static library for MSVC - ---- - configure.py | 15 +++++++++++++++ - src/build-data/cc/msvc.txt | 8 ++++++-- - 2 files changed, 21 insertions(+), 2 deletions(-) - -diff --git a/configure.py b/configure.py -index faf5120c5..9c545cf5f 100755 ---- a/configure.py -+++ b/configure.py -@@ -976,6 +976,21 @@ class CompilerInfo(object): - if flag != None and flag != '' and flag not in abi_link: - abi_link.append(flag) - -+ if options.build_shared_lib: -+ if options.with_debug_info: -+ if 'dynamic-debug' in self.mach_abi_linking: -+ abi_link.append(self.mach_abi_linking['dynamic-debug']) -+ else: -+ if 'dynamic' in self.mach_abi_linking: -+ abi_link.append(self.mach_abi_linking['dynamic']) -+ else: -+ if options.with_debug_info: -+ if 'static-debug' in self.mach_abi_linking: -+ abi_link.append(self.mach_abi_linking['static-debug']) -+ else: -+ if 'static' in self.mach_abi_linking: -+ abi_link.append(self.mach_abi_linking['static']) -+ - if options.with_coverage_info: - if self.coverage_flags == '': - raise ConfigureError('No coverage handling for %s' % (self.basename)) -diff --git a/src/build-data/cc/msvc.txt b/src/build-data/cc/msvc.txt -index c1b820b91..e6182b0fa 100644 ---- a/src/build-data/cc/msvc.txt -+++ b/src/build-data/cc/msvc.txt -@@ -53,6 +53,10 @@ default-debug -> "$(LINKER) /DEBUG" - - - --all -> "/MD /bigobj" --all-debug -> "/MDd /bigobj" -+all -> "/bigobj" -+all-debug -> "/bigobj" -+static -> "/MT" -+static-debug -> "/MTd" -+dynamic -> "/MD" -+dynamic-debug -> "/MDd" - --- -2.11.0.windows.1 - diff --git a/ports/botan/CONTROL b/ports/botan/CONTROL index 1ff0101186d..5582c3a7a45 100644 --- a/ports/botan/CONTROL +++ b/ports/botan/CONTROL @@ -1,3 +1,3 @@ Source: botan -Version: 2.0.1 -Description: A cryptography library written in C++11 \ No newline at end of file +Version: 2.8.0 +Description: A cryptography library written in C++11 diff --git a/ports/botan/portfile.cmake b/ports/botan/portfile.cmake index a9a9ca547f0..200d00f9f7b 100644 --- a/ports/botan/portfile.cmake +++ b/ports/botan/portfile.cmake @@ -1,24 +1,32 @@ include(vcpkg_common_functions) -set(BOTAN_VERSION 2.0.1) -set(BOTAN_HASH c5062ce92a6e6e333b4e6af095ed54d0c4ffacefc6ac87ec651dd1e0937793c9956b7c9c0d3acf49f059505526584168364e01c55ab72c953ad255e8396aed35) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/Botan-${BOTAN_VERSION}) +set(BOTAN_VERSION 2.8.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://botan.randombit.net/releases/Botan-${BOTAN_VERSION}.tgz" - FILENAME "Botan-${BOTAN_VERSION}.tgz" - SHA512 ${BOTAN_HASH} +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO randombit/botan + REF cb14e9ce95bcaae2ada7ffe96ef0cce6a2b38593 + SHA512 3d8fbf1c65e2b0259f225db46ffa4a7eb989a518b230574e94f82dc13afd7dc32cfe6a8a0127e7dd0dea30e06f3946db78db50e107937382eff8ed823e996dc3 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-crt-linking.patch") vcpkg_find_acquire_program(JOM) vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(BOTAN_FLAG_SHARED --disable-shared) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BOTAN_FLAG_SHARED --enable-shared-library) + set(BOTAN_FLAG_STATIC --disable-static-library) +else() + set(BOTAN_FLAG_SHARED --disable-shared-library) + set(BOTAN_FLAG_STATIC --enable-static-library) +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(BOTAN_MSVC_RUNTIME "--msvc-runtime=MD") +else() + set(BOTAN_MSVC_RUNTIME "--msvc-runtime=MT") endif() if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") @@ -34,12 +42,14 @@ function(BOTAN_BUILD BOTAN_BUILD_TYPE) if(BOTAN_BUILD_TYPE STREQUAL "dbg") set(BOTAN_FLAG_PREFIX ${CURRENT_PACKAGES_DIR}/debug) set(BOTAN_FLAG_DEBUGMODE --debug-mode) - set(BOTAN_DEBUG_PREFIX d) + set(BOTAN_DEBUG_SUFFIX "") + set(BOTAN_MSVC_RUNTIME_SUFFIX "d") else() set(BOTAN_FLAG_DEBUGMODE) set(BOTAN_FLAG_PREFIX ${CURRENT_PACKAGES_DIR}) + set(BOTAN_MSVC_RUNTIME_SUFFIX "") endif() - + message(STATUS "Configure ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}") if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}) @@ -48,16 +58,16 @@ function(BOTAN_BUILD BOTAN_BUILD_TYPE) make_directory(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}) vcpkg_execute_required_process( - COMMAND "${PYTHON3}" "${SOURCE_PATH}/configure.py" + COMMAND "${PYTHON3}" "${SOURCE_PATH}/configure.py" --cc=msvc --cpu=${BOTAN_FLAG_CPU} - ${BOTAN_FLAG_SHARED} + ${BOTAN_FLAG_SHARED} + ${BOTAN_FLAG_STATIC} + ${BOTAN_MSVC_RUNTIME}${BOTAN_MSVC_RUNTIME_SUFFIX} ${BOTAN_FLAG_DEBUGMODE} "--distribution-info=vcpkg ${TARGET_TRIPLET}" - --makefile-style=nmake - --with-pkcs11 --prefix=${BOTAN_FLAG_PREFIX} - --link-method=copy + --link-method=copy WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}" LOGNAME configure-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}) message(STATUS "Configure ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done") @@ -71,18 +81,18 @@ function(BOTAN_BUILD BOTAN_BUILD_TYPE) message(STATUS "Package ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}") vcpkg_execute_required_process( - COMMAND "${PYTHON3}" "${SOURCE_PATH}/src/scripts/install.py" - --destdir=${BOTAN_FLAG_PREFIX} - --docdir=share + COMMAND "${PYTHON3}" "${SOURCE_PATH}/src/scripts/install.py" + --prefix=${BOTAN_FLAG_PREFIX} + --docdir=share WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}" LOGNAME install-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(RENAME ${BOTAN_FLAG_PREFIX}/lib/botan${BOTAN_DEBUG_PREFIX}.dll ${BOTAN_FLAG_PREFIX}/bin/botan${BOTAN_DEBUG_PREFIX}.dll) + file(RENAME ${BOTAN_FLAG_PREFIX}/lib/botan${BOTAN_DEBUG_SUFFIX}.dll ${BOTAN_FLAG_PREFIX}/bin/botan${BOTAN_DEBUG_SUFFIX}.dll) endif() - + message(STATUS "Package ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done") -endfunction() +endfunction() BOTAN_BUILD(rel) BOTAN_BUILD(dbg) @@ -93,14 +103,14 @@ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/botan-cli.exe) file(RENAME ${CURRENT_PACKAGES_DIR}/include/botan-2/botan ${CURRENT_PACKAGES_DIR}/include/botan) -file(REMOVE_RECURSE +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/include/botan-2 ${CURRENT_PACKAGES_DIR}/share/botan-${BOTAN_VERSION}/manual) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() diff --git a/ports/box2d/CMakeLists.txt b/ports/box2d/CMakeLists.txt new file mode 100644 index 00000000000..95155426669 --- /dev/null +++ b/ports/box2d/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 3.9) +project(Box2d CXX) + +file(GLOB_RECURSE SOURCES Box2D/Box2D/*.cpp) + +add_library(Box2D ${SOURCES}) +target_include_directories(Box2D PUBLIC $ $) + +install(TARGETS Box2D + EXPORT unofficial-box2d-targets + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install( + EXPORT unofficial-box2d-targets + FILE unofficial-box2d-config.cmake + NAMESPACE unofficial::box2d:: + DESTINATION share/unofficial-box2d +) diff --git a/ports/box2d/CONTROL b/ports/box2d/CONTROL index 7cfcb01a061..220a5a0588b 100644 --- a/ports/box2d/CONTROL +++ b/ports/box2d/CONTROL @@ -1,3 +1,3 @@ Source: box2d -Version: 2.3.1-374664b +Version: 2.3.1-374664b-1 Description: Box2D (http://box2d.org) is an open source C++ engine for simulating rigid bodies in 2D. diff --git a/ports/box2d/portfile.cmake b/ports/box2d/portfile.cmake index 87aaefc74ff..c35f37444a0 100644 --- a/ports/box2d/portfile.cmake +++ b/ports/box2d/portfile.cmake @@ -1,17 +1,8 @@ - -# Get output directory -set(PROJECT_ARCH_BITS "x64") -if(TRIPLET_SYSTEM_ARCH MATCHES "x86") - set(PROJECT_ARCH_BITS "x32") -elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm") - message(FATAL_ERROR "ARM not supported") -endif(TRIPLET_SYSTEM_ARCH MATCHES "x86") - - include(vcpkg_common_functions) -if(EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("Box2D only supports building as a static library") + set(VCPKG_LIBRARY_LINKAGE "static") endif() vcpkg_from_github( @@ -22,54 +13,23 @@ vcpkg_from_github( HEAD_REF master ) -if(VCPKG_CRT_LINKAGE STREQUAL "static") - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/use-static-linkage.patch - ) -endif() +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -# Put the licence and readme files where vcpkg expects it -message(STATUS "Packaging license") -file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/box2d) -file(COPY ${SOURCE_PATH}/Box2D/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/box2d) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/box2d/License.txt ${CURRENT_PACKAGES_DIR}/share/box2d/copyright) -message(STATUS "Packaging license done") +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() -# Building: -set(OUTPUTS_PATH "${SOURCE_PATH}/Box2D/Build/vs2015/bin/${PROJECT_ARCH_BITS}") +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-box2d TARGET_PATH share/unofficial-box2d) -vcpkg_build_msbuild(PROJECT_PATH ${SOURCE_PATH}/Box2D/Build/vs2015/Box2D.vcxproj) - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Packaging ${TARGET_TRIPLET}-Release lib") - file( - INSTALL ${OUTPUTS_PATH}/Release/ - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - FILES_MATCHING PATTERN "*.lib" - ) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Box2D.lib ${CURRENT_PACKAGES_DIR}/lib/box2d.lib) - message(STATUS "Packaging ${TARGET_TRIPLET}-Release lib done") -endif() - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Packaging ${TARGET_TRIPLET}-Debug lib") - file( - INSTALL ${OUTPUTS_PATH}/Debug/ - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - FILES_MATCHING PATTERN "*.lib" - ) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Box2D.lib ${CURRENT_PACKAGES_DIR}/debug/lib/box2d.lib) - message(STATUS "Packaging ${TARGET_TRIPLET}-Debug lib done") -endif() - -message(STATUS "Packaging headers") file( COPY ${SOURCE_PATH}/Box2D/Box2D DESTINATION ${CURRENT_PACKAGES_DIR}/include - PATTERN "*.h" + FILES_MATCHING PATTERN "*.h" ) -message(STATUS "Packaging headers done") vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/Box2D/License.txt ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/box2d) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/box2d/License.txt ${CURRENT_PACKAGES_DIR}/share/box2d/copyright) diff --git a/ports/box2d/use-static-linkage.patch b/ports/box2d/use-static-linkage.patch deleted file mode 100644 index 4c3fccd53e8..00000000000 --- a/ports/box2d/use-static-linkage.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/Box2D/Build/vs2015/Box2D.vcxproj b/Box2D/Build/vs2015/Box2D.vcxproj -index 830803c..5dda519 100644 ---- a/Box2D/Build/vs2015/Box2D.vcxproj -+++ b/Box2D/Build/vs2015/Box2D.vcxproj -@@ -86,7 +86,7 @@ - _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks -- MultiThreadedDebugDLL -+ MultiThreadedDebug - true - - -@@ -115,7 +115,7 @@ - _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks -- MultiThreadedDebugDLL -+ MultiThreadedDebug - true - - -@@ -145,7 +145,7 @@ - _CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) - false - true -- MultiThreadedDLL -+ MultiThreaded - true - - -@@ -176,7 +176,7 @@ - _CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) - false - true -- MultiThreadedDLL -+ MultiThreaded - true - - diff --git a/ports/breakpad/CMakeLists.txt b/ports/breakpad/CMakeLists.txt index f4c19cb8cc1..01c949251ee 100644 --- a/ports/breakpad/CMakeLists.txt +++ b/ports/breakpad/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 3.8) project(breakpad CXX) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + add_definitions( -DNOMINMAX -DUNICODE @@ -8,21 +11,22 @@ add_definitions( -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE + -D_LIBCPP_VERSION ) set(CMAKE_DEBUG_POSTFIX d) -set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) string(COMPARE EQUAL "${CMAKE_BUILD_TYPE}" "Release" DEFAULT_INSTALL_HEADERS) option(INSTALL_HEADERS "Install header files" ${DEFAULT_INSTALL_HEADERS}) -file(GLOB_RECURSE SOURCES src/processor/*.cc) -list(FILTER SOURCES EXCLUDE REGEX +# libbreakpad target +file(GLOB_RECURSE LIBBREAKPAD_SOURCES src/processor/*.cc) +list(FILTER LIBBREAKPAD_SOURCES EXCLUDE REGEX "_unittest|synth_minidump|/tests|/testdata|/linux|/mac|/android|/solaris|microdump_stackwalk|minidump_dump|minidump_stackwalk") find_library(LIBDISASM_LIB NAMES libdisasmd libdisasm) -add_library(libbreakpad ${SOURCES}) +add_library(libbreakpad ${LIBBREAKPAD_SOURCES}) target_link_libraries(libbreakpad PRIVATE ${LIBDISASM_LIB}) target_include_directories(libbreakpad @@ -31,14 +35,58 @@ target_include_directories(libbreakpad $ ) -install(TARGETS libbreakpad EXPORT unofficial-breakpad-targets +set(TARGETS libbreakpad) +if(WIN32) + # libbreakpad_client target does not currently work on non-windows + if(WIN32) + file(GLOB_RECURSE LIBBREAKPAD_CLIENT_SOURCES src/client/windows/*.cc src/common/windows/*.cc) + include_directories("$ENV{VSINSTALLDIR}/DIA SDK/include") + elseif(APPLE) + add_definitions(-DHAVE_MACH_O_NLIST_H) + file(GLOB_RECURSE LIBBREAKPAD_CLIENT_SOURCES src/client/mac/*.cc src/common/mac/*.cc) + else() + add_definitions(-DHAVE_A_OUT_H) + file(GLOB_RECURSE LIBBREAKPAD_CLIENT_SOURCES src/client/linux/*.cc src/common/linux/*.cc) + endif() + file(GLOB LIBBREAKPAD_COMMON_SOURCES src/common/*.cc src/common/*.c src/client/*.cc) + list(APPEND LIBBREAKPAD_CLIENT_SOURCES ${LIBBREAKPAD_COMMON_SOURCES}) + list(FILTER LIBBREAKPAD_CLIENT_SOURCES EXCLUDE REGEX "/tests|/unittests|_unittest") + if(WIN32) + list(FILTER LIBBREAKPAD_CLIENT_SOURCES EXCLUDE REGEX "language.cc|path_helper.cc|stabs_to_module.cc|stabs_reader.cc|minidump_file_writer.cc") + endif() + + add_library(libbreakpad_client ${LIBBREAKPAD_CLIENT_SOURCES}) + target_link_libraries(libbreakpad_client PRIVATE wininet.lib) + + target_include_directories(libbreakpad_client + PUBLIC + $ + $ + ) + list(APPEND TARGETS libbreakpad_client) +endif() + +# installation +install(TARGETS ${TARGETS} EXPORT unofficial-breakpad-targets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) if(INSTALL_HEADERS) - install(DIRECTORY src/google_breakpad DESTINATION include) + if(WIN32) + set(HEADER_EXCLUDE_REGEX "/apple|/ios|/linux|/mac|/solaris|/android|/dwarf|/tests|/testdata|/unittests") + elseif(APPLE) + set(HEADER_EXCLUDE_REGEX "/apple|/ios|/linux|/windows|/solaris|/android|/dwarf|/tests|/testdata|/unittests") + else() + set(HEADER_EXCLUDE_REGEX "/apple|/ios|/client/linux/data|/client/linux/sender|/windows|/mac|/solaris|/android|/dwarf|/tests|/testdata|/unittests") + endif() + install( + DIRECTORY src/client src/common src/google_breakpad + DESTINATION include/ + FILES_MATCHING PATTERN "*.h" + REGEX "${HEADER_EXCLUDE_REGEX}" EXCLUDE + ) endif() install( diff --git a/ports/breakpad/CONTROL b/ports/breakpad/CONTROL index d6622f15a83..55ca2a8c384 100644 --- a/ports/breakpad/CONTROL +++ b/ports/breakpad/CONTROL @@ -1,4 +1,4 @@ Source: breakpad -Version: 2018-04-17 +Version: 2018-09-18 Build-Depends: libdisasm Description: a set of client and server components which implement a crash-reporting system. diff --git a/ports/breakpad/portfile.cmake b/ports/breakpad/portfile.cmake index 939988ef21a..18b1b8152ef 100644 --- a/ports/breakpad/portfile.cmake +++ b/ports/breakpad/portfile.cmake @@ -1,10 +1,12 @@ include(vcpkg_common_functions) +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/breakpad - REF 9eac2058b70615519b2c4d8c6bdbfca1bd079e39 - SHA512 2bdbfc7455bde3b93c1b0e3d47250722525ffeddbe99277e48d0c2930c461162e9342ed7560b4ea5d1245baf162b1102f0e01176611b403c672435e4f518a7fd + REF 54fa71efbe50fb2b58096d871575b59e12edba6d + SHA512 ecd1c6c5cc0e3984d05fe86ec11172e93b0e31c39ce0af9d0de08b8d03083686e2288e0cd787180c599446c277e58f48550ce4ab718019576c64fc403a592745 HEAD_REF master ) diff --git a/ports/brotli/CONTROL b/ports/brotli/CONTROL index 0c4d7eb0c8a..1256f920fe6 100644 --- a/ports/brotli/CONTROL +++ b/ports/brotli/CONTROL @@ -1,3 +1,3 @@ Source: brotli -Version: 1.0.2-1 +Version: 1.0.2-4 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/brotli/install.patch b/ports/brotli/install.patch new file mode 100644 index 00000000000..7896fbbb332 --- /dev/null +++ b/ports/brotli/install.patch @@ -0,0 +1,56 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ac55f6b..e016967 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -166,12 +166,11 @@ endforeach() + + foreach(lib brotlicommon brotlidec brotlienc brotlicommon-static brotlidec-static brotlienc-static) + target_link_libraries(${lib} ${LIBM_LIBRARY}) +- set_property(TARGET ${lib} APPEND PROPERTY INCLUDE_DIRECTORIES ${BROTLI_INCLUDE_DIRS}) + set_target_properties(${lib} PROPERTIES + VERSION "${BROTLI_ABI_COMPATIBILITY}.${BROTLI_ABI_AGE}.${BROTLI_ABI_REVISION}" + SOVERSION "${BROTLI_ABI_COMPATIBILITY}" + POSITION_INDEPENDENT_CODE TRUE) +- set_property(TARGET ${lib} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BROTLI_INCLUDE_DIRS}") ++ set_property(TARGET ${lib} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$" $) + endforeach() + + target_link_libraries(brotlidec brotlicommon) +@@ -199,27 +198,35 @@ target_link_libraries(brotli ${BROTLI_LIBRARIES_STATIC}) + if(NOT BROTLI_BUNDLED_MODE) + install( + TARGETS brotli +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ RUNTIME DESTINATION tools/brotli ++ CONFIGURATIONS Release + ) + ++ if(BUILD_SHARED_LIBS) + install( + TARGETS ${BROTLI_LIBRARIES_CORE} ++ EXPORT brotli + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + ) +- ++ else() + install( + TARGETS ${BROTLI_LIBRARIES_CORE_STATIC} ++ EXPORT brotli + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + ) ++ endif() + + install( + DIRECTORY ${BROTLI_INCLUDE_DIRS}/brotli + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ++ CONFIGURATIONS Release + ) ++ ++ install(EXPORT brotli FILE unofficial-brotli-config.cmake NAMESPACE unofficial::brotli:: DESTINATION share/unofficial-brotli) + endif() + + # Tests diff --git a/ports/brotli/portfile.cmake b/ports/brotli/portfile.cmake index b4e33086e1f..4a95f89a42a 100644 --- a/ports/brotli/portfile.cmake +++ b/ports/brotli/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_github( REF v1.0.2 SHA512 b3ec98159e63b4169dea3e958d60d89247dc1c0f78aab27bfffb2ece659fa024df990d410aa15c12b2082d42e3785e32ec248dce2b116c7f34e98bb6337f9fc9 HEAD_REF master + PATCHES install.patch ) vcpkg_configure_cmake( @@ -16,22 +17,10 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/brotli) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/brotli.exe ${CURRENT_PACKAGES_DIR}/tools/brotli/brotli.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/brotli.exe) - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/brotli) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-brotli TARGET_PATH share/unofficial-brotli) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - file(GLOB STATIC_LIBS "${CURRENT_PACKAGES_DIR}/lib/*-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/*-static.lib") - file(REMOVE ${STATIC_LIBS}) -else() - file(GLOB LIBS "${CURRENT_PACKAGES_DIR}/lib/*.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/*.lib") - list(FILTER LIBS EXCLUDE REGEX "-static\\.lib\$") - file(REMOVE_RECURSE ${LIBS} ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-brotli) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/brotli RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/brotli/vcpkg-cmake-wrapper.cmake b/ports/brotli/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000..882106bcca6 --- /dev/null +++ b/ports/brotli/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,11 @@ +_find_package(${ARGS}) +foreach(T brotlicommon brotlidec brotlienc) + if(TARGET unofficial::brotli::${T} AND NOT TARGET unofficial::brotli::${T}-static) + _add_library(unofficial::brotli::${T}-static INTERFACE IMPORTED) + set_target_properties(unofficial::brotli::${T}-static PROPERTIES INTERFACE_LINK_LIBRARIES "unofficial::brotli::${T}") + endif() + if(NOT TARGET unofficial::brotli::${T} AND TARGET unofficial::brotli::${T}-static) + _add_library(unofficial::brotli::${T} INTERFACE IMPORTED) + set_target_properties(unofficial::brotli::${T} PROPERTIES INTERFACE_LINK_LIBRARIES "unofficial::brotli::${T}-static") + endif() +endforeach() diff --git a/ports/brynet/CONTROL b/ports/brynet/CONTROL index f94ec56eefb..3309ab1cf90 100644 --- a/ports/brynet/CONTROL +++ b/ports/brynet/CONTROL @@ -1,3 +1,4 @@ Source: brynet -Version: 0.9.0 +Version: 1.0.0-1 Description: A C++ cross platform high performance tcp network library, and support SSL/HTTP/Websocket. +Build-Depends: openssl diff --git a/ports/brynet/portfile.cmake b/ports/brynet/portfile.cmake index 7922b704c07..9c9097bfc67 100644 --- a/ports/brynet/portfile.cmake +++ b/ports/brynet/portfile.cmake @@ -1,15 +1,12 @@ include(vcpkg_common_functions) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(STATUS "brynet does not support dynamic linkage. Building statically.") - set(VCPKG_LIBRARY_LINKAGE static) -endif() +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO IronsDu/brynet - REF v0.9.0 - SHA512 49543833be0d8eb2dce2b00a85d48087e9756b93febaae0c7cd83b7f44f9cd8d81976069f8b84344807bee2df785b80fbb65a1a93e8c6a9c942f9554063a05c1 + REF v1.0.0 + SHA512 f2ad0514d5b25828b38d929bf352a8a35c39816982f7a3aaca2b6d74a7e592d8a37d2af6b77d6babf2eec25063ed1bb50704e8871d18d7e5f777021d18604b9c HEAD_REF master ) diff --git a/ports/bzip2/CMakeLists.txt b/ports/bzip2/CMakeLists.txt index d79c288185b..2f70c540452 100644 --- a/ports/bzip2/CMakeLists.txt +++ b/ports/bzip2/CMakeLists.txt @@ -36,7 +36,7 @@ install(TARGETS libbz2 if(NOT BZIP2_SKIP_TOOLS) add_executable(bzip2 bzip2.c ${LIBBZ2_SOURCES}) add_executable(bzip2recover bzip2recover.c ${LIBBZ2_SOURCES}) - install(TARGETS bzip2 bzip2recover DESTINATION tools) + install(TARGETS bzip2 bzip2recover DESTINATION tools/bzip2) endif() if(NOT BZIP2_SKIP_HEADERS) diff --git a/ports/bzip2/CONTROL b/ports/bzip2/CONTROL index 613d3f2517c..fad3033997a 100644 --- a/ports/bzip2/CONTROL +++ b/ports/bzip2/CONTROL @@ -1,3 +1,3 @@ Source: bzip2 -Version: 1.0.6-2 +Version: 1.0.6-3 Description: High-quality data compressor. diff --git a/ports/bzip2/portfile.cmake b/ports/bzip2/portfile.cmake index d4dd18fd53c..25e3df10f11 100644 --- a/ports/bzip2/portfile.cmake +++ b/ports/bzip2/portfile.cmake @@ -1,26 +1,27 @@ - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/bzip2-1.0.6) +set(BZIP2_VERSION 1.0.6) vcpkg_download_distfile(ARCHIVE - URLS "http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz" - FILENAME "bzip2-1.0.6.tar.gz" + URLS "https://github.com/past-due/bzip2-mirror/releases/download/v${BZIP2_VERSION}/bzip2-${BZIP2_VERSION}.tar.gz" + FILENAME "bzip2-${BZIP2_VERSION}.tar.gz" SHA512 00ace5438cfa0c577e5f578d8a808613187eff5217c35164ffe044fbafdfec9e98f4192c02a7d67e01e5a5ccced630583ad1003c37697219b0f147343a3fdd12) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${BZIP2_VERSION} + PATCHES + fix-import-export-macros.patch +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-import-export-macros.patch) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS_DEBUG -DBZIP2_SKIP_HEADERS=ON - -DBZIP2_SKIP_TOOLS=ON) + -DBZIP2_SKIP_TOOLS=ON +) vcpkg_install_cmake() vcpkg_copy_pdbs() @@ -33,8 +34,9 @@ else() endif() file(WRITE ${CURRENT_PACKAGES_DIR}/include/bzlib.h "${BZLIB_H}") - file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/bzip2) file(RENAME ${CURRENT_PACKAGES_DIR}/share/bzip2/LICENSE ${CURRENT_PACKAGES_DIR}/share/bzip2/copyright) file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +vcpkg_test_cmake(PACKAGE_NAME BZip2 MODULE) diff --git a/ports/c-ares/CONTROL b/ports/c-ares/CONTROL index 70eb454e46a..204fd6668f0 100644 --- a/ports/c-ares/CONTROL +++ b/ports/c-ares/CONTROL @@ -1,4 +1,4 @@ Source: c-ares -Version: cares-1_14_0 +Version: cares-1_15_0 Description: A C library for asynchronous DNS requests Build-Depends: diff --git a/ports/c-ares/portfile.cmake b/ports/c-ares/portfile.cmake index 4a569b5670d..bf704304e18 100644 --- a/ports/c-ares/portfile.cmake +++ b/ports/c-ares/portfile.cmake @@ -7,8 +7,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO c-ares/c-ares - REF cares-1_14_0 - SHA512 3ae7938648aec2fae651667bef02139f7eef2e7cd425cc310b7e3d56f409646f6170d37a3c9269aa654bfb1ced0a52b89fe49be9023edf8ff57efd0efaf59052 + REF cares-1_15_0 + SHA512 3c925e0b3a25f3b656a145966ca763f77ae4ccefd87f2d9ae01cae786eeca0ce8397af4ab21da64f516b4603850638f969056184c310372d22aeb5cbfd2704c8 HEAD_REF master ) diff --git a/ports/caffe2/portfile.cmake b/ports/caffe2/portfile.cmake index d2770f338d6..fa87542edfe 100644 --- a/ports/caffe2/portfile.cmake +++ b/ports/caffe2/portfile.cmake @@ -62,7 +62,7 @@ vcpkg_configure_cmake( -DUSE_SNPE=OFF -DUSE_ZMQ=OFF -DBUILD_TEST=OFF - -DPROTOBUF_PROTOC_EXECUTABLE:FILEPATH=${CURRENT_INSTALLED_DIR}/tools/protoc.exe + -DPROTOBUF_PROTOC_EXECUTABLE:FILEPATH=${CURRENT_INSTALLED_DIR}/tools/protobuf/protoc.exe ) vcpkg_install_cmake() diff --git a/ports/cairo/0001_fix_osx_defined.patch b/ports/cairo/0001_fix_osx_defined.patch new file mode 100644 index 00000000000..7365dcce240 --- /dev/null +++ b/ports/cairo/0001_fix_osx_defined.patch @@ -0,0 +1,13 @@ +diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c +index 3b308757..36700ff0 100644 +--- a/src/cairo-ft-font.c ++++ b/src/cairo-ft-font.c +@@ -67,7 +67,7 @@ + #include FT_LCD_FILTER_H + #endif + +-#if HAVE_UNISTD_H ++#if defined(HAVE_UNISTD_H) + #include + #else + #define access(p, m) 0 diff --git a/ports/cairo/CMakeLists.txt b/ports/cairo/CMakeLists.txt index 692c29cd5f2..137dba7f3a8 100644 --- a/ports/cairo/CMakeLists.txt +++ b/ports/cairo/CMakeLists.txt @@ -1,8 +1,11 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.11) project(cairo C) # Add include directories -include_directories("." "./win32") +include_directories(".") +if(CMAKE_SYSTEM_NAME STREQUAL "Windows") + include_directories("./win32") +endif() file(GLOB SOURCES "cairo-analysis-surface.c" @@ -112,15 +115,6 @@ file(GLOB SOURCES "cairo-user-font.c" "cairo-version.c" "cairo-wideint.c" -# win32 -"win32/cairo-win32-debug.c" -"win32/cairo-win32-device.c" -"win32/cairo-win32-gdi-compositor.c" -"win32/cairo-win32-system.c" -"win32/cairo-win32-surface.c" -"win32/cairo-win32-display-surface.c" -"win32/cairo-win32-printing-surface.c" -"win32/cairo-win32-font.c" # generic font support "cairo-cff-subset.c" "cairo-scaled-font-subsets.c" @@ -148,18 +142,30 @@ file(GLOB SOURCES "cairo-ft-font.c" ) +# win32 +file(GLOB PLATFORM_SOURCES_WIN32 +"win32/cairo-win32-debug.c" +"win32/cairo-win32-device.c" +"win32/cairo-win32-gdi-compositor.c" +"win32/cairo-win32-system.c" +"win32/cairo-win32-surface.c" +"win32/cairo-win32-display-surface.c" +"win32/cairo-win32-printing-surface.c" +"win32/cairo-win32-font.c" +) + +if(CMAKE_SYSTEM_NAME STREQUAL "Windows") + list(APPEND SOURCES ${PLATFORM_SOURCES_WIN32}) +endif() + set(CMAKE_DEBUG_POSTFIX "d") find_package(ZLIB REQUIRED) find_package(PNG REQUIRED) - -# Make the pixman library available -if(CMAKE_BUILD_TYPE STREQUAL "Debug") - set(PIXMAN_SUFFIX "d") -endif() -find_library(PIXMAN_LIBRARY NAMES pixman-1${PIXMAN_SUFFIX}) - -find_package(Freetype CONFIG REQUIRED) +find_package(Freetype REQUIRED) +find_package(unofficial-glib CONFIG REQUIRED) +find_package(unofficial-fontconfig CONFIG REQUIRED) +find_package(unofficial-pixman CONFIG REQUIRED) # Cairo needs to be told which features of FreeType are availible add_definitions( @@ -169,20 +175,21 @@ add_definitions( -DHAVE_FT_LOAD_SFNT_TABLE=1 -DHAVE_FT_GET_X11_FONT_FORMAT=1) -# Find FontConfig -find_library(FONTCONFIG_LIBRARY fontconfig) +# additional features for macOS +if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + add_definitions( + -DHAVE_INTTYPES_H=1 + -DHAVE_STDINT_H=1 + -DHAVE_SYS_TYPES_H=1 + -DHAVE_UINT64_T=1 + -DHAVE_UNISTD_H=1 + -DCAIRO_HAS_PTHREAD=1 + -DCAIRO_HAS_REAL_PTHREAD=1) +endif() add_library(cairo ${SOURCES}) -# cairo produces a lot of warnings which are disabled here because they otherwise fill up the log files -target_compile_options(cairo PUBLIC "/wd4244" PUBLIC "/wd4146" PUBLIC "/wd4312" PUBLIC "/wd4267" - PUBLIC "/wd4996" PUBLIC "/wd4311" PUBLIC "/wd4334" PUBLIC "/wd4101") -target_link_libraries(cairo gdi32 msimg32 user32 ZLIB::ZLIB PNG::PNG freetype ${PIXMAN_LIBRARY} ${FONTCONFIG_LIBRARY}) -install(TARGETS cairo - RUNTIME DESTINATION bin - LIBRARY DESTINATION bin - ARCHIVE DESTINATION lib -) +target_link_libraries(cairo PRIVATE gdi32 msimg32 user32 ZLIB::ZLIB PNG::PNG Freetype::Freetype unofficial::pixman::pixman-1 unofficial::fontconfig::fontconfig) # GObject support module @@ -198,16 +205,43 @@ if(BUILD_SHARED_LIBS) PROPERTIES COMPILE_DEFINITIONS "cairo_public=__declspec(dllexport)") endif() -# Make GLib's GObject available -find_path(GLIB_INCLUDE_DIR glib.h) -find_library(GLIB_LIBRARY NAMES glib-2.0) -find_library(GOBJECT_LIBRARY NAMES gobject-2.0) -set(GLIB_LIBRARIES ${GLIB_LIBRARY} ${GOBJECT_LIBRARY}) - add_library(cairo-gobject ${CAIRO_GOBJECT_SOURCES}) -target_link_libraries(cairo-gobject cairo ${GLIB_LIBRARIES}) -target_include_directories(cairo-gobject PRIVATE ${GLIB_INCLUDE_DIR}) -install(TARGETS cairo-gobject +target_link_libraries(cairo-gobject PRIVATE cairo unofficial::glib::gobject unofficial::glib::glib) + +if(MSVC) + # cairo produces a lot of warnings which are disabled here because they otherwise fill up the log files + # NOTE: options only available to MSVC, clang in macOS doesn't understand these flags + target_compile_options(cairo PRIVATE + "/wd4244" "/wd4146" "/wd4312" "/wd4267" "/wd4996" "/wd4311" "/wd4334" "/wd4101" + ) + target_compile_options(cairo-gobject PRIVATE + "/wd4244" "/wd4146" "/wd4312" "/wd4267" "/wd4996" "/wd4311" "/wd4334" "/wd4101" + ) +endif() + +install(TARGETS cairo cairo-gobject + EXPORT cairo-targets RUNTIME DESTINATION bin LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) + ARCHIVE DESTINATION lib +) + +install( + EXPORT cairo-targets + NAMESPACE unofficial::cairo:: + FILE unofficial-cairo-targets.cmake + DESTINATION share/unofficial-cairo +) + +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unofficial-cairo-config.cmake " +include(CMakeFindDependencyMacro) +find_dependency(ZLIB) +find_dependency(PNG) +find_dependency(Freetype) +find_dependency(unofficial-glib CONFIG) +find_dependency(unofficial-fontconfig CONFIG) +find_dependency(unofficial-pixman CONFIG) + +include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-cairo-targets.cmake) +") +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-cairo-config.cmake DESTINATION share/unofficial-cairo) diff --git a/ports/cairo/CONTROL b/ports/cairo/CONTROL index 80269f5a773..2f182e84b8d 100644 --- a/ports/cairo/CONTROL +++ b/ports/cairo/CONTROL @@ -1,4 +1,4 @@ Source: cairo -Version: 1.15.8-1 +Version: 1.15.8-3 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/portfile.cmake b/ports/cairo/portfile.cmake index 6fb0e7ce889..53d944b5479 100644 --- a/ports/cairo/portfile.cmake +++ b/ports/cairo/portfile.cmake @@ -1,24 +1,18 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# 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(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 5af1eebf432201dae0efaa5b6766b151d8273ea00dae48e104d56477005b4d423d64b5d11c512736a4cb076632fb2a572ec35becd922825a68d933bb5ff96ca1 ) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/export-only-in-shared-build.patch" +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${CAIRO_VERSION} + PATCHES + export-only-in-shared-build.patch + 0001_fix_osx_defined.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/src) @@ -31,6 +25,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-cairo TARGET_PATH share/unofficial-cairo) + # Copy the appropriate header files. foreach(FILE "${SOURCE_PATH}/src/cairo.h" @@ -63,3 +59,5 @@ file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cairo file(RENAME ${CURRENT_PACKAGES_DIR}/share/cairo/COPYING ${CURRENT_PACKAGES_DIR}/share/cairo/copyright) vcpkg_copy_pdbs() + +vcpkg_test_cmake(PACKAGE_NAME unofficial-cairo) diff --git a/ports/cartographer/CONTROL b/ports/cartographer/CONTROL index 88f0dc6b78c..73fcc654105 100644 --- a/ports/cartographer/CONTROL +++ b/ports/cartographer/CONTROL @@ -1,4 +1,4 @@ Source: cartographer -Version: 0.3.0-4 +Version: 0.3.0-5 Build-Depends: ceres[eigensparse], gflags, glog, lua, cairo, boost-iostreams, gtest, protobuf Description: Google 2D & 3D SLAM package diff --git a/ports/cartographer/disable-C2338-cartographer.patch b/ports/cartographer/disable-C2338-cartographer.patch new file mode 100644 index 00000000000..d4336721879 --- /dev/null +++ b/ports/cartographer/disable-C2338-cartographer.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bc92e9b..4c1826a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -226,7 +226,7 @@ target_include_directories(${PROJECT_NAME} SYSTEM PRIVATE + "${GMOCK_INCLUDE_DIRS}") + target_link_libraries(${PROJECT_NAME} PUBLIC ${GMOCK_LIBRARY}) + +-set(TARGET_COMPILE_FLAGS "${TARGET_COMPILE_FLAGS} ${GOOG_CXX_FLAGS}") ++set(TARGET_COMPILE_FLAGS "-D_DISABLE_EXTENDED_ALIGNED_STORAGE ${TARGET_COMPILE_FLAGS} ${GOOG_CXX_FLAGS}") + set_target_properties(${PROJECT_NAME} PROPERTIES + COMPILE_FLAGS ${TARGET_COMPILE_FLAGS}) + diff --git a/ports/cartographer/portfile.cmake b/ports/cartographer/portfile.cmake index 75f28a01521..45a3c1b997e 100644 --- a/ports/cartographer/portfile.cmake +++ b/ports/cartographer/portfile.cmake @@ -6,12 +6,9 @@ vcpkg_from_github( REF a7ed7e224f98b396762c865b81b62dc3abea2e81 SHA512 2ab167c1c314591b4916baf70b8ad92ae542986c3578319d2454c904adae10f8027bc696579d6e2864d3606a6711563b82438e847527cad4ab0c2bd603a63eb7 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-find-packages.patch + ${CMAKE_CURRENT_LIST_DIR}/disable-C2338-cartographer.patch ) vcpkg_configure_cmake( diff --git a/ports/catch-classic/CONTROL b/ports/catch-classic/CONTROL index 93650d2e608..af4d6a73717 100644 --- a/ports/catch-classic/CONTROL +++ b/ports/catch-classic/CONTROL @@ -1,5 +1,5 @@ Source: catch-classic -Version: 1.12.1 +Version: 1.12.2 Description: A modern, header-only test framework for unit tests This is specifically the legacy 1.x branch provided for compatibility with older compilers. diff --git a/ports/catch-classic/portfile.cmake b/ports/catch-classic/portfile.cmake index 85460bbab3a..47f8ef16bdb 100644 --- a/ports/catch-classic/portfile.cmake +++ b/ports/catch-classic/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v1.12.1) +set(CATCH_VERSION v1.12.2) vcpkg_download_distfile(HEADER URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp" FILENAME "catch-classic-${CATCH_VERSION}.hpp" - SHA512 2029065d979690a6b76318e1527fc770e062a3d3411f9354f03063263f01bd3a249c8e86a57eb0e07d66cd068f7cded7d369a53997c2b762eb5fdc2668e30152 + SHA512 d2cf8b2fe95aae061a7771a0e1b7135583595d1f36dfc8d5e4d10e101ab58f6fac9d260f77c5760906c24aa402d7433aa82b5d6a0ca6b3ad91092dc5cc2d9c22 ) vcpkg_download_distfile(LICENSE diff --git a/ports/catch2/CONTROL b/ports/catch2/CONTROL index a466f7be5e9..de2d71c35ab 100644 --- a/ports/catch2/CONTROL +++ b/ports/catch2/CONTROL @@ -1,4 +1,4 @@ Source: catch2 -Version: 2.2.2 +Version: 2.4.2 Description: A modern, header-only test framework for unit testing. Issues, PRs and changelogs can be found at https://github.com/catchorg/Catch2 diff --git a/ports/catch2/portfile.cmake b/ports/catch2/portfile.cmake index 5329d9cab67..b36595d2c1f 100644 --- a/ports/catch2/portfile.cmake +++ b/ports/catch2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO catchorg/Catch2 - REF v2.2.2 - SHA512 ab91036c6c3ace087d0382ce99f26b2c30a4b75d52f285619ca282a618470fe388afe47495f3b2764268d600c6834c60ba464483d06f3a1c4316c099477c8e38 + REF v2.4.2 + SHA512 7422c5c114d93b57cac5596e573d0993ecc6db37708df3491d346bb3aad7a1ee1d1008689ae7b8ef4b0b4fa41aa66566580f807778ae2e4f278687d6fe7aa38b HEAD_REF master ) @@ -22,9 +22,9 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Catch2 TARGET_PATH share/catch2) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) -if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include/catch/catch.hpp) +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include/catch2/catch.hpp) message(FATAL_ERROR "Main includes have moved. Please update the forwarder.") endif() -file(WRITE ${CURRENT_PACKAGES_DIR}/include/catch.hpp "#include ") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/catch.hpp "#include ") file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/catch2 RENAME copyright) diff --git a/ports/celero/CONTROL b/ports/celero/CONTROL index 6180230dd0f..2afd5748433 100644 --- a/ports/celero/CONTROL +++ b/ports/celero/CONTROL @@ -1,3 +1,3 @@ Source: celero -Version: 2.1.0-2 +Version: 2.4.0 Description: Celero is a modern cross-platform (Windows, Linux, MacOS) Microbenchmarking library for C++. diff --git a/ports/celero/portfile.cmake b/ports/celero/portfile.cmake index 0800115ec50..f9288fb8ec3 100644 --- a/ports/celero/portfile.cmake +++ b/ports/celero/portfile.cmake @@ -1,18 +1,15 @@ include(vcpkg_common_functions) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - message(STATUS "Celero currently can only be built statically") - set(VCPKG_LIBRARY_LINKAGE static) -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO DigitalInBlue/Celero - REF v2.2.0 - SHA512 6fac1fa949b18caabf59f3675c6e592cfadc3efa5e674b1f8b183e728ec880a4f5616d5d41c97f8fc26ef9520284188f519b7634209d0a56fb38a6993a9e9680 + REF v2.4.0 + SHA512 4ba9f26bcda85bea00de27a6e8166f874f2c3852f74c54c089373caf71e1c066ac771fda73799d84c4c7a20986a71fd7a3b101b7b8972b9797ab3e8ed7918c30 HEAD_REF master ) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CELERO_COMPILE_DYNAMIC_LIBRARIES) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja @@ -20,6 +17,7 @@ vcpkg_configure_cmake( -DCELERO_ENABLE_EXPERIMENTS=OFF -DCELERO_ENABLE_TESTS=OFF -DCELERO_RUN_EXAMPLE_ON_BUILD=OFF + -DCELERO_COMPILE_DYNAMIC_LIBRARIES=${CELERO_COMPILE_DYNAMIC_LIBRARIES} ) vcpkg_install_cmake() diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index 7267be402dc..98621116b52 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -1,9 +1,9 @@ set(MSVC_USE_STATIC_CRT_VALUE OFF) if(VCPKG_CRT_LINKAGE STREQUAL "static") - if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - message(FATAL_ERROR "Ceres does not currently support mixing static CRT and dynamic library linkage") - endif() - set(MSVC_USE_STATIC_CRT_VALUE ON) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "Ceres does not currently support mixing static CRT and dynamic library linkage") + endif() + set(MSVC_USE_STATIC_CRT_VALUE ON) endif() include(vcpkg_common_functions) @@ -16,9 +16,6 @@ vcpkg_from_github( HEAD_REF master ) -# Ninja crash compiler with error: -# "fatal error C1001: An internal error has occurred in the compiler. (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 255)" - set(SUITESPARSE OFF) if("suitesparse" IN_LIST FEATURES) set(SUITESPARSE ON) @@ -62,7 +59,13 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") + +if(WIN32) + vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib${LIB_SUFFIX}/cmake/Ceres") +endif() + vcpkg_copy_pdbs() # Changes target search path diff --git a/ports/cgal/CONTROL b/ports/cgal/CONTROL index 753e30a202a..a84c50ce127 100644 --- a/ports/cgal/CONTROL +++ b/ports/cgal/CONTROL @@ -1,4 +1,8 @@ Source: cgal -Version: 4.11.1 -Build-Depends: mpfr, mpir, zlib, qt5, boost-format, boost-container, boost-iterator, boost-variant, boost-any, boost-unordered, boost-random +Version: 4.13-2 +Build-Depends: mpfr, mpir, zlib, boost-format, boost-container, boost-iterator, boost-variant, boost-any, boost-unordered, boost-random, boost-foreach, boost-graph, boost-heap, boost-logic Description: The Computational Geometry Algorithms Library (CGAL) is a C++ library that aims to provide easy access to efficient and reliable algorithms in computational geometry. + +Feature: qt +Build-Depends: qt5-base, qt5-3d, qt5-svg, qt5-xmlpatterns, qt5-script, eigen3 +Description: Qt GUI support for CGAL diff --git a/ports/cgal/portfile.cmake b/ports/cgal/portfile.cmake index 4dbe9fd5399..40475b7c2e0 100644 --- a/ports/cgal/portfile.cmake +++ b/ports/cgal/portfile.cmake @@ -3,16 +3,22 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CGAL/cgal - REF 27859944b4d96797030fc018892d5123b7cba0b2 - SHA512 020d4398fcae0607cd3fe1bd22a190fbe1d45cba0c7e3c95d6d3dfb6d23c43949a1608069972e511f5d47fc787c350c0a0a0085faa2f4b9fd26ce101376752c6 + REF releases/CGAL-4.13 + SHA512 3a12d7f567487c282928a162a47737c41c22258556ca0083b9cf492fc8f0a7c334b491b14dbfd6a62e71feeeb1b4995769c13a604e0882548f21c41b996d4eaf HEAD_REF master ) +set(WITH_CGAL_Qt5 OFF) +if("qt" IN_LIST FEATURES) + set(WITH_CGAL_Qt5 ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DCGAL_INSTALL_CMAKE_DIR=share/cgal + -DWITH_CGAL_Qt5=${WITH_CGAL_Qt5} ) vcpkg_install_cmake() @@ -24,11 +30,33 @@ vcpkg_copy_pdbs() # Clean file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + foreach(ROOT ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE + ${ROOT}/cgal_create_CMakeLists + ${ROOT}/cgal_create_cmake_script + ${ROOT}/cgal_make_macosx_app + ) + endforeach() +endif() file(READ ${CURRENT_PACKAGES_DIR}/share/cgal/CGALConfig.cmake _contents) string(REPLACE "CGAL_IGNORE_PRECONFIGURED_GMP" "1" _contents "${_contents}") string(REPLACE "CGAL_IGNORE_PRECONFIGURED_MPFR" "1" _contents "${_contents}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/cgal/CGALConfig.cmake "${_contents}") -# Handle copyright of suitesparse and metis -file(COPY ${SOURCE_PATH}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgal) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/cgal/CGALConfig.cmake "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/lib/cgal/CGALConfig.cmake "include (\$\{CMAKE_CURRENT_LIST_DIR\}/../../share/cgal/CGALConfig.cmake)") + +file(COPY ${SOURCE_PATH}/Installation/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgal) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/cgal/LICENSE ${CURRENT_PACKAGES_DIR}/share/cgal/copyright) + +file( + COPY + ${SOURCE_PATH}/Installation/LICENSE.BSL + ${SOURCE_PATH}/Installation/LICENSE.FREE_USE + ${SOURCE_PATH}/Installation/LICENSE.GPL + ${SOURCE_PATH}/Installation/LICENSE.LGPL + DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgal +) diff --git a/ports/chaiscript/CONTROL b/ports/chaiscript/CONTROL index 7d6197531f8..8fbd830d96b 100644 --- a/ports/chaiscript/CONTROL +++ b/ports/chaiscript/CONTROL @@ -1,3 +1,3 @@ Source: chaiscript -Version: 6.0.0 +Version: 6.1.0 Description: Embedded Scripting Language Designed for C++ diff --git a/ports/chaiscript/portfile.cmake b/ports/chaiscript/portfile.cmake index 3103eb30229..a3611b0e18d 100644 --- a/ports/chaiscript/portfile.cmake +++ b/ports/chaiscript/portfile.cmake @@ -14,8 +14,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ChaiScript/ChaiScript - REF v6.0.0 - SHA512 612c175b9ee357512addcbe9ce0e2b9c34c40a45b5be85a3f75e2c0d391bc845996e2559c401e4899088b3e641c6c5b34af233bf2fd48d4de4531ea2815e2a96 + REF v6.1.0 + SHA512 7728abd8d3e1e8007f4d95c8065ba5a9154583bcd1d493bfd96d608ff91f4c9bb23e538378b77c1cfd6c637d6b4885af94ac0a2a9a34b6bae19581d9f1a831cc HEAD_REF master ) diff --git a/ports/chakracore/CONTROL b/ports/chakracore/CONTROL index 6c7db9e5419..0050599090d 100644 --- a/ports/chakracore/CONTROL +++ b/ports/chakracore/CONTROL @@ -1,3 +1,3 @@ Source: chakracore -Version: 1.8.3 +Version: 1.11.2 Description: Core part of the Chakra Javascript engine diff --git a/ports/chakracore/portfile.cmake b/ports/chakracore/portfile.cmake index 0f3874119e8..43bb1606ce3 100644 --- a/ports/chakracore/portfile.cmake +++ b/ports/chakracore/portfile.cmake @@ -1,22 +1,16 @@ -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported yet. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() -if(VCPKG_CRT_LINKAGE STREQUAL static) - message(FATAL_ERROR "Static linking of the CRT is not yet supported.") -endif() - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "UWP is not currently supported.") endif() include(vcpkg_common_functions) +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/ChakraCore - REF v1.8.3 - SHA512 4a5d6372cab51bb70911519fb9639d0cb6c456a966e2c90992f924ba36dcf741e32dbf18aea4419dc855f286da7e3edbfcc796bc90347858192c976298315785 + REF v1.11.2 + SHA512 6261a7028bf398703a610d9ad42b6bde7c6309d2997c7cfaa785c1fbcf582adbbbe60756bbe411af1d6e1d26ac9acca5cbe734608885d8b5f2881819477292b7 HEAD_REF master ) @@ -30,9 +24,14 @@ set(BUILDTREE_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) file(REMOVE_RECURSE ${BUILDTREE_PATH}) file(COPY ${SOURCE_PATH}/ DESTINATION ${BUILDTREE_PATH}) +set(CHAKRA_RUNTIME_LIB "static_library") # ChakraCore only supports static CRT linkage + vcpkg_build_msbuild( PROJECT_PATH ${BUILDTREE_PATH}/Build/Chakra.Core.sln - OPTIONS "/p:DotNetSdkRoot=${NETFXSDK_PATH}/" "/p:CustomBeforeMicrosoftCommonTargets=${CMAKE_CURRENT_LIST_DIR}/no-warning-as-error.props" + OPTIONS + "/p:DotNetSdkRoot=${NETFXSDK_PATH}/" + "/p:CustomBeforeMicrosoftCommonTargets=${CMAKE_CURRENT_LIST_DIR}/no-warning-as-error.props" + "/p:RuntimeLib=${CHAKRA_RUNTIME_LIB}" ) file(INSTALL @@ -68,6 +67,7 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/GCStress.exe ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/rl.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/chakracore) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/chakracore) endif() vcpkg_copy_pdbs() diff --git a/ports/check/CONTROL b/ports/check/CONTROL new file mode 100644 index 00000000000..4627d042216 --- /dev/null +++ b/ports/check/CONTROL @@ -0,0 +1,3 @@ +Source: check +Version: 0.12.0-1 +Description: A unit testing framework for C diff --git a/ports/check/portfile.cmake b/ports/check/portfile.cmake new file mode 100644 index 00000000000..1713a39a990 --- /dev/null +++ b/ports/check/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libcheck/check + REF 0.12.0 + SHA512 f7b6452b69f999a90e86a8582d980c0c1b74ba5629ee34455724463ba62bfe3501ad0415aa771170f5c638a7a253f123bf87cbef25aadc6569a7a3a4d10fce90 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja +) + +vcpkg_install_cmake() + +file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/check.cmake ${CURRENT_PACKAGES_DIR}/cmake/check-config.cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +# cleanup +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/check RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/cimg/CONTROL b/ports/cimg/CONTROL index 694db4b5da2..9d8704ea193 100644 --- a/ports/cimg/CONTROL +++ b/ports/cimg/CONTROL @@ -1,3 +1,3 @@ Source: cimg -Version: 2.2.2 +Version: 2.4.1 Description: The CImg Library is a small, open-source, and modern C++ toolkit for image processing diff --git a/ports/cimg/portfile.cmake b/ports/cimg/portfile.cmake index b7607bff2ab..70b397e45d1 100644 --- a/ports/cimg/portfile.cmake +++ b/ports/cimg/portfile.cmake @@ -2,9 +2,9 @@ include(vcpkg_common_functions) vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH REPO "dtschump/CImg" - REF v.2.2.2 + REF v.2.4.1 HEAD_REF master - SHA512 b3090e594accc31222e24e787381af315b5168dad4ea9669cc543ad6807c175dd60b9eddceda1c74a7bb716912650219763077b3eaee6fae79cfec1099c65836) + SHA512 b0582a158024a13c9d6779e4e6a37487bb8c18b3e91f8fa56a6d0ee3dbaede2567f00c29432f41ca8e3845e98566375b285fb674721225705f6ade91894db081) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/civetweb/CONTROL b/ports/civetweb/CONTROL new file mode 100644 index 00000000000..a8b0832e047 --- /dev/null +++ b/ports/civetweb/CONTROL @@ -0,0 +1,3 @@ +Source: civetweb +Version: 1.11-1 +Description: Easy to use, powerful, C/C++ embeddable web server. diff --git a/ports/civetweb/portfile.cmake b/ports/civetweb/portfile.cmake new file mode 100644 index 00000000000..8ad7af5381a --- /dev/null +++ b/ports/civetweb/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO civetweb/civetweb + REF v1.11 + SHA512 e1520fd2f4a54b6ab4838f4da2ce3f0956e9884059467d196078935a3fce61dad619f3bb1bc2b4c6a757e1a8abfed0e83cba38957c7c52fff235676e9dd1d428 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCIVETWEB_BUILD_TESTING=OFF + -DCIVETWEB_ENABLE_ASAN=OFF + -DCIVETWEB_ENABLE_CXX=ON + -DCIVETWEB_ENABLE_IPV6=ON + -DCIVETWEB_ENABLE_SERVER_EXECUTABLE=OFF + -DCIVETWEB_ENABLE_SSL=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/civetweb/copyright COPYONLY) diff --git a/ports/clara/CONTROL b/ports/clara/CONTROL index 815db6e5244..cce19cdf1a1 100644 --- a/ports/clara/CONTROL +++ b/ports/clara/CONTROL @@ -1,3 +1,3 @@ Source: clara -Version: 2018-04-02 +Version: 2018-11-01 Description: A simple to use command line parser for C++ \ No newline at end of file diff --git a/ports/clara/portfile.cmake b/ports/clara/portfile.cmake index b4f7a7b2006..142b301200a 100644 --- a/ports/clara/portfile.cmake +++ b/ports/clara/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO philsquared/Clara - REF ba5485cb56329db3ea3f5402ef596d3b512b903a - SHA512 8aa66e3e1a2b7c544d9d105ad9f803119791b971cce4dff63ae47b63a08fd422fc75108aeb69300fa9982568d689f506456c6f8ed7287a19b9ed84649fad9315 + REF a6dfbbd011a79a5f729950d6f4b72c08f9529283 + SHA512 ec3004807c35b54b2defbec7d794817cd90dad5e442fa30c7a4ef3f72d6fcfd789302388bae8752b98d7145071d43851326e476d053b15f800f9117e1a3a0d74 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/single_include/clara.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/cli11/CONTROL b/ports/cli11/CONTROL new file mode 100644 index 00000000000..5174d703763 --- /dev/null +++ b/ports/cli11/CONTROL @@ -0,0 +1,3 @@ +Source: cli11 +Version: 1.6.1 +Description: CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface. diff --git a/ports/cli11/portfile.cmake b/ports/cli11/portfile.cmake new file mode 100644 index 00000000000..bda9fa2b365 --- /dev/null +++ b/ports/cli11/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CLIUtils/CLI11 + REF v1.6.1 + SHA512 df12510bb78823908535a68af65fb8ea0b8b33b362e0b5f2cfa91223db7ebd9e71a55dfe31902c5d10e29c02a9bb59be58f8c69da7a9b4ab456ace64f200ac93 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCLI11_TESTING=OFF + -DCLI11_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/CLI11) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cli11 RENAME copyright) + +# Post-build test for cmake libraries +# vcpkg_test_cmake(PACKAGE_NAME cli11) diff --git a/ports/clockutils/CONTROL b/ports/clockutils/CONTROL index 59950365d11..5a33253508c 100644 --- a/ports/clockutils/CONTROL +++ b/ports/clockutils/CONTROL @@ -1,3 +1,3 @@ Source: clockutils -Version: 1.1.1-3651f232c27074c4ceead169e223edf5f00247c5-1 +Version: 1.1.1-3651f232c27074c4ceead169e223edf5f00247c5-2 Description: A lightweight c++ library for commonly needed tasks. Optimized for simplicity and speed. diff --git a/ports/clockutils/fix-warningC4643.patch b/ports/clockutils/fix-warningC4643.patch new file mode 100644 index 00000000000..49bc32386e2 --- /dev/null +++ b/ports/clockutils/fix-warningC4643.patch @@ -0,0 +1,29 @@ +diff --git a/include/clockUtils/sockets/TcpSocket.h b/include/clockUtils/sockets/TcpSocket.h +index 6e0d9c8..3bb97a9 100644 +--- a/include/clockUtils/sockets/TcpSocket.h ++++ b/include/clockUtils/sockets/TcpSocket.h +@@ -57,9 +57,6 @@ + #define INVALID_SOCKET -1 + #endif + +-namespace std { +- class thread; +-} /* namespace std */ + namespace clockUtils { + enum class ClockError; + namespace sockets { +diff --git a/include/clockUtils/sockets/UdpSocket.h b/include/clockUtils/sockets/UdpSocket.h +index 31eeeb5..c5da451 100644 +--- a/include/clockUtils/sockets/UdpSocket.h ++++ b/include/clockUtils/sockets/UdpSocket.h +@@ -60,10 +60,6 @@ + #define INVALID_SOCKET -1 + #endif + +-namespace std { +- class thread; +-} /* namespace std */ +- + namespace clockUtils { + enum class ClockError; + namespace sockets { diff --git a/ports/clockutils/portfile.cmake b/ports/clockutils/portfile.cmake index 33f0b1f834d..28a1de440de 100644 --- a/ports/clockutils/portfile.cmake +++ b/ports/clockutils/portfile.cmake @@ -1,12 +1,14 @@ include(vcpkg_common_functions) -set(VERSION 3651f232c27074c4ceead169e223edf5f00247c5) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/clockUtils-${VERSION}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/ClockworkOrigins/clockUtils/archive/${VERSION}.tar.gz" - FILENAME "clockUtils-${VERSION}.tar.gz" + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ClockworkOrigins/clockUtils + REF 3651f232c27074c4ceead169e223edf5f00247c5 SHA512 ddb70cae9ced25de77a2df1854dac15e58a77347042ba3ee9c691f85f49edbc6539c84929a7477d429fb9161ba24c57d24d767793b8b1180216d5ddfc5d3ed6a + HEAD_REF dev-1.2 + PATCHES + "${CURRENT_PORT_DIR}/fix-warningC4643.patch" ) -vcpkg_extract_source_archive(${ARCHIVE}) if (VCPKG_CRT_LINKAGE STREQUAL dynamic) SET(SHARED_FLAG ON) diff --git a/ports/cmark/CONTROL b/ports/cmark/CONTROL new file mode 100644 index 00000000000..6f756e824d9 --- /dev/null +++ b/ports/cmark/CONTROL @@ -0,0 +1,3 @@ +Source: cmark +Version: 0.28.3-2 +Description: CommonMark parsing and rendering library diff --git a/ports/cmark/portfile.cmake b/ports/cmark/portfile.cmake new file mode 100644 index 00000000000..97324b4bf27 --- /dev/null +++ b/ports/cmark/portfile.cmake @@ -0,0 +1,47 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + # Note: fails due to missing cmark_export.h -- fix should be to always generate the correct export header. + message(FATAL_ERROR "cmark does not currently support static library linkage") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO commonmark/cmark + REF 0.28.3 + SHA512 409105a3228a8ae22ba6acf95cd99bc9a2c20f8603aa0e803a33172eb6ef53f80f8f0262d2258b77f9fd6e1f2e9017a6c906b88f761e053c09ef88c9ffab7d29 + HEAD_REF master + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/rename-shared-lib.patch" +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CMARK_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CMARK_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMARK_TESTS=OFF + -DCMARK_SHARED=${CMARK_SHARED} + -DCMARK_STATIC=${CMARK_STATIC} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cmark RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/cmark.exe) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/cmark.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/cmark/) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/cmark) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND NOT EXISTS ${CURRENT_PACKAGES_DIR}/bin/cmark) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/cmark.exe ${CURRENT_PACKAGES_DIR}/debug/bin/cmark.exe) +endif() diff --git a/ports/cmark/rename-shared-lib.patch b/ports/cmark/rename-shared-lib.patch new file mode 100644 index 00000000000..79439aae128 --- /dev/null +++ b/ports/cmark/rename-shared-lib.patch @@ -0,0 +1,12 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index d5a1936..acff569 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -83,7 +83,6 @@ if (CMARK_SHARED) + add_library(${LIBRARY} SHARED ${LIBRARY_SOURCES}) + # Include minor version and patch level in soname for now. + set_target_properties(${LIBRARY} PROPERTIES +- OUTPUT_NAME "cmark" + SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} + VERSION ${PROJECT_VERSION}) + diff --git a/ports/concurrentqueue/CONTROL b/ports/concurrentqueue/CONTROL new file mode 100644 index 00000000000..2dea272776c --- /dev/null +++ b/ports/concurrentqueue/CONTROL @@ -0,0 +1,3 @@ +Source: concurrentqueue +Version: 1.0.0-beta +Description: A fast multi-producer, multi-consumer lock-free concurrent queue for C++11 diff --git a/ports/concurrentqueue/portfile.cmake b/ports/concurrentqueue/portfile.cmake new file mode 100644 index 00000000000..9114d2a26f4 --- /dev/null +++ b/ports/concurrentqueue/portfile.cmake @@ -0,0 +1,15 @@ +# header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cameron314/concurrentqueue + REF 1d60c7f3004a87eaa9d9cbd647d66361c868558f + SHA512 4b435843291f4db5be6d3fb3dd33c38a1c3c0a2e2c22910b819f119cfca2867116c5d01dd5e7d302693d467821688aac5dc7334b4a9ef39275e682f1fb99585c + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/concurrentqueue RENAME copyright) + +file(GLOB HEADER_FILES ${SOURCE_PATH}/*.h) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/coolprop/CONTROL b/ports/coolprop/CONTROL index 72ccae87b5d..01e67e0dfb5 100644 --- a/ports/coolprop/CONTROL +++ b/ports/coolprop/CONTROL @@ -1,4 +1,4 @@ Source: coolprop -Version: 6.1.0-3 +Version: 6.1.0-4 Description: Thermophysical properties for the masses Build-Depends: catch, eigen3, pybind11, if97, fmt, rapidjson, msgpack, refprop-headers diff --git a/ports/coolprop/fmt-fix.patch b/ports/coolprop/fmt-fix.patch new file mode 100644 index 00000000000..bf2d11deb57 --- /dev/null +++ b/ports/coolprop/fmt-fix.patch @@ -0,0 +1,39 @@ +diff --git a/include/CPstrings.h b/include/CPstrings.h +index 2e5a5af..87f6b7c 100644 +--- a/include/CPstrings.h ++++ b/include/CPstrings.h +@@ -5,6 +5,8 @@ + #include + #include + #include ++ #include ++ #include + + #if !defined(NO_CPPFORMAT) + #ifndef FMT_HEADER_ONLY +@@ -13,9 +15,6 @@ + #include "fmt/format.h" // For addition of the string formatting functions and macros from cppformat + #include "fmt/printf.h" // For sprintf + #undef FMT_HEADER_ONLY +-#else +- #include +- #include + #endif + + #include "Exceptions.h" +@@ -57,11 +56,11 @@ + // Missing string formatting function, this old guy is needed for ancient gcc compilers on PowerPC for VxWorks + inline std::string format(const char* fmt, ...); + #else +- // Missing std::string formatting function - provided by the cppformat library +- inline std::string format(const char *format, fmt::ArgList args) { +- return fmt::sprintf(format, args); ++ template ++ std::string format(const Args & ... args) ++ { ++ return fmt::sprintf(args...); + } +- FMT_VARIADIC(std::string, format, const char *) + #endif + + // Missing string split - like in Python diff --git a/ports/coolprop/portfile.cmake b/ports/coolprop/portfile.cmake index c5b3a8ceebb..2406ea819f2 100644 --- a/ports/coolprop/portfile.cmake +++ b/ports/coolprop/portfile.cmake @@ -7,6 +7,8 @@ vcpkg_from_github( REF 0e934e842e9ce83eea64fda1d4ab8e59adf9d8cd SHA512 a44eafc84f2b88259d7bcf6cfa81daeb81ea9d55bd356e59b3ef77b6f68ea405961c7cb54ba899e3896bb2a02d3e01119a4a51f72899126c8da6081fa2ece948 HEAD_REF master + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fmt-fix.patch ) vcpkg_find_acquire_program(PYTHON2) @@ -16,8 +18,8 @@ set(ENV{PATH} "$ENV{PATH};${PYTHON2_DIR}") file(REMOVE_RECURSE ${SOURCE_PATH}/externals) # Patch up the file locations -file(COPY - ${CURRENT_INSTALLED_DIR}/include/catch.hpp +file(COPY + ${CURRENT_INSTALLED_DIR}/include/catch.hpp DESTINATION ${SOURCE_PATH}/externals/Catch/single_include ) @@ -30,12 +32,12 @@ file(COPY DESTINATION ${SOURCE_PATH}/externals/Eigen/unsupported ) -file(COPY +file(COPY ${CURRENT_INSTALLED_DIR}/include/rapidjson DESTINATION ${SOURCE_PATH}/externals/rapidjson/include ) -file(COPY +file(COPY ${CURRENT_INSTALLED_DIR}/include/IF97.h DESTINATION ${SOURCE_PATH}/externals/IF97 ) diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL index a886c8639d5..116a9f7e75b 100644 --- a/ports/corrade/CONTROL +++ b/ports/corrade/CONTROL @@ -1,5 +1,5 @@ Source: corrade -Version: 2018.02-1 +Version: 2018.10-1 Description: C++11/C++14 multiplatform utility library http://magnum.graphics/corrade/ Default-Features: interconnect, pluginmanager, testsuite, utility diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 85ad3e4b0ba..0a6f1babb3b 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -2,16 +2,12 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/corrade - REF v2018.02 - SHA512 8fe4998dc32586386b8fa2030941f3ace6d5e76aadcf7e20a620d276cc9247324e10eb58f2c2c9e84a1a9d9b336e6bdc788f9947c9e507a053d6fd2ffcd3d58e + REF v2018.10 + SHA512 594c15d9622fa0abdf893c15054f27bdcc40b5de1543d722b7173138ec5d299c45b7a85376ed617cdf9b4f52a05bf7a3d1ea1983e112b62690211116c255d201 HEAD_REF master ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(BUILD_STATIC 1) -else() - set(BUILD_STATIC 0) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) # Handle features set(_COMPONENT_FLAGS "") @@ -45,16 +41,20 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Install tools if("utility" IN_LIST FEATURES) + file(GLOB EXES + ${CURRENT_PACKAGES_DIR}/bin/corrade-rc + ${CURRENT_PACKAGES_DIR}/bin/corrade-rc.exe + ) + # Drop a copy of tools - file(COPY ${CURRENT_PACKAGES_DIR}/bin/corrade-rc.exe - DESTINATION ${CURRENT_PACKAGES_DIR}/tools/corrade) + file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/corrade) # Tools require dlls vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/corrade) - file(GLOB_RECURSE TO_REMOVE - ${CURRENT_PACKAGES_DIR}/bin/*.exe - ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(GLOB TO_REMOVE + ${CURRENT_PACKAGES_DIR}/bin/corrade-rc* + ${CURRENT_PACKAGES_DIR}/debug/bin/corrade-rc*) file(REMOVE ${TO_REMOVE}) endif() @@ -68,7 +68,7 @@ if(NOT FEATURES) # debug is completely empty, as include and share # have already been removed. -elseif(VCPKG_LIBRARY_LINKAGE STREQUAL static) +elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") # No dlls file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin diff --git a/ports/cpp-redis/portfile.cmake b/ports/cpp-redis/portfile.cmake index 9187e344f15..c9feba68db3 100644 --- a/ports/cpp-redis/portfile.cmake +++ b/ports/cpp-redis/portfile.cmake @@ -16,9 +16,11 @@ else() set(MSVC_RUNTIME_LIBRARY_CONFIG "/MT") endif() -# cpp-redis forcibly removes "/RTC1" in its cmake file. Because this is an ABI-sensitive flag, we need to re-add it in a form that won't be detected. -set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -RTC1") -set(VCPKG_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG} -RTC1") +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + # cpp-redis forcibly removes "/RTC1" in its cmake file. Because this is an ABI-sensitive flag, we need to re-add it in a form that won't be detected. + set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -RTC1") + set(VCPKG_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG} -RTC1") +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/cpp-taskflow/CONTROL b/ports/cpp-taskflow/CONTROL new file mode 100644 index 00000000000..4abf5457fca --- /dev/null +++ b/ports/cpp-taskflow/CONTROL @@ -0,0 +1,3 @@ +Source: cpp-taskflow +Version: 2018-11-30 +Description: Fast Parallel Tasking Programming Library using Modern C++. diff --git a/ports/cpp-taskflow/portfile.cmake b/ports/cpp-taskflow/portfile.cmake new file mode 100644 index 00000000000..1f596f0d491 --- /dev/null +++ b/ports/cpp-taskflow/portfile.cmake @@ -0,0 +1,29 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cpp-taskflow/cpp-taskflow + REF 97252f7d782c6e896122645175c08131ce10e649 + SHA512 df8ae9ea449663cb548f3c37346c2e0c785add2d86b9c618aea2741d81fe88c34b0d3d0e610a4b571973f9bc18631becedfe28e029ecf0c0cc87e4c35a280a29 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DTF_BUILD_EXAMPLES=OFF + -DTF_BUILD_TESTS=OFF + -DTF_BUILD_BENCHMARKS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/cpp-taskflow/copyright COPYONLY) diff --git a/ports/cppgraphqlgen/CONTROL b/ports/cppgraphqlgen/CONTROL new file mode 100644 index 00000000000..7eaa3d6bedd --- /dev/null +++ b/ports/cppgraphqlgen/CONTROL @@ -0,0 +1,4 @@ +Source: cppgraphqlgen +Version: 0.6 +Build-Depends: pegtl, rapidjson +Description: C++ GraphQL schema service generator diff --git a/ports/cppgraphqlgen/portfile.cmake b/ports/cppgraphqlgen/portfile.cmake new file mode 100644 index 00000000000..70ff810706c --- /dev/null +++ b/ports/cppgraphqlgen/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/cppgraphqlgen + REF v0.6 + SHA512 cc2596f5cd975377fcc9432eee11973e2ff044c244c3ac13c3f45549874c2fe0ac5c48bccb96813b48a1b7c940bb54decc194d9eb358c6ae39d1288b9ce58b01 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DBUILD_TESTS=OFF -DUPDATE_SAMPLES=OFF + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +vcpkg_copy_pdbs() + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/cppgraphqlgen/copyright COPYONLY) + +vcpkg_test_cmake(PACKAGE_NAME cppgraphqlgen) diff --git a/ports/cpprestsdk/CONTROL b/ports/cpprestsdk/CONTROL index 7e6dbc0d1d5..e5da66ef707 100644 --- a/ports/cpprestsdk/CONTROL +++ b/ports/cpprestsdk/CONTROL @@ -1,5 +1,18 @@ Source: cpprestsdk -Version: 2.10.2-1 -Build-Depends: zlib, openssl (!uwp), boost-system (!uwp), boost-date-time (!uwp), boost-regex (!uwp), websocketpp (!uwp), boost-thread (!uwp&!windows), boost-filesystem (!uwp&!windows), boost-random (!uwp&!windows), boost-chrono (!uwp&!windows) +Version: 2.10.7 +Build-Depends: zlib, openssl (!uwp&!windows), boost-system (!uwp&!windows), boost-date-time (!uwp&!windows), boost-regex (!uwp&!windows), boost-thread (!uwp&!windows), boost-filesystem (!uwp&!windows), boost-random (!uwp&!windows), boost-chrono (!uwp&!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. +Default-Features: default-features + +Feature: default-features +Build-Depends: cpprestsdk[brotli] (windows), cpprestsdk[websockets] +Description: Features installed by default + +Feature: websockets +Build-Depends: websocketpp (!uwp), openssl (!uwp), boost-system (!uwp), boost-date-time (!uwp), boost-regex (!uwp) +Description: Websockets support + +Feature: brotli +Build-Depends: brotli +Description: Brotli compression support diff --git a/ports/cpprestsdk/portfile.cmake b/ports/cpprestsdk/portfile.cmake index 46686bb0a2a..d6390836cb7 100644 --- a/ports/cpprestsdk/portfile.cmake +++ b/ports/cpprestsdk/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/cpprestsdk - REF v2.10.2 - SHA512 267a928f770a668874f9b7e381e8977ffa3478c9292df4ed93d4235d20f0e89b1bfe4cfc82945d3f28fe2746a4fe6089009c4839dac5db130494bb3a395dd198 + REF v2.10.8 + SHA512 d80a7db59cfe81d8e0c645acff7bcc2ed9ad04e2f3d14dc4ab2a624290d0ea43a2c7adebb54b52a166fd07375352cfd5f1fe244d7c062ce94ec60b977437b2df HEAD_REF master ) @@ -16,6 +16,16 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") -DWEBSOCKETPP_CONFIG_VERSION=${WEBSOCKETPP_PATH}) endif() +set(CPPREST_EXCLUDE_WEBSOCKETS ON) +if("websockets" IN_LIST FEATURES) + set(CPPREST_EXCLUDE_WEBSOCKETS OFF) +endif() + +set(CPPREST_EXCLUDE_BROTLI ON) +if ("brotli" IN_LIST FEATURES) + set(CPPREST_EXCLUDE_BROTLI OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/Release PREFER_NINJA @@ -23,7 +33,7 @@ vcpkg_configure_cmake( ${OPTIONS} -DBUILD_TESTS=OFF -DBUILD_SAMPLES=OFF - -DCPPREST_EXCLUDE_WEBSOCKETS=OFF + -DCPPREST_EXCLUDE_WEBSOCKETS=${CPPREST_EXCLUDE_WEBSOCKETS} -DCPPREST_EXPORT_DIR=share/cpprestsdk -DWERROR=OFF OPTIONS_DEBUG @@ -32,11 +42,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/share/cpprestsdk) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/share ${CURRENT_PACKAGES_DIR}/lib/share) file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpprestsdk RENAME copyright) vcpkg_copy_pdbs() - diff --git a/ports/cppzmq/CONTROL b/ports/cppzmq/CONTROL index e970bac5393..d54de7494d2 100644 --- a/ports/cppzmq/CONTROL +++ b/ports/cppzmq/CONTROL @@ -1,4 +1,4 @@ Source: cppzmq -Version: 4.2.2-1 +Version: 4.3.0-1 Build-Depends: zeromq Description: lightweight messaging kernel, C++ bindings diff --git a/ports/cppzmq/portfile.cmake b/ports/cppzmq/portfile.cmake index 282a86dfd64..cd281513af9 100644 --- a/ports/cppzmq/portfile.cmake +++ b/ports/cppzmq/portfile.cmake @@ -1,24 +1,24 @@ -#header-only library include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/cppzmq - REF v4.2.2 - SHA512 5f61ea4a16987c1363c3029cf46b3e83ddd86d65e8d639b0332d691f8fdb5cee121b5d72a9b8c89221daf52ea5892219e0bc4ea4e761bb1e7deb1659011dd3c9 + REF v4.3.0 + SHA512 c9e08e48795b9043c689ffa6953ac59e0fe79d9110d79e06609ab67bf76bea52147b59ecf033f7a06e57d5eb0c3c6bc79634af789966ff22d7d80091d19b135d HEAD_REF master ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS -DCPPZMQ_BUILD_TESTS=OFF ) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/cppzmq) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/cppzmq/libzmq-pkg-config) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppzmq) diff --git a/ports/crc32c/CONTROL b/ports/crc32c/CONTROL index 77a7e42c99a..20786bad231 100644 --- a/ports/crc32c/CONTROL +++ b/ports/crc32c/CONTROL @@ -1,3 +1,3 @@ Source: crc32c -Version: 1.0.5 +Version: 1.0.5-1 Description: CRC32C implementation with support for CPU-specific acceleration instructions. diff --git a/ports/crc32c/portfile.cmake b/ports/crc32c/portfile.cmake index 2747d69bd52..a60f37671f6 100644 --- a/ports/crc32c/portfile.cmake +++ b/ports/crc32c/portfile.cmake @@ -1,9 +1,6 @@ include(vcpkg_common_functions) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(WARNING "building static") - set(VCPKG_LIBRARY_LINKAGE static) -endif() +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -13,24 +10,23 @@ vcpkg_from_github( HEAD_REF master ) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DCRC32C_BUILD_TESTS=OFF - -DCRC32C_BUILD_BENCHMARKS=OFF - -DCRC32C_USE_GLOG=OFF + -DCRC32C_BUILD_TESTS=OFF + -DCRC32C_BUILD_BENCHMARKS=OFF + -DCRC32C_USE_GLOG=OFF ) vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake") +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Crc32c") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() diff --git a/ports/crossguid/CONTROL b/ports/crossguid/CONTROL new file mode 100644 index 00000000000..533f0c78e38 --- /dev/null +++ b/ports/crossguid/CONTROL @@ -0,0 +1,4 @@ +Source: crossguid +Version: 0.2.2-2018-06-16 +Build-Depends: libuuid (!windows&!uwp&!osx&!android) +Description: CrossGuid is a minimal, cross platform, C++ GUID library. diff --git a/ports/crossguid/portfile.cmake b/ports/crossguid/portfile.cmake new file mode 100644 index 00000000000..90d69262649 --- /dev/null +++ b/ports/crossguid/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO graeme-hill/crossguid + REF c4f8e9b21f779abe287c022e73eeac365d430337 + SHA512 38876f410d0014ad930b720312cecc99be1361b9810a21d5ffc1deba6221ea0e2aebd0da332adb18fd314d0477fd33410403120629b8df405bb64a9884e3d0b0 + HEAD_REF master +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(STATUS "Warning: Dynamic building not supported. Building static instead") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCROSSGUID_TESTS:BOOL=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/crossguid/cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(RENAME ${CURRENT_PACKAGES_DIR}/share/crossguid/LICENSE ${CURRENT_PACKAGES_DIR}/share/crossguid/copyright) diff --git a/ports/cryptopp/CONTROL b/ports/cryptopp/CONTROL index 6fea020bd25..89db4de5793 100644 --- a/ports/cryptopp/CONTROL +++ b/ports/cryptopp/CONTROL @@ -1,3 +1,3 @@ Source: cryptopp -Version: 6.1.0-2 +Version: 7.0.0 Description: Crypto++ is a free C++ class library of cryptographic schemes. diff --git a/ports/cryptopp/cmake.patch b/ports/cryptopp/cmake.patch index fbe725eb9e2..699ebd564f5 100644 --- a/ports/cryptopp/cmake.patch +++ b/ports/cryptopp/cmake.patch @@ -1,15 +1,19 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5b6e1e6..a0adcf6 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -329,6 +329,10 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FI\"winapifamily.h\"" ) - endif () - -+if(WINDOWS_STORE) -+ add_definitions(-DCRYPTOPP_DISABLE_NACL=1) -+endif() -+ - # Enable PIC for all target machines except 32-bit i386 due to register pressures. - if (NOT CRYPTOPP_I386) - SET(CMAKE_POSITION_INDEPENDENT_CODE 1) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8cf9fa2..86a756b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -336,9 +336,13 @@ if (MSVC) + if (CMAKE_SYSTEM_VERSION MATCHES "10\\.0.*") + list(APPEND CRYPTOPP_COMPILE_DEFINITIONS "_WIN32_WINNT=0x0A00") + endif () +- list(APPEND CRYPTOPP_COMPILE_OPTIONS "/FI\"winapifamily.h\"") ++ list(APPEND CRYPTOPP_COMPILE_OPTIONS "/FIwinapifamily.h") + endif () + ++if(WINDOWS_STORE) ++ add_definitions(-DCRYPTOPP_DISABLE_NACL=1) ++endif() ++ + # Enable PIC for all target machines except 32-bit i386 due to register pressures. + if (NOT CRYPTOPP_I386) + SET(CMAKE_POSITION_INDEPENDENT_CODE 1) diff --git a/ports/cryptopp/patch.patch b/ports/cryptopp/patch.patch index 5c49d27577c..937738d5b4b 100644 --- a/ports/cryptopp/patch.patch +++ b/ports/cryptopp/patch.patch @@ -1,8 +1,8 @@ -diff --git a/config.h b/config.h -index b96b7aa..3f004ac 100644 ---- a/config.h -+++ b/config.h -@@ -795,6 +795,7 @@ NAMESPACE_END +diff --git a/config.h b/config.h +index f06992a2..be6eda31 100644 +--- a/config.h ++++ b/config.h +@@ -814,6 +814,7 @@ NAMESPACE_END #endif #ifdef CRYPTOPP_WIN32_AVAILABLE diff --git a/ports/cryptopp/portfile.cmake b/ports/cryptopp/portfile.cmake index 6b4b844c434..82893be4190 100644 --- a/ports/cryptopp/portfile.cmake +++ b/ports/cryptopp/portfile.cmake @@ -1,35 +1,30 @@ -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(STATUS "Warning: Dynamic building not supported. Building static.") # See note below - set(VCPKG_LIBRARY_LINKAGE static) -endif() include(vcpkg_common_functions) +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + vcpkg_from_github( OUT_SOURCE_PATH CMAKE_SOURCE_PATH REPO noloader/cryptopp-cmake - REF aab149932675e4bb777a9d3d6b3f8b8182583fd7 - SHA512 748c77e936888d042bf4a72cc7ee3b7b2ecf16c003cb23296c1af413c9a0cba00cc942ecace26274fc8ac8bd4d848946beb9d7bf2253c5eab3315a4419ef5f1f + REF 2729870f277bd568a8e8183b5ba7799e0c2dbf96 + SHA512 fff9468774f66a895ab44ce76d37b320aeaa9398514b66d5116ffe84705ef7a202586622d598ea03f7c1636587893d46c6eee5e0da965c58fb74131c4b76223c HEAD_REF master + PATCHES + cmake.patch + simon-speck.patch ) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO weidai11/cryptopp - REF CRYPTOPP_6_1_0 - SHA512 4bc02fef33f1859a07434a4752c2575afd781056e9a91eed99a13cebe2c91d66cbc7173e34d362da63dad6d38f9594ff291accd27e111232996ccd536bba0f39 + REF CRYPTOPP_7_0_0 + SHA512 bc83f6adf0ae627c57ff9172d8cee69e7000d9b414ec903a50f11f9a68da08d1dd4985ddaffada86bf58e8168a2df065185efd932201d2df9db3f73025825e54 HEAD_REF master + PATCHES patch.patch ) file(COPY ${CMAKE_SOURCE_PATH}/cryptopp-config.cmake DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_SOURCE_PATH}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -vcpkg_apply_patches( - SOURCE_PATH "${SOURCE_PATH}" - PATCHES - "${CMAKE_CURRENT_LIST_DIR}/patch.patch" - "${CMAKE_CURRENT_LIST_DIR}/cmake.patch" -) - # Dynamic linking should be avoided for Crypto++ to reduce the attack surface, # so generate a static lib for both dynamic and static vcpkg targets. # See also: diff --git a/ports/cryptopp/simon-speck.patch b/ports/cryptopp/simon-speck.patch new file mode 100644 index 00000000000..a1d911930ac --- /dev/null +++ b/ports/cryptopp/simon-speck.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7d64977..4ec3ebd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -497,6 +497,8 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU + set_source_files_properties(${SRC_DIR}/simeck-simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") + set_source_files_properties(${SRC_DIR}/simon128-simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") + set_source_files_properties(${SRC_DIR}/speck128-simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") ++ set_source_files_properties(${SRC_DIR}/simon-simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") ++ set_source_files_properties(${SRC_DIR}/speck-simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3") + if (CRYPTOPP_IA32_SSE41 AND NOT DISABLE_SSE4) + set_source_files_properties(${SRC_DIR}/blake2-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1") + set_source_files_properties(${SRC_DIR}/simon64-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1") diff --git a/ports/ctre/CONTROL b/ports/ctre/CONTROL new file mode 100644 index 00000000000..3351ecf2582 --- /dev/null +++ b/ports/ctre/CONTROL @@ -0,0 +1,3 @@ +Source: ctre +Version: 2.2-1 +Description: A Compile time PCRE (almost) compatible regular expression matcher diff --git a/ports/ctre/portfile.cmake b/ports/ctre/portfile.cmake new file mode 100644 index 00000000000..76a4a7857d1 --- /dev/null +++ b/ports/ctre/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hanickadot/compile-time-regular-expressions + REF v2.2 + SHA512 f6f18e3e5bc654ff94cd540a3b665615151678541575dfc8d4113c317fba5ea83f57694dc330c174110e6263c9b64a128f2a9234cc626a952e7518c423fda703 + HEAD_REF master +) + +# Install header files +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ctre RENAME copyright) diff --git a/ports/cub/CONTROL b/ports/cub/CONTROL new file mode 100644 index 00000000000..7c62c25a2db --- /dev/null +++ b/ports/cub/CONTROL @@ -0,0 +1,4 @@ +Source: cub +Version: 1.8.0 +Description: CUB is a flexible library of cooperative threadblock primitives and other utilities for CUDA kernel programming +Build-Depends: cuda diff --git a/ports/cub/portfile.cmake b/ports/cub/portfile.cmake new file mode 100644 index 00000000000..302bfb706e6 --- /dev/null +++ b/ports/cub/portfile.cmake @@ -0,0 +1,12 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO NVlabs/cub + REF v1.8.0 + SHA512 c4ba51ca4e369c8ef87bc411aa011470478fcc2526b667f088e9ac8c62e6532dc2368e869f5147b56f22b3e8718c7276434c3294d9d67cb3a92c700d163e8fa7 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/cub/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/cub) + +configure_file(${SOURCE_PATH}/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/cub/copyright COPYONLY) diff --git a/ports/curl/0001_cmake.patch b/ports/curl/0001_cmake.patch index 4298321b373..7796af4136e 100644 --- a/ports/curl/0001_cmake.patch +++ b/ports/curl/0001_cmake.patch @@ -1,28 +1,28 @@ diff --git a/CMake/FindLibSSH2.cmake b/CMake/FindLibSSH2.cmake -index 12a7c61..9839c67 100644 +index 84822dba7..0d6219425 100644 --- a/CMake/FindLibSSH2.cmake +++ b/CMake/FindLibSSH2.cmake -@@ -12,7 +12,7 @@ endif (LIBSSH2_INCLUDE_DIR AND LIBSSH2_LIBRARY) - FIND_PATH(LIBSSH2_INCLUDE_DIR libssh2.h +@@ -12,7 +12,7 @@ endif() + find_path(LIBSSH2_INCLUDE_DIR libssh2.h ) --FIND_LIBRARY(LIBSSH2_LIBRARY NAMES ssh2 -+FIND_LIBRARY(LIBSSH2_LIBRARY NAMES ssh2 libssh2 +-find_library(LIBSSH2_LIBRARY NAMES ssh2 ++find_library(LIBSSH2_LIBRARY NAMES ssh2 libssh2 ) if(LIBSSH2_INCLUDE_DIR) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7b73b98..6c7c559 100644 +index e6dbb73f1..1e2ff138e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1132,7 +1132,9 @@ function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE) +@@ -1144,7 +1144,9 @@ function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE) endfunction() -if(WIN32 AND NOT CYGWIN) +if(MSVC) -+ set(CURL_INSTALL_CMAKE_DIR share/curl) ++ set(CURL_INSTALL_CMAKE_DIR share/curl) +elseif(WIN32 AND NOT CYGWIN) - set(CURL_INSTALL_CMAKE_DIR CMake) + set(CURL_INSTALL_CMAKE_DIR CMake) else() - set(CURL_INSTALL_CMAKE_DIR lib/cmake/curl) + set(CURL_INSTALL_CMAKE_DIR lib/cmake/curl) diff --git a/ports/curl/0004_nghttp2_staticlib.patch b/ports/curl/0004_nghttp2_staticlib.patch new file mode 100644 index 00000000000..69c1854f965 --- /dev/null +++ b/ports/curl/0004_nghttp2_staticlib.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 490cc19..51c0a92 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -388,6 +388,9 @@ if(USE_NGHTTP2) + find_package(NGHTTP2 REQUIRED) + include_directories(${NGHTTP2_INCLUDE_DIRS}) + list(APPEND CURL_LIBS ${NGHTTP2_LIBRARIES}) ++ if(NOT BUILD_SHARED_LIBS) ++ add_definitions(-DNGHTTP2_STATICLIB) ++ endif() + endif() + + if(NOT CURL_DISABLE_LDAP) diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index 18518e1ea8a..f76c9912451 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,9 +1,8 @@ Source: curl -Version: 7_59_0-2 +Version: 7.61.1-2 Build-Depends: zlib Description: A library for transferring data with URLs Default-Features: ssl -# For WINSSL add set(CURL_USE_WINSSL ON) to your triplet file Feature: tool Description: Builds curl executable @@ -16,9 +15,21 @@ Build-Depends: nghttp2, curl[ssl] Description: HTTP2 support Feature: ssl -Build-Depends: openssl -Description: SSL support +Build-Depends: curl[openssl] (!windows), curl[winssl] (windows) +Description: Default SSL backend Feature: ssh Build-Depends: libssh2, curl[non-http] Description: SSH support via libssh2 + +# SSL backends +Feature: openssl +Build-Depends: openssl +Description: SSL support (OpenSSL) + +Feature: winssl +Description: SSL support (Secure Channel / "WinSSL") + +Feature: mbedtls +Build-Depends: mbedtls +Description: SSL support (mbedTLS) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 852fcf9d0ec..534a54aea00 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -1,41 +1,43 @@ include(vcpkg_common_functions) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO curl/curl - REF curl-7_59_0 - SHA512 eac51b986db7eafb836bc4fa00def88054304110990bf99a4387a5ff85a8375616c2ee5bee91bf608737faffe9f228dfd62be69a4b0622a4afe3deb1098b6bd3 + REF curl-7_61_1 + SHA512 09fa3c87f8d516eabe3241247a5094c32ee0481961cf85bf78ecb13acdf23bb2ec82f113d2660271d22742c79e76d73fb122730fa28e34c7f5477c05a4a6534c HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch - ${CMAKE_CURRENT_LIST_DIR}/0002_fix_uwp.patch - ${CMAKE_CURRENT_LIST_DIR}/0003_fix_libraries.patch + 0001_cmake.patch + 0002_fix_uwp.patch + 0003_fix_libraries.patch + 0004_nghttp2_staticlib.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB) -# Support HTTP2 TSL Download https://curl.haxx.se/ca/cacert.pem rename to curl-ca-bundle.crt, copy it to libcurl.dll location. +# Support HTTP2 TLS Download https://curl.haxx.se/ca/cacert.pem rename to curl-ca-bundle.crt, copy it to libcurl.dll location. set(HTTP2_OPTIONS) if("http2" IN_LIST FEATURES) - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "The http2 feature cannot be enabled when building for UWP.") - endif() - set(HTTP2_OPTIONS -DUSE_NGHTTP2=ON) endif() # SSL set(USE_OPENSSL OFF) +if("openssl" IN_LIST FEATURES) + set(USE_OPENSSL ON) +endif() + set(USE_WINSSL OFF) -if("ssl" IN_LIST FEATURES) - if(CURL_USE_WINSSL) - set(USE_WINSSL ON) - else() - set(USE_OPENSSL ON) +if("winssl" IN_LIST FEATURES) + if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "winssl is not supported on non-Windows platforms") endif() + set(USE_WINSSL ON) +endif() + +set(USE_MBEDTLS OFF) +if("mbedtls" IN_LIST FEATURES) + set(USE_MBEDTLS ON) endif() # SSH @@ -70,7 +72,7 @@ endif() vcpkg_find_acquire_program(PERL) get_filename_component(PERL_PATH ${PERL} DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PERL_PATH}") +vcpkg_add_to_path(${PERL_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -84,6 +86,7 @@ vcpkg_configure_cmake( -DCURL_STATICLIB=${CURL_STATICLIB} -DCMAKE_USE_OPENSSL=${USE_OPENSSL} -DCMAKE_USE_WINSSL=${USE_WINSSL} + -DCMAKE_USE_MBEDTLS=${USE_MBEDTLS} -DCMAKE_USE_LIBSSH2=${USE_LIBSSH2} -DHTTP_ONLY=${USE_HTTP_ONLY} OPTIONS_RELEASE @@ -120,6 +123,8 @@ else() file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/curl-config ${CURRENT_PACKAGES_DIR}/debug/bin/curl-config) if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/libcurl_imp.lib") file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libcurl_imp.lib ${CURRENT_PACKAGES_DIR}/lib/libcurl.lib) + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/libcurl-d_imp.lib") file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl-d_imp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl.lib) endif() endif() @@ -138,3 +143,5 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/include/curl/curl.h "${CURL_H}") vcpkg_copy_pdbs() file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +vcpkg_test_cmake(PACKAGE_NAME CURL MODULE) diff --git a/ports/cutelyst2/CONTROL b/ports/cutelyst2/CONTROL new file mode 100644 index 00000000000..888883a447b --- /dev/null +++ b/ports/cutelyst2/CONTROL @@ -0,0 +1,4 @@ +Source: cutelyst2 +Version: 2.5.2-1 +Description: A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework +Build-Depends: qt5-base diff --git a/ports/cutelyst2/portfile.cmake b/ports/cutelyst2/portfile.cmake new file mode 100644 index 00000000000..118129e27c5 --- /dev/null +++ b/ports/cutelyst2/portfile.cmake @@ -0,0 +1,48 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cutelyst/cutelyst + REF 7f594d2b2d227e9e6a0474a55906db7d1ee1cd7e + SHA512 de04efd7bd9b07f7b0dd2b014eed93e26f0760ef8e458f8c56dc655977235f237bbc71cfe1c05d6791c2237073497ca4566548327ad01b99b4dbec7c491542c7 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS:BOOL=OFF +) + +vcpkg_install_cmake() + +# Move CMake config files to the right place +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Cutelyst2Qt5 TARGET_PATH share/cutelyst2qt5) + +file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/cutelyst2 ${CURRENT_PACKAGES_DIR}/bin/cutelyst2-wsgi ${CURRENT_PACKAGES_DIR}/bin/cutelyst2.exe ${CURRENT_PACKAGES_DIR}/bin/cutelyst-wsgi2.exe) +file(GLOB DEBUG_EXES ${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst2 ${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst2-wsgi ${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst2.exe ${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst-wsgi2.exe) +if(EXES OR DEBUG_EXES) + file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/cutelyst2) + file(REMOVE ${EXES} ${DEBUG_EXES}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/cutelyst2) +endif() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cutelyst2-plugins/ActionREST.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cutelyst2-plugins ${CURRENT_PACKAGES_DIR}/bin/cutelyst2-plugins) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cutelyst2-plugins/ActionREST.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cutelyst2-plugins ${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst2-plugins) +endif() + +file(GLOB BINS ${CURRENT_PACKAGES_DIR}/bin/* ${CURRENT_PACKAGES_DIR}/debug/bin/*) +if(NOT BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/cutelyst2/copyright COPYONLY) + +vcpkg_copy_pdbs() diff --git a/ports/cxxopts/CONTROL b/ports/cxxopts/CONTROL index e1f571b111b..6b3928ce18d 100644 --- a/ports/cxxopts/CONTROL +++ b/ports/cxxopts/CONTROL @@ -1,3 +1,3 @@ Source: cxxopts -Version: 1.3.0 +Version: 2.1.1 Description: This is a lightweight C++ option parser library, supporting the standard GNU style syntax for options diff --git a/ports/cxxopts/portfile.cmake b/ports/cxxopts/portfile.cmake index c45da3a0560..0710eb09bd5 100644 --- a/ports/cxxopts/portfile.cmake +++ b/ports/cxxopts/portfile.cmake @@ -2,10 +2,22 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO jarro2783/cxxopts - REF v1.3.0 - SHA512 0c02716cdc1ca83f64c3757685042580e06c894ac51986a8df971ed30b8dd6d49448f2c9f61fff947fb34c48055f11cac446b54a9294bc880d78d91081c379b4 + REF v2.1.1 + SHA512 1da6ed65c3e0ee3e0beb39a5d0bccf6e32f44bbb37f8e849ada1421f03630981e4ede6d9966284bb642af6e75c71a1c9f7c9262ba9578d183d4514c011cbfa8e HEAD_REF master ) -file(INSTALL ${SOURCE_PATH}/include/cxxopts.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCXXOPTS_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cxxopts TARGET_PATH share/cxxopts) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cxxopts RENAME copyright) -vcpkg_copy_pdbs() diff --git a/ports/darts-clone/CMakeLists.txt b/ports/darts-clone/CMakeLists.txt new file mode 100644 index 00000000000..024cd2f74d5 --- /dev/null +++ b/ports/darts-clone/CMakeLists.txt @@ -0,0 +1,29 @@ +cmake_minimum_required(VERSION 3.8) +project(darts) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +add_library(darts src/darts.cc) + +target_include_directories(darts + PUBLIC + $ + $ + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/src +) + +install( + TARGETS darts + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + DIRECTORY include/ DESTINATION include/ + ) +endif() diff --git a/ports/darts-clone/CONTROL b/ports/darts-clone/CONTROL new file mode 100644 index 00000000000..2d34f86c702 --- /dev/null +++ b/ports/darts-clone/CONTROL @@ -0,0 +1,3 @@ +Source: darts-clone +Version: 1767ab87cffe +Description: A static double-array trie structure diff --git a/ports/darts-clone/portfile.cmake b/ports/darts-clone/portfile.cmake new file mode 100644 index 00000000000..2979e83b5ea --- /dev/null +++ b/ports/darts-clone/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) +vcpkg_check_linkage( + ONLY_STATIC_LIBRARY +) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO s-yata/darts-clone + REF 1767ab87cffe7302856d1bb41e1c21b1df93f19e + SHA512 63112a4d8d6302d2602a8f161bf5fe5ec1b5b3b3097de9b28331f5261d76c06efb48601c08df26f242ddc881b917928baf54f24ccebac65da29e94380b6db0f5 + 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}/COPYING.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/darts-clone RENAME copyright) diff --git a/ports/dcmtk/CONTROL b/ports/dcmtk/CONTROL new file mode 100644 index 00000000000..2ef092ebad1 --- /dev/null +++ b/ports/dcmtk/CONTROL @@ -0,0 +1,3 @@ +Source: dcmtk +Version: 3.6.3 +Description: This DICOM ToolKit (DCMTK) package consists of source code, documentation and installation instructions for a set of software libraries and applications implementing part of the DICOM/MEDICOM Standard. diff --git a/ports/dcmtk/dcmtk.patch b/ports/dcmtk/dcmtk.patch new file mode 100644 index 00000000000..c25a8db7b58 --- /dev/null +++ b/ports/dcmtk/dcmtk.patch @@ -0,0 +1,15 @@ +diff --git "a/CMake/dcmtkPrepare.cmake" "b/CMake/dcmtkPrepare.cmake" +--- a/CMake/dcmtkPrepare.cmake 2018-02-05 12:58:13.000000000 -0500 ++++ b/CMake/dcmtkPrepare.cmake 2018-04-25 15:07:12.927851000 -0400 +@@ -192,9 +192,9 @@ + # CMake's files (DCMTKTarget.cmake, DCMTKConfigVersion.cmake and DCMTKConfig.cmake) are installed + # to different installation paths under Unix- and Windows-based systems + IF(UNIX) +- SET(DCMTK_INSTALL_CMKDIR "${CMAKE_INSTALL_LIBDIR}/cmake/dcmtk") ++ SET(DCMTK_INSTALL_CMKDIR "share/dcmtk") + ELSEIF(WIN32) +- SET(DCMTK_INSTALL_CMKDIR "cmake") ++ SET(DCMTK_INSTALL_CMKDIR "share/dcmtk") + ENDIF(UNIX) + + #----------------------------------------------------------------------------- diff --git a/ports/dcmtk/portfile.cmake b/ports/dcmtk/portfile.cmake new file mode 100644 index 00000000000..f93c3f40833 --- /dev/null +++ b/ports/dcmtk/portfile.cmake @@ -0,0 +1,49 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("DCMTK only supports static library linkage") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO DCMTK/dcmtk + REF DCMTK-3.6.3 + SHA512 5863d0c05f046075b998bced7c8c71bf8e969dd366f26d48cdf26012ea744ae4a22784a5c3c12e12b0f188e997c93a6890ef0c3c336865ea93f13c45f70b258d + HEAD_REF master + PATCHES ${CMAKE_CURRENT_LIST_DIR}/dcmtk.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDCMTK_WITH_DOXYGEN=OFF + -DDCMTK_WITH_ZLIB=OFF + -DDCMTK_WITH_OPENSSL=OFF + -DDCMTK_WITH_PNG=OFF + -DDCMTK_WITH_TIFF=OFF + -DDCMTK_WITH_XML=OFF + -DDCMTK_WITH_ICONV=OFF + -DDCMTK_FORCE_FPIC_ON_UNIX=ON + -DDCMTK_OVERWRITE_WIN32_COMPILER_FLAGS=OFF + -DDCMTK_ENABLE_BUILTIN_DICTIONARY=ON + -DDCMTK_ENABLE_PRIVATE_TAGS=ON + -DBUILD_APPS=OFF + -DDCMTK_ENABLE_CXX11=ON + -DCMAKE_DEBUG_POSTFIX="d" + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF + -DINSTALL_OTHER=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/dcmtk RENAME copyright) diff --git a/ports/devil/0001_fix-encoding.patch b/ports/devil/0001_fix-encoding.patch index 395171e7132..59d826d25be 100644 --- a/ports/devil/0001_fix-encoding.patch +++ b/ports/devil/0001_fix-encoding.patch @@ -1,7 +1,7 @@ -diff --git a/src-ILU/include/ilu_error/ilu_err-french.h b/src-ILU/include/ilu_error/ilu_err-french.h +diff --git a/DevIL/src-ILU/include/ilu_error/ilu_err-french.h b/DevIL/src-ILU/include/ilu_error/ilu_err-french.h index d3b280d..445440e 100644 ---- a/src-ILU/include/ilu_error/ilu_err-french.h -+++ b/src-ILU/include/ilu_error/ilu_err-french.h +--- a/DevIL/src-ILU/include/ilu_error/ilu_err-french.h ++++ b/DevIL/src-ILU/include/ilu_error/ilu_err-french.h @@ -17,19 +17,19 @@ #include "ilu_internal.h" @@ -41,10 +41,10 @@ index d3b280d..445440e 100644 IL_TEXT("jpeg : erreur dans la librairie"), IL_TEXT("png : erreur dans la librairie"), IL_TEXT("tiff : erreur dans la librairie"), -diff --git a/src-ILU/include/ilu_error/ilu_err-german.h b/src-ILU/include/ilu_error/ilu_err-german.h +diff --git a/DevIL/src-ILU/include/ilu_error/ilu_err-german.h b/DevIL/src-ILU/include/ilu_error/ilu_err-german.h index bf3f05c..acdbe8a 100644 ---- a/src-ILU/include/ilu_error/ilu_err-german.h -+++ b/src-ILU/include/ilu_error/ilu_err-german.h +--- a/DevIL/src-ILU/include/ilu_error/ilu_err-german.h ++++ b/DevIL/src-ILU/include/ilu_error/ilu_err-german.h @@ -6,7 +6,7 @@ // // Filename: src-ILU/include/ilu_error/ilu_err_German.h @@ -91,10 +91,10 @@ index bf3f05c..acdbe8a 100644 IL_TEXT("Fehler beim Lesen der Datei") }; -diff --git a/src-ILU/include/ilu_error/ilu_err-italian.h b/src-ILU/include/ilu_error/ilu_err-italian.h +diff --git a/DevIL/src-ILU/include/ilu_error/ilu_err-italian.h b/DevIL/src-ILU/include/ilu_error/ilu_err-italian.h index 09d7bd1..d34b23f 100644 ---- a/src-ILU/include/ilu_error/ilu_err-italian.h -+++ b/src-ILU/include/ilu_error/ilu_err-italian.h +--- a/DevIL/src-ILU/include/ilu_error/ilu_err-italian.h ++++ b/DevIL/src-ILU/include/ilu_error/ilu_err-italian.h @@ -22,13 +22,13 @@ ILconst_string iluErrorStringsItalian[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] IL_TEXT("configuri non sostenne"), IL_TEXT("erreur interne"), @@ -112,10 +112,10 @@ index 09d7bd1..d34b23f 100644 IL_TEXT("equivalente fuori-configuri"), IL_TEXT("inondi di batteria"), IL_TEXT("insufficienza di batteria"), -diff --git a/src-ILU/include/ilu_error/ilu_err-spanish.h b/src-ILU/include/ilu_error/ilu_err-spanish.h +diff --git a/DevIL/src-ILU/include/ilu_error/ilu_err-spanish.h b/DevIL/src-ILU/include/ilu_error/ilu_err-spanish.h index 77b5a24..0945fdf 100644 ---- a/src-ILU/include/ilu_error/ilu_err-spanish.h -+++ b/src-ILU/include/ilu_error/ilu_err-spanish.h +--- a/DevIL/src-ILU/include/ilu_error/ilu_err-spanish.h ++++ b/DevIL/src-ILU/include/ilu_error/ilu_err-spanish.h @@ -6,7 +6,7 @@ // // Filename: src-ILU/include/ilu_error/ilu_err-spanish.h diff --git a/ports/devil/0002_fix-missing-mfc-includes.patch b/ports/devil/0002_fix-missing-mfc-includes.patch index 755d0d867a3..3b18981cea4 100644 --- a/ports/devil/0002_fix-missing-mfc-includes.patch +++ b/ports/devil/0002_fix-missing-mfc-includes.patch @@ -1,7 +1,7 @@ -diff --git a/src-IL/msvc/IL Unicode.rc b/src-IL/msvc/IL Unicode.rc +diff --git a/DevIL/src-IL/msvc/IL Unicode.rc b/DevIL/src-IL/msvc/IL Unicode.rc index 346758f..298a207 100644 ---- a/src-IL/msvc/IL Unicode.rc -+++ b/src-IL/msvc/IL Unicode.rc +--- a/DevIL/src-IL/msvc/IL Unicode.rc ++++ b/DevIL/src-IL/msvc/IL Unicode.rc @@ -7,7 +7,11 @@ // // Generated from the TEXTINCLUDE 2 resource. @@ -15,10 +15,10 @@ index 346758f..298a207 100644 ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS -diff --git a/src-IL/msvc/IL.rc b/src-IL/msvc/IL.rc +diff --git a/DevIL/src-IL/msvc/IL.rc b/DevIL/src-IL/msvc/IL.rc index 8bfadf9..0b8289f 100644 ---- a/src-IL/msvc/IL.rc -+++ b/src-IL/msvc/IL.rc +--- a/DevIL/src-IL/msvc/IL.rc ++++ b/DevIL/src-IL/msvc/IL.rc @@ -7,10 +7,13 @@ // // Generated from the TEXTINCLUDE 2 resource. @@ -35,10 +35,10 @@ index 8bfadf9..0b8289f 100644 ///////////////////////////////////////////////////////////////////////////// // English (United States) resources -diff --git a/src-IL/msvc8/IL Unicode.rc b/src-IL/msvc8/IL Unicode.rc +diff --git a/DevIL/src-IL/msvc8/IL Unicode.rc b/DevIL/src-IL/msvc8/IL Unicode.rc index 026ee49..66ca4bf 100644 ---- a/src-IL/msvc8/IL Unicode.rc -+++ b/src-IL/msvc8/IL Unicode.rc +--- a/DevIL/src-IL/msvc8/IL Unicode.rc ++++ b/DevIL/src-IL/msvc8/IL Unicode.rc @@ -7,7 +7,10 @@ // // Generated from the TEXTINCLUDE 2 resource. @@ -51,10 +51,10 @@ index 026ee49..66ca4bf 100644 ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS -diff --git a/src-IL/msvc8/IL.rc b/src-IL/msvc8/IL.rc +diff --git a/DevIL/src-IL/msvc8/IL.rc b/DevIL/src-IL/msvc8/IL.rc index 9301d41..3ad52c0 100644 ---- a/src-IL/msvc8/IL.rc -+++ b/src-IL/msvc8/IL.rc +--- a/DevIL/src-IL/msvc8/IL.rc ++++ b/DevIL/src-IL/msvc8/IL.rc @@ -7,7 +7,10 @@ // // Generated from the TEXTINCLUDE 2 resource. @@ -67,10 +67,10 @@ index 9301d41..3ad52c0 100644 ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS -diff --git a/src-IL/msvc9/IL Unicode.rc b/src-IL/msvc9/IL Unicode.rc +diff --git a/DevIL/src-IL/msvc9/IL Unicode.rc b/DevIL/src-IL/msvc9/IL Unicode.rc index d0dff4f..c9cf51f 100644 ---- a/src-IL/msvc9/IL Unicode.rc -+++ b/src-IL/msvc9/IL Unicode.rc +--- a/DevIL/src-IL/msvc9/IL Unicode.rc ++++ b/DevIL/src-IL/msvc9/IL Unicode.rc @@ -7,7 +7,10 @@ // // Generated from the TEXTINCLUDE 2 resource. @@ -83,10 +83,10 @@ index d0dff4f..c9cf51f 100644 ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS -diff --git a/src-IL/msvc9/IL.rc b/src-IL/msvc9/IL.rc +diff --git a/DevIL/src-IL/msvc9/IL.rc b/DevIL/src-IL/msvc9/IL.rc index 9f5c795..6b8c891 100644 ---- a/src-IL/msvc9/IL.rc -+++ b/src-IL/msvc9/IL.rc +--- a/DevIL/src-IL/msvc9/IL.rc ++++ b/DevIL/src-IL/msvc9/IL.rc @@ -7,7 +7,10 @@ // // Generated from the TEXTINCLUDE 2 resource. diff --git a/ports/devil/CONTROL b/ports/devil/CONTROL index cddc9922284..18d263348a7 100644 --- a/ports/devil/CONTROL +++ b/ports/devil/CONTROL @@ -1,5 +1,5 @@ Source: devil -Version: 1.8.0-2 +Version: 1.8.0-3 Build-Depends: Description: A full featured cross-platform image library Default-Features: libpng, tiff, libjpeg, openexr, jasper, lcms diff --git a/ports/devil/enable-static.patch b/ports/devil/enable-static.patch index bf0cb618a4f..8d77c0d5eb7 100644 --- a/ports/devil/enable-static.patch +++ b/ports/devil/enable-static.patch @@ -1,7 +1,7 @@ -diff --git a/devil/src-ILU/CMakeLists.txt b/devil/src-ILU/CMakeLists.txt +diff --git a/DevIL/src-ILU/CMakeLists.txt b/DevIL/src-ILU/CMakeLists.txt index 17a3afe..a46ab41 100644 ---- a/devil/src-ILU/CMakeLists.txt -+++ b/devil/src-ILU/CMakeLists.txt +--- a/DevIL/src-ILU/CMakeLists.txt ++++ b/DevIL/src-ILU/CMakeLists.txt @@ -43,7 +43,7 @@ source_group("Header Files" FILES ${ILU_INC} ) source_group("Resource Files" FILES ${ILU_RSRC} ) @@ -11,10 +11,10 @@ index 17a3afe..a46ab41 100644 ## ILU requires IL -diff --git a/devil/src-ILUT/CMakeLists.txt b/devil/src-ILUT/CMakeLists.txt +diff --git a/DevIL/src-ILUT/CMakeLists.txt b/DevIL/src-ILUT/CMakeLists.txt index 21470cb..398d3c1 100644 ---- a/devil/src-ILUT/CMakeLists.txt -+++ b/devil/src-ILUT/CMakeLists.txt +--- a/DevIL/src-ILUT/CMakeLists.txt ++++ b/DevIL/src-ILUT/CMakeLists.txt @@ -43,7 +43,7 @@ source_group("Header Files" FILES ${ILUT_INC} ) source_group("Resource Files" FILES ${ILUT_RSRC} ) diff --git a/ports/devil/portfile.cmake b/ports/devil/portfile.cmake index 27e8d0eb0aa..ff4e7ee0c0d 100644 --- a/ports/devil/portfile.cmake +++ b/ports/devil/portfile.cmake @@ -1,21 +1,15 @@ include(vcpkg_common_functions) -set(DEVIL_VERSION 1.8.0) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO DentonW/DevIL - REF v${DEVIL_VERSION} + REF v1.8.0 SHA512 4aed5e50a730ece8b1eb6b2f6204374c6fb6f5334cf7c880d84c0f79645ea7c6b5118f57a7868a487510fc59c452f51472b272215d4c852f265f58b5857e17c7 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH}/DevIL PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001_fix-encoding.patch - ${CMAKE_CURRENT_LIST_DIR}/0002_fix-missing-mfc-includes.patch - ${CMAKE_CURRENT_LIST_DIR}/enable-static.patch + 0001_fix-encoding.patch + 0002_fix-missing-mfc-includes.patch + enable-static.patch ) set(IL_NO_PNG 1) @@ -24,7 +18,7 @@ if("libpng" IN_LIST FEATURES) endif() set(IL_NO_TIF 1) -if("libtiff" IN_LIST FEATURES) +if("tiff" IN_LIST FEATURES) set(IL_NO_TIF 0) endif() diff --git a/ports/dimcli/CONTROL b/ports/dimcli/CONTROL index c8b8c56e2dd..b1526996e82 100644 --- a/ports/dimcli/CONTROL +++ b/ports/dimcli/CONTROL @@ -1,3 +1,3 @@ Source: dimcli -Version: 3.1.1-1 +Version: 4.0.1-1 Description: C++ command line parser toolkit diff --git a/ports/dimcli/portfile.cmake b/ports/dimcli/portfile.cmake index 3c4eb912ccc..f66120c5efa 100644 --- a/ports/dimcli/portfile.cmake +++ b/ports/dimcli/portfile.cmake @@ -3,17 +3,21 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gknowles/dimcli - REF v3.1.1 - SHA512 ed9aeedc59a9d48c59aa8dd1adb9cb110771c1eab0bbab8f8b518e12a45cdafb0ea94301d082ed3a033ca2428c19c8d990c76f666d1e9822cddf6e744f1db701 + REF v4.0.1 + SHA512 e36008eed42997c467ef7f4780cacd7eb8acebeb48be56445914c0ae125c5dbf29a172e1fb2f9490a6f21db8f6de5fa0420f499aff996ee148ec3a5bef0adba5 HEAD_REF master ) set(staticCrt OFF) -if(VCPKG_CRT_LINKAGE STREQUAL static) +if(VCPKG_CRT_LINKAGE STREQUAL "static") set(staticCrt ON) endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DLINK_STATIC_RUNTIME:BOOL=${staticCrt} -DINSTALL_LIBS:BOOL=ON + OPTIONS + -DLINK_STATIC_RUNTIME:BOOL=${staticCrt} + -DINSTALL_LIBS:BOOL=ON + -DBUILD_PROJECT_NAME=dimcli ) vcpkg_install_cmake() @@ -22,6 +26,8 @@ vcpkg_install_cmake() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") # Handle copyright -file(INSTALL "${SOURCE_PATH}/LICENSE" +file( + INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/dimcli" - RENAME copyright) + RENAME copyright +) diff --git a/ports/directxmesh/CONTROL b/ports/directxmesh/CONTROL index 41b26ef1ada..728f61b5f8e 100644 --- a/ports/directxmesh/CONTROL +++ b/ports/directxmesh/CONTROL @@ -1,3 +1,3 @@ Source: directxmesh -Version: feb2018-eb751e0b631b05aa25c36c08e7d6bbf09f5e94a9 +Version: oct2018 Description: DirectXMesh geometry processing library \ No newline at end of file diff --git a/ports/directxmesh/portfile.cmake b/ports/directxmesh/portfile.cmake index 6d64d36582e..81adb18b6a6 100644 --- a/ports/directxmesh/portfile.cmake +++ b/ports/directxmesh/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXMesh - REF eb751e0b631b05aa25c36c08e7d6bbf09f5e94a9 - SHA512 35a6be07fbdf5d9a39e7f5a3716057d09643d0c4bb43d39beae4233ca6941d2e2318b826dcc4a385dfa512675c7e28f320067b88bb325943b6532c8e65ebcd1b + REF oct2018 + SHA512 eb96fa3104932650bff3b051005e84f1eb52c135085ec1f4f56b7bbd99300ca600721cd18c3a9c8d4334e3280369df7d1d92ab6556fc82c72e1a54d04853331a HEAD_REF master ) diff --git a/ports/directxtex/CONTROL b/ports/directxtex/CONTROL index 8d47b6302bb..05edc223881 100644 --- a/ports/directxtex/CONTROL +++ b/ports/directxtex/CONTROL @@ -1,3 +1,3 @@ Source: directxtex -Version: feb2018b +Version: oct2018 Description: DirectXTex texture processing library \ No newline at end of file diff --git a/ports/directxtex/portfile.cmake b/ports/directxtex/portfile.cmake index ec466e0d6a5..a5d6deca518 100644 --- a/ports/directxtex/portfile.cmake +++ b/ports/directxtex/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXTex - REF feb2018b - SHA512 7ab88ea863947ec279c9c83bd6dd48e15345430c750c7215c22998661fad1a711f207c57227bc5cc3cddfb5e0a89a8971d7ef3319057636e2b6f3e2e607ea0cb + REF oct2018 + SHA512 6bb395c92ca60af03fb3b86dd64542feb0a633b49386a438d0e73f108a4af60913bd695a1c90069eeb83df4ec49289e1a8ae3ac131ddca372eb6dd20d14590d7 HEAD_REF master ) diff --git a/ports/directxtk/CONTROL b/ports/directxtk/CONTROL index 1861befc163..100f7f99a73 100644 --- a/ports/directxtk/CONTROL +++ b/ports/directxtk/CONTROL @@ -1,3 +1,3 @@ Source: directxtk -Version: feb2018 +Version: oct2018b Description: A collection of helper classes for writing DirectX 11.x code in C++. diff --git a/ports/directxtk/portfile.cmake b/ports/directxtk/portfile.cmake index 18ff4721806..2e6267bad3c 100644 --- a/ports/directxtk/portfile.cmake +++ b/ports/directxtk/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXTK - REF feb2018 - SHA512 0f123f6fa26bf5aebd0d0b3139f655369726581c25eec24d804eebf5dc34b3e45476e8a1679bf1a294b011bf32e19c5e2a63a385ecb8774dfacee3e8833c5b9e + REF oct2018b + SHA512 d9eb0d0537dd6638bfe089bbaa77ad4c4065d43c53143686e60b8c62814f1c7a0fc9a0361a418b1f0fa0881faa14c92c604fffb6670dd8c1260e67d56fea9bab HEAD_REF master ) diff --git a/ports/discord-rpc/CONTROL b/ports/discord-rpc/CONTROL index 2e6f4468856..b6af1dc984e 100644 --- a/ports/discord-rpc/CONTROL +++ b/ports/discord-rpc/CONTROL @@ -1,3 +1,4 @@ Source: discord-rpc -Version: 3.2.0 +Version: 3.3.0-2 Description: Rich Presence allows you to leverage the totally overhauled "Now Playing" section in a Discord user's profile to help people play your game together. +Build-Depends: rapidjson diff --git a/ports/discord-rpc/disable-downloading.patch b/ports/discord-rpc/disable-downloading.patch new file mode 100644 index 00000000000..bb85049608e --- /dev/null +++ b/ports/discord-rpc/disable-downloading.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5dad9e9..961f02d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,6 +12,7 @@ file(GLOB_RECURSE ALL_SOURCE_FILES + src/*.cpp src/*.h src/*.c + ) + ++if(0) + # Set CLANG_FORMAT_SUFFIX if you are using custom clang-format, e.g. clang-format-5.0 + find_program(CLANG_FORMAT_CMD clang-format${CLANG_FORMAT_SUFFIX}) + +@@ -43,7 +44,7 @@ if (NOT RAPIDJSONTEST) + ) + file(REMOVE ${RJ_TAR_FILE}) + endif(NOT RAPIDJSONTEST) +- ++endif() + find_file(RAPIDJSON NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH) + + add_library(rapidjson STATIC IMPORTED ${RAPIDJSON}) diff --git a/ports/discord-rpc/portfile.cmake b/ports/discord-rpc/portfile.cmake index 8e4e090b10b..1dd6d300106 100644 --- a/ports/discord-rpc/portfile.cmake +++ b/ports/discord-rpc/portfile.cmake @@ -3,31 +3,31 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO discordapp/discord-rpc - REF v3.2.0 - SHA512 83a32db240f30f4429c145dd400eba5b9985ea779e492ffa2be2ba2664d97e4dec1f4416ad0f3e6fc908c3c9b30aebe4a8e293e0ef3c60e01fc6f16b5f9a7c16 + REF v3.3.0 + SHA512 8bb2674edefabf75670ceca29364d69e2002152bff9fe55757f4cda03544b4d827ff33595d98e6d8acdc73ca61cef8ab8054ad0a1ffc905cb26496068b15025f HEAD_REF master + PATCHES disable-downloading.patch ) -set(STATIC_CRT OFF) -if(VCPKG_CRT_LINKAGE STREQUAL static) - set(STATIC_CRT ON) -endif() +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT) +file(REMOVE_RECURSE ${SOURCE_PATH}/thirdparty) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DUSE_STATIC_CRT=${STATIC_CRT} + PREFER_NINJA + OPTIONS + -DUSE_STATIC_CRT=${STATIC_CRT} + -DBUILD_EXAMPLES=OFF + -DRAPIDJSONTEST=TRUE + -DRAPIDJSON=${CURRENT_INSTALLED_DIR} ) +if(EXISTS ${SOURCE_PATH}/thirdparty) + message(FATAL_ERROR "The source directory should not be modified during the build.") +endif() + vcpkg_install_cmake() -# Remove bin and debug include -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/debug/bin) -else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/send-presence.exe - ${CURRENT_PACKAGES_DIR}/debug/bin/send-presence.exe) -endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Copy copright information diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL index c4d5fe905dc..4e726c6625d 100644 --- a/ports/dlib/CONTROL +++ b/ports/dlib/CONTROL @@ -1,5 +1,5 @@ Source: dlib -Version: 19.10-1 +Version: 19.16 Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3, openblas, clapack Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index da77c9374c1..f6cdf4eeb66 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO davisking/dlib - REF v19.10 - SHA512 88c5b41c12219e6166c6621b654b3869ca4a2af777a8fa55429b833b90b048e3e74ea7ad752d7440809b8171bbd38090cb24a29770391fc3a9d53f9a5fba3341 + REF v19.16 + SHA512 4e040ef88acff05e1a48e499b813c876b22ad3f989d076bdf19969d01036b62e51a0dff30b70046910ba31dfa1b1c2450a7fad41ae3142b7285ed74b8d584887 HEAD_REF master ) @@ -62,13 +62,15 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_ne file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cudnn) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cuda) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cpp11) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_avx) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_sse4) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/external/libpng/arm) # Dlib encodes debug/release in its config.h. Patch it to respond to the NDEBUG macro instead. file(READ ${CURRENT_PACKAGES_DIR}/include/dlib/config.h _contents) string(REPLACE "/* #undef ENABLE_ASSERTS */" "#if defined(_DEBUG)\n#define ENABLE_ASSERTS\n#endif" _contents ${_contents}) string(REPLACE "#define DLIB_DISABLE_ASSERTS" "#if !defined(_DEBUG)\n#define DLIB_DISABLE_ASSERTS\n#endif" _contents ${_contents}) -file(WRITE ${CURRENT_PACKAGES_DIR}/include/dlib/config.h ${_contents}) +file(WRITE ${CURRENT_PACKAGES_DIR}/include/dlib/config.h "${_contents}") file(READ ${CURRENT_PACKAGES_DIR}/share/dlib/dlib.cmake _contents) string(REPLACE diff --git a/ports/docopt/001-fix-unresolved-symbol.patch b/ports/docopt/001-fix-unresolved-symbol.patch new file mode 100644 index 00000000000..3078fa44c11 --- /dev/null +++ b/ports/docopt/001-fix-unresolved-symbol.patch @@ -0,0 +1,28 @@ +diff --git a/docopt.h b/docopt.h +index 4c40741..06a04f8 100644 +--- a/docopt.h ++++ b/docopt.h +@@ -85,6 +85,9 @@ namespace docopt { + bool help = true, + std::string const& version = {}, + bool options_first = false) noexcept; ++ ++ /// Write out the contents to the ostream ++ std::ostream DOCOPT_API & operator<<(std::ostream&, value const&); + } + + #ifdef DOCOPT_HEADER_ONLY +diff --git a/docopt_value.h b/docopt_value.h +index a923219..7f0d6d6 100644 +--- a/docopt_value.h ++++ b/docopt_value.h +@@ -102,9 +102,6 @@ namespace docopt { + Kind kind = Kind::Empty; + Variant variant {}; + }; +- +- /// Write out the contents to the ostream +- std::ostream& operator<<(std::ostream&, value const&); + } + + namespace std { diff --git a/ports/docopt/002-fix-install-path.patch b/ports/docopt/002-fix-install-path.patch new file mode 100644 index 00000000000..332e6e4c24d --- /dev/null +++ b/ports/docopt/002-fix-install-path.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1aba5ae..5407e4a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -113,7 +113,10 @@ endif() + set(export_name "docopt-targets") + + # Runtime package +-install(TARGETS docopt EXPORT ${export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++install(TARGETS docopt EXPORT ${export_name} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + # Development package + install(TARGETS docopt_s EXPORT ${export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/ports/docopt/CONTROL b/ports/docopt/CONTROL new file mode 100644 index 00000000000..0fc6d09c8d0 --- /dev/null +++ b/ports/docopt/CONTROL @@ -0,0 +1,3 @@ +Source: docopt +Version: 2018-04-16-2 +Description: Command line arguments parser that will make you smile (C++11 port). diff --git a/ports/docopt/install-one-flavor.patch b/ports/docopt/install-one-flavor.patch new file mode 100644 index 00000000000..f6cda826a7e --- /dev/null +++ b/ports/docopt/install-one-flavor.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bff867c..cc7d706 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -113,13 +113,15 @@ endif() + set(export_name "docopt-targets") + + # Runtime package ++if(BUILD_SHARED_LIBS) + install(TARGETS docopt EXPORT ${export_name} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +- ++else() + # Development package + install(TARGETS docopt_s EXPORT ${export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++endif() + install(FILES ${docopt_HEADERS} DESTINATION include/docopt) + + # CMake Package diff --git a/ports/docopt/portfile.cmake b/ports/docopt/portfile.cmake new file mode 100644 index 00000000000..5076bf742b0 --- /dev/null +++ b/ports/docopt/portfile.cmake @@ -0,0 +1,46 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO docopt/docopt.cpp + REF 4f491249e6def236937dbfac7602852e7d99aff8 + SHA512 d3a61f8d8a8c11723064f3405f03eb838a2ac9aa574f86771b1db89a2dd81996b639215fe5d4465343b893bf71502da178c7af8d883c112c1e45f43c17d473b7 + HEAD_REF master + PATCHES + 001-fix-unresolved-symbol.patch + 002-fix-install-path.patch + install-one-flavor.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWITH_EXAMPLE=OFF + -DWITH_TESTS=OFF + -DUSE_BOOST_REGEX=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/docopt) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(READ ${CURRENT_PACKAGES_DIR}/include/docopt/docopt.h _contents) + string(REPLACE "#ifdef DOCOPT_DLL" "#if 1" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/docopt/docopt.h "${_contents}") +endif() + +# Header-only style when DOCOPT_HEADER_ONLY is defined +file(COPY + ${SOURCE_PATH}/docopt.cpp + DESTINATION ${CURRENT_PACKAGES_DIR}/include/docopt) + +# Handle copyright +file(INSTALL + ${SOURCE_PATH}/LICENSE-MIT + DESTINATION ${CURRENT_PACKAGES_DIR}/share/docopt RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/doctest/CONTROL b/ports/doctest/CONTROL index b83f7b1afe8..07885a75d0f 100644 --- a/ports/doctest/CONTROL +++ b/ports/doctest/CONTROL @@ -1,3 +1,3 @@ Source: doctest -Version: 1.2.8 +Version: 2.0.1 Description: The fastest feature-rich C++ single-header testing framework for unit tests and TDD diff --git a/ports/doctest/portfile.cmake b/ports/doctest/portfile.cmake index 22e867a6d14..a84d9a21df4 100644 --- a/ports/doctest/portfile.cmake +++ b/ports/doctest/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO onqtam/doctest - REF 1.2.8 - SHA512 4558909c6a846fa8679539a9d44e442d9ce6aae37c807ef34d95648abfabe0a16e4593aef83293e3d03bcf80e0269742ff0b95d54eb434c7a18be136608cd24d + REF 2.0.1 + SHA512 bbd676c8485d9bee4be3f2f6bdd0f72bced09767427533c8de3ea46b298182acaeff64e42683a4283512edd81bb444880b229e65f3296bb4afc8b5b93c03b970 HEAD_REF master ) diff --git a/ports/double-conversion/001-fix-arm.patch b/ports/double-conversion/001-fix-arm.patch deleted file mode 100644 index 98ce2080c10..00000000000 --- a/ports/double-conversion/001-fix-arm.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/double-conversion/utils.h b/double-conversion/utils.h" -index 51d5e61..24cd5f1 100644 ---- a/double-conversion/utils.h -+++ "b/double-conversion/utils.h" -@@ -68,7 +68,7 @@ inline void abort_noreturn() { abort(); } - // disabled.) - // On Linux,x86 89255e-22 != Div_double(89255.0/1e22) - #if defined(_M_X64) || defined(__x86_64__) || \ -- defined(__ARMEL__) || defined(__avr32__) || \ -+ defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || \ - defined(__hppa__) || defined(__ia64__) || \ - defined(__mips__) || \ - defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ diff --git a/ports/double-conversion/CONTROL b/ports/double-conversion/CONTROL index fb0afdb9a5c..a80898deb8b 100644 --- a/ports/double-conversion/CONTROL +++ b/ports/double-conversion/CONTROL @@ -1,3 +1,3 @@ Source: double-conversion -Version: 3.0.0-2 +Version: 3.1.0-1 Description: Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles. diff --git a/ports/double-conversion/portfile.cmake b/ports/double-conversion/portfile.cmake index 47f3fba4e33..875b1aa0ac4 100644 --- a/ports/double-conversion/portfile.cmake +++ b/ports/double-conversion/portfile.cmake @@ -3,16 +3,11 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/double-conversion - REF v3.0.0 - SHA512 5057af6e72f2aaace56ebdd9a0ddfa34318cbdfeabec5c361b60e6c92f160c8999c046c50f8c6f8d590eb8e97aa70bb6e97ba8148f0dc95dbc42f204fcdc1abf + REF 3.1.0 + SHA512 ba797a7203bc7eb8ba697dc758a3341578f0405b5ab42fbd5a22d9fac09d11dd8cb5ed9ff9ff369e8ae9397ec74c04c62fca29d1bc469c6d2ea1a84a6dff9188 HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-arm.patch -) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -26,41 +21,10 @@ vcpkg_install_cmake() if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion) vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/double-conversion) endif() -if(NOT VCPKG_USE_HEAD_VERSION) - if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionLibraryDepends-debug.cmake - ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionTargets-debug.cmake) - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends-release.cmake - ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets-release.cmake) - endif() - file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends.cmake - ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake) - - file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake TARGETS_FILE) - string(REPLACE "double-conversionLibraryDepends" "double-conversionTargets" TARGETS_FILE "${TARGETS_FILE}") - file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake "${TARGETS_FILE}") - - # Remove hardcoded paths from config file - file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake CONFIG_FILE) - string(REPLACE "${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion/double-conversionLibraryDepends.cmake" - "\${double-conversion_CMAKE_DIR}/double-conversionTargets.cmake" CONFIG_FILE "${CONFIG_FILE}") - string(REPLACE "${CURRENT_PACKAGES_DIR}" - "\${double-conversion_CMAKE_DIR}/../.." CONFIG_FILE "${CONFIG_FILE}") - file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake "${CONFIG_FILE}") - - vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) - endif() - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -endif() vcpkg_copy_pdbs() -# Include files should not be duplicated into the /debug/include directory. file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/double-conversion) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/double-conversion/LICENSE ${CURRENT_PACKAGES_DIR}/share/double-conversion/copyright) +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/double-conversion/copyright COPYONLY) diff --git a/ports/draco/CONTROL b/ports/draco/CONTROL index 1f380a8046c..faa63303aef 100644 --- a/ports/draco/CONTROL +++ b/ports/draco/CONTROL @@ -1,4 +1,4 @@ Source: draco -Version: 1.2.5 +Version: 1.3.3 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: diff --git a/ports/draco/portfile.cmake b/ports/draco/portfile.cmake index 8080a2e0fcb..853d45e862a 100644 --- a/ports/draco/portfile.cmake +++ b/ports/draco/portfile.cmake @@ -20,8 +20,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/draco - REF 1.2.5 - SHA512 2d3d51b16edf4fd111a6c565c9bcf99adc35372d642c3850a69cc1a9010e3f1c6953e6bfe37088f85c2fb31c27680cc7f2f66ea68399144ad87cf6d490af4789 + REF 1.3.3 + SHA512 80ed5a623046822f5bb26b2454c8ee8cc93ffe9eb3012e8461cefdfc577b26d69a92ea0f0c5e14f5f48c1ef99f9a7263b01710df376792e74358ae14e49c3897 HEAD_REF master ) diff --git a/ports/duktape/portfile.cmake b/ports/duktape/portfile.cmake index e3e84c0de6e..f4aa4f805c4 100644 --- a/ports/duktape/portfile.cmake +++ b/ports/duktape/portfile.cmake @@ -23,9 +23,9 @@ vcpkg_install_cmake() set(DUK_CONFIG_H_PATH "${CURRENT_PACKAGES_DIR}/include/duk_config.h") file(READ ${DUK_CONFIG_H_PATH} CONTENT) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - string(REPLACE "// #undef DUK_F_DLL_BUILD" "#undef DUK_F_DLL_BUILD\n#define DUK_F_DLL_BUILD 1" CONTENT "${CONTENT}") + string(REPLACE "// #undef DUK_F_DLL_BUILD" "#undef DUK_F_DLL_BUILD\n#define DUK_F_DLL_BUILD" CONTENT "${CONTENT}") else() - string(REPLACE "// #undef DUK_F_DLL_BUILD" "#undef DUK_F_DLL_BUILD\n#define DUK_F_DLL_BUILD 0" CONTENT "${CONTENT}") + string(REPLACE "// #undef DUK_F_DLL_BUILD" "#undef DUK_F_DLL_BUILD" CONTENT "${CONTENT}") endif() file(WRITE ${DUK_CONFIG_H_PATH} "${CONTENT}") diff --git a/ports/eastl/CONTROL b/ports/eastl/CONTROL index dbf5fb0f4cf..5674e0345e4 100644 --- a/ports/eastl/CONTROL +++ b/ports/eastl/CONTROL @@ -1,4 +1,4 @@ Source: eastl -Version: 3.09.00 +Version: 3.12.04 Description: Electronic Arts Standard Template Library. It is a C++ template library of containers, algorithms, and iterators useful for runtime and tool development across multiple platforms. It is a fairly extensive and robust implementation of such a library and has an emphasis on high performance above all other considerations. diff --git a/ports/eastl/portfile.cmake b/ports/eastl/portfile.cmake index afe9ed4cff4..c090f0fa863 100644 --- a/ports/eastl/portfile.cmake +++ b/ports/eastl/portfile.cmake @@ -8,8 +8,8 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/eastl) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO electronicarts/EASTL - REF 3.09.00 - SHA512 73b1b6ce0eba65fca049571a44595ff581f0dda01dcaaf3e0deb2d22e62b9b694a321339038c5cc2e6802ba3270675b814b73b59a8cfc8d71e645c60b17bebb6 + REF 3.12.04 + SHA512 99e8fdc5fb589410187f3538b6f491bc6f988babcb29b74be90a938ba6c94ad1b16d55ff62ddcf5ae539c67f473d43a6af581278b8b39d0d8686b0161dd0e5cf HEAD_REF master ) diff --git a/ports/easyloggingpp/CONTROL b/ports/easyloggingpp/CONTROL new file mode 100644 index 00000000000..3f462dfbdd7 --- /dev/null +++ b/ports/easyloggingpp/CONTROL @@ -0,0 +1,3 @@ +Source: easyloggingpp +Version: 9.96.5-1 +Description: Easylogging++ is a single header efficient logging library for C++ applications. \ No newline at end of file diff --git a/ports/easyloggingpp/portfile.cmake b/ports/easyloggingpp/portfile.cmake new file mode 100644 index 00000000000..ecb6787462c --- /dev/null +++ b/ports/easyloggingpp/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO muflihun/easyloggingpp + REF v9.96.5 + SHA512 51493693095df03f8772174a8ec4fc681832319bd723224a544539efdcf73c7653d3973ec0ae0cd004e496bf98c105c278e4a72694ebf34b207c658b3225a87b + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -Dbuild_static_lib=ON +) +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/easyloggingpp RENAME copyright) diff --git a/ports/ecm/CONTROL b/ports/ecm/CONTROL index 147603756be..6076cf71471 100644 --- a/ports/ecm/CONTROL +++ b/ports/ecm/CONTROL @@ -1,3 +1,3 @@ Source: ecm -Version: 5.40.0 +Version: 5.50.0 Description: Extra CMake Modules (ECM), extra modules and scripts for CMake diff --git a/ports/ecm/portfile.cmake b/ports/ecm/portfile.cmake index 56dcdcf7dbd..325a6505ca3 100644 --- a/ports/ecm/portfile.cmake +++ b/ports/ecm/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KDE/extra-cmake-modules - REF v5.40.0 - SHA512 1f79d797770367e79c2c6dd73c125d32fcc5fe404b350d953b69cc6544babc1c73e2986c833635daaac85a5af966977e40fe41c01ac48ccc45d46d2e1636d21f + REF v5.50.0 + SHA512 625f934b97c56cceed44d8fa0e335fb1f593806e52b8bfd2fd467561b4de2528940add756a8e903bd5502e912422cc3835e65e047cc4c205d3b8629452627abd HEAD_REF master ) diff --git a/ports/ecsutil/CONTROL b/ports/ecsutil/CONTROL new file mode 100644 index 00000000000..c96e1b0b8e3 --- /dev/null +++ b/ports/ecsutil/CONTROL @@ -0,0 +1,4 @@ +Source: ecsutil +Version: 1.0.1.4 +Description: Native Windows SDK for accessing ECS via the S3 HTTP protocol. +Build-Depends: atlmfc diff --git a/ports/ecsutil/NoLibSyms.patch b/ports/ecsutil/NoLibSyms.patch new file mode 100644 index 00000000000..e4f7e77bdfc --- /dev/null +++ b/ports/ecsutil/NoLibSyms.patch @@ -0,0 +1,41 @@ + ECSUtil/ECSUtil.vcxproj | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/ECSUtil/ECSUtil.vcxproj b/ECSUtil/ECSUtil.vcxproj +index 05c5726..4b5de57 100644 +--- a/ECSUtil/ECSUtil.vcxproj ++++ b/ECSUtil/ECSUtil.vcxproj +@@ -289,7 +289,7 @@ + true + false + false +- ProgramDatabase ++ None + + + Windows +@@ -317,7 +317,7 @@ + true + false + false +- ProgramDatabase ++ None + + + Windows +@@ -462,6 +462,7 @@ + true + false + false ++ None + + + Windows +@@ -493,6 +494,7 @@ + true + false + false ++ None + + + Windows diff --git a/ports/ecsutil/disable-setversion.patch b/ports/ecsutil/disable-setversion.patch new file mode 100644 index 00000000000..2899a010824 --- /dev/null +++ b/ports/ecsutil/disable-setversion.patch @@ -0,0 +1,36 @@ +diff --git a/ECSUtil/ECSUtil.vcxproj b/ECSUtil/ECSUtil.vcxproj +index 05c5726..f8ac64e 100644 +--- a/ECSUtil/ECSUtil.vcxproj ++++ b/ECSUtil/ECSUtil.vcxproj +@@ -274,7 +274,6 @@ + $(IntDir);%(AdditionalIncludeDirectories) + + +- $(SolutionDir)bin\setversion.exe /getversion "#define ECSUTIL_VERSION" "$(SolutionDir)ECSUtil\Version.h" $(OutDir)ECSUtil.dll + + + set version resource in DLL from source file +@@ -361,7 +360,6 @@ + $(IntDir);%(AdditionalIncludeDirectories) + + +- $(SolutionDir)bin\setversion.exe /getversion "#define ECSUTIL_VERSION" "$(SolutionDir)ECSUtil\Version.h" $(OutDir)ECSUtil.dll + + + set version resource in DLL from source file +@@ -445,7 +443,6 @@ + $(IntDir);%(AdditionalIncludeDirectories) + + +- $(SolutionDir)bin\setversion.exe /getversion "#define ECSUTIL_VERSION" "$(SolutionDir)ECSUtil\Version.h" $(OutDir)ECSUtil.dll + + + set version resource in DLL from source file +@@ -541,7 +538,6 @@ + $(IntDir);%(AdditionalIncludeDirectories) + + +- $(SolutionDir)bin\setversion.exe /getversion "#define ECSUTIL_VERSION" "$(SolutionDir)ECSUtil\Version.h" $(OutDir)ECSUtil.dll + + + set version resource in DLL from source file diff --git a/ports/ecsutil/portfile.cmake b/ports/ecsutil/portfile.cmake new file mode 100644 index 00000000000..0dc5fa8fa25 --- /dev/null +++ b/ports/ecsutil/portfile.cmake @@ -0,0 +1,56 @@ +include(vcpkg_common_functions) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(PLATFORM x86) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(PLATFORM x64) +else() + message(FATAL_ERROR "Unsupported architecture") +endif() + +if(VCPKG_CMAKE_SYSTEM_NAME) + message(FATAL_ERROR "Unsupported platform. ECSUTIL currently only supports windows desktop.") +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(ECSUtil_CONFIGURATION_RELEASE Release) + set(ECSUtil_CONFIGURATION_DEBUG Debug) +else() + if (VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(ECSUtil_CONFIGURATION_RELEASE "Release Lib") + set(ECSUtil_CONFIGURATION_DEBUG "Debug Lib") + else() + set(ECSUtil_CONFIGURATION_RELEASE "Release Lib Static") + set(ECSUtil_CONFIGURATION_DEBUG "Debug Lib Static") + endif() +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO EMCECS/ecs-object-client-windows-cpp + REF v1.0.1.4 + SHA512 796ed227268cd92fce3eba2a842260d552222900b1df1261200032a7678a48776388dd566f408df2ee4dbc0cee39b70090d524a99e6741e0c8f92594d207761a + HEAD_REF master + PATCHES NoLibSyms.patch +) + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH ECSUtil.sln + PLATFORM ${PLATFORM} + LICENSE_SUBPATH license.txt + TARGET ECSUtil + RELEASE_CONFIGURATION ${ECSUtil_CONFIGURATION_RELEASE} + DEBUG_CONFIGURATION ${ECSUtil_CONFIGURATION_DEBUG} +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(COPY ${SOURCE_PATH}/ECSUtil DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/ECSUtil/res ${CURRENT_PACKAGES_DIR}/tools) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/NatvisAddIn.dll ${CURRENT_PACKAGES_DIR}/debug/bin/NatvisAddIn.dll) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() diff --git a/ports/egl-registry/CONTROL b/ports/egl-registry/CONTROL new file mode 100644 index 00000000000..dc7cdec795e --- /dev/null +++ b/ports/egl-registry/CONTROL @@ -0,0 +1,3 @@ +Source: egl-registry +Version: 2018-06-30-1 +Description: the EGL API and Extension Registry diff --git a/ports/egl-registry/portfile.cmake b/ports/egl-registry/portfile.cmake new file mode 100644 index 00000000000..ee6fc23dc80 --- /dev/null +++ b/ports/egl-registry/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/EGL-Registry + REF e2562a9e7f567b837cdf96cf8b12e7fc0d88cc30 + SHA512 8c380c26f6afc0ce2ab2dd2fe834daae0d0dbe9e2bd55ab30c80f8dfa5e234f1902e5735c4d8acf016f03924a46431b9bb794bb77f1f091c56905a98c38f5d04 + HEAD_REF master +) + +file( + COPY + ${SOURCE_PATH}/api/KHR + ${SOURCE_PATH}/api/EGL + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +file( + COPY + ${SOURCE_PATH}/api/egl.xml + DESTINATION ${CURRENT_PACKAGES_DIR}/share/egl-registry +) + +file( + INSTALL ${SOURCE_PATH}/sdk/docs/man/copyright.xml + DESTINATION ${CURRENT_PACKAGES_DIR}/share/egl-registry + RENAME copyright +) diff --git a/ports/eigen3/CONTROL b/ports/eigen3/CONTROL index fe0641a9889..0b048eaa19c 100644 --- a/ports/eigen3/CONTROL +++ b/ports/eigen3/CONTROL @@ -1,3 +1,3 @@ Source: eigen3 -Version: 3.3.4-2 +Version: 3.3.5 Description: C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms. diff --git a/ports/eigen3/portfile.cmake b/ports/eigen3/portfile.cmake index 376e6c10da4..4e32d4e1090 100644 --- a/ports/eigen3/portfile.cmake +++ b/ports/eigen3/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO eigenteam/eigen-git-mirror - REF 3.3.4 - SHA512 da3f96ef65c64031bed5311d4ad95cd668f2facb3439bb1f4ecea10ce7cf881daf9d053567fe4ebb50626ab4dbb975d1f74bd632626c688898a97064f99a8f59 + REF 3.3.5 + SHA512 398d864bb3c12be9b1d7081bac1343d54b1edf65f165be54814794cd8d36c35035340384a97ad203e5295d466445dfbad4225d86748c8d31c322948de9a33a3f HEAD_REF master ) diff --git a/ports/embree2/CONTROL b/ports/embree2/CONTROL new file mode 100644 index 00000000000..f68824e00f1 --- /dev/null +++ b/ports/embree2/CONTROL @@ -0,0 +1,4 @@ +Source: embree2 +Version: 2.16.4-3 +Description: High Performance Ray Tracing Kernels. +Build-Depends: tbb diff --git a/ports/embree/portfile.cmake b/ports/embree2/portfile.cmake similarity index 71% rename from ports/embree/portfile.cmake rename to ports/embree2/portfile.cmake index 8d054d3ab6e..7979891bc87 100644 --- a/ports/embree/portfile.cmake +++ b/ports/embree2/portfile.cmake @@ -1,11 +1,12 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/embree-2.16.4) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/embree/embree/archive/v2.16.4.zip" - FILENAME "embree-2.16.4.zip" - SHA512 d26d31c7866c072d562dd824af02c90a1bc0302a2765fa6101925956f9b61870e45a4f0a54edae87d07a63aa4687f4244e3e5554491729ea31b617e87d02fb11 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO embree/embree + REF v2.16.4 + SHA512 235f7273044c8971eb7f7ecca5f4556d2e75ec958fc10d8861792fdd889a0e1c115bcf45bf6de7c2c44117032af96cd49a252399a2454627dcb82fd943222a01 + HEAD_REF devel2 ) -vcpkg_extract_source_archive(${ARCHIVE}) file(REMOVE ${SOURCE_PATH}/common/cmake/FindTBB.cmake) @@ -42,9 +43,9 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/models) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/models) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/embree) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/doc ${CURRENT_PACKAGES_DIR}/share/embree/doc) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/embree2) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/doc ${CURRENT_PACKAGES_DIR}/share/embree2/doc) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/embree) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/embree/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/embree/copyright) +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/embree2) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/embree2/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/embree2/copyright) diff --git a/ports/embree/CONTROL b/ports/embree3/CONTROL similarity index 67% rename from ports/embree/CONTROL rename to ports/embree3/CONTROL index 3c9ac0c7c10..7e5bcdb85fc 100644 --- a/ports/embree/CONTROL +++ b/ports/embree3/CONTROL @@ -1,4 +1,4 @@ -Source: embree -Version: 2.16.4-2 +Source: embree3 +Version: 3.2.0-2 Description: High Performance Ray Tracing Kernels. Build-Depends: tbb diff --git a/ports/embree3/portfile.cmake b/ports/embree3/portfile.cmake new file mode 100644 index 00000000000..e90ea235753 --- /dev/null +++ b/ports/embree3/portfile.cmake @@ -0,0 +1,51 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO embree/embree + REF v3.2.0 + SHA512 296617251e4a9a95a5ceec10ce8f23daf180a8a61fd78bc5782dca7d5b15bddaa0b6f352e47d657a366ef9176a730ef2edc42451fbad8071c5ce8fbfb4515e51 + HEAD_REF master +) + +file(REMOVE ${SOURCE_PATH}/common/cmake/FindTBB.cmake) + +if(VCPKG_CRT_LINKAGE STREQUAL static) + set(EMBREE_STATIC_RUNTIME ON) +else() + set(EMBREE_STATIC_RUNTIME OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DEMBREE_ISPC_SUPPORT=OFF + -DEMBREE_TUTORIALS=OFF + -DEMBREE_STATIC_RUNTIME=${EMBREE_STATIC_RUNTIME} + "-DTBB_LIBRARIES=TBB::tbb" + "-DTBB_INCLUDE_DIRS=${CURRENT_INSTALLED_DIR}/include" +) + +# just wait, the release build of embree is insanely slow in MSVC +# a single file will took about 2-10 min +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# these cmake files do not seem to contain helpful configuration for find libs, just remove them +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/embree-config.cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/embree-config-version.cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/embree-config.cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/embree-config-version.cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/models) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/models) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/embree3) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/doc ${CURRENT_PACKAGES_DIR}/share/embree3/doc) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/embree3) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/embree3/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/embree3/copyright) diff --git a/ports/entityx/CONTROL b/ports/entityx/CONTROL index cbf618e0aed..dacd86ee90e 100644 --- a/ports/entityx/CONTROL +++ b/ports/entityx/CONTROL @@ -1,3 +1,3 @@ Source: entityx -Version: 1.2.0-1 +Version: 1.2.0-2 Description: EntityX - A fast, type-safe C++ Entity-Component system. diff --git a/ports/entityx/enable-std14.patch b/ports/entityx/enable-std14.patch new file mode 100644 index 00000000000..06eff08ee8e --- /dev/null +++ b/ports/entityx/enable-std14.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 23f5063..1fa10b8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -24,6 +24,7 @@ set(ENTITYX_BUILD_SHARED true CACHE BOOL "Build shared libraries?") + include(${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) + include(CheckCXXSourceCompiles) + ++set(CMAKE_CXX_STANDARD 14) + # Default compiler args + if(0) + if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "(GNU|.*Clang)") diff --git a/ports/entityx/fix-cmake.patch b/ports/entityx/fix-cmake.patch new file mode 100644 index 00000000000..143cc52b1c3 --- /dev/null +++ b/ports/entityx/fix-cmake.patch @@ -0,0 +1,40 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 87309bf..23f5063 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,6 +25,7 @@ include(${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) + include(CheckCXXSourceCompiles) + + # Default compiler args ++if(0) + if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "(GNU|.*Clang)") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Werror -Wall -Wextra -Wno-unused-parameter -Wno-error=unused-variable -Wno-error=sign-compare -std=c++11") + set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g") +@@ -41,6 +42,7 @@ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + set(CMAKE_CXX_FLAGS_RELEASE "/Ox -DNDEBUG") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Ox /Zi /FS /DEBUG") + endif() ++endif() + + # if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weverything -Wno-c++98-compat -Wno-shadow -Wno-padded -Wno-missing-noreturn -Wno-global-constructors") +@@ -156,9 +158,9 @@ endif (ENTITYX_BUILD_TESTING) + + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/entityx/config.h.in +- ${CMAKE_CURRENT_SOURCE_DIR}/entityx/config.h ++ ${CMAKE_CURRENT_BINARY_DIR}/entityx/config.h + ) +- ++include_directories(${CMAKE_CURRENT_BINARY_DIR}) + + if (NOT WINDOWS OR CYGWIN) + set(entityx_libs -lentityx) +@@ -179,6 +181,7 @@ install( + DESTINATION "include" + FILES_MATCHING PATTERN "*.h" + ) ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/entityx/config.h DESTINATION include/entityx) + + install( + TARGETS ${install_libs} diff --git a/ports/entityx/portfile.cmake b/ports/entityx/portfile.cmake index d35fb9da323..5df7da6cdce 100644 --- a/ports/entityx/portfile.cmake +++ b/ports/entityx/portfile.cmake @@ -1,42 +1,23 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# 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} -# - -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(STATUS "Warning: Dynamic building not supported yet. Building static.") - set(VCPKG_LIBRARY_LINKAGE static) -endif() - -if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") - message(FATAL_ERROR "Entityx only supports dynamic CRT linkage") -endif() - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/entityx-1.2.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/alecthomas/entityx/archive/1.2.0.zip" - FILENAME "entityx-1.2.0.zip" - SHA512 4d7009f0412fbccd7bee72713d53424c3b4fa39da62b87729dd84a710a059db27e65ca27b927285c82af09997caea125d85571824133d9b71b4e3c4eebd9917c -) -vcpkg_extract_source_archive(${ARCHIVE}) -if (VCPKG_CRT_LINKAGE STREQUAL dynamic) - SET(SHARED_FLAG ON) -else() - SET(SHARED_FLAG OFF) -endif() +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO alecthomas/entityx + REF 1.2.0 + SHA512 682aa302cb4495666aab2c0b39a286f88cb28046bc8b2deb603402105e15e4b9692e32807077abc3f465e42a4e0f34a7e69169bc74fc5579a5c3d0e17b02fdb8 + HEAD_REF master + PATCHES + fix-cmake.patch + enable-std14.patch +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 - -DENTITYX_BUILD_SHARED=${SHARED_FLAG} - -DENTITYX_BUILD_TESTING=false + -DENTITYX_BUILD_TESTING=false ) vcpkg_install_cmake() diff --git a/ports/entt/CONTROL b/ports/entt/CONTROL index 4e4c443341e..3489f8e78e9 100644 --- a/ports/entt/CONTROL +++ b/ports/entt/CONTROL @@ -1,3 +1,3 @@ Source: entt -Version: 2.4.2-1 +Version: 2.7.3-1 Description: Gaming meets modern C++ - a fast and reliable entity-component system and much more. diff --git a/ports/entt/portfile.cmake b/ports/entt/portfile.cmake index e67824162d8..e69ed624fa6 100644 --- a/ports/entt/portfile.cmake +++ b/ports/entt/portfile.cmake @@ -4,15 +4,27 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO skypjack/entt - REF v2.4.2 - SHA512 fd532f2c180c328d396f557386b70e961c122af11e379ce57db3709d20345280ada200dadde136ae3557ad25daa944d8a86f7868cd0bedea78427d42c27d6e6d + REF v2.7.3 + SHA512 ffdb26f43ebf0090eed5de589df4194282e2ab89e5014bfe4acc2670729b86c93ea85e25b4b1e72de975287b8f0aa9e72d89e1cfb649e0a0f4f72838b00e5215 + HEAD_REF master ) -file(INSTALL - ${SOURCE_PATH}/src/entt - DESTINATION ${CURRENT_PACKAGES_DIR}/include +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF ) -# Handle copyright/readme/package files +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/entt) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/entt RENAME copyright) -file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/entt) diff --git a/ports/esaxx/CONTROL b/ports/esaxx/CONTROL new file mode 100644 index 00000000000..48b7eebecc3 --- /dev/null +++ b/ports/esaxx/CONTROL @@ -0,0 +1,3 @@ +Source: esaxx +Version: ca7cb332011ec37 +Description: This library provides the implementation of enhanced suffix array. diff --git a/ports/esaxx/portfile.cmake b/ports/esaxx/portfile.cmake new file mode 100644 index 00000000000..93e24ff3665 --- /dev/null +++ b/ports/esaxx/portfile.cmake @@ -0,0 +1,17 @@ +#header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hillbig/esaxx + REF ca7cb332011ec37a8436487f210f396b84bd8273 + SHA512 8346fc93498f7979fd422db527d0e2db73080b2c372263a72a887ddc8328a29391bce6def5845f4500a180f5c2e641105d0ce108092e6eac9020c6bd67fb46df +) + +file(INSTALL + ${SOURCE_PATH}/esa.hxx + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +# Handle copyright/readme/package files +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/esaxx RENAME copyright) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 2e7eaef26ae..35b2bce9d9a 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 2018-04-12 +Version: 2018-11-08 Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/iconv.patch b/ports/exiv2/iconv.patch new file mode 100644 index 00000000000..27bedd314b8 --- /dev/null +++ b/ports/exiv2/iconv.patch @@ -0,0 +1,28 @@ +diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake +index e220e2f..992b887 100644 +--- a/cmake/findDependencies.cmake ++++ b/cmake/findDependencies.cmake +@@ -50,7 +50,7 @@ if( EXIV2_ENABLE_NLS ) + # the manual check in cmake/generateConfigFile.cmake + endif( ) + +-find_package(Iconv) ++find_package(unofficial-iconv CONFIG REQUIRED) + if( ICONV_FOUND ) + message ( "-- ICONV_INCLUDE_DIR : " ${Iconv_INCLUDE_DIR} ) + message ( "-- ICONV_LIBRARIES : " ${Iconv_LIBRARY} ) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 91469b6..4c51068 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -274,8 +274,8 @@ if( EXIV2_ENABLE_NLS ) + target_link_libraries( exiv2lib PRIVATE ${LIBINTL_LIBRARIES} ) + endif() + +-if( ICONV_FOUND ) +- target_link_libraries( exiv2lib PRIVATE Iconv::Iconv ) ++if( ICONV_FOUND OR 1 ) ++ target_link_libraries( exiv2lib PRIVATE unofficial::iconv::libiconv ) + endif() + + diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index 3e645a91e94..e046e0bde61 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,14 +3,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF c80b1b9d51689692bc865f1a1d16bf7fd2a532c4 - SHA512 72c3801678424cd738423ea28e03c44f4d2bfd6a7e3c2cea53806b3705eebc5e86a293d3aa2bea51f6f426b9e280a3f7b8883bb4e4c627cc413159d9565033a0 + REF 274ef04f7ebbff567135e732434c9c8353265d6c + SHA512 8e8d32a4c51da2a61026a4541885da72df88c3e30452944c5e2d2d8e6d8d03dcdea72c4e3bfe9673554453ddc547651d160cfba2bfab1450a1770f4af2be740a HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH "${SOURCE_PATH}" - PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-iconv.patch" + PATCHES iconv.patch ) vcpkg_configure_cmake( diff --git a/ports/exiv2/use-iconv.patch b/ports/exiv2/use-iconv.patch deleted file mode 100644 index 4305ec550e4..00000000000 --- a/ports/exiv2/use-iconv.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/config/FindIconv.cmake b/config/FindIconv.cmake -index 15a0e39..53718bf 100644 ---- a/config/FindIconv.cmake -+++ b/config/FindIconv.cmake -@@ -36,12 +36,13 @@ if(NOT ICONV_INCLUDE_DIR STREQUAL "ICONV_INCLUDE_DIR-NOTFOUND") - endif() - - if(NOT ICONV_IN_GLIBC) -- find_library(ICONV_LIBRARY NAMES iconv) -+ find_library(ICONV_LIBRARY NAMES iconv libiconv) - set(ICONV_TEST ${ICONV_LIBRARY}) - else() - set(ICONV_TEST "In glibc") - endif() - -+set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) - set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY}) - check_cxx_source_compiles( - "#include -@@ -59,7 +60,8 @@ else(ICONV_FOUND) - set(ICONV_LIBRARIES) - endif(ICONV_FOUND) - --if(ICONV_FOUND) -+if(ICONV_FOUND) -+ set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) - set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) - check_cxx_source_compiles( - "#include -@@ -69,6 +71,7 @@ if(ICONV_FOUND) - }" - ICONV_ACCEPTS_NONCONST_INPUT) - -+ set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) - set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) - check_cxx_source_compiles( - "#include diff --git a/ports/expat/CONTROL b/ports/expat/CONTROL index edbcf232635..4cdb03f6e5f 100644 --- a/ports/expat/CONTROL +++ b/ports/expat/CONTROL @@ -1,3 +1,3 @@ Source: expat -Version: 2.2.5 +Version: 2.2.6 Description: XML parser library written in C diff --git a/ports/expat/portfile.cmake b/ports/expat/portfile.cmake index 485320a8ba9..7e2c322db91 100644 --- a/ports/expat/portfile.cmake +++ b/ports/expat/portfile.cmake @@ -6,8 +6,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libexpat/libexpat - REF R_2_2_5 - SHA512 61ce2a479521412e0c56c352106c4adfb61a6bedb883921aba3ebccc29311ddd192646ac2c51b41572728d4de6ab4cb60a1dbc71515d742a80a8b59d89ca74d6 + REF R_2_2_6 + SHA512 727fbd24041c9af71b32353448583a6d8b38ddf93b10c97510e847939c2ad2be9b40ff6e6e27b725bff277982c2fc96c75f19c4a3ac4a246133eb62870c963d8 HEAD_REF master) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) @@ -43,3 +43,5 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") string(REPLACE "!defined(XML_STATIC)" "/* vcpkg static build !defined(XML_STATIC) */ 0" EXPAT_EXTERNAL_H "${EXPAT_EXTERNAL_H}") endif() file(WRITE ${CURRENT_PACKAGES_DIR}/include/expat_external.h "${EXPAT_EXTERNAL_H}") + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/expat) diff --git a/ports/expat/usage b/ports/expat/usage new file mode 100644 index 00000000000..a2d35a66e39 --- /dev/null +++ b/ports/expat/usage @@ -0,0 +1,4 @@ +The package expat is compatible with built-in CMake targets: + + find_package(EXPAT REQUIRED) + target_link_libraries(main PRIVATE EXPAT::EXPAT) diff --git a/ports/exprtk/CONTROL b/ports/exprtk/CONTROL index 2ebcfab281d..d00c2aaae44 100644 --- a/ports/exprtk/CONTROL +++ b/ports/exprtk/CONTROL @@ -1,3 +1,3 @@ Source: exprtk -Version: 2018.01.01-f32d2b4 +Version: 2018-10-11 Description: Simple to use, easy to integrate and extremely efficient run-time C++ mathematical expression parser and evaluation engine. diff --git a/ports/exprtk/portfile.cmake b/ports/exprtk/portfile.cmake index 1178a3e12ff..a863941af19 100644 --- a/ports/exprtk/portfile.cmake +++ b/ports/exprtk/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ArashPartow/exprtk - REF f32d2b4bbb640ea4732b8a7fce1bd9717e9c998b - SHA512 22c977dc2514bd525856ed26b8895687601e79784486efe9d4f27466e1e1932c4a947297d83e9b98a6c82df9eaf5b0f82990741bbb699d565ca11e5755a55dd6 + REF 9836f21d07b1bf799e6877324268708f61c01f73 + SHA512 44acb6e835dc215d4338ff4c2b3444373a93475ece15b3f1bfdc0781f7c28992af7c289644bf9557d041f78c7435f5907e4ba606321aab17faee6f4a70562065 ) file(COPY ${SOURCE_PATH}/exprtk.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/fastcdr/CONTROL b/ports/fastcdr/CONTROL index dfd04bf06e5..9076962c7db 100644 --- a/ports/fastcdr/CONTROL +++ b/ports/fastcdr/CONTROL @@ -1,3 +1,3 @@ Source: fastcdr -Version: 1.0.6-1 +Version: 1.0.6-2 Description: eProsima FastCDR is a C++ library that provides two serialization mechanisms. One is the standard CDR serialization mechanism, while the other is a faster implementation that modifies the standard. diff --git a/ports/fastcdr/portfile.cmake b/ports/fastcdr/portfile.cmake index 91362f3b2e5..c3b6967d9a5 100644 --- a/ports/fastcdr/portfile.cmake +++ b/ports/fastcdr/portfile.cmake @@ -6,11 +6,7 @@ vcpkg_from_github( REF v1.0.6 SHA512 80861ff6a0283e1398306e081fe70d7d185f980e5714ae51864cae012b8f79719efa24e7f41025b2bfb2052cb2a3098436c75a38407f8f5a331593cb91868fb2 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/install-cmake.patch + PATCHES install-cmake.patch ) vcpkg_configure_cmake( @@ -25,6 +21,10 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/fastcdr/cmake) +file(READ "${CURRENT_PACKAGES_DIR}/share/fastcdr/fastcdrConfig.cmake" _contents) +string(REPLACE "include(\${fastcdr_LIB_DIR}/fastcdr/cmake/fastcdrTargets.cmake)" "include(\${CMAKE_CURRENT_LIST_DIR}/fastcdrTargets.cmake)" _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/fastcdr/fastcdrConfig.cmake" "${_contents}") + vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/lib/fastcdr ${CURRENT_PACKAGES_DIR}/debug/lib/fastcdr) diff --git a/ports/fastfeat/CMakeLists.txt b/ports/fastfeat/CMakeLists.txt new file mode 100644 index 00000000000..89f1dc22620 --- /dev/null +++ b/ports/fastfeat/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.8) +project(fastfeat) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +include_directories(.) +file( GLOB SRCS *.c *.def) +add_library(fastfeat ${SRCS}) + + +install( + TARGETS fastfeat + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + FILES fast.h DESTINATION include + ) +endif() diff --git a/ports/fastfeat/CONTROL b/ports/fastfeat/CONTROL new file mode 100644 index 00000000000..ff76128fcc0 --- /dev/null +++ b/ports/fastfeat/CONTROL @@ -0,0 +1,3 @@ +Source: fastfeat +Version: 391d5e9 +Description: FAST feature detectors in C diff --git a/ports/fastfeat/fastfeat.def b/ports/fastfeat/fastfeat.def new file mode 100644 index 00000000000..21e048362bf --- /dev/null +++ b/ports/fastfeat/fastfeat.def @@ -0,0 +1,19 @@ +LIBRARY fastfeat +EXPORTS + fast9_detect_nonmax @1 + fast10_detect_nonmax @2 + fast9_corner_score @3 + fast10_corner_score @4 + fast11_corner_score @5 + fast12_corner_score @6 + fast9_detect @7 + fast10_detect @8 + fast11_detect @9 + fast12_detect @10 + fast9_score @11 + fast10_score @12 + fast11_score @13 + fast12_score @14 + fast11_detect_nonmax @15 + fast12_detect_nonmax @16 + nonmax_suppression @17 diff --git a/ports/fastfeat/portfile.cmake b/ports/fastfeat/portfile.cmake new file mode 100644 index 00000000000..95d178ea4c7 --- /dev/null +++ b/ports/fastfeat/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO edrosten/fast-C-src + REF 391d5e939eb1545d24c10533d7de424db8d9c191 + SHA512 d6f401e2f80193c4f1f99e1ef59af7107d674c515574cf513c5977c4c95c49c0520d2a6e6787f617b42d9e3bd93c78b8fa7f1d8dc8901351820590078e62130e + HEAD_REF master +) + + +file(COPY +${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/fastfeat.def +DESTINATION ${SOURCE_PATH} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fastfeat RENAME copyright) diff --git a/ports/fastrtps/CONTROL b/ports/fastrtps/CONTROL index edbe4b7d46c..c80f7638c70 100644 --- a/ports/fastrtps/CONTROL +++ b/ports/fastrtps/CONTROL @@ -1,4 +1,4 @@ Source: fastrtps -Version: 1.5.0 +Version: 1.5.0-2 Description: Eprosima Fast RTPS is a C++ implementation of the RTPS (Real Time Publish Subscribe) protocol, which provides publisher-subscriber communications over unreliable transports such as UDP, as defined and maintained by the Object Management Group (OMG) consortium. Build-Depends: openssl, asio, tinyxml2 \ No newline at end of file diff --git a/ports/fastrtps/namespace_tinyxml2.patch b/ports/fastrtps/namespace_tinyxml2.patch new file mode 100644 index 00000000000..3df65996f49 --- /dev/null +++ b/ports/fastrtps/namespace_tinyxml2.patch @@ -0,0 +1,17 @@ +diff --git a/cmake/modules/FindTinyXML2.cmake b/cmake/modules/FindTinyXML2.cmake +index 24aa98a..4e2188e 100644 +--- a/cmake/modules/FindTinyXML2.cmake ++++ b/cmake/modules/FindTinyXML2.cmake +@@ -7,10 +7,10 @@ option(TINYXML2_FROM_SOURCE "Integrate TinyXML2 source code inside Fast RTPS" OF + find_package(TinyXML2 CONFIG QUIET) + if(TinyXML2_FOUND) + message(STATUS "Found TinyXML2: ${TinyXML2_DIR}") +- if(NOT TINYXML2_LIBRARY AND TARGET tinyxml2) ++ if(NOT TINYXML2_LIBRARY AND TARGET tinyxml2::tinyxml2) + # in this case, we're probably using TinyXML2 version 5.0.0 or greater + # in which case tinyxml2 is an exported target and we should use that +- set(TINYXML2_LIBRARY tinyxml2) ++ set(TINYXML2_LIBRARY tinyxml2::tinyxml2) + endif() + else() + if(THIRDPARTY) diff --git a/ports/fastrtps/portfile.cmake b/ports/fastrtps/portfile.cmake index 855d9f8b566..9aed75f5bff 100644 --- a/ports/fastrtps/portfile.cmake +++ b/ports/fastrtps/portfile.cmake @@ -6,11 +6,9 @@ vcpkg_from_github( REF b1779b608c7b5b2dcb101728f4213c58bdde74ee # waiting for next release SHA512 9ec4a1e41296df1c0bc00926d925e0947602fabb68e9b28311e92739b0e1909a2993b15fc05eb31aeb9842ed50127f8d56571d09e57dd64ac6f37d0fed6cea73 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-install.patch + PATCHES + fix-install.patch + namespace_tinyxml2.patch ) vcpkg_configure_cmake( @@ -21,12 +19,13 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(COPY ${CURRENT_PACKAGES_DIR}/lib/fastrtps DESTINATION ${CURRENT_PACKAGES_DIR}/share) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/fastrtps/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/examples) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/LICENSE) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/examples) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/fastrtps) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/fastrtps) file(RENAME ${CURRENT_PACKAGES_DIR}/LICENSE ${CURRENT_PACKAGES_DIR}/share/fastrtps/copyright) diff --git a/ports/fdk-aac/CONTROL b/ports/fdk-aac/CONTROL index edef0f16d78..a298acd1b94 100644 --- a/ports/fdk-aac/CONTROL +++ b/ports/fdk-aac/CONTROL @@ -1,3 +1,3 @@ Source: fdk-aac -Version: 2018-03-07 +Version: 2018-07-08 Description: A standalone library of the Fraunhofer FDK AAC code diff --git a/ports/fdk-aac/portfile.cmake b/ports/fdk-aac/portfile.cmake index 134885b2519..04de017daf0 100644 --- a/ports/fdk-aac/portfile.cmake +++ b/ports/fdk-aac/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mstorsjo/fdk-aac - REF a30bfced6b6d6d976c728552d247cb30dd86e238 - SHA512 07371b78998b2330022ca5f4b6c605a30d279faef28b3fb53d03bbf7163c87bed9432fcd3efbee70906453e7599bc7191e6aeb0bc88b35dcfb79c2a935eb327d + REF e45ae429b9ca8f234eb861338a75b2d89cde206a + SHA512 e4d0ec632a67642312bd0c812849601452d4ba45b31bc2f2a9392bba5fe2320b2099c5c7077c9571ea270804979039182060dc1acacdc397ca2a9b8ca43301a3 HEAD_REF master ) diff --git a/ports/fdlibm/CMakeLists.txt b/ports/fdlibm/CMakeLists.txt new file mode 100644 index 00000000000..c31f04ab4a7 --- /dev/null +++ b/ports/fdlibm/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 3.8) +project(fdlibm C) + +file(GLOB fdlibm_SOURCES "*.c") + +include_directories(".") + +if(WIN32) +set(fdlibm_SOURCES ${fdlibm_SOURCES} libm5.def) +endif() + + +add_library(fdlibm ${fdlibm_SOURCES}) + +install( + TARGETS fdlibm + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib/manual-link + ARCHIVE DESTINATION lib/manual-link +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + FILES + fdlibm.h + DESTINATION include + ) +endif() diff --git a/ports/fdlibm/CONTROL b/ports/fdlibm/CONTROL new file mode 100644 index 00000000000..e519980bb6a --- /dev/null +++ b/ports/fdlibm/CONTROL @@ -0,0 +1,3 @@ +Source: fdlibm +Version: 5.3-2 +Description: FDLIBM (Freely Distributable LIBM) is a C math library for machines that support IEEE 754 floating-point arithmetic diff --git a/ports/fdlibm/libm5.def b/ports/fdlibm/libm5.def new file mode 100644 index 00000000000..2de0ad485b3 --- /dev/null +++ b/ports/fdlibm/libm5.def @@ -0,0 +1,88 @@ +EXPORTS + __ieee754_acos @ 1 ; + __ieee754_acosh @ 2 ; + __ieee754_asin @ 3 ; + __ieee754_atan2 @ 4 ; + __ieee754_atanh @ 5 ; + __ieee754_cosh @ 6 ; + __ieee754_exp @ 7 ; + __ieee754_fmod @ 8 ; + __ieee754_gamma @ 9 ; + __ieee754_gamma_r @ 10 ; + __ieee754_hypot @ 11 ; + __ieee754_j0 @ 12 ; + __ieee754_j1 @ 13 ; + __ieee754_jn @ 14 ; + __ieee754_lgamma @ 15 ; + __ieee754_lgamma_r @ 16 ; + __ieee754_log @ 17 ; + __ieee754_log10 @ 18 ; + __ieee754_pow @ 19 ; + __ieee754_rem_pio2 @ 20 ; + __ieee754_remainder @ 21 ; + __ieee754_scalb @ 22 ; + __ieee754_sinh @ 23 ; + __ieee754_sqrt @ 24 ; + __ieee754_y0 @ 25 ; + __ieee754_y1 @ 26 ; + __ieee754_yn @ 27 ; + __kernel_cos @ 28 ; + __kernel_rem_pio2 @ 29 ; + __kernel_sin @ 30 ; + __kernel_standard @ 31 ; + __kernel_tan @ 32 ; + _fdlib_version @ 33 DATA ; + acos @ 34 ; + acosh @ 35 ; + asin @ 36 ; + asinh @ 37 ; + atan @ 38 ; + atan2 @ 39 ; + atanh @ 40 ; + cbrt @ 41 ; + ceil @ 42 ; + copysign @ 43 ; + cos @ 44 ; + cosh @ 45 ; + erf @ 46 ; + erfc @ 47 ; + exp @ 48 ; + expm1 @ 49 ; + fabs @ 50 ; + ieee_finite @ 51 ; + floor @ 52 ; + fmod @ 53 ; + frexp @ 54 ; + ieee_gamma @ 55 ; + ieee_gamma_r @ 56 ; + hypot @ 57 ; + ilogb @ 58 ; + ieee_isnan @ 59 ; + j0 @ 60 ; + j1 @ 61 ; + jn @ 62 ; + ldexp @ 63 ; + ieee_lgamma @ 64 ; + ieee_lgamma_r @ 65 ; + log @ 66 ; + log10 @ 67 ; + log1p @ 68 ; + logb @ 69 ; + ieee_matherr @ 70 ; + modf @ 71 ; + nextafter @ 72 ; + pow @ 73 ; + remainder @ 74 ; + rint @ 75 ; + ieee_scalb @ 76 ; + scalbn @ 77 ; + signgam @ 78 DATA ; + ieee_significand @ 79 ; + sin @ 80 ; + sinh @ 81 ; + sqrt @ 82 ; + tan @ 83 ; + tanh @ 84 ; + y0 @ 85 ; + y1 @ 86 ; + yn @ 87 ; diff --git a/ports/fdlibm/portfile.cmake b/ports/fdlibm/portfile.cmake new file mode 100644 index 00000000000..6e528f36869 --- /dev/null +++ b/ports/fdlibm/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://android.googlesource.com/platform/external/fdlibm + REF 59f7335e4dd8275a7dc2f8aeb4fd00758fde37ac + SHA512 bc788c840a57716f996513980d31b203bd86ce9af1ac3656a187266bfdc2fbb22a9ddf88f79ffc91dd75f3f1f1e4fd3449a42b566ffe5e49e9384efd91a68613 +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/libm5.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Handle copyright +configure_file(${SOURCE_PATH}/NOTICE ${CURRENT_PACKAGES_DIR}/share/fdlibm/copyright COPYONLY) diff --git a/ports/fftw3/CONTROL b/ports/fftw3/CONTROL index fd9e597660a..a0ed8812417 100644 --- a/ports/fftw3/CONTROL +++ b/ports/fftw3/CONTROL @@ -1,3 +1,3 @@ Source: fftw3 -Version: 3.3.7-2 +Version: 3.3.8 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/fftw3/portfile.cmake b/ports/fftw3/portfile.cmake index 2cf78f44cab..ca3201ec3a4 100644 --- a/ports/fftw3/portfile.cmake +++ b/ports/fftw3/portfile.cmake @@ -1,5 +1,5 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fftw-3.3.7) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fftw-3.3.8) # This can be removed in the next source code update if(EXISTS "${SOURCE_PATH}/CMakeLists.txt") @@ -10,9 +10,9 @@ if(EXISTS "${SOURCE_PATH}/CMakeLists.txt") endif() vcpkg_download_distfile(ARCHIVE - URLS "http://www.fftw.org/fftw-3.3.7.tar.gz" - FILENAME "fftw-3.3.7.tar.gz" - SHA512 a5db54293a6d711408bed5894766437eee920be015ad27023c7a91d4581e2ff5b96e3db0201e6eaccf7b064c4d32db1a2a8fab3e6813e524b4743ddd6216ba77 + URLS "http://www.fftw.org/fftw-3.3.8.tar.gz" + FILENAME "fftw-3.3.8.tar.gz" + SHA512 ab918b742a7c7dcb56390a0a0014f517a6dff9a2e4b4591060deeb2c652bf3c6868aa74559a422a276b853289b4b701bdcbd3d4d8c08943acf29167a7be81a38 ) vcpkg_extract_source_archive(${ARCHIVE}) diff --git a/ports/fizz/CONTROL b/ports/fizz/CONTROL new file mode 100644 index 00000000000..1267b81b94f --- /dev/null +++ b/ports/fizz/CONTROL @@ -0,0 +1,4 @@ +Source: fizz +Version: 2018.10.15.00 +Build-Depends: folly, openssl, libsodium +Description: a TLS 1.3 implementation by Facebook diff --git a/ports/fizz/portfile.cmake b/ports/fizz/portfile.cmake new file mode 100644 index 00000000000..f1c140afa4e --- /dev/null +++ b/ports/fizz/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebookincubator/fizz + REF v2018.10.15.00 + SHA512 bf16050eebb8fa131927064a2467ee8cc20ba9a214cf232f38067afa9cb71414fa19ab1c65d7f2fb3e6dff651065aadeed02724fb4660fedb0c44da9073222c0 + HEAD_REF master +) + +# Prefer installed config files +file(REMOVE + ${SOURCE_PATH}/fizz/cmake/FindGflags.cmake + ${SOURCE_PATH}/fizz/cmake/FindLibevent.cmake + ${SOURCE_PATH}/fizz/cmake/FindGlog.cmake +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}/fizz" + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF + -DINCLUDE_INSTALL_DIR:STRING=include +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/fizz") +vcpkg_copy_pdbs() + +file(READ ${CURRENT_PACKAGES_DIR}/share/fizz/fizz-config.cmake _contents) +string(REPLACE "lib/cmake/fizz" "share/fizz" _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/fizz/fizz-config.cmake "${_contents}") + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fizz RENAME copyright) diff --git a/ports/flann/CONTROL b/ports/flann/CONTROL index 850c76850f4..4ec6072ab29 100644 --- a/ports/flann/CONTROL +++ b/ports/flann/CONTROL @@ -1,3 +1,3 @@ Source: flann -Version: 1.9.1-7 +Version: 1.9.1-8 Description: Fast Library for Approximate Nearest Neighbors diff --git a/ports/flann/no-write-src-dir.patch b/ports/flann/no-write-src-dir.patch new file mode 100644 index 00000000000..c44c869ccff --- /dev/null +++ b/ports/flann/no-write-src-dir.patch @@ -0,0 +1,19 @@ +diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt +index eb84c8a..e6c8ae0 100644 +--- a/src/cpp/CMakeLists.txt ++++ b/src/cpp/CMakeLists.txt +@@ -2,7 +2,13 @@ + + add_definitions(-D_FLANN_VERSION=${FLANN_VERSION}) + +-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/flann/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/flann/config.h) ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/flann/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/flann/config.h) ++include_directories(${CMAKE_CURRENT_BINARY_DIR}/flann) ++ ++install ( ++ FILES ${CMAKE_CURRENT_BINARY_DIR}/flann/config.h ++ DESTINATION include/flann ++) + + file(GLOB_RECURSE C_SOURCES flann.cpp lz4.c lz4hc.c) + file(GLOB_RECURSE CPP_SOURCES flann_cpp.cpp lz4.c lz4hc.c) diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake index 6d251caa508..2d6c40486ed 100644 --- a/ports/flann/portfile.cmake +++ b/ports/flann/portfile.cmake @@ -6,14 +6,11 @@ vcpkg_from_github( REF 1.9.1 SHA512 0da78bb14111013318160dd3dee1f93eb6ed077b18439fd6496017b62a8a6070cc859cfb3e08dad4c614e48d9dc1da5f7c4a21726ee45896d360506da074a6f7 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-install-flann.patch - ${CMAKE_CURRENT_LIST_DIR}/Revert-fix-install-flann.patch - ${CMAKE_CURRENT_LIST_DIR}/export-all-symbols-of-flann-cpp.patch + fix-install-flann.patch + Revert-fix-install-flann.patch + export-all-symbols-of-flann-cpp.patch + no-write-src-dir.patch ) vcpkg_configure_cmake( @@ -32,18 +29,26 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(LIB_PREFIX "") + set(LIB_SUFFIX ".lib") +else() + set(LIB_PREFIX "lib") + set(LIB_SUFFIX ".a") +endif() + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann-gd.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_cpp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp-gd.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/${LIB_PREFIX}flann${LIB_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/lib/${LIB_PREFIX}flann-gd${LIB_SUFFIX}) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/${LIB_PREFIX}flann_cpp${LIB_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/lib/${LIB_PREFIX}flann_cpp-gd${LIB_SUFFIX}) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/lib/flann.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/flann_s-gd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann-gd.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/flann_cpp_s.lib ${CURRENT_PACKAGES_DIR}/lib/flann_cpp.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp_s-gd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp-gd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/${LIB_PREFIX}flann_s${LIB_SUFFIX} ${CURRENT_PACKAGES_DIR}/lib/${LIB_PREFIX}flann${LIB_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/${LIB_PREFIX}flann_s-gd${LIB_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/lib/${LIB_PREFIX}flann-gd${LIB_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/${LIB_PREFIX}flann_cpp_s${LIB_SUFFIX} ${CURRENT_PACKAGES_DIR}/lib/${LIB_PREFIX}flann_cpp${LIB_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/${LIB_PREFIX}flann_cpp_s-gd${LIB_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/lib/${LIB_PREFIX}flann_cpp-gd${LIB_SUFFIX}) elseif(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_s-gd.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_cpp_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp_s-gd.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/${LIB_PREFIX}flann_s${LIB_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/lib/${LIB_PREFIX}flann_s-gd${LIB_SUFFIX}) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/${LIB_PREFIX}flann_cpp_s${LIB_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/lib/${LIB_PREFIX}flann_cpp_s-gd${LIB_SUFFIX}) endif() # Handle copyright diff --git a/ports/flatbuffers/CONTROL b/ports/flatbuffers/CONTROL index 5085301531b..9dc3a871ff2 100644 --- a/ports/flatbuffers/CONTROL +++ b/ports/flatbuffers/CONTROL @@ -1,4 +1,4 @@ Source: flatbuffers -Version: 1.8.0-2 +Version: 1.9.0-3 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. diff --git a/ports/flatbuffers/ignore_use_of_cmake_toolchain_file.patch b/ports/flatbuffers/ignore_use_of_cmake_toolchain_file.patch new file mode 100644 index 00000000000..2205f0b37fa --- /dev/null +++ b/ports/flatbuffers/ignore_use_of_cmake_toolchain_file.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a3388dd..699ea3b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -104,7 +104,7 @@ set(FlatBuffers_GRPCTest_SRCS + # source_group(Compiler FILES ${FlatBuffers_Compiler_SRCS}) + # source_group(Tests FILES ${FlatBuffers_Tests_SRCS}) + +-if(EXISTS "${CMAKE_TOOLCHAIN_FILE}") ++if(EXISTS "${CMAKE_TOOLCHAIN_FILE}" AND NOT DEFINED VCPKG_TOOLCHAIN) + # do not apply any global settings if the toolchain + # is being configured externally + elseif(APPLE) diff --git a/ports/flatbuffers/no-werror.patch b/ports/flatbuffers/no-werror.patch new file mode 100644 index 00000000000..7c2d548b95d --- /dev/null +++ b/ports/flatbuffers/no-werror.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a3388dd..f0626e5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -119,12 +119,16 @@ elseif(CMAKE_COMPILER_IS_GNUCXX) + "${CMAKE_CXX_FLAGS} -std=c++0x") + endif(CYGWIN) + set(CMAKE_CXX_FLAGS +- "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror -Wextra -Werror=shadow") ++ "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Werror=shadow") + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.4) + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0) + set(CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -faligned-new") + endif() ++ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) ++ set(CMAKE_CXX_FLAGS ++ "${CMAKE_CXX_FLAGS} -Wextra") ++ endif() + set(CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -Wunused-result -Werror=unused-result -Wunused-parameter -Werror=unused-parameter") + endif() + diff --git a/ports/flatbuffers/portfile.cmake b/ports/flatbuffers/portfile.cmake index 8ac58594642..d98d5ce48c7 100644 --- a/ports/flatbuffers/portfile.cmake +++ b/ports/flatbuffers/portfile.cmake @@ -7,53 +7,47 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/flatbuffers - REF v1.8.0 - SHA512 8f6c84caa6456418fc751ea9de456dd37378b3239d1a41d2205140e7b19a5b8b2e342a22dc8d7fdd0c36878455e9d7401cc6438d3b771f7875e8fcfe7bbd52f1 + REF v1.9.0 + SHA512 0ba07dbe5b2fde1d0a6e14ee26ee2816062541d934eda204b846a30c019362f2626761b628c900293928b9b546dba8ca477c13182e022c3e0e0a142fd67f0696 HEAD_REF master + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/ignore_use_of_cmake_toolchain_file.patch + ${CMAKE_CURRENT_LIST_DIR}/no-werror.patch ) +set(OPTIONS) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") list(APPEND OPTIONS -DFLATBUFFERS_BUILD_FLATC=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF) endif() -set(OPTIONS) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - list(APPEND OPTIONS -DFLATBUFFERS_BUILD_SHAREDLIB=ON) -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja + PREFER_NINJA OPTIONS -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_BUILD_GRPCTEST=OFF ${OPTIONS} - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 ) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/flatbuffers") -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/flatc.exe) +file(GLOB flatc_path ${CURRENT_PACKAGES_DIR}/bin/flatc*) +if(flatc_path) make_directory(${CURRENT_PACKAGES_DIR}/tools/flatbuffers) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/flatc.exe ${CURRENT_PACKAGES_DIR}/tools/flatbuffers/flatc.exe) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/flatbuffers.dll) - make_directory(${CURRENT_PACKAGES_DIR}/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/flatbuffers.dll ${CURRENT_PACKAGES_DIR}/bin/flatbuffers.dll) -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/flatbuffers.dll) - make_directory(${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/flatbuffers.dll ${CURRENT_PACKAGES_DIR}/debug/bin/flatbuffers.dll) + get_filename_component(flatc_executable ${flatc_path} NAME) + file( + RENAME + ${flatc_path} + ${CURRENT_PACKAGES_DIR}/tools/flatbuffers/${flatc_executable} + ) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/flatbuffers) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/flatbuffers) file(RENAME ${CURRENT_PACKAGES_DIR}/share/flatbuffers/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/flatbuffers/copyright) + diff --git a/ports/fmi4cpp/CONTROL b/ports/fmi4cpp/CONTROL new file mode 100644 index 00000000000..35090616d16 --- /dev/null +++ b/ports/fmi4cpp/CONTROL @@ -0,0 +1,4 @@ +Source: fmi4cpp +Version: 0.4.0 +Description: FMI 2.0 implementation written in modern C++ +Build-Depends: boost-property-tree, boost-ublas, boost-odeint, bzip2 (linux), openssl (linux), libzip diff --git a/ports/fmi4cpp/portfile.cmake b/ports/fmi4cpp/portfile.cmake new file mode 100644 index 00000000000..435ab2c51f6 --- /dev/null +++ b/ports/fmi4cpp/portfile.cmake @@ -0,0 +1,40 @@ +# 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 = +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SFI-Mechatronics/FMI4cpp + REF v0.4.0 + SHA512 356485da5799a5720b3bea9bd935a76c36eb5c242cecfd2325f47175bad0eafa1e088fb1b96b639b8419e2a5a39f7b07fbe9d89d3f8e568e00b8910b7e991111 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DFMI4CPP_BUILD_TESTS=OFF + -DFMI4CPP_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/FMI4cpp") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fmi4cpp RENAME copyright) + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/fmilib/CONTROL b/ports/fmilib/CONTROL new file mode 100644 index 00000000000..859098e3099 --- /dev/null +++ b/ports/fmilib/CONTROL @@ -0,0 +1,3 @@ +Source: fmilib +Version: 2.0.3 +Description: FMI library is intended as a foundation for applications interfacing FMUs (Functional Mockup Units) that follow FMI Standard. This version of the library supports FMI 1.0 and FMI2.0. See http://www.fmi-standard.org/ diff --git a/ports/fmilib/LICENSE b/ports/fmilib/LICENSE new file mode 100644 index 00000000000..27d973645c4 --- /dev/null +++ b/ports/fmilib/LICENSE @@ -0,0 +1,26 @@ +License +------- + +Copyright (C) 2012 Modelon AB + +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 Modelon AB 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 MODELON AB 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. diff --git a/ports/fmilib/portfile.cmake b/ports/fmilib/portfile.cmake new file mode 100644 index 00000000000..df72dd7eec2 --- /dev/null +++ b/ports/fmilib/portfile.cmake @@ -0,0 +1,165 @@ +# 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 = +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# + +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FMILibrary-2.0.3) +vcpkg_download_distfile(ARCHIVE + URLS "https://jmodelica.org/fmil/FMILibrary-2.0.3-src.zip" + FILENAME "FMILibrary-2.0.3-src.zip" + SHA512 86e4b5019d8f2a76b01141411845d977fb3949617604de0b34351f23647e3e8b378477de184e1c4f2f59297bc4c7de3155e0edba9099b8924594a36b37b04cc8 +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +# Note that if you have configured and built both static and shared library on Windows +# but want to link with the static library compile time define "FMILIB_BUILDING_LIBRARY" must be set. +if (WIN32 AND VCPKG_LIBRARY_LINKAGE STREQUAL static) + SET(FMILIB_BUILDING_LIBRARY ON) +else() + SET(FMILIB_BUILDING_LIBRARY OFF) +endif() + +# Use static run-time libraries (/MT or /MTd code generation flags) +# This is only used when generating Microsoft Visual Studio solutions. If the options is on then the library will +# be built against static runtime, otherwise - dynamic runtime (/MD or /MDd). Make sure the client code is using +# matching runtime +if (WIN32 AND VCPKG_CRT_LINKAGE STREQUAL static) + SET(FMILIB_BUILD_WITH_STATIC_RTLIB ON) +else() + SET(FMILIB_BUILD_WITH_STATIC_RTLIB OFF) +endif() + +# On LINUX position independent code (-fPIC) must be used on all files to be linked into a shared library (.so file). +# On other systems this is not needed (either is default or relocation is done). Set this option to OFF if you +# are building an application on Linux and use static library only +if (UNIX AND VCPKG_LIBRARY_LINKAGE STREQUAL static) + SET(FMILIB_BUILD_FOR_SHARED_LIBS OFF) +else() + SET(FMILIB_BUILD_FOR_SHARED_LIBS ON) +endif() + +# Only build the requested library +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + SET(FMILIB_BUILD_STATIC_LIB ON) + SET(FMILIB_BUILD_SHARED_LIB OFF) +else() + SET(FMILIB_BUILD_STATIC_LIB OFF) + SET(FMILIB_BUILD_SHARED_LIB ON) +endif() + +SET(OPTIONS + -DFMILIB_BUILD_TESTS=OFF + -DFMILIB_BUILD_STATIC_LIB=${FMILIB_BUILD_STATIC_LIB} + -DFMILIB_BUILD_SHARED_LIB=${FMILIB_BUILD_SHARED_LIB} + -DFMILIB_BUILDING_LIBRARY=${FMILIB_BUILDING_LIBRARY} + -DFMILIB_BUILD_WITH_STATIC_RTLIB=${FMILIB_BUILD_WITH_STATIC_RTLIB} +) + +# Reset package dir +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}) + +foreach(BUILDTYPE "rel" "dbg") + + message("Building ${TARGET_TRIPLET}-${BUILDTYPE}...") + + string(COMPARE EQUAL ${BUILDTYPE} "rel" RELEASE_BUILD) + + SET(BUILD_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILDTYPE}) + + # Reset working dir + file(REMOVE_RECURSE ${BUILD_DIR}) + file(MAKE_DIRECTORY ${BUILD_DIR}) + + if(RELEASE_BUILD) + SET(FMILIB_INSTALL_PREFIX ${CURRENT_PACKAGES_DIR}) + else() + SET(FMILIB_INSTALL_PREFIX ${CURRENT_PACKAGES_DIR}/debug) + endif() + + # Step 1: Configure + vcpkg_execute_required_process(COMMAND + cmake + -DFMILIB_INSTALL_PREFIX=${FMILIB_INSTALL_PREFIX} + -DFMILIB_DEFAULT_BUILD_TYPE_RELEASE=${RELEASE_BUILD} + ${OPTIONS} + ${SOURCE_PATH} + WORKING_DIRECTORY + ${BUILD_DIR} + ) + + # Step 2: Build + # Custom build - becouse vcpkg_configure_cmake() + vcpkg_install_cmake() fails on Linux for some unknown reason + if (UNIX) + find_program(MAKE make) + if(NOT MAKE) + message(FATAL_ERROR "Could not find make. Please install it through your package manager.") + endif() + vcpkg_execute_required_process(COMMAND make "install" WORKING_DIRECTORY ${BUILD_DIR}) + else() + if(RELEASE_BUILD) + SET(CONFIG "MinSizeRel") + else() + SET(CONFIG "Debug") + endif() + vcpkg_execute_required_process(COMMAND + cmake + --build . + --config ${CONFIG} + --target "install" + WORKING_DIRECTORY + ${BUILD_DIR} + ) + endif() + + if (RELEASE_BUILD) + + # remove /doc folder + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) + + # Move .dll files (if any) from /lib to /bin + file(GLOB TMP ${CURRENT_PACKAGES_DIR}/lib/*.dll) + if (TMP) + file(COPY ${TMP} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${TMP}) + + # Add bin to path + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin;$ENV{PATH}") + endif() + + else() + + # remove duplicate folders in /debug + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) + + # Move .dll files (if any) from /lib to /bin + file(GLOB TMP ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) + if (TMP) + file(COPY ${TMP} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${TMP}) + + # Add bin to path + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/bin;$ENV{PATH}") + endif() + + endif() + + message("Building ${TARGET_TRIPLET}-${BUILDTYPE}... Done") + +endforeach() + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/fmilib RENAME copyright) diff --git a/ports/fmt/CONTROL b/ports/fmt/CONTROL index 7cd59ab27b8..14306b7307d 100644 --- a/ports/fmt/CONTROL +++ b/ports/fmt/CONTROL @@ -1,3 +1,3 @@ Source: fmt -Version: 4.1.0 +Version: 5.2.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/fmt/portfile.cmake b/ports/fmt/portfile.cmake index 36ab2ac3b9d..a12f66c3970 100644 --- a/ports/fmt/portfile.cmake +++ b/ports/fmt/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO fmtlib/fmt - REF 4.1.0 - SHA512 8daaa4a61bfe63345a12df0a9bca0b1cd6a162d0f4e97d2d2978ae19a1a1357ec4d4cce948ce726cdbe9403e51ad995950a2a99de28f9b9085c02ce845540b22 + REF 5.2.1 + SHA512 2b63a741df4df9c3cbf04098c6548bb3d0f9836fe912325542298df57c888f43e72159469fb87685b423694e43e4418545377d5ee6393f2709955be2c13780a8 HEAD_REF master ) @@ -14,6 +14,7 @@ vcpkg_configure_cmake( -DFMT_CMAKE_DIR=share/fmt -DFMT_TEST=OFF -DFMT_DOC=OFF + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON ) vcpkg_install_cmake() @@ -22,19 +23,19 @@ 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/fmt.dll ${CURRENT_PACKAGES_DIR}/bin/fmt.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/fmt.dll ${CURRENT_PACKAGES_DIR}/debug/bin/fmt.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/fmtd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/fmtd.dll) # Force FMT_SHARED to 1 - file(READ ${CURRENT_PACKAGES_DIR}/include/fmt/format.h FMT_FORMAT_H) - string(REPLACE "defined(FMT_SHARED)" "1" FMT_FORMAT_H "${FMT_FORMAT_H}") - file(WRITE ${CURRENT_PACKAGES_DIR}/include/fmt/format.h "${FMT_FORMAT_H}") + file(READ ${CURRENT_PACKAGES_DIR}/include/fmt/core.h FMT_CORE_H) + string(REPLACE "defined(FMT_SHARED)" "1" FMT_CORE_H "${FMT_CORE_H}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/fmt/core.h "${FMT_CORE_H}") endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_fixup_cmake_targets() file(READ ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake FMT_DEBUG_MODULE) -string(REPLACE "lib/fmt.dll" "bin/fmt.dll" FMT_DEBUG_MODULE ${FMT_DEBUG_MODULE}) +string(REPLACE "lib/fmtd.dll" "bin/fmtd.dll" FMT_DEBUG_MODULE ${FMT_DEBUG_MODULE}) file(WRITE ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake "${FMT_DEBUG_MODULE}") file(READ ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-release.cmake FMT_RELEASE_MODULE) string(REPLACE "lib/fmt.dll" "bin/fmt.dll" FMT_RELEASE_MODULE ${FMT_RELEASE_MODULE}) diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index 13f732525a6..1711bda0341 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,5 +1,5 @@ Source: folly -Version: 2018.04.16.00 +Version: 2018.11.26.00 Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows Build-Depends: openssl, libevent, double-conversion, glog, gflags, boost-chrono, boost-context, boost-conversion, boost-crc, boost-date-time, boost-filesystem, boost-multi-index, boost-program-options, boost-regex, boost-system, boost-thread Default-Features: zlib diff --git a/ports/folly/find-gflags.patch b/ports/folly/find-gflags.patch index 986dd6d5790..a3e0116832e 100644 --- a/ports/folly/find-gflags.patch +++ b/ports/folly/find-gflags.patch @@ -1,13 +1,13 @@ -diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake -index 396fa6c..9d80d99 100644 ---- a/CMake/folly-deps.cmake -+++ b/CMake/folly-deps.cmake -@@ -22,7 +22,7 @@ list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) - - set(FOLLY_HAVE_LIBGFLAGS OFF) --find_package(GFlags CONFIG QUIET) -+find_package(gflags CONFIG REQUIRED) - if (gflags_FOUND) - message(STATUS "Found gflags from package config") - set(FOLLY_HAVE_LIBGFLAGS ON) +diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake +index 437c0cd..5530a35 100644 +--- a/CMake/folly-deps.cmake ++++ b/CMake/folly-deps.cmake +@@ -22,7 +22,7 @@ list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) + list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) + + set(FOLLY_HAVE_LIBGFLAGS OFF) +-find_package(gflags CONFIG QUIET) ++find_package(gflags CONFIG REQUIRED) + if (gflags_FOUND) + message(STATUS "Found gflags from package config") + set(FOLLY_HAVE_LIBGFLAGS ON) diff --git a/ports/folly/no-werror.patch b/ports/folly/no-werror.patch new file mode 100644 index 00000000000..32fbc949432 --- /dev/null +++ b/ports/folly/no-werror.patch @@ -0,0 +1,12 @@ +diff --git a/CMake/FollyCompilerUnix.cmake b/CMake/FollyCompilerUnix.cmake +index a9cc2c1..de7d714 100644 +--- a/CMake/FollyCompilerUnix.cmake ++++ b/CMake/FollyCompilerUnix.cmake +@@ -34,7 +34,6 @@ function(apply_folly_compile_options_to_target THETARGET) + -std=${CXX_STD} + -finput-charset=UTF-8 + -fsigned-char +- -Werror + -Wall + -Wno-deprecated + -Wno-deprecated-declarations diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 2a35561d113..c66599f7e26 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -12,16 +12,17 @@ include(vcpkg_common_functions) # Required to run build/generate_escape_tables.py et al. vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") +vcpkg_add_to_path("${PYTHON3_DIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/folly - REF v2018.04.16.00 - SHA512 1f14da6eece3a490bd134a40550c2a3f78356789090e19933b8f10bc356837ee774a21e6f0b88c45831a968587049092b9d0d77617f040ab8e177de224400408 + REF v2018.11.26.00 + SHA512 7a404df7287c9a3278bc47205023881ade188a1d3ade35748ae9ae4f35485faedc9f8c0264cfd0f3565b2d5891235deda0f515946a2c313570ef41751a3693ac HEAD_REF master PATCHES - ${CMAKE_CURRENT_LIST_DIR}/find-gflags.patch + find-gflags.patch + no-werror.patch ) file(COPY @@ -65,6 +66,7 @@ vcpkg_configure_cmake( -DLIBAIO_FOUND=OFF -DLIBURCU_FOUND=OFF -DCMAKE_DISABLE_FIND_PACKAGE_LibURCU=ON + -DCMAKE_INSTALL_DIR=share/folly ${FEATURE_OPTIONS} ) @@ -72,7 +74,7 @@ vcpkg_install_cmake(ADD_BIN_TO_PATH) vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/folly) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/folly) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/fontconfig/CMakeLists.txt b/ports/fontconfig/CMakeLists.txt index e32af9cbd45..1c552468e6a 100644 --- a/ports/fontconfig/CMakeLists.txt +++ b/ports/fontconfig/CMakeLists.txt @@ -1,20 +1,12 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.11) project(fontconfig C) -add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS) -add_definitions(-FI"${FC_INCLUDE_DIR}/config.h") - -if(CMAKE_BUILD_TYPE STREQUAL Debug) - set(LIB_SUFFIX d) -endif() +add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -DHAVE_CONFIG_H) # find dependencies -find_path(ICONV_INCLUDE_DIR iconv.h) -find_library(ICONV_LIBRARY NAMES iconv libiconv) -find_path(FREETYPE_INCLUDE_DIR ft2build.h) -find_library(FREETYPE_LIBRARY freetype${LIB_SUFFIX}) -find_path(EXPAT_INCLUDE_DIR expat.h) -find_library(EXPAT_LIBRARY expat) +find_package(unofficial-iconv CONFIG REQUIRED) +find_package(Freetype REQUIRED) +find_package(EXPAT REQUIRED) add_library(fontconfig src/fcatomic.c @@ -48,17 +40,18 @@ add_library(fontconfig set_target_properties(fontconfig PROPERTIES DEFINE_SYMBOL "FcPublic=__declspec(dllexport)") target_include_directories(fontconfig PRIVATE . - ${FC_INCLUDE_DIR} - ${FREETYPE_INCLUDE_DIR} - ${EXPAT_INCLUDE_DIR} - ${ICONV_INCLUDE_DIR}) + ${FC_INCLUDE_DIR}/alias + ${EXPAT_INCLUDE_DIR}) +if(WIN32) + target_include_directories(fontconfig PRIVATE ${FC_INCLUDE_DIR}/win32) +else() + target_include_directories(fontconfig PRIVATE ${FC_INCLUDE_DIR}/unix) +endif() -target_link_libraries(fontconfig - ${FREETYPE_LIBRARY} - ${ICONV_LIBRARY} - ${EXPAT_LIBRARY}) +target_link_libraries(fontconfig PRIVATE unofficial::iconv::libiconv Freetype::Freetype EXPAT::EXPAT) install(TARGETS fontconfig + EXPORT fontconfig-targets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) @@ -80,3 +73,20 @@ if(NOT FC_SKIP_TOOLS) install(FILES fonts.conf DESTINATION tools/fontconfig/fonts) install(DIRECTORY conf.d DESTINATION tools/fontconfig/fonts FILES_MATCHING PATTERN "*.conf") endif() + +install( + EXPORT fontconfig-targets + NAMESPACE unofficial::fontconfig:: + FILE unofficial-fontconfig-targets.cmake + DESTINATION share/unofficial-fontconfig +) + +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unofficial-fontconfig-config.cmake " +include(CMakeFindDependencyMacro) +find_dependency(unofficial-iconv CONFIG) +find_dependency(Freetype) +find_dependency(EXPAT) + +include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-fontconfig-targets.cmake) +") +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-fontconfig-config.cmake DESTINATION share/unofficial-fontconfig) diff --git a/ports/fontconfig/CONTROL b/ports/fontconfig/CONTROL index f81a2ddd667..53666165989 100644 --- a/ports/fontconfig/CONTROL +++ b/ports/fontconfig/CONTROL @@ -1,4 +1,4 @@ Source: fontconfig -Version: 2.12.4-1 +Version: 2.12.4-7 Description: Library for configuring and customizing font access. Build-Depends: freetype, expat, libiconv, dirent diff --git a/ports/fontconfig/fcobjtypehash.patch b/ports/fontconfig/fcobjtypehash.patch new file mode 100644 index 00000000000..bf86ca3b099 --- /dev/null +++ b/ports/fontconfig/fcobjtypehash.patch @@ -0,0 +1,18 @@ +diff --git a/src/fcobjs.c b/src/fcobjs.c +index 33bba8d..e6b0808 100644 +--- a/src/fcobjs.c ++++ b/src/fcobjs.c +@@ -24,11 +24,13 @@ + + #include "fcint.h" + ++#if 0 + static unsigned int + FcObjectTypeHash (register const char *str, register FC_GPERF_SIZE_T len); + + static const struct FcObjectTypeInfo * + FcObjectTypeLookup (register const char *str, register FC_GPERF_SIZE_T len); ++#endif + + #include "fcobjshash.h" + diff --git a/ports/fontconfig/include/alias/fcalias.h b/ports/fontconfig/include/alias/fcalias.h new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ports/fontconfig/include/fcaliastail.h b/ports/fontconfig/include/alias/fcaliastail.h similarity index 100% rename from ports/fontconfig/include/fcaliastail.h rename to ports/fontconfig/include/alias/fcaliastail.h diff --git a/ports/fontconfig/include/alias/fcftalias.h b/ports/fontconfig/include/alias/fcftalias.h new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ports/fontconfig/include/fcftaliastail.h b/ports/fontconfig/include/alias/fcftaliastail.h similarity index 100% rename from ports/fontconfig/include/fcftaliastail.h rename to ports/fontconfig/include/alias/fcftaliastail.h diff --git a/ports/fontconfig/include/fcobjshash.h b/ports/fontconfig/include/fcobjshash.h deleted file mode 100644 index 15829e87375..00000000000 --- a/ports/fontconfig/include/fcobjshash.h +++ /dev/null @@ -1,328 +0,0 @@ -/* ANSI-C code produced by gperf version 3.0.4 */ -/* Command-line: gperf -m 100 fcobjshash.gperf */ -/* Computed positions: -k'2-3' */ - -#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ - && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ - && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ - && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ - && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ - && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ - && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ - && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ - && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ - && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ - && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ - && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ - && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ - && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ - && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ - && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ - && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ - && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ - && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ - && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ - && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ - && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ - && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) -/* The character set is not based on ISO-646. */ -#error "gperf generated tables don't work with this execution character set. Please report a bug to ." -#endif - -#line 1 "fcobjshash.gperf" - -#line 13 "fcobjshash.gperf" -struct FcObjectTypeInfo { -int name; -int id; -}; -#include -/* maximum key range = 56, duplicates = 0 */ - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static unsigned int -FcObjectTypeHash (register const char *str, register FC_GPERF_SIZE_T len) -{ - static const unsigned char asso_values[] = - { - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 21, 30, 3, - 36, 45, 60, 3, 15, 0, 60, 60, 0, 9, - 9, 0, 21, 60, 0, 0, 15, 0, 60, 60, - 0, 15, 24, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60 - }; - return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[1]]; -} - -struct FcObjectTypeNamePool_t - { - char FcObjectTypeNamePool_str4[sizeof("file")]; - char FcObjectTypeNamePool_str5[sizeof("color")]; - char FcObjectTypeNamePool_str7[sizeof("foundry")]; - char FcObjectTypeNamePool_str8[sizeof("fullname")]; - char FcObjectTypeNamePool_str9[sizeof("pixelsize")]; - char FcObjectTypeNamePool_str10[sizeof("prgname")]; - char FcObjectTypeNamePool_str12[sizeof("fullnamelang")]; - char FcObjectTypeNamePool_str13[sizeof("globaladvance")]; - char FcObjectTypeNamePool_str14[sizeof("postscriptname")]; - char FcObjectTypeNamePool_str16[sizeof("hinting")]; - char FcObjectTypeNamePool_str17[sizeof("minspace")]; - char FcObjectTypeNamePool_str18[sizeof("hintstyle")]; - char FcObjectTypeNamePool_str19[sizeof("fontformat")]; - char FcObjectTypeNamePool_str20[sizeof("fontversion")]; - char FcObjectTypeNamePool_str21[sizeof("fontfeatures")]; - char FcObjectTypeNamePool_str22[sizeof("outline")]; - char FcObjectTypeNamePool_str23[sizeof("autohint")]; - char FcObjectTypeNamePool_str24[sizeof("dpi")]; - char FcObjectTypeNamePool_str25[sizeof("hash")]; - char FcObjectTypeNamePool_str26[sizeof("slant")]; - char FcObjectTypeNamePool_str27[sizeof("aspect")]; - char FcObjectTypeNamePool_str28[sizeof("size")]; - char FcObjectTypeNamePool_str29[sizeof("scale")]; - char FcObjectTypeNamePool_str30[sizeof("symbol")]; - char FcObjectTypeNamePool_str31[sizeof("rasterizer")]; - char FcObjectTypeNamePool_str32[sizeof("scalable")]; - char FcObjectTypeNamePool_str33[sizeof("antialias")]; - char FcObjectTypeNamePool_str34[sizeof("lang")]; - char FcObjectTypeNamePool_str35[sizeof("style")]; - char FcObjectTypeNamePool_str36[sizeof("family")]; - char FcObjectTypeNamePool_str37[sizeof("rgba")]; - char FcObjectTypeNamePool_str38[sizeof("namelang")]; - char FcObjectTypeNamePool_str39[sizeof("stylelang")]; - char FcObjectTypeNamePool_str40[sizeof("familylang")]; - char FcObjectTypeNamePool_str41[sizeof("width")]; - char FcObjectTypeNamePool_str42[sizeof("matrix")]; - char FcObjectTypeNamePool_str43[sizeof("charset")]; - char FcObjectTypeNamePool_str45[sizeof("charwidth")]; - char FcObjectTypeNamePool_str46[sizeof("charheight")]; - char FcObjectTypeNamePool_str47[sizeof("embolden")]; - char FcObjectTypeNamePool_str48[sizeof("lcdfilter")]; - char FcObjectTypeNamePool_str49[sizeof("spacing")]; - char FcObjectTypeNamePool_str50[sizeof("index")]; - char FcObjectTypeNamePool_str51[sizeof("weight")]; - char FcObjectTypeNamePool_str52[sizeof("capability")]; - char FcObjectTypeNamePool_str53[sizeof("embeddedbitmap")]; - char FcObjectTypeNamePool_str58[sizeof("decorative")]; - char FcObjectTypeNamePool_str59[sizeof("verticallayout")]; - }; -static const struct FcObjectTypeNamePool_t FcObjectTypeNamePool_contents = - { - "file", - "color", - "foundry", - "fullname", - "pixelsize", - "prgname", - "fullnamelang", - "globaladvance", - "postscriptname", - "hinting", - "minspace", - "hintstyle", - "fontformat", - "fontversion", - "fontfeatures", - "outline", - "autohint", - "dpi", - "hash", - "slant", - "aspect", - "size", - "scale", - "symbol", - "rasterizer", - "scalable", - "antialias", - "lang", - "style", - "family", - "rgba", - "namelang", - "stylelang", - "familylang", - "width", - "matrix", - "charset", - "charwidth", - "charheight", - "embolden", - "lcdfilter", - "spacing", - "index", - "weight", - "capability", - "embeddedbitmap", - "decorative", - "verticallayout" - }; -#define FcObjectTypeNamePool ((const char *) &FcObjectTypeNamePool_contents) -#ifdef __GNUC__ -__inline -#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ -__attribute__ ((__gnu_inline__)) -#endif -#endif -const struct FcObjectTypeInfo * -FcObjectTypeLookup (register const char *str, register FC_GPERF_SIZE_T len) -{ - enum - { - TOTAL_KEYWORDS = 48, - MIN_WORD_LENGTH = 3, - MAX_WORD_LENGTH = 14, - MIN_HASH_VALUE = 4, - MAX_HASH_VALUE = 59 - }; - - static const struct FcObjectTypeInfo wordlist[] = - { - {-1}, {-1}, {-1}, {-1}, -#line 38 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str4,FC_FILE_OBJECT}, -#line 64 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str5,FC_COLOR_OBJECT}, - {-1}, -#line 31 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str7,FC_FOUNDRY_OBJECT}, -#line 22 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str8,FC_FULLNAME_OBJECT}, -#line 29 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str9,FC_PIXEL_SIZE_OBJECT}, -#line 61 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str10,FC_PRGNAME_OBJECT}, - {-1}, -#line 23 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str12,FC_FULLNAMELANG_OBJECT}, -#line 37 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str13,FC_GLOBAL_ADVANCE_OBJECT}, -#line 63 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str14,FC_POSTSCRIPT_NAME_OBJECT}, - {-1}, -#line 34 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str16,FC_HINTING_OBJECT}, -#line 46 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str17,FC_MINSPACE_OBJECT}, -#line 33 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str18,FC_HINT_STYLE_OBJECT}, -#line 54 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str19,FC_FONTFORMAT_OBJECT}, -#line 52 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str20,FC_FONTVERSION_OBJECT}, -#line 60 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str21,FC_FONT_FEATURES_OBJECT}, -#line 41 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str22,FC_OUTLINE_OBJECT}, -#line 36 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str23,FC_AUTOHINT_OBJECT}, -#line 43 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str24,FC_DPI_OBJECT}, -#line 62 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str25,FC_HASH_OBJECT}, -#line 24 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str26,FC_SLANT_OBJECT}, -#line 28 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str27,FC_ASPECT_OBJECT}, -#line 27 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str28,FC_SIZE_OBJECT}, -#line 45 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str29,FC_SCALE_OBJECT}, -#line 65 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str30,FC_SYMBOL_OBJECT}, -#line 40 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str31,FC_RASTERIZER_OBJECT}, -#line 42 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str32,FC_SCALABLE_OBJECT}, -#line 32 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str33,FC_ANTIALIAS_OBJECT}, -#line 51 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str34,FC_LANG_OBJECT}, -#line 20 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str35,FC_STYLE_OBJECT}, -#line 18 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str36,FC_FAMILY_OBJECT}, -#line 44 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str37,FC_RGBA_OBJECT}, -#line 59 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str38,FC_NAMELANG_OBJECT}, -#line 21 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str39,FC_STYLELANG_OBJECT}, -#line 19 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str40,FC_FAMILYLANG_OBJECT}, -#line 26 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str41,FC_WIDTH_OBJECT}, -#line 49 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str42,FC_MATRIX_OBJECT}, -#line 50 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str43,FC_CHARSET_OBJECT}, - {-1}, -#line 47 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str45,FC_CHARWIDTH_OBJECT}, -#line 48 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str46,FC_CHAR_HEIGHT_OBJECT}, -#line 55 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str47,FC_EMBOLDEN_OBJECT}, -#line 58 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str48,FC_LCD_FILTER_OBJECT}, -#line 30 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str49,FC_SPACING_OBJECT}, -#line 39 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str50,FC_INDEX_OBJECT}, -#line 25 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str51,FC_WEIGHT_OBJECT}, -#line 53 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str52,FC_CAPABILITY_OBJECT}, -#line 56 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str53,FC_EMBEDDED_BITMAP_OBJECT}, - {-1}, {-1}, {-1}, {-1}, -#line 57 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str58,FC_DECORATIVE_OBJECT}, -#line 35 "fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str59,FC_VERTICAL_LAYOUT_OBJECT} - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - register int key = FcObjectTypeHash (str, len); - - if (key <= MAX_HASH_VALUE && key >= 0) - { - register int o = wordlist[key].name; - if (o >= 0) - { - register const char *s = o + FcObjectTypeNamePool; - - if (*str == *s && !strcmp (str + 1, s + 1)) - return &wordlist[key]; - } - } - } - return 0; -} diff --git a/ports/fontconfig/include/fcstdint.h b/ports/fontconfig/include/fcstdint.h deleted file mode 100644 index e317b2aa45b..00000000000 --- a/ports/fontconfig/include/fcstdint.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _FONTCONFIG_SRC_FCSTDINT_H -#define _FONTCONFIG_SRC_FCSTDINT_H 1 -#ifndef _GENERATED_STDINT_H -#define _GENERATED_STDINT_H "fontconfig 2.12.3" -/* generated using gnu compiler gcc.exe (Rev3, Built by MSYS2 project) 6.3.0 */ -#define _STDINT_HAVE_STDINT_H 1 -#include -#endif -#endif diff --git a/ports/fontconfig/include/unix/config.h b/ports/fontconfig/include/unix/config.h new file mode 100644 index 00000000000..5b5da37926d --- /dev/null +++ b/ports/fontconfig/include/unix/config.h @@ -0,0 +1,376 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +#define FC_CACHEDIR "./" + +/* The normal alignment of `double', in bytes. */ +#define ALIGNOF_DOUBLE 8 + +/* The normal alignment of `void *', in bytes. */ +#if defined(_WIN64) +#define ALIGNOF_VOID_P 8 +#else +#define ALIGNOF_VOID_P 4 +#endif + +/* Use libxml2 instead of Expat */ +/* #undef ENABLE_LIBXML2 */ + +/* Additional font directories */ +#define FC_ADD_FONTS "yes" + +/* Architecture prefix to use for cache file names */ +/* #undef FC_ARCHITECTURE */ + +/* System font directory */ +#define FC_DEFAULT_FONTS "" + +/* The type of len parameter of the gperf hash/lookup function */ +#define FC_GPERF_SIZE_T size_t + +/* Define to nothing if C supports flexible array members, and to 1 if it does + not. That way, with a declaration like `struct s { int n; double + d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 + compilers. When computing the size of such an object, don't use 'sizeof + (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)' + instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with + MSVC and with C++ compilers. */ +#define FLEXIBLE_ARRAY_MEMBER /**/ + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +/* #undef HAVE_DOPRNT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `fstatfs' function. */ +/* #undef HAVE_FSTATFS */ + +/* Define to 1 if you have the `fstatvfs' function. */ +/* #undef HAVE_FSTATVFS */ + +/* FT_Bitmap_Size structure includes y_ppem field */ +#define HAVE_FT_BITMAP_SIZE_Y_PPEM 1 + +/* Define to 1 if you have the `FT_Get_BDF_Property' function. */ +#define HAVE_FT_GET_BDF_PROPERTY 1 + +/* Define to 1 if you have the `FT_Get_Next_Char' function. */ +#define HAVE_FT_GET_NEXT_CHAR 1 + +/* Define to 1 if you have the `FT_Get_PS_Font_Info' function. */ +#define HAVE_FT_GET_PS_FONT_INFO 1 + +/* Define to 1 if you have the `FT_Get_X11_Font_Format' function. */ +#define HAVE_FT_GET_X11_FONT_FORMAT 1 + +/* Define to 1 if you have the `FT_Has_PS_Glyph_Names' function. */ +#define HAVE_FT_HAS_PS_GLYPH_NAMES 1 + +/* Define to 1 if you have the `FT_Select_Size' function. */ +#define HAVE_FT_SELECT_SIZE 1 + +/* Define to 1 if you have the `getexecname' function. */ +/* #undef HAVE_GETEXECNAME */ + +/* Define to 1 if you have the `getopt' function. */ +#define HAVE_GETOPT 1 + +/* Define to 1 if you have the `getopt_long' function. */ +#define HAVE_GETOPT_LONG 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getprogname' function. */ +/* #undef HAVE_GETPROGNAME */ + +/* Have Intel __sync_* atomic primitives */ +#define HAVE_INTEL_ATOMIC_PRIMITIVES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `link' function. */ +/* #undef HAVE_LINK */ + +/* Define to 1 if you have the `lrand48' function. */ +/* #undef HAVE_LRAND48 */ + +/* Define to 1 if you have the `lstat' function. */ +/* #undef HAVE_LSTAT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mkdtemp' function. */ +/* #undef HAVE_MKDTEMP */ + +/* Define to 1 if you have the `mkostemp' function. */ +/* #undef HAVE_MKOSTEMP */ + +/* Define to 1 if you have the `mkstemp' function. */ +#define HAVE_MKSTEMP 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the 'posix_fadvise' function. */ +/* #undef HAVE_POSIX_FADVISE */ + +/* Have POSIX threads */ +#define HAVE_PTHREAD 1 + +/* Have PTHREAD_PRIO_INHERIT. */ +/* #undef HAVE_PTHREAD_PRIO_INHERIT */ + +/* Define to 1 if you have the `rand' function. */ +#define HAVE_RAND 1 + +/* Define to 1 if you have the `random' function. */ +/* #undef HAVE_RANDOM */ + +/* Define to 1 if you have the `random_r' function. */ +/* #undef HAVE_RANDOM_R */ + +/* Define to 1 if you have the `rand_r' function. */ +/* #undef HAVE_RAND_R */ + +/* Define to 1 if you have the `readlink' function. */ +/* #undef HAVE_READLINK */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SCHED_H */ + +/* Have sched_yield */ +/* #undef HAVE_SCHED_YIELD */ + +/* Have Solaris __machine_*_barrier and atomic_* operations */ +/* #undef HAVE_SOLARIS_ATOMIC_OPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if `d_type' is a member of `struct dirent'. */ +/* #undef HAVE_STRUCT_DIRENT_D_TYPE */ + +/* Define to 1 if `f_flags' is a member of `struct statfs'. */ +/* #undef HAVE_STRUCT_STATFS_F_FLAGS */ + +/* Define to 1 if `f_fstypename' is a member of `struct statfs'. */ +/* #undef HAVE_STRUCT_STATFS_F_FSTYPENAME */ + +/* Define to 1 if `f_basetype' is a member of `struct statvfs'. */ +/* #undef HAVE_STRUCT_STATVFS_F_BASETYPE */ + +/* Define to 1 if `f_fstypename' is a member of `struct statvfs'. */ +/* #undef HAVE_STRUCT_STATVFS_F_FSTYPENAME */ + +/* Define to 1 if `st_mtim' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_MTIM */ + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_MOUNT_H */ + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_PARAM_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_STATFS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_STATVFS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_VFS_H */ + +/* Define to 1 if `usLowerOpticalPointSize' is a member of `TT_OS2'. */ +#define HAVE_TT_OS2_USLOWEROPTICALPOINTSIZE 1 + +/* Define to 1 if `usUpperOpticalPointSize' is a member of `TT_OS2'. */ +#define HAVE_TT_OS2_USUPPEROPTICALPOINTSIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `vprintf' function. */ +#define HAVE_VPRINTF 1 + +/* Can use #warning in C files */ +#define HAVE_WARNING_CPP_DIRECTIVE 1 + +/* Use xmlparse.h instead of expat.h */ +/* #undef HAVE_XMLPARSE_H */ + +/* Define to 1 if you have the `XML_SetDoctypeDeclHandler' function. */ +#define HAVE_XML_SETDOCTYPEDECLHANDLER 1 + +/* Define to 1 if you have the `_mktemp_s' function. */ +/* #undef HAVE__MKTEMP_S */ + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "fontconfig" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "fontconfig" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "fontconfig 2.12.3" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "fontconfig" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.12.3" + +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ + +/* The size of `char', as computed by sizeof. */ +/* #undef SIZEOF_CHAR */ + +/* The size of `int', as computed by sizeof. */ +/* #undef SIZEOF_INT */ + +/* The size of `long', as computed by sizeof. */ +/* #undef SIZEOF_LONG */ + +/* The size of `short', as computed by sizeof. */ +/* #undef SIZEOF_SHORT */ + +/* The size of `void*', as computed by sizeof. */ +/* #undef SIZEOF_VOIDP */ + +/* The size of `void *', as computed by sizeof. */ +#if defined(_WIN64) +#define SIZEOF_VOIDP 8 +#define SIZEOF_VOID_P 8 +#else +#define SIZEOF_VOIDP 4 +#define SIZEOF_VOID_P 4 +#endif + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Use iconv. */ +#define USE_ICONV 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "2.12.3" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#define _FILE_OFFSET_BITS 64 + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +#define FONTCONFIG_PATH "/etc/fonts" + +#include "config-fixups.h" diff --git a/ports/fontconfig/include/config.h b/ports/fontconfig/include/win32/config.h similarity index 100% rename from ports/fontconfig/include/config.h rename to ports/fontconfig/include/win32/config.h diff --git a/ports/fontconfig/include/unistd.h b/ports/fontconfig/include/win32/unistd.h similarity index 100% rename from ports/fontconfig/include/unistd.h rename to ports/fontconfig/include/win32/unistd.h diff --git a/ports/fontconfig/portfile.cmake b/ports/fontconfig/portfile.cmake index f3bc3e2efee..fff6eb477b8 100644 --- a/ports/fontconfig/portfile.cmake +++ b/ports/fontconfig/portfile.cmake @@ -1,13 +1,20 @@ include(vcpkg_common_functions) + set(FONTCONFIG_VERSION 2.12.4) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fontconfig-${FONTCONFIG_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://www.freedesktop.org/software/fontconfig/release/fontconfig-${FONTCONFIG_VERSION}.tar.gz" FILENAME "fontconfig-${FONTCONFIG_VERSION}.tar.gz" - SHA512 2be3ee0e8e0e3b62571135a3cae06e456c289dd1ad40ef2a7c780406418ee5efce863a833eca5a8ef55bc737a0ea04ef562bba6fd27e174ae43e42131b52810d) + SHA512 2be3ee0e8e0e3b62571135a3cae06e456c289dd1ad40ef2a7c780406418ee5efce863a833eca5a8ef55bc737a0ea04ef562bba6fd27e174ae43e42131b52810d +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${FONTCONFIG_VERSION} + PATCHES fcobjtypehash.patch +) -vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( @@ -17,9 +24,13 @@ vcpkg_configure_cmake( -DFC_INCLUDE_DIR=${CMAKE_CURRENT_LIST_DIR}/include OPTIONS_DEBUG -DFC_SKIP_TOOLS=ON - -DFC_SKIP_HEADERS=ON) + -DFC_SKIP_HEADERS=ON +) vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-fontconfig TARGET_PATH share/unofficial-fontconfig) + vcpkg_copy_pdbs() if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) @@ -32,3 +43,5 @@ endif() file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fontconfig) file(RENAME ${CURRENT_PACKAGES_DIR}/share/fontconfig/COPYING ${CURRENT_PACKAGES_DIR}/share/fontconfig/copyright) + +vcpkg_test_cmake(PACKAGE_NAME unofficial-fontconfig) diff --git a/ports/forest/CONTROL b/ports/forest/CONTROL index 76dbbf47e7c..ceae2bbdaca 100644 --- a/ports/forest/CONTROL +++ b/ports/forest/CONTROL @@ -1,3 +1,3 @@ Source: forest -Version: 7.0.6 +Version: 9.0.6 Description: Template library of tree data structures diff --git a/ports/forest/portfile.cmake b/ports/forest/portfile.cmake index 48ab6c9dd5f..c1f0db8811c 100644 --- a/ports/forest/portfile.cmake +++ b/ports/forest/portfile.cmake @@ -3,13 +3,13 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xorz57/forest - REF 7.0.6 - SHA512 a1e5d27f2b8b9e6758a67a9124fc25517074c633644651b26f6683bab09189569e75ccf4ae7d9cfeddae234435b073fc00e0f5385c4e9370062c3e8b222c1c59 + REF 9.0.6 + SHA512 7cb6f25226bbd543332599d5ad2b8e13df6f06342ea12b58ed123ffd81d1362e10c2e01ff95132f7b25431a3ae984bee5cfb86852aa222e1fad1f4e6928f76bc HEAD_REF master ) # Handle headers -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h") +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/forest RENAME copyright) diff --git a/ports/freeglut/CONTROL b/ports/freeglut/CONTROL index d7c3801f72c..c6f595c2f27 100644 --- a/ports/freeglut/CONTROL +++ b/ports/freeglut/CONTROL @@ -1,3 +1,3 @@ Source: freeglut -Version: 3.0.0-3 +Version: 3.0.0-5 Description: Open source implementation of GLUT with source and binary backwards compatibility. diff --git a/ports/freeglut/portfile.cmake b/ports/freeglut/portfile.cmake index 3e624812670..3be83ed4a17 100644 --- a/ports/freeglut/portfile.cmake +++ b/ports/freeglut/portfile.cmake @@ -7,6 +7,10 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message("Freeglut currently requires the following libraries from the system package manager:\n opengl\n glu\n libx11\n\nThese can be installed on Ubuntu systems via apt-get install libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev") +endif() + # disable debug suffix, because FindGLUT.cmake from CMake 3.8 doesn't support it file(READ ${SOURCE_PATH}/CMakeLists.txt FREEGLUT_CMAKELISTS) string(REPLACE "SET( CMAKE_DEBUG_POSTFIX \"d\" )" @@ -21,6 +25,12 @@ else() set(FREEGLUT_DYNAMIC OFF) endif() +# Patch header +file(READ ${SOURCE_PATH}/include/GL/freeglut_std.h FREEGLUT_STDH) +string(REGEX REPLACE "\"freeglut[_a-z]+.lib\"" + "\"freeglut.lib\"" FREEGLUT_STDH "${FREEGLUT_STDH}") +file(WRITE ${SOURCE_PATH}/include/GL/freeglut_std.h "${FREEGLUT_STDH}") + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS @@ -32,18 +42,12 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -# Patch header -file(READ ${CURRENT_PACKAGES_DIR}/include/GL/freeglut_std.h FREEGLUT_STDH) -string(REPLACE "pragma comment (lib, \"freeglut_staticd.lib\")" - "pragma comment (lib, \"freeglut.lib\")" FREEGLUT_STDH "${FREEGLUT_STDH}") -string(REPLACE "pragma comment (lib, \"freeglutd.lib\")" - "pragma comment (lib, \"freeglut.lib\")" FREEGLUT_STDH "${FREEGLUT_STDH}") -file(WRITE ${CURRENT_PACKAGES_DIR}/include/GL/freeglut_std.h "${FREEGLUT_STDH}") - # Rename static lib (otherwise it's incompatible with FindGLUT.cmake) -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/lib/freeglut.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut.lib) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/lib/freeglut.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut.lib) + endif() endif() # Clean diff --git a/ports/freeimage/CMakeLists.txt b/ports/freeimage/CMakeLists.txt index 9f4f1677bee..997fba37a7b 100644 --- a/ports/freeimage/CMakeLists.txt +++ b/ports/freeimage/CMakeLists.txt @@ -7,6 +7,9 @@ project(FreeImage C CXX) find_package(zlib REQUIRED) find_package(PNG REQUIRED) find_package(JPEG REQUIRED) +if(NOT JPEG_LIBRARY_DEBUG) + set(JPEG_LIBRARY_DEBUG ${JPEG_LIBRARY_RELEASE}) +endif() find_package(TIFF REQUIRED) find_package(OPENJPEG REQUIRED) @@ -36,9 +39,8 @@ set(ROOT_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/CacheFile.h ${REAL_SOURCE_DIR}/Plugin.h ${REAL_SOURCE_DIR}/Quantizers.h ${REAL_SOURCE_DIR}/ToneMapping.h - ${REAL_SOURCE_DIR}/Utilities.h - ${REAL_SOURCE_DIR}/DeprecationManager/DeprecationMgr.h) - + ${REAL_SOURCE_DIR}/Utilities.h) + file(GLOB FREEIMAGE_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/FreeImage/*.h) file(GLOB FREEIMAGE_TOOLKIT_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/FreeImageToolkit/*.h) file(GLOB METADATA_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/Metadata/*.h) diff --git a/ports/freeimage/CONTROL b/ports/freeimage/CONTROL index 6e8de82fc84..d8bd820e694 100644 --- a/ports/freeimage/CONTROL +++ b/ports/freeimage/CONTROL @@ -1,4 +1,4 @@ Source: freeimage -Version: 3.17.0-4 +Version: 3.18.0-2 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp, libraw, jxrlib, openexr Description: Support library for graphics image formats diff --git a/ports/freeimage/fix-function-overload.patch b/ports/freeimage/fix-function-overload.patch new file mode 100644 index 00000000000..adb1164f6d1 --- /dev/null +++ b/ports/freeimage/fix-function-overload.patch @@ -0,0 +1,40 @@ +diff --git a/Source/FreeImage/PluginJPEG.cpp b/Source/FreeImage/PluginJPEG.cpp +index 8db177d..efa2c4e 100644 +--- a/Source/FreeImage/PluginJPEG.cpp ++++ b/Source/FreeImage/PluginJPEG.cpp +@@ -503,7 +503,7 @@ marker_is_icc(jpeg_saved_marker_ptr marker) { + return FALSE. You might want to issue an error message instead. + */ + static BOOL +-jpeg_read_icc_profile(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) { ++jpeg_read_icc_profile_(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) { + jpeg_saved_marker_ptr marker; + int num_markers = 0; + int seq_no; +@@ -745,7 +745,7 @@ read_markers(j_decompress_ptr cinfo, FIBITMAP *dib) { + BYTE *icc_profile = NULL; + unsigned icc_length = 0; + +- if( jpeg_read_icc_profile(cinfo, &icc_profile, &icc_length) ) { ++ if( jpeg_read_icc_profile_(cinfo, &icc_profile, &icc_length) ) { + // copy ICC profile data + FreeImage_CreateICCProfile(dib, icc_profile, icc_length); + // clean up +@@ -785,7 +785,7 @@ jpeg_write_comment(j_compress_ptr cinfo, FIBITMAP *dib) { + Write JPEG_APP2 marker (ICC profile) + */ + static BOOL +-jpeg_write_icc_profile(j_compress_ptr cinfo, FIBITMAP *dib) { ++jpeg_write_icc_profile_(j_compress_ptr cinfo, FIBITMAP *dib) { + // marker identifying string "ICC_PROFILE" (null-terminated) + BYTE icc_signature[12] = { 0x49, 0x43, 0x43, 0x5F, 0x50, 0x52, 0x4F, 0x46, 0x49, 0x4C, 0x45, 0x00 }; + +@@ -1038,7 +1038,7 @@ write_markers(j_compress_ptr cinfo, FIBITMAP *dib) { + jpeg_write_comment(cinfo, dib); + + // write ICC profile +- jpeg_write_icc_profile(cinfo, dib); ++ jpeg_write_icc_profile_(cinfo, dib); + + // write IPTC profile + jpeg_write_iptc_profile(cinfo, dib); diff --git a/ports/freeimage/portfile.cmake b/ports/freeimage/portfile.cmake index db8d2537a50..6f3cfaebe0f 100644 --- a/ports/freeimage/portfile.cmake +++ b/ports/freeimage/portfile.cmake @@ -2,9 +2,9 @@ include(${CMAKE_TRIPLET_FILE}) include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FreeImage) vcpkg_download_distfile(ARCHIVE - URLS "http://downloads.sourceforge.net/freeimage/FreeImage3170.zip" - FILENAME "FreeImage3170.zip" - SHA512 703c2626c0bcfe73eb40d720f45745208ca9650a7730759680a2b38ad3f6c719a43008477032bc70b76a95761f7d4b6f901b961359d36b54ace906dd78fb391b + URLS "http://downloads.sourceforge.net/freeimage/FreeImage3180.zip" + FILENAME "FreeImage3180.zip" + SHA512 9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818 ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -40,6 +40,7 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/use-external-webp.patch" "${CMAKE_CURRENT_LIST_DIR}/use-external-openexr.patch" "${CMAKE_CURRENT_LIST_DIR}/use-freeimage-config-include.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-function-overload.patch" ) vcpkg_configure_cmake( diff --git a/ports/freeimage/use-external-webp.patch b/ports/freeimage/use-external-webp.patch index ae632843115..4d1757c395f 100644 --- a/ports/freeimage/use-external-webp.patch +++ b/ports/freeimage/use-external-webp.patch @@ -1,14 +1,13 @@ diff --git a/Source/FreeImage/PluginWebP.cpp b/Source/FreeImage/PluginWebP.cpp -index 9fb0b69..c401447 100644 +index 7c9f62f..c401447 100644 --- a/Source/FreeImage/PluginWebP.cpp +++ b/Source/FreeImage/PluginWebP.cpp -@@ -24,10 +24,9 @@ +@@ -24,9 +24,9 @@ #include "../Metadata/FreeImageTag.h" -#include "../LibWebP/src/webp/decode.h" -#include "../LibWebP/src/webp/encode.h" --#include "../LibWebP/src/enc/vp8enci.h" -#include "../LibWebP/src/webp/mux.h" +#include +#include diff --git a/ports/freeimage/use-freeimage-config-include.patch b/ports/freeimage/use-freeimage-config-include.patch index 4927aff5bec..579f08845e1 100644 --- a/ports/freeimage/use-freeimage-config-include.patch +++ b/ports/freeimage/use-freeimage-config-include.patch @@ -1,9 +1,9 @@ diff --git a/Source/FreeImage.h b/Source/FreeImage.h -index cc66b7d..cc66812 100644 +index 12182cd..86a1e68 100644 --- a/Source/FreeImage.h +++ b/Source/FreeImage.h @@ -32,6 +32,11 @@ - #define FREEIMAGE_MINOR_VERSION 17 + #define FREEIMAGE_MINOR_VERSION 18 #define FREEIMAGE_RELEASE_SERIAL 0 +// vcpkg specific includes -------------------------------------------------- diff --git a/ports/freetype-gl/CONTROL b/ports/freetype-gl/CONTROL index ba4db539101..df88ab84f36 100644 --- a/ports/freetype-gl/CONTROL +++ b/ports/freetype-gl/CONTROL @@ -1,4 +1,4 @@ Source: freetype-gl -Version: 2018-02-25 +Version: 2018-09-18 Description: OpenGL text using one vertex buffer, one texture and FreeType Build-Depends: glew, freetype diff --git a/ports/freetype-gl/portfile.cmake b/ports/freetype-gl/portfile.cmake index c627ad43cee..2a811d714aa 100644 --- a/ports/freetype-gl/portfile.cmake +++ b/ports/freetype-gl/portfile.cmake @@ -8,14 +8,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO rougier/freetype-gl - REF bcd2b5fb5d19f1ea5d384d0edbdda2f6d0590fa0 - SHA512 10bd8e874598e796c3123c8bc277ecb6f5d95c924c6d6bab1bec4700864c83e2f71bf9ac45c15eadba9e150660cbe9debe3509428b10264eb6a8ba64a80f3651 + REF 7a290ac372d2bd94137a9fed6b2f5a6ac4360ec2 + SHA512 bcdd34b7cee1ebe01ae83211e7b772742f9740aa713298f6fb72e7076f5fecdb3aea12f67a5fe04e8606d9533a0ceef7c1152368643dc51a7339b0e5dd307afa HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Use-external-Glew-and-Freetype.patch" + PATCHES 0001-Use-external-Glew-and-Freetype.patch ) # make sure that no "internal" libraries are used by removing them diff --git a/ports/freetype/portfile.cmake b/ports/freetype/portfile.cmake index 15e8aceab16..d74c53220f2 100644 --- a/ports/freetype/portfile.cmake +++ b/ports/freetype/portfile.cmake @@ -2,7 +2,7 @@ include(vcpkg_common_functions) set(FT_VERSION 2.8.1) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freetype-${FT_VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "http://download.savannah.gnu.org/releases/freetype/freetype-${FT_VERSION}.tar.bz2" + URLS "https://download-mirror.savannah.gnu.org/releases/freetype/freetype-${FT_VERSION}.tar.bz2" FILENAME "freetype-${FT_VERSION}.tar.bz2" SHA512 ca59e47f0fceeeb9b8032be2671072604d0c79094675df24187829c05e99757d0a48a0f8062d4d688e056f783aa8f6090d732ad116562e94784fccf1339eb823 ) diff --git a/ports/fribidi/CONTROL b/ports/fribidi/CONTROL new file mode 100644 index 00000000000..65e9a2248d3 --- /dev/null +++ b/ports/fribidi/CONTROL @@ -0,0 +1,3 @@ +Source: fribidi +Version: 1.0.5 +Description: GNU FriBidi is an implementation of the Unicode Bidirectional Algorithm (bidi) diff --git a/ports/fribidi/portfile.cmake b/ports/fribidi/portfile.cmake new file mode 100644 index 00000000000..d366b89ef48 --- /dev/null +++ b/ports/fribidi/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fribidi/fribidi + REF v1.0.5 + SHA512 c51b67cc3e7610bef9a66f2456f7602fe010164c2c01e7d91026cefa4a08fdce5165b6eb3814e76cd89e766356fb71adc08bf75d9b2f5802f71c18b5d0476887 +HEAD_REF master) + +vcpkg_configure_meson(SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -Ddocs=false + --backend=ninja) + +vcpkg_install_meson() +vcpkg_copy_pdbs() + +file(GLOB EXE_FILES + "${CURRENT_PACKAGES_DIR}/bin/*.exe" + "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe" +) +if (EXE_FILES) + file(REMOVE ${EXE_FILES}) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fribidi RENAME copyright) \ No newline at end of file diff --git a/ports/fruit/CONTROL b/ports/fruit/CONTROL new file mode 100644 index 00000000000..4e7bd9f8dc5 --- /dev/null +++ b/ports/fruit/CONTROL @@ -0,0 +1,4 @@ +Source: fruit +Version: 3.4.0-1 +Description: Fruit, a dependency injection framework for C++ by Google + diff --git a/ports/fruit/portfile.cmake b/ports/fruit/portfile.cmake new file mode 100644 index 00000000000..a945e63bdd0 --- /dev/null +++ b/ports/fruit/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/fruit + REF v3.4.0 + SHA512 d78c76432c77acc4cc6ccf3fd9627a3fb2a0aa55d1baf7346422e9f1c1e048237d136588b44cfa943b542b43adbbb62fcd524e4a1cb870e9ffe8b7cf4dadb35d + HEAD_REF master +) + +# TODO: Make boost an optional dependency? +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFRUIT_USES_BOOST=False +) + +vcpkg_install_cmake() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/fruit/copyright COPYONLY) diff --git a/ports/gdal/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch b/ports/gdal/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch deleted file mode 100644 index 7817c4a38fc..00000000000 --- a/ports/gdal/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/nmake.opt b/nmake.opt -index bd5719c2d1..f6101ccd59 100644 ---- a/nmake.opt -+++ b/nmake.opt -@@ -127,18 +127,28 @@ CXX_PDB_FLAGS=/Zi /Fd$(GDAL_ROOT)\gdal$(VERSION).pdb - CXX_PDB_FLAGS= - !ENDIF - -+# Flags to choose CRT variant to link against (e.g. static: /MT, /MTd, dynamic: /MD, /MDd) -+# Ensure MRSID_CONFIG in mrsid/nmake.opt is set appropriately as well -+!IFNDEF CXX_CRT_FLAGS -+!IFNDEF DEBUG -+CXX_CRT_FLAGS=/MD -+!ELSE -+CXX_CRT_FLAGS=/MDd -+!ENDIF -+!ENDIF -+ - !IFNDEF OPTFLAGS - !IF $(MSVC_VER) >= 1400 - !IFNDEF DEBUG --OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG -+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG - !ELSE --OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG -+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG - !ENDIF - !ELSE - !IFNDEF DEBUG --OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /Ox /FC /DNDEBUG -+OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /Ox /DNDEBUG - !ELSE --OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /FC /DDEBUG -+OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /DDEBUG - !ENDIF - !ENDIF #MSVC_VER - !ENDIF # OPTFLAGS diff --git a/ports/gdal/0001-Fix-debug-crt-flags.patch b/ports/gdal/0001-Fix-debug-crt-flags.patch new file mode 100644 index 00000000000..aab3d40ca9c --- /dev/null +++ b/ports/gdal/0001-Fix-debug-crt-flags.patch @@ -0,0 +1,27 @@ +diff -Nuar a/nmake.opt b/nmake.opt +--- a/nmake.opt 2018-05-04 09:05:46.000000000 +0200 ++++ b/nmake.opt 2018-05-11 22:58:39.387603800 +0200 +@@ -124,11 +124,21 @@ + CXX_PDB_FLAGS= + !ENDIF + ++# Flags to choose CRT variant to link against (e.g. static: /MT, /MTd, dynamic: /MD, /MDd) ++# Ensure MRSID_CONFIG in mrsid/nmake.opt is set appropriately as well ++!IFNDEF CXX_CRT_FLAGS ++!IFNDEF DEBUG ++CXX_CRT_FLAGS=/MD ++!ELSE ++CXX_CRT_FLAGS=/MDd ++!ENDIF ++!ENDIF ++ + !IFNDEF OPTFLAGS + !IFNDEF DEBUG +-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG ++OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG + !ELSE +-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MDd /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG ++OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG + !ENDIF + !ENDIF # OPTFLAGS + diff --git a/ports/gdal/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch b/ports/gdal/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch deleted file mode 100644 index 57030b99b61..00000000000 --- a/ports/gdal/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/nmake.opt b/nmake.opt -index bd5719c2d1..c0ca442cbe 100644 ---- a/nmake.opt -+++ b/nmake.opt -@@ -195,6 +205,9 @@ SOFTWARNFLAGS= /wd4244 /wd4702 /wd4701 /wd4013 /wd4706 /wd4057 /wd4210 /wd4305 - # Linker debug options - !IFDEF DEBUG - LDEBUG= /debug -+!ELSEIFDEF WITH_PDB -+# Ensures that PDB is included in release DLL if so requested -+LDEBUG= /debug /opt:ref /opt:icf - !ENDIF - - # Uncomment the following if you are building for 64-bit windows diff --git a/ports/gdal/0003-Fix-openjpeg-include.patch b/ports/gdal/0003-Fix-openjpeg-include.patch deleted file mode 100644 index 4ea72690cba..00000000000 --- a/ports/gdal/0003-Fix-openjpeg-include.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/frmts/openjpeg/openjpegdataset.cpp b/frmts/openjpeg/openjpegdataset.cpp -index 5978882bc9..72cc7b9559 100644 ---- a/frmts/openjpeg/openjpegdataset.cpp -+++ b/frmts/openjpeg/openjpegdataset.cpp -@@ -34,14 +34,8 @@ - #pragma clang diagnostic ignored "-Wdocumentation" - #endif - --#if defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20200 --#include --#elif defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20100 --#include --#else - #include /* openjpeg.h needs FILE* */ --#include --#endif -+#include - - #ifdef __clang__ - #pragma clang diagnostic pop diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL index c958ac671bf..7686d13abb4 100644 --- a/ports/gdal/CONTROL +++ b/ports/gdal/CONTROL @@ -1,4 +1,13 @@ Source: gdal -Version: 2.2.2-1 +Version: 2.3.2 Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. -Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, libmysql, openjpeg, libwebp, libxml2, liblzma +Build-Depends: proj, libpng, geos, sqlite3, curl, expat, libpq, openjpeg, libwebp, libxml2, liblzma +Default-Features: mysql-libmysql + +Feature: mysql-libmysql +Build-Depends: libmysql +Description: Add mysql support using libmysql + +Feature: mysql-libmariadb +Build-Depends: libmariadb +Description: Add mysql support using libmariadb diff --git a/ports/gdal/no-my-bool.patch b/ports/gdal/no-my-bool.patch deleted file mode 100644 index 1ed0279ee96..00000000000 --- a/ports/gdal/no-my-bool.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp -index 8733af9..f49d862 100644 ---- a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp -+++ b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp -@@ -259,7 +259,7 @@ int OGRMySQLDataSource::Open( const char * pszNewName, char** papszOpenOptionsIn - // Enable automatic reconnection - // Must be called after mysql_real_connect() on MySQL < 5.0.19 - // and at any point on more recent versions. -- my_bool reconnect = 1; -+ bool reconnect = 1; - mysql_options(hConn, MYSQL_OPT_RECONNECT, &reconnect); - } - diff --git a/ports/gdal/no-mysql-global-h.patch b/ports/gdal/no-mysql-global-h.patch deleted file mode 100644 index 57ff89ce3c6..00000000000 --- a/ports/gdal/no-mysql-global-h.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ogr/ogrsf_frmts/mysql/ogr_mysql.h b/ogr/ogrsf_frmts/mysql/ogr_mysql.h -index 76a6762..b2f0fcb 100644 ---- a/ogr/ogrsf_frmts/mysql/ogr_mysql.h -+++ b/ogr/ogrsf_frmts/mysql/ogr_mysql.h -@@ -43,7 +43,7 @@ - #pragma warning( disable : 4211 ) /* nonstandard extension used : redefined extern to static */ - #endif - --#include -+/* #include */ /* Mysql 8+ no longer ships with my_global.h */ - #include - - #ifdef _MSC_VER diff --git a/ports/gdal/no-mysql-sys-h.patch b/ports/gdal/no-mysql-sys-h.patch deleted file mode 100644 index 951425386c3..00000000000 --- a/ports/gdal/no-mysql-sys-h.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp -index e694bbd..8733af9 100644 ---- a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp -+++ b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp -@@ -44,7 +44,7 @@ - #pragma clang diagnostic ignored "-Wunknown-pragmas" - #pragma clang diagnostic ignored "-Wdocumentation" - #endif --#include -+/*#include mysql 8.1 no longer ships with my_sys.h*/ - #ifdef __clang__ - #pragma clang diagnostic pop - #endif diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 10e2ceab861..3d46cbccca3 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -1,3 +1,11 @@ +# vcpkg portfile.cmake for GDAL +# +# NOTE: update the version and checksum for new GDAL release +set(GDAL_VERSION_STR "2.3.2") +set(GDAL_VERSION_PKG "232") +set(GDAL_VERSION_LIB "203") +set(GDAL_PACKAGE_SUM "9eb26be57657b1f1eaada4794859584d53bd58e0d504eb12ab97e9c60353d0a565dc894a89829ee50fc549cb7d069a75b7895c0dd4cea887e010671f63e945b8") + if (TRIPLET_SYSTEM_ARCH MATCHES "arm") message(FATAL_ERROR "ARM is currently not supported.") endif() @@ -11,28 +19,30 @@ endif() include(vcpkg_common_functions) vcpkg_download_distfile(ARCHIVE - URLS "http://download.osgeo.org/gdal/2.2.2/gdal222.zip" - FILENAME "gdal222.zip" - SHA512 b886238a7915c97f4acec5920dabe959d1ab15a8be0bc31ba0d05ad69d1d7d96f864faf0aa82921fa1a1b40b733744202b86f2f45ff63d6518cd18a53f3544a8 - ) + URLS "http://download.osgeo.org/gdal/${GDAL_VERSION_STR}/gdal${GDAL_VERSION_PKG}.zip" + FILENAME "gdal${GDAL_VERSION_PKG}.zip" + SHA512 ${GDAL_PACKAGE_SUM} +) # Extract source into architecture specific directory, because GDALs' nmake based build currently does not # support out of source builds. -set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-2.2.2) -set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-2.2.2) +set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-${GDAL_VERSION_STR}) +set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-${GDAL_VERSION_STR}) -foreach(BUILD_TYPE debug release) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + list(APPEND BUILD_TYPES "release") +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + list(APPEND BUILD_TYPES "debug") +endif() + +foreach(BUILD_TYPE IN LISTS BUILD_TYPES) file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-2.2.2 + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-${GDAL_VERSION_STR} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch - ${CMAKE_CURRENT_LIST_DIR}/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch - ${CMAKE_CURRENT_LIST_DIR}/0003-Fix-openjpeg-include.patch - ${CMAKE_CURRENT_LIST_DIR}/no-mysql-global-h.patch - ${CMAKE_CURRENT_LIST_DIR}/no-mysql-sys-h.patch - ${CMAKE_CURRENT_LIST_DIR}/no-my-bool.patch + ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-debug-crt-flags.patch ) endforeach() @@ -55,7 +65,7 @@ file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.lib" PNG_LIBRA # Setup geos libraries + include path file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" GEOS_INCLUDE_DIR) file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib" GEOS_LIBRARY_REL) -file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/geos_c.lib" GEOS_LIBRARY_DBG) +file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib" GEOS_LIBRARY_DBG) # Setup expat libraries + include path file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" EXPAT_INCLUDE_DIR) @@ -72,11 +82,6 @@ file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" SQLITE_INCLUDE_DIR) file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/sqlite3.lib" SQLITE_LIBRARY_REL) file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/sqlite3.lib" SQLITE_LIBRARY_DBG) -# Setup MySQL libraries + include path -file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include/mysql" MYSQL_INCLUDE_DIR) -file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libmysql.lib" MYSQL_LIBRARY_REL) -file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libmysql.lib" MYSQL_LIBRARY_DBG) - # Setup PostgreSQL libraries + include path file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" PGSQL_INCLUDE_DIR) file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libpq.lib" PGSQL_LIBRARY_REL) @@ -102,7 +107,26 @@ file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" LZMA_INCLUDE_DIR) file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/lzma.lib" LZMA_LIBRARY_REL) file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/lzma.lib" LZMA_LIBRARY_DBG) -set(NMAKE_OPTIONS +if("mysql-libmysql" IN_LIST FEATURES OR "mysql-libmariadb" IN_LIST FEATURES) + # Setup MySQL libraries + include path + if("mysql-libmysql" IN_LIST FEATURES) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include/mysql" MYSQL_INCLUDE_DIR) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libmysql.lib" MYSQL_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libmysql.lib" MYSQL_LIBRARY_DBG) + endif() + + if("mysql-libmariadb" IN_LIST FEATURES) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include/mysql" MYSQL_INCLUDE_DIR) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libmariadb.lib" MYSQL_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libmariadb.lib" MYSQL_LIBRARY_DBG) + endif() + + list(APPEND NMAKE_OPTIONS MYSQL_INC_DIR=${MYSQL_INCLUDE_DIR}) + list(APPEND NMAKE_OPTIONS_REL MYSQL_LIB=${MYSQL_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG MYSQL_LIB=${MYSQL_LIBRARY_DBG}) +endif() + +list(APPEND NMAKE_OPTIONS GDAL_HOME=${NATIVE_PACKAGES_DIR} DATADIR=${NATIVE_DATA_DIR} HTMLDIR=${NATIVE_HTML_DIR} @@ -113,7 +137,6 @@ set(NMAKE_OPTIONS EXPAT_INCLUDE=-I${EXPAT_INCLUDE_DIR} CURL_INC=-I${CURL_INCLUDE_DIR} SQLITE_INC=-I${SQLITE_INCLUDE_DIR} - MYSQL_INC_DIR=${MYSQL_INCLUDE_DIR} PG_INC_DIR=${PGSQL_INCLUDE_DIR} OPENJPEG_ENABLED=YES OPENJPEG_CFLAGS=-I${OPENJPEG_INCLUDE_DIR} @@ -143,8 +166,8 @@ else() set(LINKAGE_FLAGS "/MD") endif() -set(NMAKE_OPTIONS_REL - "${NMAKE_OPTIONS}" +list(APPEND NMAKE_OPTIONS_REL + ${NMAKE_OPTIONS} CXX_CRT_FLAGS=${LINKAGE_FLAGS} PROJ_LIBRARY=${PROJ_LIBRARY_REL} PNG_LIB=${PNG_LIBRARY_REL} @@ -152,15 +175,14 @@ set(NMAKE_OPTIONS_REL EXPAT_LIB=${EXPAT_LIBRARY_REL} "CURL_LIB=${CURL_LIBRARY_REL} wsock32.lib wldap32.lib winmm.lib" SQLITE_LIB=${SQLITE_LIBRARY_REL} - MYSQL_LIB=${MYSQL_LIBRARY_REL} PG_LIB=${PGSQL_LIBRARY_REL} OPENJPEG_LIB=${OPENJPEG_LIBRARY_REL} WEBP_LIBS=${WEBP_LIBRARY_REL} LIBXML2_LIB=${XML2_LIBRARY_REL} ) -set(NMAKE_OPTIONS_DBG - "${NMAKE_OPTIONS}" +list(APPEND NMAKE_OPTIONS_DBG + ${NMAKE_OPTIONS} CXX_CRT_FLAGS="${LINKAGE_FLAGS}d" PROJ_LIBRARY=${PROJ_LIBRARY_DBG} PNG_LIB=${PNG_LIBRARY_DBG} @@ -168,36 +190,40 @@ set(NMAKE_OPTIONS_DBG EXPAT_LIB=${EXPAT_LIBRARY_DBG} "CURL_LIB=${CURL_LIBRARY_DBG} wsock32.lib wldap32.lib winmm.lib" SQLITE_LIB=${SQLITE_LIBRARY_DBG} - MYSQL_LIB=${MYSQL_LIBRARY_DBG} PG_LIB=${PGSQL_LIBRARY_DBG} OPENJPEG_LIB=${OPENJPEG_LIBRARY_DBG} WEBP_LIBS=${WEBP_LIBRARY_DBG} LIBXML2_LIB=${XML2_LIBRARY_DBG} DEBUG=1 ) -################ -# Release build -################ -message(STATUS "Building ${TARGET_TRIPLET}-rel") -vcpkg_execute_required_process( + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + ################ + # Release build + ################ + message(STATUS "Building ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( COMMAND ${NMAKE} -f makefile.vc "${NMAKE_OPTIONS_REL}" WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} LOGNAME nmake-build-${TARGET_TRIPLET}-release -) -message(STATUS "Building ${TARGET_TRIPLET}-rel done") + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel done") +endif() -################ -# Debug build -################ -message(STATUS "Building ${TARGET_TRIPLET}-dbg") -vcpkg_execute_required_process( - COMMAND ${NMAKE} /G -f makefile.vc - "${NMAKE_OPTIONS_DBG}" - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME nmake-build-${TARGET_TRIPLET}-debug -) -message(STATUS "Building ${TARGET_TRIPLET}-dbg done") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + ################ + # Debug build + ################ + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND ${NMAKE} /G -f makefile.vc + "${NMAKE_OPTIONS_DBG}" + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME nmake-build-${TARGET_TRIPLET}-debug + ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg done") +endif() message(STATUS "Packaging ${TARGET_TRIPLET}") file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/gdal/html) @@ -214,22 +240,31 @@ vcpkg_execute_required_process( if (VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/gdal_i.lib) - file(COPY ${SOURCE_PATH_DEBUG}/gdal.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - file(COPY ${SOURCE_PATH_RELEASE}/gdal.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(COPY ${SOURCE_PATH_RELEASE}/gdal.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(COPY ${SOURCE_PATH_DEBUG}/gdal.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib) + endif() else() file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(REMOVE ${EXE_FILES} ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) - file(COPY ${SOURCE_PATH_DEBUG}/gdal202.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(COPY ${SOURCE_PATH_DEBUG}/gdal_i.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(COPY ${SOURCE_PATH_DEBUG}/gdal${GDAL_VERSION_LIB}.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${SOURCE_PATH_DEBUG}/gdal_i.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib) + endif() endif() # Copy over PDBs vcpkg_copy_pdbs() # Handle copyright -file(RENAME ${CURRENT_PACKAGES_DIR}/share/gdal/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/gdal/copyright) - -message(STATUS "Packaging ${TARGET_TRIPLET} done") +configure_file(${SOURCE_PATH_RELEASE}/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/gdal/copyright COPYONLY) diff --git a/ports/gdcm2/CONTROL b/ports/gdcm2/CONTROL index 45900dbab61..d3ff62aa775 100644 --- a/ports/gdcm2/CONTROL +++ b/ports/gdcm2/CONTROL @@ -1,4 +1,4 @@ Source: gdcm2 -Version: 2.8.6 +Version: 2.8.8 Description: Grassroots DICOM library Build-Depends: zlib, expat diff --git a/ports/gdcm2/portfile.cmake b/ports/gdcm2/portfile.cmake index 65fa7a6e14e..3bddfeff686 100644 --- a/ports/gdcm2/portfile.cmake +++ b/ports/gdcm2/portfile.cmake @@ -1,30 +1,12 @@ -# 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 = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO malaterre/GDCM - REF v2.8.6 - SHA512 c04c131afae6a326978d82ea7c6f42eaa5d8e0f9d9dc3b6ad531a2d6ef7261e603cef32f364609ae99ff33f144373fe7bdd62056e535b6d487b0a4b13919062e + REF v2.8.8 + SHA512 92efa1b85e38a5e463933c36a275e1392608c9da4d7c3ab17acfa70bfa112bc03e8705086eaac4a3ad5153fde5116ccc038093adaa8598b18000f403f39db738 + PATCHES socketxx.patch ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/socketxx.patch -) - - if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(GDCM_BUILD_SHARED_LIBS ON) else() @@ -33,20 +15,20 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS - -DGDCM_BUILD_DOCBOOK_MANPAGES=OFF - -DGDCM_BUILD_SHARED_LIBS=${GDCM_BUILD_SHARED_LIBS} - -DGDCM_INSTALL_INCLUDE_DIR=include - -DGDCM_USE_SYSTEM_EXPAT=ON - -DGDCM_USE_SYSTEM_ZLIB=ON - ${ADDITIONAL_OPTIONS} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DGDCM_BUILD_DOCBOOK_MANPAGES=OFF + -DGDCM_BUILD_SHARED_LIBS=${GDCM_BUILD_SHARED_LIBS} + -DGDCM_INSTALL_INCLUDE_DIR=include + -DGDCM_USE_SYSTEM_EXPAT=ON + -DGDCM_USE_SYSTEM_ZLIB=ON + ${ADDITIONAL_OPTIONS} ) vcpkg_install_cmake() file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ) diff --git a/ports/geogram/CONTROL b/ports/geogram/CONTROL index 81df11d9c69..68717491422 100644 --- a/ports/geogram/CONTROL +++ b/ports/geogram/CONTROL @@ -1,4 +1,8 @@ Source: geogram -Version: 1.6.0-1 +Version: 1.6.4 Description: Geogram is a programming library of geometric algorithms. -Build-Depends: glfw3, openblas, clapack +Build-Depends: openblas, clapack + +Feature: graphics +Description: Build viewers and geogram_gfx library. +Build-Depends: glfw3 diff --git a/ports/geogram/fix-cmake-config-and-install.patch b/ports/geogram/fix-cmake-config-and-install.patch index d4dce24e14c..f5d93358635 100644 --- a/ports/geogram/fix-cmake-config-and-install.patch +++ b/ports/geogram/fix-cmake-config-and-install.patch @@ -3,7 +3,7 @@ index 17dc02e..e489d75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,7 @@ set(VORPALINE_VERSION_MINOR 6) - set(VORPALINE_VERSION_PATCH 0) + set(VORPALINE_VERSION_PATCH 4) set(VORPALINE_VERSION ${VORPALINE_VERSION_MAJOR}.${VORPALINE_VERSION_MINOR}.${VORPALINE_VERSION_PATCH}) -set(VORPALINE_INCLUDE_SUBPATH geogram${VORPALINE_VERSION_MAJOR}) @@ -165,11 +165,7 @@ index 2b69a1e..a504538 100644 - extern char **xargv; - Const char *t; - int i; -+ // extern int xargc; -+ // extern char **xargv; -+ // Const char *t; -+ // int i; - +- - if(*n>=0 && *n=0 && *n -# 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/geos-3.6.2) + +set(GEOS_VERSION 3.6.3) vcpkg_download_distfile(ARCHIVE - URLS "http://download.osgeo.org/geos/geos-3.6.2.tar.bz2" - FILENAME "geos-3.6.2.tar.bz2" - SHA512 515d8700b8a28282678e481faee355e3a43d7b70160472a63335b8d7225d9ba10437be782378f18f31a15288118126d411a2d862f01ce35d27c96f6bc0a73016 + URLS "http://download.osgeo.org/geos/geos-${GEOS_VERSION}.tar.bz2" + FILENAME "geos-${GEOS_VERSION}.tar.bz2" + SHA512 f88adcf363433e247a51fb1a2c0b53f39b71aba8a6c01dd08aa416c2e980fe274a195e6edcb5bb5ff8ea81b889da14a1a8fb2849e04669aeba3b6d55754dc96a ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - -SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/geos_c-static-support.patch +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${GEOS_VERSION} + PATCHES geos_c-static-support.patch ) # NOTE: GEOS provides CMake as optional build configuration, it might not be actively # maintained, so CMake build issues may happen between releases. -# Pull modules referred in the main CMakeLists.txt but missing from the released package. -# TODO: GEOS 3.6.3 or later will include the missing script in release package. -file(DOWNLOAD http://svn.osgeo.org/geos/branches/3.6/cmake/modules/GenerateSourceGroups.cmake - ${SOURCE_PATH}/cmake/modules/GenerateSourceGroups.cmake) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DGEOS_ENABLE_TESTS=False + PREFER_NINJA + OPTIONS + -DCMAKE_DEBUG_POSTFIX=d + -DGEOS_ENABLE_TESTS=False ) vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/geos) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/geos/COPYING ${CURRENT_PACKAGES_DIR}/share/geos/copyright) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libgeos.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libgeos.lib) -else() - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/geos.lib ${CURRENT_PACKAGES_DIR}/debug/lib/geos.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/geos_c.lib ${CURRENT_PACKAGES_DIR}/debug/lib/geos_c.lib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/geos-config) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/geos) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/geos-config ${CURRENT_PACKAGES_DIR}/share/geos/geos-config) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/geos-config) endif() +# Handle copyright +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/geos/copyright COPYONLY) + vcpkg_copy_pdbs() diff --git a/ports/getopt-win32/CONTROL b/ports/getopt-win32/CONTROL new file mode 100644 index 00000000000..d80fa0b00ee --- /dev/null +++ b/ports/getopt-win32/CONTROL @@ -0,0 +1,3 @@ +Source: getopt-win32 +Version: 0.1 +Description: An implementation of getopt provided by https://github.com/libimobiledevice-win32 diff --git a/ports/getopt-win32/portfile.cmake b/ports/getopt-win32/portfile.cmake new file mode 100644 index 00000000000..50ffc2b88ab --- /dev/null +++ b/ports/getopt-win32/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME) + message(FATAL_ERROR "getopt-win32 only supports building on Windows Desktop") +endif() + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libimobiledevice-win32/getopt + REF 0.1 + SHA512 40e2a901241a5d751cec741e5de423c8f19b105572c7cae18adb6e69be0b408efc6c9a2ecaeb62f117745eac0d093f30d6b91d88c1a27e1f7be91f0e84fdf199 + HEAD_REF master +) + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH getopt.vcxproj + LICENSE_SUBPATH LICENSE +) + +# Copy header +file(COPY ${SOURCE_PATH}/getopt.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/) diff --git a/ports/getopt/CONTROL b/ports/getopt/CONTROL new file mode 100644 index 00000000000..bae137bbd5c --- /dev/null +++ b/ports/getopt/CONTROL @@ -0,0 +1,4 @@ +Source: getopt +Version: 0 +Description: The getopt and getopt_long functions automate some of the chore involved in parsing typical unix command line options. +Build-Depends: getopt-win32 (windows) diff --git a/ports/getopt/portfile.cmake b/ports/getopt/portfile.cmake new file mode 100644 index 00000000000..21d59ebcb38 --- /dev/null +++ b/ports/getopt/portfile.cmake @@ -0,0 +1,5 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "No implementation of getopt is currently available for UWP targets") +endif() + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/gettext/CMakeLists.txt b/ports/gettext/CMakeLists.txt index 7df8c33dc07..c94ab4c136c 100644 --- a/ports/gettext/CMakeLists.txt +++ b/ports/gettext/CMakeLists.txt @@ -23,10 +23,31 @@ else() set(HAVE_ASPRINTF 1) set(HAVE_WPRINTF 1) set(HAVE_NEWLOCALE 1) - add_definitions(-DHAVE_NEWLOCALE=1) + add_definitions(-DHAVE_NEWLOCALE=1) + + set(CMAKE_THREAD_PREFER_PTHREAD TRUE) + set(THREADS_PREFER_PTHREAD_FLAG TRUE) + find_package(Threads REQUIRED) + if(NOT CMAKE_USE_PTHREADS_INIT) + message(FATAL_ERROR "Error: Only pthreads is currently supported.") + endif() + + include(CheckFunctionExists) + include(CheckIncludeFiles) + + if(APPLE) + set(HAVE_CFLOCALECOPYCURRENT 1) + set(HAVE_CFPREFERENCESCOPYAPPVALUE 1) + endif() + check_function_exists(dcgettext HAVE_DCGETTEXT) + check_include_files(features.h HAVE_FEATURES_H) + check_function_exists(gettext HAVE_GETTEXT) + check_include_files(mach-o/dyld.h HAVE_MACH_O_DYLD_H) + check_function_exists(mempcpy HAVE_MEMPCPY) + check_include_files(xlocale.h HAVE_XLOCALE_H) configure_file(intl/libgnuintl.in.h config/libgnuintl.h @ONLY) - configure_file(config.win32.h config/config.h COPYONLY) + configure_file(config.unix.h.in config/config.h @ONLY) endif() if(NOT DISABLE_INSTALL_HEADERS) @@ -85,7 +106,14 @@ add_definitions("-DBUILDING_LIBINTL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIB add_definitions("-DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -D_CRT_SECURE_NO_WARNINGS") add_library(libintl ${SOURCES}) -target_link_libraries(libintl PRIVATE unofficial::iconv::libcharset unofficial::iconv::libiconv) +target_link_libraries(libintl PRIVATE unofficial::iconv::libcharset unofficial::iconv::libiconv) +if(APPLE) + find_library(COREFOUNDATION_LIBRARY CoreFoundation REQUIRED) + target_link_libraries(libintl PRIVATE ${COREFOUNDATION_LIBRARY}) +endif() +if(NOT WIN32) + target_link_libraries(libintl PRIVATE Threads::Threads) +endif() install(TARGETS libintl RUNTIME DESTINATION bin diff --git a/ports/gettext/CONTROL b/ports/gettext/CONTROL index 9044cd72493..76e1d22d4e7 100644 --- a/ports/gettext/CONTROL +++ b/ports/gettext/CONTROL @@ -1,4 +1,4 @@ Source: gettext -Version: 0.19-4 +Version: 0.19-5 Description: The GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages Build-Depends: libiconv diff --git a/ports/gettext/config.unix.h.in b/ports/gettext/config.unix.h.in new file mode 100644 index 00000000000..9f00a6fcda4 --- /dev/null +++ b/ports/gettext/config.unix.h.in @@ -0,0 +1,1009 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to the number of bits in type 'ptrdiff_t'. */ +#define BITSIZEOF_PTRDIFF_T sizeof(ptrdiff_t) + +/* Define to the number of bits in type 'sig_atomic_t'. */ +#define BITSIZEOF_SIG_ATOMIC_T 32 + +/* Define to the number of bits in type 'size_t'. */ +#define BITSIZEOF_SIZE_T sizeof(size_t) + +/* Define to the number of bits in type 'wchar_t'. */ +#define BITSIZEOF_WCHAR_T 32 + +/* Define to the number of bits in type 'wint_t'. */ +#define BITSIZEOF_WINT_T 32 + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define if mono is the preferred C# implementation. */ +/* #undef CSHARP_CHOICE_MONO */ + +/* Define if pnet is the preferred C# implementation. */ +/* #undef CSHARP_CHOICE_PNET */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Define to 1 if // is a file system root distinct from /. */ +/* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#define ENABLE_NLS 1 + +/* Define to 1 if the package shall run at any location in the file system. */ +#define ENABLE_RELOCATABLE 1 + +/* Define to 1 if realpath() can malloc memory, always gives an absolute path, + and handles trailing slash correctly. */ +/* #undef FUNC_REALPATH_WORKS */ + +/* Define if gettimeofday clobbers the localtime buffer. */ +/* #undef GETTIMEOFDAY_CLOBBERS_LOCALTIME */ + +/* Define this to 'void' or 'struct timezone' to match the system's + declaration of the second argument to gettimeofday. */ +#define GETTIMEOFDAY_TIMEZONE void + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module canonicalize-lgpl shall be considered present. */ +#define GNULIB_CANONICALIZE_LGPL 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fscanf shall be considered present. */ +#define GNULIB_FSCANF 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fwriteerror shall be considered present. */ +#define GNULIB_FWRITEERROR 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module lock shall be considered present. */ +#define GNULIB_LOCK 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module scanf shall be considered present. */ +#define GNULIB_SCANF 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module sigpipe shall be considered present. */ +#define GNULIB_SIGPIPE 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module strerror shall be considered present. */ +#define GNULIB_STRERROR 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u8-mbtoucr shall be considered present. */ +#define GNULIB_UNISTR_U8_MBTOUCR 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u8-uctomb shall be considered present. */ +#define GNULIB_UNISTR_U8_UCTOMB 1 + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#define HAVE_ALLOCA_H 1 + +/* Define to 1 if you have the `argz_count' function. */ +/* #undef HAVE_ARGZ_COUNT */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ARGZ_H */ + +/* Define to 1 if you have the `argz_next' function. */ +/* #undef HAVE_ARGZ_NEXT */ + +/* Define to 1 if you have the `argz_stringify' function. */ +/* #undef HAVE_ARGZ_STRINGIFY */ + +/* Define to 1 if you have the `asprintf' function. */ +#define HAVE_ASPRINTF 1 + +/* Define to 1 if you have the `atexit' function. */ +#define HAVE_ATEXIT 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BP_SYM_H */ + +/* Define to 1 if the compiler understands __builtin_expect. */ +#define HAVE_BUILTIN_EXPECT 1 + +/* Define to 1 if you have the `canonicalize_file_name' function. */ +/* #undef HAVE_CANONICALIZE_FILE_NAME */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +#cmakedefine HAVE_CFLOCALECOPYCURRENT 1 + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +#cmakedefine HAVE_CFPREFERENCESCOPYAPPVALUE 1 + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#cmakedefine HAVE_DCGETTEXT 1 + +/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_CLEARERR_UNLOCKED 1 + +/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_FEOF_UNLOCKED 1 + +/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FERROR_UNLOCKED 1 + +/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FFLUSH_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FGETS_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FPUTC_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FPUTS_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FREAD_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FWRITE_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_GETCHAR_UNLOCKED 1 + +/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_GETC_UNLOCKED 1 + +/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. + */ +#define HAVE_DECL_GETENV 1 + +/* Define to 1 if you have the declaration of `iswblank', and to 0 if you + don't. */ +#define HAVE_DECL_ISWBLANK 1 + +/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you + don't. */ +/* #undef HAVE_DECL_MBRTOWC */ + +/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you + don't. */ +/* #undef HAVE_DECL_MBSINIT */ + +/* Define to 1 if you have the declaration of `program_invocation_name', and + to 0 if you don't. */ +#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 + +/* Define to 1 if you have the declaration of `program_invocation_short_name', + and to 0 if you don't. */ +#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 + +/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_PUTCHAR_UNLOCKED 1 + +/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_PUTC_UNLOCKED 1 + +/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't. + */ +#define HAVE_DECL_SETENV 1 + +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you + don't. */ +#define HAVE_DECL_STRERROR_R 1 + +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `towlower', and to 0 if you + don't. */ +/* #undef HAVE_DECL_TOWLOWER */ + +/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you + don't. */ +#define HAVE_DECL_WCWIDTH 1 + +/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you + don't. */ +#define HAVE_DECL__SNPRINTF 0 + +/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you + don't. */ +#define HAVE_DECL__SNWPRINTF 0 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define if you have the declaration of environ. */ +/* #undef HAVE_ENVIRON_DECL */ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_FEATURES_H 1 + +/* Define to 1 if you have the `fwprintf' function. */ +#define HAVE_FWPRINTF 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `getegid' function. */ +#define HAVE_GETEGID 1 + +/* Define to 1 if you have the `geteuid' function. */ +#define HAVE_GETEUID 1 + +/* Define to 1 if you have the `getgid' function. */ +#define HAVE_GETGID 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the `getopt_long_only' function. */ +#define HAVE_GETOPT_LONG_ONLY 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#cmakedefine HAVE_GETTEXT 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the `getuid' function. */ +#define HAVE_GETUID 1 + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ICONV_H 1 + +/* Define to 1 if the compiler supports one of the keywords 'inline', + '__inline__', '__inline' and effectively inlines functions marked as such. + */ +#define HAVE_INLINE 1 + +/* Define if you have the 'intmax_t' type in or . */ +#define HAVE_INTMAX_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if exists, doesn't clash with , and + declares uintmax_t. */ +#define HAVE_INTTYPES_H_WITH_UINTMAX 1 + +/* Define to 1 if you have the `iswblank' function. */ +#define HAVE_ISWBLANK 1 + +/* Define to 1 if you have the `iswcntrl' function. */ +#define HAVE_ISWCNTRL 1 + +/* Define if you have and nl_langinfo(CODESET). */ +#define HAVE_LANGINFO_CODESET 1 + +/* Define if your file defines LC_MESSAGES. */ +#define HAVE_LC_MESSAGES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if the system has the type 'long long int'. */ +#define HAVE_LONG_LONG_INT 1 + +/* Define to 1 if you have the `lstat' function. */ +#define HAVE_LSTAT 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_MACH_O_DYLD_H 1 + +/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including + config.h and . */ +#define HAVE_MAP_ANONYMOUS 1 + +/* Define to 1 if you have the `mbrtowc' function. */ +#define HAVE_MBRTOWC 1 + +/* Define to 1 if you have the `mbsinit' function. */ +#define HAVE_MBSINIT 1 + +/* Define to 1 if you have the `mbslen' function. */ +/* #undef HAVE_MBSLEN */ + +/* Define to 1 if declares mbstate_t. */ +#define HAVE_MBSTATE_T 1 + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mempcpy' function. */ +#cmakedefine HAVE_MEMPCPY 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the `mprotect' function. */ +#define HAVE_MPROTECT 1 + +/* Define to 1 on MSVC platforms that have the "invalid parameter handler" + concept. */ +/* #undef HAVE_MSVC_INVALID_PARAMETER_HANDLER */ + +/* Define to 1 if you have the `munmap' function. */ +#define HAVE_MUNMAP 1 + +/* Define to 1 if you have the `newlocale' function. */ +#cmakedefine HAVE_NEWLOCALE 1 + +/* Define if your printf() function supports format strings with positions. */ +#define HAVE_POSIX_PRINTF 1 + +/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ +#define HAVE_PTHREAD_MUTEX_RECURSIVE 1 + +/* Define if the POSIX multithreading library has read/write locks. */ +#define HAVE_PTHREAD_RWLOCK 1 + +/* Define to 1 if you have the `putenv' function. */ +#define HAVE_PUTENV 1 + +/* Define to 1 if you have the `raise' function. */ +#define HAVE_RAISE 1 + +/* Define to 1 if you have the `readlink' function. */ +#define HAVE_READLINK 1 + +/* Define to 1 if you have the `readlinkat' function. */ +#define HAVE_READLINKAT 1 + +/* Define to 1 if you have the `realpath' function. */ +#define HAVE_REALPATH 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SEARCH_H 1 + +/* Define to 1 if you have the `setenv' function. */ +#define HAVE_SETENV 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ + +/* Define to 1 if 'wchar_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WCHAR_T */ + +/* Define to 1 if 'wint_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WINT_T */ + +/* Define to 1 if the system has the type `sigset_t'. */ +#define HAVE_SIGSET_T 1 + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDDEF_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define if exists, doesn't clash with , and declares + uintmax_t. */ +#define HAVE_STDINT_H_WITH_UINTMAX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `stpcpy' function. */ +#define HAVE_STPCPY 1 + +/* Define to 1 if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `strerror_r' function. */ +#define HAVE_STRERROR_R 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + +/* Define to 1 if you have the `strtoul' function. */ +#define HAVE_STRTOUL 1 + +/* Define to 1 if you have the `symlink' function. */ +#define HAVE_SYMLINK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_BITYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_INTTYPES_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_TIMEB_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the `towlower' function. */ +#define HAVE_TOWLOWER 1 + +/* Define to 1 if you have the `tsearch' function. */ +#define HAVE_TSEARCH 1 + +/* Define if you have the 'uintmax_t' type in or . */ +#define HAVE_UINTMAX_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if the system has the type 'unsigned long long int'. */ +#define HAVE_UNSIGNED_LONG_LONG_INT 1 + +/* Define to 1 if you have the `uselocale' function. */ +#define HAVE_USELOCALE 1 + +/* Define to 1 or 0, depending whether the compiler supports simple visibility + declarations. */ +#define HAVE_VISIBILITY 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define if you have the 'wchar_t' type. */ +#define HAVE_WCHAR_T 1 + +/* Define to 1 if you have the `wcrtomb' function. */ +#define HAVE_WCRTOMB 1 + +/* Define to 1 if you have the `wcslen' function. */ +#define HAVE_WCSLEN 1 + +/* Define to 1 if you have the `wcsnlen' function. */ +#define HAVE_WCSNLEN 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + +/* Define to 1 if you have the `wcwidth' function. */ +#define HAVE_WCWIDTH 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINSOCK2_H */ + +/* Define if you have the 'wint_t' type. */ +#define HAVE_WINT_T 1 + +/* Define to 1 if O_NOATIME works. */ +#define HAVE_WORKING_O_NOATIME 0 + +/* Define to 1 if O_NOFOLLOW works. */ +#define HAVE_WORKING_O_NOFOLLOW 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_XLOCALE_H 1 + +/* Define to 1 if the system has the type `_Bool'. */ +#define HAVE__BOOL 1 + +/* Define to 1 if you have the `_ftime' function. */ +/* #undef HAVE__FTIME */ + +/* Define to 1 if you have the `_NSGetExecutablePath' function. */ +/* #undef HAVE__NSGETEXECUTABLEPATH */ + +/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ +/* #undef HAVE__SET_INVALID_PARAMETER_HANDLER */ + +/* Define to 1 if you have the `__fsetlocking' function. */ +/* #undef HAVE___FSETLOCKING */ + +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST + +/* Define to a symbolic name denoting the flavor of iconv_open() + implementation. */ +/* #undef ICONV_FLAVOR */ + +/* Define to the value of ${prefix}, as a string. */ +/* #define INSTALLPREFIX "/usr/local" */ + +/* Define if integer division by zero raises signal SIGFPE. */ +#define INTDIV0_RAISES_SIGFPE 0 + +/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing + slash. */ +/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ + +/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ +#define MALLOC_0_IS_NONNULL 1 + +/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ +/* #undef MAP_ANONYMOUS */ + +/* Define if the mbrtowc function has the NULL pwc argument bug. */ +/* #undef MBRTOWC_NULL_ARG1_BUG */ + +/* Define if the mbrtowc function has the NULL string argument bug. */ +/* #undef MBRTOWC_NULL_ARG2_BUG */ + +/* Define if the mbrtowc function does not return 0 for a NUL character. */ +/* #undef MBRTOWC_NUL_RETVAL_BUG */ + +/* Define if the mbrtowc function returns a wrong return value. */ +/* #undef MBRTOWC_RETVAL_BUG */ + +/* Name of package */ +#define PACKAGE "gettext-runtime" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "gettext-runtime" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "gettext-runtime 0.19" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "gettext-runtime" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "0.19" + +/* Define if exists and defines unusable PRI* macros. */ +/* #undef PRI_MACROS_BROKEN */ + +/* Define if the pthread_in_use() detection is hard. */ +/* #undef PTHREAD_IN_USE_DETECTION_HARD */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'ptrdiff_t'. */ +#define PTRDIFF_T_SUFFIX + +/* Define to 1 if readlink fails to recognize a trailing slash. */ +/* #undef READLINK_TRAILING_SLASH_BUG */ + +/* Define to 1 if stat needs help when passed a directory name with a trailing + slash */ +/* #undef REPLACE_FUNC_STAT_DIR */ + +/* Define to 1 if stat needs help when passed a file name with a trailing + slash */ +/* #undef REPLACE_FUNC_STAT_FILE */ + +/* Define to 1 if strerror(0) does not return a message implying success. */ +/* #undef REPLACE_STRERROR_0 */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'sig_atomic_t'. */ +#define SIG_ATOMIC_T_SUFFIX + +/* Define as the maximum value of type 'size_t', if the system doesn't define + it. */ +#ifndef SIZE_MAX +/* # undef SIZE_MAX */ +#endif + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'size_t'. */ +#define SIZE_T_SUFFIX ul + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if the `S_IS*' macros in do not work properly. */ +/* #undef STAT_MACROS_BROKEN */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if strerror_r returns char *. */ +/* #undef STRERROR_R_CHAR_P */ + +/* Define to the prefix of C symbols at the assembler and linker level, either + an underscore or empty. */ +#define USER_LABEL_PREFIX + +/* Define if the POSIX multithreading library can be used. */ +#define USE_POSIX_THREADS 1 + +/* Define if references to the POSIX multithreading library should be made + weak. */ +/* #undef USE_POSIX_THREADS_WEAK */ + +/* Define if the GNU Pth multithreading library can be used. */ +/* #undef USE_PTH_THREADS */ + +/* Define if references to the GNU Pth multithreading library should be made + weak. */ +/* #undef USE_PTH_THREADS_WEAK */ + +/* Define if the old Solaris multithreading library can be used. */ +/* #undef USE_SOLARIS_THREADS */ + +/* Define if references to the old Solaris multithreading library should be + made weak. */ +/* #undef USE_SOLARIS_THREADS_WEAK */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable general extensions on OS X. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions if necessary. HP-UX 11.11 defines + mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of + whether compiling with -Ae or -D_HPUX_SOURCE=1. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Define to 1 if you want getc etc. to use unlocked I/O if available. + Unlocked I/O can improve performance in unithreaded apps, but it is not + safe for multithreaded apps. */ +#define USE_UNLOCKED_IO 1 + +/* Define if the native Windows multithreading API can be used. */ +/* #undef USE_WINDOWS_THREADS */ + +/* Version number of package */ +#define VERSION "0.19" + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wchar_t'. */ +#define WCHAR_T_SUFFIX + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wint_t'. */ +#define WINT_T_SUFFIX + +/* Define when --enable-shared is used on mingw or Cygwin. */ +/* #undef WOE32DLL */ + +/* Enable large inode numbers on Mac OS X 10.5. */ +#define _DARWIN_USE_64_BIT_INODE 1 + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct + stat.st_size becomes 64-bit. */ +/* #undef _GL_WINDOWS_64_BIT_ST_SIZE */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 on Solaris. */ +/* #undef _LCONV_C99 */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ +/* #undef _NETBSD_SOURCE */ + +/* The _Noreturn keyword of C11. */ +#if ! (defined _Noreturn \ + || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) +# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ + || 0x5110 <= __SUNPRO_C) +# define _Noreturn __attribute__ ((__noreturn__)) +# elif defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif + + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for 'stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to rpl_ if the getopt replacement functions and variables should be + used. */ +#define __GETOPT_PREFIX rpl_ + +/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. + + Suppress the use of extern inline on problematic Apple configurations. + OS X 10.8 and earlier mishandle it; see, e.g., + . + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see . + Perhaps Apple will fix this some day. */ +#if (defined __APPLE__ \ + && (defined __header_inline \ + ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ + && ! defined __clang__) \ + : ((! defined _DONT_USE_CTYPE_INLINE_ \ + && (defined __GNUC__ || defined __cplusplus)) \ + || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ + && defined __GNUC__ && ! defined __cplusplus)))) +# define _GL_EXTERN_INLINE_APPLE_BUG +#endif +#if ((__GNUC__ \ + ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_APPLE_BUG) +# define _GL_INLINE inline +# define _GL_EXTERN_INLINE extern inline +# define _GL_EXTERN_INLINE_IN_USE +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined _GL_EXTERN_INLINE_APPLE_BUG) +# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ + /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ +# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) +# else +# define _GL_INLINE extern inline +# endif +# define _GL_EXTERN_INLINE extern +# define _GL_EXTERN_INLINE_IN_USE +#else +# define _GL_INLINE static _GL_UNUSED +# define _GL_EXTERN_INLINE static _GL_UNUSED +#endif + +#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) +# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ +# define _GL_INLINE_HEADER_CONST_PRAGMA +# else +# define _GL_INLINE_HEADER_CONST_PRAGMA \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") +# endif + /* Suppress GCC's bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + . */ +# define _GL_INLINE_HEADER_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ + _GL_INLINE_HEADER_CONST_PRAGMA +# define _GL_INLINE_HEADER_END \ + _Pragma ("GCC diagnostic pop") +#else +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +#endif + +/* Define to `int' if doesn't define. */ +/* #undef gid_t */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports + the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of + earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. + __APPLE__ && __MACH__ test for Mac OS X. + __APPLE_CC__ tests for the Apple compiler and its version. + __STDC_VERSION__ tests for the C99 mode. */ +#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ +# define __GNUC_STDC_INLINE__ 1 +#endif + +/* Define to a type if does not define. */ +/* #undef mbstate_t */ + +/* Define to `int' if does not define. */ +/* #undef mode_t */ + +/* Define to the type of st_nlink in struct stat, or a supertype. */ +/* #undef nlink_t */ + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +/* Define as the type of the result of subtracting two pointers, if the system + doesn't define it. */ +/* #undef ptrdiff_t */ + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#define restrict __restrict +/* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the + previous line. Perhaps some future version of Sun C++ will work with + restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +# define __restrict__ +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define as a signed type of the same size as size_t. */ +/* #undef ssize_t */ + +/* Define to `int' if doesn't define. */ +/* #undef uid_t */ + +/* Define to unsigned long or unsigned long long if and + don't define. */ +/* #undef uintmax_t */ + +/* Define as a marker that can be attached to declarations that might not + be used. This helps to reduce warnings, such as from + GCC -Wunused-parameter. */ +#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_UNUSED __attribute__ ((__unused__)) +#else +# define _GL_UNUSED +#endif +/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name + is a misnomer outside of parameter lists. */ +#define _UNUSED_PARAMETER_ _GL_UNUSED + +/* The __pure__ attribute was added in gcc 2.96. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +# define _GL_ATTRIBUTE_PURE /* empty */ +#endif + +/* The __const__ attribute was added in gcc 2.95. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +#else +# define _GL_ATTRIBUTE_CONST /* empty */ +#endif + + + +#define __libc_lock_t gl_lock_t +#define __libc_lock_define gl_lock_define +#define __libc_lock_define_initialized gl_lock_define_initialized +#define __libc_lock_init gl_lock_init +#define __libc_lock_lock gl_lock_lock +#define __libc_lock_unlock gl_lock_unlock +#define __libc_lock_recursive_t gl_recursive_lock_t +#define __libc_lock_define_recursive gl_recursive_lock_define +#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized +#define __libc_lock_init_recursive gl_recursive_lock_init +#define __libc_lock_lock_recursive gl_recursive_lock_lock +#define __libc_lock_unlock_recursive gl_recursive_lock_unlock +#define glthread_in_use libintl_thread_in_use +#define glthread_lock_init_func libintl_lock_init_func +#define glthread_lock_lock_func libintl_lock_lock_func +#define glthread_lock_unlock_func libintl_lock_unlock_func +#define glthread_lock_destroy_func libintl_lock_destroy_func +#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded +#define glthread_rwlock_init_func libintl_rwlock_init_func +#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded +#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func +#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded +#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func +#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded +#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func +#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded +#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func +#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded +#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func +#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded +#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func +#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded +#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func +#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded +#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func +#define glthread_once_func libintl_once_func +#define glthread_once_singlethreaded libintl_once_singlethreaded +#define glthread_once_multithreaded libintl_once_multithreaded + + + +/* On Windows, variables that may be in a DLL must be marked specially. */ +#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER +# define DLL_VARIABLE __declspec (dllimport) +#else +# define DLL_VARIABLE +#endif + +/* Extra OS/2 (emx+gcc) defines. */ +#ifdef __EMX__ +# include "intl/os2compat.h" +#endif + diff --git a/ports/gettext/portfile.cmake b/ports/gettext/portfile.cmake index cb5ea37c1f5..7f0b6bc12b8 100644 --- a/ports/gettext/portfile.cmake +++ b/ports/gettext/portfile.cmake @@ -17,6 +17,7 @@ vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${CMAKE_CURRENT_LIST_DIR}/config.win32.h + ${CMAKE_CURRENT_LIST_DIR}/config.unix.h.in DESTINATION ${SOURCE_PATH}/gettext-runtime ) file(REMOVE ${SOURCE_PATH}/gettext-runtime/intl/libgnuintl.h ${SOURCE_PATH}/gettext-runtime/config.h) diff --git a/ports/gflags/CONTROL b/ports/gflags/CONTROL index 0a8d83aee70..b090f2ba519 100644 --- a/ports/gflags/CONTROL +++ b/ports/gflags/CONTROL @@ -1,3 +1,3 @@ Source: gflags -Version: 2.2.1-3 +Version: 2.2.2-1 Description: A C++ library that implements commandline flags processing diff --git a/ports/gflags/fix_cmake_config.patch b/ports/gflags/fix_cmake_config.patch new file mode 100644 index 00000000000..bea561ecbad --- /dev/null +++ b/ports/gflags/fix_cmake_config.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/config.cmake.in b/cmake/config.cmake.in +index a512c2a..e7f50d0 100644 +--- a/cmake/config.cmake.in ++++ b/cmake/config.cmake.in +@@ -78,7 +78,7 @@ if (NOT DEFINED @PACKAGE_PREFIX@_NOTHREADS) + else () + set (@PACKAGE_PREFIX@_NOTHREADS FALSE) + endif () +- elseif (TARGET ${@PACKAGE_PREFIX@_TARGET_PREFIX}PACKAGE_NAME@_static OR TARGET ${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@_shared) ++ elseif (TARGET ${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@_static OR TARGET ${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@_shared) + set (@PACKAGE_PREFIX@_NOTHREADS FALSE) + else () + set (@PACKAGE_PREFIX@_NOTHREADS TRUE) diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake index 31ffeafa5d5..87053f84995 100644 --- a/ports/gflags/portfile.cmake +++ b/ports/gflags/portfile.cmake @@ -7,15 +7,12 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gflags/gflags - REF v2.2.1 - SHA512 e919cbdcff1f993ddbfa9c06d8e595566a4717c27ff62f388a64c0e6b4683a93211c24ce78485eae84c2c76053341574064e6c56af185fc2782e2816b26e1fc9 + REF v2.2.2 + SHA512 98c4703aab24e81fe551f7831ab797fb73d0f7dfc516addb34b9ff6d0914e5fd398207889b1ae555bac039537b1d4677067dae403b64903577078d99c1bdb447 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-patch-dir.patch # gflags was estimating a wrong relative path between the gflags-config.cmake file and the include path; "../.." goes from share/gflags/ to the triplet root + 0001-patch-dir.patch # gflags was estimating a wrong relative path between the gflags-config.cmake file and the include path; "../.." goes from share/gflags/ to the triplet root + fix_cmake_config.patch ) vcpkg_configure_cmake( diff --git a/ports/gl3w/CMakeLists.txt b/ports/gl3w/CMakeLists.txt index 30a94eddb8c..41f75b21b01 100644 --- a/ports/gl3w/CMakeLists.txt +++ b/ports/gl3w/CMakeLists.txt @@ -1,25 +1,24 @@ cmake_minimum_required(VERSION 3.9) project(gl3w C) -set(HEADER_FILES - "include/GL/gl3w.h" - "include/GL/glcorearb.h" -) - find_package(OpenGL REQUIRED) +find_path(GLCOREARB_H NAMES GL/glcorearb.h) add_library(gl3w src/gl3w.c) -target_include_directories(gl3w PUBLIC - $ - $ +target_include_directories(gl3w + PUBLIC + $ + $ + PRIVATE + ${GLCOREARB_H} + ${OPENGL_INCLUDE_DIR} ) if(BUILD_SHARED_LIBS) target_compile_definitions(gl3w PRIVATE "-DGL3W_API=__declspec(dllexport)") endif() -target_include_directories(gl3w PRIVATE ${OPENGL_INCLUDE_DIR}) target_link_libraries(gl3w PRIVATE ${OPENGL_LIBRARIES}) install(TARGETS gl3w @@ -37,5 +36,5 @@ install( ) if(NOT DISABLE_INSTALL_HEADERS) - install(DIRECTORY include/GL DESTINATION include) + install(FILES include/GL/gl3w.h DESTINATION include/GL) endif() diff --git a/ports/gl3w/CONTROL b/ports/gl3w/CONTROL index 10a2c2b76f4..e8f6fdae1b3 100644 --- a/ports/gl3w/CONTROL +++ b/ports/gl3w/CONTROL @@ -1,3 +1,4 @@ Source: gl3w Version: 8f7f459d Description: Simple OpenGL core profile loading +Build-Depends: opengl-registry diff --git a/ports/gl3w/portfile.cmake b/ports/gl3w/portfile.cmake index bb3f245c971..a5a7825b752 100644 --- a/ports/gl3w/portfile.cmake +++ b/ports/gl3w/portfile.cmake @@ -9,15 +9,7 @@ vcpkg_from_github( ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_download_distfile( - GLCOREARB_H - URLS "http://www.opengl.org/registry/api/GL/glcorearb.h" - FILENAME "glcorearb-2018-02-27.h" - SHA512 02c3672606e6360f2e1e8335fe581bc2d2b3d518b0f24b0c327006a70de07261dace4b53b13e93029a8eb2af43bcba904c4392f2c35ac512c7f278534ef8eb5d -) - -file(INSTALL ${GLCOREARB_H} DESTINATION ${SOURCE_PATH}/include/GL RENAME glcorearb.h) +file(COPY ${CURRENT_INSTALLED_DIR}/include/GL/glcorearb.h DESTINATION ${SOURCE_PATH}/include/GL) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/glad/CONTROL b/ports/glad/CONTROL new file mode 100644 index 00000000000..d74a350892b --- /dev/null +++ b/ports/glad/CONTROL @@ -0,0 +1,4 @@ +Source: glad +Version: 0.1.28-3 +Description: Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs. +Build-Depends: egl-registry, opengl-registry diff --git a/ports/glad/portfile.cmake b/ports/glad/portfile.cmake new file mode 100644 index 00000000000..cc73b1e3941 --- /dev/null +++ b/ports/glad/portfile.cmake @@ -0,0 +1,45 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Dav1dde/glad + REF v0.1.28 + SHA512 5895e25bffab4ead346f65011cbb52a434779fed1dad619ffde27f68b52994cd0b048a45b4533b22b54971dfdba935d93fcf6bee5789061d0057af869b95998c + HEAD_REF master +) + +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY) +vcpkg_add_to_path("${PYTHON2_DIR}") + +file(COPY + ${CURRENT_INSTALLED_DIR}/include/KHR/khrplatform.h + ${CURRENT_INSTALLED_DIR}/share/egl-registry/egl.xml + ${CURRENT_INSTALLED_DIR}/share/opengl-registry/gl.xml + ${CURRENT_INSTALLED_DIR}/share/opengl-registry/glx.xml + ${CURRENT_INSTALLED_DIR}/share/opengl-registry/wgl.xml + DESTINATION ${SOURCE_PATH}/glad/files +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGLAD_NO_LOADER=OFF + -DGLAD_EXPORT=OFF + -DGLAD_INSTALL=ON + -DGLAD_REPRODUCIBLE=ON + -DGLAD_SPEC="gl" # {gl,egl,glx,wgl} + -DGLAD_PROFILE="compatibility" # {core,compatibility} + OPTIONS_DEBUG + -DGLAD_GENERATOR="c-debug" +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/glad) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/KHR) +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/glad/copyright COPYONLY) diff --git a/ports/glbinding/CONTROL b/ports/glbinding/CONTROL index 1fd7819016d..d225e60c81c 100644 --- a/ports/glbinding/CONTROL +++ b/ports/glbinding/CONTROL @@ -1,3 +1,3 @@ Source: glbinding -Version: 2.1.1-3 +Version: 3.0.2-3 Description: glbinding is an MIT licensed, cross-platform C++ binding for the OpenGL API diff --git a/ports/glbinding/force-system-install.patch b/ports/glbinding/force-system-install.patch new file mode 100644 index 00000000000..1674f145ab7 --- /dev/null +++ b/ports/glbinding/force-system-install.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 011577a..e52d19d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,11 +42,13 @@ include(cmake/GenerateTemplateExportHeader.cmake) + # + + # Get git revision ++if(NOT DEFINED GIT_REV) + get_git_head_revision(GIT_REFSPEC GIT_SHA1) + string(SUBSTRING "${GIT_SHA1}" 0 12 GIT_REV) + if(NOT GIT_SHA1) + set(GIT_REV "0") + endif() ++endif() + + # Meta information about the project + set(META_PROJECT_NAME "glbinding") +@@ -135,7 +137,7 @@ if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" OR "${CMAKE_INSTALL_PREFIX}" STREQU + endif() + + # Installation paths +-if(UNIX AND SYSTEM_DIR_INSTALL) ++if(1) + # Install into the system (/usr/bin or /usr/local/bin) + set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/ + set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share//cmake +@@ -148,7 +150,7 @@ if(UNIX AND SYSTEM_DIR_INSTALL) + set(INSTALL_DOC "share/doc/${project}") # /usr/[local]/share/doc/ + set(INSTALL_SHORTCUTS "share/applications") # /usr/[local]/share/applications + set(INSTALL_ICONS "share/pixmaps") # /usr/[local]/share/pixmaps +- set(INSTALL_INIT "/etc/init") # /etc/init (upstart init scripts) ++ set(INSTALL_INIT "etc/init") # /etc/init (upstart init scripts) + else() + # Install into local directory + set(INSTALL_ROOT ".") # ./ diff --git a/ports/glbinding/portfile.cmake b/ports/glbinding/portfile.cmake index cf3f64e5db6..64063bc73cb 100644 --- a/ports/glbinding/portfile.cmake +++ b/ports/glbinding/portfile.cmake @@ -1,79 +1,34 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# 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) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cginternals/glbinding - REF v2.1.1 - SHA512 6c7251555801272a90c87a9386324eb6993102601a036fc7d9f9b4ebed64c74d011909566e5fc5a34ef8242e24915848296023daa1420c91aaf08cf9635be397 + REF v3.0.2 + SHA512 524ad20a11af7d8ee1764f53326b43efb3b3dbd6c64d1539f4d9fa2bcb7b58a6bd6caf460d6944aed4fd7439b82536d8f28a0f0f51c14c62c2f0c73baab9afcb HEAD_REF master + PATCHES force-system-install.patch ) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DOPTION_BUILD_TESTS=OFF -DOPTION_BUILD_GPU_TESTS=OFF + -DOPTION_BUILD_TOOLS=OFF + -DGIT_REV=0 + -DCMAKE_DISABLE_FIND_PACKAGE_cpplocate=ON ) -#vcpkg_build_cmake() vcpkg_install_cmake() - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/glbinding ${CURRENT_PACKAGES_DIR}/share/glbinding) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) -file(READ ${CURRENT_PACKAGES_DIR}/debug/cmake/glbinding/glbinding-export-debug.cmake GLBINDING_DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" GLBINDING_DEBUG_MODULE "${GLBINDING_DEBUG_MODULE}") -string(REPLACE "glbindingd.dll" "bin/glbindingd.dll" GLBINDING_DEBUG_MODULE "${GLBINDING_DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/glbinding/glbinding-export-debug.cmake "${GLBINDING_DEBUG_MODULE}") -file(READ ${CURRENT_PACKAGES_DIR}/share/glbinding/glbinding-export-release.cmake RELEASE_CONF) -string(REPLACE "glbinding.dll" "bin/glbinding.dll" RELEASE_CONF "${RELEASE_CONF}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/glbinding/glbinding-export-release.cmake "${RELEASE_CONF}") -file(REMOVE ${CURRENT_PACKAGES_DIR}/glbinding-config.cmake) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/glbinding-config.cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/glbinding/glbinding-export.cmake ${CURRENT_PACKAGES_DIR}/share/glbinding/glbinding-config.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}/glbinding.dll ${CURRENT_PACKAGES_DIR}/bin/glbinding.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/glbindingd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/glbindingd.dll) -endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/data ${CURRENT_PACKAGES_DIR}/share/data) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/data) -file(REMOVE ${CURRENT_PACKAGES_DIR}/AUTHORS - ${CURRENT_PACKAGES_DIR}/LICENSE - ${CURRENT_PACKAGES_DIR}/README.md - ${CURRENT_PACKAGES_DIR}/VERSION - ${CURRENT_PACKAGES_DIR}/debug/AUTHORS - ${CURRENT_PACKAGES_DIR}/debug/LICENSE - ${CURRENT_PACKAGES_DIR}/debug/README.md - ${CURRENT_PACKAGES_DIR}/debug/VERSION - ) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/glbinding/cmake/glbinding TARGET_PATH share/glbinding/cmake/glbinding) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/glbinding/cmake/glbinding-aux TARGET_PATH share/glbinding/cmake/glbinding-aux) -# There are some executables that are only built if glfw is found by CMake (see source/tools/*/CMakeLists.txt). -# glfw is not listed as a dependency for glbinding, so this only happen on systems where package glfw3 is present. -# glbinding's CMake doesn't offer the choice to exlude those tools from the build process, so deleting them here: -file(REMOVE ${CURRENT_PACKAGES_DIR}/glcontexts.exe - ${CURRENT_PACKAGES_DIR}/glfunctions.exe - ${CURRENT_PACKAGES_DIR}/glmeta.exe - ${CURRENT_PACKAGES_DIR}/glqueries.exe - ${CURRENT_PACKAGES_DIR}/debug/glcontextsd.exe - ${CURRENT_PACKAGES_DIR}/debug/glfunctionsd.exe - ${CURRENT_PACKAGES_DIR}/debug/glmetad.exe - ${CURRENT_PACKAGES_DIR}/debug/glqueriesd.exe -) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/glbinding/glbinding-config.cmake "include(\${CMAKE_CURRENT_LIST_DIR}/cmake/glbinding/glbinding-export.cmake)\ninclude(\${CMAKE_CURRENT_LIST_DIR}/cmake/glbinding-aux/glbinding-aux-export.cmake)\nset(glbinding_FOUND TRUE)\n") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/glbinding) file(RENAME ${CURRENT_PACKAGES_DIR}/share/glbinding/LICENSE ${CURRENT_PACKAGES_DIR}/share/glbinding/copyright) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/glfw3/CONTROL b/ports/glfw3/CONTROL index 9cb0cbdc61d..0c8eb3e5877 100644 --- a/ports/glfw3/CONTROL +++ b/ports/glfw3/CONTROL @@ -1,3 +1,3 @@ Source: glfw3 -Version: 3.2.1-2 +Version: 3.2.1-3 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/glfw3/portfile.cmake b/ports/glfw3/portfile.cmake index 4418268d62e..dcc7da89d5c 100644 --- a/ports/glfw3/portfile.cmake +++ b/ports/glfw3/portfile.cmake @@ -1,71 +1,51 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glfw-3.2.1) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/glfw/glfw/releases/download/3.2.1/glfw-3.2.1.zip" - FILENAME "glfw-3.2.1.zip" - SHA512 73dd6d4a8d28a2b423f0fb25489659c1a845182b7ef09848d4f442cdc489528aea90f43ac84aeedb9d2301c4487f39782b647ee4959e67e83babb838372b980c -) -vcpkg_extract_source_archive(${ARCHIVE}) -if(NOT EXISTS ${SOURCE_PATH}/patch-config.stamp) - message(STATUS "Patching src/glfw3Config.cmake.in") - file(READ ${SOURCE_PATH}/src/glfw3Config.cmake.in CONFIG) - string(REPLACE "\"@GLFW_LIB_NAME@\"" "NAMES @GLFW_LIB_NAME@ @GLFW_LIB_NAME@dll" - CONFIG ${CONFIG} - ) - #string(REPLACE "@PACKAGE_CMAKE_INSTALL_PREFIX@" "@PACKAGE_CMAKE_INSTALL_PREFIX@/../.." - # CONFIG ${CONFIG} - #) - file(WRITE ${SOURCE_PATH}/src/glfw3Config.cmake.in ${CONFIG}) - file(APPEND ${SOURCE_PATH}/src/glfw3Config.cmake.in "set(GLFW3_LIBRARIES \${GLFW3_LIBRARY})\n") - file(WRITE ${SOURCE_PATH}/patch-config.stamp) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO glfw/glfw + REF 3.2.1 + SHA512 c7921f993b9a99b3b9421fefadb039cd475c42d85f5b5a35d7c5401c70491349bb885a02fd31e527de06a8b40d9d49a1fdb92c964e13c04ae092c6b98eb491dc + HEAD_REF master + PATCHES move-cmake-min-req.patch +) + +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message( +"GLFW3 currently requires the following libraries from the system package manager: + xinerama + xcursor + +These can be installed on Ubuntu systems via sudo apt install libxinerama-dev libxcursor-dev") endif() -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/move-cmake-min-req.patch -) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF - -DPACKAGE_CMAKE_INSTALL_PREFIX=\${CMAKE_CURRENT_LIST_DIR}/../.. ) vcpkg_install_cmake() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/glfw3 ${CURRENT_PACKAGES_DIR}/share/glfw3) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) -file(READ ${CURRENT_PACKAGES_DIR}/share/glfw3/glfw3Targets.cmake _contents) -set(pattern "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\n") -string(REPLACE "${pattern}${pattern}${pattern}" "${pattern}${pattern}" _contents "${_contents}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/glfw3/glfw3Targets.cmake ${_contents}) - -file(READ ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/glfw3/glfw3Targets-debug.cmake _contents) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" _contents "${_contents}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/glfw3/glfw3Targets-debug.cmake "${_contents}") -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/glfw3) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/glfw3.dll ${CURRENT_PACKAGES_DIR}/bin/glfw3.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/glfw3.dll ${CURRENT_PACKAGES_DIR}/debug/bin/glfw3.dll) - foreach(_conf release - debug) - file(READ ${CURRENT_PACKAGES_DIR}/share/glfw3/glfw3Targets-${_conf}.cmake _contents) - string(REPLACE "lib/glfw3.dll" "bin/glfw3.dll" _contents "${_contents}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/glfw3/glfw3Targets-${_conf}.cmake "${_contents}") - endforeach() - + if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/glfw3.dll OR EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/glfw3.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/glfw3.dll ${CURRENT_PACKAGES_DIR}/bin/glfw3.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/glfw3.dll ${CURRENT_PACKAGES_DIR}/debug/bin/glfw3.dll) + foreach(_conf release debug) + file(READ ${CURRENT_PACKAGES_DIR}/share/glfw3/glfw3Targets-${_conf}.cmake _contents) + string(REPLACE "lib/glfw3.dll" "bin/glfw3.dll" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/glfw3/glfw3Targets-${_conf}.cmake "${_contents}") + endforeach() + endif() endif() file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glfw3) file(RENAME ${CURRENT_PACKAGES_DIR}/share/glfw3/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/glfw3/copyright) -vcpkg_copy_pdbs() +vcpkg_copy_pdbs() diff --git a/ports/glib/CMakeLists.txt b/ports/glib/CMakeLists.txt index 3743b0a3447..debfd8dd58c 100644 --- a/ports/glib/CMakeLists.txt +++ b/ports/glib/CMakeLists.txt @@ -126,7 +126,7 @@ else() target_link_libraries(glib PRIVATE Threads::Threads ${CMAKE_DL_LIBS}) endif() target_include_directories(glib PRIVATE ${PCRE_INCLUDE_DIR} ${ICONV_INCLUDE_DIR}) -target_include_directories(glib PUBLIC ${LIBINTL_INCLUDE_DIR}) +target_include_directories(glib PUBLIC $ $) list(APPEND GLIB_TARGETS glib) if(NOT GLIB_SKIP_HEADERS) install(FILES glib/glib.h glib/glib-object.h ${CMAKE_BINARY_DIR}/config/glib/glibconfig.h DESTINATION include) @@ -151,7 +151,7 @@ extract_vcproj_sources(win32/vs14/gobject.vcxproj GOBJECT_SOURCES) add_library(gobject ${GOBJECT_SOURCES}) target_compile_definitions(gobject PRIVATE GOBJECT_COMPILATION G_LOG_DOMAIN="GLib-GObject") target_link_libraries(gobject PRIVATE gthread glib ${FFI_LIBRARY}) -target_include_directories(gobject PRIVATE ${FFI_INCLUDE_DIR}) +target_include_directories(gobject PRIVATE ${FFI_INCLUDE_DIR} PUBLIC $) list(APPEND GLIB_TARGETS gobject) if(NOT GLIB_SKIP_HEADERS) file(GLOB GOBJECT_HEADERS gobject/*.h gobject/gobjectnotifyqueue.c) @@ -164,7 +164,7 @@ add_library(gmodule gmodule/gmodule.c) target_compile_definitions(gmodule PRIVATE G_LOG_DOMAIN="GModule") target_link_libraries(gmodule PRIVATE glib ${LIBINTL_LIBRARY}) target_include_directories(gmodule PUBLIC $) -target_include_directories(gmodule PRIVATE ${LIBINTL_INCLUDE_DIR}) +target_include_directories(gmodule PRIVATE ${LIBINTL_INCLUDE_DIR} PUBLIC $) list(APPEND GLIB_TARGETS gmodule) if(NOT GLIB_SKIP_HEADERS) install(FILES gmodule/gmodule.h DESTINATION include) @@ -232,7 +232,7 @@ endif() add_library(gio ${GIO_SOURCES}) target_compile_definitions(gio PRIVATE GIO_COMPILATION G_LOG_DOMAIN="GLib-GIO") target_link_libraries(gio PRIVATE glib gmodule gobject ZLIB::ZLIB ${LIBRESOLV_LIBRARY} ${LIBINTL_LIBRARY}) -target_include_directories(gio PUBLIC $) +target_include_directories(gio PUBLIC $ $) if(WIN32) target_link_libraries(gio PRIVATE ws2_32 shlwapi dnsapi iphlpapi) elseif(APPLE) @@ -297,7 +297,28 @@ if(NOT GLIB_SKIP_TOOLS) install(TARGETS ${GLIB_TOOLS} RUNTIME DESTINATION tools/glib) endif() -install(TARGETS ${GLIB_TARGETS} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +install( + TARGETS ${GLIB_TARGETS} + EXPORT glib + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) +install( + EXPORT glib + NAMESPACE unofficial::glib:: + FILE unofficial-glib-targets.cmake + DESTINATION share/unofficial-glib +) +configure_file( + cmake/unofficial-glib-config.in.cmake + cmake/unofficial-glib-config.cmake + @ONLY +) +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/cmake/unofficial-glib-config.cmake + DESTINATION share/unofficial-glib +) message(STATUS "Link-time dependencies:") message(STATUS " " ${ZLIB_LIBRARIES}) diff --git a/ports/glib/CONTROL b/ports/glib/CONTROL index f37b794cb9f..0e04397f853 100644 --- a/ports/glib/CONTROL +++ b/ports/glib/CONTROL @@ -1,4 +1,4 @@ Source: glib -Version: 2.52.3-9 +Version: 2.52.3-11 Description: Portable, general-purpose utility library. Build-Depends: zlib, pcre, libffi, gettext, libiconv diff --git a/ports/glib/cmake/unofficial-glib-config.in.cmake b/ports/glib/cmake/unofficial-glib-config.in.cmake new file mode 100644 index 00000000000..976e52a9b58 --- /dev/null +++ b/ports/glib/cmake/unofficial-glib-config.in.cmake @@ -0,0 +1,7 @@ +if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") + include(CMakeFindDependencyMacro) + find_dependency(Threads) + find_dependency(unofficial-iconv) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/unofficial-glib-targets.cmake") diff --git a/ports/glib/portfile.cmake b/ports/glib/portfile.cmake index a500cbd2427..96baa9b3e72 100644 --- a/ports/glib/portfile.cmake +++ b/ports/glib/portfile.cmake @@ -42,9 +42,11 @@ vcpkg_configure_cmake( OPTIONS_DEBUG -DGLIB_SKIP_HEADERS=ON -DGLIB_SKIP_TOOLS=ON - ) +) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-glib TARGET_PATH share/unofficial-glib) + vcpkg_copy_pdbs() vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/glib) diff --git a/ports/glm/CONTROL b/ports/glm/CONTROL index 10a6e5f88ed..3da56cf543f 100644 --- a/ports/glm/CONTROL +++ b/ports/glm/CONTROL @@ -1,3 +1,3 @@ Source: glm -Version: 0.9.8.5-1 +Version: 0.9.9.3 Description: OpenGL Mathematics (GLM) https://glm.g-truc.net diff --git a/ports/glm/disable_warnings_as_error.patch b/ports/glm/disable_warnings_as_error.patch new file mode 100644 index 00000000000..f87616b1ecd --- /dev/null +++ b/ports/glm/disable_warnings_as_error.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 756673a3..5fbc8906 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -216,7 +216,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + message("GLM: Visual C++ - ${CMAKE_CXX_COMPILER_ID} compiler") + endif() + +- add_compile_options(/W4 /WX) ++ add_compile_options(/W4) + add_compile_options(/wd4309 /wd4324 /wd4389 /wd4127 /wd4267 /wd4146 /wd4201 /wd4464 /wd4514 /wd4701 /wd4820 /wd4365) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) + endif() diff --git a/ports/glm/ignore-warning-C4201.patch b/ports/glm/ignore-warning-C4201.patch deleted file mode 100644 index b94b123db13..00000000000 --- a/ports/glm/ignore-warning-C4201.patch +++ /dev/null @@ -1,128 +0,0 @@ -diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp -index f5c7f017..69c7274a 100644 ---- a/glm/detail/type_vec1.hpp -+++ b/glm/detail/type_vec1.hpp -@@ -39,6 +39,10 @@ namespace glm - # pragma clang diagnostic push - # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" - # pragma clang diagnostic ignored "-Wnested-anon-types" -+# endif -+# if GLM_COMPILER & GLM_COMPILER_VC -+# pragma warning(push) -+# pragma warning(disable: 4201) - # endif - - union -@@ -60,6 +64,9 @@ namespace glm - # endif//GLM_SWIZZLE*/ - }; - -+# if GLM_COMPILER & GLM_COMPILER_VC -+# pragma warning(pop) -+# endif - # if GLM_COMPILER & GLM_COMPILER_CLANG - # pragma clang diagnostic pop - # endif -diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp -index a9af32e3..b8b8f32e 100644 ---- a/glm/detail/type_vec2.hpp -+++ b/glm/detail/type_vec2.hpp -@@ -38,6 +38,10 @@ namespace glm - # pragma clang diagnostic push - # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" - # pragma clang diagnostic ignored "-Wnested-anon-types" -+# endif -+# if GLM_COMPILER & GLM_COMPILER_VC -+# pragma warning(push) -+# pragma warning(disable: 4201) - # endif - - union -@@ -60,6 +64,9 @@ namespace glm - - }; - -+# if GLM_COMPILER & GLM_COMPILER_VC -+# pragma warning(pop) -+# endif - # if GLM_COMPILER & GLM_COMPILER_CLANG - # pragma clang diagnostic pop - # endif -diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp -index f85f0a5c..28e6c6ed 100644 ---- a/glm/detail/type_vec3.hpp -+++ b/glm/detail/type_vec3.hpp -@@ -38,6 +38,10 @@ namespace glm - # pragma clang diagnostic push - # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" - # pragma clang diagnostic ignored "-Wnested-anon-types" -+# endif -+# if GLM_COMPILER & GLM_COMPILER_VC -+# pragma warning(push) -+# pragma warning(disable: 4201) - # endif - - union -@@ -59,6 +63,9 @@ namespace glm - # endif//GLM_SWIZZLE - }; - -+# if GLM_COMPILER & GLM_COMPILER_VC -+# pragma warning(pop) -+# endif - # if GLM_COMPILER & GLM_COMPILER_CLANG - # pragma clang diagnostic pop - # endif -diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp -index 5e89b744..0a16bc2c 100644 ---- a/glm/detail/type_vec4.hpp -+++ b/glm/detail/type_vec4.hpp -@@ -38,6 +38,10 @@ namespace glm - # pragma clang diagnostic push - # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" - # pragma clang diagnostic ignored "-Wnested-anon-types" -+# endif -+# if GLM_COMPILER & GLM_COMPILER_VC -+# pragma warning(push) -+# pragma warning(disable: 4201) - # endif - - union -@@ -61,6 +65,9 @@ namespace glm - # endif//GLM_SWIZZLE - }; - -+# if GLM_COMPILER & GLM_COMPILER_VC -+# pragma warning(pop) -+# endif - # if GLM_COMPILER & GLM_COMPILER_CLANG - # pragma clang diagnostic pop - # endif -diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp -index 8af1c8bf..ff8c4aa6 100644 ---- a/glm/gtc/quaternion.hpp -+++ b/glm/gtc/quaternion.hpp -@@ -49,6 +49,10 @@ namespace glm - # pragma clang diagnostic push - # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" - # pragma clang diagnostic ignored "-Wnested-anon-types" -+# endif -+# if GLM_COMPILER & GLM_COMPILER_VC -+# pragma warning(push) -+# pragma warning(disable: 4201) - # endif - - union -@@ -57,6 +61,9 @@ namespace glm - typename detail::storage::value>::type data; - }; - -+# if GLM_COMPILER & GLM_COMPILER_VC -+# pragma warning(pop) -+# endif - # if GLM_COMPILER & GLM_COMPILER_CLANG - # pragma clang diagnostic pop - # endif --- -2.15.1.windows.2 - diff --git a/ports/glm/portfile.cmake b/ports/glm/portfile.cmake index 1fb4fe07337..7eca9876653 100644 --- a/ports/glm/portfile.cmake +++ b/ports/glm/portfile.cmake @@ -3,14 +3,14 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO g-truc/glm - REF 0.9.8.5 - SHA512 5a7e84ecc5a54320c74776c133bfdbeaf0d4496a7a7fdf2f4ccf89e66b3665a577a370a662ac97a350a2b1f717ce769cb0826057ebb3b13c9c2fee65f20ac7b4 + REF 0.9.9.3 + SHA512 44152ea6438763feda3b78813287fd59d3574a9630a41647a157825bf5ce4a18fbbecae5a5ccd94acc118ed3d42cbce53d3a67f25632d0c00ab77e7de2bb4650 HEAD_REF master ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/ignore-warning-C4201.patch" + PATCHES "${CMAKE_CURRENT_LIST_DIR}/disable_warnings_as_error.patch" ) vcpkg_configure_cmake( @@ -27,5 +27,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Put the license file where vcpkg expects it -file(COPY ${SOURCE_PATH}/copying.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glm/) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/glm/copying.txt ${CURRENT_PACKAGES_DIR}/share/glm/copyright) +file(COPY ${SOURCE_PATH}/manual.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/glm/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/glm/manual.md ${CURRENT_PACKAGES_DIR}/share/glm/copyright) diff --git a/ports/globjects/CONTROL b/ports/globjects/CONTROL index df9c862dc93..b75b256c613 100644 --- a/ports/globjects/CONTROL +++ b/ports/globjects/CONTROL @@ -1,5 +1,5 @@ Source: globjects Maintainer: mattias@mattiascibien.net -Version: 1.0.0-1 +Version: 1.1.0-2018-09-19 Build-Depends: glbinding, glm Description: C++ library strictly wrapping OpenGL objects. diff --git a/ports/globjects/portfile.cmake b/ports/globjects/portfile.cmake index 08fae6ec3ec..5019fea0de4 100644 --- a/ports/globjects/portfile.cmake +++ b/ports/globjects/portfile.cmake @@ -1,66 +1,37 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# 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/globjects-1.0.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/cginternals/globjects/archive/v1.0.0.zip" - FILENAME "globjects-1.0.0.zip" - SHA512 e03ae16786b11891a61f0e2f85b0d98a858d1bad3cf4c45944982d6a753dbaa8b28975dc02153360a5ac0f3be73fe86c91af130cfc0dda7459dd782f16868eeb + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cginternals/globjects + REF fe53c4a386506d3374df12ad6f1f67c4232aa389 + SHA512 62b40675671acf050bfe4836da5b6b6a757185d296a86ad1079cf79e4a149820971ed46fce7379b73707dff368919b63d52044230a7ce75601441fe368d91e63 + HEAD_REF master + PATCHES system-install.patch ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DOPTION_BUILD_TESTS=OFF -DOPTION_BUILD_GPU_TESTS=OFF + -DGIT_REV=0 ) -#vcpkg_build_cmake() + vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/globjects/cmake/globjects TARGET_PATH share/globjects/cmake/globjects) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/globjects ${CURRENT_PACKAGES_DIR}/share/globjects) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -file(READ ${CURRENT_PACKAGES_DIR}/debug/cmake/globjects/globjects-export-debug.cmake globjects_DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" globjects_DEBUG_MODULE "${globjects_DEBUG_MODULE}") -string(REPLACE "globjectsd.dll" "bin/globjectsd.dll" globjects_DEBUG_MODULE "${globjects_DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/globjects/globjects-export-debug.cmake "${globjects_DEBUG_MODULE}") -file(READ ${CURRENT_PACKAGES_DIR}/share/globjects/globjects-export-release.cmake RELEASE_CONF) -string(REPLACE "globjects.dll" "bin/globjects.dll" RELEASE_CONF "${RELEASE_CONF}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/globjects/globjects-export-release.cmake "${RELEASE_CONF}") -file(REMOVE ${CURRENT_PACKAGES_DIR}/globjects-config.cmake) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/globjects-config.cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/globjects/globjects-export.cmake ${CURRENT_PACKAGES_DIR}/share/globjects/globjects-config.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}/globjects.dll ${CURRENT_PACKAGES_DIR}/bin/globjects.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/globjectsd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/globjectsd.dll) -endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/data ${CURRENT_PACKAGES_DIR}/share/data) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/data) -file(REMOVE ${CURRENT_PACKAGES_DIR}/AUTHORS - ${CURRENT_PACKAGES_DIR}/LICENSE - ${CURRENT_PACKAGES_DIR}/README.md - ${CURRENT_PACKAGES_DIR}/VERSION - ${CURRENT_PACKAGES_DIR}/debug/AUTHORS - ${CURRENT_PACKAGES_DIR}/debug/LICENSE - ${CURRENT_PACKAGES_DIR}/debug/README.md - ${CURRENT_PACKAGES_DIR}/debug/VERSION - ) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/globjects/globjects-config.cmake "include(CMakeFindDependencyMacro) +find_dependency(glm) +find_dependency(glbinding) + +include(\${CMAKE_CURRENT_LIST_DIR}/cmake/globjects/globjects-export.cmake) +") # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/globjects) file(RENAME ${CURRENT_PACKAGES_DIR}/share/globjects/LICENSE ${CURRENT_PACKAGES_DIR}/share/globjects/copyright) vcpkg_copy_pdbs() diff --git a/ports/globjects/system-install.patch b/ports/globjects/system-install.patch new file mode 100644 index 00000000000..10e0c5b4905 --- /dev/null +++ b/ports/globjects/system-install.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6556346..48ba95d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,11 +42,13 @@ include(cmake/GenerateTemplateExportHeader.cmake) + # + + # Get git revision ++if(NOT DEFINED GIT_REV) + get_git_head_revision(GIT_REFSPEC GIT_SHA1) + string(SUBSTRING "${GIT_SHA1}" 0 12 GIT_REV) + if(NOT GIT_SHA1) + set(GIT_REV "0") + endif() ++endif() + + # Meta information about the project + set(META_PROJECT_NAME "globjects") +@@ -133,7 +135,7 @@ if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" OR "${CMAKE_INSTALL_PREFIX}" STREQU + endif() + + # Installation paths +-if(UNIX AND SYSTEM_DIR_INSTALL) ++if(1) + # Install into the system (/usr/bin or /usr/local/bin) + set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/ + set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share//cmake diff --git a/ports/glslang/0001-Fix-export-symbol-for-Windows.patch b/ports/glslang/0001-Fix-export-symbol-for-Windows.patch deleted file mode 100644 index 80ce58da48c..00000000000 --- a/ports/glslang/0001-Fix-export-symbol-for-Windows.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 1ccadd2cb6db3ce5a00635f65db21e561eb7f705 Mon Sep 17 00:00:00 2001 -From: vlj -Date: Fri, 25 Nov 2016 17:12:35 +0100 -Subject: [PATCH] Fix export symbol for Windows. - ---- - StandAlone/CMakeLists.txt | 1 + - StandAlone/ResourceLimits.cpp | 3 +++ - StandAlone/ResourceLimits.h | 10 ++++++++++ - 3 files changed, 14 insertions(+) - -diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt -index 231ba27..3aff02e 100644 ---- a/StandAlone/CMakeLists.txt -+++ b/StandAlone/CMakeLists.txt -@@ -2,6 +2,7 @@ add_library(glslang-default-resource-limits - ${CMAKE_CURRENT_SOURCE_DIR}/ResourceLimits.cpp - ) - set_property(TARGET glslang-default-resource-limits PROPERTY FOLDER glslang) -+set_property(TARGET glslang-default-resource-limits PROPERTY COMPILE_DEFINITIONS DLLEXPORT) - - target_include_directories(glslang-default-resource-limits - PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} -diff --git a/StandAlone/ResourceLimits.cpp b/StandAlone/ResourceLimits.cpp -index e22ec80..634d9c9 100644 ---- a/StandAlone/ResourceLimits.cpp -+++ b/StandAlone/ResourceLimits.cpp -@@ -41,6 +41,7 @@ - - namespace glslang { - -+DLL_EXPORT - const TBuiltInResource DefaultTBuiltInResource = { - /* .MaxLights = */ 32, - /* .MaxClipPlanes = */ 6, -@@ -137,6 +138,7 @@ const TBuiltInResource DefaultTBuiltInResource = { - /* .generalConstantMatrixVectorIndexing = */ 1, - }}; - -+DLL_EXPORT - std::string GetDefaultTBuiltInResourceString() - { - std::ostringstream ostream; -@@ -239,6 +241,7 @@ std::string GetDefaultTBuiltInResourceString() - return ostream.str(); - } - -+DLL_EXPORT - void DecodeResourceLimits(TBuiltInResource* resources, char* config) - { - static const char* delims = " \t\n\r"; -diff --git a/StandAlone/ResourceLimits.h b/StandAlone/ResourceLimits.h -index 9c3eb3e..932a59f 100644 ---- a/StandAlone/ResourceLimits.h -+++ b/StandAlone/ResourceLimits.h -@@ -39,17 +39,27 @@ - - #include "glslang/Include/ResourceLimits.h" - -+#ifdef DLLEXPORT -+#define DLL_EXPORT __declspec(dllexport) -+#else -+#define DLL_EXPORT __declspec(dllimport) -+#endif -+ - namespace glslang { - - // These are the default resources for TBuiltInResources, used for both - // - parsing this string for the case where the user didn't supply one, - // - dumping out a template for user construction of a config file. -+ -+DLL_EXPORT - extern const TBuiltInResource DefaultTBuiltInResource; - - // Returns the DefaultTBuiltInResource as a human-readable string. -+DLL_EXPORT - std::string GetDefaultTBuiltInResourceString(); - - // Decodes the resource limits from |config| to |resources|. -+DLL_EXPORT - void DecodeResourceLimits(TBuiltInResource* resources, char* config); - - } // end namespace glslang --- -2.10.2.windows.1 - diff --git a/ports/glslang/CONTROL b/ports/glslang/CONTROL index 22d5a054ecb..c924828436a 100644 --- a/ports/glslang/CONTROL +++ b/ports/glslang/CONTROL @@ -1,3 +1,3 @@ Source: glslang -Version: 2018-03-02 +Version: 2018-03-02-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 2182d9bcd00..b7cbdb98e20 100644 --- a/ports/glslang/portfile.cmake +++ b/ports/glslang/portfile.cmake @@ -1,8 +1,6 @@ include(vcpkg_common_functions) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(WARNING "Dynamic not supported. Building static") - set(VCPKG_LIBRARY_LINKAGE "static") -endif() + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -15,6 +13,7 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS -DCMAKE_DEBUG_POSTFIX=d ) vcpkg_install_cmake() diff --git a/ports/gmmlib/CONTROL b/ports/gmmlib/CONTROL new file mode 100644 index 00000000000..a06044494c7 --- /dev/null +++ b/ports/gmmlib/CONTROL @@ -0,0 +1,3 @@ +Source: gmmlib +Version: 18.3.pre2-1 +Description: intel's graphics memory management library diff --git a/ports/gmmlib/portfile.cmake b/ports/gmmlib/portfile.cmake new file mode 100644 index 00000000000..6ed92151fad --- /dev/null +++ b/ports/gmmlib/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "Intel gmmlib currently only supports Linux platforms") +endif() + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO intel/gmmlib + REF intel-gmmlib-18.3.pre2 + SHA512 9831f6e6f001ba99d5b4860c68697dfc33535a20aa853716534a18b6e4df6c7b95039fff7ffe6f0303cfeb70db4c53ad26a6fa6a8fb6148fa4080e456bff3859 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DARCH=64 +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/gmmlib/copyright COPYONLY) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/igdgmm/GmmLib/Scripts) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/igdgmm/GmmLib/Resource) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/igdgmm/GmmLib/GlobalInfo) diff --git a/ports/google-cloud-cpp/CONTROL b/ports/google-cloud-cpp/CONTROL index e44b2e5e645..7a64d2e149e 100644 --- a/ports/google-cloud-cpp/CONTROL +++ b/ports/google-cloud-cpp/CONTROL @@ -1,4 +1,4 @@ Source: google-cloud-cpp -Version: 0.1.0 -Build-Depends: grpc, gtest +Version: 0.3.0-1 +Build-Depends: grpc, gtest, curl, crc32c Description: C++ Client Libraries for Google Cloud Platform APIs. diff --git a/ports/google-cloud-cpp/include-protobuf.patch b/ports/google-cloud-cpp/include-protobuf.patch new file mode 100644 index 00000000000..d0e3529c7e3 --- /dev/null +++ b/ports/google-cloud-cpp/include-protobuf.patch @@ -0,0 +1,13 @@ +--- a/google/cloud/bigtable/CMakeLists.txt 2018-11-09 10:56:34.029389338 -0500 ++++ a/google/cloud/bigtable/CMakeLists.txt 2018-11-09 10:57:18.461259917 -0500 +@@ -53,6 +53,10 @@ + # Configure the location of proto files, particulary the googleapis protos. + list(APPEND PROTOBUF_IMPORT_DIRS "${PROJECT_THIRD_PARTY_DIR}/googleapis" + "${PROJECT_SOURCE_DIR}") ++find_path(PROTO_INCLUDE_DIR google/protobuf/descriptor.proto) ++if(PROTO_INCLUDE_DIR) ++ list(INSERT PROTOBUF_IMPORT_DIRS 0 "${PROTO_INCLUDE_DIR}") ++endif() + + # Include the functions to compile proto files. + include(CompileProtos) diff --git a/ports/google-cloud-cpp/portfile.cmake b/ports/google-cloud-cpp/portfile.cmake index 701d94ae568..2081b20f7ef 100644 --- a/ports/google-cloud-cpp/portfile.cmake +++ b/ports/google-cloud-cpp/portfile.cmake @@ -8,16 +8,17 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO GoogleCloudPlatform/google-cloud-cpp - REF v0.1.0 - SHA512 3947cc24ca1ed97309f055f17945afe2d6b22ae8f54f86d3395f8c491b7409d4b7bb12206889d04d07f51236e9fd5afd65b904c8c80521a3313588d8069545c2 + REF v0.3.0 + SHA512 90f876ebf4bea40c5bc12d2bd20d27b48202f951d57a68b657c07b7d468b2ac5a00e39a3a6fca48f92030d89ba7d9706eb52b3c8e734b392aee63632af042b5d HEAD_REF master + PATCHES include-protobuf.patch ) -set(GOOGLEAPIS_VERSION 92f10d7033c6fa36e1a5a369ab5aa8bafd564009) +set(GOOGLEAPIS_VERSION 6a3277c0656219174ff7c345f31fb20a90b30b97) vcpkg_download_distfile(GOOGLEAPIS - URLS "https://github.com/google/googleapis/archive/92f10d7033c6fa36e1a5a369ab5aa8bafd564009.zip" + URLS "https://github.com/google/googleapis/archive/${GOOGLEAPIS_VERSION}.zip" FILENAME "googleapis-${GOOGLEAPIS_VERSION}.zip" - SHA512 4280ece965a231f6a0bb3ea38a961d15babd9eac517f9b0d57e12f186481bbab6a27e4f0ee03ba3c587c9aa93d3c2e6c95f67f50365c65bb10594f0229279287 + SHA512 809b7cf0429df9867c8ab558857785e9d7d70aea033c6d588b60d29d2754001e9aea5fcdd8cae22fad8145226375bedbd1516d86af7d1e9731fffea331995ad9 ) file(REMOVE_RECURSE ${SOURCE_PATH}/third_party) @@ -28,16 +29,14 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DGOOGLE_CLOUD_CPP_GRPC_PROVIDER=vcpkg - -DGOOGLE_CLOUD_CPP_GMOCK_PROVIDER=vcpkg + -DGOOGLE_CLOUD_CPP_DEPENDENCY_PROVIDER=vcpkg + -DGOOGLE_CLOUD_CPP_ENABLE_MACOS_OPENSSL_CHECK=OFF ) vcpkg_install_cmake(ADD_BIN_TO_PATH) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bigtable/client/testing) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake TARGET_PATH share/bigtable_client) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/google-cloud-cpp RENAME copyright) diff --git a/ports/graphicsmagick/CMakeLists.txt b/ports/graphicsmagick/CMakeLists.txt index 27f9fb10995..c156b69c77a 100644 --- a/ports/graphicsmagick/CMakeLists.txt +++ b/ports/graphicsmagick/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required (VERSION 3.6) project (graphicsmagick) -find_package(Zlib REQUIRED) +find_package(ZLIB REQUIRED) find_package(Bzip2 REQUIRED) find_package(JPEG REQUIRED) find_package(PNG REQUIRED) @@ -29,13 +29,6 @@ include_directories("Magick++") include_directories("Magick++/lib") include_directories("wand") -include_directories(${ZLIB_INCLUDE_DIRS}) -include_directories(${BZIP2_INCLUDE_DIR}) -include_directories(${NATIVE_JPEG_INCLUDE_PATH}) -include_directories(${PNG_INCLUDE_DIRS}) -include_directories(${TIFF_INCLUDE_DIRS}) -include_directories(${FREETYPE_INCLUDE_DIRS}) - file(READ "magick/magick_config.h.in" CONFIG_H) string(REPLACE "#undef HasBZLIB" "#define HasBZLIB" CONFIG_H "${CONFIG_H}") string(REPLACE "#undef HasJPEG" "#define HasJPEG" CONFIG_H "${CONFIG_H}") @@ -108,18 +101,49 @@ add_library(graphicsmagick coders/art.c coders/avs.c Magick++/lib/TypeMetric.cpp wand/drawing_wand.c wand/magick_compat.c wand/magick_wand.c wand/pixel_wand.c) -TARGET_LINK_LIBRARIES(graphicsmagick ${ZLIB_LIBRARIES}) -TARGET_LINK_LIBRARIES(graphicsmagick ${BZIP2_LIBRARIES}) -TARGET_LINK_LIBRARIES(graphicsmagick ${JPEG_LIBRARIES}) -TARGET_LINK_LIBRARIES(graphicsmagick ${PNG_LIBRARIES}) -TARGET_LINK_LIBRARIES(graphicsmagick ${TIFF_LIBRARIES}) -TARGET_LINK_LIBRARIES(graphicsmagick ${FREETYPE_LIBRARIES}) +TARGET_LINK_LIBRARIES(graphicsmagick PRIVATE + ZLIB::ZLIB + BZip2::BZip2 + #${JPEG_LIBRARIES} + JPEG::JPEG + PNG::PNG + TIFF::TIFF + Freetype::Freetype +) +target_include_directories(graphicsmagick INTERFACE $) install(TARGETS graphicsmagick + EXPORT graphicsmagick-targets RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +install( + EXPORT graphicsmagick-targets + FILE unofficial-graphicsmagick-targets.cmake + NAMESPACE unofficial::graphicsmagick:: + DESTINATION share/unofficial-graphicsmagick +) +find_package(ZLIB REQUIRED) +find_package(BZip2 REQUIRED) +find_package(JPEG REQUIRED) +find_package(PNG REQUIRED) +find_package(TIFF REQUIRED) +find_package(Freetype REQUIRED) + +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unofficial-graphicsmagick-config.cmake " +include(CMakeFindDependencyMacro) +find_dependency(ZLIB) +find_dependency(BZip2) +find_dependency(JPEG) +find_dependency(PNG) +find_dependency(TIFF) +find_dependency(Freetype) + +include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-graphicsmagick-targets.cmake) +") +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-graphicsmagick-config.cmake DESTINATION share/unofficial-graphicsmagick) + option(INSTALL_HEADERS "Install development header files" ON) if (INSTALL_HEADERS) diff --git a/ports/graphicsmagick/CONTROL b/ports/graphicsmagick/CONTROL index 275bae92f69..7b89a8fd9ad 100644 --- a/ports/graphicsmagick/CONTROL +++ b/ports/graphicsmagick/CONTROL @@ -1,4 +1,5 @@ Source: graphicsmagick -Version: 1.3.28 +Maintainer: josuegomes@gmail.com +Version: 1.3.31 Build-Depends: zlib, bzip2, freetype, libjpeg-turbo, libpng, tiff Description: Image processing library diff --git a/ports/graphicsmagick/disable_graphicsmagick_modules.patch b/ports/graphicsmagick/disable_graphicsmagick_modules.patch new file mode 100644 index 00000000000..bfb91d0fdc7 --- /dev/null +++ b/ports/graphicsmagick/disable_graphicsmagick_modules.patch @@ -0,0 +1,11 @@ +--- a/magick/studio.h 2018-06-23 14:13:49.191541000 -0400 ++++ b/magick/studio.h 2018-09-02 11:50:41.856753700 -0400 +@@ -414,7 +414,7 @@ + #endif + + #if defined(HasLTDL) || ( defined(MSWINDOWS) && defined(_DLL) ) +-# define SupportMagickModules ++//# define SupportMagickModules + #endif + + #if defined(_MAGICKMOD_) diff --git a/ports/graphicsmagick/portfile.cmake b/ports/graphicsmagick/portfile.cmake index 12630d34631..87d03bd1f66 100644 --- a/ports/graphicsmagick/portfile.cmake +++ b/ports/graphicsmagick/portfile.cmake @@ -1,31 +1,41 @@ include(vcpkg_common_functions) -set(GM_VERSION 1.3.28) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/graphicsmagick-${GM_VERSION}-windows-source) +set(GM_VERSION 1.3.31) vcpkg_download_distfile(ARCHIVE URLS "https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/${GM_VERSION}/GraphicsMagick-${GM_VERSION}-windows-source.7z" FILENAME "GraphicsMagick-${GM_VERSION}-windows-source.7z" - SHA512 0271c187634580204dcc3173553bae9e3cd799203d621ad9e2ba64be778760ac307f25af54859b10e60f8e2589287ad98062548f1c3c94f229e68e7c83878419 - ) -vcpkg_extract_source_archive(${ARCHIVE}) + SHA512 ff67f5e6adf352527264e7a6a76d45ce34470263dc764760d876b9ab5d5078e3a46b9d9cb2e7ab52d53106ffe584d44c66b42f3d4d62c972662d488c86510881 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF "${GM_VERSION}" + PATCHES + # GM always requires a dynamic BZIP2. This patch makes this dependent if _DLL is defined + dynamic_bzip2.patch + + # Bake GM's own modules into the .dll itself. This fixes a bug whereby + # 'vcpkg install graphicsmagick' did not lead to a copy of GM that could + # load either PNG or JPEG files (due to missing GM Modules, with names + # matching "IM_*.DLL"). + disable_graphicsmagick_modules.patch +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/magick_types.h DESTINATION ${SOURCE_PATH}/magick) -# GM always requires a dynamic BZIP2. This patch makes this dependent if _DLL is defined -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/dynamic_bzip2.patch) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS_DEBUG -DINSTALL_HEADERS=OFF + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-graphicsmagick TARGET_PATH share/unofficial-graphicsmagick) + # copy license file(COPY ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/graphicsmagick) file(RENAME ${CURRENT_PACKAGES_DIR}/share/graphicsmagick/Copyright.txt ${CURRENT_PACKAGES_DIR}/share/graphicsmagick/copyright) @@ -40,3 +50,5 @@ string(REPLACE "@windows_font_dir@" "$ENV{SYSTEMROOT}/Fonts/" TYPE_MGK "${TYPE_M file(WRITE ${CURRENT_PACKAGES_DIR}/share/graphicsmagick/config/type.mgk "${TYPE_MGK}") vcpkg_copy_pdbs() + +vcpkg_test_cmake(PACKAGE_NAME unofficial-graphicsmagick) diff --git a/ports/graphite2/CONTROL b/ports/graphite2/CONTROL index eb12bb45022..f73126c5ad9 100644 --- a/ports/graphite2/CONTROL +++ b/ports/graphite2/CONTROL @@ -1,4 +1,4 @@ Source: graphite2 -Version: 1.3.10 +Version: 1.3.12 Description: Graphite is a "smart font" system developed specifically to handle the complexities of lesser-known languages of the world. Graphite2 is a rework of the original Graphite engine that is faster, smaller, and uses an API that is better suited to the layout architecture of most text-processing applications. \ No newline at end of file diff --git a/ports/graphite2/disable-tests-docs.patch b/ports/graphite2/disable-tests-docs.patch deleted file mode 100644 index ff92caa1696..00000000000 --- a/ports/graphite2/disable-tests-docs.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3466c5f..6d5c6bd 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -63,9 +63,13 @@ endif (GRAPHITE2_VM_TYPE STREQUAL "direct" AND NOT (CMAKE_COMPILER_IS_GNUCXX OR - message(STATUS "Using vm machine type: ${GRAPHITE2_VM_TYPE}") - - add_subdirectory(src) -+if(NOT DISABLE_TESTS) - add_subdirectory(tests) -+endif() -+if(NOT DISABLE_DOCS) - add_subdirectory(doc) --if (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE)) -+endif() -+if (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE) AND NOT DISABLE_TESTS) - add_subdirectory(gr2fonttest) - endif (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE)) - diff --git a/ports/graphite2/disable-tests.patch b/ports/graphite2/disable-tests.patch new file mode 100644 index 00000000000..d88c1cee5f3 --- /dev/null +++ b/ports/graphite2/disable-tests.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a4c648e..db90735 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -80,11 +80,13 @@ if (BUILD_SHARED_LIBS) + endif (BUILD_SHARED_LIBS) + + add_subdirectory(src) ++if(NOT DISABLE_TESTS) + add_subdirectory(tests) + add_subdirectory(doc) + if (NOT GRAPHITE2_NFILEFACE) + add_subdirectory(gr2fonttest) + endif (NOT GRAPHITE2_NFILEFACE) ++endif() + + set(version 3.0.1) + set(libdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) diff --git a/ports/graphite2/fix-static-build.patch b/ports/graphite2/fix-static-build.patch deleted file mode 100644 index 7a51f43cfe3..00000000000 --- a/ports/graphite2/fix-static-build.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3466c5f..d88b3bc 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -63,11 +63,11 @@ endif (GRAPHITE2_VM_TYPE STREQUAL "direct" AND NOT (CMAKE_COMPILER_IS_GNUCXX OR - message(STATUS "Using vm machine type: ${GRAPHITE2_VM_TYPE}") - - add_subdirectory(src) --add_subdirectory(tests) --add_subdirectory(doc) --if (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE)) -- add_subdirectory(gr2fonttest) --endif (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE)) -+# add_subdirectory(tests) -+# add_subdirectory(doc) -+# if (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE)) -+# add_subdirectory(gr2fonttest) -+# endif (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE)) - - set(version 3.0.1) - set(libdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) diff --git a/ports/graphite2/portfile.cmake b/ports/graphite2/portfile.cmake index eb017e9d8b1..f5292ba8347 100644 --- a/ports/graphite2/portfile.cmake +++ b/ports/graphite2/portfile.cmake @@ -4,14 +4,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO silnrsi/graphite - REF 99658129785a218556929db0595a002a668b40b0 - SHA512 50cf6f727a2ea13ccbf55b4dad282358c40973aa0a0d97db6d721208b70fe848791aab183062c7bed8ce5b0dc3fecd6b604f6defdd5ae89b46ce267069ee0ed1 + REF 1.3.12 + SHA512 d0aed05b54445a9664435d5aef9d78fc07a89be23d18b7b1339d37412b09faca6da3dc1e72524e4b114724b76aa6f36934e8ab1a01bd0752e353efa075c9e643 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/disable-tests-docs.patch" + PATCHES disable-tests.patch ) vcpkg_configure_cmake( @@ -19,7 +15,6 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DDISABLE_TESTS=ON - -DDISABLE_DOCS=ON ) vcpkg_install_cmake() diff --git a/ports/graphqlparser/CONTROL b/ports/graphqlparser/CONTROL new file mode 100644 index 00000000000..4a66842c0d1 --- /dev/null +++ b/ports/graphqlparser/CONTROL @@ -0,0 +1,3 @@ +Source: graphqlparser +Version: v0.7.0 +Description: A GraphQL query parser in C++ with C and C++ APIs diff --git a/ports/graphqlparser/portfile.cmake b/ports/graphqlparser/portfile.cmake new file mode 100644 index 00000000000..0e1414583d4 --- /dev/null +++ b/ports/graphqlparser/portfile.cmake @@ -0,0 +1,51 @@ +# 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 = +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO graphql/libgraphqlparser + REF v0.7.0 + SHA512 973292b164d0d2cfe453a2f01559dbdb1b9d22b6304f6a3aabf71e2c0a3e24ab69dfd72a086764ad5befecf0005620f8e86f552dacc324f9615a05f31de7cede + HEAD_REF master + PATCHES ${CMAKE_CURRENT_LIST_DIR}/win-cmake.patch +) + +if(UNIX) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + ) +elseif(WIN32) + vcpkg_find_acquire_program(PYTHON2) + vcpkg_find_acquire_program(FLEX) + vcpkg_find_acquire_program(BISON) + + get_filename_component(VCPKG_DOWNLOADS_PYTHON2_DIR "${PYTHON2}" DIRECTORY) + get_filename_component(VCPKG_DOWNLOADS_FLEX_DIR "${FLEX}" DIRECTORY) + get_filename_component(VCPKG_DOWNLOADS_BISON_DIR "${BISON}" DIRECTORY) + + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DVCPKG_DOWNLOADS_PYTHON2_DIR=${VCPKG_DOWNLOADS_PYTHON2_DIR} + -DVCPKG_DOWNLOADS_FLEX_DIR=${VCPKG_DOWNLOADS_FLEX_DIR} + -DVCPKG_DOWNLOADS_BISON_DIR=${VCPKG_DOWNLOADS_BISON_DIR} + ) +endif() + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/graphqlparser RENAME copyright) diff --git a/ports/graphqlparser/win-cmake.patch b/ports/graphqlparser/win-cmake.patch new file mode 100644 index 00000000000..c71ba97ff07 --- /dev/null +++ b/ports/graphqlparser/win-cmake.patch @@ -0,0 +1,104 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c4c8b3e..f19cda3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,16 +3,37 @@ PROJECT(libgraphqlparser C CXX) + + SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}") + +-INCLUDE(version) ++IF(UNIX) ++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") ++ SET(FLEX_COMPILE_FLAGS "--header-file=lexer.h") ++ELSEIF(WIN32) ++ # If we're building this with vcpkg on Windows, let portfile.cmake tell us where it ++ # stored these tools. Otherwise these variables should be empty and we'll fall back ++ # to the normal CMake FIND_PACKAGE logic for each of these programs. ++ SET(CMAKE_PROGRAM_PATH ++ "${VCPKG_DOWNLOADS_PYTHON2_DIR}" ++ "${VCPKG_DOWNLOADS_FLEX_DIR}" ++ "${VCPKG_DOWNLOADS_BISON_DIR}" ++ "${CMAKE_PROGRAM_PATH}") ++ ++ SET(FLEX_COMPILE_FLAGS "--header-file=lexer.h --wincompat") ++ ++ # Let CMake figure out the exports for the SHARED library (DLL) on Windows. ++ SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) ++ENDIF() + +-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") ++INCLUDE(version) + + FIND_PACKAGE(PythonInterp 2 REQUIRED) + IF (NOT PYTHON_VERSION_MAJOR EQUAL 2) + MESSAGE(FATAL_ERROR "Python 2 is required.") + ENDIF() + +-FIND_PROGRAM(CTYPESGEN_FOUND ctypesgen.py) ++IF(UNIX) ++ SET(FLEX_COMPILE_FLAGS "--header-file=lexer.h") ++ELSEIF(WIN32) ++ SET(FLEX_COMPILE_FLAGS "--header-file=lexer.h --wincompat") ++ENDIF() + + FIND_PACKAGE(BISON 3) + FIND_PACKAGE(FLEX) +@@ -21,7 +42,7 @@ IF (BISON_FOUND) + ENDIF() + + IF(FLEX_FOUND) +- FLEX_TARGET(GraphQLScanner lexer.lpp ${CMAKE_CURRENT_SOURCE_DIR}/lexer.cpp COMPILE_FLAGS "--header-file=lexer.h") ++ FLEX_TARGET(GraphQLScanner lexer.lpp ${CMAKE_CURRENT_SOURCE_DIR}/lexer.cpp COMPILE_FLAGS ${FLEX_COMPILE_FLAGS}) + IF (BISON_FOUND) + ADD_FLEX_BISON_DEPENDENCY(GraphQLScanner graphqlparser) + ENDIF() +@@ -83,11 +104,8 @@ GENERATE_AST_FILE(cxx_json_visitor_header JsonVisitor.h.inc) + + GENERATE_AST_FILE(cxx_json_visitor_impl JsonVisitor.cpp.inc) + +-ADD_SUBDIRECTORY(python) +- +-OPTION(test "Build tests." OFF) +- + INSTALL(DIRECTORY c ${CMAKE_CURRENT_BINARY_DIR}/c DESTINATION include/graphqlparser ++ CONFIGURATIONS Release + FILES_MATCHING PATTERN "*.h" + PATTERN "build" EXCLUDE) + +@@ -103,9 +121,12 @@ INSTALL(FILES + position.hh + stack.hh + syntaxdefs.h +- DESTINATION include/graphqlparser) ++ DESTINATION include/graphqlparser ++ CONFIGURATIONS Release) ++ + INSTALL(TARGETS graphqlparser +- LIBRARY DESTINATION lib) ++ LIBRARY DESTINATION lib ++ RUNTIME DESTINATION bin) + + if (UNIX) + # generate pkgconfig file +@@ -116,16 +137,9 @@ if (UNIX) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libgraphqlparser.pc" + DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig") + endif() ++elseif(WIN32) ++ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/graphqlparser.lib ++ DESTINATION lib) ++ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/graphqlparser.pdb ++ DESTINATION bin) + endif() +- +-IF (test) +- ADD_SUBDIRECTORY(test) +- +- if(UNIX) +- # setup valgrind +- ADD_CUSTOM_TARGET(memcheck +- valgrind --leak-check=full --suppressions=./test/valgrind.supp --dsymutil=yes --error-exitcode=1 ./test/runTests >/dev/null +- ) +- endif() +- +-ENDIF() diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 6f8f18467fe..7045bd44460 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.10.1-1 -Build-Depends: zlib, openssl, protobuf, c-ares +Version: 1.14.1 +Build-Depends: zlib, openssl, protobuf, c-ares (!uwp) Description: An RPC library and framework diff --git a/ports/grpc/disable-csharp-ext-2.patch b/ports/grpc/disable-csharp-ext-2.patch deleted file mode 100644 index 1bc863105c5..00000000000 --- a/ports/grpc/disable-csharp-ext-2.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0dc0bd3..7f702cc 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -4699,6 +4699,7 @@ endif (gRPC_BUILD_TESTS) - - option(gRPC_INSTALL_CSHARP_EXT "" ON) - -+if(gRPC_INSTALL_CSHARP_EXT) - add_library(grpc_csharp_ext SHARED - src/csharp/ext/grpc_csharp_ext.c - ) -@@ -4741,6 +4742,7 @@ if (gRPC_INSTALL AND gRPC_INSTALL_CSHARP_EXT) - ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} - ) - endif() -+endif() - - if (gRPC_BUILD_TESTS) - diff --git a/ports/grpc/disable-csharp-ext.patch b/ports/grpc/disable-csharp-ext.patch deleted file mode 100644 index 3b887c8b466..00000000000 --- a/ports/grpc/disable-csharp-ext.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- 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 - ) -@@ -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 ${gRPC_INSTALL_LIBDIR} OPTIONAL - ) -@@ -4613,7 +4615,7 @@ - - - --if (gRPC_INSTALL) -+if (gRPC_INSTALL AND gRPC_INSTALL_CSHARP_EXT) - install(TARGETS grpc_csharp_ext EXPORT gRPCTargets - RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} - LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} diff --git a/ports/grpc/fix-uwp.patch b/ports/grpc/fix-uwp.patch new file mode 100644 index 00000000000..f479e4c5903 --- /dev/null +++ b/ports/grpc/fix-uwp.patch @@ -0,0 +1,109 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a59fd818e3..774ee2f725 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -89,6 +89,9 @@ if(UNIX) + endif() + if(WIN32) + set(_gRPC_PLATFORM_WINDOWS ON) ++ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") ++ set(_gRPC_PLATFORM_UWP ON) ++ endif() + endif() + + set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) +@@ -155,6 +158,10 @@ file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR}) + # ``.proto`` files + # + function(protobuf_generate_grpc_cpp) ++ if(_gRPC_PLATFORM_UWP) ++ return() ++ endif() ++ + if(NOT ARGN) + message(SEND_ERROR "Error: PROTOBUF_GENERATE_GRPC_CPP() called without any proto files") + return() +@@ -189,6 +196,7 @@ function(protobuf_generate_grpc_cpp) + endforeach() + endfunction() + ++if(NOT _gRPC_PLATFORM_UWP) + add_custom_target(plugins + DEPENDS + grpc_cpp_plugin +@@ -218,6 +226,8 @@ add_custom_target(tools_cxx + add_custom_target(tools + DEPENDS tools_c tools_cxx) + ++endif() ++ + if (gRPC_BUILD_TESTS) + add_custom_target(buildtests_c) + add_dependencies(buildtests_c algorithm_test) +@@ -3661,7 +3671,6 @@ foreach(_hdr + DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" + ) + endforeach() +-endif (gRPC_BUILD_CODEGEN) + + + if (gRPC_INSTALL) +@@ -3671,6 +3680,7 @@ if (gRPC_INSTALL) + ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} + ) + endif() ++endif (gRPC_BUILD_CODEGEN) + + if (gRPC_BUILD_TESTS) + +@@ -3793,7 +3803,7 @@ foreach(_hdr + DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" + ) + endforeach() +-endif (gRPC_BUILD_CODEGEN) ++ + + + if (gRPC_INSTALL) +@@ -3803,6 +3813,7 @@ if (gRPC_INSTALL) + ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} + ) + endif() ++endif (gRPC_BUILD_CODEGEN) + + if (gRPC_BUILD_TESTS) + +diff --git a/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc b/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +index 55efe0e9dd..f538f26edf 100644 +--- a/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc ++++ b/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +@@ -60,6 +60,8 @@ bool check_bios_data(const char* bios_data_file) { + + static void init_mu(void) { gpr_mu_init(&g_mu); } + ++#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP ++ + static bool run_powershell() { + SECURITY_ATTRIBUTES sa; + sa.nLength = sizeof(sa); +@@ -97,8 +99,12 @@ static bool run_powershell() { + CloseHandle(h); + return true; + } ++#endif + + bool grpc_alts_is_running_on_gcp() { ++#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) ++ g_is_on_compute_engine = false; ++#else + gpr_once_init(&g_once, init_mu); + gpr_mu_lock(&g_mu); + if (!g_compute_engine_detection_done) { +@@ -108,6 +114,7 @@ bool grpc_alts_is_running_on_gcp() { + g_compute_engine_detection_done = true; + } + gpr_mu_unlock(&g_mu); ++#endif + return g_is_on_compute_engine; + } + diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 54f29489625..537fa32ae0a 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -1,10 +1,9 @@ -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(STATUS "Warning: Dynamic building not supported yet. Building static.") - set(VCPKG_LIBRARY_LINKAGE static) -endif() - include(vcpkg_common_functions) +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +# This snippet is a workaround for users who are upgrading from an extremely old version of this +# port, which cloned directly into `src\` if(EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) endif() @@ -12,25 +11,30 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO grpc/grpc - REF v1.10.1 - SHA512 2221d902c60eada6dd1547a63d26bd3b30cb6710247b5e48523bacde498a3691cc177f1dbe9db8a007b8ae341a5b0c8ec999539e26a9bcff480a8d0b02140997 + REF v1.14.1 + SHA512 f0e4fe9777ebc3316a85cb581edad19fef785cdcd2859b1dc54bf7407aa2ba804718973661595e318ea62463620f30ca828e5d7638798cca154af5e1d456ed1e HEAD_REF master + PATCHES fix-uwp.patch ) -# Issue: https://github.com/grpc/grpc/issues/10759 -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/disable-csharp-ext.patch - ${CMAKE_CURRENT_LIST_DIR}/disable-csharp-ext-2.patch -) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(gRPC_BUILD_CODEGEN OFF) +else() + set(gRPC_BUILD_CODEGEN ON) +endif() -if(VCPKG_CRT_LINKAGE STREQUAL static) +if(VCPKG_CRT_LINKAGE STREQUAL "static") set(gRPC_MSVC_STATIC_RUNTIME ON) else() set(gRPC_MSVC_STATIC_RUNTIME OFF) endif() +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(cares_CARES_PROVIDER OFF) +else() + set(cares_CARES_PROVIDER "package") +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -41,7 +45,8 @@ vcpkg_configure_cmake( -DgRPC_ZLIB_PROVIDER=package -DgRPC_SSL_PROVIDER=package -DgRPC_PROTOBUF_PROVIDER=package - -DgRPC_CARES_PROVIDER=package + -DgRPC_PROTOBUF_PACKAGE_TYPE=CONFIG + -DgRPC_CARES_PROVIDER=${cares_CARES_PROVIDER} -DgRPC_GFLAGS_PROVIDER=none -DgRPC_BENCHMARK_PROVIDER=none -DgRPC_INSTALL_CSHARP_EXT=OFF @@ -49,17 +54,16 @@ vcpkg_configure_cmake( -DgRPC_INSTALL_LIBDIR:STRING=lib -DgRPC_INSTALL_INCLUDEDIR:STRING=include -DgRPC_INSTALL_CMAKEDIR:STRING=share/grpc + -DgRPC_BUILD_CODEGEN=${gRPC_BUILD_CODEGEN} ) -# gRPC runs built executables during the build, so they need access to the installed DLLs. -set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin") +vcpkg_install_cmake(ADD_BIN_TO_PATH) -vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH "share/grpc") file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/grpc RENAME copyright) -# Install tools and plugins +# Install tools file(GLOB TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.exe") if(TOOLS) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/grpc) @@ -67,12 +71,13 @@ if(TOOLS) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/grpc) endif() -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -else() - SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) # Leave the executable files in bin/ and debug/bin +file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe" "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") +if(EXES) + file(REMOVE ${EXES}) endif() + +# Ignore the C# extension DLL in bin/ +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() diff --git a/ports/gtest/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch b/ports/gtest/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch deleted file mode 100644 index b5082a1b207..00000000000 --- a/ports/gtest/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch +++ /dev/null @@ -1,180 +0,0 @@ -diff --git a/.gitignore b/.gitignore -index ce310bc..08a67cd 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -1,2 +1,15 @@ - # Ignore CI build directory - build/ -+_build/ -+ -+# Visual Studio files -+*.sdf -+*.opensdf -+*.VC.opendb -+*.suo -+*.user -+_ReSharper.Caches/ -+Win32-Debug/ -+Win32-Release/ -+x64-Debug/ -+x64-Release/ -diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc -index 9f62c3d..eaba362 100644 ---- a/googlemock/test/gmock-matchers_test.cc -+++ b/googlemock/test/gmock-matchers_test.cc -@@ -58,6 +58,11 @@ - # include // NOLINT - #endif - -+// Disable MSVC warning: "decorated name length exceeded, name was truncated". -+#ifdef _MSC_VER -+# pragma warning(disable:4503) -+#endif -+ - namespace testing { - - namespace internal { -diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h -index 0094ed5..09779fa 100644 ---- a/googletest/include/gtest/internal/gtest-port.h -+++ b/googletest/include/gtest/internal/gtest-port.h -@@ -323,7 +323,7 @@ - // -std={c,gnu}++{0x,11} is passed. The C++11 standard specifies a - // value for __cplusplus, and recent versions of clang, gcc, and - // probably other compilers set that too in C++11 mode. --# if __GXX_EXPERIMENTAL_CXX0X__ || __cplusplus >= 201103L -+# if __GXX_EXPERIMENTAL_CXX0X__ || __cplusplus >= 201103L || _MSC_VER >= 1900 - // Compiling in at least C++11 mode. - # define GTEST_LANG_CXX11 1 - # else -@@ -355,12 +355,16 @@ - #if GTEST_STDLIB_CXX11 - # define GTEST_HAS_STD_BEGIN_AND_END_ 1 - # define GTEST_HAS_STD_FORWARD_LIST_ 1 --# define GTEST_HAS_STD_FUNCTION_ 1 -+# if !defined(_MSC_VER) || (_MSC_FULL_VER >= 190023824) // works only with VS2015U2 and better -+# define GTEST_HAS_STD_FUNCTION_ 1 -+# endif - # define GTEST_HAS_STD_INITIALIZER_LIST_ 1 - # define GTEST_HAS_STD_MOVE_ 1 - # define GTEST_HAS_STD_SHARED_PTR_ 1 - # define GTEST_HAS_STD_TYPE_TRAITS_ 1 - # define GTEST_HAS_STD_UNIQUE_PTR_ 1 -+# define GTEST_HAS_UNORDERED_MAP_ 1 -+# define GTEST_HAS_UNORDERED_SET_ 1 - #endif - - // C++11 specifies that provides std::tuple. -@@ -616,7 +620,7 @@ struct _RTL_CRITICAL_SECTION; - // Determines if hash_map/hash_set are available. - // Only used for testing against those containers. - #if !defined(GTEST_HAS_HASH_MAP_) --# if _MSC_VER -+# if defined(_MSC_VER) && (_MSC_VER < 1900) - # define GTEST_HAS_HASH_MAP_ 1 // Indicates that hash_map is available. - # define GTEST_HAS_HASH_SET_ 1 // Indicates that hash_set is available. - # endif // _MSC_VER -@@ -629,6 +633,9 @@ struct _RTL_CRITICAL_SECTION; - # if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR) - // STLport, provided with the Android NDK, has neither or . - # define GTEST_HAS_TR1_TUPLE 0 -+# elif defined(_MSC_VER) && (_MSC_VER >= 1910) -+// Prevent `warning C4996: 'std::tr1': warning STL4002: The non-Standard std::tr1 namespace and TR1-only machinery are deprecated and will be REMOVED.` -+# define GTEST_HAS_TR1_TUPLE 0 - # else - // The user didn't tell us not to do it, so we assume it's OK. - # define GTEST_HAS_TR1_TUPLE 1 -@@ -813,7 +820,7 @@ using ::std::tuple_size; - // value-parameterized tests are enabled. The implementation doesn't - // work on Sun Studio since it doesn't understand templated conversion - // operators. --#if GTEST_HAS_PARAM_TEST && GTEST_HAS_TR1_TUPLE && !defined(__SUNPRO_CC) -+#if GTEST_HAS_PARAM_TEST && (GTEST_HAS_TR1_TUPLE || GTEST_HAS_STD_TUPLE_) && !defined(__SUNPRO_CC) - # define GTEST_HAS_COMBINE 1 - #endif - -diff --git a/googletest/test/gtest-printers_test.cc b/googletest/test/gtest-printers_test.cc -index 3e97cc2..6320563 100644 ---- a/googletest/test/gtest-printers_test.cc -+++ b/googletest/test/gtest-printers_test.cc -@@ -51,10 +51,15 @@ - #include "gtest/gtest.h" - - // hash_map and hash_set are available under Visual C++, or on Linux. --#if GTEST_HAS_HASH_MAP_ -+#if GTEST_HAS_UNORDERED_MAP_ -+# include // NOLINT -+#elif GTEST_HAS_HASH_MAP_ - # include // NOLINT - #endif // GTEST_HAS_HASH_MAP_ --#if GTEST_HAS_HASH_SET_ -+ -+#if GTEST_HAS_UNORDERED_SET_ -+# include // NOLINT -+#elif GTEST_HAS_HASH_SET_ - # include // NOLINT - #endif // GTEST_HAS_HASH_SET_ - -@@ -217,18 +222,46 @@ using ::testing::internal::string; - // The hash_* classes are not part of the C++ standard. STLport - // defines them in namespace std. MSVC defines them in ::stdext. GCC - // defines them in ::. -+#if GTEST_HAS_UNORDERED_MAP_ -+ -+#define GTEST_HAS_HASH_MAP_ 1 -+template -+using hash_map = ::std::unordered_map; -+template -+using hash_multimap = ::std::unordered_multimap; -+ -+#elif GTEST_HAS_HASH_MAP_ -+ - #ifdef _STLP_HASH_MAP // We got from STLport. - using ::std::hash_map; --using ::std::hash_set; - using ::std::hash_multimap; --using ::std::hash_multiset; - #elif _MSC_VER - using ::stdext::hash_map; --using ::stdext::hash_set; - using ::stdext::hash_multimap; -+#endif -+ -+#endif -+ -+#if GTEST_HAS_UNORDERED_SET_ -+ -+#define GTEST_HAS_HASH_SET_ 1 -+template -+using hash_set = ::std::unordered_set; -+template -+using hash_multiset = ::std::unordered_multiset; -+ -+#elif GTEST_HAS_HASH_SET_ -+ -+#ifdef _STLP_HASH_MAP // We got from STLport. -+using ::std::hash_set; -+using ::std::hash_multiset; -+#elif _MSC_VER -+using ::stdext::hash_set; - using ::stdext::hash_multiset; - #endif - -+#endif -+ - // Prints a value to a string using the universal value printer. This - // is a helper for testing UniversalPrinter::Print() for various types. - template -diff --git a/googletest/test/gtest_catch_exceptions_test_.cc b/googletest/test/gtest_catch_exceptions_test_.cc -index d0fc82c..c6d953c 100644 ---- a/googletest/test/gtest_catch_exceptions_test_.cc -+++ b/googletest/test/gtest_catch_exceptions_test_.cc -@@ -138,7 +138,7 @@ TEST_F(CxxExceptionInConstructorTest, ThrowsExceptionInConstructor) { - } - - // Exceptions in destructors are not supported in C++11. --#if !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L -+#if !GTEST_LANG_CXX11 - class CxxExceptionInDestructorTest : public Test { - public: - static void TearDownTestCase() { diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL index 2fa32ae3c22..5b3a7c46582 100644 --- a/ports/gtest/CONTROL +++ b/ports/gtest/CONTROL @@ -1,3 +1,3 @@ Source: gtest -Version: 1.8.0-8 +Version: 1.8.1-1 Description: GoogleTest and GoogleMock testing frameworks. diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index 72fe5813ee2..4b0857de487 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -7,15 +7,11 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/googletest - REF release-1.8.0 - SHA512 1dbece324473e53a83a60601b02c92c089f5d314761351974e097b2cf4d24af4296f9eb8653b6b03b1e363d9c5f793897acae1f0c7ac40149216035c4d395d9d + REF release-1.8.1 + SHA512 e6283c667558e1fd6e49fa96e52af0e415a3c8037afe1d28b7ff1ec4c2ef8f49beb70a9327b7fc77eb4052a58c4ccad8b5260ec90e4bceeac7a46ff59c4369d7 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch - ${CMAKE_CURRENT_LIST_DIR}/0002-Fix-z7-override.patch + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0002-Fix-z7-override.patch ) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" GTEST_FORCE_SHARED_CRT) @@ -23,16 +19,15 @@ string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" GTEST_FORCE_SHARED_CRT) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS + OPTIONS -DBUILD_GMOCK=ON -DBUILD_GTEST=ON -DCMAKE_DEBUG_POSTFIX=d -Dgtest_force_shared_crt=${GTEST_FORCE_SHARED_CRT} ) -set(ENV{_CL_} "/D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING") - vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/GTest) file( INSTALL @@ -53,35 +48,30 @@ file( file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/googletest/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gtest RENAME copyright) -# This block will be unnecessary in googletest 1.9.0 (or later). -# These dll files are installed in ../bin directory by default settings. -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gtest.dll) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin/) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest.dll ${CURRENT_PACKAGES_DIR}/bin/gtest.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest_main.dll ${CURRENT_PACKAGES_DIR}/bin/gtest_main.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/bin/gmock.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/bin/gmock_main.dll) -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtestd.dll) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin/) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtestd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtestd.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_maind.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest_maind.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmockd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmockd.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_maind.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock_maind.dll) -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gtest.lib) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gtest.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest_main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gtest_main.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock_main.lib) -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtestd.lib) +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_maind.lib) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtestd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtestd.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtest_maind.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmockd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmockd.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmock_maind.lib) + + file(READ ${CURRENT_PACKAGES_DIR}/share/gtest/GTestTargets-debug.cmake DEBUG_CONFIG) + string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/gtest_maind.lib" + "\${_IMPORT_PREFIX}/debug/lib/manual-link/gtest_maind.lib" DEBUG_CONFIG "${DEBUG_CONFIG}") + string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/gmock_maind.lib" + "\${_IMPORT_PREFIX}/debug/lib/manual-link/gmock_maind.lib" DEBUG_CONFIG "${DEBUG_CONFIG}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/gtest/GTestTargets-debug.cmake "${DEBUG_CONFIG}") +endif() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gtest_main.lib) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest_main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gtest_main.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock_main.lib) + + file(READ ${CURRENT_PACKAGES_DIR}/share/gtest/GTestTargets-release.cmake RELEASE_CONFIG) + string(REPLACE "\${_IMPORT_PREFIX}/lib/gtest_main.lib" + "\${_IMPORT_PREFIX}/lib/manual-link/gtest_main.lib" RELEASE_CONFIG "${RELEASE_CONFIG}") + string(REPLACE "\${_IMPORT_PREFIX}/lib/gmock_main.lib" + "\${_IMPORT_PREFIX}/lib/manual-link/gmock_main.lib" RELEASE_CONFIG "${RELEASE_CONFIG}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/gtest/GTestTargets-release.cmake "${RELEASE_CONFIG}") endif() vcpkg_copy_pdbs() diff --git a/ports/gtest/usage b/ports/gtest/usage index fa226ceede4..d40782e0ef2 100644 --- a/ports/gtest/usage +++ b/ports/gtest/usage @@ -1,6 +1,6 @@ The package gtest is compatible with built-in CMake targets: enable_testing() - find_package(GTest REQUIRED) + find_package(GTest MODULE REQUIRED) target_link_libraries(main PRIVATE GTest::GTest GTest::Main) add_test(AllTestsInMain main) diff --git a/ports/gtk/CMakeLists.txt b/ports/gtk/CMakeLists.txt index a8be6b45a97..22e30b1a78f 100644 --- a/ports/gtk/CMakeLists.txt +++ b/ports/gtk/CMakeLists.txt @@ -76,8 +76,11 @@ add_definitions( -DGTK_DISABLE_SINGLE_INCLUDES -D_USE_MATH_DEFINES) +add_definitions(-DG_ENABLE_DEBUG) if(CMAKE_BUILD_TYPE STREQUAL Debug) - add_definitions(-DG_ENABLE_DEBUG) + add_definitions(-DG_ENABLE_CONSISTENCY_CHECKS) +else() + add_definitions(-DG_DISABLE_CAST_CHECKS) endif() macro(extract_vcproj_sources VC_PROJECT OUT_VAR) diff --git a/ports/gtk/CONTROL b/ports/gtk/CONTROL index e5931156d5b..c470f8ac87a 100644 --- a/ports/gtk/CONTROL +++ b/ports/gtk/CONTROL @@ -1,4 +1,4 @@ Source: gtk -Version: 3.22.19-1 +Version: 3.22.19-2 Description: Portable library for creating graphical user interfaces. Build-Depends: glib, atk, gdk-pixbuf, pango, cairo, libepoxy, gettext diff --git a/ports/guetzli/CONTROL b/ports/guetzli/CONTROL index 2ce631a2a04..1bbfbe4446c 100644 --- a/ports/guetzli/CONTROL +++ b/ports/guetzli/CONTROL @@ -1,4 +1,4 @@ Source: guetzli -Version: 2017-09-02-cb5e4a86f69628-1 +Version: 2018-07-30 Description: Perceptual JPEG encoder Build-Depends: libpng, butteraugli diff --git a/ports/guetzli/portfile.cmake b/ports/guetzli/portfile.cmake index 4fb0402bae1..cb5a4468795 100644 --- a/ports/guetzli/portfile.cmake +++ b/ports/guetzli/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/guetzli - REF cb5e4a86f69628f685f2b78d7429e248ab83d8d7 - SHA512 695a87dc27573b8df74a7e7924e9b96a7bd375b1aae02e7b0fad800428d973cf17947d46ec7afefade2a86ebe3d39f3c3178aad1137b9dd013f5f85ee6569a75 + REF 0b78c7cc8b1b6cbaaf3d08b1facb599bcec1d101 + SHA512 54c5198c4c066858dd1377a32e765f46a589f3444bea303b54326453d0e8e71f959d3aaf2c72f4714fd27891f4d93288e7fa96baf1fd10f127929c1fcfa5ae1c HEAD_REF master ) diff --git a/ports/gumbo/CMakeLists.txt b/ports/gumbo/CMakeLists.txt index fe239cb8a29..1c90f42bce5 100644 --- a/ports/gumbo/CMakeLists.txt +++ b/ports/gumbo/CMakeLists.txt @@ -16,8 +16,10 @@ set(gumbo_srcs src/vector.c ) - -include_directories(visualc/include src) +include_directories(src) +if (MSVC) + include_directories(visualc/include) +endif (MSVC) add_library(gumbo ${gumbo_srcs}) diff --git a/ports/gumbo/CONTROL b/ports/gumbo/CONTROL index ceee95b5d99..82c41213e4a 100644 --- a/ports/gumbo/CONTROL +++ b/ports/gumbo/CONTROL @@ -1,3 +1,3 @@ Source: gumbo -Version: 0.10.1-1 +Version: 0.10.1-2 Description: An HTML5 parsing library in pure C99 diff --git a/ports/gumbo/portfile.cmake b/ports/gumbo/portfile.cmake index a4b0ded72e5..a09ac861921 100644 --- a/ports/gumbo/portfile.cmake +++ b/ports/gumbo/portfile.cmake @@ -1,8 +1,9 @@ include(vcpkg_common_functions) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(WARNING "Dynamic not supported building static") + message(WARNING "Dynamic linking not supported -- building static instead") set(VCPKG_LIBRARY_LINKAGE static) endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/gumbo-parser diff --git a/ports/harfbuzz/0001-fix-cmake-export.patch b/ports/harfbuzz/0001-fix-cmake-export.patch new file mode 100644 index 00000000000..a5abffa41e4 --- /dev/null +++ b/ports/harfbuzz/0001-fix-cmake-export.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e881dbd1..69496561 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -761,11 +761,17 @@ endif () + + if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) + install(TARGETS harfbuzz ++ EXPORT harfbuzzConfig + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + FRAMEWORK DESTINATION Library/Frameworks + ) ++ install(EXPORT harfbuzzConfig ++ NAMESPACE harfbuzz:: ++ FILE harfbuzz-config.cmake ++ DESTINATION share/harfbuzz ++ ) + if (HB_BUILD_UTILS) + install(TARGETS hb-view + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index e6cf6a8e5e9..f3c58ee6ee8 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,4 +1,20 @@ Source: harfbuzz -Version: 1.7.6-1 +Version: 1.8.4-2 Description: HarfBuzz OpenType text shaping engine -Build-Depends: freetype, ragel, glib (windows) +Build-Depends: freetype, ragel +Default-Features: ucdn + +Feature: graphite2 +Build-Depends: graphite2 +Description: Graphite2 shaper support + +Feature: icu +Build-Depends: icu +Description: icu support for harfbuzz + +Feature: ucdn +Description: Builtin (UCDN) Unicode callbacks support + +Feature: glib +Build-Depends: glib +Description: Glib Unicode callbacks support diff --git a/ports/harfbuzz/glib-cmake.patch b/ports/harfbuzz/glib-cmake.patch new file mode 100644 index 00000000000..cdd7f48a679 --- /dev/null +++ b/ports/harfbuzz/glib-cmake.patch @@ -0,0 +1,29 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3c52731..8305f27 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -314,22 +314,12 @@ endif () + if (HB_HAVE_GLIB) + add_definitions(-DHAVE_GLIB) + +- # https://github.com/WebKit/webkit/blob/master/Source/cmake/FindGLIB.cmake +- find_package(PkgConfig) +- pkg_check_modules(PC_GLIB QUIET glib-2.0) +- +- find_library(GLIB_LIBRARIES NAMES glib-2.0 HINTS ${PC_GLIB_LIBDIR} ${PC_GLIB_LIBRARY_DIRS}) +- find_path(GLIBCONFIG_INCLUDE_DIR NAMES glibconfig.h HINTS ${PC_LIBDIR} ${PC_LIBRARY_DIRS} ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0/include) +- find_path(GLIB_INCLUDE_DIR NAMES glib.h HINTS ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0) +- +- include_directories(${GLIBCONFIG_INCLUDE_DIR} ${GLIB_INCLUDE_DIR}) ++ find_package(unofficial-glib CONFIG REQUIRED) + + list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-glib.cc) + list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-glib.h) + +- list(APPEND THIRD_PARTY_LIBS ${GLIB_LIBRARIES}) +- +- mark_as_advanced(GLIB_LIBRARIES GLIBCONFIG_INCLUDE_DIR GLIB_INCLUDE_DIR) ++ list(APPEND THIRD_PARTY_LIBS unofficial::glib::glib) + endif () + + if (HB_HAVE_ICU) diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 906e42d9530..382b045e122 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -2,25 +2,44 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO behdad/harfbuzz - REF 1.7.6 - SHA512 90b51475d532377fe1686264a40f4a5555fc024f6984c1e3c114d8f4662e0c7f4a13e6a95e35fd5b3c54d1bb1b3cb97840b23f5ec2c6a799da61db1614b0fce3 + REPO harfbuzz/harfbuzz + REF 1.8.4 + SHA512 92742b754713d1df8975d4d8467de04765784d7fd566b7e07e7e7a261b0338e997a5fc11fa4fe282d6d5540d242db40c993812fbc4a881becd95fd3aae598c80 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - "${CMAKE_CURRENT_LIST_DIR}/0001-fix-uwp-build.patch" - "${CMAKE_CURRENT_LIST_DIR}/find-package-freetype-2.patch" + 0001-fix-uwp-build.patch + find-package-freetype-2.patch + glib-cmake.patch + 0001-fix-cmake-export.patch ) -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_CMAKE_SYSTEM_NAME) - SET(HAVE_GLIB "OFF") - SET(BUILTIN_UCDN "ON") -else() - SET(HAVE_GLIB "ON") - SET(BUILTIN_UCDN "OFF") +SET(HB_HAVE_ICU "OFF") +if("icu" IN_LIST FEATURES) + SET(HB_HAVE_ICU "ON") +endif() + +SET(HB_HAVE_GRAPHITE2 "OFF") +if("graphite2" IN_LIST FEATURES) + SET(HB_HAVE_GRAPHITE2 "ON") +endif() + +## Unicode callbacks + +# Builtin (UCDN) +set(BUILTIN_UCDN OFF) +if("ucdn" IN_LIST FEATURES) + set(BUILTIN_UCDN ON) +endif() + +# Glib +set(HAVE_GLIB OFF) +if("glib" IN_LIST FEATURES) + set(HAVE_GLIB ON) +endif() + +# At least one Unicode callback must be specified, or harfbuzz compilation fails +if(NOT (BUILTIN_UCDN OR HAVE_GLIB)) + message(FATAL_ERROR "Error: At least one Unicode callback must be specified (ucdn, glib).") endif() vcpkg_configure_cmake( @@ -28,15 +47,20 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DHB_HAVE_FREETYPE=ON - -DHB_HAVE_GLIB=${HAVE_GLIB} -DHB_BUILTIN_UCDN=${BUILTIN_UCDN} + -DHB_HAVE_ICU=${HB_HAVE_ICU} + -DHB_HAVE_GLIB=${HAVE_GLIB} + -DHB_HAVE_GRAPHITE2=${HB_HAVE_GRAPHITE2} OPTIONS_DEBUG -DSKIP_INSTALL_HEADERS=ON ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/harfbuzz TARGET_PATH share/harfbuzz) vcpkg_copy_pdbs() # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/harfbuzz) file(RENAME ${CURRENT_PACKAGES_DIR}/share/harfbuzz/COPYING ${CURRENT_PACKAGES_DIR}/share/harfbuzz/copyright) + +vcpkg_test_cmake(PACKAGE_NAME harfbuzz) diff --git a/ports/http-parser/CONTROL b/ports/http-parser/CONTROL index 26b9f8d3483..76b43da1419 100644 --- a/ports/http-parser/CONTROL +++ b/ports/http-parser/CONTROL @@ -1,3 +1,3 @@ Source: http-parser -Version: 2.7.1-3 -Description: HTTP Parser. +Version: 2.8.1 +Description: HTTP Parser. \ No newline at end of file diff --git a/ports/http-parser/portfile.cmake b/ports/http-parser/portfile.cmake index 49f829a53bd..17a4101358b 100644 --- a/ports/http-parser/portfile.cmake +++ b/ports/http-parser/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nodejs/http-parser - REF v2.7.1 - SHA512 c0fe86455db1a563a5c668f118dfa9a27b9a637ee1c0e2f2f18a5b816352436ed90435ea978e3f3d85b037d3c630234e47d609dc3b7086b898286c4e54d9f031 + REF v2.8.1 + SHA512 6f52f543d979f39688ccefae236527a8183929b3d30f5370570107b01cf89d0338b448249a81102b78d31615d2e8f6e7c708f8961f55ece08e7d3a40e5ad0883 HEAD_REF master ) diff --git a/ports/hunspell/CMakeLists.txt b/ports/hunspell/CMakeLists.txt index c04e0e37cf1..7794d36cfbc 100644 --- a/ports/hunspell/CMakeLists.txt +++ b/ports/hunspell/CMakeLists.txt @@ -61,6 +61,11 @@ set(LIBHUNSPELL_HDRS #hunspell/libhunspell add_library(libhunspell ${LIBHUNSPELL_HDRS} ${LIBHUNSPELL_SRCS}) target_compile_definitions(libhunspell PRIVATE -DBUILDING_LIBHUNSPELL) +install(TARGETS libhunspell + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) #parsers/libparsers set(LIBPARSERS_SRCS @@ -93,59 +98,58 @@ set(TESTPARSER_SRCS src/parsers/odfparser.cxx ) -add_executable(testparser ${TESTPARSER_SRCS}) -target_link_libraries(testparser libhunspell) +if(NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND CMAKE_BUILD_TYPE STREQUAL "Release") + add_executable(testparser ${TESTPARSER_SRCS}) + target_link_libraries(testparser libhunspell) -#tools/analyze -add_executable(analyze "src/tools/analyze.cxx") -target_link_libraries(analyze libhunspell) + #tools/analyze + add_executable(analyze "src/tools/analyze.cxx") + target_link_libraries(analyze libhunspell) -#tools/chmorph -add_executable(chmorph "src/tools/chmorph.cxx" $) -target_link_libraries(chmorph libhunspell) + #tools/chmorph + add_executable(chmorph "src/tools/chmorph.cxx" $) + target_link_libraries(chmorph libhunspell) -#tools/hunspell -include(CheckIncludeFile) -check_include_file("curses.h" HAVE_CURSES_H) -check_include_file("langinfo.h" HAVE_LANGINFO_CODESET) -check_include_file("libintl.h" HAVE_LIBINTL_H) -check_include_file("locale.h" HAVE_LOCALE_H) -check_include_file("ncursesw/curses.h" HAVE_NCURSESW_H) -check_include_file("unistd.h" HAVE_UNISTD_H) -configure_file("config.h.in" "config.h") + #tools/hunspell + include(CheckIncludeFile) + check_include_file("curses.h" HAVE_CURSES_H) + check_include_file("langinfo.h" HAVE_LANGINFO_CODESET) + check_include_file("libintl.h" HAVE_LIBINTL_H) + check_include_file("locale.h" HAVE_LOCALE_H) + check_include_file("ncursesw/curses.h" HAVE_NCURSESW_H) + check_include_file("unistd.h" HAVE_UNISTD_H) + configure_file("config.h.in" "config.h") -add_executable(hunspell "src/tools/hunspell.cxx" $) -target_include_directories(hunspell PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") -target_link_libraries(hunspell libhunspell) + add_executable(hunspell "src/tools/hunspell.cxx" $) + target_include_directories(hunspell PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") + target_link_libraries(hunspell libhunspell) -#tools/munch -add_executable(munch "src/tools/munch.cxx") + #tools/munch + add_executable(munch "src/tools/munch.cxx") -#tools/unmunch -add_executable(unmunch "src/tools/unmunch.cxx") + #tools/unmunch + add_executable(unmunch "src/tools/unmunch.cxx") -#tools/hzip -#add_executable(hzip "src/tools/hzip.cxx") -#target_link_libraries(hzip libhunspell) + #tools/hzip + #add_executable(hzip "src/tools/hzip.cxx") + #target_link_libraries(hzip libhunspell) -#tools/hunzip -add_executable(hunzip "src/tools/hunzip.cxx") -target_link_libraries(hunzip libhunspell) + #tools/hunzip + add_executable(hunzip "src/tools/hunzip.cxx") + target_link_libraries(hunzip libhunspell) -install( -TARGETS - libhunspell - hunspell - testparser - analyze - chmorph - munch - unmunch -# hzip - hunzip -ARCHIVE DESTINATION lib -LIBRARY DESTINATION lib -RUNTIME DESTINATION bin -) + install( + TARGETS + hunspell + testparser + analyze + chmorph + munch + unmunch + # hzip + hunzip + DESTINATION tools/hunspell + ) +endif() install(FILES ${LIBHUNSPELL_HDRS} DESTINATION "include/hunspell/") diff --git a/ports/hunspell/CONTROL b/ports/hunspell/CONTROL index da62f205b55..e13bef73dce 100644 --- a/ports/hunspell/CONTROL +++ b/ports/hunspell/CONTROL @@ -1,3 +1,3 @@ Source: hunspell -Version: 1.6.1-2 +Version: 1.6.1-3 Description: The most popular spellchecking library. diff --git a/ports/hunspell/portfile.cmake b/ports/hunspell/portfile.cmake index 7d632563cdc..d49f4a8dca4 100644 --- a/ports/hunspell/portfile.cmake +++ b/ports/hunspell/portfile.cmake @@ -1,18 +1,12 @@ include(vcpkg_common_functions) -set(HUNSPELL_VERSION 1.6.1) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hunspell-${HUNSPELL_VERSION}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/hunspell/hunspell/archive/v${HUNSPELL_VERSION}.zip" - FILENAME "hunspell-${HUNSPELL_VERSION}.zip" - SHA512 164eb1ae9ff9f4d8efe8998fa3ad847bf5a0c1a87113acc52dcdb3aaddb4e9179274585623bd7152f9a82b803bd42ce24fe856ac8d49121214bef59ac1c7753c -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001_fix_unistd.patch +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hunspell/hunspell + REF v1.6.1 + SHA512 39b096ec1f5226f13eaf241647fc9b49a6dad04945ae0bcdc61ba845d66d67d64a72ba4287b6f376b5ad053b5d0e1d42a42415c30521c50693f0544718029458 + HEAD_REF master + PATCHES 0001_fix_unistd.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -23,24 +17,13 @@ vcpkg_configure_cmake( PREFER_NINJA ) -vcpkg_build_cmake() vcpkg_install_cmake() vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(GLOB_RECURSE TOOLS_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(GLOB_RECURSE TOOLS_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) - -file(COPY ${TOOLS_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) -file(REMOVE ${TOOLS_RELEASE} ${TOOLS_DEBUG}) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() - file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/hunspell) file(RENAME ${CURRENT_PACKAGES_DIR}/share/hunspell/COPYING ${CURRENT_PACKAGES_DIR}/share/hunspell/copyright) @@ -49,4 +32,3 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/hunspell/COPYING.LESSER ${CURRENT_PACK file(COPY ${SOURCE_PATH}/COPYING.MPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/hunspell) file(RENAME ${CURRENT_PACKAGES_DIR}/share/hunspell/COPYING.MPL ${CURRENT_PACKAGES_DIR}/share/hunspell/copyright-mpl) - diff --git a/ports/hwloc/CMakeLists.txt b/ports/hwloc/CMakeLists.txt index 7f75c558c58..1b2e1c802d7 100644 --- a/ports/hwloc/CMakeLists.txt +++ b/ports/hwloc/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.0) -project(hwloc C) +project(hwloc + LANGUAGES C + VERSION 1.11.7) configure_file(contrib/windows/hwloc_config.h include/hwloc/autogen/config.h COPYONLY) configure_file(contrib/windows/static-components.h include/static-components.h COPYONLY) @@ -36,14 +38,30 @@ add_library(libhwloc src/dolib.c) set_target_properties(libhwloc PROPERTIES DEFINE_SYMBOL _USRDLL) -target_include_directories(libhwloc PRIVATE ./include ./src ${CMAKE_CURRENT_BINARY_DIR}/include) -target_compile_definitions(libhwloc PRIVATE _CRT_SECURE_NO_WARNINGS) + +add_executable(hwloc-info + utils/hwloc/hwloc-info.c) + +target_link_libraries(hwloc-info PRIVATE libhwloc) + +foreach(Target IN ITEMS libhwloc hwloc-info) + target_include_directories(${Target} PRIVATE ./include ./src ${CMAKE_CURRENT_BINARY_DIR}/include) + target_compile_definitions(${Target} PRIVATE _CRT_SECURE_NO_WARNINGS) +endforeach(Target) install(TARGETS libhwloc RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +install(TARGETS hwloc-info + RUNTIME DESTINATION tools/hwloc) +if(BUILD_SHARED_LIBS) + install(TARGETS libhwloc + RUNTIME DESTINATION tools/hwloc) +endif(BUILD_SHARED_LIBS) + + if(NOT HWLOC_SKIP_INCLUDES) install(FILES include/hwloc.h DESTINATION include) install(DIRECTORY include/hwloc DESTINATION include FILES_MATCHING PATTERN "*.h") diff --git a/ports/hwloc/CONTROL b/ports/hwloc/CONTROL index ef2564050cb..e2c820060b3 100644 --- a/ports/hwloc/CONTROL +++ b/ports/hwloc/CONTROL @@ -1,4 +1,4 @@ Source: hwloc -Version: 1.11.7-2 +Version: 1.11.7-3 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/hwloc/portfile.cmake b/ports/hwloc/portfile.cmake index a2031bdcb6b..64a18ddc733 100644 --- a/ports/hwloc/portfile.cmake +++ b/ports/hwloc/portfile.cmake @@ -28,6 +28,8 @@ else() endif() file(WRITE ${CURRENT_PACKAGES_DIR}/include/hwloc/autogen/config.h "${PUBLIC_CONFIG_H}") +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/tools) + # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/hwloc) file(RENAME ${CURRENT_PACKAGES_DIR}/share/hwloc/COPYING ${CURRENT_PACKAGES_DIR}/share/hwloc/copyright) diff --git a/ports/icu/CONTROL b/ports/icu/CONTROL index 9d8320762c7..0cb924a2a7d 100644 --- a/ports/icu/CONTROL +++ b/ports/icu/CONTROL @@ -1,3 +1,3 @@ Source: icu -Version: 61.1-1 +Version: 61.1-4 Description: Mature and widely used Unicode and localization library. diff --git a/ports/icu/portfile.cmake b/ports/icu/portfile.cmake index afacc076c0e..2061111e9ad 100644 --- a/ports/icu/portfile.cmake +++ b/ports/icu/portfile.cmake @@ -1,50 +1,30 @@ -# 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 = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) message(FATAL_ERROR "Error: UWP builds are currently not supported.") endif() include(vcpkg_common_functions) + set(VERSION 61.1) set(VERSION2 61_1) set(ICU_VERSION_MAJOR 61) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/icu-${VERSION}/icu) vcpkg_download_distfile( - ARCHIVE - URLS "http://download.icu-project.org/files/icu4c/${VERSION}/icu4c-${VERSION2}-src.zip" - FILENAME "icu4c-${VERSION2}-src.zip" - SHA512 60fed25976b8c2fe2df0b0ab745ded24da237711ec8c1e1dbdfe6eaf2014fb6b3a4bcaa488174cf770737a1c159a2d3f48a86a139cbb277163f064e607b8928f - ) + ARCHIVE + URLS "http://download.icu-project.org/files/icu4c/${VERSION}/icu4c-${VERSION2}-src.tgz" + FILENAME "icu4c-${VERSION2}-src.tgz" + SHA512 4c37691246db802e4bae0c8c5f6ac1dac64c5753b607e539c5c1c36e361fcd9dd81bd1d3b5416c2960153b83700ccdb356412847d0506ab7782ae626ac0ffb94 +) vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src/icu-${VERSION}) vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-escapestr-tool.patch) + PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-escapestr-tool.patch + ${CMAKE_CURRENT_LIST_DIR}/remove-MD-from-configure.patch +) -# Acquire tools -vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.15) +set(CONFIGURE_OPTIONS "--disable-samples --disable-tests") -# Insert msys into the path between the compiler toolset and windows system32. This prevents masking of "link.exe" but DOES mask "find.exe". -string(REPLACE ";$ENV{SystemRoot}\\system32;" ";${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\system32;" NEWPATH "$ENV{PATH}") -string(REPLACE ";$ENV{SystemRoot}\\System32;" ";${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\System32;" NEWPATH "${NEWPATH}") -set(ENV{PATH} "${NEWPATH}") -set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) - -set(AUTOMAKE_DIR ${MSYS_ROOT}/usr/share/automake-1.15) -file(COPY ${AUTOMAKE_DIR}/config.guess ${AUTOMAKE_DIR}/config.sub DESTINATION ${SOURCE_PATH}/source) - -set(CONFIGURE_OPTIONS "--host=i686-pc-mingw32 --disable-samples --disable-tests") - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --disable-static --enable-shared") else() set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --enable-static --disable-shared") @@ -53,59 +33,118 @@ endif() set(CONFIGURE_OPTIONS_RELASE "--disable-debug --enable-release --prefix=${CURRENT_PACKAGES_DIR}") set(CONFIGURE_OPTIONS_DEBUG "--enable-debug --disable-release --prefix=${CURRENT_PACKAGES_DIR}/debug") -if(VCPKG_CRT_LINKAGE STREQUAL static) - set(ICU_RUNTIME "-MT") +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(BASH bash) + set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -fPIC") + set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -fPIC") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + # Configure release + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + set(ENV{CFLAGS} "-O2 ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE}") + set(ENV{CXXFLAGS} "-O2 ${VCPKG_CXX_FLAGS} ${VCPKG_CXX_FLAGS_RELEASE}") + vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc -c + "${SOURCE_PATH}/source/runConfigureICU Linux ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_RELASE}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + LOGNAME "configure-${TARGET_TRIPLET}-rel") + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + # Configure debug + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + set(ENV{CFLAGS} "-O0 -g ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG}") + set(ENV{CXXFLAGS} "-O0 -g ${VCPKG_CXX_FLAGS} ${VCPKG_CXX_FLAGS_DEBUG}") + vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc -c + "${SOURCE_PATH}/source/runConfigureICU Linux ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_DEBUG}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + LOGNAME "configure-${TARGET_TRIPLET}-dbg") + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + endif() + else() - set(ICU_RUNTIME "-MD") + + set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --host=i686-pc-mingw32") + + # Acquire tools + vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.15) + + # Insert msys into the path between the compiler toolset and windows system32. This prevents masking of "link.exe" but DOES mask "find.exe". + string(REPLACE ";$ENV{SystemRoot}\\system32;" ";${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\system32;" NEWPATH "$ENV{PATH}") + string(REPLACE ";$ENV{SystemRoot}\\System32;" ";${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\System32;" NEWPATH "${NEWPATH}") + set(ENV{PATH} "${NEWPATH}") + set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + + set(AUTOMAKE_DIR ${MSYS_ROOT}/usr/share/automake-1.15) + file(COPY ${AUTOMAKE_DIR}/config.guess ${AUTOMAKE_DIR}/config.sub DESTINATION ${SOURCE_PATH}/source) + + if(VCPKG_CRT_LINKAGE STREQUAL static) + set(ICU_RUNTIME "-MT") + else() + set(ICU_RUNTIME "-MD") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + # Configure release + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + set(ENV{CFLAGS} "${ICU_RUNTIME} -O2 -Oi -Zi ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE}") + set(ENV{CXXFLAGS} "${ICU_RUNTIME} -O2 -Oi -Zi ${VCPKG_CXX_FLAGS} ${VCPKG_CXX_FLAGS_RELEASE}") + set(ENV{LDFLAGS} "-DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF") + vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc -c + "${SOURCE_PATH}/source/runConfigureICU MSYS/MSVC ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_RELASE}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + LOGNAME "configure-${TARGET_TRIPLET}-rel") + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + # Configure debug + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + set(ENV{CFLAGS} "${ICU_RUNTIME}d -Od -Zi -RTC1 ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG}") + set(ENV{CXXFLAGS} "${ICU_RUNTIME}d -Od -Zi -RTC1 ${VCPKG_CXX_FLAGS} ${VCPKG_CXX_FLAGS_DEBUG}") + set(ENV{LDFLAGS} "-DEBUG") + vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc -c + "${SOURCE_PATH}/source/runConfigureICU MSYS/MSVC ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_DEBUG}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + LOGNAME "configure-${TARGET_TRIPLET}-dbg") + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + endif() endif() -# Configure release -message(STATUS "Configuring ${TARGET_TRIPLET}-rel") -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) -file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) -set(ENV{CFLAGS} "${ICU_RUNTIME} -O2 -Oi -Zi") -set(ENV{CXXFLAGS} "${ICU_RUNTIME} -O2 -Oi -Zi") -set(ENV{LDFLAGS} "-DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF") -vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c - "${SOURCE_PATH}/source/runConfigureICU MSYS/MSVC ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_RELASE}" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - LOGNAME "configure-${TARGET_TRIPLET}-rel") -message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") - -# Configure debug -message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) -file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) -set(ENV{CFLAGS} "${ICU_RUNTIME}d -Od -Zi -RTC1") -set(ENV{CXXFLAGS} "${ICU_RUNTIME}d -Od -Zi -RTC1") -set(ENV{LDFLAGS} "-DEBUG") -vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c - "${SOURCE_PATH}/source/runConfigureICU MSYS/MSVC ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_DEBUG}" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" - LOGNAME "configure-${TARGET_TRIPLET}-dbg") -message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") - unset(ENV{CFLAGS}) unset(ENV{CXXFLAGS}) unset(ENV{LDFLAGS}) -# Build release -message(STATUS "Package ${TARGET_TRIPLET}-rel") -vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c "make && make install" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - LOGNAME "build-${TARGET_TRIPLET}-rel") -message(STATUS "Package ${TARGET_TRIPLET}-rel done") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + # Build release + message(STATUS "Package ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc -c "make && make install" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + LOGNAME "build-${TARGET_TRIPLET}-rel") + message(STATUS "Package ${TARGET_TRIPLET}-rel done") +endif() -# Build debug -message(STATUS "Package ${TARGET_TRIPLET}-dbg") -vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c "make && make install" - WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" - LOGNAME "build-${TARGET_TRIPLET}-dbg") -message(STATUS "Package ${TARGET_TRIPLET}-dbg done") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + # Build debug + message(STATUS "Package ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc -c "make && make install" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + LOGNAME "build-${TARGET_TRIPLET}-dbg") + message(STATUS "Package ${TARGET_TRIPLET}-dbg done") +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin @@ -123,19 +162,31 @@ file(GLOB TEST_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*test*) file(REMOVE ${TEST_LIBS}) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") # copy icu dlls from lib to bin - file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/lib/icu*${ICU_VERSION_MAJOR}.dll) - file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/icu*d${ICU_VERSION_MAJOR}.dll) - file(COPY ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(COPY ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/lib/icu*${ICU_VERSION_MAJOR}.dll) + file(COPY ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/icu*d${ICU_VERSION_MAJOR}.dll) + file(COPY ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() else() - # rename static libraries to match import libs - # see https://gitlab.kitware.com/cmake/cmake/issues/16617 - foreach(MODULE dt in io tu uc) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/sicu${MODULE}.lib ${CURRENT_PACKAGES_DIR}/lib/icu${MODULE}.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/sicu${MODULE}d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/icu${MODULE}d.lib) - endforeach() + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + # rename static libraries to match import libs + # see https://gitlab.kitware.com/cmake/cmake/issues/16617 + foreach(MODULE dt in io tu uc) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/sicu${MODULE}.lib ${CURRENT_PACKAGES_DIR}/lib/icu${MODULE}.lib) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/sicu${MODULE}d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/icu${MODULE}d.lib) + endif() + endforeach() + endif() # force U_STATIC_IMPLEMENTATION macro foreach(HEADER utypes.h utf_old.h platform.h) diff --git a/ports/icu/remove-MD-from-configure.patch b/ports/icu/remove-MD-from-configure.patch new file mode 100644 index 00000000000..d35205ebf1d --- /dev/null +++ b/ports/icu/remove-MD-from-configure.patch @@ -0,0 +1,18 @@ +diff -urN a/source/runConfigureICU b/source/runConfigureICU +--- a/source/runConfigureICU 2018-03-26 21:38:44.000000000 +0800 ++++ b/source/runConfigureICU 2018-08-26 09:04:53.197454400 +0800 +@@ -322,10 +322,10 @@ + THE_COMP="Microsoft Visual C++" + CC=cl; export CC + CXX=cl; export CXX +- RELEASE_CFLAGS='-Gy -MD' +- RELEASE_CXXFLAGS='-Gy -MD' +- DEBUG_CFLAGS='-Zi -MDd' +- DEBUG_CXXFLAGS='-Zi -MDd' ++ RELEASE_CFLAGS='-Gy' ++ RELEASE_CXXFLAGS='-Gy' ++ DEBUG_CFLAGS='-Zi' ++ DEBUG_CXXFLAGS='-Zi' + DEBUG_LDFLAGS='-DEBUG' + ;; + *BSD) diff --git a/ports/ideviceinstaller/CONTROL b/ports/ideviceinstaller/CONTROL new file mode 100644 index 00000000000..3697611a4e7 --- /dev/null +++ b/ports/ideviceinstaller/CONTROL @@ -0,0 +1,4 @@ +Source: ideviceinstaller +Version: 1.1.2.23-1 +Description: Manage apps of iOS devices +Build-Depends: libimobiledevice, libzip \ No newline at end of file diff --git a/ports/ideviceinstaller/portfile.cmake b/ports/ideviceinstaller/portfile.cmake new file mode 100644 index 00000000000..c5523e6ba30 --- /dev/null +++ b/ports/ideviceinstaller/portfile.cmake @@ -0,0 +1,18 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libimobiledevice-win32/ideviceinstaller + REF 1.1.2.23 + SHA512 d0801b3a38eb02206a6f06e05cc19b794c69a87c06895165f64522c61e07030046499c5f0e436981682f9e17f91eae87913cca091e2e039a74ee35a5136100d4 + HEAD_REF msvc-master +) + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH ideviceinstaller.vcxproj + LICENSE_SUBPATH COPYING + USE_VCPKG_INTEGRATION +) + +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/idevicerestore/CONTROL b/ports/idevicerestore/CONTROL new file mode 100644 index 00000000000..dc781eb5cce --- /dev/null +++ b/ports/idevicerestore/CONTROL @@ -0,0 +1,4 @@ +Source: idevicerestore +Version: 1.0.12-1 +Description: Restore/upgrade firmware of iOS devices +Build-Depends: libimobiledevice, curl, libirecovery, libzip \ No newline at end of file diff --git a/ports/idevicerestore/portfile.cmake b/ports/idevicerestore/portfile.cmake new file mode 100644 index 00000000000..e0f9a08883e --- /dev/null +++ b/ports/idevicerestore/portfile.cmake @@ -0,0 +1,18 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libimobiledevice-win32/idevicerestore + REF 1.0.12 + SHA512 ba623be56c2f37853516d7d4c32e16f1ec72f33d512f18aa812ce6830af4b9e389f7af5321888dd0ddd168e282b652e379b60f90970680e213eabf489f406915 + HEAD_REF msvc-master +) + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH idevicerestore.vcxproj + LICENSE_SUBPATH COPYING + USE_VCPKG_INTEGRATION +) + +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/igloo/CONTROL b/ports/igloo/CONTROL new file mode 100644 index 00000000000..ffa162695e0 --- /dev/null +++ b/ports/igloo/CONTROL @@ -0,0 +1,3 @@ +Source: igloo +Version: 1.1.1 +Description: A framework for unit testing in C++ diff --git a/ports/igloo/portfile.cmake b/ports/igloo/portfile.cmake new file mode 100644 index 00000000000..a1ab1757604 --- /dev/null +++ b/ports/igloo/portfile.cmake @@ -0,0 +1,16 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO joakimkarlsson/igloo + REF igloo.1.1.1 + SHA512 69d8edb840aa1e2c1df4529a39b94e2d33dbc9fb5869ae91a0f062d29b7fbb73d4e2180080e7696cb69fbf5126c7c53c98dddb003e0e5e796812330e1a4ba32e + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/igloo DESTINATION ${CURRENT_PACKAGES_DIR}/include/ FILES_MATCHING PATTERN *.h) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/igloo/external/snowhouse) +file(WRITE "${CURRENT_PACKAGES_DIR}/include/igloo/external/snowhouse/snowhouse/snowhouse.h" "#include ") + +file(COPY ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/igloo) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/igloo/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/igloo/copyright) \ No newline at end of file diff --git a/ports/imgui/CMakeLists.txt b/ports/imgui/CMakeLists.txt index 5bcf278f71e..1b4fc86e501 100644 --- a/ports/imgui/CMakeLists.txt +++ b/ports/imgui/CMakeLists.txt @@ -17,6 +17,7 @@ set(IMGUI_SOURCES imgui.cpp imgui_demo.cpp imgui_draw.cpp + imgui_widgets.cpp ) add_library(${PROJECT_NAME} diff --git a/ports/imgui/CONTROL b/ports/imgui/CONTROL index 6b6a8247643..8f310b04f52 100644 --- a/ports/imgui/CONTROL +++ b/ports/imgui/CONTROL @@ -1,3 +1,3 @@ Source: imgui -Version: 1.53 +Version: 1.66 Description: Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies. diff --git a/ports/imgui/portfile.cmake b/ports/imgui/portfile.cmake index 1ca99841db0..8f545204214 100644 --- a/ports/imgui/portfile.cmake +++ b/ports/imgui/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ocornut/imgui - REF v1.53 - SHA512 3e1ebf3844eaca3471064fa3d5792525c696b39f502c75235fae469038b73ae0eff198f13d5e1a35f86c011903cd379066afe1e22b6df769b9b16dc390f8b0c3 + REF v1.66 + SHA512 85d41e6fa2141da87b72e5c39d23fe285bea086d6dd758a5ec048a495c29bbcf0a49ee1e9f442d5db3452fd0f28d1e52a2c41b5402cbbaa3ad6612818aaea670 HEAD_REF master ) @@ -21,5 +21,4 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH share/imgui) -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/imgui) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/imgui/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/imgui/copyright) +configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/imgui/copyright COPYONLY) diff --git a/ports/inih/CMakeLists.txt b/ports/inih/CMakeLists.txt new file mode 100644 index 00000000000..6601e543af3 --- /dev/null +++ b/ports/inih/CMakeLists.txt @@ -0,0 +1,15 @@ +project(inih) + +set(SOURCES ini.c cpp/INIReader.cpp) +set(HEADERS ini.h cpp/INIReader.h) + +add_library(inih ${SOURCES}) + +install( + TARGETS inih + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(FILES ${HEADERS} DESTINATION include) diff --git a/ports/inih/CONTROL b/ports/inih/CONTROL new file mode 100644 index 00000000000..ac3051c8290 --- /dev/null +++ b/ports/inih/CONTROL @@ -0,0 +1,3 @@ +Source: inih +Version: 42 +Description: Simple .INI file parser diff --git a/ports/inih/portfile.cmake b/ports/inih/portfile.cmake new file mode 100644 index 00000000000..1d705977fc1 --- /dev/null +++ b/ports/inih/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO benhoyt/inih + REF r42 + SHA512 bb414bf03e2055f47149d69bd373923cc663f5e044cd021fd34ac646effc485db8cedb128123aaac7e2abc16c98bee98f34d89108a4bab9af50b8cd05eb7af8d + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/inih RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/inja/CONTROL b/ports/inja/CONTROL new file mode 100644 index 00000000000..a905ab7965b --- /dev/null +++ b/ports/inja/CONTROL @@ -0,0 +1,4 @@ +Source: inja +Version: 1.0.0 +Build-Depends: nlohmann-json +Description: Inja - A Template Engine for Modern C++ diff --git a/ports/inja/portfile.cmake b/ports/inja/portfile.cmake new file mode 100644 index 00000000000..dc9dc1a6be7 --- /dev/null +++ b/ports/inja/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pantor/inja + REF v1.0.0 + SHA512 39598df84766a0d2a28dc92e083e27b7072600372e0313727cd5dd1fe6ad1efc055dc98055247f5cb1fc4096ffb37b59995107f3456a4495bd01381ac6c74a2b + HEAD_REF master +) +file(INSTALL ${SOURCE_PATH}/src/inja.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/src/inja.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/share/inja RENAME copyright) +vcpkg_copy_pdbs() diff --git a/ports/intelrdfpmathlib/CMakeLists.txt b/ports/intelrdfpmathlib/CMakeLists.txt new file mode 100644 index 00000000000..809cd34773c --- /dev/null +++ b/ports/intelrdfpmathlib/CMakeLists.txt @@ -0,0 +1,289 @@ +cmake_minimum_required(VERSION 3.8) +project(intelrdfpmathlib C) + +set( + intelrdfpmathlib_SOURCES + float128/dpml_exception.c + float128/dpml_four_over_pi.c + float128/dpml_ux_bessel.c + float128/dpml_ux_bid.c + float128/dpml_ux_cbrt.c + float128/dpml_ux_erf.c + float128/dpml_ux_exp.c + float128/dpml_ux_int.c + float128/dpml_ux_inv_hyper.c + float128/dpml_ux_inv_trig.c + float128/dpml_ux_lgamma.c + float128/dpml_ux_log.c + float128/dpml_ux_mod.c + float128/dpml_ux_ops.c + float128/dpml_ux_ops_64.c + float128/dpml_ux_pow.c + float128/dpml_ux_powi.c + float128/dpml_ux_sqrt.c + float128/dpml_ux_trig.c + float128/sqrt_tab_t.c + src/bid128.c + src/bid128_2_str_tables.c + src/bid128_acos.c + src/bid128_acosh.c + src/bid128_add.c + src/bid128_asin.c + src/bid128_asinh.c + src/bid128_atan.c + src/bid128_atan2.c + src/bid128_atanh.c + src/bid128_cbrt.c + src/bid128_compare.c + src/bid128_cos.c + src/bid128_cosh.c + src/bid128_div.c + src/bid128_erf.c + src/bid128_erfc.c + src/bid128_exp.c + src/bid128_exp10.c + src/bid128_exp2.c + src/bid128_expm1.c + src/bid128_fdimd.c + src/bid128_fma.c + src/bid128_fmod.c + src/bid128_frexp.c + src/bid128_hypot.c + src/bid128_ldexp.c + src/bid128_lgamma.c + src/bid128_llrintd.c + src/bid128_log.c + src/bid128_log10.c + src/bid128_log1p.c + src/bid128_log2.c + src/bid128_logb.c + src/bid128_logbd.c + src/bid128_lrintd.c + src/bid128_lround.c + src/bid128_minmax.c + src/bid128_modf.c + src/bid128_mul.c + src/bid128_nearbyintd.c + src/bid128_next.c + src/bid128_nexttowardd.c + src/bid128_noncomp.c + src/bid128_pow.c + src/bid128_quantexpd.c + src/bid128_quantize.c + src/bid128_rem.c + src/bid128_round_integral.c + src/bid128_scalb.c + src/bid128_scalbl.c + src/bid128_sin.c + src/bid128_sinh.c + src/bid128_sqrt.c + src/bid128_string.c + src/bid128_tan.c + src/bid128_tanh.c + src/bid128_tgamma.c + src/bid128_to_int16.c + src/bid128_to_int32.c + src/bid128_to_int64.c + src/bid128_to_int8.c + src/bid128_to_uint16.c + src/bid128_to_uint32.c + src/bid128_to_uint64.c + src/bid128_to_uint8.c + src/bid32_acos.c + src/bid32_acosh.c + src/bid32_add.c + src/bid32_asin.c + src/bid32_asinh.c + src/bid32_atan.c + src/bid32_atan2.c + src/bid32_atanh.c + src/bid32_cbrt.c + src/bid32_compare.c + src/bid32_cos.c + src/bid32_cosh.c + src/bid32_div.c + src/bid32_erf.c + src/bid32_erfc.c + src/bid32_exp.c + src/bid32_exp10.c + src/bid32_exp2.c + src/bid32_expm1.c + src/bid32_fdimd.c + src/bid32_fma.c + src/bid32_fmod.c + src/bid32_frexp.c + src/bid32_hypot.c + src/bid32_ldexp.c + src/bid32_lgamma.c + src/bid32_llrintd.c + src/bid32_log.c + src/bid32_log10.c + src/bid32_log1p.c + src/bid32_log2.c + src/bid32_logb.c + src/bid32_logbd.c + src/bid32_lrintd.c + src/bid32_lround.c + src/bid32_minmax.c + src/bid32_modf.c + src/bid32_mul.c + src/bid32_nearbyintd.c + src/bid32_next.c + src/bid32_nexttowardd.c + src/bid32_noncomp.c + src/bid32_pow.c + src/bid32_quantexpd.c + src/bid32_quantize.c + src/bid32_rem.c + src/bid32_round_integral.c + src/bid32_scalb.c + src/bid32_scalbl.c + src/bid32_sin.c + src/bid32_sinh.c + src/bid32_sqrt.c + src/bid32_string.c + src/bid32_sub.c + src/bid32_tan.c + src/bid32_tanh.c + src/bid32_tgamma.c + src/bid32_to_bid128.c + src/bid32_to_bid64.c + src/bid32_to_int16.c + src/bid32_to_int32.c + src/bid32_to_int64.c + src/bid32_to_int8.c + src/bid32_to_uint16.c + src/bid32_to_uint32.c + src/bid32_to_uint64.c + src/bid32_to_uint8.c + src/bid64_acos.c + src/bid64_acosh.c + src/bid64_add.c + src/bid64_asin.c + src/bid64_asinh.c + src/bid64_atan.c + src/bid64_atan2.c + src/bid64_atanh.c + src/bid64_cbrt.c + src/bid64_compare.c + src/bid64_cos.c + src/bid64_cosh.c + src/bid64_div.c + src/bid64_erf.c + src/bid64_erfc.c + src/bid64_exp.c + src/bid64_exp10.c + src/bid64_exp2.c + src/bid64_expm1.c + src/bid64_fdimd.c + src/bid64_fma.c + src/bid64_fmod.c + src/bid64_frexp.c + src/bid64_hypot.c + src/bid64_ldexp.c + src/bid64_lgamma.c + src/bid64_llrintd.c + src/bid64_log.c + src/bid64_log10.c + src/bid64_log1p.c + src/bid64_log2.c + src/bid64_logb.c + src/bid64_logbd.c + src/bid64_lrintd.c + src/bid64_lround.c + src/bid64_minmax.c + src/bid64_modf.c + src/bid64_mul.c + src/bid64_nearbyintd.c + src/bid64_next.c + src/bid64_nexttowardd.c + src/bid64_noncomp.c + src/bid64_pow.c + src/bid64_quantexpd.c + src/bid64_quantize.c + src/bid64_rem.c + src/bid64_round_integral.c + src/bid64_scalb.c + src/bid64_scalbl.c + src/bid64_sin.c + src/bid64_sinh.c + src/bid64_sqrt.c + src/bid64_string.c + src/bid64_tan.c + src/bid64_tanh.c + src/bid64_tgamma.c + src/bid64_to_bid128.c + src/bid64_to_int16.c + src/bid64_to_int32.c + src/bid64_to_int64.c + src/bid64_to_int8.c + src/bid64_to_uint16.c + src/bid64_to_uint32.c + src/bid64_to_uint64.c + src/bid64_to_uint8.c + src/bid_binarydecimal.c + src/bid_convert_data.c + src/bid_decimal_data.c + src/bid_decimal_globals.c + src/bid_dpd.c + src/bid_feclearexcept.c + src/bid_fegetexceptflag.c + src/bid_feraiseexcept.c + src/bid_fesetexceptflag.c + src/bid_fetestexcept.c + src/bid_flag_operations.c + src/bid_from_int.c + src/bid_round.c + src/strtod128.c + src/strtod32.c + src/strtod64.c + src/wcstod128.c + src/wcstod32.c + src/wcstod64.c +) + +if(MSVC) + add_compile_options(/W3 ) +else() + add_compile_options(-w) +endif() + +if(WIN32) + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + add_compile_options(-Defi2=1 -DEFI2=1) + else() + add_compile_options(-DIA32= -Dia32=1) + endif() +else() + add_compile_options(-Defi2=1 -DEFI2=1) +endif() + + +include_directories(. src float128) + +add_library(intel_decimal128 ${intelrdfpmathlib_SOURCES}) + +target_compile_definitions( + intel_decimal128 PRIVATE -DDECIMAL_CALL_BY_REFERENCE=0 -DDECIMAL_GLOBAL_ROUNDING=0 -DDECIMAL_GLOBAL_EXCEPTION_FLAGS=0 +) + +if(WIN32) + target_compile_definitions(intel_decimal128 PRIVATE -DWINDOWS=1 -DWNT=1 -Dwinnt=1) +elseif(APPLE) + target_compile_definitions(intel_decimal128 PRIVATE -DLINUX=1 -Dmach=1) +elseif(CMAKE_SYSTEM_NAME MATCHES "(FreeBSD|OpenBSD|NetBSD)") + target_compile_definitions(intel_decimal128 PRIVATE -DLINUX=1 -Dfreebsd=1) +else() + target_compile_definitions(intel_decimal128 PRIVATE -DLINUX=1 -Dlinux=1) +endif() + +install( + TARGETS intel_decimal128 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES src/dfp754.h DESTINATION include) +endif() diff --git a/ports/intelrdfpmathlib/CONTROL b/ports/intelrdfpmathlib/CONTROL new file mode 100644 index 00000000000..5c7fe7b5914 --- /dev/null +++ b/ports/intelrdfpmathlib/CONTROL @@ -0,0 +1,3 @@ +Source: intelrdfpmathlib +Version: 20U2 +Description: Intel(R) Decimal Floating-Point Math Library diff --git a/ports/intelrdfpmathlib/portfile.cmake b/ports/intelrdfpmathlib/portfile.cmake new file mode 100644 index 00000000000..e463f0a77e3 --- /dev/null +++ b/ports/intelrdfpmathlib/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/IntelRDFPMathLib20U2) +vcpkg_download_distfile(ARCHIVE + URLS "http://www.netlib.org/misc/intel/IntelRDFPMathLib20U2.tar.gz" + FILENAME "IntelRDFPMathLib20U2.tar.gz" + SHA512 4d445855f41b066b784f0c6b4e52f854df4129fa9d43569b1e1518f002b860f69796459c78de46a8ea24fb6e7aefe7f8bc1f253e78971a5ef202dab2a7b1b75a +) +vcpkg_extract_source_archive(${ARCHIVE}) + +set(LIB_SOURCE_PATH "${SOURCE_PATH}/LIBRARY") + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION "${LIB_SOURCE_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH "${LIB_SOURCE_PATH}" + PREFER_NINJA + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/eula.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/IntelRDFPMathLib RENAME copyright) diff --git a/ports/io2d/CONTROL b/ports/io2d/CONTROL new file mode 100644 index 00000000000..7e36cb5d902 --- /dev/null +++ b/ports/io2d/CONTROL @@ -0,0 +1,4 @@ +Source: io2d +Version: 0.1-1 +Description: a lightweight, cross platform drawing library +Build-Depends: cairo, graphicsmagick diff --git a/ports/io2d/find-package.patch b/ports/io2d/find-package.patch new file mode 100644 index 00000000000..10d83f95bdd --- /dev/null +++ b/ports/io2d/find-package.patch @@ -0,0 +1,47 @@ +diff --git a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt +index 3d4791c..1864b7a 100644 +--- a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt ++++ b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt +@@ -23,7 +23,15 @@ target_compile_features(io2d_cairo PUBLIC cxx_std_17) + + target_link_libraries(io2d_cairo PUBLIC io2d_core) + +-if(MSVC) ++if(DEFINED VCPKG_TARGET_TRIPLET) ++ find_package(unofficial-cairo CONFIG REQUIRED) ++ set(CAIRO_INCLUDE_DIR) ++ set(CAIRO_LIB_DEBUG "CAIRO_LIB_DEBUG-NOTFOUND") ++ set(CAIRO_LIB_RELEASE unofficial::cairo::cairo) ++ find_package(unofficial-graphicsmagick CONFIG REQUIRED) ++ set(GRAPHICSMAGICK_INCLUDE_DIR) ++ set(GRAPHICSMAGICK_LIB unofficial::graphicsmagick::graphicsmagick) ++elseif(MSVC) + find_path(CAIRO_INCLUDE_DIR cairo.h) + find_path(GRAPHICSMAGICK_INCLUDE_DIR magick/api.h) + find_library(CAIRO_LIB_DEBUG cairod) +diff --git a/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt b/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt +index abb1501..b7a6e71 100644 +--- a/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt ++++ b/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt +@@ -24,20 +24,7 @@ target_compile_features(io2d_cairo_win32 PUBLIC cxx_std_17) + target_link_libraries(io2d_cairo_win32 PUBLIC io2d_cairo) + + if(MSVC) +- target_compile_definitions(io2d_cairo_win32 PUBLIC -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_WARNINGS) +- +- find_library(PIXMAN_LIB pixman-1) +- find_library(FREETYPE_LIB freetype) +- find_library(FONTCONFIG_LIB fontconfig) +- find_library(BZ_LIB bz2) +- find_library(JPEG_LIB jpeg) +- find_library(TIFF_LIB tiff) +- find_library(EXPAT_LIB expat) +- find_library(LZMA_LIB lzma) +- find_library(ICONV_LIB libiconv) +- find_library(CHARSET_LIB libcharset) +- +- target_link_libraries(io2d_cairo_win32 PUBLIC ${PIXMAN_LIB} ${FREETYPE_LIB} ${FONTCONFIG_LIB} ${BZ_LIB} ${JPEG_LIB} ${TIFF_LIB} ${EXPAT_LIB} ${LZMA_LIB} ${ICONV_LIB} ${CHARSET_LIB}) ++ target_compile_definitions(io2d_cairo_win32 PRIVATE -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_WARNINGS) + endif() + + install( diff --git a/ports/io2d/portfile.cmake b/ports/io2d/portfile.cmake new file mode 100644 index 00000000000..c1d536d57f3 --- /dev/null +++ b/ports/io2d/portfile.cmake @@ -0,0 +1,56 @@ + +# Allow use of vcpkg functions +include(vcpkg_common_functions) + +# For now, io2d is always a static library. +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +# Optionally, uncomment and modify one of the 'set(...)' calls below +# to use io2d sources from a local directory, rather than Github. +# set(SOURCE_PATH "C:\\Path\\To\\P0267_RefImpl\\") +# set(SOURCE_PATH "/Path/To/P0267_RefImpl") + +# Retrieve and validate io2d source code, as-needed +if ("${SOURCE_PATH}" STREQUAL "") + # TODO: point at cpp-io2d/(whatever), if and as needed + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cpp-io2d/P0267_RefImpl + REF 21ae92c8be6916034e6e18f08aa57899a975dfb0 + SHA512 5b674f98ca7705d6901af339a4189d5ce4f2c3118bfb99430734f355159602f177bc8d1b345c3a2f17947a62547553f7b91747a1f16da063707a4da7f990391d + HEAD_REF master + PATCHES find-package.patch + ) +endif() + +# Configure the library, using CMake +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DIO2D_WITHOUT_SAMPLES=1 + -DIO2D_WITHOUT_TESTS=1 + -DCMAKE_INSTALL_INCLUDEDIR:STRING=include +) + +# Build + install the library, using CMake +vcpkg_install_cmake() + +# Don't have duplicate header files in both include/ and debug/include/ folders +# (within /installed/io2d_*/, as installed by vcpkg_install_cmake()): +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/io2d) + +file(RENAME ${CURRENT_PACKAGES_DIR}/share/io2d/io2dConfig.cmake ${CURRENT_PACKAGES_DIR}/share/io2d/io2dTargets.cmake) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/io2d/io2dConfig.cmake " +include(CMakeFindDependencyMacro) +find_dependency(unofficial-cairo CONFIG) +find_dependency(unofficial-graphicsmagick CONFIG) + +include(\${CMAKE_CURRENT_LIST_DIR}/io2dTargets.cmake) +") + +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/io2d RENAME copyright) + +vcpkg_test_cmake(PACKAGE_NAME io2d) diff --git a/ports/itk/portfile.cmake b/ports/itk/portfile.cmake index 86dce452c49..b42d8be75d9 100644 --- a/ports/itk/portfile.cmake +++ b/ports/itk/portfile.cmake @@ -25,6 +25,7 @@ set(SOURCE_PATH "${ITK_BUILD_DIR}") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE OPTIONS -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF diff --git a/ports/json-dto/CONTROL b/ports/json-dto/CONTROL new file mode 100644 index 00000000000..2e9197c2f92 --- /dev/null +++ b/ports/json-dto/CONTROL @@ -0,0 +1,4 @@ +Source: json-dto +Version: 0.2.6 +Description: A small header-only library for converting data between json representation and c++ structs. +Build-Depends: rapidjson diff --git a/ports/json-dto/portfile.cmake b/ports/json-dto/portfile.cmake new file mode 100644 index 00000000000..ca228cfda08 --- /dev/null +++ b/ports/json-dto/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_from_bitbucket( + OUT_SOURCE_PATH SOURCE_PATH + REPO sobjectizerteam/json_dto-0.2 + REF v.0.2.6 + SHA512 f6562b6177c941a9b898013eacb4bd78f2b8d460a82b773824bf51e106a92c27c52dca4ab6dd07a2d5e063ca3442a20c27dfd80bdcd78207e65f328b95972890 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/dev + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DJSON_DTO_INSTALL=ON + -DJSON_DTO_TEST=OFF + -DJSON_DTO_SAMPLE=OFF + -DJSON_DTO_INSTALL_SAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/json-dto") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/json-dto) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/json-dto/LICENSE ${CURRENT_PACKAGES_DIR}/share/json-dto/copyright) diff --git a/ports/json11/CONTROL b/ports/json11/CONTROL new file mode 100644 index 00000000000..3145a079a5d --- /dev/null +++ b/ports/json11/CONTROL @@ -0,0 +1,3 @@ +Source: json11 +Version: 2017-06-20 +Description: json11 is a tiny JSON library for C++11, providing JSON parsing and serialization. diff --git a/ports/json11/portfile.cmake b/ports/json11/portfile.cmake new file mode 100644 index 00000000000..533c0457c77 --- /dev/null +++ b/ports/json11/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dropbox/json11 + REF ec4e45219af1d7cde3d58b49ed762376fccf1ace + SHA512 2129e048d8dee027dc1ba789d9901e017b7d698465e15236802ef68639161e1cc7c8665d5f50079333801717fd41ffbe2cb90fa2165b9a85629e8ced8f2b3cd8 + HEAD_REF master +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DJSON11_BUILD_TESTS:BOOL=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/json11) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/json11/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/json11/copyright) diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL index 3cd30746a14..3a96ceeb158 100644 --- a/ports/jsonnet/CONTROL +++ b/ports/jsonnet/CONTROL @@ -1,3 +1,3 @@ Source: jsonnet -Version: 2018-04-17 +Version: 2018-11-01 Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake index 3f4edbf384f..6a8e0f5cbaa 100644 --- a/ports/jsonnet/portfile.cmake +++ b/ports/jsonnet/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/jsonnet - REF 125012dd904a7d111adf1082b3dca5642dbfd418 - SHA512 1d03d92aee54862d7ae03227be290f24b283dc89d60e77ffa42bfa9485e9ff0e39a93c27cfb1049cee7015c25f6d62b27362bb0836973d2ac1f919276c33ab3c + REF a0876b301daf8f45e16ac5f7bb814d0617772bb0 + SHA512 a57380ecc578b11f3a763202abb7ab703f2cc3c098ca7602d0bd199594a9e8d1cebc6d51332658edb08bf088e565d6afae0cb2faaf127fa33542a406de1ac055 HEAD_REF master ) diff --git a/ports/kangaru/CONTROL b/ports/kangaru/CONTROL new file mode 100644 index 00000000000..42f8277fd8f --- /dev/null +++ b/ports/kangaru/CONTROL @@ -0,0 +1,3 @@ +Source: kangaru +Version: 4.1.2 +Description: A dependency injection container for C++11, C++14 and later diff --git a/ports/kangaru/portfile.cmake b/ports/kangaru/portfile.cmake new file mode 100644 index 00000000000..6de69896ba7 --- /dev/null +++ b/ports/kangaru/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gracicot/kangaru + REF v4.1.2 + SHA512 44ca94da38c80aa8495bb58cc26db0591d5e1b32b52c3ff242d95598856c5e84f25d7e7184c1e15e44d9a89987856740548fb070ad393cbe51da4bb79aa216d2 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DKANGARU_EXPORT=Off -DKANGARU_TEST=Off +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/kangaru") + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug +) + + +# Put the license file where vcpkg expects it +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/kangaru/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/kangaru/LICENSE ${CURRENT_PACKAGES_DIR}/share/kangaru/copyright) diff --git a/ports/keystone/CONTROL b/ports/keystone/CONTROL new file mode 100644 index 00000000000..70443a202c8 --- /dev/null +++ b/ports/keystone/CONTROL @@ -0,0 +1,3 @@ +Source: keystone +Version: 0.9.1 +Description: Lightweight multi-platform, multi-architecture assembler framework diff --git a/ports/keystone/portfile.cmake b/ports/keystone/portfile.cmake new file mode 100644 index 00000000000..6f740aedaf1 --- /dev/null +++ b/ports/keystone/portfile.cmake @@ -0,0 +1,51 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO keystone-engine/keystone + REF 0.9.1 + SHA512 3bd9c3793d5862a0a8628b52da381625e62445f661dbd5ed715723e7d9db01ce3f9586e5ca0a5cc71e8ceb6c912050f5c28e3ccd540e72c8abcfd2f0d1bbae17 + HEAD_REF master +) + +vcpkg_find_acquire_program(PYTHON2) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KEYSTONE_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" KEYSTONE_BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DKEYSTONE_BUILD_STATIC=${KEYSTONE_BUILD_STATIC} + -DKEYSTONE_BUILD_SHARED=${KEYSTONE_BUILD_SHARED} + -DPYTHON_EXECUTABLE=${PYTHON2} + + # Add support for only a subset of architectures + #-DLLVM_TARGETS_TO_BUILD="AArch64;X86" +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +if(EXES) + file(REMOVE ${EXES}) +endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + # Move DLLs + file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/lib/*.dll) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${DLLS}) + file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DLLS}) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/keystone + RENAME copyright +) diff --git a/ports/kf5archive/CONTROL b/ports/kf5archive/CONTROL new file mode 100644 index 00000000000..c3e0e5dee6f --- /dev/null +++ b/ports/kf5archive/CONTROL @@ -0,0 +1,4 @@ +Source: kf5archive +Version: 5.50.0 +Description: File compression +Build-Depends: ecm, qt5-base, zlib, bzip2 \ No newline at end of file diff --git a/ports/kf5archive/portfile.cmake b/ports/kf5archive/portfile.cmake new file mode 100644 index 00000000000..6f587a096c2 --- /dev/null +++ b/ports/kf5archive/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/karchive + REF v5.50.0 + SHA512 519dd69ef76c9655cdf9d8f16484244469a6d5d2185c1d588bad325a401dd11f35699e3c115dfd52e5db38aa26aea3d9b35c7e83b76a36bda926574a7d3ce50f + HEAD_REF master +) + +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/KF5Archive) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/kf5archive RENAME copyright) diff --git a/ports/kf5holidays/CONTROL b/ports/kf5holidays/CONTROL new file mode 100644 index 00000000000..cd1e09ccfff --- /dev/null +++ b/ports/kf5holidays/CONTROL @@ -0,0 +1,4 @@ +Source: kf5holidays +Version: 5.50.0 +Description: Holiday calculation library +Build-Depends: ecm, qt5-base, qt5-declarative, qt5-tools \ No newline at end of file diff --git a/ports/kf5holidays/portfile.cmake b/ports/kf5holidays/portfile.cmake new file mode 100644 index 00000000000..b56abec1a35 --- /dev/null +++ b/ports/kf5holidays/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kholidays + REF v5.50.0 + SHA512 01c1258213e1bbab90b9af9c41965599637b1ccd4cd285cbe9bc11579fae1363162567ae14c33001b8b1cc085bae4dfdf4ed79b7ff27f93187bce79db662b4e2 + HEAD_REF master +) + +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/KF5Holidays) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) + +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/qml ${CURRENT_PACKAGES_DIR}/debug/qml ) +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/qml ${CURRENT_PACKAGES_DIR}/qml ) + +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/kf5holidays RENAME copyright) diff --git a/ports/kf5plotting/CONTROL b/ports/kf5plotting/CONTROL index a24b8e3529e..70439a5dc57 100644 --- a/ports/kf5plotting/CONTROL +++ b/ports/kf5plotting/CONTROL @@ -1,4 +1,4 @@ Source: kf5plotting -Version: 5.37.0 +Version: 5.50.0 Description: Lightweight plotting framework -Build-Depends: ecm, qt5 +Build-Depends: ecm, qt5-base diff --git a/ports/kf5plotting/portfile.cmake b/ports/kf5plotting/portfile.cmake index 39d6e8893fd..36f862d1321 100644 --- a/ports/kf5plotting/portfile.cmake +++ b/ports/kf5plotting/portfile.cmake @@ -1,11 +1,12 @@ 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_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kplotting + REF v5.50.0 + SHA512 512a0f8e8a5147f06345d86fa29effa8d0a59b62f5a24b70a09c4ddf5204d626e13f421be7c42d2103c5634e863db5ac8e6763db886351597f0798e05bc97f33 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -21,4 +22,4 @@ 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) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/kf5plotting RENAME copyright) diff --git a/ports/laszip/CONTROL b/ports/laszip/CONTROL new file mode 100644 index 00000000000..5f6bac68b3f --- /dev/null +++ b/ports/laszip/CONTROL @@ -0,0 +1,3 @@ +Source: laszip +Version: 3.2.2-1 +Description: LASzip - free and lossless LiDAR compression diff --git a/ports/laszip/portfile.cmake b/ports/laszip/portfile.cmake new file mode 100644 index 00000000000..92edbafb7b9 --- /dev/null +++ b/ports/laszip/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO LASzip/LASzip + REF 3.2.2 + SHA512 c4dac1fd525b1889fa8cc77f168bc3c83053619402ec13ac0ae58665cfd4440b9135ce30c4ade925a0ac9db7e3f717344859e511b2207841c84dc2453c6cf7f7 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LASZIP_BUILD_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLASZIP_BUILD_STATIC=${LASZIP_BUILD_STATIC} +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/laszip RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# Remove laszip_api3 dll since it doesn't export functions properly during build. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/laszip_api3.dll) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/laszip_api3.dll) diff --git a/ports/lcms/CONTROL b/ports/lcms/CONTROL index 5855fbc71f4..fd9c9d42913 100644 --- a/ports/lcms/CONTROL +++ b/ports/lcms/CONTROL @@ -1,4 +1,4 @@ Source: lcms -Version: 2.8-4 +Version: 2.8-5 Build-Depends: Description: Little CMS. diff --git a/ports/lcms/portfile.cmake b/ports/lcms/portfile.cmake index 7d52e52707e..4e125fa8693 100644 --- a/ports/lcms/portfile.cmake +++ b/ports/lcms/portfile.cmake @@ -5,7 +5,8 @@ vcpkg_from_github( REPO mm2/Little-CMS REF lcms2.8 SHA512 22ee94aa3333db4248607d8aa84343d324e04b30c154c46672c6f668e14a369b9b72f2557b8465218b6e9a2676cf8fa37d617b4aa13a013dc2337197a599e63a - HEAD_REF master + HEAD_REF master + PATCHES "${CMAKE_CURRENT_LIST_DIR}/remove_library_directive.patch" ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/lcms/remove_library_directive.patch b/ports/lcms/remove_library_directive.patch new file mode 100644 index 00000000000..29d035dc2c1 --- /dev/null +++ b/ports/lcms/remove_library_directive.patch @@ -0,0 +1,8 @@ +--- a/src/lcms2.def 2016-07-20 09:46:01.000000000 +0200 ++++ b/src/lcms2.def 2018-06-02 02:11:04.135781600 +0200 +@@ -1,5 +1,3 @@ +-LIBRARY LCMS2.DLL +- + EXPORTS + + _cms15Fixed16toDouble = _cms15Fixed16toDouble diff --git a/ports/leptonica/CONTROL b/ports/leptonica/CONTROL index 2be42f327c3..5fd60614d12 100644 --- a/ports/leptonica/CONTROL +++ b/ports/leptonica/CONTROL @@ -1,4 +1,4 @@ Source: leptonica -Version: 1.74.4-3 +Version: 1.76.0 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/find-dependency.patch b/ports/leptonica/find-dependency.patch new file mode 100644 index 00000000000..46348833e38 --- /dev/null +++ b/ports/leptonica/find-dependency.patch @@ -0,0 +1,18 @@ +diff --git a/cmake/templates/LeptonicaConfig.cmake.in b/cmake/templates/LeptonicaConfig.cmake.in +index d53904a..2aa2fea 100644 +--- a/cmake/templates/LeptonicaConfig.cmake.in ++++ b/cmake/templates/LeptonicaConfig.cmake.in +@@ -20,6 +20,13 @@ + # + # =================================================================================== + ++include(CMakeFindDependencyMacro) ++find_dependency(TIFF) ++find_dependency(ZLIB) ++find_dependency(PNG) ++find_dependency(JPEG) ++find_dependency(GIF) ++ + include(${CMAKE_CURRENT_LIST_DIR}/LeptonicaTargets.cmake) + + # ====================================================== diff --git a/ports/leptonica/fix-cmakelists.patch b/ports/leptonica/fix-cmakelists.patch index 18eb8cde507..b08a971f627 100644 --- a/ports/leptonica/fix-cmakelists.patch +++ b/ports/leptonica/fix-cmakelists.patch @@ -1,34 +1,12 @@ ---- 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 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 945100a..6daad98 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -14,7 +14,6 @@ if (MSVC) + set_source_files_properties(${src} PROPERTIES LANGUAGE CXX) 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() +-string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}) + add_library (leptonica ${LIBRARY_TYPE} ${src} ${hdr}) + set_target_properties (leptonica PROPERTIES VERSION ${VERSION_PLAIN}) diff --git a/ports/leptonica/portfile.cmake b/ports/leptonica/portfile.cmake index acaf7fe9d01..d42fa6b9050 100644 --- a/ports/leptonica/portfile.cmake +++ b/ports/leptonica/portfile.cmake @@ -3,16 +3,13 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO DanBloomberg/leptonica - REF 1.74.4 - SHA512 3b9d0be937883f733f72cbdf0b624ec245d9256a8b4622997f437d309efd7ad9695ad1cbe2224d543eb3ef8c44833567b3cc9a95e9a774ef9046b7acaf0ae744 + REF 1.76.0 + SHA512 0d7575dc38d1e656a228ef30412a2cbb908b9c7c8636e4e96f4a7dc0429c04709316b8ad04893285ab430c1b2063d71537fc5b989a0f9dbdbec488713e1bab1f HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch ${CMAKE_CURRENT_LIST_DIR}/use-tiff-libraries.patch + ${CMAKE_CURRENT_LIST_DIR}/find-dependency.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC) diff --git a/ports/leveldb/CMakeLists.txt b/ports/leveldb/CMakeLists.txt index 73b082c4a22..d19032582d4 100644 --- a/ports/leveldb/CMakeLists.txt +++ b/ports/leveldb/CMakeLists.txt @@ -3,18 +3,27 @@ project(leveldb C CXX) option(INSTALL_HEADERS "Install header files" ON) -add_definitions( - -DWIN32 - -D_CRT_NONSTDC_NO_DEPRECATE - -D_SCL_SECURE_NO_WARNINGS - -D_CRT_SECURE_NO_WARNINGS - -DNOMINMAX - -DLEVELDB_ATOMIC_PRESENT - -DLEVELDB_PLATFORM_WINDOWS -) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) -add_library(libleveldb - db/builder.cc +IF (MSVC) +add_definitions( + -DWIN32 + -D_CRT_NONSTDC_NO_DEPRECATE + -D_SCL_SECURE_NO_WARNINGS + -D_CRT_SECURE_NO_WARNINGS + -DNOMINMAX + -DLEVELDB_PLATFORM_WINDOWS + -DLEVELDB_ATOMIC_PRESENT +) +else () +add_definitions( + -DLEVELDB_PLATFORM_POSIX + -DLEVELDB_ATOMIC_PRESENT +) +endif() +set(SRCS + db/builder.cc db/c.cc db/dbformat.cc db/db_impl.cc @@ -31,7 +40,6 @@ add_library(libleveldb db/write_batch.cc helpers/memenv/memenv.cc port/port_posix_sse.cc - port/port_win.cc table/block.cc table/block_builder.cc table/filter_block.cc @@ -48,8 +56,6 @@ add_library(libleveldb util/comparator.cc util/crc32c.cc util/env.cc - util/env_posix.cc - util/env_win.cc util/filter_policy.cc util/hash.cc util/histogram.cc @@ -58,11 +64,22 @@ add_library(libleveldb util/status.cc ) -include_directories(${CMAKE_CURRENT_SOURCE_DIR} include) +if (MSVC) +set(SRCS ${SRCS} port/port_win.cc util/env_win.cc) +else () +set(SRCS ${SRCS} port/port_posix.cc util/env_posix.cc) +ENDIF() -target_link_libraries(libleveldb PUBLIC Iphlpapi.lib Shlwapi.lib) +add_library(leveldb ${SRCS}) -install(TARGETS libleveldb +target_include_directories(leveldb + PUBLIC include + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} +) + +target_link_libraries(leveldb PUBLIC Iphlpapi.lib Shlwapi.lib) + +install(TARGETS leveldb RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib @@ -72,4 +89,4 @@ if(INSTALL_HEADERS) file(GLOB HEADERS include/leveldb/*.h) install(FILES ${HEADERS} DESTINATION include/leveldb) install(FILES helpers/memenv/memenv.h DESTINATION include) -endif() \ No newline at end of file +endif() diff --git a/ports/libarchive/CONTROL b/ports/libarchive/CONTROL index c1769380783..af3d528b838 100644 --- a/ports/libarchive/CONTROL +++ b/ports/libarchive/CONTROL @@ -1,4 +1,29 @@ Source: libarchive -Version: 3.3.2-1 +Version: 3.3.3-2 Description: Library for reading and writing streaming archives -Build-Depends: zlib, bzip2, libxml2, lz4, liblzma, openssl +Build-Depends: zlib +Default-Features: bzip2, libxml2, lz4, lzma, lzo, openssl + +Feature: bzip2 +Build-Depends: bzip2 +Description: BZip2 support + +Feature: libxml2 +Build-Depends: libxml2 +Description: Libxml2 support + +Feature: lz4 +Build-Depends: lz4 +Description: LZ4 support + +Feature: lzma +Build-Depends: liblzma +Description: LZMA support + +Feature: lzo +Build-Depends: lzo +Description: LZO support + +Feature: openssl +Build-Depends: openssl +Description: OpenSSL support diff --git a/ports/libarchive/fix-lz4.patch b/ports/libarchive/fix-lz4.patch new file mode 100644 index 00000000000..6a3d974fcb6 --- /dev/null +++ b/ports/libarchive/fix-lz4.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 73bf07b3..76a1d61d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -515,7 +515,10 @@ IF (LZ4_INCLUDE_DIR) + ENDIF (LZ4_INCLUDE_DIR) + + FIND_PATH(LZ4_INCLUDE_DIR lz4.h) +-FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) ++FIND_LIBRARY(LZ4_LIBRARY_DEBUG NAMES lz4d liblz4d) ++FIND_LIBRARY(LZ4_LIBRARY_RELEASE NAMES lz4 liblz4) ++INCLUDE(SelectLibraryConfigurations) ++SELECT_LIBRARY_CONFIGURATIONS(LZ4) + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) + IF(LZ4_FOUND) + + \ No newline at end of file diff --git a/ports/libarchive/no-werror.patch b/ports/libarchive/no-werror.patch new file mode 100644 index 00000000000..fbd3be8c66b --- /dev/null +++ b/ports/libarchive/no-werror.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 745dc29..820c56f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -96,7 +96,7 @@ IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$") + ################################################################# + # Set compile flags for debug build. + # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" +- SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror") ++ #SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wextra") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wunused") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wshadow") +@@ -112,7 +112,7 @@ IF (CMAKE_C_COMPILER_ID MATCHES "^Clang$") + # Set compile flags for debug build. + # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g") +- SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror") ++ #SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wextra") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wunused") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wshadow") diff --git a/ports/libarchive/portfile.cmake b/ports/libarchive/portfile.cmake index a5bed4143b7..a2a35ad6567 100644 --- a/ports/libarchive/portfile.cmake +++ b/ports/libarchive/portfile.cmake @@ -7,21 +7,58 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libarchive/libarchive - REF v3.3.2 - SHA512 7bc17d6f742080278e35f86b0233d70045df0ca1578cd427126e0acce183709bf33ecca689db65e2e67bdfaf687c04d36cae1202a926beeebc88076648aa40bc - HEAD_REF master) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} + REF v3.3.3 + SHA512 10063764b610c0c966ba0177cac0d2cb781e297a45545cc8a587741513089af26f40769670894c86e7985b73c47e9cb985253bc3bef3a12fa83fe2a6a30acb6d + HEAD_REF master PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-buildsystem.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-dependencies.patch) + ${CMAKE_CURRENT_LIST_DIR}/fix-dependencies.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-lz4.patch + ${CMAKE_CURRENT_LIST_DIR}/no-werror.patch +) + +set(BUILD_libarchive_bzip2 OFF) +if("bzip2" IN_LIST FEATURES) + set(BUILD_libarchive_bzip2 ON) +endif() + +set(BUILD_libarchive_libxml2 OFF) +if("libxml2" IN_LIST FEATURES) + set(BUILD_libarchive_libxml2 ON) +endif() +set(BUILD_libarchive_libxml2 OFF) + +set(BUILD_libarchive_lz4 OFF) +if("lz4" IN_LIST FEATURES) + set(BUILD_libarchive_lz4 ON) +endif() + +set(BUILD_libarchive_lzma OFF) +if("lzma" IN_LIST FEATURES) + set(BUILD_libarchive_lzma ON) +endif() + +set(BUILD_libarchive_lzo OFF) +if("lzo" IN_LIST FEATURES) + set(BUILD_libarchive_lzo ON) +endif() + +set(BUILD_libarchive_openssl OFF) +if("openssl" IN_LIST FEATURES) + set(BUILD_libarchive_openssl ON) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DENABLE_LZO=OFF + -DENABLE_BZip2=${BUILD_libarchive_bzip2} + -DENABLE_LIBXML2=${BUILD_libarchive_libxml2} + -DENABLE_LZ4=${BUILD_libarchive_lz4} + -DENABLE_LZMA=${BUILD_libarchive_lzma} + -DENABLE_LZO=${BUILD_libarchive_lzo} + -DENABLE_OPENSSL=${BUILD_libarchive_openssl} + -DENABLE_PCREPOSIX=OFF -DENABLE_NETTLE=OFF -DENABLE_EXPAT=OFF -DENABLE_LibGCC=OFF diff --git a/ports/libbson/CONTROL b/ports/libbson/CONTROL index 8ba25697ff7..2d64c4c1c87 100644 --- a/ports/libbson/CONTROL +++ b/ports/libbson/CONTROL @@ -1,3 +1,3 @@ Source: libbson -Version: 1.9.2 +Version: 1.9.5-1 Description: libbson is a library providing useful routines related to building, parsing, and iterating BSON documents. diff --git a/ports/libbson/portfile.cmake b/ports/libbson/portfile.cmake index 3bc9cd18a8d..50b6da17507 100644 --- a/ports/libbson/portfile.cmake +++ b/ports/libbson/portfile.cmake @@ -1,16 +1,12 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libbson-1.9.2) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mongodb/libbson/archive/1.9.2.tar.gz" - FILENAME "libbson-1.9.2.tar.gz" - SHA512 a05f1e8fbabb34e847692397e2e41fc5923ddd18dba861e5ab8a31acdf6738e13ab719eae8f9f8563f08fc43aab5c8d1f53cb6a47c38c96e132fa4a62a48d2bf -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-uwp.patch +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mongodb/libbson + REF 1.9.5 + SHA512 14bc75989baac550f42939ea161fa7872b950e5b669dc8f19e897f0783b04e0212e5e722b3fcdf946308b9a68bc066502ed8238dad92e342e5f49b8b2cc8f484 + HEAD_REF master + PATCHES fix-uwp.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") @@ -45,24 +41,32 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/bson-static-1.0.lib - ${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/bson-static-1.0.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib) + if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/libbson-static-1.0.a + ${CURRENT_PACKAGES_DIR}/lib/libbson-1.0.a) + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/libbson-static-1.0.a + ${CURRENT_PACKAGES_DIR}/debug/lib/libbson-1.0.a) + else() + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/bson-static-1.0.lib + ${CURRENT_PACKAGES_DIR}/lib/bson-1.0.lib) + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/bson-static-1.0.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/bson-1.0.lib) + endif() # drop the __declspec(dllimport) when building static vcpkg_apply_patches( SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/static.patch + PATCHES static.patch ) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) endif() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson RENAME copyright) +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/libbson/copyright COPYONLY) file(COPY ${SOURCE_PATH}/THIRD_PARTY_NOTICES DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson) if (VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -71,6 +75,7 @@ else() set(PORT_POSTFIX "1.0") endif() +# Create cmake files for _both_ find_package(libbson) and find_package(libbson-static-1.0)/find_package(libbson-1.0) file(READ ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config.cmake LIBBSON_CONFIG_CMAKE) string(REPLACE "/include/libbson-1.0" "/include" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}") string(REPLACE "bson-static-1.0" "bson-1.0" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}") @@ -80,4 +85,4 @@ file(COPY ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config-v file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config.cmake ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config.cmake) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config-version.cmake) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/libdshowcapture/CONTROL b/ports/libdshowcapture/CONTROL new file mode 100644 index 00000000000..2d6e37de230 --- /dev/null +++ b/ports/libdshowcapture/CONTROL @@ -0,0 +1,3 @@ +Source: libdshowcapture +Version: 0.6.0 +Description: Free and Open Source C++11 Library for capturing DirectShow video/audio devices on windows. diff --git a/ports/libdshowcapture/portfile.cmake b/ports/libdshowcapture/portfile.cmake new file mode 100644 index 00000000000..372e1b6dc38 --- /dev/null +++ b/ports/libdshowcapture/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO obsproject/libdshowcapture + REF cba07c63810f51a58f6fb7f2e3b0fb162b5a6313 + SHA512 962f5886f637f06580db9b90d238cdb76976846c5b1d49112910fda0da689788abec1d1703aa4e91ee4be57f328eb8183c04f94119662e1243269ae66f023c84 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_build_cmake(TARGET libdshowcapture) + +# Copy files +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libdshowcapture RENAME copyright) +if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libdshowcapture.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libdshowcapture.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libdshowcapture.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libdshowcapture.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${SOURCE_PATH}/dshowcapture.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +vcpkg_copy_pdbs() diff --git a/ports/libevent/portfile.cmake b/ports/libevent/portfile.cmake index 6a1755c3ec1..251624e3f89 100644 --- a/ports/libevent/portfile.cmake +++ b/ports/libevent/portfile.cmake @@ -21,6 +21,7 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + -DEVENT_INSTALL_CMAKE_DIR:PATH=share/libevent -DEVENT__DISABLE_BENCHMARK=ON -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_REGRESS=ON @@ -31,7 +32,7 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +vcpkg_fixup_cmake_targets() vcpkg_copy_pdbs() file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libevent) diff --git a/ports/libflac/CMakeLists.txt b/ports/libflac/CMakeLists.txt index 518419c4fa5..d6f01399a34 100644 --- a/ports/libflac/CMakeLists.txt +++ b/ports/libflac/CMakeLists.txt @@ -7,15 +7,22 @@ if(NOT DEFINED LIBFLAC_ARCHITECTURE) message(FATAL_ERROR "Target architecture not specified") endif() -file(GLOB LIBFLAC_SOURCES - ${PROJECT_SOURCE_DIR}/src/libFLAC/*.c - ${PROJECT_SOURCE_DIR}/src/share/win_utf8_io/win_utf8_io.c) +file(GLOB LIBFLAC_SOURCES src/libFLAC/*.c) -file(GLOB LIBFLACXX_SOURCES - ${PROJECT_SOURCE_DIR}/src/libFLAC++/*.cpp) +if(WIN32) + list(APPEND LIBFLAC_SOURCES src/share/win_utf8_io/win_utf8_io.c) +else() + list(FILTER LIBFLAC_SOURCES EXCLUDE REGEX "windows[^/]*$") -include_directories(${PROJECT_SOURCE_DIR}/include) -include_directories(${PROJECT_SOURCE_DIR}/src/libFLAC/include) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/config.h "#include ") + include_directories(${CMAKE_CURRENT_BINARY_DIR}) + add_definitions(-DHAVE_CONFIG_H) +endif() + +file(GLOB LIBFLACXX_SOURCES src/libFLAC++/*.cpp) + +include_directories(include) +include_directories(src/libFLAC/include) if(NOT LIBFLAC_ARCHITECTURE MATCHES arm) add_definitions(-DFLAC__SSE_OS) @@ -44,14 +51,15 @@ endif() add_definitions(-DPACKAGE_VERSION="1.3.2") add_definitions(-DFLAC__HAS_OGG) add_definitions(-DFLAC__ALIGN_MALLOC_DATA) # 32 byte boundary +add_definitions(-DHAVE_LROUND) add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-D_CRT_NONSTDC_NO_WARNINGS) add_library(libFLAC ${LIBFLAC_SOURCES}) add_library(libFLACXX ${LIBFLACXX_SOURCES}) -set_target_properties(libFLAC PROPERTIES OUTPUT_NAME flac) -set_target_properties(libFLACXX PROPERTIES OUTPUT_NAME flac++) +set_target_properties(libFLAC PROPERTIES OUTPUT_NAME FLAC) +set_target_properties(libFLACXX PROPERTIES OUTPUT_NAME FLAC++) find_library(OGG_LIBRARY ogg) find_path(OGG_INCLUDE_DIR ogg/ogg.h) @@ -73,10 +81,10 @@ install(TARGETS libFLAC libFLACXX LIBRARY DESTINATION lib) if(NOT DEFINED LIBFLAC_SKIP_HEADERS) - install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/FLAC/ + install(DIRECTORY include/FLAC/ DESTINATION include/FLAC FILES_MATCHING PATTERN "*.h") - install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/FLAC++/ + install(DIRECTORY include/FLAC++/ DESTINATION include/FLAC++ FILES_MATCHING PATTERN "*.h") endif() diff --git a/ports/libflac/CONTROL b/ports/libflac/CONTROL index ca2995d6800..afdb70cbe26 100644 --- a/ports/libflac/CONTROL +++ b/ports/libflac/CONTROL @@ -1,4 +1,4 @@ Source: libflac -Version: 1.3.2-4 +Version: 1.3.2-6 Description: Library for manipulating FLAC files Build-Depends: libogg diff --git a/ports/libflac/portfile.cmake b/ports/libflac/portfile.cmake index 236f51c8eb7..89410744797 100644 --- a/ports/libflac/portfile.cmake +++ b/ports/libflac/portfile.cmake @@ -1,17 +1,20 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/flac-1.3.2) -vcpkg_download_distfile(ARCHIVE - URLS "http://downloads.xiph.org/releases/flac/flac-1.3.2.tar.xz" - FILENAME "flac-1.3.2.tar.xz" - SHA512 63910e8ebbe508316d446ffc9eb6d02efbd5f47d29d2ea7864da9371843c8e671854db6e89ba043fe08aef1845b8ece70db80f1cce853f591ca30d56ef7c3a15) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_download_distfile(FLAC_MAX_MIN_PATCH + URLS "https://github.com/xiph/flac/commit/64f47c2d71ffba5aa8cd1d2a447339fd95f362f9.patch" + FILENAME "flac-max-min.patch" + SHA512 7ce9ccf9f081b478664cccd677c10269567672a8aa3a60839ef203b3d0a626d2b2c2f34d4c7fc897c31a436d7c22fb740bca5449a465dab39d60655417fe7772) -vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/flac-1.3.2 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/flac + REF 1.3.2 + SHA512 d0e177cadee371940516864bf72e1eb3d101a5f2779c854ecb8a3361a654a9b9e7efd303c83e2f308bacc7e54298d37705f677e2b955d4a9fe3470c364fa45f3 + HEAD_REF master PATCHES - "${CMAKE_CURRENT_LIST_DIR}/uwp-library-console.patch" - "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile2.patch" + "${FLAC_MAX_MIN_PATCH}" + "${CMAKE_CURRENT_LIST_DIR}/uwp-library-console.patch" + "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile2.patch" ) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) diff --git a/ports/libfreenect2/CONTROL b/ports/libfreenect2/CONTROL index 90c53db6d94..7f6ba98dfa0 100644 --- a/ports/libfreenect2/CONTROL +++ b/ports/libfreenect2/CONTROL @@ -1,4 +1,4 @@ Source: libfreenect2 -Version: 0.2.0 -Build-Depends:libusb +Version: 0.2.0-1 +Build-Depends: libusb, libjpeg-turbo Description: Open source drivers for the Kinect for Windows v2 device diff --git a/ports/libgd/CONTROL b/ports/libgd/CONTROL index f86afe90f09..a8373f51575 100644 --- a/ports/libgd/CONTROL +++ b/ports/libgd/CONTROL @@ -1,4 +1,4 @@ Source: libgd -Version: 2.2.4-3 +Version: 2.2.4-4 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/libgd/no-write-source-dir.patch b/ports/libgd/no-write-source-dir.patch new file mode 100644 index 00000000000..3017e7ee4a0 --- /dev/null +++ b/ports/libgd/no-write-source-dir.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b16d4a4..5126085 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -191,7 +191,8 @@ else (USE_EXT_GD) + CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H) + CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H) + +- CONFIGURE_FILE(${GD_SOURCE_DIR}/src/config.h.cmake ${GD_SOURCE_DIR}/src/config.h ESCAPE_QUOTES) ++ CONFIGURE_FILE(${GD_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config.h ESCAPE_QUOTES) ++ include_directories(${CMAKE_CURRENT_BINARY_DIR}/src) + + option(BUILD_SHARED_LIBS "Build shared libs" ON) + option(BUILD_STATIC_LIBS "Build static libs" OFF) diff --git a/ports/libgd/portfile.cmake b/ports/libgd/portfile.cmake index 61445641e47..7e8051acc61 100644 --- a/ports/libgd/portfile.cmake +++ b/ports/libgd/portfile.cmake @@ -1,19 +1,15 @@ include(vcpkg_common_functions) -set(LIBGD_VERSION 2.2.4) -set(LIBGD_HASH 02ce40c45f31cf1645ad1d3fd9b9b498323b2709d40b0681cd403c11072a1f2149f5af844a6bf9e695c29e3247013bb94c57c0225a54189d728f64caf0a938ee) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libgd-gd-${LIBGD_VERSION}) - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/libgd/libgd/archive/gd-${LIBGD_VERSION}.tar.gz" - FILENAME "gd-${LIBGD_VERSION}.tar.gz" - SHA512 ${LIBGD_HASH}) - -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-cmake.patch") +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libgd/libgd + REF gd-2.2.4 + SHA512 02ce40c45f31cf1645ad1d3fd9b9b498323b2709d40b0681cd403c11072a1f2149f5af844a6bf9e695c29e3247013bb94c57c0225a54189d728f64caf0a938ee + HEAD_REF master + PATCHES + 0001-fix-cmake.patch + no-write-source-dir.patch +) #delete CMake builtins modules file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/modules/CMakeParseArguments.cmake) diff --git a/ports/libgeotiff/0003-Fix-cmake-TIFF-detection.patch b/ports/libgeotiff/0003-Fix-cmake-TIFF-detection.patch deleted file mode 100644 index 14929e10c24..00000000000 --- a/ports/libgeotiff/0003-Fix-cmake-TIFF-detection.patch +++ /dev/null @@ -1,36 +0,0 @@ -From bc0003ab3d94f271b27f6897259b734709a5d6cf Mon Sep 17 00:00:00 2001 -From: Hiroshi Miura -Date: Wed, 14 Feb 2018 12:32:11 +0900 -Subject: [PATCH 3/5] Fix cmake TIFF detection - -Signed-off-by: Hiroshi Miura ---- - CMakeLists.txt | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 55ececf..1e2fe3d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -191,7 +191,8 @@ IF(WITH_TIFF) - IF(TIFF_FOUND) - # Confirm required API is available - INCLUDE(CheckFunctionExists) -- SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES}) -+ FIND_PACKAGE(LibLZMA) -+ SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${LIBLZMA_LIBRARIES}) - - CHECK_FUNCTION_EXISTS(TIFFOpen HAVE_TIFFOPEN) - IF(NOT HAVE_TIFFOPEN) -@@ -204,7 +205,7 @@ IF(WITH_TIFF) - SET(TIFF_FOUND) # ReSET to NOT found for TIFF library - MESSAGE(FATAL_ERROR "Failed to link with libtiff - TIFFMergeFieldInfo function not found. libtiff 3.6.0 Beta or later required. Please upgrade or use an older version of libgeotiff") - ENDIF() -- -+ SET(CMAKE_REQUIRED_LIBRARIES) - INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) - ADD_DEFINITIONS(-DHAVE_TIFF=1) - ENDIF(TIFF_FOUND) --- -2.16.1 - diff --git a/ports/libgeotiff/CONTROL b/ports/libgeotiff/CONTROL index abd2fbdc5f7..dea361457aa 100644 --- a/ports/libgeotiff/CONTROL +++ b/ports/libgeotiff/CONTROL @@ -1,4 +1,4 @@ Source: libgeotiff -Version: 1.4.2-3 +Version: 1.4.2-6 Description: Libgeotiff is an open source library normally hosted on top of ​libtiff for reading, and writing GeoTIFF information tags. Build-Depends: tiff, proj4, zlib, libjpeg-turbo diff --git a/ports/libgeotiff/portfile.cmake b/ports/libgeotiff/portfile.cmake index 65e5fa436b2..afd203b03e7 100644 --- a/ports/libgeotiff/portfile.cmake +++ b/ports/libgeotiff/portfile.cmake @@ -2,55 +2,62 @@ include(vcpkg_common_functions) set(LIBGEOTIFF_VERSION 1.4.2) set(LIBGEOTIFF_HASH 059c6e05eb0c47f17b102c7217a2e1636e76d622c4d1bdcf0bd89fb3505f3130bffa881e21c73cfd2ca0d6863b81322f85784658ba3539b53b63c3a8f38d1deb) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libgeotiff-${LIBGEOTIFF_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-${LIBGEOTIFF_VERSION}.tar.gz" FILENAME "libgeotiff-${LIBGEOTIFF_VERSION}.tar.gz" - SHA512 ${LIBGEOTIFF_HASH}) - -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Updates-to-CMake-configuration-to-align-with-other-C.patch" - "${CMAKE_CURRENT_LIST_DIR}/0002-Fix-directory-output.patch" - "${CMAKE_CURRENT_LIST_DIR}/0003-Fix-cmake-TIFF-detection.patch" - "${CMAKE_CURRENT_LIST_DIR}/0004-Fix-libxtiff-installation.patch" - "${CMAKE_CURRENT_LIST_DIR}/0005-Control-shared-library-build-with-option.patch" - "${CMAKE_CURRENT_LIST_DIR}/0006-Fix-utility-link-error.patch" + SHA512 ${LIBGEOTIFF_HASH} ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(BUILD_SHARED_LIBS ON) -else() - set(BUILD_SHARED_LIBS OFF) -endif() +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${LIBGEOTIFF_VERSION} + PATCHES + 0001-Updates-to-CMake-configuration-to-align-with-other-C.patch + 0002-Fix-directory-output.patch + 0004-Fix-libxtiff-installation.patch + 0005-Control-shared-library-build-with-option.patch + 0006-Fix-utility-link-error.patch +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DWITH_TIFF=ON - -DWITH_PROJ4=ON - -DWITH_ZLIB=ON - -DWITH_JPEG=ON + OPTIONS + -DWITH_TIFF=ON + -DWITH_PROJ4=ON + -DWITH_ZLIB=ON + -DWITH_JPEG=ON OPTIONS_RELEASE -DWITH_UTILITIES=ON OPTIONS_DEBUG -DWITH_UTILITIES=OFF ) -vcpkg_build_cmake() vcpkg_install_cmake() -vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgeotiff RENAME copyright) +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/libgeotiff/copyright COPYONLY) -file(GLOB GEOTIFF_UTILS ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(INSTALL ${GEOTIFF_UTILS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/libgeotiff/) -file(REMOVE ${GEOTIFF_UTILS}) +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(GLOB GEOTIFF_UTILS ${CURRENT_PACKAGES_DIR}/bin/*) +else() + file(GLOB GEOTIFF_UTILS ${CURRENT_PACKAGES_DIR}/bin/*.exe) +endif() + +file(COPY ${GEOTIFF_UTILS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/libgeotiff) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libgeotiff) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) +file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +if(EXES) + file(REMOVE ${EXES}) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) endif() + +# Move and cleanup doc files +file(RENAME ${CURRENT_PACKAGES_DIR}/doc ${CURRENT_PACKAGES_DIR}/share/libgeotiff/doc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) + +vcpkg_copy_pdbs() diff --git a/ports/libgit2/CONTROL b/ports/libgit2/CONTROL index 779bf10c9cc..f44900b7252 100644 --- a/ports/libgit2/CONTROL +++ b/ports/libgit2/CONTROL @@ -1,3 +1,4 @@ Source: libgit2 -Version: 0.26.0 +Version: 0.27.4-2 +Build-Depends: openssl (!windows&&!uwp) Description: Git linkable library diff --git a/ports/libgit2/portfile.cmake b/ports/libgit2/portfile.cmake index e624e37eb54..0982e5be16f 100644 --- a/ports/libgit2/portfile.cmake +++ b/ports/libgit2/portfile.cmake @@ -8,19 +8,20 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libgit2/libgit2 - REF v0.26.0 - SHA512 b6e51f2216c7c23f352572b780ea1325a25a517396709f036bb573295c2bd02aa505ba616846ac7e07863e99e640e7d47fefc5727478a257b283da99060ee47c - HEAD_REF master) + REF v0.27.4 + SHA512 d27db86eb1b9f0d4057f8538ba1985ee76c3ca106e57d417fa9bff79d575f91a07ad28693112b58dc1d61d68116a82e6a145f12276158f2806b6c4964d741f61 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS + OPTIONS -DBUILD_CLAR=OFF - OPTIONS_DEBUG - -DBUILD_CLAR=OFF + -DSTATIC_CRT=${STATIC_CRT} ) - vcpkg_install_cmake() diff --git a/ports/libgo/CONTROL b/ports/libgo/CONTROL new file mode 100644 index 00000000000..18b37915aee --- /dev/null +++ b/ports/libgo/CONTROL @@ -0,0 +1,4 @@ +Source: libgo +Version: 2.8-2 +Build-Depends: boost-context +Description: The best stackful coroutine by c++11. diff --git a/ports/libgo/boost-168.patch b/ports/libgo/boost-168.patch new file mode 100644 index 00000000000..48a90023fdc --- /dev/null +++ b/ports/libgo/boost-168.patch @@ -0,0 +1,20 @@ +diff --git a/libgo/ctx_boost_context/context.h b/libgo/ctx_boost_context/context.h +index 2db71c0..2f321fb 100644 +--- a/libgo/ctx_boost_context/context.h ++++ b/libgo/ctx_boost_context/context.h +@@ -1,4 +1,4 @@ +-#include ++#include + + #if BOOST_EXECUTION_CONTEXT == 2 // boost version >= 1.61 + # include "context_v2.h" +diff --git a/libgo/ctx_boost_context/context_v2.h b/libgo/ctx_boost_context/context_v2.h +index e415af4..59e2e29 100644 +--- a/libgo/ctx_boost_context/context_v2.h ++++ b/libgo/ctx_boost_context/context_v2.h +@@ -1,4 +1,4 @@ +-#include ++#include + + namespace co + { diff --git a/ports/libgo/cmake.patch b/ports/libgo/cmake.patch new file mode 100644 index 00000000000..bed9cddaa1a --- /dev/null +++ b/ports/libgo/cmake.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dbbdd7d..29396a5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -137,7 +137,7 @@ if (UNIX) + set(CMAKE_CXX_FLAGS "-std=c++11 -fPIC -Wall -pthread ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS_DEBUG "-g -pg ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS_RELEASE "-g -O3 ${CMAKE_CXX_FLAGS}") +-else () ++elseif (NOT DISABLE_ADJUST_COMMAND_LINE_FLAGS) + if (NOT DISABLE_DYNAMIC_LIB) + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") +@@ -159,7 +159,7 @@ set(STATIC_T "libgo_static") + add_library("${STATIC_T}" STATIC ${CO_SRC_LIST}) + set_target_properties("${STATIC_T}" PROPERTIES OUTPUT_NAME "${TARGET}") + +-if (UNIX) ++if (UNIX OR FORCE_UNIX_TARGETS) + add_subdirectory(${PROJECT_SOURCE_DIR}/libgo/main) + + if (NOT DISABLE_DYNAMIC_LIB) +@@ -180,7 +180,11 @@ if (UNIX) + PATTERN "ctx_boost_coroutine" EXCLUDE + PATTERN "ctx_ucontext" EXCLUDE + PATTERN "*.h") ++ if(UNIX) + install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/linux/ DESTINATION "include/libgo" FILES_MATCHING PATTERN "*.h") ++ else() ++ install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/windows/ DESTINATION "include/libgo" FILES_MATCHING PATTERN "*.h") ++ endif() + #file(WRITE ${PROJECT_SOURCE_DIR}/tools/libgo.conf "${CMAKE_INSTALL_PREFIX}/lib") + #install(FILES ${PROJECT_SOURCE_DIR}/tools/libgo.conf DESTINATION "/etc/ld.so.conf.d") + if (DEPEND_BOOST) diff --git a/ports/libgo/libgo-config.cmake b/ports/libgo/libgo-config.cmake new file mode 100644 index 00000000000..fd52f8dd3cc --- /dev/null +++ b/ports/libgo/libgo-config.cmake @@ -0,0 +1,25 @@ +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + +if(NOT LIBGO_FIND_COMPONENTS) + set(LIBGO_FIND_COMPONENTS libgo libgo) + if(LIBGO_FIND_REQUIRED) + set(LIBGO_FIND_REQUIRED_libgo TRUE) + endif() + + set(LIBGO_FOUND TRUE) +endif() + +set(LIBGO_INCLUDE_DIRS ${_DIR}/../../include) +set(LIBGO_LIBRARIES) +if (EXISTS ${_DIR}/../../lib/liblibgo.a) + list(APPEND LIBGO_LIBRARIES optimized ${_DIR}/../../lib/liblibgo.a) +endif() +if (EXISTS ${_DIR}/../../debug/lib/liblibgo.a) + list(APPEND LIBGO_LIBRARIES debug ${_DIR}/../../debug/lib/liblibgo.a) +endif() +if (EXISTS ${_DIR}/../../lib/libgo.lib) + list(APPEND LIBGO_LIBRARIES optimized ${_DIR}/../../lib/libgo.lib) +endif() +if (EXISTS ${_DIR}/../../debug/lib/libgo.lib) + list(APPEND LIBGO_LIBRARIES debug ${_DIR}/../../debug/lib/libgo.lib) +endif() diff --git a/ports/libgo/portfile.cmake b/ports/libgo/portfile.cmake new file mode 100644 index 00000000000..f0311eea406 --- /dev/null +++ b/ports/libgo/portfile.cmake @@ -0,0 +1,62 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO yyzybb537/libgo + REF v2.8 + SHA512 44784de4aec36ea321195c11c99a73de4f6f51285febdf6980e8aaced1fdfc0a34c6b1a8acc8c6b424e747310a1d7fb1604f722084c28ab91f8ebee15667d59b + HEAD_REF master + PATCHES + cmake.patch + boost-168.patch +) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/XBased/xhook/archive/e18c450541892212ca4f11dc91fa269fabf9646f.tar.gz" + FILENAME "xhook-e18c450541892212ca4f11dc91fa269fabf9646f.tar.gz" + SHA512 1bcf320f50cff13d92013a9f0ab5c818c2b6b63e9c1ac18c5dd69189e448d7a848f1678389d8b2c08c65f907afb3909e743f6c593d9cfb21e2bb67d5c294a166 +) + +file(REMOVE_RECURSE ${SOURCE_PATH}/third_party) + +vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH}/third_party) +file(RENAME ${SOURCE_PATH}/third_party/xhook-e18c450541892212ca4f11dc91fa269fabf9646f ${SOURCE_PATH}/third_party/xhook) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDISABLE_ADJUST_COMMAND_LINE_FLAGS=ON + -DDISABLE_DYNAMIC_LIB=ON + -DENABLE_BOOST_CONTEXT=ON + -DFORCE_UNIX_TARGETS=ON + -DDISABLE_SYSTEMWIDE=ON +) + +vcpkg_install_cmake() + +# remove duplicated include files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/libgo/disable_hook) + +file(GLOB REL_MAIN ${CURRENT_PACKAGES_DIR}/lib/libgo_main.lib ${CURRENT_PACKAGES_DIR}/lib/liblibgo_main.a) +if(REL_MAIN) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(COPY ${REL_MAIN} DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(REMOVE ${REL_MAIN}) +endif() + +file(GLOB DBG_MAIN ${CURRENT_PACKAGES_DIR}/debug/lib/libgo_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/liblibgo_main.a) +if(DBG_MAIN) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(COPY ${DBG_MAIN} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(REMOVE ${DBG_MAIN}) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgo RENAME copyright) +file(INSTALL ${CURRENT_PORT_DIR}/libgo-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgo) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/libgo/usage b/ports/libgo/usage new file mode 100644 index 00000000000..a8f0729476a --- /dev/null +++ b/ports/libgo/usage @@ -0,0 +1,5 @@ +The package libgo provides CMake integration: + + find_package(libgo REQUIRED) + target_include_directories(main PRIVATE ${LIBGO_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${LIBGO_LIBRARIES}) diff --git a/ports/libiconv/portfile.cmake b/ports/libiconv/portfile.cmake index f1ee147f998..3ccd85c5314 100644 --- a/ports/libiconv/portfile.cmake +++ b/ports/libiconv/portfile.cmake @@ -39,3 +39,5 @@ vcpkg_copy_pdbs() # Handle copyright file(COPY ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/libiconv) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libiconv/COPYING.LIB ${CURRENT_PACKAGES_DIR}/share/libiconv/copyright) + +vcpkg_test_cmake(PACKAGE_NAME unofficial-iconv) \ No newline at end of file diff --git a/ports/libideviceactivation/CONTROL b/ports/libideviceactivation/CONTROL new file mode 100644 index 00000000000..2d5e236619e --- /dev/null +++ b/ports/libideviceactivation/CONTROL @@ -0,0 +1,4 @@ +Source: libideviceactivation +Version: 1.0.38-1 +Description: A library to handle the activation process of iOS devices +Build-Depends: libimobiledevice, libxml2, curl \ No newline at end of file diff --git a/ports/libideviceactivation/portfile.cmake b/ports/libideviceactivation/portfile.cmake new file mode 100644 index 00000000000..7a462834e4c --- /dev/null +++ b/ports/libideviceactivation/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libimobiledevice-win32/libideviceactivation + REF 1.0.38 + SHA512 2fd2d5636e83a6740251dca58c04429628f47661a56e573fc14f45ef68c54990717515305902cf04759a7c8fd19e66a30c8eb2ea20e6257d2c5405b690ea25a6 + HEAD_REF msvc-master +) + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH libideviceactivation.sln + INCLUDES_SUBPATH include + LICENSE_SUBPATH COPYING + USE_VCPKG_INTEGRATION + ALLOW_ROOT_INCLUDES +) + +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/Makefile.am) diff --git a/ports/libimobiledevice/CONTROL b/ports/libimobiledevice/CONTROL new file mode 100644 index 00000000000..b6d3c2960c2 --- /dev/null +++ b/ports/libimobiledevice/CONTROL @@ -0,0 +1,4 @@ +Source: libimobiledevice +Version: 1.2.1.215-1 +Description: A cross-platform protocol library to communicate with iOS devices +Build-Depends: libplist, libusbmuxd, openssl, dirent, getopt \ No newline at end of file diff --git a/ports/libimobiledevice/portfile.cmake b/ports/libimobiledevice/portfile.cmake new file mode 100644 index 00000000000..4bc5051632c --- /dev/null +++ b/ports/libimobiledevice/portfile.cmake @@ -0,0 +1,20 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libimobiledevice-win32/libimobiledevice + REF 1.2.1.215 + SHA512 192ac12eb4fdf518a934cb8061d4a40e48f483e969e34167f2a5346efac1d745e4041eff84d7175d106b1a3b3f806d5e69643daa1459e48e69bc9c38d722be3c + HEAD_REF msvc-master +) + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH libimobiledevice.sln + INCLUDES_SUBPATH include + LICENSE_SUBPATH COPYING + REMOVE_ROOT_INCLUDES + USE_VCPKG_INTEGRATION +) diff --git a/ports/libirecovery/CONTROL b/ports/libirecovery/CONTROL new file mode 100644 index 00000000000..c3f423b93e0 --- /dev/null +++ b/ports/libirecovery/CONTROL @@ -0,0 +1,4 @@ +Source: libirecovery +Version: 1.0.25-2 +Description: Library and utility to talk to iBoot/iBSS via USB on Mac OS X, Windows, and Linux +Build-Depends: libusbmuxd, readline, getopt \ No newline at end of file diff --git a/ports/libirecovery/portfile.cmake b/ports/libirecovery/portfile.cmake new file mode 100644 index 00000000000..508150b07d3 --- /dev/null +++ b/ports/libirecovery/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libimobiledevice-win32/libirecovery + REF 1.0.25 + SHA512 0dd91d4fe3ded2bc1bbd91aea964e31e7f59bce18be01aa096e974f37dc1be281644d6c44e3f9b49470dd961e3df2e3ff8a09bcc6b803a959073e7d7d9a8d3e7 + HEAD_REF msvc-master +) + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH libirecovery.sln + INCLUDES_SUBPATH include + LICENSE_SUBPATH COPYING + USE_VCPKG_INTEGRATION + ALLOW_ROOT_INCLUDES +) + +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/Makefile.am) diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake index 7f6bc49732d..c077fd16c4e 100644 --- a/ports/libjpeg-turbo/portfile.cmake +++ b/ports/libjpeg-turbo/portfile.cmake @@ -1,11 +1,4 @@ include(vcpkg_common_functions) -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO libjpeg-turbo/libjpeg-turbo - REF 1.5.3 - SHA512 0e7a2cd9943b610f49b562c20a5c350a50326a87bce1d39f14fe45760ed2f89a0d2d3e3f0de9f6a7714f566aabadec6b2422b592591ebb98bbad600ea411fea7 - HEAD_REF master -) vcpkg_download_distfile(GETENV_PATCH URLS "https://github.com/libjpeg-turbo/libjpeg-turbo/commit/bd96b30b74fe166fc94218cfc64a097fafdcc05f.diff" @@ -13,10 +6,15 @@ vcpkg_download_distfile(GETENV_PATCH SHA512 4cd064521b5e4baba4adf972f9f574f6dd43a2cd3e3ad143ca2cdf0f165024406d4fd2ed094124d0c17c5370394140e82fdd892d3cdc49609acdf8f79db1758c ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/add-options-for-exes-docs-headers.patch" - "${CMAKE_CURRENT_LIST_DIR}/linux-cmake.patch" +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libjpeg-turbo/libjpeg-turbo + REF 1.5.3 + SHA512 0e7a2cd9943b610f49b562c20a5c350a50326a87bce1d39f14fe45760ed2f89a0d2d3e3f0de9f6a7714f566aabadec6b2422b592591ebb98bbad600ea411fea7 + HEAD_REF master + PATCHES + add-options-for-exes-docs-headers.patch + linux-cmake.patch "${GETENV_PATCH}" ) @@ -67,3 +65,6 @@ file(COPY file(RENAME ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo/copyright) vcpkg_copy_pdbs() file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/jpeg) + +vcpkg_test_cmake(PACKAGE_NAME JPEG MODULE) diff --git a/ports/libjpeg-turbo/vcpkg-cmake-wrapper.cmake b/ports/libjpeg-turbo/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000..5b0dae6c774 --- /dev/null +++ b/ports/libjpeg-turbo/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,28 @@ +_find_package(${ARGS}) +if(JPEG_FOUND AND NOT TARGET JPEG::JPEG) + # Backfill JPEG::JPEG to versions of cmake before 3.12 + add_library(JPEG::JPEG UNKNOWN IMPORTED) + if(DEFINED JPEG_INCLUDE_DIRS) + set_target_properties(JPEG::JPEG PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${JPEG_INCLUDE_DIRS}") + endif() + if(EXISTS "${JPEG_LIBRARY}") + set_target_properties(JPEG::JPEG PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${JPEG_LIBRARY}") + endif() + if(EXISTS "${JPEG_LIBRARY_RELEASE}") + set_property(TARGET JPEG::JPEG APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(JPEG::JPEG PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION_RELEASE "${JPEG_LIBRARY_RELEASE}") + endif() + if(EXISTS "${JPEG_LIBRARY_DEBUG}") + set_property(TARGET JPEG::JPEG APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(JPEG::JPEG PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C" + IMPORTED_LOCATION_DEBUG "${JPEG_LIBRARY_DEBUG}") + endif() +endif() diff --git a/ports/liblemon/CONTROL b/ports/liblemon/CONTROL new file mode 100644 index 00000000000..704f02d9a48 --- /dev/null +++ b/ports/liblemon/CONTROL @@ -0,0 +1,3 @@ +Source: liblemon +Version: 1.3.1-2 +Description: Library for Efficient Modeling and Optimization in Networks diff --git a/ports/liblemon/cmake.patch b/ports/liblemon/cmake.patch new file mode 100644 index 00000000000..3b08a2d9843 --- /dev/null +++ b/ports/liblemon/cmake.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 03e1cc7..fd9d737 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -280,6 +280,13 @@ ELSEIF(WIN32) + ) + ENDIF() + ++install( ++ EXPORT lemon-targets ++ FILE lemon-config.cmake ++ NAMESPACE lemon:: ++ DESTINATION share/lemon ++) ++ + CONFIGURE_FILE( + ${PROJECT_SOURCE_DIR}/cmake/version.cmake.in + ${PROJECT_BINARY_DIR}/cmake/version.cmake +diff --git a/lemon/CMakeLists.txt b/lemon/CMakeLists.txt +index 4e6567e..76f9cae 100644 +--- a/lemon/CMakeLists.txt ++++ b/lemon/CMakeLists.txt +@@ -71,6 +71,11 @@ INSTALL( + COMPONENT library + ) + ++install(TARGETS lemon EXPORT lemon-targets ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) ++ + INSTALL( + DIRECTORY . bits concepts + DESTINATION include/lemon diff --git a/ports/liblemon/fixup-targets.patch b/ports/liblemon/fixup-targets.patch new file mode 100644 index 00000000000..883e2a6eeb2 --- /dev/null +++ b/ports/liblemon/fixup-targets.patch @@ -0,0 +1,50 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9a7c918..3d6cf35 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -268,7 +268,7 @@ CONFIGURE_FILE( + ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake + @ONLY + ) +-IF(UNIX) ++IF(UNIX OR TRUE) + INSTALL( + FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake + DESTINATION share/lemon/cmake +@@ -282,9 +282,9 @@ ENDIF() + + install( + EXPORT lemon-targets +- FILE lemon-config.cmake +- NAMESPACE lemon:: +- DESTINATION share/lemon ++ FILE lemon-targets.cmake ++ NAMESPACE unofficial::lemon:: ++ DESTINATION share/lemon/cmake + ) + + CONFIGURE_FILE( +diff --git a/cmake/LEMONConfig.cmake.in b/cmake/LEMONConfig.cmake.in +index b0d2d8b..ce54986 100644 +--- a/cmake/LEMONConfig.cmake.in ++++ b/cmake/LEMONConfig.cmake.in +@@ -1,4 +1,4 @@ +-SET(LEMON_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include" CACHE PATH "LEMON include directory") ++SET(LEMON_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../include" CACHE PATH "LEMON include directory") + SET(LEMON_INCLUDE_DIRS "${LEMON_INCLUDE_DIR}") + + IF(UNIX) +@@ -7,7 +7,12 @@ ELSEIF(WIN32) + SET(LEMON_LIB_NAME "lemon.lib") + ENDIF(UNIX) + +-SET(LEMON_LIBRARY "@CMAKE_INSTALL_PREFIX@/lib/${LEMON_LIB_NAME}" CACHE FILEPATH "LEMON library") ++SET(LEMON_LIBRARY ++ optimized "${CMAKE_CURRENT_LIST_DIR}/../../lib/${LEMON_LIB_NAME}" ++ debug "${CMAKE_CURRENT_LIST_DIR}/../../debug/lib/${LEMON_LIB_NAME}" ++ CACHE FILEPATH "LEMON library") + SET(LEMON_LIBRARIES "${LEMON_LIBRARY}") + + MARK_AS_ADVANCED(LEMON_LIBRARY LEMON_INCLUDE_DIR) ++ ++include(${CMAKE_CURRENT_LIST_DIR}/lemon-targets.cmake) diff --git a/ports/liblemon/portfile.cmake b/ports/liblemon/portfile.cmake new file mode 100644 index 00000000000..6cc2c961812 --- /dev/null +++ b/ports/liblemon/portfile.cmake @@ -0,0 +1,46 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("Dynamic linkage not supported. Building static instead.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +set(VERSION 1.3.1) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/lemon-${VERSION}) +vcpkg_download_distfile(ARCHIVE + URLS "http://lemon.cs.elte.hu/pub/sources/lemon-${VERSION}.zip" + FILENAME "lemon-${VERSION}.zip" + SHA512 86d15914b8c3cd206a20c37dbe3b8ca4b553060567a07603db7b6f8dd7dcf9cb043cca31660ff1b7fb77e359b59fac5ca0aab57fd415fda5ecca0f42eade6567 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/cmake.patch + ${CMAKE_CURRENT_LIST_DIR}/fixup-targets.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLEMON_ENABLE_GLPK=OFF + -DLEMON_ENABLE_ILOG=OFF + -DLEMON_ENABLE_COIN=OFF + -DLEMON_ENABLE_SOPLEX=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/lemon/cmake TARGET_PATH share/lemon) + +file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(COPY ${EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/liblemon/) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/liblemon) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblemon RENAME copyright) diff --git a/ports/liblinear/CONTROL b/ports/liblinear/CONTROL index 3e83e601d43..e4e855c529e 100644 --- a/ports/liblinear/CONTROL +++ b/ports/liblinear/CONTROL @@ -1,3 +1,3 @@ Source: liblinear -Version: 2.20 +Version: 221 Description: A Library for Large Linear Classification diff --git a/ports/liblinear/portfile.cmake b/ports/liblinear/portfile.cmake index 4d662d0a5dd..a73fa044b4e 100644 --- a/ports/liblinear/portfile.cmake +++ b/ports/liblinear/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cjlin1/liblinear - REF v220 - SHA512 cde798b7cb221513cf2b8bbe134d6c3dce1ed26c43504d8c09dbed93b82ca47bfd271d4dd3d03384187273906ce140d4ce4418a4a8c21410015ec1631c1042c6 + REF v221 + SHA512 abf21f9030e67886d88a95ad1699e566f8b67bb3bd23253f1f656460911f92a5c3c184fe127390d6100bbf9970cf7a246ef3611b0788907c35a33286228f1753 HEAD_REF master ) diff --git a/ports/liblzma/CMakeLists.txt b/ports/liblzma/CMakeLists.txt index 2c809a5aa72..6b84c004aff 100644 --- a/ports/liblzma/CMakeLists.txt +++ b/ports/liblzma/CMakeLists.txt @@ -12,7 +12,7 @@ if(NOT MSVC) endif() if(WIN32) - include_directories(windows) + include_directories(windows/vs2017) else() include_directories(${CMAKE_CURRENT_BINARY_DIR}) file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/config.h diff --git a/ports/liblzma/CONTROL b/ports/liblzma/CONTROL index c29002b9ce5..20c26f9804c 100644 --- a/ports/liblzma/CONTROL +++ b/ports/liblzma/CONTROL @@ -1,3 +1,3 @@ Source: liblzma -Version: 5.2.3-2 +Version: 5.2.4 Description: Compression library with an API similar to that of zlib. diff --git a/ports/liblzma/enable-uwp-builds.patch b/ports/liblzma/enable-uwp-builds.patch new file mode 100644 index 00000000000..4551ce7b5be --- /dev/null +++ b/ports/liblzma/enable-uwp-builds.patch @@ -0,0 +1,26 @@ +diff --git a/src/common/tuklib_physmem.c b/src/common/tuklib_physmem.c +index 4053ad0..c49db6d 100644 +--- a/src/common/tuklib_physmem.c ++++ b/src/common/tuklib_physmem.c +@@ -79,6 +79,13 @@ tuklib_physmem(void) + uint64_t ret = 0; + + #if defined(_WIN32) || defined(__CYGWIN__) ++#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++ MEMORYSTATUSEX ms; ++ ms.dwLength = sizeof(ms); ++ if(!GlobalMemoryStatusEx(&ms)) ++ return 0; ++ return ms.ullTotalPhys; ++#else + if ((GetVersion() & 0xFF) >= 5) { + // Windows 2000 and later have GlobalMemoryStatusEx() which + // supports reporting values greater than 4 GiB. To keep the +@@ -107,6 +114,7 @@ tuklib_physmem(void) + GlobalMemoryStatus(&meminfo); + ret = meminfo.dwTotalPhys; + } ++#endif + + #elif defined(__OS2__) + unsigned long mem; diff --git a/ports/liblzma/portfile.cmake b/ports/liblzma/portfile.cmake index 81c43a0f8f6..26b8bff783c 100644 --- a/ports/liblzma/portfile.cmake +++ b/ports/liblzma/portfile.cmake @@ -1,17 +1,18 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() - include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xz-mirror/xz - REF v5.2.3 - SHA512 d126666e58c6536aa7ae6aa6aac480f421e25aa61c4b5e7adb3de7b99423275a94d583ceaf0b15d559eaf9bc9be18f381cd46e49b1f8cb238c1d715876731063 + REF v5.2.4 + SHA512 fce7dc65e77a9b89dbdd6192cb37efc39e3f2cf343f79b54d2dfcd845025dab0e1d5b0f59c264eab04e5cbaf914eeb4818d14cdaac3ae0c1c5de24418656a4b7 HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/v5.2.3-b3437cea7b + PATCHES "${CMAKE_CURRENT_LIST_DIR}/enable-uwp-builds.patch" +) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( diff --git a/ports/libmariadb/CONTROL b/ports/libmariadb/CONTROL index b9cfcbbef45..0eff30a4b87 100644 --- a/ports/libmariadb/CONTROL +++ b/ports/libmariadb/CONTROL @@ -1,3 +1,3 @@ Source: libmariadb -Version: 3.0.2 +Version: 3.0.2-1 Description: MariaDB Connector/C is used to connect C/C++ applications to MariaDB and MySQL databases diff --git a/ports/libmariadb/md.patch b/ports/libmariadb/md.patch new file mode 100644 index 00000000000..42199cf9208 --- /dev/null +++ b/ports/libmariadb/md.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ef45ee8..470573e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -110,7 +110,7 @@ IF(NOT IS_SUBPROJECT) + IF(MSVC) + # Speedup system tests + INCLUDE(${CC_SOURCE_DIR}/cmake/WindowsCache.cmake) +- IF (MSVC) ++ IF (MSVC AND 0) + SET(CONFIG_TYPES "DEBUG" "RELEASE" "RELWITHDEBINFO") + FOREACH(BUILD_TYPE ${CONFIG_TYPES}) + FOREACH(COMPILER CXX C) diff --git a/ports/libmariadb/portfile.cmake b/ports/libmariadb/portfile.cmake index 4486564f6cb..95b85269837 100644 --- a/ports/libmariadb/portfile.cmake +++ b/ports/libmariadb/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_from_github( REF v3.0.2 SHA512 a5086ff149b1ca0e1b652013475c5f3793824416a60ec35018b6dcd502bd38b50fa040271ff8d308520dadecc9601671fccf67046fcda2425f1d7c59e1c6c52f HEAD_REF master + PATCHES md.patch ) vcpkg_configure_cmake( @@ -23,33 +24,51 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -# remove debug header -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + # remove debug header + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +endif() + +if(VCPKG_BUILD_TYPE STREQUAL "debug") + # move headers + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/include) +endif() # fix libmariadb lib & dll directory. if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/mariadb/mariadbclient.lib - ${CURRENT_PACKAGES_DIR}/lib/mariadbclient.lib) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/mariadbclient.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/mariadbclient.lib) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/mariadb/mariadbclient.lib + ${CURRENT_PACKAGES_DIR}/lib/mariadbclient.lib) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/mariadbclient.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/mariadbclient.lib) + endif() else() - file(MAKE_DIRECTORY - ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/mariadb/libmariadb.dll - ${CURRENT_PACKAGES_DIR}/bin/libmariadb.dll) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/libmariadb.dll - ${CURRENT_PACKAGES_DIR}/debug/bin/libmariadb.dll) - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/mariadb/libmariadb.lib - ${CURRENT_PACKAGES_DIR}/lib/libmariadb.lib) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/libmariadb.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/libmariadb.lib) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/mariadb/libmariadb.dll + ${CURRENT_PACKAGES_DIR}/bin/libmariadb.dll) + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/mariadb/libmariadb.lib + ${CURRENT_PACKAGES_DIR}/lib/libmariadb.lib) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/libmariadb.dll + ${CURRENT_PACKAGES_DIR}/debug/bin/libmariadb.dll) + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/libmariadb.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/libmariadb.lib) + endif() endif() # remove plugin folder @@ -60,7 +79,6 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb) # copy & remove header files -file(GLOB HEADER_FILES ${CURRENT_PACKAGES_DIR}/include/mariadb/*) file(REMOVE ${CURRENT_PACKAGES_DIR}/include/mariadb/my_config.h.in ${CURRENT_PACKAGES_DIR}/include/mariadb/mysql_version.h.in diff --git a/ports/libmaxminddb/CMakeLists.txt b/ports/libmaxminddb/CMakeLists.txt new file mode 100644 index 00000000000..c46c6319be1 --- /dev/null +++ b/ports/libmaxminddb/CMakeLists.txt @@ -0,0 +1,34 @@ +cmake_minimum_required (VERSION 3.9) +project(maxminddb C) + +set(CMAKE_DEBUG_POSTFIX d) +set(CMAKE_SHARED_LIBRARY_PREFIX lib) +set(CMAKE_STATIC_LIBRARY_PREFIX lib) + +if(MSVC) + add_compile_options(-D_CRT_SECURE_NO_WARNINGS) +endif() + +set(SRCS + src/maxminddb.c + src/data-pool.c +) + +include_directories(. src include projects/VS12) + +add_library(maxminddb ${SRCS}) + +if(WIN32) + target_link_libraries(maxminddb ws2_32) +endif() + +install( + TARGETS maxminddb + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES include/maxminddb.h projects/VS12/maxminddb_config.h DESTINATION include/maxminddb) +endif() diff --git a/ports/libmaxminddb/CONTROL b/ports/libmaxminddb/CONTROL new file mode 100644 index 00000000000..a075cdb5527 --- /dev/null +++ b/ports/libmaxminddb/CONTROL @@ -0,0 +1,3 @@ +Source: libmaxminddb +Version: 1.3.2-1 +Description: C library for the MaxMind DB file format \ No newline at end of file diff --git a/ports/libmaxminddb/portfile.cmake b/ports/libmaxminddb/portfile.cmake new file mode 100644 index 00000000000..f2b17342f9d --- /dev/null +++ b/ports/libmaxminddb/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO maxmind/libmaxminddb + REF 1.3.2 + SHA512 43ff5f4e3a413772cd315412afc1070fb80280405d8845dc9d94a795265a71007c6c182dc01da8e14bf7b8ab8defe05714bec543faa956e7fb0f0a7756e7df48 + 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() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmaxminddb RENAME copyright) diff --git a/ports/libmodbus/CMakeLists.txt b/ports/libmodbus/CMakeLists.txt new file mode 100644 index 00000000000..0abb4b6a7c3 --- /dev/null +++ b/ports/libmodbus/CMakeLists.txt @@ -0,0 +1,113 @@ +cmake_minimum_required(VERSION 3.0) +project(libmodbus VERSION 3.1.4) + +set(LIBMODBUS_VERSION ${PROJECT_VERSION}) +set(LIBMODBUS_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) +set(LIBMODBUS_VERSION_MINOR ${PROJECT_VERSION_MINOR}) +set(LIBMODBUS_VERSION_MICRO ${PROJECT_VERSION_PATCH}) +configure_file(src/modbus-version.h.in ${CMAKE_CURRENT_BINARY_DIR}/modbus-version.h) + +if(WIN32) + set(HAVE_ERRNO_H 1) + set(HAVE_FCNTL_H 1) + set(HAVE_LIMITS_H 1) + set(HAVE_SYS_TYPES_H 1) + set(HAVE_TIME_H 1) + set(HAVE_MALLOC 1) + set(HAVE_MEMSET 1) + set(HAVE_STRERROR 1) +else() + include(CheckIncludeFile) + check_include_file(arpa/inet.h HAVE_ARPA_INET_H) + check_include_file(byteswap.h HAVE_BYTESWAP_H) + check_include_file(errno.h HAVE_ERRNO_H) + check_include_file(fcntl.h HAVE_FCNTL_H) + check_include_file(limits.h HAVE_LIMITS_H) + check_include_file(linux/serial.h HAVE_LINUX_SERIAL_H) + check_include_file(netdb.h HAVE_NETDB_H) + check_include_file(netinet/in.h HAVE_NETINET_IN_H) + check_include_file(netinet/tcp.h HAVE_NETINET_TCP_H) + check_include_file(sys/ioctl.h HAVE_SYS_IOCTL_H) + check_include_file(sys/params.h HAVE_SYS_PARAMS_H) + check_include_file(sys/socket.h HAVE_SYS_SOCKET_H) + check_include_file(sys/time.h HAVE_SYS_TIME_H) + check_include_file(sys/types.h HAVE_SYS_TYPES_H) + check_include_file(termios.h HAVE_TERMIOS_H) + check_include_file(time.h HAVE_TIME_H) + check_include_file(unistd.h HAVE_UNISTD_H) + + include(CheckFunctionExists) + check_function_exists(accept4 HAVE_ACCEPT4) + check_function_exists(fork HAVE_FORK) + check_function_exists(getaddrinfo HAVE_GETADDRINFO) + check_function_exists(gettimeofday HAVE_GETTIMEOFDAY) + check_function_exists(inet_ntoa HAVE_INET_NTOA) + check_function_exists(malloc HAVE_MALLOC) + check_function_exists(memset HAVE_MEMSET) + check_function_exists(select HAVE_SELECT) + check_function_exists(socket HAVE_SOCKET) + check_function_exists(strerror HAVE_STRERROR) + check_function_exists(strlcpy HAVE_STRLCPY) + + include(CheckSymbolExists) + check_symbol_exists(TIOCSRS485 sys/ioctl.h HAVE_TIOCRS485) + check_symbol_exists(TIOCM_RTS sys/ioctl.h HAVE_TIOCM_RTS) +endif() + +configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) + + +if(BUILD_SHARED_LIBS) + add_compile_options(-DDLLBUILD=ON) +endif() + + +set(MODBUS_PUBLIC_HEADERS + src/modbus-rtu.h + src/modbus-tcp.h + src/modbus.h + ${CMAKE_CURRENT_BINARY_DIR}/modbus-version.h +) + +add_library(modbus + src/modbus-data.c + src/modbus-rtu.c + src/modbus-tcp.c +src/modbus.c) + +target_include_directories(modbus PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) +target_include_directories(modbus INTERFACE + $ +) +set_target_properties(modbus PROPERTIES PUBLIC_HEADER "${MODBUS_PUBLIC_HEADERS}") + +if(CMAKE_COMPILER_IS_GNUCC) + target_compile_options(modbus PRIVATE -D_GNU_SOURCE) +endif() + +if(WIN32) + target_link_libraries(modbus wsock32 ws2_32) +endif() + +set(LIBMODBUS_SOVERSION_VERSION 5.1.0) +set(LIBMODBUS_SOVERSION_SOVERSION 5) + + +set_target_properties(modbus PROPERTIES + VERSION ${LIBMODBUS_SOVERSION_VERSION} +SOVERSION ${LIBMODBUS_SOVERSION_SOVERSION}) + + +install( + TARGETS modbus + EXPORT libmodbusConfig + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) +install(EXPORT libmodbusConfig DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) + + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${MODBUS_PUBLIC_HEADERS} DESTINATION include/) +endif() diff --git a/ports/libmodbus/CONTROL b/ports/libmodbus/CONTROL new file mode 100644 index 00000000000..1fd7d47914a --- /dev/null +++ b/ports/libmodbus/CONTROL @@ -0,0 +1,3 @@ +Source: libmodbus +Version: 3.1.4-1 +Description: libmodbus is a free software library to send/receive data with a device which respects the Modbus protocol diff --git a/ports/libmodbus/config.h.cmake b/ports/libmodbus/config.h.cmake new file mode 100644 index 00000000000..b8f7585be71 --- /dev/null +++ b/ports/libmodbus/config.h.cmake @@ -0,0 +1,49 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#cmakedefine HAVE_ARPA_INET_H +#cmakedefine HAVE_BYTESWAP_H +#cmakedefine HAVE_ERRNO_H +#cmakedefine HAVE_FCNTL_H +#cmakedefine HAVE_LIMITS_H +#cmakedefine HAVE_LINUX_SERIAL_H +#cmakedefine HAVE_NETDB_H +#cmakedefine HAVE_NETINET_IN_H +#cmakedefine HAVE_NETINET_TCP_H +#cmakedefine HAVE_SYS_IOCTL_H +#cmakedefine HAVE_SYS_PARAMS_H +#cmakedefine HAVE_SYS_SOCKET_H +#cmakedefine HAVE_SYS_TIME_H +#cmakedefine HAVE_SYS_TYPES_H +#cmakedefine HAVE_TERMIOS_H +#cmakedefine HAVE_TIME_H +#cmakedefine HAVE_UNISTD_H + +#cmakedefine HAVE_ACCEPT4 +#cmakedefine HAVE_FORK +#cmakedefine HAVE_GETADDRINFO +#cmakedefine HAVE_GETTIMEOFDAY +#cmakedefine HAVE_INET_NTOA +#cmakedefine HAVE_MALLOC +#cmakedefine HAVE_MEMSET +#cmakedefine HAVE_SELECT +#cmakedefine HAVE_SOCKET +#cmakedefine HAVE_STRERROR +#cmakedefine HAVE_STRLCPY + +#cmakedefine HAVE_TIOCRS485 +#cmakedefine HAVE_TIOCM_RTS + +#ifdef HAVE_TIOCM_RTS +#define HAVE_DECL_TIOCM_RTS 1 +#else +#define HAVE_DECL_TIOCM_RTS 0 +#endif + +#ifdef HAVE_TIOCRS485 +#define HAVE_DECL_TIOCSRS485 1 +#else +#define HAVE_DECL_TIOCSRS485 0 +#endif + +#endif \ No newline at end of file diff --git a/ports/libmodbus/portfile.cmake b/ports/libmodbus/portfile.cmake new file mode 100644 index 00000000000..8d6f2c0621d --- /dev/null +++ b/ports/libmodbus/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stephane/libmodbus + REF v3.1.4 + SHA512 dc13b680a13ae2c952fe23cfe257a92a2be4823005b71b87e9520a3676df220b749d04c0825b1d1da02ac8b6995315e5cda2c8fd68e4672dd60e0b3fe739728b + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${CMAKE_CURRENT_LIST_DIR}/config.h.cmake DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmodbus RENAME copyright) diff --git a/ports/libmorton/CONTROL b/ports/libmorton/CONTROL new file mode 100644 index 00000000000..8e814fd43cc --- /dev/null +++ b/ports/libmorton/CONTROL @@ -0,0 +1,3 @@ +Source: libmorton +Version: 2018-19-07 +Description: header-only library for encoding/decoding Morton codes in/from 2D/3D coordinates diff --git a/ports/libmorton/portfile.cmake b/ports/libmorton/portfile.cmake new file mode 100644 index 00000000000..396a3608be7 --- /dev/null +++ b/ports/libmorton/portfile.cmake @@ -0,0 +1,15 @@ +#header-only library +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Forceflow/libmorton + REF 797ea736dca49553a56089f143ee6d1effdd318e + SHA512 ee9632f5c873462842d18014d4fd2d461e9fe767659e7426a7dec90fcc06cb974fb064229db5622c38ad0af9509004edea87e0f1d57ad09d8d1d236a5b9579a0 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmorton) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmorton/LICENSE ${CURRENT_PACKAGES_DIR}/share/libmorton/copyright) + +file(GLOB HEADER_FILES ${SOURCE_PATH}/libmorton/include/*.h) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/libmorton) diff --git a/ports/libmysql/CONTROL b/ports/libmysql/CONTROL index 6f856c60756..007718af75a 100644 --- a/ports/libmysql/CONTROL +++ b/ports/libmysql/CONTROL @@ -1,4 +1,4 @@ Source: libmysql -Version: 8.0.4-2 +Version: 8.0.4-3 Build-Depends: boost-algorithm, boost-geometry, boost-optional, boost-functional, boost-graph, openssl, icu, libevent, liblzma, lz4, zlib Description: A MySQL client library for C development. diff --git a/ports/libmysql/portfile.cmake b/ports/libmysql/portfile.cmake index 0e7b69edfc3..dfd38c41c01 100644 --- a/ports/libmysql/portfile.cmake +++ b/ports/libmysql/portfile.cmake @@ -100,13 +100,18 @@ else() ${CURRENT_PACKAGES_DIR}/lib/mysqlclient.lib ${CURRENT_PACKAGES_DIR}/debug/lib/mysqlclient.lib) - # correct the dll directory - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/bin/libmysql.dll) - file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/bin/libmysql.pdb) - file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.dll) - file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.pdb) + # correct the dll directory + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/bin/libmysql.dll) + file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/bin/libmysql.pdb) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.dll) + file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.pdb) + endif() endif() file(READ ${CURRENT_PACKAGES_DIR}/include/mysql/mysql_com.h _contents) diff --git a/ports/libodb-mysql/CONTROL b/ports/libodb-mysql/CONTROL index d51a5a216c5..3a728cb581d 100644 --- a/ports/libodb-mysql/CONTROL +++ b/ports/libodb-mysql/CONTROL @@ -1,4 +1,4 @@ Source: libodb-mysql -Version: 2.4.0-1 +Version: 2.4.0-2 Description: MySQL support for the ODB ORM library Build-Depends: libodb, libmysql \ No newline at end of file diff --git a/ports/libodb-mysql/adapter_mysql_8.0.patch b/ports/libodb-mysql/adapter_mysql_8.0.patch new file mode 100644 index 00000000000..9e2f23745d4 --- /dev/null +++ b/ports/libodb-mysql/adapter_mysql_8.0.patch @@ -0,0 +1,13 @@ +diff --git a/odb/mysql/mysql-types.hxx b/odb/mysql/mysql-types.hxx +index 1254ccd..5396791 100644 +--- a/odb/mysql/mysql-types.hxx ++++ b/odb/mysql/mysql-types.hxx +@@ -7,7 +7,7 @@ + + #include + +-typedef char my_bool; ++typedef bool my_bool; + typedef struct st_mysql_bind MYSQL_BIND; + + #ifdef LIBODB_MYSQL_INCLUDE_SHORT diff --git a/ports/libodb-mysql/portfile.cmake b/ports/libodb-mysql/portfile.cmake index 9bb0d04343d..e6f1e244165 100644 --- a/ports/libodb-mysql/portfile.cmake +++ b/ports/libodb-mysql/portfile.cmake @@ -19,6 +19,12 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/adapter_mysql_8.0.patch +) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql") set(MYSQL_LIB "${CURRENT_INSTALLED_DIR}/lib/libmysql.lib") diff --git a/ports/libodb/CONTROL b/ports/libodb/CONTROL index bb9bbfe29c2..28a9f85f498 100644 --- a/ports/libodb/CONTROL +++ b/ports/libodb/CONTROL @@ -1,3 +1,3 @@ Source: libodb -Version: 2.4.0-2 +Version: 2.4.0-3 Description: ODB library, base runtime for the ODB ORM solution diff --git a/ports/libodb/portfile.cmake b/ports/libodb/portfile.cmake index e45b7b25a9e..01f3265480b 100644 --- a/ports/libodb/portfile.cmake +++ b/ports/libodb/portfile.cmake @@ -43,6 +43,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) else() string(REPLACE "#ifdef LIBODB_STATIC_LIB" "#if 0" LIBODB_HEADER ${LIBODB_HEADER}) endif() -file(WRITE ${LIBODB_HEADER_PATH} ${LIBODB_HEADER}) +file(WRITE ${LIBODB_HEADER_PATH} "${LIBODB_HEADER}") vcpkg_copy_pdbs() diff --git a/ports/libp7-baical/CONTROL b/ports/libp7-baical/CONTROL index 215810511fa..ea1739798d9 100644 --- a/ports/libp7-baical/CONTROL +++ b/ports/libp7-baical/CONTROL @@ -1,3 +1,3 @@ Source: libp7-baical -Version: 4.4-2 +Version: 4.4-3 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 bb9b751f4e7..3edc89c47a6 100644 --- a/ports/libp7-baical/portfile.cmake +++ b/ports/libp7-baical/portfile.cmake @@ -9,7 +9,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") endif() set(LIBP7_VERSION 4.4) -set(LIBP7_HASH ce33db9a0c731e4dff95646703fe5fd96015f1c528377aa5dbe2e533529b0e8c45a4b74ee2b4616a811a7f9038c12edf106b08b3c21cec9cb6bdf85ad6e1d64f) +set(LIBP7_HASH 500fefdf6fb01999ddb2accc8309cf8749fb7a65abb98faaf6d71a5ae3da4eac8c00c083905b01f7f6cc973387b605f2c4db0bb007562f76b7ad43b6abe2b91f) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libP7_v${LIBP7_VERSION}) vcpkg_download_distfile(ARCHIVE diff --git a/ports/libplist/CONTROL b/ports/libplist/CONTROL new file mode 100644 index 00000000000..bb7db384c2c --- /dev/null +++ b/ports/libplist/CONTROL @@ -0,0 +1,3 @@ +Source: libplist +Version: 2.0.1.197-2 +Description: A library to handle Apple Property List format in binary or XML diff --git a/ports/libplist/dllexport.patch b/ports/libplist/dllexport.patch new file mode 100644 index 00000000000..f5e0062104b --- /dev/null +++ b/ports/libplist/dllexport.patch @@ -0,0 +1,37 @@ +diff --git a/include/plist/plist.h b/include/plist/plist.h +index 2863c74..9cdb219 100644 +--- a/include/plist/plist.h ++++ b/include/plist/plist.h +@@ -42,7 +42,7 @@ extern "C" + #include + #endif + +-#ifdef _MSC_VER ++#if defined(_MSC_VER) && defined(LIBPLIST_EXPORTS) + #define PLIST_API_MSC __declspec( dllexport ) + #else + #define PLIST_API_MSC +diff --git a/src/plist.h b/src/plist.h +index 1e5d0d1..6690343 100644 +--- a/src/plist.h ++++ b/src/plist.h +@@ -39,10 +39,7 @@ + #include + #endif + +-#ifdef _MSC_VER +- #define PLIST_API __declspec( dllexport ) +-#else +-#ifdef WIN32 ++#if (defined(_MSC_VER) || defined(WIN32)) && defined(LIBPLIST_EXPORTS) + #define PLIST_API __declspec( dllexport ) + #else + #ifdef HAVE_FVISIBILITY +@@ -51,7 +48,6 @@ + #define PLIST_API + #endif + #endif +-#endif + + struct plist_data_s + { diff --git a/ports/libplist/portfile.cmake b/ports/libplist/portfile.cmake new file mode 100644 index 00000000000..51549e4ca4a --- /dev/null +++ b/ports/libplist/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libimobiledevice-win32/libplist + REF 2.0.1.197 + SHA512 55e1817c61d608b11646eb9c28c445f9ee801c7beb2121bd810235561117262adb73dbecb23b9ef5b0c54b0fc8089e0a46acc0e8f4845329a50a663ab004052c + HEAD_REF msvc-master + PATCHES dllexport.patch +) + +set(ENV{_CL_} "$ENV{_CL_} /GL-") +set(ENV{_LINK_} "$ENV{_LINK_} /LTCG:OFF") + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH libplist.sln + INCLUDES_SUBPATH include + LICENSE_SUBPATH COPYING.lesser + REMOVE_ROOT_INCLUDES +) diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL index 1eec4f2dcbd..e16f6b1c837 100644 --- a/ports/libpng/CONTROL +++ b/ports/libpng/CONTROL @@ -1,4 +1,4 @@ Source: libpng -Version: 1.6.34-3 +Version: 1.6.35-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 0c9f8ab0b75..ef82635af0c 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO glennrp/libpng - REF v1.6.34 - SHA512 23b6112a1d16a34c8037d5c5812944d4385fc96ed819a22172776bdd5acd3a34e55f073b46087b77d1c12cecc68f9e8ba7754c86b5ab6ed3016063e1c795de7a + REF v1.6.35 + SHA512 1b6e2664bd80726e8f6ef7ea4f23d311a883841086a4a60700dfd11621130808c24487c744c8a942219980eb29b244e81965aebfc4ab7f637693f537f4e8e148 HEAD_REF master ) @@ -57,3 +57,7 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/libpng/LICENSE ${CURRENT_PACKAGES_DIR} vcpkg_copy_pdbs() file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/png) +endif() diff --git a/ports/libpng/vcpkg-cmake-wrapper.cmake b/ports/libpng/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000..cb9c74f3240 --- /dev/null +++ b/ports/libpng/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16.a") + set(PNG_LIBRARY_RELEASE "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16.a" CACHE FILEPATH "") +elseif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16${CMAKE_SHARED_LIBRARY_SUFFIX}") + set(PNG_LIBRARY_RELEASE "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE FILEPATH "") +endif() +_find_package(${ARGS}) diff --git a/ports/libpopt/portfile.cmake b/ports/libpopt/portfile.cmake index 404a9349912..ba50135d64c 100644 --- a/ports/libpopt/portfile.cmake +++ b/ports/libpopt/portfile.cmake @@ -5,7 +5,9 @@ set(LIBPOPT_HASH bae2dd4e5d682ef023fdc77ae60c4aad01a3a576d45af9d78d22490c11e410e set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/popt-${LIBPOPT_VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "http://rpm5.org/files/popt/popt-${LIBPOPT_VERSION}.tar.gz" + URLS + "http://rpm5.org/files/popt/popt-${LIBPOPT_VERSION}.tar.gz" + "https://ftp.openbsd.org/pub/OpenBSD/distfiles/popt-${LIBPOPT_VERSION}.tar.gz" FILENAME "popt-${LIBPOPT_VERSION}.tar.gz" SHA512 ${LIBPOPT_HASH} ) diff --git a/ports/libpq/CMakeLists.txt b/ports/libpq/CMakeLists.txt index 57b86e255fc..68da9356c6d 100644 --- a/ports/libpq/CMakeLists.txt +++ b/ports/libpq/CMakeLists.txt @@ -120,6 +120,7 @@ set(pg_libpq_interface ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_ext.h ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config.h src/interfaces/libpq/libpq-fe.h + src/interfaces/libpq/libpq-events.h ) set(pg_libpq_catalog_interface src/include/catalog/pg_type.h @@ -147,4 +148,4 @@ if(INSTALL_INCLUDES) install(FILES ${pg_libpq_interface} DESTINATION include) install(DIRECTORY src/include/libpq DESTINATION include) install(FILES ${pg_libpq_catalog_interface} DESTINATION include/catalog) -endif() \ No newline at end of file +endif() diff --git a/ports/libpq/CONTROL b/ports/libpq/CONTROL index 225d886ded3..2755a2831c7 100644 --- a/ports/libpq/CONTROL +++ b/ports/libpq/CONTROL @@ -1,4 +1,4 @@ Source: libpq -Version: 9.6.1-4 +Version: 9.6.1-5 Description: The official database access API of postgresql Build-Depends: openssl, zlib (linux) diff --git a/ports/libpqxx/CMakeLists.txt b/ports/libpqxx/CMakeLists.txt index c33d8863f6b..1d0473376d6 100644 --- a/ports/libpqxx/CMakeLists.txt +++ b/ports/libpqxx/CMakeLists.txt @@ -1,9 +1,11 @@ cmake_minimum_required(VERSION 3.5) project(libpqxx VERSION 6.0.0 LANGUAGES CXX) -set(CMAKE_DEBUG_POSTFIX "D") -find_library(LIBPQD libpqd) -find_library(LIBPQ libpq) +set(CMAKE_DEBUG_POSTFIX "d") +set(CMAKE_CXX_STANDARD 14) + +find_library(LIBPQD NAMES libpqd pqd) +find_library(LIBPQ NAMES libpq pq) find_path(LIBPQ_FE_H libpq-fe.h) find_path(POSTGRES_EXT_H postgres_ext.h) diff --git a/ports/libpqxx/CONTROL b/ports/libpqxx/CONTROL index 8860ddaf9f7..ce1a688e9f1 100644 --- a/ports/libpqxx/CONTROL +++ b/ports/libpqxx/CONTROL @@ -1,4 +1,4 @@ Source: libpqxx -Version: 6.0.0 +Version: 6.0.0-1 Description: The official C++ client API for PostgreSQL Build-Depends: libpq diff --git a/ports/libraw/CONTROL b/ports/libraw/CONTROL index e49e79f6628..431ba1dc735 100644 --- a/ports/libraw/CONTROL +++ b/ports/libraw/CONTROL @@ -1,4 +1,4 @@ Source: libraw -Version: 0.18.2-5 +Version: 0.19.0-1 Build-Depends: lcms, jasper Description: raw image decoder library diff --git a/ports/libraw/findlibraw_debug_fix.patch b/ports/libraw/findlibraw_debug_fix.patch new file mode 100644 index 00000000000..a09eca5377a --- /dev/null +++ b/ports/libraw/findlibraw_debug_fix.patch @@ -0,0 +1,39 @@ +--- a/cmake/modules/FindLibRaw.cmake 2016-11-02 07:09:50.000000000 +0100 ++++ b/cmake/modules/FindLibRaw.cmake 2018-06-02 02:50:10.501142400 +0200 +@@ -31,18 +31,34 @@ + PATH_SUFFIXES libraw + ) + +-FIND_LIBRARY(LibRaw_LIBRARIES NAMES raw ++FIND_LIBRARY(LibRaw_LIBRARY_RELEASE NAMES raw + HINTS + ${PC_LIBRAW_LIBDIR} + ${PC_LIBRAW_LIBRARY_DIRS} + ) + +-FIND_LIBRARY(LibRaw_r_LIBRARIES NAMES raw_r ++FIND_LIBRARY(LibRaw_LIBRARY_DEBUG NAMES rawd ++ HINTS ++ ${PC_LIBRAW_LIBDIR} ++ ${PC_LIBRAW_LIBRARY_DIRS} ++ ) ++ ++select_library_configurations(LibRaw) ++ ++FIND_LIBRARY(LibRaw_r_LIBRARY_RELEASE NAMES raw_r + HINTS + ${PC_LIBRAW_R_LIBDIR} + ${PC_LIBRAW_R_LIBRARY_DIRS} + ) + ++FIND_LIBRARY(LibRaw_r_LIBRARY_DEBUG NAMES raw_rd ++ HINTS ++ ${PC_LIBRAW_R_LIBDIR} ++ ${PC_LIBRAW_R_LIBRARY_DIRS} ++ ) ++ ++select_library_configurations(LibRaw_r) ++ + IF(LibRaw_INCLUDE_DIR) + FILE(READ ${LibRaw_INCLUDE_DIR}/libraw_version.h _libraw_version_content) + diff --git a/ports/libraw/lcms2_debug_fix.patch b/ports/libraw/lcms2_debug_fix.patch new file mode 100644 index 00000000000..b0d48edcae9 --- /dev/null +++ b/ports/libraw/lcms2_debug_fix.patch @@ -0,0 +1,66 @@ +--- a/cmake/modules/FindLCMS2.cmake 2016-11-02 07:09:50.000000000 +0100 ++++ b/cmake/modules/FindLCMS2.cmake 2018-06-02 00:43:27.309100600 +0200 +@@ -13,7 +13,6 @@ + # Redistribution and use is allowed according to the terms of the BSD license. + # For details see the accompanying LICENSE file. + +- + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + if(NOT WIN32) +@@ -29,18 +28,30 @@ + PATH_SUFFIXES lcms2 liblcms2 + ) + +-find_library(LCMS2_LIBRARIES NAMES lcms2 liblcms2 lcms-2 liblcms-2 ++include(SelectLibraryConfigurations) ++ ++find_library(LCMS2_LIBRARY_RELEASE NAMES lcms2 liblcms2 lcms-2 liblcms-2 ++ PATHS ++ ${PC_LCMS2_LIBDIR} ++ ${PC_LCMS2_LIBRARY_DIRS} ++ PATH_SUFFIXES lcms2 ++) ++ ++find_library(LCMS2_LIBRARY_DEBUG NAMES lcms2d liblcms2d lcms-2d liblcms-2d + PATHS + ${PC_LCMS2_LIBDIR} + ${PC_LCMS2_LIBRARY_DIRS} + PATH_SUFFIXES lcms2 + ) + +-if(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES) ++select_library_configurations(LCMS2) ++ ++ ++if(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARY) + set(LCMS2_FOUND TRUE) +-else(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES) ++else(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARY) + set(LCMS2_FOUND FALSE) +-endif(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES) ++endif(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARY) + + if(LCMS2_FOUND) + file(READ ${LCMS2_INCLUDE_DIR}/lcms2.h LCMS2_VERSION_CONTENT) +@@ -50,11 +61,11 @@ + if(NOT LCMS2_FIND_QUIETLY) + string(SUBSTRING ${LCMS2_VERSION} 0 1 LCMS2_MAJOR_VERSION) + string(SUBSTRING ${LCMS2_VERSION} 1 2 LCMS2_MINOR_VERSION) +- message(STATUS "Found lcms version ${LCMS2_MAJOR_VERSION}.${LCMS2_MINOR_VERSION}, ${LCMS2_LIBRARIES}") ++ message(STATUS "Found lcms version ${LCMS2_MAJOR_VERSION}.${LCMS2_MINOR_VERSION}, ${LCMS2_LIBRARY}") + endif(NOT LCMS2_FIND_QUIETLY) + else(LCMS2_VERSION_MATCH) + if(NOT LCMS2_FIND_QUIETLY) +- message(STATUS "Found lcms2 but failed to find version ${LCMS2_LIBRARIES}") ++ message(STATUS "Found lcms2 but failed to find version ${LCMS2_LIBRARY}") + endif(NOT LCMS2_FIND_QUIETLY) + set(LCMS2_VERSION NOTFOUND) + endif(LCMS2_VERSION_MATCH) +@@ -68,5 +79,5 @@ + endif(NOT LCMS2_FIND_QUIETLY) + endif(LCMS2_FOUND) + +-mark_as_advanced(LCMS2_INCLUDE_DIR LCMS2_LIBRARIES LCMS2_VERSION) ++mark_as_advanced(LCMS2_INCLUDE_DIR LCMS2_LIBRARY LCMS2_VERSION) + diff --git a/ports/libraw/portfile.cmake b/ports/libraw/portfile.cmake index ee3c1ae2601..7badade256d 100644 --- a/ports/libraw/portfile.cmake +++ b/ports/libraw/portfile.cmake @@ -1,11 +1,13 @@ include(vcpkg_common_functions) -set(LIBRAW_VERSION 0.18.2) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/LibRaw-${LIBRAW_VERSION}) -vcpkg_download_distfile(ARCHIVE - URLS "http://www.libraw.org/data/LibRaw-${LIBRAW_VERSION}.zip" - FILENAME "LibRaw-${LIBRAW_VERSION}.zip" - SHA512 e557dc47e8c2f79cdb55fafe7e668b823ecd7afe2537c8b7cd6e3f299110efa4ba1696ce8aa01bdba06a5570eec53a4a04f1af32974f98a1521ab5cd174effd3 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO LibRaw/LibRaw + REF 0.19.0 + SHA512 4fbcce6567463cff1784d0ab9e908906acf79ad3d5af3d52d231f99941b3c3e5daf9049ce2d32a56ba7ec523138ad0c1ff8b61d38fe33abcf1aa6deafd4927f2 + HEAD_REF master ) + set(LIBRAW_CMAKE_COMMIT "a71f3b83ee3dccd7be32f9a2f410df4d9bdbde0a") set(LIBRAW_CMAKE_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/LibRaw-cmake-${LIBRAW_CMAKE_COMMIT}) vcpkg_download_distfile(CMAKE_BUILD_ARCHIVE @@ -14,13 +16,19 @@ vcpkg_download_distfile(CMAKE_BUILD_ARCHIVE SHA512 54216e6760e2339dc3bf4b4be533a13160047cabfc033a06da31f2226c43fc93eaea9672af83589e346ce9231c1a57910ac5e800759e692fe2cd9d53b7fba0c6 ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_extract_source_archive(${CMAKE_BUILD_ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src) # Copy the CMake build system from the external repo file(COPY ${LIBRAW_CMAKE_SOURCE_PATH}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${LIBRAW_CMAKE_SOURCE_PATH}/cmake DESTINATION ${SOURCE_PATH}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/findlibraw_debug_fix.patch + ${CMAKE_CURRENT_LIST_DIR}/lcms2_debug_fix.patch +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -39,24 +47,31 @@ else() 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/rawd.lib) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/raw_r.lib ${CURRENT_PACKAGES_DIR}/lib/raw.lib) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/raw_rd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/rawd.lib) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + # 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/rawd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/raw_r.lib ${CURRENT_PACKAGES_DIR}/lib/raw.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/raw_rd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/rawd.lib) + + # Cleanup + file(GLOB RELEASE_EXECUTABLES ${CURRENT_PACKAGES_DIR}/bin/*.exe) + file(REMOVE ${RELEASE_EXECUTABLES}) + file(GLOB DEBUG_EXECUTABLES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${DEBUG_EXECUTABLES}) +endif() -# Cleanup -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(GLOB RELEASE_EXECUTABLES ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(REMOVE ${RELEASE_EXECUTABLES}) -file(GLOB DEBUG_EXECUTABLES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -file(REMOVE ${DEBUG_EXECUTABLES}) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/raw.dll ${CURRENT_PACKAGES_DIR}/debug/bin/rawd.dll) + if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/raw.dll ${CURRENT_PACKAGES_DIR}/debug/bin/rawd.dll) + endif() endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + # Rename cmake module into a config in order to allow more flexible lookup rules file(RENAME ${CURRENT_PACKAGES_DIR}/share/libraw/FindLibRaw.cmake ${CURRENT_PACKAGES_DIR}/share/libraw/LibRaw-config.cmake) @@ -64,4 +79,4 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/libraw/FindLibRaw.cmake ${CURRENT_PACK file(COPY ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/libraw) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libraw/COPYRIGHT ${CURRENT_PACKAGES_DIR}/share/libraw/copyright) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/libsndfile/CONTROL b/ports/libsndfile/CONTROL index f870d97afb8..d448f694ce2 100644 --- a/ports/libsndfile/CONTROL +++ b/ports/libsndfile/CONTROL @@ -1,4 +1,8 @@ Source: libsndfile -Version: 1.0.29-6830c42-3 +Version: 1.0.29-6830c42-5 Description: Library to read, write and manipulate many soundfile types. Authored by Eric de Castro Lopo +Default-Features: external-libs + +Feature: external-libs +Description: Support OGG and FLAC audio files Build-Depends: libogg, libflac, libvorbis diff --git a/ports/libsndfile/portfile.cmake b/ports/libsndfile/portfile.cmake index e217a967179..1ba590fd7e8 100644 --- a/ports/libsndfile/portfile.cmake +++ b/ports/libsndfile/portfile.cmake @@ -6,35 +6,26 @@ vcpkg_from_github( REF 6830c421899e32f8d413a903a21a9b6cf384d369 SHA512 b13c5d7bc27218eff8a8c4ce89a964b4920b1d3946e4843e60be965d77ec205845750a82bf654a7c2c772bf3a24f6ff5706881b24ff12115f2525c8134b6d0b9 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile-getfilesize.patch" "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile-getfilesize-addendum.patch" ) -if (VCPKG_CRT_LINKAGE STREQUAL "dynamic") - set(CRT_LIB_STATIC 0) -elseif (VCPKG_CRT_LINKAGE STREQUAL "static") - set(CRT_LIB_STATIC 1) -endif() - -if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") - set(BUILD_STATIC 1) - set(BUILD_DYNAMIC 0) -elseif (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(BUILD_STATIC 0) - set(BUILD_DYNAMIC 1) -endif() +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" CRT_LIB_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) option(BUILD_EXECUTABLES "Build sndfile tools and install to folder tools" OFF) +if("external-libs" IN_LIST FEATURES) + set(SNDFILE_WITHOUT_EXTERNAL_LIBS OFF) +else() + set(SNDFILE_WITHOUT_EXTERNAL_LIBS ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DBUILD_EXAMPLES=0 -DBUILD_REGTEST=0 -DBUILD_TESTING=0 -DENABLE_STATIC_RUNTIME=${CRT_LIB_STATIC} -DBUILD_STATIC_LIBS=${BUILD_STATIC} + OPTIONS -DBUILD_EXAMPLES=0 -DBUILD_REGTEST=0 -DBUILD_TESTING=0 -DENABLE_STATIC_RUNTIME=${CRT_LIB_STATIC} -DBUILD_STATIC_LIBS=${BUILD_STATIC} -DDISABLE_EXTERNAL_LIBS=${SNDFILE_WITHOUT_EXTERNAL_LIBS} OPTIONS_RELEASE -DBUILD_PROGRAMS=${BUILD_EXECUTABLES} # Setting ENABLE_PACKAGE_CONFIG=0 has no effect OPTIONS_DEBUG -DBUILD_PROGRAMS=0 diff --git a/ports/libspatialite/portfile.cmake b/ports/libspatialite/portfile.cmake index 1c5cfed1915..59a1499f4c9 100644 --- a/ports/libspatialite/portfile.cmake +++ b/ports/libspatialite/portfile.cmake @@ -24,14 +24,14 @@ if(VCPKG_CRT_LINKAGE STREQUAL dynamic) set(CL_FLAGS_DBG "/MDd /Zi") set(CL_FLAGS_REL "/MD /Ox") set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib") - set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_c.lib") + set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib") set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib") set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib") else() set(CL_FLAGS_DBG "/MTd /Zi") set(CL_FLAGS_REL "/MT /Ox") set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libgeos_c.lib ${CURRENT_INSTALLED_DIR}/lib/libgeos.lib") - set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libgeos_c.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libgeos.lib") + set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libgeos_cd.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libgeosd.lib") set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/lib/lzma.lib ws2_32.lib") set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/debug/lib/lzma.lib ws2_32.lib") endif() diff --git a/ports/libssh/CONTROL b/ports/libssh/CONTROL index 5f3c8a0dbff..aff3dbdf19e 100644 --- a/ports/libssh/CONTROL +++ b/ports/libssh/CONTROL @@ -1,4 +1,4 @@ Source: libssh -Version: 0.7.5-4 +Version: 0.7.6 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/libssh/missing-includes.patch b/ports/libssh/missing-includes.patch new file mode 100644 index 00000000000..f12d0474408 --- /dev/null +++ b/ports/libssh/missing-includes.patch @@ -0,0 +1,13 @@ +diff --git a/include/libssh/priv.h b/include/libssh/priv.h +index 4cf6d75..13993ea 100644 +--- a/include/libssh/priv.h ++++ b/include/libssh/priv.h +@@ -30,6 +30,8 @@ + #define _LIBSSH_PRIV_H + + #include "config.h" ++#include ++#include + + #if !defined(HAVE_STRTOULL) + # if defined(HAVE___STRTOULL) diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake index 49c927c2247..89d2af1fdf8 100644 --- a/ports/libssh/portfile.cmake +++ b/ports/libssh/portfile.cmake @@ -3,19 +3,29 @@ include(vcpkg_common_functions) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) message(FATAL_ERROR "WindowsStore not supported") endif() -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libssh-0.7.5) -vcpkg_download_distfile(ARCHIVE - URLS "https://red.libssh.org/attachments/download/218/libssh-0.7.5.tar.xz" - FILENAME "libssh-0.7.5.tar.xz" - SHA512 6c7f539899caaedf13d66fa2e0fac1a475ecdfe389131abcbdf908bdebc50a0b9e6b0d43e67e52aea85c32f6aa68e46ca2f50695992f82ded83489f445a8e775 -) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} +set(VERSION 0.7.6) +vcpkg_download_distfile(ARCHIVE + URLS "https://www.libssh.org/files/0.7/libssh-${VERSION}.tar.xz" + FILENAME "libssh-${VERSION}.tar.xz" + SHA512 2a01402b5a9fab9ecc29200544ed45d3f2c40871ed1c8241ca793f8dc7fdb3ad2150f6a522c4321affa9b8778e280dc7ed10f76adfc4a73f0751ae735a42f56c +) + +vcpkg_download_distfile(WINPATCH + URLS "https://bugs.libssh.org/rLIBSSHf81ca6161223e3566ce78a427571235fb6848fe9?diff=1" + FILENAME "libssh-f81ca616.patch" + SHA512 f3f6088f8f1bf8fe6226c1aa7b355d877be7f2aa9482c5e3de74b6a35fc5b28d8f89221d3afa5a5d3a5900519a86e5906516667ed22ad98f058616a8120999cd +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/build-one-flavor.patch - ${CMAKE_CURRENT_LIST_DIR}/only-one-flavor-threads.patch + build-one-flavor.patch + only-one-flavor-threads.patch + "${WINPATCH}" + missing-includes.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" WITH_STATIC_LIB) diff --git a/ports/libssh2/CONTROL b/ports/libssh2/CONTROL index d050bf8383a..4a95c72b620 100644 --- a/ports/libssh2/CONTROL +++ b/ports/libssh2/CONTROL @@ -1,4 +1,4 @@ Source: libssh2 -Version: 1.8.0-3 +Version: 1.8.0-4 Build-Depends: zlib, openssl Description: The SSH library diff --git a/ports/libssh2/portfile.cmake b/ports/libssh2/portfile.cmake index 9e5e5c025f1..e080cf81ea1 100644 --- a/ports/libssh2/portfile.cmake +++ b/ports/libssh2/portfile.cmake @@ -1,16 +1,14 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libssh2-1.8.0) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://www.libssh2.org/download/libssh2-1.8.0.tar.gz" - FILENAME "libssh2-1.8.0.tar.gz" - SHA512 289aa45c4f99653bebf5f99565fe9c519abc204feb2084b47b7cc3badc8bf4ecdedd49ea6acdce8eb902b3c00995d5f92a3ca77b2508b92f04ae0e7de7287558 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-UWP.patch +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libssh2/libssh2 + REF libssh2-1.8.0 + SHA512 c157db0628126d6348ed52a698fbdd7e20b54b6115123bd7d238f02fda5c68ca7a1585aed8a2376df0840f4a3823743133996192001ae54864ab53c954b938e7 + HEAD_REF master + PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Fix-UWP.patch" ) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS @@ -33,4 +31,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libssh2) file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh2 RENAME copyright) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/libtins/CONTROL b/ports/libtins/CONTROL new file mode 100644 index 00000000000..e2a7f43a2de --- /dev/null +++ b/ports/libtins/CONTROL @@ -0,0 +1,4 @@ +Source: libtins +Version: 4.0-2 +Description: High-level, multiplatform C++ network packet sniffing and crafting library +Build-Depends: winpcap (windows) diff --git a/ports/libtins/portfile.cmake b/ports/libtins/portfile.cmake new file mode 100644 index 00000000000..6890fe64cac --- /dev/null +++ b/ports/libtins/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mfontanini/libtins + REF v4.0 + SHA512 8a497617ca68f4bad331452778b92c51ce87e42d1ceae493ecd6799cabbe71609214ca962c4a8c83d205f76277f2a82f92d3d17341984caa1592cf237eb3cf3b + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBTINS_BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLIBTINS_BUILD_SHARED=${LIBTINS_BUILD_SHARED} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH CMake TARGET_PATH share/libtins) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/libtins/copyright COPYONLY) + +# Post-build test for cmake libraries +vcpkg_test_cmake(PACKAGE_NAME libtins) diff --git a/ports/libui/CONTROL b/ports/libui/CONTROL new file mode 100644 index 00000000000..d1a70f0d52d --- /dev/null +++ b/ports/libui/CONTROL @@ -0,0 +1,3 @@ +Source: libui +Version: 2018-11-03 +Description: Simple and portable (but not inflexible) native GUI library in C. diff --git a/ports/libui/fix-cmake.patch b/ports/libui/fix-cmake.patch new file mode 100644 index 00000000000..3d206584bb6 --- /dev/null +++ b/ports/libui/fix-cmake.patch @@ -0,0 +1,46 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c7193fbb..50c997f8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -152,8 +152,7 @@ add_subdirectory("common") + add_subdirectory("${_OSNAME}") + add_library(libui ${_LIBUI_SOURCES}) + target_include_directories(libui +- PUBLIC . +- PRIVATE ${_LIBUI_INCLUEDIRS}) ++ PUBLIC $) + target_compile_definitions(libui + PRIVATE ${_LIBUI_DEFS}) + # cmake produces this for us by default but only for shared libraries +@@ -229,10 +228,30 @@ macro(_add_exec _name) + # TODOfor some reason these don't propagate + if(NOT WIN32) + target_include_directories(${_name} +- PUBLIC .) ++ PUBLIC $) + target_compile_options(${_name} + PUBLIC ${_COMMON_CFLAGS}) + endif() + endmacro() + add_subdirectory("test") + add_subdirectory("examples") ++ ++if(BUILD_SHARED_LIBS) ++ install(TARGETS ${PROJECT_NAME} ++ EXPORT ${PROJECT_NAME}-config ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++else() ++ install(TARGETS ${PROJECT_NAME} ++ EXPORT ${PROJECT_NAME}-config ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++endif() ++ ++install(EXPORT ${PROJECT_NAME}-config ++ FILE unofficial-${PROJECT_NAME}-config.cmake ++ NAMESPACE unofficial::libui:: ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++) ++ ++install(FILES ui.h DESTINATION include) diff --git a/ports/libui/portfile.cmake b/ports/libui/portfile.cmake new file mode 100644 index 00000000000..4f543a89b58 --- /dev/null +++ b/ports/libui/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO andlabs/libui + REF 7138276ccfbde94873cb6e2db65642adcbd2ee19 + SHA512 3a9fb27d0c376479f58ba2fc5be3579efa5f462776a7e725313b92413ce78f3ca60897e63b580c419eeaee2cd2101de2be1ee5af80a547ef433c6284a3053d45 + HEAD_REF master + PATCHES + fix-cmake.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libui TARGET_PATH share/unofficial-libui) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/libui/copyright COPYONLY) + +vcpkg_copy_pdbs() diff --git a/ports/libusb/CONTROL b/ports/libusb/CONTROL index 722cf9090de..02adfafe04f 100644 --- a/ports/libusb/CONTROL +++ b/ports/libusb/CONTROL @@ -1,3 +1,3 @@ Source: libusb -Version: 1.0.21-fc99620 +Version: 1.0.22-1 Description: a cross-platform library to access USB devices diff --git a/ports/libusb/libfreenect2.patch b/ports/libusb/libfreenect2.patch deleted file mode 100644 index 2c2b859b010..00000000000 --- a/ports/libusb/libfreenect2.patch +++ /dev/null @@ -1,268 +0,0 @@ -diff --git a/libusb/os/windows_winusb.c b/libusb/os/windows_winusb.c -index 93668f3..7fdafd6 100644 ---- a/libusb/os/windows_winusb.c -+++ b/libusb/os/windows_winusb.c -@@ -66,6 +66,7 @@ static int winusbx_claim_interface(int sub_api, struct libusb_device_handle *dev - static int winusbx_release_interface(int sub_api, struct libusb_device_handle *dev_handle, int iface); - static int winusbx_submit_control_transfer(int sub_api, struct usbi_transfer *itransfer); - static int winusbx_set_interface_altsetting(int sub_api, struct libusb_device_handle *dev_handle, int iface, int altsetting); -+static int winusbx_submit_iso_transfer(int sub_api, struct usbi_transfer *itransfer); - static int winusbx_submit_bulk_transfer(int sub_api, struct usbi_transfer *itransfer); - static int winusbx_clear_halt(int sub_api, struct libusb_device_handle *dev_handle, unsigned char endpoint); - static int winusbx_abort_transfers(int sub_api, struct usbi_transfer *itransfer); -@@ -1901,6 +1902,10 @@ void windows_clear_transfer_priv(struct usbi_transfer *itransfer) - - usbi_free_fd(&transfer_priv->pollable_fd); - safe_free(transfer_priv->hid_buffer); -+ -+ //TODO this should occur during windows_free_transfer instead -+ safe_free(transfer_priv->iso_context); -+ - // When auto claim is in use, attempt to release the auto-claimed interface - auto_release(itransfer); - } -@@ -2274,7 +2279,7 @@ const struct windows_usb_api_backend usb_api_backend[USB_API_MAX] = { - winusbx_clear_halt, - winusbx_reset_device, - winusbx_submit_bulk_transfer, -- unsupported_submit_iso_transfer, -+ winusbx_submit_iso_transfer, - winusbx_submit_control_transfer, - winusbx_abort_control, - winusbx_abort_transfers, -@@ -2374,6 +2379,8 @@ static int winusbx_init(int sub_api, struct libusb_context *ctx) - WinUSBX_Set(SetPipePolicy); - WinUSBX_Set(SetPowerPolicy); - WinUSBX_Set(WritePipe); -+ WinUSBX_Set(IsoReadPipe); -+ WinUSBX_Set(IsoWritePipe); - if (!native_winusb) - WinUSBX_Set(ResetDevice); - -@@ -2803,6 +2810,100 @@ static int winusbx_set_interface_altsetting(int sub_api, struct libusb_device_ha - return LIBUSB_SUCCESS; - } - -+static int winusbx_submit_iso_transfer(int sub_api, struct usbi_transfer *itransfer) -+{ -+ struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); -+ struct libusb_context *ctx = DEVICE_CTX(transfer->dev_handle->dev); -+ struct windows_transfer_priv *transfer_priv = (struct windows_transfer_priv*)usbi_transfer_get_os_priv(itransfer); -+ struct windows_device_handle_priv *handle_priv = _device_handle_priv(transfer->dev_handle); -+ struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev); -+ HANDLE winusb_handle; -+ bool ret; -+ int current_interface; -+ struct winfd wfd; -+ int i; -+ uint16_t maxPacketSize; -+ uint32_t offset; -+ size_t ctx_size; -+ -+ CHECK_WINUSBX_AVAILABLE(sub_api); -+ -+ if (sub_api != SUB_API_LIBUSBK && sub_api != SUB_API_LIBUSB0) -+ { -+ //iso only supported on libusbk-based backends -+ return unsupported_submit_iso_transfer(sub_api, itransfer); -+ }; -+ -+ transfer_priv->pollable_fd = INVALID_WINFD; -+ -+ current_interface = interface_by_endpoint(priv, handle_priv, transfer->endpoint); -+ if (current_interface < 0) { -+ usbi_err(ctx, "unable to match endpoint to an open interface - cancelling transfer"); -+ return LIBUSB_ERROR_NOT_FOUND; -+ } -+ -+ usbi_dbg("matched endpoint %02X with interface %d", transfer->endpoint, current_interface); -+ -+ winusb_handle = handle_priv->interface_handle[current_interface].api_handle; -+ -+ wfd = usbi_create_fd(winusb_handle, IS_XFERIN(transfer) ? RW_READ : RW_WRITE, NULL, NULL); -+ // Always use the handle returned from usbi_create_fd (wfd.handle) -+ if (wfd.fd < 0) { -+ return LIBUSB_ERROR_NO_MEM; -+ } -+ -+ ctx_size = sizeof(KISO_CONTEXT)+sizeof(KISO_PACKET)* transfer->num_iso_packets; -+ //Init the libusbk iso_context -+ if (!transfer_priv->iso_context) -+ { -+ transfer_priv->iso_context = (PKISO_CONTEXT)malloc(ctx_size); -+ if (!transfer_priv->iso_context) -+ { -+ //TODO does this return leak mem, or does the transfer get cleaned up? -+ return LIBUSB_ERROR_NO_MEM; -+ } -+ } -+ memset(transfer_priv->iso_context, 0, ctx_size); -+ -+ //start ASAP -+ transfer_priv->iso_context->StartFrame = 0; -+ transfer_priv->iso_context->NumberOfPackets = transfer->num_iso_packets; -+ -+ /* convert the transfer packet lengths to iso_packet offsets */ -+ offset = 0; -+ for (i = 0; i < transfer->num_iso_packets; i++) -+ { -+ transfer_priv->iso_context->IsoPackets[i].offset = offset; -+ offset += transfer->iso_packet_desc[i].length; -+ } -+ -+ if (IS_XFERIN(transfer)) { -+ usbi_dbg("reading %d iso packets", transfer->num_iso_packets); -+ ret = WinUSBX[sub_api].IsoReadPipe(wfd.handle, transfer->endpoint, transfer->buffer, transfer->length, wfd.overlapped, transfer_priv->iso_context); -+ } -+ else { -+ usbi_dbg("writing %d iso packets", transfer->num_iso_packets); -+ ret = WinUSBX[sub_api].IsoWritePipe(wfd.handle, transfer->endpoint, transfer->buffer, transfer->length, wfd.overlapped, transfer_priv->iso_context); -+ } -+ -+ if (!ret) { -+ if (GetLastError() != ERROR_IO_PENDING) { -+ usbi_err(ctx, "IsoReadPipe/IsoWritePipe failed: %s", windows_error_str(0)); -+ usbi_free_fd(&wfd); -+ return LIBUSB_ERROR_IO; -+ } -+ } -+ else { -+ wfd.overlapped->Internal = STATUS_COMPLETED_SYNCHRONOUSLY; -+ wfd.overlapped->InternalHigh = (DWORD)transfer->length; -+ } -+ -+ transfer_priv->pollable_fd = wfd; -+ transfer_priv->interface_number = (uint8_t)current_interface; -+ -+ return LIBUSB_SUCCESS; -+} -+ - static int winusbx_submit_bulk_transfer(int sub_api, struct usbi_transfer *itransfer) - { - struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); -@@ -2989,7 +3090,36 @@ static int winusbx_reset_device(int sub_api, struct libusb_device_handle *dev_ha - - static int winusbx_copy_transfer_data(int sub_api, struct usbi_transfer *itransfer, uint32_t io_size) - { -+ struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); -+ struct windows_transfer_priv *transfer_priv = (struct windows_transfer_priv*)usbi_transfer_get_os_priv(itransfer); -+ struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev); -+ int i; -+ -+ CHECK_WINUSBX_AVAILABLE(sub_api); -+ -+ if (transfer->type == LIBUSB_TRANSFER_TYPE_ISOCHRONOUS) -+ { -+ //for isochronous, need to copy the individual iso packet actual_lengths and statuses -+ if (sub_api == SUB_API_LIBUSBK || sub_api == SUB_API_LIBUSB0) -+ { -+ //iso only supported on libusbk-based backends for now -+ -+ for (i = 0; i < transfer->num_iso_packets; i++) -+ { -+ transfer->iso_packet_desc[i].actual_length = transfer_priv->iso_context->IsoPackets[i].actual_length; -+ //TODO translate USDB_STATUS codes http://msdn.microsoft.com/en-us/library/ff539136(VS.85).aspx to libusb_transfer_status -+ //transfer->iso_packet_desc[i].status = transfer_priv->iso_context->IsoPackets[i].status; -+ } -+ } -+ else -+ { -+ //This should only occur if backend is not set correctly or other backend isoc is partially implemented -+ return unsupported_copy_transfer_data(sub_api, itransfer, io_size); -+ } -+ } -+ - itransfer->transferred += io_size; -+ - return LIBUSB_TRANSFER_COMPLETED; - } - -diff --git a/libusb/os/windows_winusb.h b/libusb/os/windows_winusb.h -index 89ebc24..28a7e4f 100644 ---- a/libusb/os/windows_winusb.h -+++ b/libusb/os/windows_winusb.h -@@ -154,6 +154,42 @@ struct libusb_hid_descriptor { - #define LIBUSB_REQ_IN(request_type) ((request_type) & LIBUSB_ENDPOINT_IN) - #define LIBUSB_REQ_OUT(request_type) (!LIBUSB_REQ_IN(request_type)) - -+ -+/* start libusbk_shared.h definitions, must match libusbk_shared.h for isochronous support */ -+ -+//KISO_PACKET is equivalent of libusb_iso_packet_descriptor except uses absolute "offset" field instead of sequential Lengths -+typedef struct _KISO_PACKET -+{ -+ UINT offset; -+ USHORT actual_length; //changed from libusbk_shared.h "Length" for clarity -+ USHORT status; -+ -+} KISO_PACKET; -+ -+typedef KISO_PACKET* PKISO_PACKET; -+ -+typedef enum _KISO_FLAG -+{ -+ KISO_FLAG_NONE = 0, -+ KISO_FLAG_SET_START_FRAME = 0x00000001, -+} KISO_FLAG; -+ -+//KISO_CONTEXT is the conceptual equivalent of libusb_transfer except is isochronous-specific and must match libusbk's version -+typedef struct _KISO_CONTEXT -+{ -+ KISO_FLAG Flags; -+ UINT StartFrame; -+ SHORT ErrorCount; -+ SHORT NumberOfPackets; -+ UINT UrbHdrStatus; -+ KISO_PACKET IsoPackets[0]; -+ -+} KISO_CONTEXT; -+ -+typedef KISO_CONTEXT* PKISO_CONTEXT; -+ -+/* end libusbk_shared.h definitions */ -+ - // The following are used for HID reports IOCTLs - #define HID_CTL_CODE(id) \ - CTL_CODE (FILE_DEVICE_KEYBOARD, (id), METHOD_NEITHER, FILE_ANY_ACCESS) -@@ -280,6 +316,8 @@ struct windows_transfer_priv { - uint8_t *hid_buffer; // 1 byte extended data buffer, required for HID - uint8_t *hid_dest; // transfer buffer destination, required for HID - size_t hid_expected_size; -+ /* Isoc */ -+ PKISO_CONTEXT iso_context; - }; - - // used to match a device driver (including filter drivers) against a supported API -@@ -623,6 +661,23 @@ typedef BOOL (WINAPI *WinUsb_ResetDevice_t)( - WINUSB_INTERFACE_HANDLE InterfaceHandle - ); - -+typedef BOOL(WINAPI *WinUsb_IsoReadPipe_t)( -+ WINUSB_INTERFACE_HANDLE InterfaceHandle, -+ UCHAR PipeID, -+ PUCHAR Buffer, -+ ULONG BufferLength, -+ LPOVERLAPPED Overlapped, -+ PKISO_CONTEXT IsoContext -+ ); -+typedef BOOL(WINAPI *WinUsb_IsoWritePipe_t)( -+ WINUSB_INTERFACE_HANDLE InterfaceHandle, -+ UCHAR PipeID, -+ PUCHAR Buffer, -+ ULONG BufferLength, -+ LPOVERLAPPED Overlapped, -+ PKISO_CONTEXT IsoContext -+ ); -+ - /* /!\ These must match the ones from the official libusbk.h */ - typedef enum _KUSB_FNID { - KUSB_FNID_Init, -@@ -703,6 +758,8 @@ struct winusb_interface { - WinUsb_SetPowerPolicy_t SetPowerPolicy; - WinUsb_WritePipe_t WritePipe; - WinUsb_ResetDevice_t ResetDevice; -+ WinUsb_IsoReadPipe_t IsoReadPipe; -+ WinUsb_IsoWritePipe_t IsoWritePipe; - }; - - /* hid.dll interface */ diff --git a/ports/libusb/portfile.cmake b/ports/libusb/portfile.cmake index cd99405e69b..92d008206c1 100644 --- a/ports/libusb/portfile.cmake +++ b/ports/libusb/portfile.cmake @@ -1,9 +1,5 @@ include(vcpkg_common_functions) -set(LIBUSB_REVISION fc9962027f2c4f22f2c5e7853d737ef89aa5b6a3) -set(LIBUSB_HASH f8485b68feb7759ef4b469fa2fae10b93794bdb2c69d48aacd4a6fb87d7597779e06a15e8d9a72fe223a2f08c861c6f5023c4f6e869f13a8c4c92091fb38780e) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libusb) - if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) message(FATAL_ERROR "Error: UWP builds are currently not supported.") endif() @@ -11,85 +7,30 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libusb/libusb - REF ${LIBUSB_REVISION} - SHA512 ${LIBUSB_HASH} + REF v1.0.22 + SHA512 b1fed66aafa82490889ee488832c6884a95d38ce7b28fb7c3234b9bce1f749455d7b91cde397a0abc25101410edb13ab2f9832c59aa7b0ea8c19ba2cf4c63b00 HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/libfreenect2.patch" -) - -if (TRIPLET_SYSTEM_ARCH MATCHES "x86") - set(MSBUILD_PLATFORM "Win32") -else () - set(MSBUILD_PLATFORM ${TRIPLET_SYSTEM_ARCH}) -endif() - if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(MSVS_VERSION 2017) else() set(MSVS_VERSION 2015) endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(LIBUSB_LIBFOLDER_NAME dll) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(LIBUSB_PROJECT_TYPE dll) else() - set(LIBUSB_LIBFOLDER_NAME lib) set(LIBUSB_PROJECT_TYPE static) endif() -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj - ) - -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/msvc/libusb_usbdk_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj - ) - - -file( - INSTALL - ${SOURCE_PATH}/${MSBUILD_PLATFORM}/Debug/${LIBUSB_LIBFOLDER_NAME}/libusb-1.0.lib - ${SOURCE_PATH}/${MSBUILD_PLATFORM}/Debug/${LIBUSB_LIBFOLDER_NAME}/libusb-usbdk-1.0.lib - DESTINATION - ${CURRENT_PACKAGES_DIR}/debug/lib +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj + LICENSE_SUBPATH COPYING ) -file( - INSTALL - ${SOURCE_PATH}/${MSBUILD_PLATFORM}/Release/${LIBUSB_LIBFOLDER_NAME}/libusb-1.0.lib - ${SOURCE_PATH}/${MSBUILD_PLATFORM}/Release/${LIBUSB_LIBFOLDER_NAME}/libusb-usbdk-1.0.lib - DESTINATION - ${CURRENT_PACKAGES_DIR}/lib -) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file( - INSTALL - ${SOURCE_PATH}/${MSBUILD_PLATFORM}/Debug/${LIBUSB_LIBFOLDER_NAME}/libusb-1.0.dll - ${SOURCE_PATH}/${MSBUILD_PLATFORM}/Debug/${LIBUSB_LIBFOLDER_NAME}/libusb-usbdk-1.0.dll - DESTINATION - ${CURRENT_PACKAGES_DIR}/debug/bin - ) - - file( - INSTALL - ${SOURCE_PATH}/${MSBUILD_PLATFORM}/Release/${LIBUSB_LIBFOLDER_NAME}/libusb-1.0.dll - ${SOURCE_PATH}/${MSBUILD_PLATFORM}/Release/${LIBUSB_LIBFOLDER_NAME}/libusb-usbdk-1.0.dll - DESTINATION - ${CURRENT_PACKAGES_DIR}/bin - ) -endif() - -vcpkg_copy_pdbs() - file(INSTALL ${SOURCE_PATH}/libusb/libusb.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/libusb-1.0 ) - -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libusb) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libusb/COPYING ${CURRENT_PACKAGES_DIR}/share/libusb/copyright) diff --git a/ports/libusbmuxd/CONTROL b/ports/libusbmuxd/CONTROL new file mode 100644 index 00000000000..3773d17f973 --- /dev/null +++ b/ports/libusbmuxd/CONTROL @@ -0,0 +1,4 @@ +Source: libusbmuxd +Version: 1.0.107-2 +Description: A client library to multiplex connections from and to iOS devices +Build-Depends: libplist diff --git a/ports/libusbmuxd/dllexport.patch b/ports/libusbmuxd/dllexport.patch new file mode 100644 index 00000000000..15996ec0143 --- /dev/null +++ b/ports/libusbmuxd/dllexport.patch @@ -0,0 +1,26 @@ +diff --git a/include/usbmuxd.h b/include/usbmuxd.h +index 5a3b0c0..aa1c8d9 100644 +--- a/include/usbmuxd.h ++++ b/include/usbmuxd.h +@@ -24,7 +24,7 @@ + #define USBMUXD_H + #include + +-#ifdef _MSC_VER ++#if defined(_MSC_VER) && defined(USBMUXD_EXPORTS) + #define USBMUXD_API_MSC __declspec( dllexport ) + #else + #ifdef HAVE_FVISIBILITY +diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c +index b94c83c..1902a55 100644 +--- a/src/libusbmuxd.c ++++ b/src/libusbmuxd.c +@@ -34,7 +34,7 @@ + #include + #include + +-#ifdef _MSC_VER ++#if defined(_MSC_VER) && defined(USBMUXD_EXPORTS) + #define USBMUXD_API __declspec( dllexport ) + #else + #define USBMUXD_API diff --git a/ports/libusbmuxd/portfile.cmake b/ports/libusbmuxd/portfile.cmake new file mode 100644 index 00000000000..c4d338b19af --- /dev/null +++ b/ports/libusbmuxd/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libimobiledevice-win32/libusbmuxd + REF 1.0.109 + SHA512 104205ebcac96765f4bf0b42dbe5df084be4f87fc64454b4e02049fbd18caf9282d070f8949935977eda76fba68b6a909571afea58d4ad4091f02d0e6b7a08e0 + HEAD_REF msvc-master + PATCHES dllexport.patch +) + +set(ENV{_CL_} "$ENV{_CL_} /GL-") +set(ENV{_LINK_} "$ENV{_LINK_} /LTCG:OFF") + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH libusbmuxd.sln + INCLUDES_SUBPATH include + LICENSE_SUBPATH COPYING + USE_VCPKG_INTEGRATION + ALLOW_ROOT_INCLUDES +) + +file(REMOVE "${CURRENT_PACKAGES_DIR}/include/Makefile.am") diff --git a/ports/libuv/CMakeLists.txt b/ports/libuv/CMakeLists.txt index 87c0a6c9549..c4b7c3882a7 100644 --- a/ports/libuv/CMakeLists.txt +++ b/ports/libuv/CMakeLists.txt @@ -2,25 +2,76 @@ cmake_minimum_required(VERSION 3.5) project(libuv C) file(GLOB UV_SOURCES_COMMON src/*.c) + +file(GLOB UV_SOURCES_UNIX + src/unix/async.c + src/unix/core.c + src/unix/dl.c + src/unix/fs.c + src/unix/getaddrinfo.c + src/unix/getnameinfo.c + src/unix/loop.c + src/unix/loop-watcher.c + src/unix/pipe.c + src/unix/poll.c + src/unix/process.c + src/unix/signal.c + src/unix/stream.c + src/unix/tcp.c + src/unix/thread.c + src/unix/tty.c + src/unix/udp.c +) +file(GLOB UV_SOURCES_LINUX + src/unix/proctitle.c + src/unix/linux-core.c + src/unix/linux-inotify.c + src/unix/linux-syscalls.c + src/unix/procfs-exepath.c + src/unix/sysinfo-loadavg.c + src/unix/sysinfo-memory.c +) +file(GLOB UV_SOURCES_DARWIN + src/unix/proctitle.c + src/unix/darwin.c + src/unix/fsevents.c + src/unix/darwin-proctitle.c + src/unix/bsd-ifaddrs.c + src/unix/kqueue.c +) +file(GLOB UV_SOURCES_FREEBSD + src/unix/freebsd.c + src/unix/posix-hrtime.c + src/unix/bsd-proctitle.c + src/unix/bsd-ifaddrs.c + src/unix/kqueue.c +) file(GLOB UV_SOURCES_WIN src/win/*.c) -add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_WIN}) -target_compile_definitions(libuv PRIVATE WIN32_LEAN_AND_MEAN "_WIN32_WINNT=0x0600") -target_link_libraries(libuv iphlpapi psapi shell32 userenv ws2_32) +if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_WIN}) + target_compile_definitions(libuv PRIVATE WIN32_LEAN_AND_MEAN "_WIN32_WINNT=0x0600") + target_link_libraries(libuv iphlpapi psapi shell32 userenv ws2_32) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_DARWIN}) +elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_FREEBSD}) +else() # Assume some Linux variant + add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_LINUX}) +endif() + target_include_directories(libuv PUBLIC ./include PRIVATE ./src) set_target_properties(libuv PROPERTIES DEFINE_SYMBOL BUILDING_UV_SHARED) if(NOT UV_SKIP_HEADERS) - install(FILES - include/tree.h - include/uv.h - include/uv-version.h - include/uv-errno.h - include/uv-threadpool.h - include/uv-win.h - DESTINATION include) + install( + DIRECTORY include/ + DESTINATION include + ) endif() + install(TARGETS libuv RUNTIME DESTINATION bin ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib) + LIBRARY DESTINATION lib +) diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index e861df23933..e90eaa54593 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.20.0 +Version: 1.24.0 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 46ce33d8d0e..782d946c3fb 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -1,10 +1,12 @@ include(vcpkg_common_functions) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libuv/libuv - REF v1.20.0 - SHA512 382309cb6e54765b956b03357cb754f49d93505ba0e0122a77f33efca07d7b87966c993a5fd9f9503edd1bcd0f49ca42bd9cd9264cce94c847aebca77d237ba0 - HEAD_REF v1.x) + REF v1.24.0 + SHA512 b75dac19e99497b059b9b8ce646266c4fa10f1259f5fd74554f7f614f7b70f4b62b9c756316d9a3eed6cf6b9d61f5acde9f6eedb88d30431f6a5c87169487ec6 + HEAD_REF v1.x +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -12,7 +14,8 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS_DEBUG - -DUV_SKIP_HEADERS=ON) + -DUV_SKIP_HEADERS=ON +) vcpkg_install_cmake() vcpkg_copy_pdbs() diff --git a/ports/libvorbis/CONTROL b/ports/libvorbis/CONTROL index 20f8c6e29a2..355d89e80b5 100644 --- a/ports/libvorbis/CONTROL +++ b/ports/libvorbis/CONTROL @@ -1,4 +1,4 @@ Source: libvorbis -Version: 1.3.5-143caf4-3 +Version: 1.3.6-112d3bd-1 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/libvorbis/portfile.cmake b/ports/libvorbis/portfile.cmake index 26eb1dceb6d..83db50e01de 100644 --- a/ports/libvorbis/portfile.cmake +++ b/ports/libvorbis/portfile.cmake @@ -1,29 +1,27 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# 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/vorbis-143caf4023a90c09a5eb685fdd46fb9b9c36b1ee) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/xiph/vorbis/archive/143caf4023a90c09a5eb685fdd46fb9b9c36b1ee.zip" - FILENAME "vorbis-143caf4023a90c09a5eb685fdd46fb9b9c36b1ee.zip" - SHA512 9eeb64b1664ba8a1d118cdc5efc0090fe5f542eff33a16f4676fde8e59031fd0f9017857a7c45ca549899cab34efefd81dd54a57fab97f91f776fd9426f4e37a -) - -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/vorbis + REF 112d3bd0aaacad51305e1464d4b381dabad0e88b + SHA512 df20e072a5e024ca2b8fc0e2890bb8968c0c948a833149a6026d2eaf6ab57b88b6d00d0bfb3b8bfcf879c7875e7cfacb8c6bf454bfc083b41d76132c567ff7ae + HEAD_REF master PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-Dont-export-vorbisenc-functions.patch - ${CMAKE_CURRENT_LIST_DIR}/0002-Allow-deprecated-functions.patch + 0001-Dont-export-vorbisenc-functions.patch + 0002-Allow-deprecated-functions.patch ) -file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/include" OGG_INCLUDE) -file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/lib/ogg.lib" OGG_LIB_REL) -file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/lib/ogg.lib" OGG_LIB_DBG) +file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" OGG_INCLUDE) +foreach(LIBNAME ogg.lib libogg.a libogg.dylib libogg.so) + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/${LIBNAME}" OR EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/${LIBNAME}") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/${LIBNAME}" OGG_LIB_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/${LIBNAME}" OGG_LIB_DBG) + break() + endif() +endforeach() + +if(NOT OGG_LIB_REL) + message(FATAL_ERROR "Could not find libraries for dependency libogg!") +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -38,7 +36,6 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libvorbis) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libvorbis/COPYING ${CURRENT_PACKAGES_DIR}/share/libvorbis/copyright) +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/libvorbis/copyright COPYONLY) vcpkg_copy_pdbs() diff --git a/ports/libwebm/CONTROL b/ports/libwebm/CONTROL index eb19cf16aba..7a9bccfc77d 100644 --- a/ports/libwebm/CONTROL +++ b/ports/libwebm/CONTROL @@ -1,3 +1,3 @@ Source: libwebm -Version: 1.0.0.27-2 +Version: 1.0.0.27-3 Description: WebM File Parser diff --git a/ports/libwebm/no-samples.patch b/ports/libwebm/no-samples.patch new file mode 100644 index 00000000000..c160726b916 --- /dev/null +++ b/ports/libwebm/no-samples.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b48868f..f2fe35b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,6 +41,7 @@ endif(WIN32) + + include_directories("${LIBWEBM_SRC_DIR}") + ++if(BUILD_SAMPLES) + # Sample section. + add_executable(sample + "${LIBWEBM_SRC_DIR}/sample.cpp") +@@ -69,6 +70,7 @@ add_executable(webm2pes + "${LIBWEBM_SRC_DIR}/webm2pes.cc" + "${LIBWEBM_SRC_DIR}/webm2pes.h") + target_link_libraries(webm2pes LINK_PUBLIC webm) ++endif() + + install( + TARGETS webm diff --git a/ports/libwebm/portfile.cmake b/ports/libwebm/portfile.cmake index 6ccd7e3c5cf..7a233ecb663 100644 --- a/ports/libwebm/portfile.cmake +++ b/ports/libwebm/portfile.cmake @@ -1,21 +1,17 @@ include(vcpkg_common_functions) -set(LIBWEBM_VERSION 1.0.0.27) -set(LIBWEBM_HASH 15650b8b121b226654a5abed45a3586ddaf785dee8dac7c72df3f3f9aef76af4e561b75a2ef05328af8dfcfde21948b2edb59cd884dad08b8919cab4ee5a8596) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libwebm-libwebm-${LIBWEBM_VERSION}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/webmproject/libwebm/archive/libwebm-${LIBWEBM_VERSION}.tar.gz" - FILENAME "libwebm-${LIBWEBM_VERSION}.tar.gz" - SHA512 ${LIBWEBM_HASH} +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO webmproject/libwebm + REF libwebm-1.0.0.27 + SHA512 15650b8b121b226654a5abed45a3586ddaf785dee8dac7c72df3f3f9aef76af4e561b75a2ef05328af8dfcfde21948b2edb59cd884dad08b8919cab4ee5a8596 + HEAD_REF master + PATCHES + 0001-fix-cmake.patch + no-samples.patch ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-cmake.patch") - -if(VCPKG_CRT_LINKAGE STREQUAL dynamic) +if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") set(LIBWEBM_CRT_LINKAGE -DMSVC_RUNTIME=dll) else() set(LIBWEBM_CRT_LINKAGE -DMSVC_RUNTIME=static) @@ -24,9 +20,9 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS ${LIBWEBM_CRT_LINKAGE}) + OPTIONS ${LIBWEBM_CRT_LINKAGE} +) -vcpkg_build_cmake() vcpkg_install_cmake() vcpkg_copy_pdbs() diff --git a/ports/libwebsockets/CONTROL b/ports/libwebsockets/CONTROL index e6b595e0d6a..fdc4e7a552f 100644 --- a/ports/libwebsockets/CONTROL +++ b/ports/libwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: libwebsockets -Version: 2.4.2 +Version: 3.0.1 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. diff --git a/ports/libwebsockets/portfile.cmake b/ports/libwebsockets/portfile.cmake index 79a96007ec4..7d95b5added 100644 --- a/ports/libwebsockets/portfile.cmake +++ b/ports/libwebsockets/portfile.cmake @@ -3,15 +3,11 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO warmcat/libwebsockets - REF v2.4.2 - SHA512 7bee49f6763ff3ab7861fcda25af8d80f6757c56e197ea42be53e0b2480969eee73de3aee5198f5ff06fd1cb8ab2be4c6495243e83cd0acc235b0da83b2353d1 + REF v3.0.1 + SHA512 ba96af918dc53e5fe15792985892e726154ec6cd8b0e6b71ec133e1ac53792c42276fd6ae2c48c274acf4163579d8326e403201a8090fc58be29518c9c5b4304 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-UWP.patch + 0001-Fix-UWP.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LWS_WITH_STATIC) diff --git a/ports/libyaml/0001-fix-version.patch b/ports/libyaml/0001-fix-version.patch new file mode 100644 index 00000000000..c2a59d30fe4 --- /dev/null +++ b/ports/libyaml/0001-fix-version.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1abdd77..60a6b44 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,8 +3,8 @@ cmake_minimum_required(VERSION 3.0) + project (yaml C) + + set (YAML_VERSION_MAJOR 0) +-set (YAML_VERSION_MINOR 1) +-set (YAML_VERSION_PATCH 7) ++set (YAML_VERSION_MINOR 2) ++set (YAML_VERSION_PATCH 1) + set (YAML_VERSION_STRING "${YAML_VERSION_MAJOR}.${YAML_VERSION_MINOR}.${YAML_VERSION_PATCH}") + + option(BUILD_SHARED_LIBS "Build libyaml as a shared library" OFF) diff --git a/ports/libyaml/CONTROL b/ports/libyaml/CONTROL new file mode 100644 index 00000000000..1c770b2b954 --- /dev/null +++ b/ports/libyaml/CONTROL @@ -0,0 +1,3 @@ +Source: libyaml +Version: 0.2.1-1 +Description: A C library for parsing and emitting YAML. diff --git a/ports/libyaml/portfile.cmake b/ports/libyaml/portfile.cmake new file mode 100644 index 00000000000..04769271978 --- /dev/null +++ b/ports/libyaml/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO yaml/libyaml + REF 0.2.1 + SHA512 8b91738183a6d81c2c0381b4279cff9d8f811dac643ce5e08aa869058f5653ad8a2d9d8f9e563b26ad75b617b80b10ccb32753984a50ed684529a90bdd248bff + HEAD_REF master + PATCHES 0001-fix-version.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/config.h) + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/libyaml/copyright COPYONLY) diff --git a/ports/libzip/CONTROL b/ports/libzip/CONTROL index e82f0fee280..52681ed04f9 100644 --- a/ports/libzip/CONTROL +++ b/ports/libzip/CONTROL @@ -1,4 +1,4 @@ Source: libzip -Version: rel-1-5-1 +Version: rel-1-5-1-vcpkg1 Build-Depends: zlib Description: A library for reading, creating, and modifying zip archives. diff --git a/ports/libzip/LICENSE b/ports/libzip/LICENSE deleted file mode 100644 index 1c2e86bf266..00000000000 --- a/ports/libzip/LICENSE +++ /dev/null @@ -1,66 +0,0 @@ -Copyright (C) 1999-2016 Dieter Baron and Thomas Klausner - -The authors can be contacted at - -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. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``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 AUTHORS 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. - - - -For AES encryption support, files under the following license are used: - ---------------------------------------------------------------------------- -Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK. -All rights reserved. - -LICENSE TERMS - -The free distribution and use of this software in both source and binary -form is allowed (with or without changes) provided that: - - 1. distributions of this source code include the above copyright - notice, this list of conditions and the following disclaimer; - - 2. distributions in binary form include the above copyright - notice, this list of conditions and the following disclaimer - in the documentation and/or other associated materials; - - 3. the copyright holder's name is not used to endorse products - built using this software without specific written permission. - -ALTERNATIVELY, provided that this notice is retained in full, this product -may be distributed under the terms of the GNU General Public License (GPL), -in which case the provisions of the GPL apply INSTEAD OF those given above. - -DISCLAIMER - -This software is provided 'as is' with no explicit or implied warranties -in respect of its properties, including, but not limited to, correctness -and/or fitness for purpose. ---------------------------------------------------------------------------- -Issue Date: 18th November 2008 diff --git a/ports/libzip/portfile.cmake b/ports/libzip/portfile.cmake index b509c5eb0d7..de7940b3afa 100644 --- a/ports/libzip/portfile.cmake +++ b/ports/libzip/portfile.cmake @@ -4,13 +4,8 @@ vcpkg_from_github( REPO nih-at/libzip REF rel-1-5-1 SHA512 778f438f6354f030656baa5497b3154ad8fb764011d2a6925136f32e06dc0dcd1ed93fe05dbf7be619004a68cdabe5e34a83b988c1501ed67e9cfa4fa540350f -) - -# Patch cmake and configuration to allow static builds -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - "${CMAKE_CURRENT_LIST_DIR}/cmake_dont_build_more_than_needed.patch" + HEAD_REF master + PATCHES cmake_dont_build_more_than_needed.patch ) vcpkg_configure_cmake( @@ -20,13 +15,13 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -# Move zipconf.h to include and remove include directories from lib +# Remove include directories from lib file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/libzip ${CURRENT_PACKAGES_DIR}/debug/lib/libzip) # Remove debug include file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Copy copright information -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libzip RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libzip RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/linalg/CONTROL b/ports/linalg/CONTROL new file mode 100644 index 00000000000..eb2afe6f362 --- /dev/null +++ b/ports/linalg/CONTROL @@ -0,0 +1,3 @@ +Source: linalg +Version: 2.1 +Description: linalg.h is a single header public domain linear algebra library for C++11 diff --git a/ports/linalg/portfile.cmake b/ports/linalg/portfile.cmake new file mode 100644 index 00000000000..4f277775552 --- /dev/null +++ b/ports/linalg/portfile.cmake @@ -0,0 +1,12 @@ +#header-only library +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sgorsten/linalg + REF v2.1 + SHA512 48d8248ea1bca3d4fe35d038690f496cd0c8c9469d76eca684668ce6fef5df0eb9556f9b49e4da90e2c2e8ef475791877aa815c3f9437c097fbfc303134d02d7 + HEAD_REF master +) + +configure_file(${SOURCE_PATH}/UNLICENSE ${CURRENT_PACKAGES_DIR}/share/linalg/copyright COPYONLY) +configure_file(${SOURCE_PATH}/linalg.h ${CURRENT_PACKAGES_DIR}/include/linalg.h COPYONLY) \ No newline at end of file diff --git a/ports/linenoise-ng/CONTROL b/ports/linenoise-ng/CONTROL new file mode 100644 index 00000000000..8023c7f7dd2 --- /dev/null +++ b/ports/linenoise-ng/CONTROL @@ -0,0 +1,3 @@ +Source: linenoise-ng +Version: 4754bee2d8eb3 +Description: A small, portable GNU readline replacement for Linux, Windows and MacOS which is capable of handling UTF-8 characters. \ No newline at end of file diff --git a/ports/linenoise-ng/portfile.cmake b/ports/linenoise-ng/portfile.cmake new file mode 100644 index 00000000000..c5e448e8670 --- /dev/null +++ b/ports/linenoise-ng/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO arangodb/linenoise-ng + REF 4754bee2d8eb3c4511e6ac87cac62255b2011e2f + SHA512 080c6b4cde911a162885a2e6fc95143ab481b4dcc0f8b871a55a071ccb4ab868b19201ec17475a3c3ceef1b82325d757913383b3c46da6946ddc8bfc0d82d9ca + HEAD_REF master +) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/linenoise-ng RENAME copyright) diff --git a/ports/live555/CMakeLists.txt b/ports/live555/CMakeLists.txt index a41d2c791b7..9d126cda10e 100644 --- a/ports/live555/CMakeLists.txt +++ b/ports/live555/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.5) -project(live555 CXX) +project(live555 C CXX) include_directories( BasicUsageEnvironment/include @@ -8,17 +8,21 @@ include_directories( UsageEnvironment/include ) -file(GLOB BASIC_USAGE_ENVIRONMENT_SRCS BasicUsageEnvironment/*.cpp) +if (NOT MSVC) + add_compile_options(-DSOCKLEN_T=socklen_t) +endif() + +file(GLOB BASIC_USAGE_ENVIRONMENT_SRCS BasicUsageEnvironment/*.c BasicUsageEnvironment/*.cpp) add_library(BasicUsageEnvironment ${BASIC_USAGE_ENVIRONMENT_SRCS}) -file(GLOB GROUPSOCK_SRCS groupsock/*.cpp) +file(GLOB GROUPSOCK_SRCS groupsock/*.c groupsock/*.cpp) add_library(groupsock ${GROUPSOCK_SRCS}) -file(GLOB LIVEMEDIA_SRCS liveMedia/*.cpp) +file(GLOB LIVEMEDIA_SRCS liveMedia/*.c liveMedia/*.cpp) add_library(liveMedia ${LIVEMEDIA_SRCS}) -file(GLOB USAGE_ENVIRONMENT_SRCS UsageEnvironment/*.cpp) -add_library(UsageEnvironment ${LIVEMEDIA_SRCS}) +file(GLOB USAGE_ENVIRONMENT_SRCS UsageEnvironment/*.c UsageEnvironment/*.cpp) +add_library(UsageEnvironment ${USAGE_ENVIRONMENT_SRCS}) install(TARGETS groupsock BasicUsageEnvironment liveMedia UsageEnvironment RUNTIME DESTINATION bin diff --git a/ports/live555/CONTROL b/ports/live555/CONTROL index 07b93da6ba3..39c8e4a655e 100644 --- a/ports/live555/CONTROL +++ b/ports/live555/CONTROL @@ -1,3 +1,3 @@ Source: live555 -Version: 2018.02.28 +Version: latest Description: A complete RTSP server application diff --git a/ports/live555/portfile.cmake b/ports/live555/portfile.cmake index d3ac4f51d9d..55d15a88cc8 100644 --- a/ports/live555/portfile.cmake +++ b/ports/live555/portfile.cmake @@ -3,33 +3,41 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(VCPKG_LIBRARY_LINKAGE "static") endif() -include(vcpkg_common_functions) -set(LIVE_VERSION 2018.02.28) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIVE_VERSION}/live) -vcpkg_download_distfile(ARCHIVE - URLS "http://www.live555.com/liveMedia/public/live.${LIVE_VERSION}.tar.gz" - FILENAME "live.${LIVE_VERSION}.tar.gz" - SHA512 0e445d0b494d82e5826ecea2ec4196472781d3524d2fea95efef83ec5dc0d211334e3ea34dc83b758ed847e2b4290727b299b4118133ca2468911c7cb2053a55 -) -vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src/${LIVE_VERSION}) +if(NOT VCPKG_USE_HEAD_VERSION) + message(FATAL_ERROR "Live555 does not have persistent releases. Please re-run the installation with --head.") +else() + # The current Live555 version from http://www.live555.com/liveMedia/public/ + set(LIVE_VERSION latest) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + include(vcpkg_common_functions) + set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIVE_VERSION}/live) + vcpkg_download_distfile(ARCHIVE + URLS "http://www.live555.com/liveMedia/public/live555-${LIVE_VERSION}.tar.gz" + FILENAME "live555-${LIVE_VERSION}.tar.gz" + SKIP_SHA512 + ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA -) + vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src/${LIVE_VERSION}) -vcpkg_install_cmake() + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(GLOB HEADERS - "${SOURCE_PATH}/BasicUsageEnvironment/include/*.h*" - "${SOURCE_PATH}/groupsock/include/*.h*" - "${SOURCE_PATH}/liveMedia/include/*.h*" - "${SOURCE_PATH}/UsageEnvironment/include/*.h*" -) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + ) -file(COPY ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/live555 RENAME copyright) + vcpkg_install_cmake() + + file(GLOB HEADERS + "${SOURCE_PATH}/BasicUsageEnvironment/include/*.h*" + "${SOURCE_PATH}/groupsock/include/*.h*" + "${SOURCE_PATH}/liveMedia/include/*.h*" + "${SOURCE_PATH}/UsageEnvironment/include/*.h*" + ) + + file(COPY ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/live555 RENAME copyright) + + vcpkg_copy_pdbs() +endif() -vcpkg_copy_pdbs() diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL index 37368dbc7c2..9beb04e29d4 100644 --- a/ports/llvm/CONTROL +++ b/ports/llvm/CONTROL @@ -1,4 +1,4 @@ Source: llvm -Version: 6.0.0-1 +Version: 7.0.0 Description: The LLVM Compiler Infrastructure -Build-Depends: atlmfc +Build-Depends: atlmfc (windows) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index 650e2ae9214..293751c0d78 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -7,23 +7,23 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/llvm-6.0.0.src) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/llvm-7.0.0.src) vcpkg_download_distfile(ARCHIVE - URLS "http://releases.llvm.org/6.0.0/llvm-6.0.0.src.tar.xz" - FILENAME "llvm-6.0.0.src.tar.xz" - SHA512 a71fdd5ddc46f01327ad891cfcc198febdbe10769c57f14d8a4fb7d514621ee4080e1a641200d3353c16a16731d390270499ec6cd3dc98fadc570f3eb6b52b8c + URLS "http://releases.llvm.org/7.0.0/llvm-7.0.0.src.tar.xz" + FILENAME "llvm-7.0.0.src.tar.xz" + SHA512 bdc9b851c158b17e1bbeb7ac5ae49821bfb1251a3826fe8a3932cd1a43f9fb0d620c3de67150c1d9297bf0b86fa917e75978da29c3f751b277866dc90395abec ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_download_distfile(CLANG_ARCHIVE - URLS "http://releases.llvm.org/6.0.0/cfe-6.0.0.src.tar.xz" - FILENAME "cfe-6.0.0.src.tar.xz" - SHA512 e886dd27448503bbfc7fd4f68eb089c19b2f2be4f0e5b26d3df253833f60b91d70b472a6b530063386e2252075b110ce9f5942800feddf6c34b94a75cf7bd5c6 + URLS "http://releases.llvm.org/7.0.0/cfe-7.0.0.src.tar.xz" + FILENAME "cfe-7.0.0.src.tar.xz" + SHA512 17a658032a0160c57d4dc23cb45a1516a897e0e2ba4ebff29472e471feca04c5b68cff351cdf231b42aab0cff587b84fe11b921d1ca7194a90e6485913d62cb7 ) vcpkg_extract_source_archive(${CLANG_ARCHIVE} ${SOURCE_PATH}/tools) if(NOT EXISTS ${SOURCE_PATH}/tools/clang) - file(RENAME ${SOURCE_PATH}/tools/cfe-6.0.0.src ${SOURCE_PATH}/tools/clang) + file(RENAME ${SOURCE_PATH}/tools/cfe-7.0.0.src ${SOURCE_PATH}/tools/clang) endif() vcpkg_apply_patches( diff --git a/ports/lmdb/CONTROL b/ports/lmdb/CONTROL index c926fd78fd5..12b60546566 100644 --- a/ports/lmdb/CONTROL +++ b/ports/lmdb/CONTROL @@ -1,3 +1,3 @@ Source: lmdb -Version: 0.9.18-3 +Version: 0.9.18-4 Description: LMDB is an extraordinarily fast, memory-efficient database diff --git a/ports/lmdb/cmake/CMakeLists.txt b/ports/lmdb/cmake/CMakeLists.txt index 32097e86a80..dfa61785f58 100644 --- a/ports/lmdb/cmake/CMakeLists.txt +++ b/ports/lmdb/cmake/CMakeLists.txt @@ -29,7 +29,9 @@ endif() set(SRCS lmdb mdb.c lmdb.h midl.c midl.h ) add_library(lmdb ${SRCS}) set_target_properties(lmdb PROPERTIES DEBUG_POSTFIX d) -target_link_libraries(lmdb PRIVATE ntdll.lib) +if (WIN32) + target_link_libraries(lmdb PRIVATE ntdll.lib) +endif() install(TARGETS lmdb DESTINATION lib EXPORT lmdb-targets diff --git a/ports/lmdb/portfile.cmake b/ports/lmdb/portfile.cmake index 4c038071ebb..3ee4f340a85 100644 --- a/ports/lmdb/portfile.cmake +++ b/ports/lmdb/portfile.cmake @@ -1,33 +1,26 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/lmdb-LMDB_0.9.18/libraries/liblmdb) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://github.com/LMDB/lmdb/archive/LMDB_0.9.18.zip" - FILENAME "LMDB_0.9.18.zip" - SHA512 46d7ba226af05443c871f83c6ae0ab2ddbeecd289df59c082e806e135fcaa69d9d9060a19a4a907c4f7046de30871126e91e540eca27fc94446e95ba5616155b -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/lmdb-LMDB_0.9.18 - PATCHES ${CMAKE_CURRENT_LIST_DIR}/lmdb_45a88275d2a410e683bae4ef44881e0f55fa3c4d.patch +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO LMDB/lmdb + REF LMDB_0.9.18 + SHA512 394e88d99d446eb30771d7cf7a661584683a0d6d8e976cc561b5eecbb2a5d0817bbd59994002afa4eae6c86a39f05f50ebc2eff77cd70dd8c67225df4611f5e6 + HEAD_REF master + PATCHES lmdb_45a88275d2a410e683bae4ef44881e0f55fa3c4d.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake/ DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake/ DESTINATION ${SOURCE_PATH}/libraries/liblmdb) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH ${SOURCE_PATH}/libraries/liblmdb OPTIONS_DEBUG -DLMDB_INSTALL_HEADERS=OFF ) vcpkg_install_cmake() -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/lmdb/lmdb-targets-debug.cmake LMDB_DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" LMDB_DEBUG_MODULE "${LMDB_DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/lmdb/lmdb-targets-debug.cmake "${LMDB_DEBUG_MODULE}") +vcpkg_fixup_cmake_targets(CONFIG_PATH share/lmdb) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) - -file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/lmdb RENAME copyright) +file(INSTALL ${SOURCE_PATH}/libraries/liblmdb/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/lmdb RENAME copyright) vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/lodepng/CMakeLists.txt b/ports/lodepng/CMakeLists.txt index d4c8bc12ac9..0ffd3954955 100644 --- a/ports/lodepng/CMakeLists.txt +++ b/ports/lodepng/CMakeLists.txt @@ -14,9 +14,9 @@ include_directories(".") add_library(lodepng lodepng.cpp lodepng_util.cpp) -add_executable(pngdetail pngdetail.cpp) +# add_executable(pngdetail pngdetail.cpp) -target_link_libraries(pngdetail lodepng) +# target_link_libraries(pngdetail lodepng) install( TARGETS lodepng @@ -25,12 +25,12 @@ install( ARCHIVE DESTINATION lib ) -if(NOT DISABLE_INSTALL_TOOLS) - install ( - TARGETS pngdetail - RUNTIME DESTINATION tools/lodepng - ) -endif() +# if(NOT DISABLE_INSTALL_TOOLS) +# install ( +# TARGETS pngdetail +# RUNTIME DESTINATION tools/lodepng +# ) +# endif() if(NOT DDISABLE_INSTALL_EXAMPLES) install(DIRECTORY examples DESTINATION share/lodepng/) diff --git a/ports/lodepng/CONTROL b/ports/lodepng/CONTROL index 12a944ab591..e6c10c4746c 100644 --- a/ports/lodepng/CONTROL +++ b/ports/lodepng/CONTROL @@ -1,3 +1,3 @@ Source: lodepng -Version: 2018-02-25 +Version: 2018-09-18-1 Description: PNG encoder and decoder in C and C++ diff --git a/ports/lodepng/algorithm.patch b/ports/lodepng/algorithm.patch new file mode 100644 index 00000000000..796bdfc66c0 --- /dev/null +++ b/ports/lodepng/algorithm.patch @@ -0,0 +1,12 @@ +diff --git a/lodepng_util.cpp b/lodepng_util.cpp +index 4b571bb..58ba81a 100644 +--- a/lodepng_util.cpp ++++ b/lodepng_util.cpp +@@ -26,6 +26,7 @@ freely, subject to the following restrictions: + #include "lodepng_util.h" + #include + #include "math.h" ++#include + + namespace lodepng + { diff --git a/ports/lodepng/portfile.cmake b/ports/lodepng/portfile.cmake index 4fa423a0aa1..3677644560a 100644 --- a/ports/lodepng/portfile.cmake +++ b/ports/lodepng/portfile.cmake @@ -3,9 +3,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lvandeve/lodepng - REF 116f5b2ed7c4a9c6779ae291b79770727cbb11ad - SHA512 746528e4cb4c8678a91f607ff7c2d61f651a19ef1efcd4694deb0d2191970674de7e13331004f7702b31a335474cf71364c8da0fdc7c75852db3cb896f00a375 + REF ceb6b482b5a16d2bb3d6b3c735ca2b16322780d5 + SHA512 5293f6c629ff006410c9180cabac5f4de7643f04ec6c3d7ff46c1b09317ff9156d28ed4344a46db0b3a06937349590aa8958722ba0432178a347da58736cbf41 HEAD_REF master + PATCHES algorithm.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/log4cplus/CONTROL b/ports/log4cplus/CONTROL index 6dbcb515c03..712a7873032 100644 --- a/ports/log4cplus/CONTROL +++ b/ports/log4cplus/CONTROL @@ -1,4 +1,4 @@ Source: log4cplus -Version: REL_2_0_0-RC2 +Version: REL_2_0_1 Description: A simple to use C++ logging API providing thread--safe, flexible, and arbitrarily granular control over log management and configuration Build-Depends: catch diff --git a/ports/log4cplus/portfile.cmake b/ports/log4cplus/portfile.cmake index d6e60022127..97a17a4f7f8 100644 --- a/ports/log4cplus/portfile.cmake +++ b/ports/log4cplus/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO log4cplus/log4cplus - REF REL_2_0_0-RC2 - SHA512 34392d85088534e0661e6fa9726c5970647a5acaa559bafb5d3746a70f5baca01012f457d50c15e73d9aca1d3ed9ec99028cc65fab07f73cdadbbc0b4329bcb5 + REF REL_2_0_1 + SHA512 7a84bf237bb5db3eccd90196c0f97adb75d0dd247d73852150078b9458f169d883f3ae92908217ea668bcf25c64766c86380bbcc64b432eb1bae6427c9268b18 HEAD_REF master ) diff --git a/ports/luabridge/CONTROL b/ports/luabridge/CONTROL new file mode 100644 index 00000000000..595e3b1137e --- /dev/null +++ b/ports/luabridge/CONTROL @@ -0,0 +1,3 @@ +Source: luabridge +Version: 2.1-1 +Description: A lightweight, dependency-free library for binding Lua to C++ diff --git a/ports/luabridge/portfile.cmake b/ports/luabridge/portfile.cmake new file mode 100644 index 00000000000..6ff91dd3acc --- /dev/null +++ b/ports/luabridge/portfile.cmake @@ -0,0 +1,20 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vinniefalco/LuaBridge + REF 2.1 + SHA512 062efda16fe43a02bcc757aaebba839e0ec72a9a3b7bf1e5bc1427a54d664a52197c8bcd4ac584f0d04cce812c0f078e257716e8bca016bcabda82c2c332ac04 + HEAD_REF master +) + +file( + COPY ${SOURCE_PATH}/Source/LuaBridge + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +# Handle copyright +configure_file( + ${SOURCE_PATH}/README.md + ${CURRENT_PACKAGES_DIR}/share/luabridge/copyright + COPYONLY +) diff --git a/ports/luasocket/CONTROL b/ports/luasocket/CONTROL index 3eeada1cac7..ec478e62f86 100644 --- a/ports/luasocket/CONTROL +++ b/ports/luasocket/CONTROL @@ -1,4 +1,4 @@ Source: luasocket -Version: 2018-02-25 +Version: 2018-09-18 Description: LuaSocket is a Lua extension library that is composed by two parts: a C core that provides support for the TCP and UDP transport layers, and a set of Lua modules that add support for functionality commonly needed by applications that deal with the Internet. Build-Depends: lua diff --git a/ports/luasocket/portfile.cmake b/ports/luasocket/portfile.cmake index 831cd1b5e74..b7288fed123 100644 --- a/ports/luasocket/portfile.cmake +++ b/ports/luasocket/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO diegonehab/luasocket - REF 652959890943c34d7180cae372339b91e62f0d7b - SHA512 8666e3dec0a3a0429e59a66c79b167f88b05a2a0b2c7f5456754cb5c505bcf8c39c4d358880a2f78a488ad07bee4e6e5b9a6a63c2affcee788091dee15ed2f6a + REF 288219fd6b53ce2e709745c9918aa4c4b7f715c9 + SHA512 f7b1f90437655352ab69a733bc2b2a0080d116fb8b6896fce0eb8ba6c593e2e3f64684c956d387a198d5aa48c4a9208531ab5e96805d92f0d4ca3ed46179be0b HEAD_REF master) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/lz4/CONTROL b/ports/lz4/CONTROL index 4a0f53689ef..43911651949 100644 --- a/ports/lz4/CONTROL +++ b/ports/lz4/CONTROL @@ -1,3 +1,3 @@ Source: lz4 -Version: 1.8.1.2-1 +Version: 1.8.3 Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core. diff --git a/ports/lz4/portfile.cmake b/ports/lz4/portfile.cmake index 6150a35e6d1..bf0d3d52e94 100644 --- a/ports/lz4/portfile.cmake +++ b/ports/lz4/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lz4/lz4 - REF v1.8.1.2 - SHA512 f4ed450bc05477cc6c2b42e6fe1fbb1fb0907f1d05b68b1d69d975b555ddb385550f204258e6d91642e14ce373815141dc218cda03b711793935d5458bc45c7f + REF v1.8.3 + SHA512 5d284f75a0c4ad11ebc4abb4394d98c863436da0718d62f648ef2e2cda8e5adf47617a4b43594375f7b0b673541a9ccfaf73880a55fd240986594558214dbf9f HEAD_REF dev) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/magnum-extras/CONTROL b/ports/magnum-extras/CONTROL index d0f9f32d0eb..2f782f048b1 100644 --- a/ports/magnum-extras/CONTROL +++ b/ports/magnum-extras/CONTROL @@ -1,9 +1,9 @@ -Source: magnum-extras -Version: 2018.02-2 -Build-Depends: magnum -Description: Extras for magnum, C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ -Default-Features: - -Feature: ui -Description: Ui library -Build-Depends: corrade[interconnect], magnum[text] +Source: magnum-extras +Version: 2018.10-1 +Build-Depends: magnum +Description: Extras for magnum, C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ +Default-Features: + +Feature: ui +Description: Ui library +Build-Depends: corrade[interconnect], magnum[text] diff --git a/ports/magnum-extras/portfile.cmake b/ports/magnum-extras/portfile.cmake index d975084974a..1a080b566fc 100644 --- a/ports/magnum-extras/portfile.cmake +++ b/ports/magnum-extras/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum-extras - REF v2018.02 - SHA512 62c0832d19a36e0f89ffcd958356130c81f577b1091a9232d43307868caf51a1fd186c4aa196bd456d3c37cb887c9802d80eb0b332893bafa812298dbc39d7b7 + REF v2018.10 + SHA512 2f1164e321ceff9ae526cb2bae961147f52f56b35ea837c29ba0153f418a269056f469415ca0393dfb8fa5d916e92130aaccc61105d18e3f242820d13478eb33 HEAD_REF master ) diff --git a/ports/magnum-integration/CONTROL b/ports/magnum-integration/CONTROL index a791e5718e8..6fdb5c5cd53 100644 --- a/ports/magnum-integration/CONTROL +++ b/ports/magnum-integration/CONTROL @@ -1,5 +1,5 @@ Source: magnum-integration -Version: 2018.02-1 +Version: 2018.10-1 Build-Depends: magnum Description: Integrations for magnum, C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ Default-Features: @@ -7,6 +7,10 @@ Default-Features: Feature: bullet Description: BulletIntegration library Build-Depends: bullet3 + +Feature: glm +Description: GlmIntegration library +Build-Depends: glm #Feature: ovr #Description: OvrIntegration library #Build-Depends: ovrsdk diff --git a/ports/magnum-integration/portfile.cmake b/ports/magnum-integration/portfile.cmake index da9c393b7a4..1e1ba801a41 100644 --- a/ports/magnum-integration/portfile.cmake +++ b/ports/magnum-integration/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum-integration - REF v2018.02 - SHA512 b2db442d5e29c117ee30ee2c37f5087c3d360158a52eb6bc19e5c1a0388a0ec1338c53e3fdad618bb6f4aba5d88fe10d20bb1539e5f21a309b8f06f2e195279c + REF v2018.10 + SHA512 2743eb7ee377350e85c1112f5c81850922748f50dc2d5409ccb05bec2b3246c91b8e149891a72a8319125a9843b408fd8254efaffaed2100a425e3e7ef426bbe HEAD_REF master ) diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 98e7e606d02..0aa1b075c23 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,28 +1,15 @@ Source: magnum-plugins -Version: 2018.02-2 +Version: 2018.10-1 Build-Depends: magnum Description: Plugins for magnum, C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ -Default-Features: anyimageimporter, anysceneimporter, anyimageconverter, ddsimporter, miniexrimageconverter, opengeximporter, stanfordimporter, stbimageconverter, stbimageimporter - -Feature: anyimageimporter -Description: AnyImageImporter plugin -Build-Depends: magnum[trade] - -Feature: anyaudioimporter -Description: AnyAudioImporter plugin -Build-Depends: magnum[audio] - -Feature: anyimageconverter -Description: AnyImageConverter plugin -Build-Depends: magnum[trade] - -Feature: anysceneimporter -Description: AnySceneImporter plugin -Build-Depends: magnum[trade] +Default-Features: ddsimporter, miniexrimageconverter, opengeximporter, stanfordimporter, stbimageconverter, stbimageimporter Feature: assimpimporter Description: AssimpImporter plugin -Build-Depends: assimp, magnum-plugins[anyimageimporter], magnum[anyimageimporter], magnum[trade] +Build-Depends: assimp, magnum[anyimageimporter], magnum[trade] + +Feature: openddl +Description: OpenDdl library Feature: ddsimporter Description: DdsImporter plugin @@ -52,13 +39,17 @@ Feature: jpegimporter Description: JpegImporter plugin Build-Depends: libjpeg-turbo, magnum[trade] +Feature: jpegimageconverter +Description: JpegImageConverter plugin +Build-Depends: libjpeg-turbo, magnum[trade] + Feature: miniexrimageconverter Description: MiniExrImageConverter plugin Build-Depends: magnum[trade] Feature: opengeximporter Description: OpenGexImporter plugin -Build-Depends: magnum-plugins[anyimageimporter], magnum[anyimageimporter], magnum[trade] +Build-Depends: magnum[anyimageimporter], magnum[trade], magnum-plugins[openddl] Feature: pngimageconverter Description: PngImageConverter plugin @@ -89,5 +80,5 @@ Description: StbVorbisAudioImporter plugin Build-Depends: magnum[audio] Feature: tinygltfimporter -Description: (Upcoming) TinyGltfImporter plugin -Build-Depends: magnum-plugins[anyimageimporter], magnum[anyimageimporter], magnum-plugins[stbimageimporter], magnum[trade] +Description: TinyGltfImporter plugin +Build-Depends: magnum[anyimageimporter], magnum-plugins[stbimageimporter], magnum[trade] diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake index bedf9e3957e..aa7f120fee8 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum-plugins - REF v2018.02 - SHA512 650d3ec26b3c72aa98ffa242b072e382445de49d4849042faf5dac800d5e4cce223cac3fa1cc079fcb230632730af1d90ac7d347d152a1f31d224732499e96b4 + REF v2018.10 + SHA512 0ff79d2451957dd38f6bf9b1ee5b99f5ea9ac2cd993124f0bc4ae3e571d1a9f407876ecf59a34fd1bd86cda991e81e6632925b7a289e30b113b457bd1c7a0ae1 HEAD_REF master ) @@ -53,8 +53,9 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -# Clean up empty directories -if(NOT FEATURES) +# Clean up empty directories, if not building anything. +# FEATURES may only contain "core", but that does not build anything. +if(NOT FEATURES OR FEATURES STREQUAL "core") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/lib @@ -63,26 +64,19 @@ if(NOT FEATURES) endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - # move plugin libs to conventional place - file(GLOB_RECURSE LIB_TO_MOVE ${CURRENT_PACKAGES_DIR}/lib/magnum/*) - file(COPY ${LIB_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) - file(GLOB_RECURSE LIB_TO_MOVE_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/magnum/*) - file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + # move plugin libs to conventional place + file(GLOB_RECURSE LIB_TO_MOVE ${CURRENT_PACKAGES_DIR}/lib/magnum/*) + file(COPY ${LIB_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(GLOB_RECURSE LIB_TO_MOVE_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/magnum/*) + file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum) else() - # remove headers and libs for plugins - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - # hint vcpkg - set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) - set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/MagnumPlugins) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) + set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) endif() # Handle copyright diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index 6f3aebadcd6..8cb02ccc25c 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,27 +1,27 @@ Source: magnum -Version: 2018.02-2 +Version: 2018.10-1 Build-Depends: corrade[pluginmanager], corrade[utility] Description: C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ -Default-Features: anyimageimporter, anyaudioimporter, anyimageconverter, anysceneimporter, debugtools, gl, meshtools, primitives, scenegraph, shaders, shapes, text, texturetools, trade, sdl2application, windowlesswglapplication +Default-Features: anyimageimporter, anyaudioimporter, anyimageconverter, anysceneimporter, debugtools, gl, meshtools, primitives, scenegraph, shaders, shapes, text, texturetools, trade, sdl2application Feature: al-info Description: magnum-al-info utility Build-Depends: magnum[audio] Feature: anyimageimporter -Description: (Upcoming) AnyImageImporter plugin +Description: AnyImageImporter plugin Build-Depends: magnum[trade] Feature: anyaudioimporter -Description: (Upcoming) AnyAudioImporter plugin +Description: AnyAudioImporter plugin Build-Depends: magnum[audio] Feature: anyimageconverter -Description: (Upcoming) AnyImageConverter plugin +Description: AnyImageConverter plugin Build-Depends: magnum[trade] Feature: anysceneimporter -Description: (Upcoming) AnySceneImporter plugin +Description: AnySceneImporter plugin Build-Depends: magnum[trade] Feature: audio @@ -40,10 +40,10 @@ Description: magnum-fontconverter utility Build-Depends: magnum[text], magnum[gl] Feature: gl -Description: (Upcoming) GL library +Description: GL library Feature: gl-info -Description: (Upcoming) gl-info utility +Description: gl-info utility Build-Depends: magnum[gl] Feature: glfwapplication @@ -58,9 +58,6 @@ Feature: imageconverter Description: magnum-imageconverter utility Build-Depends: magnum[trade] -Feature: magnuminfo -Description: magnum-info utility - Feature: magnumfont Description: MagnumFont plugin Build-Depends: magnum[text] @@ -101,10 +98,11 @@ Description: SceneGraph library Feature: shaders Description: Shaders library +Build-Depends: magnum[gl] Feature: text Description: Text library -Build-Depends: magnum[texturetools] +Build-Depends: magnum[texturetools], magnum[gl] Feature: texturetools Description: TextureTools library @@ -114,7 +112,7 @@ Description: TgaImporter plugin Build-Depends: magnum[trade] Feature: trade -Description: (Upcoming) Trade library +Description: Trade library Feature: wavaudioimporter Description: WavAudioImporter plugin diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index af22fbb6032..e7f2833e75d 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum - REF v2018.02 - SHA512 aeb0cab91ae0a7cca79c15ce98d9b2f8d46f5bc11bb90718e59188bf233154fb51668e0241112b65103f40e675736d74c86a2e5ccffcb698780ccedb1b3fb8bd + REF v2018.10 + SHA512 3c0998fc3600cb3799e89b4b97f6640e9b7ea9eb0ba937a2ccc0a9e5411f7dc466524a56a49ec04993530703e6688292af042a9aa6452af37f20d4449351cd96 HEAD_REF master ) @@ -53,25 +53,31 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Drop a copy of tools +if(NOT VCPKG_CMAKE_SYSTEM_NAME) + set(EXE_SUFFIX .exe) +else() + set(EXE_SUFFIX) +endif() + if(distancefieldconverter IN_LIST FEATURES) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-distancefieldconverter.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-distancefieldconverter${EXE_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) endif() if(fontconverter IN_LIST FEATURES) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-fontconverter.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-fontconverter${EXE_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) endif() if(al-info IN_LIST FEATURES) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-al-info.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-al-info${EXE_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) endif() if(magnuminfo IN_LIST FEATURES) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-info.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-info${EXE_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) endif() # Tools require dlls vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/magnum) file(GLOB_RECURSE TO_REMOVE - ${CURRENT_PACKAGES_DIR}/bin/*.exe - ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + ${CURRENT_PACKAGES_DIR}/bin/*${EXE_SUFFIX} + ${CURRENT_PACKAGES_DIR}/debug/bin/*${EXE_SUFFIX}) if(TO_REMOVE) file(REMOVE ${TO_REMOVE}) endif() @@ -79,7 +85,7 @@ endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) # move plugin libs to conventional place @@ -90,11 +96,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum) else() - # remove headers and libs for plugins - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/MagnumPlugins) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/bin/magnum) file(COPY ${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/magnum-d) endif() diff --git a/ports/matio/CONTROL b/ports/matio/CONTROL index 7c891c035fa..df97421cffe 100644 --- a/ports/matio/CONTROL +++ b/ports/matio/CONTROL @@ -1,4 +1,4 @@ Source: matio -Version: 1.5.12 +Version: 1.5.13 Description: MATLAB MAT File I/O Library Build-Depends: zlib, hdf5 diff --git a/ports/matio/portfile.cmake b/ports/matio/portfile.cmake index 86d5b6a1f07..f51424d55bf 100644 --- a/ports/matio/portfile.cmake +++ b/ports/matio/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tbeu/matio - REF v1.5.12 - SHA512 3bf6d2bf6460531dd2a740813bca3f3da6347b9fadb39803257f11bcceeaa7cf6657921c9ca9c8db02bf2020d5adf2ecf544b2455aa0ca897c0644493b1902a4 + REF v1.5.13 + SHA512 8525ee2c3f0e5cccf3dbae888d09a9477cbd1f2b17160fd15cc8e18792b027954ac18404ea74465ec6b8b5d057661502b1fc31fa6d119113139004c1bce7f712 HEAD_REF master ) diff --git a/ports/mbedtls/CONTROL b/ports/mbedtls/CONTROL index c4bed6fa687..04cb1003c1e 100644 --- a/ports/mbedtls/CONTROL +++ b/ports/mbedtls/CONTROL @@ -1,3 +1,3 @@ Source: mbedtls -Version: 2.6.1 +Version: 2.13.1 Description: An open source, portable, easy to use, readable and flexible SSL library diff --git a/ports/mbedtls/portfile.cmake b/ports/mbedtls/portfile.cmake index 600b2790cb4..59d067f1102 100644 --- a/ports/mbedtls/portfile.cmake +++ b/ports/mbedtls/portfile.cmake @@ -5,8 +5,8 @@ set(VCPKG_LIBRARY_LINKAGE static) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ARMmbed/mbedtls - REF mbedtls-2.6.1 - SHA512 06f8ba2a453164bac01d20ca6f5c80e691857977ef501d56685e81a0e90dddae1bedeab46c18c22f9a3b72894d45d7466f76a5c404417b6613ddae0ee4a881c8 + REF mbedtls-2.13.1 + SHA512 1a70446b533534c075de38ce0839f7947077ffdddffa57172594b8f8a3c4a3fbdfa9b06d13c198008abad33633e509f06abe5362f603f63850d9ec44734b3c0b HEAD_REF master ) diff --git a/ports/metis/CONTROL b/ports/metis/CONTROL index f302a9ce4a6..305887de0e9 100644 --- a/ports/metis/CONTROL +++ b/ports/metis/CONTROL @@ -1,3 +1,3 @@ -Source: metis -Version: 5.1.0-1 -Description: Serial Graph Partitioning and Fill-reducing Matrix Ordering +Source: metis +Version: 5.1.0-2 +Description: Serial Graph Partitioning and Fill-reducing Matrix Ordering diff --git a/ports/metis/portfile.cmake b/ports/metis/portfile.cmake index c53adde4e31..d2c8de80043 100644 --- a/ports/metis/portfile.cmake +++ b/ports/metis/portfile.cmake @@ -1,47 +1,50 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# 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/metis-5.1.0) -vcpkg_download_distfile(ARCHIVE - URLS "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz" - FILENAME "metis-5.1.0.tar.gz" - SHA512 deea47749d13bd06fbeaf98a53c6c0b61603ddc17a43dae81d72c8015576f6495fd83c11b0ef68d024879ed5415c14ebdbd87ce49c181bdac680573bea8bdb25 -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/enable-install.patch - ${CMAKE_CURRENT_LIST_DIR}/disable-programs.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-runtime-install-destination.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-metis-vs14-math.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-gklib-vs14-math.patch -) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(OPTIONS -DSHARED=ON -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON) -else() - set(OPTIONS -DSHARED=OFF) -endif() - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - ${OPTIONS} -) - -vcpkg_install_cmake() -vcpkg_copy_pdbs() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/metis) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/metis/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/metis/copyright) +# Common Ambient Variables: +# VCPKG_ROOT_DIR = +# 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(METIS_VERSION 5.1.0) + +vcpkg_download_distfile(ARCHIVE + URLS "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-${METIS_VERSION}.tar.gz" + FILENAME "metis-${METIS_VERSION}.tar.gz" + SHA512 deea47749d13bd06fbeaf98a53c6c0b61603ddc17a43dae81d72c8015576f6495fd83c11b0ef68d024879ed5415c14ebdbd87ce49c181bdac680573bea8bdb25 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${METIS_VERSION} + PATCHES + enable-install.patch + disable-programs.patch + fix-runtime-install-destination.patch + fix-metis-vs14-math.patch + fix-gklib-vs14-math.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OPTIONS -DSHARED=ON -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON) +else() + set(OPTIONS -DSHARED=OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/metis) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/metis/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/metis/copyright) diff --git a/ports/milerius-sfml-imgui/CONTROL b/ports/milerius-sfml-imgui/CONTROL new file mode 100644 index 00000000000..a9f8e909696 --- /dev/null +++ b/ports/milerius-sfml-imgui/CONTROL @@ -0,0 +1,4 @@ +Source: milerius-sfml-imgui +Version: 1.1 +Description: imgui dll for sfml usage +Build-Depends: sfml (windows), imgui diff --git a/ports/milerius-sfml-imgui/portfile.cmake b/ports/milerius-sfml-imgui/portfile.cmake new file mode 100644 index 00000000000..1520d5e35ad --- /dev/null +++ b/ports/milerius-sfml-imgui/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Milerius/imgui-sfml-shared + REF 1.1 + SHA512 191184f7b302f643bd7c241b69d9f9edc0d03c6f5a0b3a49f57ac84f3828202f8065291fb17993073a2c07f1237ba491de677c47e2f8160dc70ea77f20eb1946 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sfml-imgui) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml-imgui) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/sfml-imgui/LICENSE ${CURRENT_PACKAGES_DIR}/share/sfml-imgui/copyright) diff --git a/ports/minisat-master-keying/CONTROL b/ports/minisat-master-keying/CONTROL new file mode 100644 index 00000000000..ca37399f280 --- /dev/null +++ b/ports/minisat-master-keying/CONTROL @@ -0,0 +1,7 @@ +Source: minisat-master-keying +Version: 2.2-mod-1 +Description: A minimalistic high-performance SAT solver + This is a modernized, cross-platform, CMake-enabled fork of the + original MiniSat. Since the original library is no longer under + development, post issues and pull requests should be posted to + https://github.com/master-keying/minisat diff --git a/ports/minisat-master-keying/portfile.cmake b/ports/minisat-master-keying/portfile.cmake new file mode 100644 index 00000000000..e035c2fe4c6 --- /dev/null +++ b/ports/minisat-master-keying/portfile.cmake @@ -0,0 +1,29 @@ +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO master-keying/minisat + REF 60f47c0b59a5116639a73ceb9b50eb818536af0b + SHA512 267b7dd44bd1390826228c45ce0e71976a78940d2086470a26b59a6c692ad5e0e911c255eda0c187c33f8138b34deab59aa53191a0e1a46df38c5b73680d74d6 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/MiniSat TARGET_PATH share/minisat) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/minisat-master-keying RENAME copyright) diff --git a/ports/miniupnpc/CONTROL b/ports/miniupnpc/CONTROL new file mode 100644 index 00000000000..8238e64f7ed --- /dev/null +++ b/ports/miniupnpc/CONTROL @@ -0,0 +1,3 @@ +Source: miniupnpc +Version: 2.1 +Description: UPnP client library/tool to access Internet Gateway Devices diff --git a/ports/miniupnpc/cmakelists.diff b/ports/miniupnpc/cmakelists.diff new file mode 100644 index 00000000000..4df7ef74dcc --- /dev/null +++ b/ports/miniupnpc/cmakelists.diff @@ -0,0 +1,11 @@ +--- a/miniupnpc/CMakeLists.txt 2018-05-07 13:12:58.000000000 +0200 ++++ b/miniupnpc/CMakeLists.txt 2018-11-13 11:51:57.897598000 +0100 +@@ -124,7 +124,7 @@ + target_link_libraries (libminiupnpc-shared PRIVATE miniupnpc-private) + target_compile_definitions(libminiupnpc-shared PRIVATE MINIUPNP_EXPORTS) + +- target_include_directories(libminiupnpc-static INTERFACE ../${CMAKE_CURRENT_SOURCE_DIR}) ++ target_include_directories(libminiupnpc-shared INTERFACE ../${CMAKE_CURRENT_SOURCE_DIR}) + if (WIN32) + target_link_libraries(libminiupnpc-shared INTERFACE ws2_32 iphlpapi) + endif() diff --git a/ports/miniupnpc/portfile.cmake b/ports/miniupnpc/portfile.cmake new file mode 100644 index 00000000000..2c9aa9ec6dc --- /dev/null +++ b/ports/miniupnpc/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO miniupnp/miniupnp + REF miniupnpc_2_1 + SHA512 f2ab5116c094982f7838ccab460d3db07a99de1094448277fc45841e0e64ea1b4216d75a7e5dd471c79ff9b0132b89e4d801c3ad1b60d55631c12c916df658f5 + HEAD_REF master +) + +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmakelists.diff) + +string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" MINIUPNPC_BUILD_SHARED) +string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" MINIUPNPC_BUILD_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/miniupnpc + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DUPNPC_BUILD_STATIC=${MINIUPNPC_BUILD_STATIC} + -DUPNPC_BUILD_SHARED=${MINIUPNPC_BUILD_SHARED} + -DUPNPC_BUILD_TESTS=OFF + -DUPNPC_BUILD_SAMPLE=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/miniupnpc RENAME copyright) + diff --git a/ports/minizip/CMakeLists.txt b/ports/minizip/CMakeLists.txt index 9ebb5d217f9..0b572b39c40 100644 --- a/ports/minizip/CMakeLists.txt +++ b/ports/minizip/CMakeLists.txt @@ -15,21 +15,27 @@ include_directories(${MIN_SRC} ${ZLIB_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR}) set(SRC ${MIN_SRC}/ioapi.c - ${MIN_SRC}/iowin32.c ${MIN_SRC}/unzip.c ${MIN_SRC}/zip.c ${MIN_SRC}/unzip.c ${MIN_SRC}/mztools.c ) +if(WIN32) + list(APPEND SRC ${MIN_SRC}/iowin32.c) +endif() + set(HEADERS ${MIN_SRC}/crypt.h ${MIN_SRC}/ioapi.h - ${MIN_SRC}/iowin32.h ${MIN_SRC}/unzip.h ${MIN_SRC}/zip.h ${MIN_SRC}/unzip.h ${MIN_SRC}/mztools.h ) +if(WIN32) + list(APPEND HEADERS ${MIN_SRC}/iowin32.h) +endif() + if(BUILD_SHARED_LIBS) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) endif() diff --git a/ports/minizip/CONTROL b/ports/minizip/CONTROL index cc37b5f8cd2..60398b039a8 100644 --- a/ports/minizip/CONTROL +++ b/ports/minizip/CONTROL @@ -1,4 +1,4 @@ Source: minizip -Version: 1.2.11-2 +Version: 1.2.11-3 Description: Zip compression library Build-Depends: bzip2, zlib diff --git a/ports/mio/CONTROL b/ports/mio/CONTROL new file mode 100644 index 00000000000..c174396d16b --- /dev/null +++ b/ports/mio/CONTROL @@ -0,0 +1,3 @@ +Source: mio +Version: 2018-10-18-1 +Description: Cross-platform header-only C++11 library for memory mapped file IO. diff --git a/ports/mio/portfile.cmake b/ports/mio/portfile.cmake new file mode 100644 index 00000000000..6fe1a562211 --- /dev/null +++ b/ports/mio/portfile.cmake @@ -0,0 +1,26 @@ +# header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mandreyel/mio + REF 365a80c9acaab2a7d23a40a3add7071f9b739f85 + SHA512 a134dde60e6ada796bffc795563e3c4d4d4f3abd07ef3da7c15472951bf3f13d9fd37a05de71cd662ec5ff6e7048cfb1e7af76a35259c0ff58a53df792a6640e + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dmio.tests=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/mio) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/mio RENAME copyright) diff --git a/ports/modp-base64/CMakeLists.txt b/ports/modp-base64/CMakeLists.txt new file mode 100644 index 00000000000..d470ccc209e --- /dev/null +++ b/ports/modp-base64/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.8) +project(libmodpbase64 C) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + + +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake" +"${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY) + + +include_directories(src ${CMAKE_CURRENT_BINARY_DIR}) + + +add_library(libmodpbase64 src/modp_b64.c libmodpbase64.def) + + +install( + TARGETS libmodpbase64 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + + +if(NOT DISABLE_INSTALL_HEADERS) + install( + FILES src/modp_b64.h + DESTINATION include + ) +endif() diff --git a/ports/modp-base64/CONTROL b/ports/modp-base64/CONTROL new file mode 100644 index 00000000000..3f277871a84 --- /dev/null +++ b/ports/modp-base64/CONTROL @@ -0,0 +1,3 @@ +Source: modp-base64 +Version: +Description: diff --git a/ports/modp-base64/config.h.cmake b/ports/modp-base64/config.h.cmake new file mode 100644 index 00000000000..da32c24811a --- /dev/null +++ b/ports/modp-base64/config.h.cmake @@ -0,0 +1,4 @@ +#ifndef MODP_CONFIG_H +#define MODP_CONFIG_H + +#endif diff --git a/ports/modp-base64/libmodpbase64.def b/ports/modp-base64/libmodpbase64.def new file mode 100644 index 00000000000..defd83b1589 --- /dev/null +++ b/ports/modp-base64/libmodpbase64.def @@ -0,0 +1,4 @@ +LIBRARY libmodpbase64 +EXPORTS + modp_b64_encode @1 + modp_b64_decode @2 diff --git a/ports/modp-base64/modp_b64_data.h b/ports/modp-base64/modp_b64_data.h new file mode 100644 index 00000000000..e3c54b4bc81 --- /dev/null +++ b/ports/modp-base64/modp_b64_data.h @@ -0,0 +1,480 @@ +#include +#define CHAR62 '+' +#define CHAR63 '/' +#define CHARPAD '=' +static const char e0[256] = { + 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'C', 'C', + 'C', 'C', 'D', 'D', 'D', 'D', 'E', 'E', 'E', 'E', + 'F', 'F', 'F', 'F', 'G', 'G', 'G', 'G', 'H', 'H', + 'H', 'H', 'I', 'I', 'I', 'I', 'J', 'J', 'J', 'J', + 'K', 'K', 'K', 'K', 'L', 'L', 'L', 'L', 'M', 'M', + 'M', 'M', 'N', 'N', 'N', 'N', 'O', 'O', 'O', 'O', + 'P', 'P', 'P', 'P', 'Q', 'Q', 'Q', 'Q', 'R', 'R', + 'R', 'R', 'S', 'S', 'S', 'S', 'T', 'T', 'T', 'T', + 'U', 'U', 'U', 'U', 'V', 'V', 'V', 'V', 'W', 'W', + 'W', 'W', 'X', 'X', 'X', 'X', 'Y', 'Y', 'Y', 'Y', + 'Z', 'Z', 'Z', 'Z', 'a', 'a', 'a', 'a', 'b', 'b', + 'b', 'b', 'c', 'c', 'c', 'c', 'd', 'd', 'd', 'd', + 'e', 'e', 'e', 'e', 'f', 'f', 'f', 'f', 'g', 'g', + 'g', 'g', 'h', 'h', 'h', 'h', 'i', 'i', 'i', 'i', + 'j', 'j', 'j', 'j', 'k', 'k', 'k', 'k', 'l', 'l', + 'l', 'l', 'm', 'm', 'm', 'm', 'n', 'n', 'n', 'n', + 'o', 'o', 'o', 'o', 'p', 'p', 'p', 'p', 'q', 'q', + 'q', 'q', 'r', 'r', 'r', 'r', 's', 's', 's', 's', + 't', 't', 't', 't', 'u', 'u', 'u', 'u', 'v', 'v', + 'v', 'v', 'w', 'w', 'w', 'w', 'x', 'x', 'x', 'x', + 'y', 'y', 'y', 'y', 'z', 'z', 'z', 'z', '0', '0', + '0', '0', '1', '1', '1', '1', '2', '2', '2', '2', + '3', '3', '3', '3', '4', '4', '4', '4', '5', '5', + '5', '5', '6', '6', '6', '6', '7', '7', '7', '7', + '8', '8', '8', '8', '9', '9', '9', '9', '+', '+', + '+', '+', '/', '/', '/', '/' +}; + +static const char e1[256] = { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', + 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', + 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', + 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', + 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', + 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', '+', '/', 'A', 'B', 'C', 'D', 'E', 'F', + 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', + 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', + 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', + 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', + '4', '5', '6', '7', '8', '9', '+', '/', 'A', 'B', + 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', + 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', + 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '+', '/', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', + 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', + 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', + 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', + 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', + 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', + '6', '7', '8', '9', '+', '/' +}; + +static const char e2[256] = { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', + 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', + 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', + 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', + 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', + 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', '+', '/', 'A', 'B', 'C', 'D', 'E', 'F', + 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', + 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', + 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', + 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', + '4', '5', '6', '7', '8', '9', '+', '/', 'A', 'B', + 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', + 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', + 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '+', '/', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', + 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', + 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', + 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', + 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', + 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', + '6', '7', '8', '9', '+', '/' +}; + + + +#ifdef WORDS_BIGENDIAN + + +/* SPECIAL DECODE TABLES FOR BIG ENDIAN (IBM/MOTOROLA/SUN) CPUS */ + +static const uint32_t d0[256] = { +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x00f80000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00fc0000, +0x00d00000, 0x00d40000, 0x00d80000, 0x00dc0000, 0x00e00000, 0x00e40000, +0x00e80000, 0x00ec0000, 0x00f00000, 0x00f40000, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, +0x00040000, 0x00080000, 0x000c0000, 0x00100000, 0x00140000, 0x00180000, +0x001c0000, 0x00200000, 0x00240000, 0x00280000, 0x002c0000, 0x00300000, +0x00340000, 0x00380000, 0x003c0000, 0x00400000, 0x00440000, 0x00480000, +0x004c0000, 0x00500000, 0x00540000, 0x00580000, 0x005c0000, 0x00600000, +0x00640000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x00680000, 0x006c0000, 0x00700000, 0x00740000, 0x00780000, +0x007c0000, 0x00800000, 0x00840000, 0x00880000, 0x008c0000, 0x00900000, +0x00940000, 0x00980000, 0x009c0000, 0x00a00000, 0x00a40000, 0x00a80000, +0x00ac0000, 0x00b00000, 0x00b40000, 0x00b80000, 0x00bc0000, 0x00c00000, +0x00c40000, 0x00c80000, 0x00cc0000, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff +}; + + +static const uint32_t d1[256] = { +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x0003e000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x0003f000, +0x00034000, 0x00035000, 0x00036000, 0x00037000, 0x00038000, 0x00039000, +0x0003a000, 0x0003b000, 0x0003c000, 0x0003d000, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, +0x00001000, 0x00002000, 0x00003000, 0x00004000, 0x00005000, 0x00006000, +0x00007000, 0x00008000, 0x00009000, 0x0000a000, 0x0000b000, 0x0000c000, +0x0000d000, 0x0000e000, 0x0000f000, 0x00010000, 0x00011000, 0x00012000, +0x00013000, 0x00014000, 0x00015000, 0x00016000, 0x00017000, 0x00018000, +0x00019000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x0001a000, 0x0001b000, 0x0001c000, 0x0001d000, 0x0001e000, +0x0001f000, 0x00020000, 0x00021000, 0x00022000, 0x00023000, 0x00024000, +0x00025000, 0x00026000, 0x00027000, 0x00028000, 0x00029000, 0x0002a000, +0x0002b000, 0x0002c000, 0x0002d000, 0x0002e000, 0x0002f000, 0x00030000, +0x00031000, 0x00032000, 0x00033000, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff +}; + + +static const uint32_t d2[256] = { +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x00000f80, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000fc0, +0x00000d00, 0x00000d40, 0x00000d80, 0x00000dc0, 0x00000e00, 0x00000e40, +0x00000e80, 0x00000ec0, 0x00000f00, 0x00000f40, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, +0x00000040, 0x00000080, 0x000000c0, 0x00000100, 0x00000140, 0x00000180, +0x000001c0, 0x00000200, 0x00000240, 0x00000280, 0x000002c0, 0x00000300, +0x00000340, 0x00000380, 0x000003c0, 0x00000400, 0x00000440, 0x00000480, +0x000004c0, 0x00000500, 0x00000540, 0x00000580, 0x000005c0, 0x00000600, +0x00000640, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x00000680, 0x000006c0, 0x00000700, 0x00000740, 0x00000780, +0x000007c0, 0x00000800, 0x00000840, 0x00000880, 0x000008c0, 0x00000900, +0x00000940, 0x00000980, 0x000009c0, 0x00000a00, 0x00000a40, 0x00000a80, +0x00000ac0, 0x00000b00, 0x00000b40, 0x00000b80, 0x00000bc0, 0x00000c00, +0x00000c40, 0x00000c80, 0x00000cc0, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff +}; + + +static const uint32_t d3[256] = { +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x0000003e, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x0000003f, +0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, +0x0000003a, 0x0000003b, 0x0000003c, 0x0000003d, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, +0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, +0x00000007, 0x00000008, 0x00000009, 0x0000000a, 0x0000000b, 0x0000000c, +0x0000000d, 0x0000000e, 0x0000000f, 0x00000010, 0x00000011, 0x00000012, +0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, +0x00000019, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x0000001a, 0x0000001b, 0x0000001c, 0x0000001d, 0x0000001e, +0x0000001f, 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, +0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002a, +0x0000002b, 0x0000002c, 0x0000002d, 0x0000002e, 0x0000002f, 0x00000030, +0x00000031, 0x00000032, 0x00000033, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff +}; + + +#else + + +/* SPECIAL DECODE TABLES FOR LITTLE ENDIAN (INTEL) CPUS */ + +static const uint32_t d0[256] = { +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x000000f8, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x000000fc, +0x000000d0, 0x000000d4, 0x000000d8, 0x000000dc, 0x000000e0, 0x000000e4, +0x000000e8, 0x000000ec, 0x000000f0, 0x000000f4, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, +0x00000004, 0x00000008, 0x0000000c, 0x00000010, 0x00000014, 0x00000018, +0x0000001c, 0x00000020, 0x00000024, 0x00000028, 0x0000002c, 0x00000030, +0x00000034, 0x00000038, 0x0000003c, 0x00000040, 0x00000044, 0x00000048, +0x0000004c, 0x00000050, 0x00000054, 0x00000058, 0x0000005c, 0x00000060, +0x00000064, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x00000068, 0x0000006c, 0x00000070, 0x00000074, 0x00000078, +0x0000007c, 0x00000080, 0x00000084, 0x00000088, 0x0000008c, 0x00000090, +0x00000094, 0x00000098, 0x0000009c, 0x000000a0, 0x000000a4, 0x000000a8, +0x000000ac, 0x000000b0, 0x000000b4, 0x000000b8, 0x000000bc, 0x000000c0, +0x000000c4, 0x000000c8, 0x000000cc, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff +}; + + +static const uint32_t d1[256] = { +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x0000e003, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x0000f003, +0x00004003, 0x00005003, 0x00006003, 0x00007003, 0x00008003, 0x00009003, +0x0000a003, 0x0000b003, 0x0000c003, 0x0000d003, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, +0x00001000, 0x00002000, 0x00003000, 0x00004000, 0x00005000, 0x00006000, +0x00007000, 0x00008000, 0x00009000, 0x0000a000, 0x0000b000, 0x0000c000, +0x0000d000, 0x0000e000, 0x0000f000, 0x00000001, 0x00001001, 0x00002001, +0x00003001, 0x00004001, 0x00005001, 0x00006001, 0x00007001, 0x00008001, +0x00009001, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x0000a001, 0x0000b001, 0x0000c001, 0x0000d001, 0x0000e001, +0x0000f001, 0x00000002, 0x00001002, 0x00002002, 0x00003002, 0x00004002, +0x00005002, 0x00006002, 0x00007002, 0x00008002, 0x00009002, 0x0000a002, +0x0000b002, 0x0000c002, 0x0000d002, 0x0000e002, 0x0000f002, 0x00000003, +0x00001003, 0x00002003, 0x00003003, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff +}; + + +static const uint32_t d2[256] = { +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x00800f00, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00c00f00, +0x00000d00, 0x00400d00, 0x00800d00, 0x00c00d00, 0x00000e00, 0x00400e00, +0x00800e00, 0x00c00e00, 0x00000f00, 0x00400f00, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, +0x00400000, 0x00800000, 0x00c00000, 0x00000100, 0x00400100, 0x00800100, +0x00c00100, 0x00000200, 0x00400200, 0x00800200, 0x00c00200, 0x00000300, +0x00400300, 0x00800300, 0x00c00300, 0x00000400, 0x00400400, 0x00800400, +0x00c00400, 0x00000500, 0x00400500, 0x00800500, 0x00c00500, 0x00000600, +0x00400600, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x00800600, 0x00c00600, 0x00000700, 0x00400700, 0x00800700, +0x00c00700, 0x00000800, 0x00400800, 0x00800800, 0x00c00800, 0x00000900, +0x00400900, 0x00800900, 0x00c00900, 0x00000a00, 0x00400a00, 0x00800a00, +0x00c00a00, 0x00000b00, 0x00400b00, 0x00800b00, 0x00c00b00, 0x00000c00, +0x00400c00, 0x00800c00, 0x00c00c00, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff +}; + + +static const uint32_t d3[256] = { +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x003e0000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x003f0000, +0x00340000, 0x00350000, 0x00360000, 0x00370000, 0x00380000, 0x00390000, +0x003a0000, 0x003b0000, 0x003c0000, 0x003d0000, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, +0x00010000, 0x00020000, 0x00030000, 0x00040000, 0x00050000, 0x00060000, +0x00070000, 0x00080000, 0x00090000, 0x000a0000, 0x000b0000, 0x000c0000, +0x000d0000, 0x000e0000, 0x000f0000, 0x00100000, 0x00110000, 0x00120000, +0x00130000, 0x00140000, 0x00150000, 0x00160000, 0x00170000, 0x00180000, +0x00190000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x001a0000, 0x001b0000, 0x001c0000, 0x001d0000, 0x001e0000, +0x001f0000, 0x00200000, 0x00210000, 0x00220000, 0x00230000, 0x00240000, +0x00250000, 0x00260000, 0x00270000, 0x00280000, 0x00290000, 0x002a0000, +0x002b0000, 0x002c0000, 0x002d0000, 0x002e0000, 0x002f0000, 0x00300000, +0x00310000, 0x00320000, 0x00330000, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff +}; + + +#endif diff --git a/ports/modp-base64/portfile.cmake b/ports/modp-base64/portfile.cmake new file mode 100644 index 00000000000..3ff05847434 --- /dev/null +++ b/ports/modp-base64/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/modp-base64-v2.0.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://web.archive.org/web/20060620024518/http://modp.com:80/release/base64/modp-base64-v2.0.0.tar.bz2" + FILENAME "modp-base64-v2.0.0.tar.bz2" + SHA512 474e20cbbc47f31af5e981a6a9028fcec57e3ae9bb5ba979aa5c5c4cab6f301208fe6f441a0106df4c223d89fb6f18b19ab8812cf9f3c9900e54524e35b45720 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/config.h.cmake + ${CMAKE_CURRENT_LIST_DIR}/libmodpbase64.def + DESTINATION ${SOURCE_PATH} +) +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/modp_b64_data.h + DESTINATION ${SOURCE_PATH}/src +) + + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/modp-base64 RENAME copyright) diff --git a/ports/mongo-c-driver/CONTROL b/ports/mongo-c-driver/CONTROL index 9a367df3a05..700f65d1a7b 100644 --- a/ports/mongo-c-driver/CONTROL +++ b/ports/mongo-c-driver/CONTROL @@ -1,4 +1,4 @@ Source: mongo-c-driver -Version: 1.9.2 +Version: 1.9.5-1 Build-Depends: libbson, openssl (uwp) Description: Client library written in C for MongoDB. diff --git a/ports/mongo-c-driver/portfile.cmake b/ports/mongo-c-driver/portfile.cmake index 74f4bd66b1d..54d70aaf89b 100644 --- a/ports/mongo-c-driver/portfile.cmake +++ b/ports/mongo-c-driver/portfile.cmake @@ -1,16 +1,11 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-c-driver-1.9.2) - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mongodb/mongo-c-driver/archive/1.9.2.tar.gz" - FILENAME "mongo-c-driver-1.9.2.tar.gz" - SHA512 a2c819da77aef93ce261093e98e8e8c41c449af56bd03d875e2838a067ae71b5ceb16fed2fb8df9458c84310451b813464377592806fc9ac39d9df2f4ddba83b -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-uwp.patch +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mongodb/mongo-c-driver + REF 1.9.5 + SHA512 bee584c83bb317802eb855fececc98f2013d7c3134f063c3146521ab535c8a89c2dfe89ccfa6ebbe2d7c64edec0e53105ead361da83b885c7778b40e4801de62 + HEAD_REF master + PATCHES fix-uwp.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") @@ -36,7 +31,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libmongoc-static-1.0") else() vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libmongoc-1.0") @@ -64,13 +59,13 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) vcpkg_apply_patches( SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include PATCHES - ${CMAKE_CURRENT_LIST_DIR}/static.patch + static.patch ) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) endif() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver RENAME copyright) +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/copyright COPYONLY) file(COPY ${SOURCE_PATH}/THIRD_PARTY_NOTICES DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver) if (VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -79,6 +74,7 @@ else() set(PORT_POSTFIX "1.0") endif() +# Create cmake files for _both_ find_package(mongo-c-driver) and find_package(libmongoc-static-1.0)/find_package(libmongoc-1.0) file(READ ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config.cmake LIBMONGOC_CONFIG_CMAKE) string(REPLACE "/include/libmongoc-1.0" "/include" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") string(REPLACE "mongoc-static-1.0" "mongoc-1.0" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") diff --git a/ports/mongo-cxx-driver/CONTROL b/ports/mongo-cxx-driver/CONTROL index 065fbbab0e0..08de8ddec1e 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-2 +Version: 3.1.1-3 Build-Depends: libbson, mongo-c-driver, boost-smart-ptr, boost-optional, boost-utility Description: MongoDB C++ Driver. diff --git a/ports/mongo-cxx-driver/disable-c2338-mongo-cxx-driver.patch b/ports/mongo-cxx-driver/disable-c2338-mongo-cxx-driver.patch new file mode 100644 index 00000000000..04bbcd6384a --- /dev/null +++ b/ports/mongo-cxx-driver/disable-c2338-mongo-cxx-driver.patch @@ -0,0 +1,11 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index a019eb1..8ab0f71 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -14,5 +14,6 @@ + + add_definitions(-DMONGO_CXX_DRIVER_COMPILING) + add_definitions(-D_SCL_SECURE_NO_WARNINGS) ++add_definitions(-D_DISABLE_EXTENDED_ALIGNED_STORAGE) + add_subdirectory(bsoncxx) + add_subdirectory(mongocxx) diff --git a/ports/mongo-cxx-driver/portfile.cmake b/ports/mongo-cxx-driver/portfile.cmake index fd978a2713a..b80c8a5bf37 100644 --- a/ports/mongo-cxx-driver/portfile.cmake +++ b/ports/mongo-cxx-driver/portfile.cmake @@ -1,19 +1,15 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-cxx-driver-r3.1.1) - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mongodb/mongo-cxx-driver/archive/r3.1.1.tar.gz" - FILENAME "mongo-cxx-driver-r3.1.1.tar.gz" +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mongodb/mongo-cxx-driver + REF r3.1.1 SHA512 ba8a735e5645cbce4497df71a4577e891d507f577dbd5270ec8a82e54c39c2806bf2ff4848b621f18b36d31fb6031e5b4211972b661c43009bff0ed7ab6cf338 -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/disable_test_and_example.patch - ${CMAKE_CURRENT_LIST_DIR}/disable_shared.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-uwp.patch + HEAD_REF master + PATCHES + "${CURRENT_PORT_DIR}/disable_test_and_example.patch" + "${CURRENT_PORT_DIR}/disable_shared.patch" + "${CURRENT_PORT_DIR}/fix-uwp.patch" + "${CURRENT_PORT_DIR}/disable-c2338-mongo-cxx-driver.patch" ) vcpkg_configure_cmake( diff --git a/ports/mongo-cxx-driver/static.patch b/ports/mongo-cxx-driver/static.patch deleted file mode 100644 index a485efe3d9e..00000000000 --- a/ports/mongo-cxx-driver/static.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/mongocxx/config/export.hpp b/mongocxx/config/export.hpp -index 61a3e74..7fc951c 100644 ---- a/mongocxx/config/export.hpp -+++ b/mongocxx/config/export.hpp -@@ -2,6 +2,7 @@ - #ifndef MONGOCXX_API_H - #define MONGOCXX_API_H - -+#define MONGOCXX_STATIC - #ifdef MONGOCXX_STATIC - # define MONGOCXX_API - # define MONGOCXX_PRIVATE diff --git a/ports/monkeys-audio/CONTROL b/ports/monkeys-audio/CONTROL index 7b28d4c085d..e81e943bfa4 100644 --- a/ports/monkeys-audio/CONTROL +++ b/ports/monkeys-audio/CONTROL @@ -1,5 +1,4 @@ Source: monkeys-audio -Version: 4.3.3 +Version: 4.3.3-1 Description: Monkey's Audio is an excellent audio compression tool which has multiple advantages over traditional methods. Audio files compressed with it ends with .ape extension. - \ No newline at end of file diff --git a/ports/monkeys-audio/portfile.cmake b/ports/monkeys-audio/portfile.cmake index 58a33673736..fbde63a4a26 100644 --- a/ports/monkeys-audio/portfile.cmake +++ b/ports/monkeys-audio/portfile.cmake @@ -1,15 +1,17 @@ +include(vcpkg_common_functions) + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "${PORT} does not currently support UWP") endif() -if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - message(FATAL_ERROR "${PORT} currently only support static build") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_STATIC_CRT) + +if(EXISTS ${CURRENT_BUILDTREES_DIR}/src/MAC_SDK_433.zip.extracted) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) endif() -include(vcpkg_common_functions) - set(VERSION 4.7) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) -set(PROJECT_PATH ${SOURCE_PATH}/Source/Projects/VS2017) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/433) vcpkg_download_distfile(ARCHIVE URLS "http://monkeysaudio.com/files/MAC_SDK_433.zip" @@ -17,39 +19,29 @@ vcpkg_download_distfile(ARCHIVE SHA512 957ba262da29a8542ab82dc828328b19bf80ecf0d09165db935924b390cb6a3a2d9303a2e07b86b28ecf4210a66dd5c4be840205a9f09518189101033f1a13c8 ) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH}) -if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/use-dynamic-linkage.patch - ) -endif() +file(REMOVE + ${SOURCE_PATH}/Shared/MACDll.dll + ${SOURCE_PATH}/Shared/MACDll.lib + ${SOURCE_PATH}/Shared/MACLib.lib +) -vcpkg_build_msbuild( - PROJECT_PATH ${PROJECT_PATH}/Console/Console.vcxproj +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH Source/Projects/VS2017/Console/Console.vcxproj ) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${CURRENT_BUILDTREES_DIR}/src/Shared/ +file(COPY ${SOURCE_PATH}/Shared/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/monkeys-audio FILES_MATCHING PATTERN "*.h") file(REMOVE ${CURRENT_PACKAGES_DIR}/include/monkeys-audio/MACDll.h) -file(COPY - ${PROJECT_PATH}/MACLib/Debug/MACLib.lib - ${PROJECT_PATH}/MACLib/Debug/MACLib.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib -) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/Console.lib ${CURRENT_PACKAGES_DIR}/debug/lib/Console.lib) -file(COPY - ${PROJECT_PATH}/MACLib/Release/MACLib.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib -) +file(RENAME ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio/Console.exe ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio/mac.exe) -file(INSTALL ${PROJECT_PATH}/Console/Release/Console.exe - DESTINATION ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio - RENAME mac.exe) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/monkeys-audio RENAME copyright) diff --git a/ports/monkeys-audio/use-dynamic-linkage.patch b/ports/monkeys-audio/use-dynamic-linkage.patch deleted file mode 100644 index ab16f635342..00000000000 --- a/ports/monkeys-audio/use-dynamic-linkage.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/Source/Projects/VS2017/MACLib/MACLib.vcxproj b/Source/Projects/VS2017/MACLib/MACLib.vcxproj -index ec3cf92..44c8e65 100644 ---- a/Source/Projects/VS2017/MACLib/MACLib.vcxproj -+++ b/Source/Projects/VS2017/MACLib/MACLib.vcxproj -@@ -25,27 +25,27 @@ - - - -- StaticLibrary -+ DynamicLibrary - v141_xp - false - Unicode - false - - -- StaticLibrary -+ DynamicLibrary - v141_xp - false - Unicode - - -- StaticLibrary -+ DynamicLibrary - v141_xp - false - Unicode - false - - -- StaticLibrary -+ DynamicLibrary - v141_xp - false - Unicode diff --git a/ports/morton-nd/CONTROL b/ports/morton-nd/CONTROL new file mode 100644 index 00000000000..40065dbee4e --- /dev/null +++ b/ports/morton-nd/CONTROL @@ -0,0 +1,3 @@ +Source: morton-nd +Version: 2.0.0 +Description: (C++14) header-only library for fast Morton encoding/decoding in N dimensions. diff --git a/ports/morton-nd/portfile.cmake b/ports/morton-nd/portfile.cmake new file mode 100644 index 00000000000..63c8ee95fc3 --- /dev/null +++ b/ports/morton-nd/portfile.cmake @@ -0,0 +1,16 @@ +#header-only library +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kevinhartman/morton-nd + REF v2.0.0 + SHA512 f349187a9c6094ebdc8dc10a0b028e119a82721946e2f629b3f64edade9665a97824d6a52496e470da61e5b65ae46c953346b271c2db11f5f2e3c7748de03daf + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/morton-nd) +file(COPY ${SOURCE_PATH}/NOTICE DESTINATION ${CURRENT_PACKAGES_DIR}/share/morton-nd) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/morton-nd/LICENSE ${CURRENT_PACKAGES_DIR}/share/morton-nd/copyright) + +file(GLOB HEADER_FILES ${SOURCE_PATH}/morton-nd/include/*.h) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/morton-nd) diff --git a/ports/mosquitto/0001-win64-cmake.patch b/ports/mosquitto/0001-win64-cmake.patch deleted file mode 100644 index 70888b63723..00000000000 --- a/ports/mosquitto/0001-win64-cmake.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/config.h -+++ b/config.h -@@ -16,7 +16,7 @@ - # define EPROTO ECONNABORTED - #endif - --#ifdef WIN32 -+#ifdef WIN32 || WIN64 - # ifndef strcasecmp - # define strcasecmp strcmpi - # endif ---- a/lib/CMakeLists.txt -+++ b/lib/CMakeLists.txt -@@ -4,8 +4,8 @@ - if (${WITH_THREADING} STREQUAL ON) - add_definitions("-DWITH_THREADING") - if (WIN32) -- set (PTHREAD_LIBRARIES C:\\pthreads\\Pre-built.2\\lib\\x86\\pthreadVC2.lib) -- set (PTHREAD_INCLUDE_DIR C:\\pthreads\\Pre-built.2\\include) -+ set (PTHREAD_LIBRARIES ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/lib/pthreadsVC2.lib) -+ set (PTHREAD_INCLUDE_DIR ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/include) - else (WIN32) - find_library(LIBPTHREAD pthread) - if (LIBPTHREAD) ---- a/lib/net_mosq.h -+++ b/lib/net_mosq.h -@@ -20,7 +20,12 @@ - #include - #else - #include -+#if defined(_MSC_VER) && _MSC_VER > 1900 -+#undef ssize_t - typedef int ssize_t; -+#else -+typedef int ssize_t; -+#endif - #endif - - #include - diff --git a/ports/mosquitto/CONTROL b/ports/mosquitto/CONTROL index 81d12dc23b9..97b464e41c3 100644 --- a/ports/mosquitto/CONTROL +++ b/ports/mosquitto/CONTROL @@ -1,5 +1,5 @@ Source: mosquitto -Version: 1.4.15 +Version: 1.5.0 Build-Depends: c-ares, libwebsockets, openssl, pthreads Description: Mosquitto is an open source message broker that implements the MQ Telemetry Transport protocol versions 3.1 and 3.1.1. MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. This makes it diff --git a/ports/mosquitto/cmake.patch b/ports/mosquitto/cmake.patch deleted file mode 100644 index e20d3986e3e..00000000000 --- a/ports/mosquitto/cmake.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/lib/CMakeLists.txt -+++ b/lib/CMakeLists.txt -@@ -4,8 +4,8 @@ - if (${WITH_THREADING} STREQUAL ON) - add_definitions("-DWITH_THREADING") - if (WIN32) -- set (PTHREAD_LIBRARIES C:\\pthreads\\Pre-built.2\\lib\\x86\\pthreadVC2.lib) -- set (PTHREAD_INCLUDE_DIR C:\\pthreads\\Pre-built.2\\include) -+ set (PTHREAD_LIBRARIES ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/lib/pthreadsVC2.lib) -+ set (PTHREAD_INCLUDE_DIR ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/include) - else (WIN32) - find_library(LIBPTHREAD pthread) - if (LIBPTHREAD) diff --git a/ports/mosquitto/cmake-2.patch b/ports/mosquitto/output_folders-cmake.patch similarity index 51% rename from ports/mosquitto/cmake-2.patch rename to ports/mosquitto/output_folders-cmake.patch index bd5121c720e..5b1c60eb6a9 100644 --- a/ports/mosquitto/cmake-2.patch +++ b/ports/mosquitto/output_folders-cmake.patch @@ -1,68 +1,54 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3a68061..e4197fd 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -24,10 +24,10 @@ endif (WIN32) - add_definitions (-DCMAKE -DVERSION=\"${VERSION}\" -DTIMESTAMP=\"${TIMESTAMP}\") - - if (WIN32) -- set (BINDIR .) -- set (SBINDIR .) -+ set (BINDIR bin) -+ set (SBINDIR bin) - set (SYSCONFDIR .) -- set (LIBDIR .) -+ set (LIBDIR lib) - set (INCLUDEDIR include) - set (DATAROOTDIR share) - set (MANDIR man) -@@ -86,10 +86,10 @@ option(WITH_SRV "Include SRV lookup support?" ON) - add_subdirectory(lib) - add_subdirectory(client) - add_subdirectory(src) --add_subdirectory(man) -+#add_subdirectory(man) - - # ======================================== - # Install config file - # ======================================== - --install(FILES mosquitto.conf aclfile.example pskfile.example pwfile.example DESTINATION "${SYSCONFDIR}") -+#install(FILES mosquitto.conf aclfile.example pskfile.example pwfile.example DESTINATION "${SYSCONFDIR}") -diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt -index 1260761..aebd580 100644 ---- a/lib/CMakeLists.txt -+++ b/lib/CMakeLists.txt -@@ -4,8 +4,8 @@ option(WITH_THREADING "Include client library threading support?" ON) - if (${WITH_THREADING} STREQUAL ON) - add_definitions("-DWITH_THREADING") - if (WIN32) -- set (PTHREAD_LIBRARIES ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/lib/pthreadsVC2.lib) -- set (PTHREAD_INCLUDE_DIR ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/include) -+ find_library(PTHREAD_LIBRARIES NAMES pthreadsVC2) -+ find_path(PTHREAD_INCLUDE_DIR pthread.h) - else (WIN32) - find_library(LIBPTHREAD pthread) - if (LIBPTHREAD) -@@ -78,7 +78,7 @@ set_target_properties(libmosquitto PROPERTIES - SOVERSION 1 - ) - --install(TARGETS libmosquitto RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}") -+install(TARGETS libmosquitto RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}" ARCHIVE DESTINATION "${LIBDIR}") - install(FILES mosquitto.h DESTINATION "${INCLUDEDIR}") - - if (UNIX) -diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt -index b80dc18..e91ec77 100644 ---- a/lib/cpp/CMakeLists.txt -+++ b/lib/cpp/CMakeLists.txt -@@ -10,7 +10,7 @@ set_target_properties(mosquittopp PROPERTIES - VERSION ${VERSION} - SOVERSION 1 - ) --install(TARGETS mosquittopp RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}") -+install(TARGETS mosquittopp RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}" ARCHIVE DESTINATION "${LIBDIR}") - install(FILES mosquittopp.h DESTINATION "${INCLUDEDIR}") - - if (UNIX) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e1d631e..e95d7fb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,10 +16,10 @@ set (VERSION 1.5.0) + add_definitions (-DCMAKE -DVERSION=\"${VERSION}\") + + if (WIN32) +- set (BINDIR .) +- set (SBINDIR .) ++ set (BINDIR bin) ++ set (SBINDIR bin) + set (SYSCONFDIR .) +- set (LIBDIR .) ++ set (LIBDIR lib) + set (INCLUDEDIR include) + set (DATAROOTDIR share) + set (MANDIR man) +@@ -90,7 +90,7 @@ endif (${DOCUMENTATION} STREQUAL ON) + # Install config file + # ======================================== + +-install(FILES mosquitto.conf aclfile.example pskfile.example pwfile.example DESTINATION "${SYSCONFDIR}") ++#install(FILES mosquitto.conf aclfile.example pskfile.example pwfile.example DESTINATION "${SYSCONFDIR}") + + + # ======================================== +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 272b60a..c180067 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -104,7 +104,7 @@ set_target_properties(libmosquitto PROPERTIES + SOVERSION 1 + ) + +-install(TARGETS libmosquitto RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}") ++install(TARGETS libmosquitto RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}" ARCHIVE DESTINATION "${LIBDIR}") + + if (${WITH_STATIC_LIBRARIES} STREQUAL ON) + add_library(libmosquitto_static STATIC ${C_SRC}) +diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt +index 5e4f08e..a8cc6be 100644 +--- a/lib/cpp/CMakeLists.txt ++++ b/lib/cpp/CMakeLists.txt +@@ -13,7 +13,7 @@ set_target_properties(mosquittopp PROPERTIES + VERSION ${VERSION} + SOVERSION 1 + ) +-install(TARGETS mosquittopp RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}") ++install(TARGETS mosquittopp RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}" ARCHIVE DESTINATION "${LIBDIR}") + + if (${WITH_STATIC_LIBRARIES} STREQUAL ON) + add_library(mosquittopp_static STATIC + diff --git a/ports/mosquitto/portfile.cmake b/ports/mosquitto/portfile.cmake index a9c70f853a8..99fe483694b 100644 --- a/ports/mosquitto/portfile.cmake +++ b/ports/mosquitto/portfile.cmake @@ -12,17 +12,16 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO eclipse/mosquitto - REF v1.4.15 - SHA512 428ef9434d3fe022232dcde415fe8cd948d237507d512871803a116230f9e011c10fa01313111ced0946f906e8cc7e26d9eee5de6caa7f82590753a4d087f6fd + REF v1.5 + SHA512 f6a5c8e71d642ef931176fe428fb79353933facc2db226d9e55b87d4ff9bd6610a1bd05d71159e30c8afb1fda542d233630ae164770e652baa7ea51117211489 HEAD_REF master ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - "${CMAKE_CURRENT_LIST_DIR}/0001-win64-cmake.patch" - "${CMAKE_CURRENT_LIST_DIR}/cmake.patch" - "${CMAKE_CURRENT_LIST_DIR}/cmake-2.patch" + "${CMAKE_CURRENT_LIST_DIR}/win64-cmake.patch" + "${CMAKE_CURRENT_LIST_DIR}/output_folders-cmake.patch" ) vcpkg_configure_cmake( @@ -34,6 +33,7 @@ vcpkg_configure_cmake( -DWITH_TLS=ON -DWITH_TLS_PSK=ON -DWITH_THREADING=ON + -DDOCUMENTATION=OFF OPTIONS_RELEASE -DENABLE_DEBUG=OFF OPTIONS_DEBUG diff --git a/ports/mosquitto/win64-cmake.patch b/ports/mosquitto/win64-cmake.patch new file mode 100644 index 00000000000..a7ac936e09d --- /dev/null +++ b/ports/mosquitto/win64-cmake.patch @@ -0,0 +1,50 @@ +diff --git a/config.h b/config.h +index 906fad4..d5b2a72 100644 +--- a/config.h ++++ b/config.h +@@ -15,7 +15,7 @@ + # define EPROTO ECONNABORTED + #endif + +-#ifdef WIN32 ++#ifdef WIN32 || WIN64 + # ifndef strcasecmp + # define strcasecmp strcmpi + # endif +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index d537e77..272b60a 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -6,12 +6,8 @@ option(WITH_THREADING "Include client library threading support?" ON) + if (${WITH_THREADING} STREQUAL ON) + add_definitions("-DWITH_THREADING") + if (WIN32) +- if (CMAKE_CL_64) +- set (PTHREAD_LIBRARIES C:\\pthreads\\Pre-built.2\\lib\\x64\\pthreadVC2.lib) +- else (CMAKE_CL_64) +- set (PTHREAD_LIBRARIES C:\\pthreads\\Pre-built.2\\lib\\x86\\pthreadVC2.lib) +- endif (CMAKE_CL_64) +- set (PTHREAD_INCLUDE_DIR C:\\pthreads\\Pre-built.2\\include) ++ find_library(PTHREAD_LIBRARIES NAMES pthreadsVC2) ++ find_path(PTHREAD_INCLUDE_DIR pthread.h) + else (WIN32) + find_library(LIBPTHREAD pthread) + if (LIBPTHREAD) +diff --git a/lib/net_mosq.h b/lib/net_mosq.h +index b5d8549..be60659 100644 +--- a/lib/net_mosq.h ++++ b/lib/net_mosq.h +@@ -20,7 +20,12 @@ + #include + #else + #include ++#if defined(_MSC_VER) && _MSC_VER > 1900 ++#undef ssize_t + typedef int ssize_t; ++#else ++typedef int ssize_t; ++#endif + #endif + + #include "mosquitto_internal.h" + diff --git a/ports/mpg123/CONTROL b/ports/mpg123/CONTROL index 488ca7a9080..ca4f01835e9 100644 --- a/ports/mpg123/CONTROL +++ b/ports/mpg123/CONTROL @@ -1,3 +1,3 @@ Source: mpg123 -Version: 1.25.8-4 -Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3). \ No newline at end of file +Version: 1.25.8-5 +Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3). diff --git a/ports/mpg123/portfile.cmake b/ports/mpg123/portfile.cmake index 891542f00df..ff7645390d1 100644 --- a/ports/mpg123/portfile.cmake +++ b/ports/mpg123/portfile.cmake @@ -29,55 +29,128 @@ vcpkg_find_acquire_program(YASM) get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}") -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - "${CURRENT_PORT_DIR}/0001-fix-crt-linking.patch" - "${CURRENT_PORT_DIR}/0002-fix-x86-build.patch") +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CURRENT_PORT_DIR}/0001-fix-crt-linking.patch" + "${CURRENT_PORT_DIR}/0002-fix-x86-build.patch") -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj - RELEASE_CONFIGURATION Release_x86${MPG123_CONFIGURATION_SUFFIX} - DEBUG_CONFIGURATION Debug_x86${MPG123_CONFIGURATION_SUFFIX} -) + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj + RELEASE_CONFIGURATION Release_x86${MPG123_CONFIGURATION_SUFFIX} + DEBUG_CONFIGURATION Debug_x86${MPG123_CONFIGURATION_SUFFIX} + ) + + message(STATUS "Installing") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.dll + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.dll + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + else() + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug_x86/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release_x86/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + endif() -message(STATUS "Installing") -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.dll - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - ) - file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.dll - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - ) -else() - file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug_x86/libmpg123.pdb + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib ) file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release_x86/libmpg123.pdb + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib ) -endif() + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/mpg123.h + ${SOURCE_PATH}/src/libmpg123/fmt123.h + ${SOURCE_PATH}/src/libmpg123/mpg123.h.in + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + file(REMOVE_RECURSE ${SOURCE_PATH}/build/debug) + file(REMOVE_RECURSE ${SOURCE_PATH}/build/release) -file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib -) -file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib -) -file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/mpg123.h - ${SOURCE_PATH}/src/libmpg123/fmt123.h - ${SOURCE_PATH}/src/libmpg123/mpg123.h.in - DESTINATION ${CURRENT_PACKAGES_DIR}/include -) + ################ + # Debug build + ################ + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND "${SOURCE_PATH}/configure" --prefix=${SOURCE_PATH}/build/debug --enable-debug=yes --enable-static=yes --disable-dependency-tracking --with-default-audio=coreaudio --with-module-suffix=.so + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done.") + + message(STATUS "Installing ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND make -j install + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Installing ${TARGET_TRIPLET}-dbg done.") + + ################ + # Release build + ################ + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND make distclean + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + vcpkg_execute_required_process( + COMMAND "${SOURCE_PATH}/configure" --prefix=${SOURCE_PATH}/build/release --enable-static=yes --disable-dependency-tracking --with-default-audio=coreaudio --with-module-suffix=.so + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME config-${TARGET_TRIPLET}-rel + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done.") + + message(STATUS "Installing ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND make -j install + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + message(STATUS "Installing ${TARGET_TRIPLET}-rel done.") + + file( + INSTALL + "${SOURCE_PATH}/build/debug/include/fmt123.h" + "${SOURCE_PATH}/build/debug/include/mpg123.h" + "${SOURCE_PATH}/build/debug/include/out123.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include + ) + + file( + INSTALL + "${SOURCE_PATH}/build/debug/lib/libmpg123.a" + "${SOURCE_PATH}/build/debug/lib/libout123.a" + DESTINATION + ${CURRENT_INSTALLED_DIR}/debug/lib + ) + + file( + INSTALL + "${SOURCE_PATH}/build/release/lib/libmpg123.a" + "${SOURCE_PATH}/build/release/lib/libout123.a" + DESTINATION + ${CURRENT_PACKAGES_DIR}/lib + ) +endif() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpg123 RENAME copyright) diff --git a/ports/mpir/CONTROL b/ports/mpir/CONTROL index 22216d41d1e..59e80a6a8b0 100644 --- a/ports/mpir/CONTROL +++ b/ports/mpir/CONTROL @@ -1,3 +1,3 @@ Source: mpir -Version: 3.0.0-4 +Version: 3.0.0-6 Description: Multiple Precision Integers and Rationals. diff --git a/ports/mpir/portfile.cmake b/ports/mpir/portfile.cmake index c352b657a6e..42dd34c942e 100644 --- a/ports/mpir/portfile.cmake +++ b/ports/mpir/portfile.cmake @@ -8,91 +8,129 @@ if(VCPKG_CRT_LINKAGE STREQUAL "static" AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynam message(FATAL_ERROR "MPIR currently can only be built using the dynamic CRT when building DLLs") endif() -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO wbhart/mpir - REF mpir-3.0.0 - SHA512 7d37f60645c533a6638dde5d9c48f5535022fa0ea02bafd5b714649c70814e88c5e5e3b0bef4c5a749aaf8772531de89c331716ee00ba1c2f9521c2cc8f3c61b - HEAD_REF master -) +set(MPIR_VERSION 3.0.0) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/enable-runtimelibrary-toggle.patch" -) - -if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(MSVC_VERSION 15) -else() - set(MSVC_VERSION 14) -endif() - -if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_mpir_gc/dll_mpir_gc.vcxproj +if(VCPKG_CMAKE_SYSTEM_NAME) + vcpkg_download_distfile( + ARCHIVE + URLS "http://mpir.org/mpir-${MPIR_VERSION}.tar.bz2" + FILENAME mpir-${MPIR_VERSION}.tar.bz2 + SHA512 c735105db8b86db739fd915bf16064e6bc82d0565ad8858059e4e93f62c9d72d9a1c02a5ca9859b184346a8dc64fa714d4d61404cff1e405dc548cbd54d0a88e ) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${MPIR_VERSION} + ) + + vcpkg_find_acquire_program(YASM) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(SHARED_STATIC --enable-static --disable-shared) + else() + set(SHARED_STATIC --disable-static --enable-shared) + endif() + + set(OPTIONS --disable-silent-rules --enable-gmpcompat --enable-cxx ${SHARED_STATIC}) + + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + set(ENV{CXXFLAGS} "${VCPKG_CXX_FLAGS} ${VCPKG_CXX_FLAGS_DEBUG} -O0 -g") + set(ENV{CFLAGS} "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG} -O0 -g") + set(ENV{LDFLAGS} "${VCPKG_LINKER_FLAGS}") + vcpkg_execute_required_process( + COMMAND ${SOURCE_PATH}/configure --prefix=${CURRENT_PACKAGES_DIR}/debug ${OPTIONS} --with-sysroot=${CURRENT_INSTALLED_DIR}/debug + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME configure-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND make -j install + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME install-${TARGET_TRIPLET}-dbg + ) + + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + set(ENV{CXXFLAGS} "${VCPKG_CXX_FLAGS} ${VCPKG_CXX_FLAGS_RELEASE} -O2") + set(ENV{CFLAGS} "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE} -O2") + set(ENV{LDFLAGS} "${VCPKG_LINKER_FLAGS}") + vcpkg_execute_required_process( + COMMAND ${SOURCE_PATH}/configure --prefix=${CURRENT_PACKAGES_DIR} ${OPTIONS} --with-sysroot=${CURRENT_INSTALLED_DIR} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME configure-${TARGET_TRIPLET}-rel + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND make -j install + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME install-${TARGET_TRIPLET}-rel + ) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/info) + configure_file(${SOURCE_PATH}/COPYING.LIB ${CURRENT_PACKAGES_DIR}/share/mpir/copyright COPYONLY) else() + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wbhart/mpir + REF mpir-${MPIR_VERSION} + SHA512 7d37f60645c533a6638dde5d9c48f5535022fa0ea02bafd5b714649c70814e88c5e5e3b0bef4c5a749aaf8772531de89c331716ee00ba1c2f9521c2cc8f3c61b + HEAD_REF master + PATCHES enable-runtimelibrary-toggle.patch + ) + + if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(MSVC_VERSION 15) + else() + set(MSVC_VERSION 14) + endif() + + if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(DLL_OR_LIB dll) + else() + set(DLL_OR_LIB lib) + endif() + if(VCPKG_CRT_LINKAGE STREQUAL "static") set(RuntimeLibraryExt "") else() set(RuntimeLibraryExt "DLL") endif() + + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + file(GLOB FILES ${SOURCE_PATH}/*) + file(COPY ${FILES} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_mpir_gc/lib_mpir_gc.vcxproj + PROJECT_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/build.vc${MSVC_VERSION}/${DLL_OR_LIB}_mpir_gc/${DLL_OR_LIB}_mpir_gc.vcxproj OPTIONS_DEBUG "/p:RuntimeLibrary=MultiThreadedDebug${RuntimeLibraryExt}" OPTIONS_RELEASE "/p:RuntimeLibrary=MultiThreaded${RuntimeLibraryExt}" ) + + file(GLOB HEADERS + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/gmp.h + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/gmpxx.h + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpir.h + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpirxx.h + ) + file(COPY ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + + file(GLOB REL_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpir.dll) + file(GLOB REL_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpir.lib) + + file(GLOB DBG_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/mpir.dll) + file(GLOB DBG_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/mpir.lib) + + file(COPY ${REL_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(COPY ${REL_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY ${DBG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${DBG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + + vcpkg_copy_pdbs() + + configure_file(${SOURCE_PATH}/COPYING.lib ${CURRENT_PACKAGES_DIR}/share/mpir/copyright COPYONLY) endif() - -IF (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") - SET(BUILD_ARCH "Win32") -ELSE() - SET(BUILD_ARCH ${VCPKG_TARGET_ARCHITECTURE}) -ENDIF() - -if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - file(INSTALL - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/gmp.h - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/gmpxx.h - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.h - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpirxx.h - DESTINATION ${CURRENT_PACKAGES_DIR}/include - ) - file(INSTALL - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - ) - file(INSTALL - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Release/mpir.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - ) - file(INSTALL - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - ) - file(INSTALL - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Release/mpir.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - ) -else() - file(INSTALL - ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/gmp.h - ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/gmpxx.h - ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/mpir.h - ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/mpirxx.h - DESTINATION ${CURRENT_PACKAGES_DIR}/include - ) - file(INSTALL - ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/mpir.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - ) - file(INSTALL - ${SOURCE_PATH}/lib/${BUILD_ARCH}/Release/mpir.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - ) -endif() - -file(INSTALL ${SOURCE_PATH}/COPYING.lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpir RENAME copyright) -vcpkg_copy_pdbs() - -message(STATUS "Installing done") diff --git a/ports/ms-gsl/CONTROL b/ports/ms-gsl/CONTROL index bc4ac2d1d17..8d6d0214798 100644 --- a/ports/ms-gsl/CONTROL +++ b/ports/ms-gsl/CONTROL @@ -1,3 +1,3 @@ Source: ms-gsl -Version: 2018-03-17 +Version: 2018-11-08 Description: Microsoft implementation of the Guidelines Support Library \ No newline at end of file diff --git a/ports/ms-gsl/portfile.cmake b/ports/ms-gsl/portfile.cmake index c2ce611dffa..a130f9a351c 100644 --- a/ports/ms-gsl/portfile.cmake +++ b/ports/ms-gsl/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/GSL - REF d846fe50a3f0bb7767c7e087a05f4be95f4da0ec - SHA512 83560cb0c39b6a4781e916c6081ad2728296e1b19760ca1b6426a8431fb6d7093760a882c539dd77152f5892fe081b1795af6366ea91385bb10aba6adf27170f + REF c02ddae4bcff82b17826fe3127e835f5aa54b485 + SHA512 5fcb67d410a46a4e202c367bae59b1dd4f4220ac2b75a70bc34503612a616b2792e74a18b50901656d18a031cc32cf42da8673d3412ccfe8a236daa54eae44c7 HEAD_REF master ) diff --git a/ports/mujs/CONTROL b/ports/mujs/CONTROL index 10b776ab044..c61c7031e1f 100644 --- a/ports/mujs/CONTROL +++ b/ports/mujs/CONTROL @@ -1,3 +1,3 @@ Source: mujs -Version: 25821e6d74fab5fcc200fe5e818362e03e114428 +Version: 2018-07-30 Description: An embeddable Javascript interpreter in C diff --git a/ports/mujs/portfile.cmake b/ports/mujs/portfile.cmake index 9af5984e8ee..f8c64c867af 100644 --- a/ports/mujs/portfile.cmake +++ b/ports/mujs/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ccxvii/mujs - REF 25821e6d74fab5fcc200fe5e818362e03e114428 - SHA512 8f4ae9151ce6b7ef4b1951d23f95167d16a2acb0eba4ee656ad56c92cd19af3e049c6903533d93caf0206f776374f3203b6a3f3e1748c4e720dc11ed8ac26342 + REF c86267d8b2b5f9a6ae318dc69886109eee0c7b61 + SHA512 927b000cd6a28b785d510917445a5a39a4dbaf0e13eab920cf83c7838b111b8a0542cfab0110f8493dc65b88a48261deb6ba7a871cbe77fb46119b536a69d470 HEAD_REF master ) diff --git a/ports/nana/CMakeLists.txt b/ports/nana/CMakeLists.txt new file mode 100644 index 00000000000..7cd9865dcb6 --- /dev/null +++ b/ports/nana/CMakeLists.txt @@ -0,0 +1,86 @@ +cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +project(nana VERSION 1.5.5 LANGUAGES CXX) + +option(NANA_ENABLE_PNG "Enable PNG support" OFF) +option(NANA_ENABLE_JPEG "Enable JPEG support" OFF) +option(NANA_INSTALL_HEADERS "Install headers" ON) + +if(APPLE) + add_definitions(-DAPPLE) +elseif(UNIX) + add_definitions(-Dlinux) +endif() + +file(GLOB_RECURSE headers include/*.hpp) +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/include PREFIX "include" FILES ${headers}) + +file(GLOB sources source/*.hpp source/*.cpp) +foreach(subdir detail filesystem gui paint system threads) + file(GLOB_RECURSE sources_subdir source/${subdir}/*.hpp source/${subdir}/*.cpp) + list(APPEND sources ${sources_subdir}) +endforeach() +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/source PREFIX "source" FILES ${sources}) + +add_library(nana ${headers} ${sources}) +target_include_directories(nana PUBLIC + $ + $) + +target_compile_features(nana PUBLIC cxx_std_14) + +if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + target_link_libraries(nana PUBLIC c++experimental) +endif() + +if(CMAKE_CXX_COMPILER_ID MATCHES "GCC") + target_link_libraries(nana PUBLIC stdc++fs) +endif() + +if(UNIX) + find_package(Threads REQUIRED) + target_link_libraries(nana PUBLIC Threads::Threads) + + find_package(Freetype REQUIRED) + target_link_libraries(nana PUBLIC Freetype::Freetype) + + find_package(X11 REQUIRED) + target_include_directories(nana PUBLIC ${X11_INCLUDE_DIR}) + target_link_libraries(nana PUBLIC ${X11_LIBRARIES} ${X11_Xft_LIB}) + + find_library(FONTCONFIG_LIB NAMES fontconfig) + target_link_libraries(nana PUBLIC ${FONTCONFIG_LIB}) +endif() + +if(NANA_ENABLE_PNG) + find_package(PNG REQUIRED) + target_link_libraries(nana PUBLIC PNG::PNG) + target_compile_definitions(nana PUBLIC NANA_ENABLE_PNG=1 USE_LIBPNG_FROM_OS=1) +endif() + +if(NANA_ENABLE_JPEG) + find_package(JPEG REQUIRED) + target_include_directories(nana PUBLIC ${JPEG_INCLUDE_DIR}) + target_link_libraries(nana PUBLIC $) + target_compile_definitions(nana PUBLIC NANA_ENABLE_JPEG=1 USE_LIBJPEG_FROM_OS=1) +endif() + +install(TARGETS nana EXPORT nana + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +if(NANA_INSTALL_HEADERS) + install(DIRECTORY include/nana DESTINATION include) +endif() + +include(CMakePackageConfigHelpers) + +configure_package_config_file(config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/unofficial-nana-config.cmake + INSTALL_DESTINATION share/unofficial-nana) + +write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/unofficial-nana-config-version.cmake + VERSION ${PROJECT_VERSION} COMPATIBILITY SameMajorVersion) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-nana-config.cmake DESTINATION share/unofficial-nana) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-nana-config-version.cmake DESTINATION share/unofficial-nana) +install(EXPORT nana FILE unofficial-nana-targets.cmake NAMESPACE unofficial::nana:: DESTINATION share/unofficial-nana) diff --git a/ports/nana/CONTROL b/ports/nana/CONTROL index 41d7188b994..09b9cba0de5 100644 --- a/ports/nana/CONTROL +++ b/ports/nana/CONTROL @@ -1,4 +1,4 @@ Source: nana -Version: 1.5.5 +Version: 1.6.2 Description: Cross-platform library for GUI programming in modern C++ style. -Build-Depends: libpng, libjpeg-turbo +Build-Depends: libpng, libjpeg-turbo, freetype (!uwp&&!windows), fontconfig (!uwp&&!windows) diff --git a/ports/nana/config.cmake.in b/ports/nana/config.cmake.in new file mode 100644 index 00000000000..8a18bbdf476 --- /dev/null +++ b/ports/nana/config.cmake.in @@ -0,0 +1,26 @@ +@PACKAGE_INIT@ + +if(UNIX) + find_package(Threads REQUIRED) + find_package(Freetype REQUIRED) + find_package(X11 REQUIRED) + find_library(FONTCONFIG_LIB NAMES fontconfig) +endif() + +if(@NANA_ENABLE_PNG@) + find_package(PNG REQUIRED) +endif() + +if(@NANA_ENABLE_JPEG@) + find_package(JPEG REQUIRED) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/unofficial-nana-targets.cmake") + +if(UNIX) + target_link_libraries(unofficial::nana::nana INTERFACE ${FONTCONFIG_LIB} ${X11_LIBRARIES} ${X11_Xft_LIB}) +endif() + +if(@NANA_ENABLE_JPEG@) + target_link_libraries(unofficial::nana::nana INTERFACE ${JPEG_LIBRARIES}) +endif() diff --git a/ports/nana/portfile.cmake b/ports/nana/portfile.cmake index fc492ee4448..ff9f43145d4 100644 --- a/ports/nana/portfile.cmake +++ b/ports/nana/portfile.cmake @@ -3,26 +3,35 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(VCPKG_LIBRARY_LINKAGE static) endif() +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(WARNING "You will need to install Xorg dependencies to use nana:\napt install libx11-dev libxft-dev\n") +endif() + include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cnjinhao/nana - REF v1.5.5 - SHA512 d28348b807e131f5868a162cf5b914523246ab5c4d4395186377f54dff9ad91199b13f640e05b5d959347ebfb570df79d5de39abfd690d8831034063422e3587 + REF v1.6.2 + SHA512 95271764813e64126abf2941bfc13b399ffe093c570891f65f331505066ce0dcad7df4170b2616951b7e0234ea2d6d21219cdfd15b112ecf598a3afa992cceb4 HEAD_REF develop ) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.cmake.in DESTINATION ${SOURCE_PATH}) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DMSVC_USE_STATIC_RUNTIME=OFF # dont override our settings - -DNANA_CMAKE_ENABLE_PNG=ON - -DNANA_CMAKE_ENABLE_JPEG=ON + -DNANA_ENABLE_PNG=ON + -DNANA_ENABLE_JPEG=ON OPTIONS_DEBUG - -DNANA_CMAKE_INSTALL_INCLUDES=OFF) + -DNANA_INSTALL_HEADERS=OFF) vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-nana TARGET_PATH share/unofficial-nana) + vcpkg_copy_pdbs() file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nana) diff --git a/ports/nanodbc/CONTROL b/ports/nanodbc/CONTROL index 0343119a05b..ef676937e35 100644 --- a/ports/nanodbc/CONTROL +++ b/ports/nanodbc/CONTROL @@ -1,3 +1,3 @@ Source: nanodbc -Version: 2.12.4-1 +Version: 2.12.4-2 Description: A small C++ wrapper for the native C ODBC API. diff --git a/ports/nanodbc/portfile.cmake b/ports/nanodbc/portfile.cmake index fc735f03fc7..ff90b4b197c 100644 --- a/ports/nanodbc/portfile.cmake +++ b/ports/nanodbc/portfile.cmake @@ -1,17 +1,23 @@ -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported yet. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/nanodbc-2.12.4) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/lexicalunit/nanodbc/archive/v2.12.4.tar.gz" - FILENAME "nanodbc-2.12.4.tar.gz" +# Only static libraries are supported. +# See https://github.com/nanodbc/nanodbc/issues/13 +if(VCPKG_USE_HEAD_VERSION) # v2.13 + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +else() # v2.12.4 + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nanodbc/nanodbc + REF v2.12.4 SHA512 b9a924516b2a777e5f1497774997672320548722ed53413b0a7ad5d503e2f8ca1099f5059a912b7aae410928f4c4edcdfd02e4cfbf415976cd222697b354b4e6 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) +# Legacy, remove at release of v2.13 +if(NOT VCPKG_USE_HEAD_VERSION) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES @@ -20,18 +26,27 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/0003_export_def.patch ${CMAKE_CURRENT_LIST_DIR}/0004_unicode.patch ) +endif() +# /Legacy vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS + OPTIONS +# Legacy, remove at release of v2.13 -DNANODBC_EXAMPLES=OFF -DNANODBC_TEST=OFF -DNANODBC_USE_UNICODE=ON +# /Legacy + -DNANODBC_DISABLE_EXAMPLES=ON + -DNANODBC_DISABLE_TESTS=ON + -DNANODBC_ENABLE_UNICODE=ON ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +endif() -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nanodbc) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/nanodbc/LICENSE ${CURRENT_PACKAGES_DIR}/share/nanodbc/copyright) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nanodbc RENAME copyright) diff --git a/ports/nanomsg/CONTROL b/ports/nanomsg/CONTROL index c39df5e95a4..8e7f6a2f0df 100644 --- a/ports/nanomsg/CONTROL +++ b/ports/nanomsg/CONTROL @@ -1,4 +1,4 @@ Source: nanomsg -Version: 1.1.2 +Version: 1.1.4 Description: a simple high-performance implementation of several "scalability protocols". These scalability protocols are light-weight messaging protocols which can be used to solve a number of very common messaging patterns, such as request/reply, publish/subscribe, surveyor/respondent, and so forth. These protocols can run over a variety of transports such as TCP, UNIX sockets, and even WebSocket. diff --git a/ports/nanomsg/portfile.cmake b/ports/nanomsg/portfile.cmake index a869baea400..ca6d5c26094 100644 --- a/ports/nanomsg/portfile.cmake +++ b/ports/nanomsg/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nanomsg/nanomsg - REF 1.1.2 - SHA512 f95ce24b34c25d139cf3de46585f6354e0311a9d5e7135ad71df62b8bb5df26f81a58b9773c39c320df2d0e97cd2905a8576f9f00b0a4d33774f1b610271cee5 + REF 1.1.4 + SHA512 a1f002f988f2d98eff03387b496fe15a099fef4eb9ccd1c46ade63fbbe5a4ad4cf9fa0fd1e612e1a6f2747bc2af63b7044ec1e920e1c9a0d8c8bc2191ad7046a HEAD_REF master ) @@ -23,6 +23,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/nanomsg") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") diff --git a/ports/nanorange/CONTROL b/ports/nanorange/CONTROL new file mode 100644 index 00000000000..0ff1b400feb --- /dev/null +++ b/ports/nanorange/CONTROL @@ -0,0 +1,3 @@ +Source: nanorange +Version: 0.0.0 +Description: NanoRange is a C++14 implementation of the C++20 Ranges proposals. \ No newline at end of file diff --git a/ports/nanorange/portfile.cmake b/ports/nanorange/portfile.cmake new file mode 100644 index 00000000000..aa039c3cf6d --- /dev/null +++ b/ports/nanorange/portfile.cmake @@ -0,0 +1,24 @@ +# header-only +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tcbrindle/NanoRange + HEAD_REF master +) + +# +#vcpkg_configure_cmake( +# SOURCE_PATH ${SOURCE_PATH} +# PREFER_NINJA +#) +#vcpkg_build_cmake() +# + +# Copy header files +file(COPY ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp") + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/nanorange) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/nanorange/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/nanorange/copyright) + diff --git a/ports/nanovg/CMakeLists.txt b/ports/nanovg/CMakeLists.txt new file mode 100644 index 00000000000..87a7d3339bb --- /dev/null +++ b/ports/nanovg/CMakeLists.txt @@ -0,0 +1,31 @@ +cmake_minimum_required(VERSION 3.11) +project(nanovg C) + +set(NANOVG_SOURCES src/nanovg.c) +set(NANOVG_HEADERS src/nanovg.h src/nanovg_gl.h src/nanovg_gl_utils.h) +add_library(nanovg STATIC ${NANOVG_SOURCES} ${NANOVG_HEADERS}) +set_target_properties(nanovg PROPERTIES PUBLIC_HEADER "${NANOVG_HEADERS}") +target_include_directories(nanovg PRIVATE 3rdparty/nanovg/src) + +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + target_compile_definitions(nanovg PRIVATE DEBUG) +else() + target_compile_definitions(nanovg PRIVATE NDEBUG) +endif() + +install(TARGETS nanovg + EXPORT nanovgTargets + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + PUBLIC_HEADER DESTINATION include) + +install(EXPORT nanovgTargets + FILE nanovgTargets.cmake + NAMESPACE nanovg:: + DESTINATION share/nanovg) + +include(CMakePackageConfigHelpers) +install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/nanovgConfig.cmake + DESTINATION share/nanovg) diff --git a/ports/nanovg/CONTROL b/ports/nanovg/CONTROL new file mode 100644 index 00000000000..c074c182460 --- /dev/null +++ b/ports/nanovg/CONTROL @@ -0,0 +1,3 @@ +Source: nanovg +Version: master +Description: NanoVG is small antialiased vector graphics rendering library for OpenGL. diff --git a/ports/nanovg/nanovgConfig.cmake b/ports/nanovg/nanovgConfig.cmake new file mode 100644 index 00000000000..e849dff1157 --- /dev/null +++ b/ports/nanovg/nanovgConfig.cmake @@ -0,0 +1 @@ +include(${CMAKE_CURRENT_LIST_DIR}/nanovgTargets.cmake) diff --git a/ports/nanovg/portfile.cmake b/ports/nanovg/portfile.cmake new file mode 100644 index 00000000000..39e36720e19 --- /dev/null +++ b/ports/nanovg/portfile.cmake @@ -0,0 +1,41 @@ +# 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 = +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# + +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO memononen/nanovg + REF f4069e6a1ad5da430fb0a9c57476d5ddc2ff89b2 + SHA512 5f2313be939478d40e52c74e3935cbae91277be5c0e466a6d303e8d80e7bf0781288cb319b2e8cec5c7d6fc991be16bec6e0f5228153895ff7fe3abdffe5320e + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/nanovgConfig.cmake DESTINATION ${SOURCE_PATH}) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright + file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/nanovg RENAME copyright) diff --git a/ports/nghttp2/CONTROL b/ports/nghttp2/CONTROL index f4ff49ae06c..d68720137ee 100644 --- a/ports/nghttp2/CONTROL +++ b/ports/nghttp2/CONTROL @@ -1,3 +1,3 @@ Source: nghttp2 -Version: 1.30.0-1 +Version: 1.35.0 Description: Implementation of the Hypertext Transfer Protocol version 2 in C diff --git a/ports/nghttp2/enable-static.patch b/ports/nghttp2/enable-static.patch index 3b58979cf8c..18e58daeb94 100644 --- a/ports/nghttp2/enable-static.patch +++ b/ports/nghttp2/enable-static.patch @@ -1,23 +1,27 @@ diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt -index 0846d06..290679f 100644 +index 17e422b..b2e7a6e 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt -@@ -38,7 +38,7 @@ if(WIN32) +@@ -37,8 +37,8 @@ if(WIN32) + set(NGHTTP2_RES ${CMAKE_CURRENT_BINARY_DIR}/version.rc) endif() - # Public shared library +-# Public shared library -add_library(nghttp2 SHARED ${NGHTTP2_SOURCES} ${NGHTTP2_RES}) ++# Public library +add_library(nghttp2 ${NGHTTP2_SOURCES} ${NGHTTP2_RES}) set_target_properties(nghttp2 PROPERTIES COMPILE_FLAGS "${WARNCFLAGS}" VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION} -@@ -48,6 +48,9 @@ target_include_directories(nghttp2 INTERFACE - "${CMAKE_CURRENT_BINARY_DIR}/includes" +@@ -49,6 +49,10 @@ target_include_directories(nghttp2 INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/includes" ) + +if(NOT BUILD_SHARED_LIBS) + target_compile_definitions(nghttp2 PUBLIC "-DNGHTTP2_STATICLIB") +endif() - - if(HAVE_CUNIT) ++ + if(HAVE_CUNIT OR ENABLE_STATIC_LIB) # Static library (for unittests because of symbol visibility) + add_library(nghttp2_static STATIC ${NGHTTP2_SOURCES}) + diff --git a/ports/nghttp2/portfile.cmake b/ports/nghttp2/portfile.cmake index 3c082c19138..52f754afb9b 100644 --- a/ports/nghttp2/portfile.cmake +++ b/ports/nghttp2/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) set(LIB_NAME nghttp2) -set(LIB_VERSION 1.30.0) +set(LIB_VERSION 1.35.0) set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.gz) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) @@ -9,7 +9,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://github.com/nghttp2/nghttp2/releases/download/v${LIB_VERSION}/${LIB_FILENAME}" FILENAME "${LIB_FILENAME}" - SHA512 26ce717a085e9fbdf8e644d4c8ab6961ca60029c4dfa112c9932523d1c4cc3f40fda4283afddf78a649e7f6fb7d3f3bfce3197186a4f70819b5996e8158089da + SHA512 65889545684e2c8b4aeeb7084ca36e3f78927fa2b6d1df906af3970d8ce6c7c6093b56a5e0713f7bb54a98f06ad52d6e2b323e760297610702afe526b0fdd577 ) vcpkg_extract_source_archive(${ARCHIVE}) diff --git a/ports/nlohmann-json/CONTROL b/ports/nlohmann-json/CONTROL index b0eee2bf992..1e628ba81b5 100644 --- a/ports/nlohmann-json/CONTROL +++ b/ports/nlohmann-json/CONTROL @@ -1,3 +1,3 @@ Source: nlohmann-json -Version: 3.1.2 +Version: 3.4.0 Description: JSON for Modern C++ diff --git a/ports/nlohmann-json/portfile.cmake b/ports/nlohmann-json/portfile.cmake index 44f7a86dcad..d3926cab639 100644 --- a/ports/nlohmann-json/portfile.cmake +++ b/ports/nlohmann-json/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(SOURCE_VERSION 3.1.2) +set(SOURCE_VERSION 3.4.0) vcpkg_download_distfile(HEADER URLS "https://github.com/nlohmann/json/releases/download/v${SOURCE_VERSION}/json.hpp" FILENAME "nlohmann-json-${SOURCE_VERSION}.hpp" - SHA512 05df0ad3338f0bca885c0aa9da523922b99016986a9b01426b13888c0febd83bf1f6f063886f6c75f8a656ef79abac6292fe442dc05b1897d546ba5b70be48a5 + SHA512 a1bdb4b434ee34cbc360e0203f500b25e15d7e1a6d25ea6e3bd3b56a5e7ec47d8c0bbe074930b7a07d6ceaf2112eefa24da9c1f0595aaf12c88697048238166d ) vcpkg_download_distfile(LICENSE diff --git a/ports/nlopt/CONTROL b/ports/nlopt/CONTROL index 22d763b0b01..c8077487848 100644 --- a/ports/nlopt/CONTROL +++ b/ports/nlopt/CONTROL @@ -1,3 +1,3 @@ Source: nlopt -Version: 2.4.2-c43afa08d~vcpkg1-1 +Version: 2.4.2-1226c127 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 index f2370b0c0b2..f9d204b33f9 100644 --- a/ports/nlopt/portfile.cmake +++ b/ports/nlopt/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO stevengj/nlopt - REF c43afa08d4fe086d9c00c37924a6bd4c9de71816 - SHA512 e063d748b040f081a648b33dadaf9b7deef63ff3be0cffd8988816701c18694202f5bcf06a18991f1f4b35014e3f406ffa4404d4036ff7625d3680bd5e24f8e4 + REF 1226c1276dacf3687464c65eb165932281493a35 + SHA512 889f60cd6970b17296871396366bd0d868011d71ca4b88cb6da906283f928e5b443ab18c5af48a0701c8bf68b6d66288a3e4f248e0ab8183251aa7c3b0cfd652 HEAD_REF master ) diff --git a/ports/nng/CONTROL b/ports/nng/CONTROL new file mode 100644 index 00000000000..de66fb2c650 --- /dev/null +++ b/ports/nng/CONTROL @@ -0,0 +1,7 @@ +Source: nng +Version: 1.1.0 +Description: NNG, like its predecessors nanomsg (and to some extent ZeroMQ), is a lightweight, broker-less library, offering a simple API to solve common recurring messaging problems, such as publish/subscribe, RPC-style request/reply, or service discovery. + +Feature: mbedtls +Description: nng built with TLS support(needs mbedTLS) +Build-Depends: mbedtls diff --git a/ports/nng/portfile.cmake b/ports/nng/portfile.cmake new file mode 100644 index 00000000000..b16632ff973 --- /dev/null +++ b/ports/nng/portfile.cmake @@ -0,0 +1,40 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nanomsg/nng + REF v1.1.0 + SHA512 79f8d66cdf1d8f0f50f888edf59b46671ca7439d1da0f25e5f729bd1365b4bc2969c90a377bbd25c41f84eeb231d03fb0bc7c2d5435e3e55f4cf80ae62f9b934 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" NNG_STATIC_LIB) + +if("mbedtls" IN_LIST FEATURES) + set(NNG_ENABLE_TLS ON) +else() + set(NNG_ENABLE_TLS OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE + -DNNG_STATIC_LIB=${NNG_STATIC_LIB} + -DNNG_TESTS=OFF + -DNNG_ENABLE_NNGCAT=OFF + -DNNG_ENABLE_TLS=${NNG_ENABLE_TLS} +) + +vcpkg_install_cmake() + +# Move CMake config files to the right place +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nng) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Put the licence file where vcpkg expects it +configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/nng/copyright COPYONLY) + +vcpkg_copy_pdbs() diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL index 82fba8753f7..f7d01c295ce 100644 --- a/ports/nuklear/CONTROL +++ b/ports/nuklear/CONTROL @@ -1,3 +1,3 @@ Source: nuklear -Version: 2018-04-17 +Version: 2018-11-01 Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/ports/nuklear/portfile.cmake b/ports/nuklear/portfile.cmake index 99b60f8e6a2..b7e6bfff89b 100644 --- a/ports/nuklear/portfile.cmake +++ b/ports/nuklear/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vurtun/nuklear - REF b91a815c826619bfcacacad090e31b2dd3e1a20c - SHA512 d1966cd01a3d6e75608426f2813ec038dff1291674d481899c031248f0469b47b78f3e35b86a78090e3f019cc478c606d2b78bcc80117fb54de9ed5df22883a0 + REF 181cfd86c47ae83eceabaf4e640587b844e613b6 + SHA512 33f6200d046c96b8d42ff851ba788bf4f57d8aa99591b866e8691204378f23d5dce06343521834cd10ffaecc42566d97ce2c3becf48caaadf0cdc270cf69bdbb HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/octomap/CONTROL b/ports/octomap/CONTROL index 6b26d7ef110..21c72834f94 100644 --- a/ports/octomap/CONTROL +++ b/ports/octomap/CONTROL @@ -1,3 +1,3 @@ Source: octomap -Version: cefed0c1d79afafa5aeb05273cf1246b093b771c-2 +Version: cefed0c1d79afafa5aeb05273cf1246b093b771c-3 Description: An Efficient Probabilistic 3D Mapping Framework Based on Octrees diff --git a/ports/octomap/portfile.cmake b/ports/octomap/portfile.cmake index 099a1ed7892..e07551dbef8 100644 --- a/ports/octomap/portfile.cmake +++ b/ports/octomap/portfile.cmake @@ -4,20 +4,20 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) endif() include(vcpkg_common_functions) -set(GIT_REF "cefed0c1d79afafa5aeb05273cf1246b093b771c") -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/octomap-${GIT_REF}) -vcpkg_download_distfile(ARCHIVE - URLS "https://codeload.github.com/OctoMap/octomap/zip/${GIT_REF}" - FILENAME "octomap-${GIT_REF}.zip" - SHA512 0d470ea9929a80366314a6e99717f68f489e8b58f26ae79bd02b7c1a4f1d8ee64591d61d95154724caefc5a0b71e1dab96a1280d9ff927c6e4d854b25b509295 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OctoMap/octomap + REF cefed0c1d79afafa5aeb05273cf1246b093b771c + SHA512 8fdea8b33680488d41e570d55ff88c20b923efb9d48238031f9b96d2e3917dbe7e49699769de63794f4b1d24e40a99615151e72487f30de340a3abf6522ea156 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DBUILD_OCTOVIS_SUBPROJECT=OFF -DBUILD_DYNAMICETD3D_SUBPROJECT=OFF -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + OPTIONS + -DBUILD_OCTOVIS_SUBPROJECT=OFF + -DBUILD_DYNAMICETD3D_SUBPROJECT=OFF + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON ) vcpkg_install_cmake() @@ -43,9 +43,7 @@ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/eval_octree_accuracy.exe) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/graph2tree.exe) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/log2graph.exe) -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/octomap/octomap-targets-debug.cmake _contents) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" _contents "${_contents}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/octomap/octomap-targets-debug.cmake "${_contents}") +vcpkg_fixup_cmake_targets(CONFIG_PATH share/octomap) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) @@ -56,4 +54,4 @@ file(COPY ${SOURCE_PATH}/octomap/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR} file(RENAME ${CURRENT_PACKAGES_DIR}/share/octomap/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/octomap/copyright) vcpkg_copy_pdbs() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/octomap) \ No newline at end of file +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/octomap) diff --git a/ports/ogdf/CONTROL b/ports/ogdf/CONTROL new file mode 100644 index 00000000000..fe2cf909cc1 --- /dev/null +++ b/ports/ogdf/CONTROL @@ -0,0 +1,3 @@ +Source: ogdf +Version: 2018-03-28-2 +Description: Open Graph Drawing Framework diff --git a/ports/ogdf/portfile.cmake b/ports/ogdf/portfile.cmake new file mode 100644 index 00000000000..5ad5e72cabc --- /dev/null +++ b/ports/ogdf/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/2018-03-28/OGDF-snapshot) +vcpkg_download_distfile(ARCHIVE + URLS "http://www.ogdf.net/lib/exe/fetch.php/tech%3aogdf-snapshot-2018-03-28.zip" + FILENAME "ogdf-2018-03-28.zip" + SHA512 a6ddb33bc51dca4d59fcac65ff66459043b11ce5303e9d40e4fc1756adf84a0af7d0ac7debab670111e7a145dcdd9373c0e350d5b7e831b169811f246b6e19b6 +) +vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src/2018-03-28) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCOIN_INSTALL_LIBRARY_DIR:STRING=lib + -DCOIN_INSTALL_CMAKE_DIR:STRING=lib/cmake/OGDF + -DOGDF_INSTALL_LIBRARY_DIR:STRING=lib + -DOGDF_INSTALL_CMAKE_DIR:STRING=lib/cmake/OGDF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OGDF) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogdf RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/minisat/doc ${CURRENT_PACKAGES_DIR}/include/ogdf/lib/minisat/doc) diff --git a/ports/ogre/001-cmake-install-dir.patch b/ports/ogre/001-cmake-install-dir.patch index 27c6d2f70f9..548f946f7eb 100644 --- a/ports/ogre/001-cmake-install-dir.patch +++ b/ports/ogre/001-cmake-install-dir.patch @@ -1,5 +1,5 @@ ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt +--- a/CMake/CMakeLists.txt ++++ b/CMake/CMakeLists.txt @@ -13,10 +13,12 @@ # directory, but can also be used for custom projects. ############################################################# @@ -8,7 +8,7 @@ - set(OGRE_CMAKE_DIR "CMake") -else() - set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") -+if (NOT DEFINED OGRE_CMAKE_DIR) ++if(NOT DEFINED OGRE_CMAKE_DIR) + if(WIN32 OR APPLE) + set(OGRE_CMAKE_DIR "CMake") + else() @@ -16,10 +16,10 @@ + endif() endif() - set(INST_FILES ---- a/cmake/InstallResources.cmake -+++ b/cmake/InstallResources.cmake -@@ -241,10 +241,12 @@ endif () + set(INST_FILES Utils/FindPkgMacros.cmake) +--- a/CMake/InstallResources.cmake ++++ b/CMake/InstallResources.cmake +@@ -242,10 +242,12 @@ # Create the CMake package files include(CMakePackageConfigHelpers) @@ -27,7 +27,7 @@ - set(OGRE_CMAKE_DIR "CMake") -else() - set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") -+if (NOT DEFINED OGRE_CMAKE_DIR) ++if(NOT DEFINED OGRE_CMAKE_DIR) + if(WIN32 OR APPLE) + set(OGRE_CMAKE_DIR "CMake") + else() diff --git a/ports/ogre/002-link-optimized-lib-workaround.patch b/ports/ogre/002-link-optimized-lib-workaround.patch new file mode 100644 index 00000000000..b2678f488d7 --- /dev/null +++ b/ports/ogre/002-link-optimized-lib-workaround.patch @@ -0,0 +1,37 @@ +--- a/CMake/Dependencies.cmake ++++ b/CMake/Dependencies.cmake +@@ -199,6 +199,11 @@ + # Find zlib + find_package(ZLIB) + macro_log_feature(ZLIB_FOUND "zlib" "Simple data compression library" "http://www.zlib.net" FALSE "" "") ++# replace optimized/debug keyword with generator expression ++unset(ZLIB_LIBRARY) ++set(ZLIB_LIBRARY $<$:${ZLIB_LIBRARY_RELEASE}> $<$:${ZLIB_LIBRARY_DEBUG}>) ++unset(ZLIB_LIBRARIES) ++set(ZLIB_LIBRARIES ${ZLIB_LIBRARY}) + + if (ZLIB_FOUND) + # Find zziplib +@@ -213,6 +218,11 @@ + # Find FreeType + find_package(Freetype) + macro_log_feature(FREETYPE_FOUND "freetype" "Portable font engine" "http://www.freetype.org" FALSE "" "") ++# replace optimized/debug keyword with generator expression ++unset(FREETYPE_LIBRARY) ++set(FREETYPE_LIBRARY $<$:${FREETYPE_LIBRARY_RELEASE}> $<$:${FREETYPE_LIBRARY_DEBUG}>) ++unset(FREETYPE_LIBRARIES) ++set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY}) + + # Find X11 + if (UNIX AND NOT APPLE AND NOT ANDROID AND NOT EMSCRIPTEN) +--- src.orig/CMake/Utils/FindPkgMacros.cmake ++++ src.new/CMake/Utils/FindPkgMacros.cmake +@@ -82,7 +82,7 @@ + if (${PREFIX}_FWK) + set(${PREFIX} ${${PREFIX}_FWK}) + elseif (${PREFIX}_REL AND ${PREFIX}_DBG) +- set(${PREFIX} optimized ${${PREFIX}_REL} debug ${${PREFIX}_DBG}) ++ set(${PREFIX} $<$:${${PREFIX}_REL}> $<$:${${PREFIX}_DBG}>) + elseif (${PREFIX}_REL) + set(${PREFIX} ${${PREFIX}_REL}) + elseif (${PREFIX}_DBG) diff --git a/ports/ogre/CONTROL b/ports/ogre/CONTROL index f7d93e7b25d..288e558e94e 100644 --- a/ports/ogre/CONTROL +++ b/ports/ogre/CONTROL @@ -1,5 +1,5 @@ Source: ogre -Version: 1.10.11 +Version: 1.11.3-3 Build-Depends: freeimage, freetype, zlib, zziplib Description: 3D Object-Oriented Graphics Rendering Engine diff --git a/ports/ogre/portfile.cmake b/ports/ogre/portfile.cmake index 8281960c6fd..74cb8a1c0a3 100644 --- a/ports/ogre/portfile.cmake +++ b/ports/ogre/portfile.cmake @@ -3,15 +3,12 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OGRECave/ogre - REF v1.10.11 - SHA512 2dfedd6f0a0de1a8c687c001439138b233200ca11e5c9940debf43d8a0380ca6472e0b5f4d599f0e22ca2049d0a5d34066ef41b6bc4912130694fa5d851fc900 + REF v1.11.3 + SHA512 af52821022ab6148e64fdf183b1aa4607b101c7d0edc20d2ccc909f50eed218d7a283fa3b58260fd41cd3f324ecafad8c5137c66e05786580b043240551b2c42 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - "${CMAKE_CURRENT_LIST_DIR}/001-cmake-install-dir.patch" + 001-cmake-install-dir.patch + 002-link-optimized-lib-workaround.patch ) if (VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -58,10 +55,7 @@ vcpkg_configure_cmake( -DOGRE_INSTALL_CMAKE=ON -DOGRE_INSTALL_VSPROPS=OFF -DOGRE_STATIC=${OGRE_STATIC} - -DOGRE_UNITY_BUILD=OFF - -DOGRE_USE_STD11=ON -DOGRE_CONFIG_THREAD_PROVIDER=std - -DOGRE_NODE_STORAGE_LEGACY=OFF -DOGRE_BUILD_RENDERSYSTEM_D3D11=ON -DOGRE_BUILD_RENDERSYSTEM_GL=ON -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=ON @@ -95,33 +89,31 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link ${CURRENT_PACKAGES_DIR}/lib/manual-link) +if(NOT VCPKG_CMAKE_SYSTEM_NAME) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/OgreMain.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/OgreMain.lib) + else() + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/OgreMainStatic.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/OgreMainStatic.lib) + endif() + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/OgreMain_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/OgreMain_d.lib) + else() + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/OgreMainStatic_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/OgreMainStatic_d.lib) + endif() + endif() -file(GLOB MAIN_REL ${CURRENT_PACKAGES_DIR}/lib/OgreMain.lib ${CURRENT_PACKAGES_DIR}/lib/OgreMainStatic.lib) -file(COPY ${MAIN_REL} DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(GLOB MAIN_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/OgreMain_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/OgreMainStatic_d.lib) -file(COPY ${MAIN_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -file(REMOVE ${MAIN_REL} ${MAIN_DBG}) - -# Ogre installs custom cmake config files which don't follow the normal pattern. -# This normally makes them completely incompatible with multi-config generators, but with some effort it can be done. -file(READ "${CURRENT_PACKAGES_DIR}/share/ogre/OGREConfig.cmake" _contents) -string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${PACKAGE_PREFIX_DIR}" _contents "${_contents}") -string(REPLACE "SDL2main.lib" "SDL2main$<$:d>.lib" _contents "${_contents}") -string(REPLACE "SDL2.lib" "SDL2$<$:d>.lib" _contents "${_contents}") -string(REPLACE "\${PACKAGE_PREFIX_DIR}/lib" "\${PACKAGE_PREFIX_DIR}$<$:/debug>/lib" _contents "${_contents}") -string(REPLACE "{OGRE_PREFIX_DIR}/lib" "{OGRE_PREFIX_DIR}$<$:/debug>/lib" _contents "${_contents}") - -string(REPLACE "\"Ogre\${COMPONENT}\"" "\"Ogre\${COMPONENT}$<$:_d>\"" _contents "${_contents}") -string(REPLACE "\"Ogre\${COMPONENT}Static\"" "\"Ogre\${COMPONENT}Static$<$:_d>\"" _contents "${_contents}") - -string(REPLACE "\"\${TYPE}_\${COMPONENT}\"" "\"\${TYPE}_\${COMPONENT}$<$:_d>\"" _contents "${_contents}") -string(REPLACE "\"\${TYPE}_\${COMPONENT}Static\"" "\"\${TYPE}_\${COMPONENT}Static$<$:_d>\"" _contents "${_contents}") - -string(REPLACE "\"OgreMain\"" "\"\${PACKAGE_PREFIX_DIR}/lib/manual-link/OgreMain$<$:_d>.lib\"" _contents "${_contents}") -string(REPLACE "\"OgreMainStatic\"" "\"\${PACKAGE_PREFIX_DIR}/lib/manual-link/OgreMainStatic$<$:_d>.lib\"" _contents "${_contents}") - -file(WRITE "${CURRENT_PACKAGES_DIR}/share/ogre/OGREConfig.cmake" "${_contents}") + file(GLOB SHARE_FILES ${CURRENT_PACKAGES_DIR}/share/ogre/*.cmake) + foreach(SHARE_FILE ${SHARE_FILES}) + file(READ "${SHARE_FILE}" _contents) + string(REPLACE "lib/OgreMain" "lib/manual-link/OgreMain" _contents "${_contents}") + file(WRITE "${SHARE_FILE}" "${_contents}") + endforeach() +endif() # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre RENAME copyright) diff --git a/ports/openal-soft/CONTROL b/ports/openal-soft/CONTROL index f7af2c6872a..6f16b26bda2 100644 --- a/ports/openal-soft/CONTROL +++ b/ports/openal-soft/CONTROL @@ -1,3 +1,3 @@ Source: openal-soft -Version: 1.18.2-1 +Version: 1.19.1 Description: OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API. diff --git a/ports/openal-soft/portfile.cmake b/ports/openal-soft/portfile.cmake index 527b4ba60aa..0af13af6ccc 100644 --- a/ports/openal-soft/portfile.cmake +++ b/ports/openal-soft/portfile.cmake @@ -6,16 +6,12 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO kcat/openal-soft - REF openal-soft-1.18.2 - SHA512 85c62d3d16d2a371c1930310eed7219031203824289d9a30d60000f8e124ffa67e1bbfb15f1ba6841ef7346e88c000b9cca51c79d32c02e5dc9870392c536723 + REF openal-soft-1.19.1 + SHA512 4a64cc90ddeaa3773610b0bc8023d231100f3396f3fc5bd079db81600f80a789c75e6af03391bfc78a903c96bb71f8052a9ae802ea81422028e5b12b7eb6c47b HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/dont-export-symbols-in-static-build.patch - ${CMAKE_CURRENT_LIST_DIR}/cmake-3-11.patch + dont-export-symbols-in-static-build.patch + cmake-3-11.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") @@ -24,6 +20,14 @@ else() set(OPENAL_LIBTYPE "STATIC") endif() +if(VCPKG_CMAKE_SYSTEM_NAME) + set(ALSOFT_REQUIRE_WINDOWS OFF) + set(ALSOFT_REQUIRE_LINUX ON) +else() + set(ALSOFT_REQUIRE_WINDOWS ON) + set(ALSOFT_REQUIRE_LINUX OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -36,7 +40,7 @@ vcpkg_configure_cmake( -DALSOFT_CONFIG=OFF -DALSOFT_HRTF_DEFS=OFF -DALSOFT_AMBDEC_PRESETS=OFF - -DALSOFT_BACKEND_ALSA=OFF + -DALSOFT_BACKEND_ALSA=${ALSOFT_REQUIRE_LINUX} -DALSOFT_BACKEND_OSS=OFF -DALSOFT_BACKEND_SOLARIS=OFF -DALSOFT_BACKEND_SNDIO=OFF @@ -47,9 +51,9 @@ vcpkg_configure_cmake( -DALSOFT_BACKEND_JACK=OFF -DALSOFT_BACKEND_OPENSL=OFF -DALSOFT_BACKEND_WAVE=ON - -DALSOFT_REQUIRE_WINMM=ON - -DALSOFT_REQUIRE_DSOUND=ON - -DALSOFT_REQUIRE_MMDEVAPI=ON + -DALSOFT_REQUIRE_WINMM=${ALSOFT_REQUIRE_WINDOWS} + -DALSOFT_REQUIRE_DSOUND=${ALSOFT_REQUIRE_WINDOWS} + -DALSOFT_REQUIRE_MMDEVAPI=${ALSOFT_REQUIRE_WINDOWS} ) vcpkg_install_cmake() diff --git a/ports/opencv/0001-winrt-fixes.patch b/ports/opencv/0001-winrt-fixes.patch index f913d92a409..fa8c8cfc906 100644 --- a/ports/opencv/0001-winrt-fixes.patch +++ b/ports/opencv/0001-winrt-fixes.patch @@ -1,17 +1,6 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -311,7 +311,7 @@ OCV_OPTION(INSTALL_TESTS "Install accuracy and performance test binar - # OpenCV build options - # =================================================== - OCV_OPTION(ENABLE_CCACHE "Use ccache" (UNIX AND NOT IOS AND (CMAKE_GENERATOR MATCHES "Makefile" OR CMAKE_GENERATOR MATCHES "Ninja")) ) --OCV_OPTION(ENABLE_PRECOMPILED_HEADERS "Use precompiled headers" ON IF (NOT IOS AND NOT CMAKE_CROSSCOMPILING) ) -+OCV_OPTION(ENABLE_PRECOMPILED_HEADERS "Use precompiled headers" ON IF (NOT IOS AND (MSVC OR NOT CMAKE_CROSSCOMPILING)) ) - OCV_OPTION(ENABLE_SOLUTION_FOLDERS "Solution folder in Visual Studio or in other IDEs" (MSVC_IDE OR CMAKE_GENERATOR MATCHES Xcode) ) - OCV_OPTION(ENABLE_PROFILING "Enable profiling in the GCC compiler (Add flags: -g -pg)" OFF IF CMAKE_COMPILER_IS_GNUCXX ) - OCV_OPTION(ENABLE_COVERAGE "Enable coverage collection with GCov" OFF IF CMAKE_COMPILER_IS_GNUCXX ) --- a/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake -@@ -842,7 +842,7 @@ macro(ocv_create_module) +@@ -848,7 +848,7 @@ macro(ocv_create_module) set(the_module_target ${the_module}) endif() diff --git a/ports/opencv/0002-install-options.patch b/ports/opencv/0002-install-options.patch index 830c9f385f1..03e1334f145 100644 --- a/ports/opencv/0002-install-options.patch +++ b/ports/opencv/0002-install-options.patch @@ -1,6 +1,8 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c7c76ecf3..d1c14bfcd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -307,6 +307,10 @@ OCV_OPTION(INSTALL_PYTHON_EXAMPLES "Install Python examples" OFF ) +@@ -312,6 +312,10 @@ OCV_OPTION(INSTALL_PYTHON_EXAMPLES "Install Python examples" OFF ) OCV_OPTION(INSTALL_ANDROID_EXAMPLES "Install Android examples" OFF IF ANDROID ) OCV_OPTION(INSTALL_TO_MANGLED_PATHS "Enables mangled install paths, that help with side by side installs." OFF IF (UNIX AND NOT ANDROID AND NOT APPLE_FRAMEWORK AND BUILD_SHARED_LIBS) ) OCV_OPTION(INSTALL_TESTS "Install accuracy and performance test binaries and test data" OFF) @@ -8,21 +10,12 @@ +OCV_OPTION(INSTALL_LICENSE "Install license file" ON) +OCV_OPTION(INSTALL_OTHER "Install other files" ON) +OCV_OPTION(INSTALL_FORCE_UNIX_PATHS "Force unix-style installation" OFF) - + # OpenCV build options # =================================================== -@@ -335,7 +339,7 @@ OCV_OPTION(CV_ENABLE_INTRINSICS "Use intrinsic-based optimized code" ON ) - OCV_OPTION(CV_DISABLE_OPTIMIZATION "Disable explicit optimized code (dispatched code/intrinsics/loop unrolling/etc)" OFF ) - OCV_OPTION(CV_TRACE "Enable OpenCV code trace" ON) - --OCV_OPTION(ENABLE_PYLINT "Add target with Pylint checks" (${BUILD_DOCS} OR ${BUILD_EXAMPLES}) IF (NOT CMAKE_CROSSCOMPILING AND NOT APPLE_FRAMEWORK) ) -+OCV_OPTION(ENABLE_PYLINT "Add target with Pylint checks" (BUILD_DOCS OR BUILD_EXAMPLES) IF (NOT CMAKE_CROSSCOMPILING AND NOT APPLE_FRAMEWORK) ) - - if(ENABLE_IMPL_COLLECTION) - add_definitions(-DCV_COLLECT_IMPL_DATA) -@@ -372,7 +376,9 @@ else() +@@ -378,7 +382,9 @@ else() endif() - + if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) - if(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH) + if(DEFINED OpenCV_DISABLE_ARCH_PATH) @@ -31,9 +24,9 @@ ocv_update(OpenCV_INSTALL_BINARIES_PREFIX "${OpenCV_ARCH}/${OpenCV_RUNTIME}/") else() message(STATUS "Can't detect runtime and/or arch") -@@ -427,12 +433,8 @@ else() +@@ -433,12 +439,8 @@ else() ocv_update(3P_LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/3rdparty/lib${LIB_SUFFIX}") - + if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) - if(OpenCV_STATIC) - ocv_update(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib${LIB_SUFFIX}") @@ -46,26 +39,28 @@ ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH samples) ocv_update(OPENCV_JAR_INSTALL_PATH java) ocv_update(OPENCV_OTHER_INSTALL_PATH etc) -@@ -895,7 +897,7 @@ if(NOT OPENCV_LICENSE_FILE) +@@ -901,7 +903,7 @@ if(NOT OPENCV_LICENSE_FILE) endif() - + # for UNIX it does not make sense as LICENSE and readme will be part of the package automatically -if(ANDROID OR NOT UNIX) +if(ANDROID OR NOT UNIX AND INSTALL_LICENSE) install(FILES ${OPENCV_LICENSE_FILE} PERMISSIONS OWNER_READ GROUP_READ WORLD_READ DESTINATION ./ COMPONENT libs) +diff --git a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake +index b2ca82bad..c2f6e001d 100644 --- a/cmake/OpenCVGenConfig.cmake +++ b/cmake/OpenCVGenConfig.cmake @@ -105,7 +105,7 @@ function(ocv_gen_config TMP_DIR NESTED_PATH ROOT_NAME) endif() endfunction() - + -if((CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" OR UNIX) AND NOT ANDROID) +if(((CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" OR UNIX) AND NOT ANDROID) OR INSTALL_FORCE_UNIX_PATHS) ocv_gen_config("${CMAKE_BINARY_DIR}/unix-install" "" "") endif() - + @@ -117,7 +117,7 @@ endif() # -------------------------------------------------------------------------------------------- # Part 3/3: ${BIN_DIR}/win-install/OpenCVConfig.cmake -> For use within binary installers/packages @@ -75,6 +70,8 @@ if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows) if(BUILD_SHARED_LIBS) set(_lib_suffix "lib") +diff --git a/cmake/OpenCVGenHeaders.cmake b/cmake/OpenCVGenHeaders.cmake +index 477b91055..57dc82e13 100644 --- a/cmake/OpenCVGenHeaders.cmake +++ b/cmake/OpenCVGenHeaders.cmake @@ -1,7 +1,9 @@ @@ -85,20 +82,23 @@ +if(INSTALL_HEADERS) + install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) +endif() - + # platform-specific config file ocv_compiler_optimization_fill_cpu_config() @@ -29,4 +31,6 @@ set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE #endforeach() - + configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/opencv_modules.hpp.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp") -install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) +if(INSTALL_HEADERS) + install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) +endif() +\ No newline at end of file +diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake +index 54f100d3c..eae83b074 100644 --- a/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake -@@ -994,7 +994,9 @@ macro(_ocv_create_module) +@@ -1000,7 +1000,9 @@ macro(_ocv_create_module) foreach(hdr ${OPENCV_MODULE_${the_module}_HEADERS}) string(REGEX REPLACE "^.*opencv2/" "opencv2/" hdr2 "${hdr}") if(NOT hdr2 MATCHES "private" AND hdr2 MATCHES "^(opencv2/?.*)/[^/]+.h(..)?$" ) @@ -109,21 +109,25 @@ endif() endforeach() endif() +diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt +index 1f0d72008..86b9d8929 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,8 +1,10 @@ file(GLOB HAAR_CASCADES haarcascades/*.xml) file(GLOB LBP_CASCADES lbpcascades/*.xml) - + -install(FILES ${HAAR_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/haarcascades COMPONENT libs) -install(FILES ${LBP_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/lbpcascades COMPONENT libs) +if(INSTALL_OTHER) + install(FILES ${HAAR_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/haarcascades COMPONENT libs) + install(FILES ${LBP_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/lbpcascades COMPONENT libs) +endif() - + if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH) install(DIRECTORY "${OPENCV_TEST_DATA_PATH}/" DESTINATION "${OPENCV_TEST_DATA_INSTALL_PATH}" COMPONENT "tests") +diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt +index b4e48e6fa..5ac6f1603 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -1,7 +1,9 @@ diff --git a/ports/opencv/0005-remove-protobuf-target.patch b/ports/opencv/0005-remove-protobuf-target.patch index b538ee0405c..a31e6d16816 100644 --- a/ports/opencv/0005-remove-protobuf-target.patch +++ b/ports/opencv/0005-remove-protobuf-target.patch @@ -1,6 +1,8 @@ +diff --git a/cmake/OpenCVFindProtobuf.cmake b/cmake/OpenCVFindProtobuf.cmake +index b9171f14f..6e06310b1 100644 --- a/cmake/OpenCVFindProtobuf.cmake +++ b/cmake/OpenCVFindProtobuf.cmake -@@ -44,17 +44,6 @@ else() +@@ -43,17 +43,6 @@ else() # end of compatibility block if(Protobuf_FOUND) @@ -11,21 +13,10 @@ - add_library(libprotobuf UNKNOWN IMPORTED) - set_target_properties(libprotobuf PROPERTIES - IMPORTED_LOCATION "${Protobuf_LIBRARY}" -- INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}" +- INTERFACE_INCLUDE_SYSTEM_DIRECTORIES "${Protobuf_INCLUDE_DIR}" - ) - get_protobuf_version(Protobuf_VERSION "${Protobuf_INCLUDE_DIR}") - endif() set(HAVE_PROTOBUF TRUE) endif() endif() ---- a/modules/dnn/CMakeLists.txt -+++ b/modules/dnn/CMakeLists.txt -@@ -65,7 +65,7 @@ endif() - - ocv_module_include_directories(${fw_inc} ${CMAKE_CURRENT_LIST_DIR}/src/ocl4dnn/include ${OPENCL_INCLUDE_DIRS}) - ocv_glob_module_sources(SOURCES ${fw_srcs}) --ocv_create_module(libprotobuf ${LAPACK_LIBRARIES}) -+ocv_create_module() - ocv_add_samples() - ocv_add_accuracy_tests() - ocv_add_perf_tests() diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 5450f390672..e1d1248b0ca 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.4.1 +Version: 3.4.3-3 Build-Depends: zlib Description: computer vision library Default-Features: opengl, jpeg, png, tiff, eigen, flann diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 78ed5fa5160..966c914b0e7 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -1,17 +1,13 @@ include(vcpkg_common_functions) -set(OPENCV_PORT_VERSION "3.4.1") +set(OPENCV_PORT_VERSION "3.4.3") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO opencv/opencv REF ${OPENCV_PORT_VERSION} - SHA512 e1fc14285090c6fe9e26e721f2d67d7096650c523147e925567426ef76aa7f4c6f12035d6f6ce3ec7991a75a6828a810fd4f9b75f78ed5fcccecefbadd79944b + SHA512 d653a58eb5e3939b9fdb7438ac35f77cf4385cf72d5d22bfd21722a109e1b3283dbb9407985061b7548114f0d05c9395aac9bb62b4d2bc1f68da770a49987fef HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-winrt-fixes.patch" "${CMAKE_CURRENT_LIST_DIR}/0002-install-options.patch" @@ -20,8 +16,6 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/0005-remove-protobuf-target.patch" ) -file(WRITE "${CURRENT_BUILDTREES_DIR}/src/opencv-${OPENCV_PORT_VERSION}/rework.stamp") - string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) set(CMAKE_MODULE_PATH) @@ -116,17 +110,17 @@ set(WITH_FFMPEG OFF) if("ffmpeg" IN_LIST FEATURES) set(WITH_FFMPEG ON) vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/0a0e88972a7ea97708378d0488a65f83e7cc5e69/ffmpeg/opencv_ffmpeg.dll" - FILENAME "opencv-cache/ffmpeg/b8120c07962d591e2e9071a1bf566fd0-opencv_ffmpeg.dll" - SHA512 53325e3bb04de19273270475d7b7d9190c950b0d12e1179feef63c69ba66c9f8593d8ed9b030109dee8c104ab5babea69f18c7cae7366a57d48272d67c00d871 + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/8041bd6f5ad37045c258904ba3030bb3442e3911/ffmpeg/opencv_ffmpeg.dll" + FILENAME "opencv-cache/ffmpeg/fa5a2a4e2f37defcb95bde8ed145c2b3-opencv_ffmpeg.dll" + SHA512 875f922e1d9fc2fe7c8e879ede35b1001b6ad8b3c4d71feb3823421ce861f580df3418c791315b23870fcb0378d297b01e0761d3f65277ff11ec2fef8c0b08b7 ) vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/0a0e88972a7ea97708378d0488a65f83e7cc5e69/ffmpeg/opencv_ffmpeg_64.dll" - FILENAME "opencv-cache/ffmpeg/dc9c50e7b05482acc25d6ce0ac61bf1d-opencv_ffmpeg_64.dll" - SHA512 7d90df6f5d141f842a45e5678cf1349657612321250ece4ad5c6b5fb28a50140735d91ced0ce1a6e81962ef87236cbd1669c0b4410308f70fccee341a7a5c28b + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/8041bd6f5ad37045c258904ba3030bb3442e3911/ffmpeg/opencv_ffmpeg_64.dll" + FILENAME "opencv-cache/ffmpeg/2cc08fc4fef8199fe80e0f126684834f-opencv_ffmpeg_64.dll" + SHA512 4e74aa4cb115f103b929f93bbc8dcf675de7d0c7916f8f0a80ac46761134b088634be95f959ce5827753ae9ecb2365ca40440dfbb9a9bf89f22ee11b6c8342b3 ) vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/0a0e88972a7ea97708378d0488a65f83e7cc5e69/ffmpeg/ffmpeg_version.cmake" + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/8041bd6f5ad37045c258904ba3030bb3442e3911/ffmpeg/ffmpeg_version.cmake" FILENAME "opencv-cache/ffmpeg/3b90f67f4b429e77d3da36698cef700c-ffmpeg_version.cmake" SHA512 7d0142c30ac6f6260c1bcabc22753030fd25a708477fa28053e8df847c366967d3b93a8ac14af19a2b7b73d9f8241749a431458faf21a0c8efc7d6d99eecfdcf ) @@ -137,16 +131,16 @@ if("ipp" IN_LIST FEATURES) set(WITH_IPP ON) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - vcpkg_download_distfile(IPPICV_ARCHIVE - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/dfe3162c237af211e98b8960018b564bc209261d/ippicv/ippicv_2017u3_win_intel64_general_20170822.zip" - FILENAME "opencv-cache/ippicv/0421e642bc7ad741a2236d3ec4190bdd-ippicv_2017u3_win_intel64_general_20170822.zip" - SHA512 1b2b66ac60e5b6ba2fc95a3839d09b7fcfb42628dc6e01648727ee5394f6405702f69f741371627a9e1690294147c730196f1c9872339301c92a1424f159df6c + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/bdb7bb85f34a8cb0d35e40a81f58da431aa1557a/ippicv/ippicv_2017u3_win_intel64_general_20180518.zip" + FILENAME "opencv-cache/ippicv/915ff92958089ede8ea532d3c4fe7187-ippicv_2017u3_win_intel64_general_20180518.zip" + SHA512 8aa08292d542d521c042864446e47a7a6bdbf3896d86fc7b43255459c24a2e9f34a4e9b177023d178fed7a2e82a9db410f89d81375a542d049785d263f46c64d ) else() vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/dfe3162c237af211e98b8960018b564bc209261d/ippicv/ippicv_2017u3_win_ia32_general_20170822.zip" - FILENAME "opencv-cache/ippicv/8a7680ae352c192de2e2e34936164bd0-ippicv_2017u3_win_ia32_general_20170822.zip" - SHA512 6bbe08264b56117d4a00118088d72274396964bb904fb0719fc48beeb458ac31bea3d4d2fa2e0449f55af42471758f2c090c82061c91985c8b7994ed3b71df81 + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/bdb7bb85f34a8cb0d35e40a81f58da431aa1557a/ippicv/ippicv_2017u3_win_ia32_general_20180518.zip" + FILENAME "opencv-cache/ippicv/928168c2d99ab284047dfcfb7a821d91-ippicv_2017u3_win_ia32_general_20180518.zip" + SHA512 b89b0fb739152303cafc9fb064fa8b24fd94850697137ccbb5c1e344e0f5094115603a5e3be3a25f85d0faefc5c53429a7d65da0142d012ada41e8db2bcdd6b7 ) endif() endif() @@ -218,7 +212,7 @@ if(BUILD_opencv_contrib) OUT_SOURCE_PATH CONTRIB_SOURCE_PATH REPO opencv/opencv_contrib REF ${OPENCV_PORT_VERSION} - SHA512 431dfba0f413071d7faa18bc6e6f5e4f015285e2cc730c5dd69b2a4d6aa4250b7e0bcb1814ac6f06f5c76f103aea1f93f72f32aee6bc0cd7ddacdaf1f40075c1 + SHA512 456c6f878fb3bd5459f6430405cf05c609431f8d7db743aa699fc75c305d019682ee3a804bf0cf5107597dd1dbbb69b08be3535a0e6c717e4773ed7c05d08e59 HEAD_REF master ) set(BUILD_WITH_CONTRIB_FLAG "-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules") diff --git a/ports/openexr/fix-static-linking.patch b/ports/openexr/fix-static-linking.patch new file mode 100644 index 00000000000..af2f067f127 --- /dev/null +++ b/ports/openexr/fix-static-linking.patch @@ -0,0 +1,14 @@ +diff --git a/IlmImf/CMakeLists.txt b/IlmImf/CMakeLists.txt +index 18d90edc..21bbaa27 100644 +--- a/IlmImf/CMakeLists.txt ++++ b/IlmImf/CMakeLists.txt +@@ -25,8 +25,8 @@ ADD_EXECUTABLE ( dwaLookups + + TARGET_LINK_LIBRARIES ( dwaLookups + Half +- Iex${ILMBASE_LIBSUFFIX} + IlmThread${ILMBASE_LIBSUFFIX} ++ Iex${ILMBASE_LIBSUFFIX} + ${PTHREAD_LIB} + ) + diff --git a/ports/openexr/portfile.cmake b/ports/openexr/portfile.cmake index 7e3b6603fc4..b02a487a9f3 100644 --- a/ports/openexr/portfile.cmake +++ b/ports/openexr/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/add-missing-export.patch" "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-static-linking.patch" ) # Ensure helper executables can run during build @@ -20,7 +21,7 @@ set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin") # In debug build buildsystem cannot locate IlmBase headers set(VCPKG_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG}") -set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -I\"${CURRENT_INSTALLED_DIR}/include/OpenExr\"") +set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -I\"${CURRENT_INSTALLED_DIR}/include/OpenEXR\"") vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA diff --git a/ports/opengl-registry/CONTROL b/ports/opengl-registry/CONTROL new file mode 100644 index 00000000000..1a3635c3500 --- /dev/null +++ b/ports/opengl-registry/CONTROL @@ -0,0 +1,4 @@ +Source: opengl-registry +Version: 2018-06-30-1 +Build-Depends: egl-registry +Description: the API and Extension registries for the OpenGL family APIs diff --git a/ports/opengl-registry/portfile.cmake b/ports/opengl-registry/portfile.cmake new file mode 100644 index 00000000000..7b38b2c0721 --- /dev/null +++ b/ports/opengl-registry/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/OpenGL-Registry + REF e18e52a14e902a9ee29c5bf87478ac2ca21bb06b + SHA512 3b883115e138178984a751ee314b0589a7a20db3bc7cff96fa0b886be1779c24031ce65847386aa2d4f42823b1597edccc5a9afc0aef42fea8611a44d2ca5df6 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/api/GL DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY + ${SOURCE_PATH}/xml/gl.xml + ${SOURCE_PATH}/xml/glx.xml + ${SOURCE_PATH}/xml/wgl.xml + DESTINATION ${CURRENT_PACKAGES_DIR}/share/opengl-registry +) + +# Using the Makefile because it is the smallest file with a complete copy of the license text +file( + INSTALL ${SOURCE_PATH}/xml/Makefile + DESTINATION ${CURRENT_PACKAGES_DIR}/share/opengl-registry + RENAME copyright +) diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index 7da61fcb779..86ae5bd5508 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -1,4 +1,8 @@ Source: openimageio -Version: 1.8.10 +Version: 1.8.16 Description: A library for reading and writing images, and a bunch of related classes, utilities, and application -Build-Depends: libjpeg-turbo, tiff, libpng, openexr, boost-thread, boost-smart-ptr, boost-foreach, boost-regex, boost-type-traits, boost-static-assert, boost-unordered, boost-config, boost-algorithm, boost-filesystem, boost-system, boost-thread, boost-asio, boost-random +Build-Depends: libjpeg-turbo, tiff, libpng, openexr, boost-thread, boost-smart-ptr, boost-foreach, boost-regex, boost-type-traits, boost-static-assert, boost-unordered, boost-config, boost-algorithm, boost-filesystem, boost-system, boost-thread, boost-asio, boost-random, robin-map + +Feature: libraw +Build-Depends: libraw +Description: Enable RAW image files support diff --git a/ports/openimageio/fix_libraw.patch b/ports/openimageio/fix_libraw.patch new file mode 100644 index 00000000000..0870a567f75 --- /dev/null +++ b/ports/openimageio/fix_libraw.patch @@ -0,0 +1,40 @@ +diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake +index 5eeb7d3..3e8bfcb 100644 +--- a/src/cmake/externalpackages.cmake ++++ b/src/cmake/externalpackages.cmake +@@ -336,7 +336,7 @@ if (USE_LIBRAW) + message (STATUS "Looking for LibRaw with ${LIBRAW_PATH}") + endif () + find_package (LibRaw) +- if (LibRaw_r_LIBRARIES AND LibRaw_INCLUDE_DIR) ++ if (LibRaw_LIBRARIES AND LibRaw_INCLUDE_DIR) + set (LIBRAW_FOUND TRUE) + include_directories (${LibRaw_INCLUDE_DIR}) + if (NOT LibRaw_FIND_QUIETLY) +@@ -350,7 +350,7 @@ if (USE_LIBRAW) + if (LINKSTATIC) + find_package (Jasper) + find_library (LCMS2_LIBRARIES NAMES lcms2) +- set (LibRaw_r_LIBRARIES ${LibRaw_r_LIBRARIES} ${JASPER_LIBRARIES} ${LCMS2_LIBRARIES}) ++ set (LibRaw_LIBRARIES ${LibRaw_LIBRARIES} ${JASPER_LIBRARIES} ${LCMS2_LIBRARIES}) + endif () + else () + message (STATUS "Not using LibRaw") +@@ -494,4 +494,3 @@ if (USE_DICOM) + endif() + # end DCMTK setup + ########################################################################### +- +diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt +index e3608a2..f503035 100644 +--- a/src/raw.imageio/CMakeLists.txt ++++ b/src/raw.imageio/CMakeLists.txt +@@ -1,7 +1,7 @@ + if (USE_LIBRAW AND LIBRAW_FOUND) + add_oiio_plugin (rawinput.cpp + INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} +- LINK_LIBRARIES ${LibRaw_r_LIBRARIES} ++ LINK_LIBRARIES ${LibRaw_LIBRARIES} + DEFINITIONS "-DUSE_LIBRAW=1") + else () + message (WARNING "Raw plugin will not be built") diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index a9bc3560849..93b04e6275c 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -3,11 +3,19 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OpenImageIO/oiio - REF Release-1.8.10 - SHA512 8b80019feb6bffd63bdd64e4ddad5a85b42f0ed7c27f7d82475b60b0b4db3945bd70d8d75921dd9ae8830b941d7eef6b89364ee1ab418558b75397a784314949 + REF Release-1.8.16 + SHA512 a919341df7d9625a869cad266d8434881b63a47f3da8daccf4bbab6675d45bd121ff780dd911a7447450fee44cd7bdd42d73aec59a99b667d6d98e79682db2c7 HEAD_REF master + PATCHES + # fix_libraw: replace 'LibRaw_r_LIBRARIES' occurences by 'LibRaw_LIBRARIES' + # since libraw port installs 'raw_r' library as 'raw' + fix_libraw.patch + use-webp.patch ) +file(REMOVE_RECURSE "${SOURCE_PATH}/ext") +file(MAKE_DIRECTORY "${SOURCE_PATH}/ext/robin-map/tsl") + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILDSTATIC ON) set(LINKSTATIC ON) @@ -16,6 +24,12 @@ else() set(LINKSTATIC OFF) endif() +# Features +set(USE_LIBRAW OFF) +if("libraw" IN_LIST FEATURES) + set(USE_LIBRAW ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -23,20 +37,29 @@ vcpkg_configure_cmake( -DOIIO_BUILD_TOOLS=OFF -DOIIO_BUILD_TESTS=OFF -DHIDE_SYMBOLS=ON + -DUSE_DICOM=OFF -DUSE_FFMPEG=OFF -DUSE_FIELD3D=OFF -DUSE_FREETYPE=OFF -DUSE_GIF=OFF - -DUSE_LIBRAW=OFF + -DUSE_LIBRAW=${USE_LIBRAW} -DUSE_NUKE=OFF -DUSE_OCIO=OFF -DUSE_OPENCV=OFF -DUSE_OPENJPEG=OFF + -DUSE_OPENSSL=OFF -DUSE_PTEX=OFF -DUSE_PYTHON=OFF -DUSE_QT=OFF + -DUSE_WEBP=OFF -DBUILDSTATIC=${BUILDSTATIC} -DLINKSTATIC=${LINKSTATIC} + -DBUILD_MISSING_PYBIND11=OFF + -DBUILD_MISSING_DEPS=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON + -DVERBOSE=ON + OPTIONS_DEBUG + -DOPENEXR_CUSTOM_LIB_DIR=${CURRENT_INSTALLED_DIR}/debug/lib ) vcpkg_install_cmake() diff --git a/ports/openimageio/use-webp.patch b/ports/openimageio/use-webp.patch new file mode 100644 index 00000000000..1b03636e98e --- /dev/null +++ b/ports/openimageio/use-webp.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index abd4e23..12a7f54 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -87,6 +87,7 @@ option (USE_FREETYPE "Use Freetype if found" ON) + option (USE_GIF "Use GIF if found" ON) + option (USE_PTEX "Use PTex if found" ON) + option (USE_LIBRAW "Use LibRaw if found" ON) ++option (USE_WEBP "Use WebP if found" ON) + set (LIBRAW_PATH "" CACHE STRING "Custom LibRaw path") + option (OIIO_THREAD_ALLOW_DCLP "OIIO threads may use DCLP for speed" ON) + option (USE_NUKE "Build Nuke plugins, if Nuke is found" ON) +diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake +index 7dde986..66da94d 100644 +--- a/src/cmake/externalpackages.cmake ++++ b/src/cmake/externalpackages.cmake +@@ -366,6 +366,7 @@ endif() + if (NOT WEBP_FIND_QUIETLY) + message (STATUS "WEBP_HOME=${WEBP_HOME}") + endif () ++if(USE_WEBP) + find_path (WEBP_INCLUDE_DIR webp/encode.h + "${PROJECT_SOURCE_DIR}/src/include" + "${WEBP_HOME}") +@@ -382,6 +383,9 @@ else() + set (WEBP_FOUND FALSE) + message (STATUS "WebP library not found") + endif() ++else() ++ set (WEBP_FOUND FALSE) ++endif() + # end Webp setup + ########################################################################### + diff --git a/ports/openmama/CONTROL b/ports/openmama/CONTROL index fff50fb8a06..600b78091cd 100644 --- a/ports/openmama/CONTROL +++ b/ports/openmama/CONTROL @@ -1,4 +1,4 @@ Source: openmama -Version: 6.2.1-a5a93a24d2f89a0def0145552c8cd4a53c69e2de +Version: 6.2.2 Build-Depends: libevent, apr, qpid-proton Description: OpenMAMA is a high performance vendor neutral lightweight wrapper that provides a common API interface to different middleware and messaging solutions across a variety of platforms and languages. diff --git a/ports/openmama/portfile.cmake b/ports/openmama/portfile.cmake index 2b7aedd4920..e84e4928471 100644 --- a/ports/openmama/portfile.cmake +++ b/ports/openmama/portfile.cmake @@ -6,8 +6,8 @@ vcpkg_find_acquire_program(SCONS) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OpenMAMA/OpenMAMA - REF 24bc69c07e3fdaf95351baea64a5fa87c15de6c9 - SHA512 d660910fec772bad2ad2668066e5a03cb29cd40b6b443895967bb3b8ae12bbbdb8aa379a347bde7ecff81dad42e8149d2694cc542e41af17245d6ce227278afc + REF OpenMAMA-6.2.2-release + SHA512 e12dbd911dbb5416178d5f2ca874ef8ea90edbea8edb64ad77f096ea491b3dea1cca1c3ac4fe73a59a154f56b570a4834cce0943e16a10a29c6d6af90c2ef6f1 HEAD_REF next ) diff --git a/ports/openmesh/CONTROL b/ports/openmesh/CONTROL index b803484eb05..cf502b2a22c 100644 --- a/ports/openmesh/CONTROL +++ b/ports/openmesh/CONTROL @@ -1,3 +1,3 @@ Source: openmesh -Version: 6.3 +Version: 7.0 Description: A generic and efficient polygon mesh data structure diff --git a/ports/openmesh/portfile.cmake b/ports/openmesh/portfile.cmake index f70773ceb9d..7bfacfe0ecf 100644 --- a/ports/openmesh/portfile.cmake +++ b/ports/openmesh/portfile.cmake @@ -1,28 +1,25 @@ -# 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 = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openmesh-6.3) + +set(VERSION 7.0) + +# Note: upstream GitLab instance at https://graphics.rwth-aachen.de:9000 often goes down vcpkg_download_distfile(ARCHIVE - URLS "https://www.openmesh.org/media/Releases/6.3/OpenMesh-6.3.tar.gz" - FILENAME "openmesh-6.3.tar.gz" - SHA512 2ef2dcd2e0abcb0c36a3a9abac433ef4d3430115498ff1134525b27a0f023d7e3bb0d80550f0c8b9658c87651594bce29138bdca05db57f02a5e99e2275c2c07 + URLS "https://www.openmesh.org/media/Releases/${VERSION}/OpenMesh-${VERSION}.tar.gz" + FILENAME "OpenMesh-${VERSION}.tar.gz" + SHA512 29280c8fe7208d39bd923c4d0444a24463e36b95402e6a75f42adc27bc1b261df9113442f69e1001dc1a8b1198488069ffb049742dcf6eac6ac1ecf4f216fad8 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF "${VERSION}" ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS -DBUILD_APPS=OFF # [TODO]: add apps as feature, requires qt5 and freeglut + OPTIONS -DBUILD_APPS=OFF + # [TODO]: add apps as feature, requires qt5 and freeglut # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 diff --git a/ports/openssl/CMakeLists.txt b/ports/openssl-unix/CMakeLists.txt similarity index 84% rename from ports/openssl/CMakeLists.txt rename to ports/openssl-unix/CMakeLists.txt index a2d86345234..e8d91639298 100644 --- a/ports/openssl/CMakeLists.txt +++ b/ports/openssl-unix/CMakeLists.txt @@ -26,6 +26,7 @@ get_filename_component(COMPILER_ROOT "${CMAKE_C_COMPILER}" DIRECTORY) message("CMAKE_C_COMPILER=${CMAKE_C_COMPILER}") message("COMPILER_ROOT=${COMPILER_ROOT}") message("CMAKE_SYSROOT=${CMAKE_SYSROOT}") +message("CMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}") message("CMAKE_C_FLAGS=${CMAKE_C_FLAGS}") message("CMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}") message("CMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}") @@ -36,16 +37,24 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(CFLAGS "-Wno-error=unused-command-line-argument ${CMAKE_C_FLAGS}") endif() if(CMAKE_C_COMPILER_TARGET) - set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_TARGET} ${CMAKE_C_COMPILER_TARGET}") + set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_TARGET}${CMAKE_C_COMPILER_TARGET}") endif() if(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN) - set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN} ${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN}") + set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN}") endif() if(CMAKE_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT) set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}") +elseif(CMAKE_OSX_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT) + set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_OSX_SYSROOT}") endif() -file(TO_NATIVE_PATH ENV_PATH "${COMPILER_ROOT};$ENV{PATH}") +string(REGEX REPLACE "^ " "" CFLAGS "${CFLAGS}") + +if(CMAKE_HOST_WIN32) + file(TO_NATIVE_PATH ENV_PATH "${COMPILER_ROOT};$ENV{PATH}") +else() + file(TO_NATIVE_PATH ENV_PATH "${COMPILER_ROOT}:$ENV{PATH}") +endif() set(ENV{ANDROID_DEV} "${CMAKE_SYSROOT}/usr") set(ENV{CC} "${CMAKE_C_COMPILER}") @@ -100,7 +109,7 @@ add_custom_command( no-md2 ${PLATFORM} "--prefix=${CMAKE_INSTALL_PREFIX}" - "--openssldir=${CMAKE_INSTALL_PREFIX}" + "--openssldir=/etc/ssl" ${CFLAGS} COMMAND "${CMAKE_COMMAND}" "-DDIR=${BUILDDIR}" -P "${CMAKE_CURRENT_LIST_DIR}/remove-deps.cmake" VERBATIM diff --git a/ports/openssl-unix/CONTROL b/ports/openssl-unix/CONTROL new file mode 100644 index 00000000000..28dc5da98e8 --- /dev/null +++ b/ports/openssl-unix/CONTROL @@ -0,0 +1,3 @@ +Source: openssl-unix +Version: 1.0.2p-1 +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/ConfigureIncludeQuotesFix.patch b/ports/openssl-unix/ConfigureIncludeQuotesFix.patch similarity index 100% rename from ports/openssl/ConfigureIncludeQuotesFix.patch rename to ports/openssl-unix/ConfigureIncludeQuotesFix.patch diff --git a/ports/openssl/EmbedSymbolsInStaticLibsZ7.patch b/ports/openssl-unix/EmbedSymbolsInStaticLibsZ7.patch similarity index 100% rename from ports/openssl/EmbedSymbolsInStaticLibsZ7.patch rename to ports/openssl-unix/EmbedSymbolsInStaticLibsZ7.patch diff --git a/ports/openssl/STRINGIFYPatch.patch b/ports/openssl-unix/STRINGIFYPatch.patch similarity index 100% rename from ports/openssl/STRINGIFYPatch.patch rename to ports/openssl-unix/STRINGIFYPatch.patch diff --git a/ports/openssl/portfile-nonwindows.cmake b/ports/openssl-unix/portfile.cmake similarity index 52% rename from ports/openssl/portfile-nonwindows.cmake rename to ports/openssl-unix/portfile.cmake index c324b132ae5..c877905bb38 100644 --- a/ports/openssl/portfile-nonwindows.cmake +++ b/ports/openssl-unix/portfile.cmake @@ -1,37 +1,64 @@ -if(CMAKE_HOST_WIN32) - vcpkg_acquire_msys(MSYS_ROOT PACKAGES make) - set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) - set(MAKE ${MSYS_ROOT}/usr/bin/make.exe) -else() - find_program(MAKE make) - if(NOT MAKE) - message(FATAL_ERROR "Could not find make. Please install it through your package manager.") - endif() -endif() - -vcpkg_configure_cmake( - SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} - PREFER_NINJA - OPTIONS - -DSOURCE_PATH=${MASTER_COPY_SOURCE_PATH} - -DPERL=${PERL} - -DMAKE=${MAKE} - OPTIONS_RELEASE - -DINSTALL_HEADERS=ON -) - -vcpkg_install_cmake() - -file(GLOB HEADERS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/include/openssl/*.h) -set(RESOLVED_HEADERS) -foreach(HEADER ${HEADERS}) - get_filename_component(X "${HEADER}" REALPATH) - list(APPEND RESOLVED_HEADERS "${X}") -endforeach() - -file(INSTALL ${RESOLVED_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/openssl) -file(INSTALL ${MASTER_COPY_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl) -endif() +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + message(FATAL_ERROR "This port is only for openssl on Unix-like systems") +endif() + +include(vcpkg_common_functions) +set(OPENSSL_VERSION 1.0.2p) + +vcpkg_find_acquire_program(PERL) + +vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE + URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.0.2/openssl-${OPENSSL_VERSION}.tar.gz" + FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" + SHA512 958c5a7c3324bbdc8f07dfb13e11329d9a1b4452c07cf41fbd2d42b5fe29c95679332a3476d24c2dc2b88be16e4a24744aba675a05a388c0905756c77a8a2f16 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH MASTER_COPY_SOURCE_PATH + ARCHIVE ${OPENSSL_SOURCE_ARCHIVE} + REF ${OPENSSL_VERSION} + PATCHES + ConfigureIncludeQuotesFix.patch + STRINGIFYPatch.patch + EmbedSymbolsInStaticLibsZ7.patch +) + +if(CMAKE_HOST_WIN32) + vcpkg_acquire_msys(MSYS_ROOT PACKAGES make) + set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + set(MAKE ${MSYS_ROOT}/usr/bin/make.exe) +else() + find_program(MAKE make) + if(NOT MAKE) + message(FATAL_ERROR "Could not find make. Please install it through your package manager.") + endif() +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + PREFER_NINJA + OPTIONS + -DSOURCE_PATH=${MASTER_COPY_SOURCE_PATH} + -DPERL=${PERL} + -DMAKE=${MAKE} + OPTIONS_RELEASE + -DINSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(GLOB HEADERS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/include/openssl/*.h) +set(RESOLVED_HEADERS) +foreach(HEADER ${HEADERS}) + get_filename_component(X "${HEADER}" REALPATH) + list(APPEND RESOLVED_HEADERS "${X}") +endforeach() + +file(INSTALL ${RESOLVED_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/openssl) +file(INSTALL ${MASTER_COPY_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl-unix RENAME copyright) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl) +endif() + +vcpkg_test_cmake(PACKAGE_NAME OpenSSL MODULE) diff --git a/ports/openssl/remove-deps.cmake b/ports/openssl-unix/remove-deps.cmake similarity index 100% rename from ports/openssl/remove-deps.cmake rename to ports/openssl-unix/remove-deps.cmake diff --git a/ports/openssl-unix/usage b/ports/openssl-unix/usage new file mode 100644 index 00000000000..f535cb6a401 --- /dev/null +++ b/ports/openssl-unix/usage @@ -0,0 +1,4 @@ +The package openssl is compatible with built-in CMake targets: + + find_package(OpenSSL REQUIRED) + target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto) diff --git a/ports/openssl/vcpkg-cmake-wrapper.cmake b/ports/openssl-unix/vcpkg-cmake-wrapper.cmake similarity index 100% rename from ports/openssl/vcpkg-cmake-wrapper.cmake rename to ports/openssl-unix/vcpkg-cmake-wrapper.cmake diff --git a/ports/openssl-uwp/CONTROL b/ports/openssl-uwp/CONTROL new file mode 100644 index 00000000000..4b4871f3c9d --- /dev/null +++ b/ports/openssl-uwp/CONTROL @@ -0,0 +1,3 @@ +Source: openssl-uwp +Version: 1.0.2l-winrt +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-uwp/fix-uwp-rs4.patch b/ports/openssl-uwp/fix-uwp-rs4.patch new file mode 100644 index 00000000000..d5a33909e4f --- /dev/null +++ b/ports/openssl-uwp/fix-uwp-rs4.patch @@ -0,0 +1,26 @@ +diff --git a/ms/winrtdef.h b/ms/winrtdef.h +index b1a7598..6ba2e1d 100644 +--- a/ms/winrtdef.h ++++ b/ms/winrtdef.h +@@ -6,9 +6,11 @@ + #if defined(OPENSSL_WINAPP) + //Include stdio.h to replace fprintf + # include ++#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_WIN10_RS4) + # ifdef getenv + # undef getenv + # endif ++#endif + # ifdef setenv + # undef setenv + # endif +@@ -32,7 +34,9 @@ + # undef GetModuleHandle + # define GetModuleHandle winrt_GetModuleHandle + # endif ++#if !defined(NTDDI_WIN10_RS4) || (NTDDI_VERSION < NTDDI_WIN10_RS4) + # define getenv winrt_getenv ++#endif + # define setenv winrt_getenv + + int winrt_GetTickCount(void); diff --git a/ports/openssl/make-openssl.bat b/ports/openssl-uwp/make-openssl.bat similarity index 71% rename from ports/openssl/make-openssl.bat rename to ports/openssl-uwp/make-openssl.bat index 4f6488e8d8e..6f6166a24e9 100644 --- a/ports/openssl/make-openssl.bat +++ b/ports/openssl-uwp/make-openssl.bat @@ -4,6 +4,8 @@ perl Configure no-asm no-hw no-dso VC-WINUNIVERSAL -FS -FIWindows.h 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\ +for /D %%f in ("%WindowsSdkDir%References\Windows.Foundation.FoundationContract\*") do set LibPath=%LibPath%;%%f\ +for /D %%f in ("%WindowsSdkDir%References\Windows.Foundation.UniversalApiContract\*") do set LibPath=%LibPath%;%%f\ call ms\do_winuniversal.bat @@ -12,4 +14,3 @@ mkdir inc32\openssl jom -j %NUMBER_OF_PROCESSORS% -k -f ms\ntdll.mak REM due to a race condition in the build, we need to have a second single-threaded pass. nmake -f ms\ntdll.mak - diff --git a/ports/openssl/portfile-uwp.cmake b/ports/openssl-uwp/portfile.cmake similarity index 88% rename from ports/openssl/portfile-uwp.cmake rename to ports/openssl-uwp/portfile.cmake index 0331e0f77a5..ef980138030 100644 --- a/ports/openssl/portfile-uwp.cmake +++ b/ports/openssl-uwp/portfile.cmake @@ -1,11 +1,3 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# 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} -# - if (VCPKG_LIBRARY_LINKAGE STREQUAL static) set(VCPKG_LIBRARY_LINKAGE dynamic) message("Static building not supported yet") @@ -43,6 +35,11 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-uwp-rs4.patch +) + file(REMOVE_RECURSE ${SOURCE_PATH}/tmp32dll) file(REMOVE_RECURSE ${SOURCE_PATH}/out32dll) file(REMOVE_RECURSE ${SOURCE_PATH}/inc32dll) @@ -89,6 +86,7 @@ file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright) - +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +vcpkg_test_cmake(PACKAGE_NAME OpenSSL MODULE) diff --git a/ports/openssl-uwp/usage b/ports/openssl-uwp/usage new file mode 100644 index 00000000000..f535cb6a401 --- /dev/null +++ b/ports/openssl-uwp/usage @@ -0,0 +1,4 @@ +The package openssl is compatible with built-in CMake targets: + + find_package(OpenSSL REQUIRED) + target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto) diff --git a/ports/openssl-windows/CONTROL b/ports/openssl-windows/CONTROL new file mode 100644 index 00000000000..a62c2fbdcba --- /dev/null +++ b/ports/openssl-windows/CONTROL @@ -0,0 +1,3 @@ +Source: openssl-windows +Version: 1.0.2q +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-windows/ConfigureIncludeQuotesFix.patch b/ports/openssl-windows/ConfigureIncludeQuotesFix.patch new file mode 100644 index 00000000000..09494f56506 --- /dev/null +++ b/ports/openssl-windows/ConfigureIncludeQuotesFix.patch @@ -0,0 +1,13 @@ +diff --git a/Configure b/Configure +index c98107a..77ad9d3 100644 +--- a/Configure ++++ b/Configure +@@ -972,7 +972,7 @@ PROCESS_ARGS: + } + elsif (/^--with-zlib-include=(.*)$/) + { +- $withargs{"zlib-include"}="-I$1"; ++ $withargs{"zlib-include"}="-I\"$1\""; + } + elsif (/^--with-fipsdir=(.*)$/) + { diff --git a/ports/openssl-windows/EmbedSymbolsInStaticLibsZ7.patch b/ports/openssl-windows/EmbedSymbolsInStaticLibsZ7.patch new file mode 100644 index 00000000000..1a8de2c4bdf --- /dev/null +++ b/ports/openssl-windows/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-windows/EnableWinARM32.patch b/ports/openssl-windows/EnableWinARM32.patch new file mode 100644 index 00000000000..f1eedcb7180 --- /dev/null +++ b/ports/openssl-windows/EnableWinARM32.patch @@ -0,0 +1,21 @@ +diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl +index dba96cba5e..7fd99959f1 100644 +--- a/util/pl/VC-32.pl ++++ b/util/pl/VC-32.pl +@@ -261,6 +261,8 @@ if ($shlib && $FLAVOR !~ /CE/) + { + $mlflags.=" $lflags /dll"; + $lib_cflag.=" -D_WINDLL"; ++ if ($base_cflags !~ /-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE/) ++ { + # + # Engage Applink... + # +@@ -286,6 +288,7 @@ ___ + CRYPTOOBJ=ms\uptable.obj $(CRYPTOOBJ) + ___ + } ++ } + elsif ($shlib && $FLAVOR =~ /CE/) + { + $mlflags.=" $lflags /dll"; diff --git a/ports/openssl-windows/STRINGIFYPatch.patch b/ports/openssl-windows/STRINGIFYPatch.patch new file mode 100644 index 00000000000..dd8f9c29728 --- /dev/null +++ b/ports/openssl-windows/STRINGIFYPatch.patch @@ -0,0 +1,23 @@ +diff --git a/crypto/cversion.c b/crypto/cversion.c +index bfff699..17b7912 100644 +--- a/crypto/cversion.c ++++ b/crypto/cversion.c +@@ -56,6 +56,9 @@ + * [including the GNU Public Licence.] + */ + ++#define STRINGIFY2(x) #x ++#define STRINGIFY(x) STRINGIFY2(x) ++ + #include "cryptlib.h" + + #ifndef NO_WINDOWS_BRAINDEATH +@@ -79,7 +82,7 @@ const char *SSLeay_version(int t) + } + if (t == SSLEAY_CFLAGS) { + #ifdef CFLAGS +- return (CFLAGS); ++ return STRINGIFY(CFLAGS); + #else + return ("compiler: information not available"); + #endif diff --git a/ports/openssl-windows/portfile.cmake b/ports/openssl-windows/portfile.cmake new file mode 100644 index 00000000000..8a95bd6c1e4 --- /dev/null +++ b/ports/openssl-windows/portfile.cmake @@ -0,0 +1,171 @@ +if(VCPKG_CMAKE_SYSTEM_NAME) + message(FATAL_ERROR "This port is only for building openssl on Windows Desktop") +endif() + +include(vcpkg_common_functions) +set(OPENSSL_VERSION 1.0.2q) +set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION}) + +vcpkg_find_acquire_program(PERL) + +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) +set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") + +vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE + URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.0.2/openssl-${OPENSSL_VERSION}.tar.gz" + FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" + SHA512 403e6cad42db3ba860c3fa4fa81c1b7b02f0b873259e5c19a7fc8e42de0854602555f1b1ca74f4e3a7737a4cbd3aac063061e628ec86534586500819fae7fec0 +) + +vcpkg_extract_source_archive(${OPENSSL_SOURCE_ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${MASTER_COPY_SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/ConfigureIncludeQuotesFix.patch + ${CMAKE_CURRENT_LIST_DIR}/STRINGIFYPatch.patch + ${CMAKE_CURRENT_LIST_DIR}/EnableWinARM32.patch + ${CMAKE_CURRENT_LIST_DIR}/EmbedSymbolsInStaticLibsZ7.patch +) + +vcpkg_find_acquire_program(NASM) +get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) +set(ENV{PATH} "${NASM_EXE_PATH};$ENV{PATH}") + +vcpkg_find_acquire_program(JOM) + +set(CONFIGURE_COMMAND ${PERL} Configure + enable-static-engine + enable-capieng + no-ssl2 + -utf-8 +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(OPENSSL_ARCH VC-WIN32) + set(OPENSSL_DO "ms\\do_nasm.bat") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(OPENSSL_ARCH VC-WIN64A) + set(OPENSSL_DO "ms\\do_win64a.bat") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(OPENSSL_ARCH VC-WIN32) + set(OPENSSL_DO "ms\\do_ms.bat") + set(CONFIGURE_COMMAND ${CONFIGURE_COMMAND} + no-asm + -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE + ) +else() + message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OPENSSL_MAKEFILE "ms\\ntdll.mak") +else() + set(OPENSSL_MAKEFILE "ms\\nt.mak") +endif() + +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(COPY ${MASTER_COPY_SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/openssl-${OPENSSL_VERSION}) + set(OPENSSLDIR_RELEASE ${CURRENT_PACKAGES_DIR}) + + message(STATUS "Configure ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND ${CONFIGURE_COMMAND} ${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_RELEASE}" "--openssldir=${OPENSSLDIR_RELEASE}" -FS + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-rel + ) + vcpkg_execute_required_process( + COMMAND ${OPENSSL_DO} + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME configure-do-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-rel + ) + message(STATUS "Configure ${TARGET_TRIPLET}-rel done") + + message(STATUS "Build ${TARGET_TRIPLET}-rel") + # Openssl's buildsystem has a race condition which will cause JOM to fail at some point. + # This is ok; we just do as much work as we can in parallel first, then follow up with a single-threaded build. + make_directory(${SOURCE_PATH_RELEASE}/inc32/openssl) + execute_process( + COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-out.log + ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-err.log + ) + vcpkg_execute_required_process( + COMMAND nmake -f ${OPENSSL_MAKEFILE} install + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME build-${TARGET_TRIPLET}-rel-1) + + message(STATUS "Build ${TARGET_TRIPLET}-rel done") +endif() + + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Configure ${TARGET_TRIPLET}-dbg") + file(COPY ${MASTER_COPY_SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/openssl-${OPENSSL_VERSION}) + set(OPENSSLDIR_DEBUG ${CURRENT_PACKAGES_DIR}/debug) + + vcpkg_execute_required_process( + COMMAND ${CONFIGURE_COMMAND} debug-${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_DEBUG}" "--openssldir=${OPENSSLDIR_DEBUG}" -FS + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-dbg + ) + vcpkg_execute_required_process( + COMMAND ${OPENSSL_DO} + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME configure-do-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-dbg + ) + message(STATUS "Configure ${TARGET_TRIPLET}-dbg done") + + message(STATUS "Build ${TARGET_TRIPLET}-dbg") + make_directory(${SOURCE_PATH_DEBUG}/inc32/openssl) + execute_process( + COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-out.log + ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-err.log + ) + vcpkg_execute_required_process( + COMMAND nmake -f ${OPENSSL_MAKEFILE} install + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME build-${TARGET_TRIPLET}-dbg-1) + + message(STATUS "Build ${TARGET_TRIPLET}-dbg done") +endif() + + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE + ${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe + ${CURRENT_PACKAGES_DIR}/debug/openssl.cnf + ${CURRENT_PACKAGES_DIR}/openssl.cnf +) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/openssl/) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/openssl.exe ${CURRENT_PACKAGES_DIR}/tools/openssl/openssl.exe) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/openssl) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + # They should be empty, only the exes deleted above were in these directories + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/) +endif() + +file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" _contents) +string(REPLACE "" "" _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" "${_contents}") + +file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" _contents) +string(REPLACE "# include " "#ifndef _WINSOCKAPI_\n#define _WINSOCKAPI_\n#endif\n# include " _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" "${_contents}") + +vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${MASTER_COPY_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_test_cmake(PACKAGE_NAME OpenSSL MODULE) diff --git a/ports/openssl-windows/usage b/ports/openssl-windows/usage new file mode 100644 index 00000000000..f535cb6a401 --- /dev/null +++ b/ports/openssl-windows/usage @@ -0,0 +1,4 @@ +The package openssl is compatible with built-in CMake targets: + + find_package(OpenSSL REQUIRED) + target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto) diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index fe7ea5c01db..4d81a196286 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,4 @@ Source: openssl -Version: 1.0.2o-2 +Version: 0 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. +Build-Depends: openssl-windows (windows), openssl-uwp (uwp), openssl-unix (!uwp&!windows) diff --git a/ports/openssl/LICENSE b/ports/openssl/LICENSE deleted file mode 100644 index e47d101f102..00000000000 --- a/ports/openssl/LICENSE +++ /dev/null @@ -1,127 +0,0 @@ - - LICENSE ISSUES - ============== - - The OpenSSL toolkit stays under a dual license, i.e. both the conditions of - the OpenSSL License and the original SSLeay license apply to the toolkit. - See below for the actual license texts. Actually both licenses are BSD-style - Open Source licenses. In case of any license issues related to OpenSSL - please contact openssl-core@openssl.org. - - OpenSSL License - --------------- - -/* ==================================================================== - * Copyright (c) 1998-2011 The OpenSSL Project. 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. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED 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 OpenSSL PROJECT OR - * ITS 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. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - - Original SSLeay License - ----------------------- - -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * 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 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index a6e5fd110f9..3d55c367f59 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -1,164 +1,2 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - include(${CMAKE_CURRENT_LIST_DIR}/portfile-uwp.cmake) - return() -endif() - -include(vcpkg_common_functions) -set(OPENSSL_VERSION 1.0.2o) -set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION}) - -vcpkg_find_acquire_program(PERL) - -get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") - -vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE - URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.0.2/openssl-${OPENSSL_VERSION}.tar.gz" - FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" - SHA512 8a2c93657c85143e76785bb32ee836908c31a6f5f8db993fa9777acba6079e630cdddd03edbad65d1587199fc13a1507789eacf038b56eb99139c2091d9df7fd -) - -vcpkg_extract_source_archive(${OPENSSL_SOURCE_ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${MASTER_COPY_SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/ConfigureIncludeQuotesFix.patch - ${CMAKE_CURRENT_LIST_DIR}/STRINGIFYPatch.patch - ${CMAKE_CURRENT_LIST_DIR}/EmbedSymbolsInStaticLibsZ7.patch -) - -if(VCPKG_CMAKE_SYSTEM_NAME) - include(${CMAKE_CURRENT_LIST_DIR}/portfile-nonwindows.cmake) - return() -endif() - -vcpkg_find_acquire_program(NASM) -get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) -set(ENV{PATH} "${NASM_EXE_PATH};$ENV{PATH}") - -vcpkg_find_acquire_program(JOM) - -set(CONFIGURE_COMMAND ${PERL} Configure - enable-static-engine - enable-capieng - no-ssl2 - -utf-8 -) - -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(OPENSSL_ARCH VC-WIN32) - set(OPENSSL_DO "ms\\do_nasm.bat") -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(OPENSSL_ARCH VC-WIN64A) - set(OPENSSL_DO "ms\\do_win64a.bat") -else() - message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") -endif() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(OPENSSL_MAKEFILE "ms\\ntdll.mak") -else() - set(OPENSSL_MAKEFILE "ms\\nt.mak") -endif() - -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - - -file(COPY ${MASTER_COPY_SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) -set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/openssl-${OPENSSL_VERSION}) -set(OPENSSLDIR_RELEASE ${CURRENT_PACKAGES_DIR}) - -message(STATUS "Configure ${TARGET_TRIPLET}-rel") -vcpkg_execute_required_process( - COMMAND ${CONFIGURE_COMMAND} ${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_RELEASE}" "--openssldir=${OPENSSLDIR_RELEASE}" -FS - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-rel -) -vcpkg_execute_required_process( - COMMAND ${OPENSSL_DO} - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME configure-do-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-rel -) -message(STATUS "Configure ${TARGET_TRIPLET}-rel done") - -message(STATUS "Build ${TARGET_TRIPLET}-rel") -# Openssl's buildsystem has a race condition which will cause JOM to fail at some point. -# This is ok; we just do as much work as we can in parallel first, then follow up with a single-threaded build. -make_directory(${SOURCE_PATH_RELEASE}/inc32/openssl) -execute_process( - COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-out.log - ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-err.log -) -vcpkg_execute_required_process( - COMMAND nmake -f ${OPENSSL_MAKEFILE} install - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME build-${TARGET_TRIPLET}-rel-1) - -message(STATUS "Build ${TARGET_TRIPLET}-rel done") - - -message(STATUS "Configure ${TARGET_TRIPLET}-dbg") -file(COPY ${MASTER_COPY_SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) -set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/openssl-${OPENSSL_VERSION}) -set(OPENSSLDIR_DEBUG ${CURRENT_PACKAGES_DIR}/debug) - -vcpkg_execute_required_process( - COMMAND ${CONFIGURE_COMMAND} debug-${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_DEBUG}" "--openssldir=${OPENSSLDIR_DEBUG}" -FS - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-dbg -) -vcpkg_execute_required_process( - COMMAND ${OPENSSL_DO} - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME configure-do-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-dbg -) -message(STATUS "Configure ${TARGET_TRIPLET}-dbg done") - -message(STATUS "Build ${TARGET_TRIPLET}-dbg") -make_directory(${SOURCE_PATH_DEBUG}/inc32/openssl) -execute_process( - COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-out.log - ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-err.log -) -vcpkg_execute_required_process( - COMMAND nmake -f ${OPENSSL_MAKEFILE} install - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME build-${TARGET_TRIPLET}-dbg-1) - -message(STATUS "Build ${TARGET_TRIPLET}-dbg done") - - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE - ${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe - ${CURRENT_PACKAGES_DIR}/debug/openssl.cnf - ${CURRENT_PACKAGES_DIR}/openssl.cnf -) - -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}/) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/openssl.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/openssl.exe) - -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) - -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - # They should be empty, only the exes deleted above were in these directories - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/) -endif() - -file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" _contents) -string(REPLACE "" "" _contents "${_contents}") -file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" "${_contents}") - -file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" _contents) -string(REPLACE "# include " "#ifndef _WINSOCKAPI_\n#define _WINSOCKAPI_\n#endif\n# include " _contents "${_contents}") -file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" "${_contents}") - -vcpkg_copy_pdbs() - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl/) diff --git a/ports/openvdb/CONTROL b/ports/openvdb/CONTROL index 7576ff790e9..22c216b5cfc 100644 --- a/ports/openvdb/CONTROL +++ b/ports/openvdb/CONTROL @@ -5,4 +5,4 @@ Description: Sparse volume data structure and tools Feature: tools Description: OpenVDB utilities: view, print and render -Build-Depends: glew, glfw3 +Build-Depends: glew, glfw3, boost-ptr-container diff --git a/ports/openvr/CONTROL b/ports/openvr/CONTROL index 816a8751f47..b0f337d0a9d 100644 --- a/ports/openvr/CONTROL +++ b/ports/openvr/CONTROL @@ -1,3 +1,3 @@ Source: openvr -Version: 1.0.14 +Version: 1.0.16 Description: an API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting. diff --git a/ports/openvr/portfile.cmake b/ports/openvr/portfile.cmake index 31e1658b1c7..5e4211907d4 100644 --- a/ports/openvr/portfile.cmake +++ b/ports/openvr/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ValveSoftware/openvr - REF v1.0.14 - SHA512 2f38622121911ad4d59971fe88313f839fcb3bddae07af266b3b9f804a8c3855b4eb67d9153f0979db3465279dfcce9cb0bfe83451bf8639be5cdc9acafa2eda + REF v1.0.16 + SHA512 967356563ba4232da5361510c7519d3058e09eced4571aadc00d8a75ab1f299a0aebda2b0b10b0ffb6c6a443fd718634d0c0103964e289961449c93e8d7b9d02 HEAD_REF master ) diff --git a/ports/opus/CONTROL b/ports/opus/CONTROL index 6f794c98697..dd92faea543 100644 --- a/ports/opus/CONTROL +++ b/ports/opus/CONTROL @@ -1,3 +1,3 @@ Source: opus -Version: 1.2.1 +Version: 1.3 Description: Totally open, royalty-free, highly versatile audio codec diff --git a/ports/opus/no-main.patch b/ports/opus/no-main.patch new file mode 100644 index 00000000000..6c373de7b28 --- /dev/null +++ b/ports/opus/no-main.patch @@ -0,0 +1,14 @@ +diff --git a/win32/VS2015/opus.vcxproj b/win32/VS2015/opus.vcxproj +index 33bf706..296bc79 100644 +--- a/win32/VS2015/opus.vcxproj ++++ b/win32/VS2015/opus.vcxproj +@@ -350,9 +350,6 @@ + + + +- +- 4244;%(DisableSpecificWarnings) +- + + + diff --git a/ports/opus/portfile.cmake b/ports/opus/portfile.cmake index 5bc9b6b600c..d15be61f1cf 100644 --- a/ports/opus/portfile.cmake +++ b/ports/opus/portfile.cmake @@ -6,9 +6,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xiph/opus - REF v1.2.1 - SHA512 fdc64b43875dd07dc9eb1c37e9a61d1c10e3095de62ed9597d51b93445136958c9f5fee78c33ae7f90c72a20200083cdc727d8e79f2f9e580ad4e2f8c50cccb4 + REF v1.3 + SHA512 5ac067514b6471432fcd027b912dcaa765e2bdc986ea289a2aeb57660d18fa1460a0a697b9736d8e2b65eb7b72ad4fa36b9b213389fe1e64335db8e9ad51b750 HEAD_REF master + PATCHES "${CMAKE_CURRENT_LIST_DIR}/no-main.patch" ) # Ensure proper crt linkage diff --git a/ports/opusfile/CMakeLists.txt b/ports/opusfile/CMakeLists.txt index 737adee1afb..51ea8f89455 100644 --- a/ports/opusfile/CMakeLists.txt +++ b/ports/opusfile/CMakeLists.txt @@ -10,8 +10,6 @@ find_library(OGG_LIBRARY ogg) find_path(OPUS_INCLUDE_DIR opus.h PATH_SUFFIXES opus) find_library(OPUS_LIBRARY opus) -find_package(OpenSSL MODULE REQUIRED) - add_library(opusfile src/info.c src/internal.c @@ -21,19 +19,28 @@ add_library(opusfile target_include_directories(opusfile PRIVATE include PUBLIC ${OGG_INCLUDE_DIR} ${OPUS_INCLUDE_DIR}) target_link_libraries(opusfile PRIVATE ${OGG_LIBRARY} ${OPUS_LIBRARY}) -add_library(opusurl - src/http.c - src/wincerts.c) - -target_compile_definitions(opusurl PRIVATE OP_ENABLE_HTTP) -target_include_directories(opusurl PRIVATE include) -target_link_libraries(opusurl PRIVATE opusfile OpenSSL::SSL ws2_32.lib crypt32.lib) - -install(TARGETS opusfile opusurl +install(TARGETS opusfile RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) +if(BUILD_OPUSURL) + find_package(OpenSSL MODULE REQUIRED) + + add_library(opusurl + src/http.c + src/wincerts.c) + + target_compile_definitions(opusurl PRIVATE OP_ENABLE_HTTP) + target_include_directories(opusurl PRIVATE include) + target_link_libraries(opusurl PRIVATE opusfile OpenSSL::SSL ws2_32.lib crypt32.lib) + + install(TARGETS opusurl + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) +endif() + if(NOT OPUSFILE_SKIP_HEADERS) install(FILES include/opusfile.h DESTINATION include/opus) diff --git a/ports/opusfile/CONTROL b/ports/opusfile/CONTROL index 5489cb4b21a..82307c1006b 100644 --- a/ports/opusfile/CONTROL +++ b/ports/opusfile/CONTROL @@ -1,4 +1,8 @@ Source: opusfile -Version: 0.9-1 +Version: 0.11-1 Description: Stand-alone decoder library for .opus streams -Build-Depends: libogg, opus, openssl +Build-Depends: libogg, opus + +Feature: opusurl +Description: Support decoding of http(s) streams +Build-Depends: openssl diff --git a/ports/opusfile/portfile.cmake b/ports/opusfile/portfile.cmake index 06c2a219641..30c633ca241 100644 --- a/ports/opusfile/portfile.cmake +++ b/ports/opusfile/portfile.cmake @@ -6,14 +6,22 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xiph/opusfile - REF v0.9 - SHA512 8bada67cf12511fd914813fe782a5bf40a5d1ecadbe77e2e8d7bf40bf09bf0e6af3dfbc9b7987496dea813d3b120897cb9117f06521eeb098105e1a795ab702b + REF v0.11 + SHA512 b67976176ffacbeecacd00815877d1b332e149430b49f68d41d6a2f95e6d291e979214903314e14b4cc3f20e07ec8975b906f12f12aef8c786f74f6160d8791d HEAD_REF master) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +if("opusurl" IN_LIST FEATURES) + set(BUILD_OPUSURL ON) +else() + set(BUILD_OPUSURL OFF) +endif() + vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA + PREFER_NINJA + OPTIONS + -DBUILD_OPUSURL=${BUILD_OPUSURL} OPTIONS_DEBUG -DOPUSFILE_SKIP_HEADERS=ON) diff --git a/ports/orc/0001-dependencies-from-vcpkg.patch b/ports/orc/0001-dependencies-from-vcpkg.patch new file mode 100644 index 00000000000..7930bf1488c --- /dev/null +++ b/ports/orc/0001-dependencies-from-vcpkg.patch @@ -0,0 +1,141 @@ +diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt +index 91c67d5..4377b83 100644 +--- a/c++/src/CMakeLists.txt ++++ b/c++/src/CMakeLists.txt +@@ -197,11 +197,12 @@ endif(BUILD_LIBHDFSPP) + add_library (orc STATIC ${SOURCE_FILES}) + + target_link_libraries (orc +- protobuf +- zlib +- snappy +- lz4 +- ${LIBHDFSPP_LIBRARIES} ++ PUBLIC ++ protobuf::libprotobuf ++ ZLIB::ZLIB ++ Snappy::snappy ++ ${LZ4_STATIC_LIB} ++ ${LIBHDFSPP_LIBRARIES} + ) + + install(TARGETS orc DESTINATION lib) +\ No newline at end of file +diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt +index 015814a..2b55f4e 100644 +--- a/c++/test/CMakeLists.txt ++++ b/c++/test/CMakeLists.txt +@@ -48,10 +48,6 @@ add_executable (orc-test + + target_link_libraries (orc-test + orc +- lz4 +- protobuf +- snappy +- zlib + ${GTEST_LIBRARIES} + ) + +diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake +index 0272263..8b79a12 100644 +--- a/cmake_modules/ThirdpartyToolchain.cmake ++++ b/cmake_modules/ThirdpartyToolchain.cmake +@@ -51,8 +51,8 @@ endif () + # ---------------------------------------------------------------------- + # Snappy + +-if (NOT "${SNAPPY_HOME}" STREQUAL "") +- find_package (Snappy REQUIRED) ++if (NOT "${SNAPPY_HOME}" STREQUAL "" OR 1) ++ find_package (Snappy CONFIG REQUIRED) + set(SNAPPY_VENDORED FALSE) + else () + set(SNAPPY_HOME "${THIRDPARTY_DIR}/snappy_ep-install") +@@ -70,10 +70,6 @@ else () + set(SNAPPY_VENDORED TRUE) + endif () + +-include_directories (SYSTEM ${SNAPPY_INCLUDE_DIR}) +-add_library (snappy STATIC IMPORTED) +-set_target_properties (snappy PROPERTIES IMPORTED_LOCATION ${SNAPPY_STATIC_LIB}) +- + if (SNAPPY_VENDORED) + add_dependencies (snappy snappy_ep) + if (INSTALL_VENDORED_LIBS) +@@ -85,7 +81,7 @@ endif () + # ---------------------------------------------------------------------- + # ZLIB + +-if (NOT "${ZLIB_HOME}" STREQUAL "") ++if (NOT "${ZLIB_HOME}" STREQUAL "" OR 1) + find_package (ZLIB REQUIRED) + set(ZLIB_VENDORED FALSE) + else () +@@ -112,10 +108,6 @@ else () + set(ZLIB_VENDORED TRUE) + endif () + +-include_directories (SYSTEM ${ZLIB_INCLUDE_DIR}) +-add_library (zlib STATIC IMPORTED) +-set_target_properties (zlib PROPERTIES IMPORTED_LOCATION ${ZLIB_STATIC_LIB}) +- + if (ZLIB_VENDORED) + add_dependencies (zlib zlib_ep) + if (INSTALL_VENDORED_LIBS) +@@ -127,8 +119,8 @@ endif () + # ---------------------------------------------------------------------- + # LZ4 + +-if (NOT "${LZ4_HOME}" STREQUAL "") +- find_package (LZ4 REQUIRED) ++if (NOT "${LZ4_HOME}" STREQUAL "" OR 1) ++ find_library(LZ4_STATIC_LIB NAMES lz4d lz4) + set(LZ4_VENDORED FALSE) + else () + set(LZ4_PREFIX "${THIRDPARTY_DIR}/lz4_ep-install") +@@ -154,8 +146,6 @@ else () + endif () + + include_directories (SYSTEM ${LZ4_INCLUDE_DIR}) +-add_library (lz4 STATIC IMPORTED) +-set_target_properties (lz4 PROPERTIES IMPORTED_LOCATION ${LZ4_STATIC_LIB}) + + if (LZ4_VENDORED) + add_dependencies (lz4 lz4_ep) +@@ -230,8 +220,8 @@ endif () + # ---------------------------------------------------------------------- + # Protobuf + +-if (NOT "${PROTOBUF_HOME}" STREQUAL "") +- find_package (Protobuf REQUIRED) ++if (NOT "${PROTOBUF_HOME}" STREQUAL "" OR 1) ++ find_package(protobuf CONFIG REQUIRED) + set(PROTOBUF_VENDORED FALSE) + else () + set(PROTOBUF_PREFIX "${THIRDPARTY_DIR}/protobuf_ep-install") +@@ -266,13 +256,8 @@ else () + set(PROTOBUF_VENDORED TRUE) + endif () + +-include_directories (SYSTEM ${PROTOBUF_INCLUDE_DIR}) + +-add_library (protobuf STATIC IMPORTED) +-set_target_properties (protobuf PROPERTIES IMPORTED_LOCATION ${PROTOBUF_STATIC_LIB}) + +-add_library (protoc STATIC IMPORTED) +-set_target_properties (protoc PROPERTIES IMPORTED_LOCATION ${PROTOC_STATIC_LIB}) + + if (PROTOBUF_VENDORED) + add_dependencies (protoc protobuf_ep) +diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt +index 667fab4..eb6d232 100644 +--- a/tools/src/CMakeLists.txt ++++ b/tools/src/CMakeLists.txt +@@ -49,7 +49,6 @@ add_executable (orc-metadata + + target_link_libraries (orc-metadata + orc +- protobuf + ) + + add_executable (orc-statistics diff --git a/ports/orc/0002-fix-executable-output-folder.patch b/ports/orc/0002-fix-executable-output-folder.patch new file mode 100644 index 00000000000..5fa992dc103 --- /dev/null +++ b/ports/orc/0002-fix-executable-output-folder.patch @@ -0,0 +1,13 @@ +diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt +index eb6d232..5a99f5c 100644 +--- a/tools/src/CMakeLists.txt ++++ b/tools/src/CMakeLists.txt +@@ -87,4 +87,7 @@ install(TARGETS + orc-contents + orc-metadata + orc-statistics +- DESTINATION bin) ++ orc-scan ++ orc-memory ++ csv-import ++ DESTINATION tools/orc) diff --git a/ports/orc/CONTROL b/ports/orc/CONTROL new file mode 100644 index 00000000000..45532cad31b --- /dev/null +++ b/ports/orc/CONTROL @@ -0,0 +1,4 @@ +Source: orc +Version: 1.5.2-f47e02c-2 +Build-Depends: zlib, protobuf, lz4, snappy, gtest +Description: The smallest, fastest columnar storage for Hadoop workloads. diff --git a/ports/orc/portfile.cmake b/ports/orc/portfile.cmake new file mode 100644 index 00000000000..f9a23b70850 --- /dev/null +++ b/ports/orc/portfile.cmake @@ -0,0 +1,64 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/orc + REF f47e02cfbf346f14d7f38c3ddd45d39e3b515847 + SHA512 5a389f4ab3b0ce4e7c8869493cf9e91feb4917a42bf2740abd71602fa03a2a53217b572e60af7328b7568dab084c07275ea275438ec8ae87f230a87fb60f2601 + HEAD_REF master + PATCHES + 0001-dependencies-from-vcpkg.patch + 0002-fix-executable-output-folder.patch +) + +file(REMOVE "${SOURCE_PATH}/cmake_modules/FindGTest.cmake") +file(REMOVE "${SOURCE_PATH}/cmake_modules/FindLZ4.cmake") +file(REMOVE "${SOURCE_PATH}/cmake_modules/FindProtobuf.cmake") +file(REMOVE "${SOURCE_PATH}/cmake_modules/FindSnappy.cmake") +file(REMOVE "${SOURCE_PATH}/cmake_modules/FindZLIB.cmake") + +if(CMAKE_HOST_WIN32) + set(PROTOBUF_EXECUTABLE ${CURRENT_INSTALLED_DIR}/tools/protobuf/protoc.exe) +else() + set(PROTOBUF_EXECUTABLE ${CURRENT_INSTALLED_DIR}/tools/protobuf/protoc) +endif() + +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(BUILD_TOOLS OFF) +else() + set(BUILD_TOOLS ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TOOLS=${BUILD_TOOLS} + -DBUILD_CPP_TESTS=OFF + -DBUILD_JAVA=OFF + -DINSTALL_VENDORED_LIBS=OFF + -DBUILD_LIBHDFSPP=OFF + -DPROTOBUF_EXECUTABLE:FILEPATH=${PROTOBUF_EXECUTABLE} +) + +vcpkg_install_cmake() + +file(GLOB TOOLS ${CURRENT_PACKAGES_DIR}/bin/orc-*) +if(TOOLS) + file(COPY ${TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/orc) + file(REMOVE ${TOOLS}) +endif() + +file(GLOB BINS ${CURRENT_PACKAGES_DIR}/bin/*) +if(NOT BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/orc RENAME copyright) + +vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/orc/usage b/ports/orc/usage new file mode 100644 index 00000000000..6a20ccb8965 --- /dev/null +++ b/ports/orc/usage @@ -0,0 +1,10 @@ +The package orc does not provide CMake targets: + + find_package(protobuf CONFIG REQUIRED) + find_package(ZLIB REQUIRED) + find_package(Snappy CONFIG REQUIRED) + + find_library(LZ4_LIBRARY NAMES lz4d lz4) + find_library(ORC_LIBRARY NAMES orc) + + target_link_libraries(main PRIVATE ${ORC_LIBRARY} protobuf::libprotoc protobuf::libprotobuf Snappy::snappy ${LZ4_LIBRARY} ZLIB::ZLIB) diff --git a/ports/osg-qt/CONTROL b/ports/osg-qt/CONTROL new file mode 100644 index 00000000000..f1b20deb949 --- /dev/null +++ b/ports/osg-qt/CONTROL @@ -0,0 +1,4 @@ +Source: osg-qt +Version: 3.5.7 +Description: osgQt - Qt project for making use of OpenSceneGraph(OSG) +Build-Depends: osg, protobuf, qt5-base \ No newline at end of file diff --git a/ports/osg-qt/portfile.cmake b/ports/osg-qt/portfile.cmake new file mode 100644 index 00000000000..aed06665cc6 --- /dev/null +++ b/ports/osg-qt/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO openscenegraph/osgQt + REF 6d324db8a56feb7d1976e9fb3f1de9bf7d255646 + SHA512 6c6c0220de1b2314bc0e8ba149ef794229e0858914014dab91d577965acb19925dd64b8ee08add7b77f9353951ccf18f8e80b648509f894f3c2aaa08204b7625 + HEAD_REF master +) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +#Debug +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle License +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/osg-qt) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/osg-qt/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/osg-qt/copyright) \ No newline at end of file diff --git a/ports/osg/CONTROL b/ports/osg/CONTROL index 4e3a308a414..dc9396dd4cd 100644 --- a/ports/osg/CONTROL +++ b/ports/osg/CONTROL @@ -1,4 +1,4 @@ Source: osg -Version: 3.5.6-2 +Version: 3.6.2 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/osg/portfile.cmake b/ports/osg/portfile.cmake index ac6f8e2ee9d..ca5c18f59a0 100644 --- a/ports/osg/portfile.cmake +++ b/ports/osg/portfile.cmake @@ -15,13 +15,14 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) message(STATUS "Warning: Static building will not support load data through plugins.") set(VCPKG_LIBRARY_LINKAGE dynamic) endif() -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/OpenSceneGraph-OpenSceneGraph-3.5.6) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-3.5.6.zip" - FILENAME "osg-3.5.6.zip" - SHA512 f1745748ff86243291da96a4781af9487204a82540d3cc42b33bcbf693137ab9a6a741cad18afa74f62ef66933840ac54894397f880471f6c639210fa23e7f4b + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO openscenegraph/OpenSceneGraph + REF OpenSceneGraph-3.6.2 + SHA512 6949dd4dea9dcffe4228086b72eafdb253bf1403b3b7a70a4727848c3cde23ad0270f41b1c3e2bdbfd410ec067ecce2052a5d26c61b032b6d46ce84b8c931bfb + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -46,12 +47,12 @@ file(REMOVE_RECURSE ${OSG_TOOLS}) file(GLOB OSG_TOOLS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) file(REMOVE_RECURSE ${OSG_TOOLS_DBG}) -file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-3.5.6/*.dll) -file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/osg/osgPlugins-3.5.6) -file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-3.5.6/*.dll) -file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-3.5.6) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-3.5.6/) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-3.5.6/) +file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-3.6.2/*.dll) +file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/osg/osgPlugins-3.6.2) +file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-3.6.2/*.dll) +file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-3.6.2) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-3.6.2/) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-3.6.2/) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/osg) diff --git a/ports/osgearth/CONTROL b/ports/osgearth/CONTROL new file mode 100644 index 00000000000..5a8255a2a04 --- /dev/null +++ b/ports/osgearth/CONTROL @@ -0,0 +1,4 @@ +Source: osgearth +Version: 2.9-2 +Description: osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2015 Pelican Mapping. +Build-Depends: osg diff --git a/ports/osgearth/portfile.cmake b/ports/osgearth/portfile.cmake new file mode 100644 index 00000000000..77320a2e1fa --- /dev/null +++ b/ports/osgearth/portfile.cmake @@ -0,0 +1,79 @@ +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Warning: Static building will not support load data through plugins.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL static) + message(FATAL_ERROR "osgearth does not support static CRT linkage") +endif() + +file(GLOB OSG_PLUGINS_SUBDIR ${CURRENT_INSTALLED_DIR}/tools/osg/osgPlugins-*) +list(LENGTH OSG_PLUGINS_SUBDIR OSG_PLUGINS_SUBDIR_LENGTH) +if(NOT OSG_PLUGINS_SUBDIR_LENGTH EQUAL 1) + message(FATAL_ERROR "Could not determine osg version") +endif() +string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/osg/" "" OSG_PLUGINS_SUBDIR "${OSG_PLUGINS_SUBDIR}") + +vcpkg_download_distfile( + VS2017PATCH + URLS "https://github.com/remoe/osgearth/commit/f7081cc4f9991c955c6a0ef7b7b50e48360d14fd.diff" + FILENAME "osgearth-f7081cc4f9991c955c6a0ef7b7b50e48360d14fd.patch" + SHA512 eadb47a5713c00c05add8627e5cad22844db041da34081d59104151a1a1e2d5ac9552909d67171bfc0449a3e4d2930dd3a7914d3ec7ef7ff1015574e9c9a6105 +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gwaldron/osgearth + REF d1884d819d4a43de32b7ca1ded655c73964bed17 + SHA512 525ad4ce8bcbd7d73a2ed66e7fbcd9d302582276f26dda1ef2baa3828da5c1e302ba81aac95d0a0632c7395cbcd072d2b19d084ba641c1ba92872d42bb6f769c + HEAD_REF master + PATCHES ${VS2017PATCH} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +#Release +set(OSGEARTH_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/osgearth) +set(OSGEARTH_TOOL_PLUGIN_PATH ${OSGEARTH_TOOL_PATH}/${OSG_PLUGINS_SUBDIR}) + +file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PATH}) +file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PLUGIN_PATH}) + +file(GLOB OSGEARTH_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(GLOB OSGDB_PLUGINS ${CURRENT_PACKAGES_DIR}/bin/osgdb*.dll) + +file(COPY ${OSGEARTH_TOOLS} DESTINATION ${OSGEARTH_TOOL_PATH}) +file(COPY ${OSGDB_PLUGINS} DESTINATION ${OSGEARTH_TOOL_PLUGIN_PATH}) + +file(REMOVE_RECURSE ${OSGEARTH_TOOLS}) +file(REMOVE_RECURSE ${OSGDB_PLUGINS}) + +#Debug +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +set(OSGEARTH_DEBUG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/debug/tools/osgearth) +set(OSGEARTH_DEBUG_TOOL_PLUGIN_PATH ${OSGEARTH_DEBUG_TOOL_PATH}/${OSG_PLUGINS_SUBDIR}) + +file(MAKE_DIRECTORY ${OSGEARTH_DEBUG_TOOL_PATH}) +file(MAKE_DIRECTORY ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) + +file(GLOB OSGEARTH_DEBUG_TOOLS ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(GLOB OSGDB_DEBUG_PLUGINS ${CURRENT_PACKAGES_DIR}/debug/bin/osgdb*.dll) + +file(COPY ${OSGEARTH_DEBUG_TOOLS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PATH}) +file(COPY ${OSGDB_DEBUG_PLUGINS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) + +file(REMOVE_RECURSE ${OSGEARTH_DEBUG_TOOLS}) +file(REMOVE_RECURSE ${OSGDB_DEBUG_PLUGINS}) + + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/osgearth) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/osgearth/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/osgearth/copyright) diff --git a/ports/paho-mqtt/CONTROL b/ports/paho-mqtt/CONTROL index 1acf080ff24..1541c7fa54d 100644 --- a/ports/paho-mqtt/CONTROL +++ b/ports/paho-mqtt/CONTROL @@ -1,4 +1,4 @@ Source: paho-mqtt -Version: 1.2.0-3 +Version: 1.2.1 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 deleted file mode 100644 index ed9a644ff77..00000000000 --- a/ports/paho-mqtt/disable_tests.patch +++ /dev/null @@ -1,16 +0,0 @@ -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 19629b92c57..41c8eeb28c5 100644 --- a/ports/paho-mqtt/portfile.cmake +++ b/ports/paho-mqtt/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO eclipse/paho.mqtt.c - REF v1.2.0 - SHA512 ffad01a8f9f41049dd008e163136e4ecb8c7c51f7b49917201593b0844b15a8d2a413ddec06fa5b2d77e432f0603b71664a23afbb7c215121cebd7d419ccacfa + REF v1.2.1 + SHA512 98828852ecd127445591df31416adaebebd30848c027361ae62af6b14b84e3cf2a4b90cab692b983148cbf93f710a9e2dd722a3da8c4fd17eb2149e4227a8860 HEAD_REF master ) @@ -14,15 +14,14 @@ 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" + "${CMAKE_CURRENT_LIST_DIR}/remove_compiler_options.patch" ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_STATIC=${PAHO_BUILD_STATIC} + OPTIONS -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_STATIC=${PAHO_BUILD_STATIC} -DPAHO_ENABLE_TESTING=FALSE ) diff --git a/ports/paho-mqtt/remove_compiler_options.patch b/ports/paho-mqtt/remove_compiler_options.patch index 256d07a8f18..60bf370ce45 100644 --- a/ports/paho-mqtt/remove_compiler_options.patch +++ b/ports/paho-mqtt/remove_compiler_options.patch @@ -1,9 +1,9 @@ -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() +diff --git a/CMakeLists.txt b/CMakeLists.txt +index be8d2e8..418e2f2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -37,7 +37,7 @@ STRING(TIMESTAMP BUILD_TIMESTAMP UTC) + MESSAGE(STATUS "Timestamp is ${BUILD_TIMESTAMP}") IF(WIN32) - ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -MD) diff --git a/ports/pango/CMakeLists.txt b/ports/pango/CMakeLists.txt index 9c7e7f1825c..71b5f9fed3a 100644 --- a/ports/pango/CMakeLists.txt +++ b/ports/pango/CMakeLists.txt @@ -5,9 +5,14 @@ set(PANGO_LIB_SUFFIX 1.0) set(PANGO_DLL_SUFFIX 1) set(GLIB_LIB_VERSION 2.0) -configure_file(./config.h.win32 ${CMAKE_SOURCE_DIR}/config.h COPYONLY) +if(WIN32) + configure_file(./config.h.win32 ${CMAKE_CURRENT_BINARY_DIR}/config.h COPYONLY) +else() + configure_file(./config.h.unix ${CMAKE_CURRENT_BINARY_DIR}/config.h COPYONLY) +endif() + add_definitions(-DHAVE_CONFIG_H) -include_directories(. ./pango) +include_directories(. ./pango ${CMAKE_CURRENT_BINARY_DIR}) # find libintl find_path(LIBINTL_INCLUDE_DIR libintl.h) @@ -100,12 +105,14 @@ pango_add_module(pango pango/shape.c pango/pango-enum-types.c) +if(WIN32) pango_add_module(pangowin32 pango/pangowin32.c pango/pangowin32-fontcache.c pango/pangowin32-fontmap.c pango/pangowin32-shape.c) target_link_libraries(pangowin32 usp10 pango) +endif() pango_add_module(pangoft2 pango/pangofc-font.c @@ -122,18 +129,25 @@ pango_add_module(pangoft2 target_link_libraries(pangoft2 pango ${FONT_LIBRARIES}) target_include_directories(pangoft2 PRIVATE ${FONT_INCLUDE_DIRS}) -pango_add_module(pangocairo - pango/pangocairo-fcfont.c +list(APPEND PANGO_CAIRO_SOURCES + pango/pangocairo-fcfont.c pango/pangocairo-fcfontmap.c - pango/pangocairo-win32font.c - pango/pangocairo-win32fontmap.c pango/pangocairo-context.c pango/pangocairo-font.c pango/pangocairo-fontmap.c pango/pangocairo-render.c) + +if(WIN32) + list(APPEND PANGO_CAIRO_SOURCES + pango/pangocairo-win32font.c + pango/pangocairo-win32fontmap.c) +endif() + +pango_add_module(pangocairo ${PANGO_CAIRO_SOURCES}) target_link_libraries(pangocairo ${CAIRO_LIBRARIES} pango pangowin32 pangoft2 ${FONT_LIBRARIES}) target_include_directories(pangocairo PRIVATE ${CAIRO_INCLUDE_DIR} ${FONT_INCLUDE_DIRS}) + if(NOT PANGO_SKIP_HEADERS) install(FILES pango/pango.h diff --git a/ports/pango/CONTROL b/ports/pango/CONTROL index aa6c73e6866..e7b365e0b4c 100644 --- a/ports/pango/CONTROL +++ b/ports/pango/CONTROL @@ -1,4 +1,4 @@ Source: pango -Version: 1.40.11-1 +Version: 1.40.11-2 Description: Text and font handling library. -Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz +Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz[glib] (!windows-static) diff --git a/ports/pango/config.h.unix b/ports/pango/config.h.unix new file mode 100644 index 00000000000..83b2f52fddc --- /dev/null +++ b/ports/pango/config.h.unix @@ -0,0 +1,153 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Have usable Cairo library and font backend */ +#define HAVE_CAIRO 1 + +/* Whether Cairo can use FreeType for fonts */ +#define HAVE_CAIRO_FREETYPE 1 + +/* Whether Cairo has PDF support */ +/* #undef HAVE_CAIRO_PDF */ + +/* Whether Cairo has PNG support */ +/* #undef HAVE_CAIRO_PNG */ + +/* Whether Cairo has PS support */ +/* #undef HAVE_CAIRO_PS */ + +/* Whether Cairo can use Quartz for fonts */ +/* #undef HAVE_CAIRO_QUARTZ */ + +/* Whether Cairo can use the Win32 GDI for fonts */ +/* #undef HAVE_CAIRO_WIN32 */ + +/* Whether Cairo has Xlib support */ +/* #undef HAVE_CAIRO_XLIB */ + +/* Whether CoreText is available on the system */ +#ifdef __APPLE_CC__ + #define HAVE_CORE_TEXT 1 +#else + #undef HAVE_CORE_TEXT +#endif + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the `FcWeightFromOpenType' function. */ +/* #undef HAVE_FCWEIGHTFROMOPENTYPE */ + +/* Define to 1 if you have the `flockfile' function. */ +#define HAVE_FLOCKFILE 1 + +/* Have FreeType 2 library */ +#define HAVE_FREETYPE 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Whether libthai is available */ +/* #undef HAVE_LIBTHAI */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strtok_r' function. */ +#define HAVE_STRTOK_R 1 + +/* Define to 1 if you have the `sysconf' function. */ +#define HAVE_SYSCONF 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Have Xft library */ +/* #undef HAVE_XFT */ + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "pango" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=pango" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "pango" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "pango 1.40.11" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "pango" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.40.11" + +/* PANGO binary age */ +#define PANGO_BINARY_AGE 4011 + +/* PANGO interface age */ +#define PANGO_INTERFACE_AGE 11 + +/* PANGO major version */ +#define PANGO_VERSION_MAJOR 1 + +/* PANGO micro version */ +#define PANGO_VERSION_MICRO 11 + +/* PANGO minor version */ +#define PANGO_VERSION_MINOR 40 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION "1.40.11" + +/* defines how to decorate public symbols while building */ +#define _PANGO_EXTERN __attribute__((visibility("default"))) extern diff --git a/ports/pango/portfile.cmake b/ports/pango/portfile.cmake index 009953534eb..926efd98dde 100644 --- a/ports/pango/portfile.cmake +++ b/ports/pango/portfile.cmake @@ -1,24 +1,26 @@ include(vcpkg_common_functions) + 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 e4ac40f8da9c326e1e4dfaf4b1d2070601b17f88f5a12991a9a8bbc58bb08640404e2a794a5c68c5ebb2e7e80d9c186d4b26cd417bb63a23f024ef8a38bb152a) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${PANGO_VERSION} + PATCHES 0001-fix-static-symbols-export.diff +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-fix-static-symbols-export.diff) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.unix DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS_DEBUG - -DPANGO_SKIP_HEADERS=ON) + OPTIONS_DEBUG + -DPANGO_SKIP_HEADERS=ON +) vcpkg_install_cmake() vcpkg_copy_pdbs() diff --git a/ports/parquet/CONTROL b/ports/parquet/CONTROL new file mode 100644 index 00000000000..c9288597e56 --- /dev/null +++ b/ports/parquet/CONTROL @@ -0,0 +1,4 @@ +Source: parquet +Version: 1.4.0 +Build-Depends: arrow, thrift, gtest +Description: Parquet-cpp is a C++ library to read and write the Apache Parquet columnar data format. \ No newline at end of file diff --git a/ports/parquet/all.patch b/ports/parquet/all.patch new file mode 100644 index 00000000000..e9ec9966239 --- /dev/null +++ b/ports/parquet/all.patch @@ -0,0 +1,779 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 304f3fb..0b0fc1f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,7 +16,7 @@ + # under the License. + + # Require cmake that supports BYPRODUCTS in add_custom_command, ExternalProject_Add [1]. +-cmake_minimum_required(VERSION 3.2.0) ++cmake_minimum_required(VERSION 3.8) + + file(READ "${CMAKE_CURRENT_SOURCE_DIR}/.parquetcppversion" PARQUET_VERSION) + string(REPLACE "\n" "" PARQUET_VERSION "${PARQUET_VERSION}") +@@ -25,6 +25,10 @@ if(NOT VERSION) + message(FATAL_ERROR "invalid .parquetcppversion") + endif() + ++if(NOT DEFINED ARROW_LIB_SUFFIX) ++ set(ARROW_LIB_SUFFIX "") ++endif() ++ + project(parquet-cpp VERSION ${VERSION}) + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "C++ library to read and write the Apache Parquet columnar data format") + set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) +@@ -528,37 +532,25 @@ endif() + ############################################################# + # Apache Arrow linkage + +-if ("${PARQUET_ARROW_LINKAGE}" STREQUAL "shared") ++if ("${PARQUET_ARROW_LINKAGE}" STREQUAL "dynamic") + set(ARROW_LINK_LIBS +- arrow) ++ arrow_static) + else() + ############################################################# + # Transitive Library Linkage +- +- if (NOT DEFINED ENV{BROTLI_STATIC_LIB_ENC} OR +- NOT DEFINED ENV{BROTLI_STATIC_LIB_DEC} OR +- NOT DEFINED ENV{BROTLI_STATIC_LIB_COMMON} OR +- NOT DEFINED ENV{SNAPPY_STATIC_LIB} OR +- NOT DEFINED ENV{ZLIB_STATIC_LIB} OR +- NOT DEFINED ENV{LZ4_STATIC_LIB} OR +- NOT DEFINED ENV{ZSTD_STATIC_LIB}) +- message(FATAL_ERROR "Missing transitive dependencies for Arrow static linking") +- endif() +- +- set(BROTLI_STATIC_LIB_ENC "$ENV{BROTLI_STATIC_LIB_ENC}") +- set(BROTLI_STATIC_LIB_DEC "$ENV{BROTLI_STATIC_LIB_DEC}") +- set(BROTLI_STATIC_LIB_COMMON "$ENV{BROTLI_STATIC_LIB_COMMON}") +- set(SNAPPY_STATIC_LIB "$ENV{SNAPPY_STATIC_LIB}") +- set(ZLIB_STATIC_LIB "$ENV{ZLIB_STATIC_LIB}") +- set(LZ4_STATIC_LIB "$ENV{LZ4_STATIC_LIB}") +- set(ZSTD_STATIC_LIB "$ENV{ZSTD_STATIC_LIB}") +- ++ ++ find_package(Brotli REQUIRED) ++ find_package(Snappy REQUIRED) ++ find_package(LZ4 REQUIRED) ++ find_package(ZLIB REQUIRED) ++ find_package(ZSTD REQUIRED) ++ + add_library(brotli_enc STATIC IMPORTED) +- set_target_properties(brotli_enc PROPERTIES IMPORTED_LOCATION ${BROTLI_STATIC_LIB_ENC}) ++ set_target_properties(brotli_enc PROPERTIES IMPORTED_LOCATION ${BROTLI_STATIC_LIBRARY_ENC}) + add_library(brotli_dec STATIC IMPORTED) +- set_target_properties(brotli_dec PROPERTIES IMPORTED_LOCATION ${BROTLI_STATIC_LIB_DEC}) ++ set_target_properties(brotli_dec PROPERTIES IMPORTED_LOCATION ${BROTLI_STATIC_LIBRARY_DEC}) + add_library(brotli_common STATIC IMPORTED) +- set_target_properties(brotli_common PROPERTIES IMPORTED_LOCATION ${BROTLI_STATIC_LIB_COMMON}) ++ set_target_properties(brotli_common PROPERTIES IMPORTED_LOCATION ${BROTLI_STATIC_LIBRARY_COMMON}) + add_library(snappy STATIC IMPORTED) + set_target_properties(snappy PROPERTIES IMPORTED_LOCATION ${SNAPPY_STATIC_LIB}) + add_library(zlib STATIC IMPORTED) +@@ -588,9 +580,7 @@ endif() + ############################################################# + # Test linking + +-set(PARQUET_MIN_TEST_LIBS +- gtest +- gtest_main) ++set(PARQUET_MIN_TEST_LIBS GTest::GTest GTest::Main) + + if (APPLE) + set(PARQUET_MIN_TEST_LIBS +diff --git a/cmake_modules/FindArrow.cmake b/cmake_modules/FindArrow.cmake +index b63b1af..3329c4a 100644 +--- a/cmake_modules/FindArrow.cmake ++++ b/cmake_modules/FindArrow.cmake +@@ -22,76 +22,21 @@ + # ARROW_SHARED_LIB, path to libarrow's shared library + # ARROW_FOUND, whether arrow has been found + +-if (DEFINED ENV{ARROW_HOME}) +- set(ARROW_HOME "$ENV{ARROW_HOME}") +-endif() +- +-if ("${ARROW_HOME}" STREQUAL "") +- # PARQUET-955. If the user has set $ARROW_HOME in the environment, we respect +- # this, otherwise try to locate the pkgconfig in the system environment +- pkg_check_modules(ARROW arrow) +- if (ARROW_FOUND) +- # We found the pkgconfig +- set(ARROW_INCLUDE_DIR ${ARROW_INCLUDE_DIRS}) +- +- if (COMMAND pkg_get_variable) +- pkg_get_variable(ARROW_ABI_VERSION arrow abi_version) +- else() +- set(ARROW_ABI_VERSION "") +- endif() +- if (ARROW_ABI_VERSION STREQUAL "") +- set(ARROW_SHARED_LIB_SUFFIX "") +- else() +- set(ARROW_SHARED_LIB_SUFFIX ".${ARROW_ABI_VERSION}") +- endif() +- +- set(ARROW_LIB_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}arrow) +- +- if (APPLE) +- set(ARROW_SHARED_LIB ${ARROW_LIBDIR}/${ARROW_LIB_NAME}${ARROW_SHARED_LIB_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}) +- else() +- set(ARROW_SHARED_LIB ${ARROW_LIBDIR}/${ARROW_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}${ARROW_SHARED_LIB_SUFFIX}) +- endif() +- set(ARROW_STATIC_LIB ${ARROW_LIBDIR}/${ARROW_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}) +- endif() +-else() +- set(ARROW_HOME "${ARROW_HOME}") ++find_path(ARROW_INCLUDE_DIR arrow/array.h ++ PATH_SUFFIXES "include" ++ ) + +- if (MSVC AND NOT ARROW_MSVC_STATIC_LIB_SUFFIX) +- set(ARROW_MSVC_STATIC_LIB_SUFFIX _static) +- endif() ++find_library(ARROW_LIB_PATH NAMES arrow) + +- set(ARROW_SEARCH_HEADER_PATHS +- ${ARROW_HOME}/include +- ) ++if (ARROW_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR ARROW_LIB_PATH)) ++ set(ARROW_FOUND TRUE) ++ set(ARROW_HEADER_NAME arrow/api.h) ++ set(ARROW_HEADER ${ARROW_INCLUDE_DIR}/${ARROW_HEADER_NAME}) ++ set(ARROW_LIB_NAME arrow) + +- set(ARROW_SEARCH_LIB_PATH +- ${ARROW_HOME}/lib +- ) +- +- find_path(ARROW_INCLUDE_DIR arrow/array.h PATHS +- ${ARROW_SEARCH_HEADER_PATHS} +- # make sure we don't accidentally pick up a different version +- NO_DEFAULT_PATH +- ) +- +- find_library(ARROW_LIB_PATH NAMES arrow arrow${ARROW_MSVC_STATIC_LIB_SUFFIX} +- PATHS +- ${ARROW_SEARCH_LIB_PATH} +- NO_DEFAULT_PATH) +- +- if (ARROW_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR ARROW_LIB_PATH)) +- set(ARROW_FOUND TRUE) +- set(ARROW_HEADER_NAME arrow/api.h) +- set(ARROW_HEADER ${ARROW_INCLUDE_DIR}/${ARROW_HEADER_NAME}) +- set(ARROW_LIB_NAME arrow) +- +- get_filename_component(ARROW_LIBS ${ARROW_LIB_PATH} DIRECTORY) +- set(ARROW_STATIC_LIB ${ARROW_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${ARROW_LIB_NAME}${ARROW_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) +- set(ARROW_SHARED_LIB ${ARROW_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${ARROW_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) +- set(ARROW_SHARED_IMPLIB ${ARROW_LIBS}/${ARROW_LIB_NAME}.lib) +- endif () +-endif() ++ set(ARROW_STATIC_LIB ${ARROW_LIB_PATH}) ++ set(ARROW_SHARED_LIB ${ARROW_LIB_PATH}) ++endif () + + if (ARROW_FOUND) + if (NOT Arrow_FIND_QUIETLY) +diff --git a/cmake_modules/FindBrotli.cmake b/cmake_modules/FindBrotli.cmake +index f2e714c..9561660 100644 +--- a/cmake_modules/FindBrotli.cmake ++++ b/cmake_modules/FindBrotli.cmake +@@ -17,13 +17,6 @@ + # + # find_package(Brotli) + # +-# Variables used by this module, they can change the default behaviour and need +-# to be set before calling find_package: +-# +-# Brotli_HOME - When set, this path is inspected instead of standard library +-# locations as the root of the Brotli installation. +-# The environment variable BROTLI_HOME overrides this veriable. +-# + # This module defines + # BROTLI_INCLUDE_DIR, directory containing headers + # BROTLI_LIBS, directory containing brotli libraries +@@ -31,80 +24,37 @@ + # BROTLI_SHARED_LIB, path to libbrotli's shared library + # BROTLI_FOUND, whether brotli has been found + +-if( NOT "${BROTLI_HOME}" STREQUAL "") +- file( TO_CMAKE_PATH "${BROTLI_HOME}" _native_path ) +- list( APPEND _brotli_roots ${_native_path} ) +-elseif ( Brotli_HOME ) +- list( APPEND _brotli_roots ${Brotli_HOME} ) +-endif() +- + find_path( BROTLI_INCLUDE_DIR NAMES brotli/decode.h +- PATHS ${_brotli_roots} +- NO_DEFAULT_PATH + PATH_SUFFIXES "include" ) +- +-find_library( BROTLI_LIBRARY_ENC NAMES libbrotlienc.a brotlienc +- PATHS ${_brotli_roots} +- NO_DEFAULT_PATH +- PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib" ) +- +-find_library( BROTLI_LIBRARY_DEC NAMES libbrotlidec.a brotlidec +- PATHS ${_brotli_roots} +- NO_DEFAULT_PATH +- PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib" ) +- +-find_library( BROTLI_LIBRARY_COMMON NAMES libbrotlicommon.a brotlicommon +- PATHS ${_brotli_roots} +- NO_DEFAULT_PATH +- PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib" ) ++ ++find_library( BROTLI_LIBRARY_ENC NAMES libbrotlienc.a brotlienc brotlienc-static ) ++find_library( BROTLI_LIBRARY_DEC NAMES libbrotlidec.a brotlidec brotlidec-static ) ++find_library( BROTLI_LIBRARY_COMMON NAMES libbrotlicommon.a brotlicommon brotlicommon-static ) + + set(BROTLI_LIBRARIES ${BROTLI_LIBRARY_ENC} ${BROTLI_LIBRARY_DEC} + ${BROTLI_LIBRARY_COMMON}) + +-if (BROTLI_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR BROTLI_LIBRARIES)) ++if (BROTLI_INCLUDE_DIR) + 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_LIBRARY_ENC} ++ ${BROTLI_LIBRARY_DEC} ++ ${BROTLI_LIBRARY_COMMON}) ++ set(BROTLI_STATIC_LIBRARY_ENC ${BROTLI_LIBRARY_ENC}) ++ set(BROTLI_STATIC_LIBRARY_DEC ${BROTLI_LIBRARY_DEC}) ++ set(BROTLI_STATIC_LIBRARY_COMMON ${BROTLI_LIBRARY_COMMON}) + 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} +- ${BROTLI_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${BROTLI_LIB_NAME}common${CMAKE_SHARED_LIBRARY_SUFFIX}) ++ ${BROTLI_LIBRARY_ENC} ++ ${BROTLI_LIBRARY_DEC} ++ ${BROTLI_LIBRARY_COMMON}) + else () + set(BROTLI_FOUND FALSE) + endif () + + if (BROTLI_FOUND) +- if (NOT Brotli_FIND_QUIETLY) +- if (PARQUET_MINIMAL_DEPENDENCY) +- message(STATUS "Found the Brotli headers: ${BROTLI_INCLUDE_DIR}") +- else () +- message(STATUS "Found the Brotli library: ${BROTLI_LIBRARIES}") +- endif () +- endif () ++ message(STATUS "Found the Brotli library: ${BROTLI_LIBRARIES}") + else () +- if (NOT Brotli_FIND_QUIETLY) +- set(BROTLI_ERR_MSG "Could not find the Brotli library. Looked in ") +- if ( _brotli_roots ) +- set(BROTLI_ERR_MSG "${BROTLI_ERR_MSG} in ${_brotli_roots}.") +- else () +- set(BROTLI_ERR_MSG "${BROTLI_ERR_MSG} system search paths.") +- endif () +- if (Brotli_FIND_REQUIRED) +- message(FATAL_ERROR "${BROTLI_ERR_MSG}") +- else (Brotli_FIND_REQUIRED) +- message(STATUS "${BROTLI_ERR_MSG}") +- endif (Brotli_FIND_REQUIRED) +- endif () ++ message(FATAL_ERROR "Could not find the Brotli library.") + endif () + + mark_as_advanced( +diff --git a/cmake_modules/FindGTest.cmake b/cmake_modules/FindGTest.cmake +deleted file mode 100644 +index c6ea16b..0000000 +--- a/cmake_modules/FindGTest.cmake ++++ /dev/null +@@ -1,94 +0,0 @@ +-# +-# Licensed under the Apache License, Version 2.0 (the "License"); +-# you may not use this file except in compliance with the License. +-# You may obtain a copy of the License at +-# +-# http://www.apache.org/licenses/LICENSE-2.0 +-# +-# Unless required by applicable law or agreed to in writing, software +-# distributed under the License is distributed on an "AS IS" BASIS, +-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-# See the License for the specific language governing permissions and +-# limitations under the License. +-# +-# Tries to find GTest headers and libraries. +-# +-# Usage of this module as follows: +-# +-# find_package(GTest) +-# +-# Variables used by this module, they can change the default behaviour and need +-# to be set before calling find_package: +-# +-# GTest_HOME - When set, this path is inspected instead of standard library +-# locations as the root of the GTest installation. +-# The environment variable GTEST_HOME overrides this veriable. +-# +-# This module defines +-# GTEST_INCLUDE_DIR, directory containing headers +-# GTEST_LIBS, directory containing gtest libraries +-# GTEST_STATIC_LIB, path to libgtest.a +-# GTEST_MAIN_STATIC_LIB, path to libgtest_main.a +-# GTEST_SHARED_LIB, path to libgtest's shared library +-# GTEST_FOUND, whether gtest has been found +- +-if( NOT "$ENV{GTEST_HOME}" STREQUAL "") +- file( TO_CMAKE_PATH "$ENV{GTEST_HOME}" _native_path ) +- list( APPEND _gtest_roots ${_native_path} ) +-elseif ( GTest_HOME ) +- list( APPEND _gtest_roots ${GTest_HOME} ) +-endif() +- +-# Try the parameterized roots, if they exist +-if ( _gtest_roots ) +- find_path( GTEST_INCLUDE_DIR NAMES gtest/gtest.h +- PATHS ${_gtest_roots} NO_DEFAULT_PATH +- PATH_SUFFIXES "include" ) +- find_library( GTEST_LIBRARIES NAMES gtest gtest_main +- PATHS ${_gtest_roots} NO_DEFAULT_PATH +- PATH_SUFFIXES "lib" ) +-else () +- find_path( GTEST_INCLUDE_DIR NAMES gtest/gtest.h ) +- find_library( GTEST_LIBRARIES NAMES gtest ) +-endif () +- +- +-if (GTEST_INCLUDE_DIR AND GTEST_LIBRARIES) +- set(GTEST_FOUND TRUE) +- get_filename_component( GTEST_LIBS ${GTEST_LIBRARIES} PATH ) +- set(GTEST_LIB_NAME gtest) +- set(GTEST_STATIC_LIB ${GTEST_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${GTEST_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}) +- set(GTEST_MAIN_STATIC_LIB ${GTEST_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${GTEST_LIB_NAME}_main${CMAKE_STATIC_LIBRARY_SUFFIX}) +- set(GTEST_SHARED_LIB ${GTEST_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${GTEST_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) +-else () +- set(GTEST_FOUND FALSE) +-endif () +- +-if (GTEST_FOUND) +- if (NOT GTest_FIND_QUIETLY) +- message(STATUS "Found the GTest library: ${GTEST_LIBRARIES}") +- endif () +-else () +- if (NOT GTest_FIND_QUIETLY) +- set(GTEST_ERR_MSG "Could not find the GTest library. Looked in ") +- if ( _gtest_roots ) +- set(GTEST_ERR_MSG "${GTEST_ERR_MSG} in ${_gtest_roots}.") +- else () +- set(GTEST_ERR_MSG "${GTEST_ERR_MSG} system search paths.") +- endif () +- if (GTest_FIND_REQUIRED) +- message(FATAL_ERROR "${GTEST_ERR_MSG}") +- else (GTest_FIND_REQUIRED) +- message(STATUS "${GTEST_ERR_MSG}") +- endif (GTest_FIND_REQUIRED) +- endif () +-endif () +- +-mark_as_advanced( +- GTEST_INCLUDE_DIR +- GTEST_LIBS +- GTEST_LIBRARIES +- GTEST_STATIC_LIB +- GTEST_MAIN_STATIC_LIB +- GTEST_SHARED_LIB +-) +diff --git a/cmake_modules/FindLZ4.cmake b/cmake_modules/FindLZ4.cmake +new file mode 100644 +index 0000000..8458d7f +--- /dev/null ++++ b/cmake_modules/FindLZ4.cmake +@@ -0,0 +1,62 @@ ++# ++# Licensed under the Apache License, Version 2.0 (the "License"); ++# you may not use this file except in compliance with the License. ++# You may obtain a copy of the License at ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, ++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++# See the License for the specific language governing permissions and ++# limitations under the License. ++# ++# Tries to find LZ4 headers and libraries. ++# ++# Usage of this module as follows: ++# ++# find_package(Snappy) ++# ++# This module defines ++# LZ4_INCLUDE_DIR, directory containing headers ++# LZ4_LIBS, directory containing LZ4 libraries ++# LZ4_STATIC_LIB, path to lz4.a ++# LZ4_SHARED_LIB, path to lz4's shared library ++# LZ4_FOUND, whether LZ4 has been found ++ ++find_path(LZ4_INCLUDE_DIR lz4.h ++ PATH_SUFFIXES "include") ++ ++if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") ++ set(LZ4_LIB_SUFFIX "d") ++else() ++ set(LZ4_LIB_SUFFIX "") ++endif() ++ ++find_library( LZ4_LIBRARIES NAMES lz4${LZ4_LIB_SUFFIX} ++ PATH_SUFFIXES "lib") ++ ++if (LZ4_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR LZ4_LIBRARIES)) ++ set(LZ4_FOUND TRUE) ++ get_filename_component( LZ4_LIBS ${LZ4_LIBRARIES} PATH ) ++ set(LZ4_HEADER_NAME lz4.h) ++ set(LZ4_HEADER ${LZ4_INCLUDE_DIR}/${LZ4_HEADER_NAME}) ++ set(LZ4_STATIC_LIB ${LZ4_LIBRARIES}) ++ set(LZ4_SHARED_LIB ${LZ4_LIBRARIES}) ++else () ++ set(LZ4_FOUND FALSE) ++endif () ++ ++if (LZ4_FOUND) ++ message(STATUS "Found the LZ4 library: ${LZ4_LIBRARIES}") ++else () ++ message(FATAL_ERROR "Could not find the LZ4 library.") ++endif () ++ ++mark_as_advanced( ++ LZ4_INCLUDE_DIR ++ LZ4_LIBS ++ LZ4_LIBRARIES ++ LZ4_STATIC_LIB ++ LZ4_SHARED_LIB ++) +diff --git a/cmake_modules/FindSnappy.cmake b/cmake_modules/FindSnappy.cmake +index 867963c..cc68688 100644 +--- a/cmake_modules/FindSnappy.cmake ++++ b/cmake_modules/FindSnappy.cmake +@@ -17,13 +17,6 @@ + # + # find_package(Snappy) + # +-# Variables used by this module, they can change the default behaviour and need +-# to be set before calling find_package: +-# +-# Snappy_HOME - When set, this path is inspected instead of standard library +-# locations as the root of the Snappy installation. +-# The environment variable SNAPPY_HOME overrides this variable. +-# + # This module defines + # SNAPPY_INCLUDE_DIR, directory containing headers + # SNAPPY_LIBS, directory containing snappy libraries +@@ -31,22 +24,16 @@ + # SNAPPY_SHARED_LIB, path to libsnappy's shared library + # SNAPPY_FOUND, whether snappy has been found + +-if( NOT "${SNAPPY_HOME}" STREQUAL "") +- file( TO_CMAKE_PATH "${SNAPPY_HOME}" _native_path ) +- list( APPEND _snappy_roots ${_native_path} ) +-elseif ( Snappy_HOME ) +- list( APPEND _snappy_roots ${Snappy_HOME} ) +-endif() +- +-message(STATUS "SNAPPY_HOME: ${SNAPPY_HOME}") +-find_path(SNAPPY_INCLUDE_DIR snappy.h HINTS +- ${_snappy_roots} +- NO_DEFAULT_PATH ++find_path(SNAPPY_INCLUDE_DIR snappy.h + PATH_SUFFIXES "include") ++ ++if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") ++ set(SNAPPY_LIB_SUFFIX "d") ++else() ++ set(SNAPPY_LIB_SUFFIX "") ++endif() + +-find_library( SNAPPY_LIBRARIES NAMES snappy PATHS +- ${_snappy_roots} +- NO_DEFAULT_PATH ++find_library( SNAPPY_LIBRARIES NAMES snappy${SNAPPY_LIB_SUFFIX} + PATH_SUFFIXES "lib") + + if (SNAPPY_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR SNAPPY_LIBRARIES)) +@@ -54,9 +41,8 @@ if (SNAPPY_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR SNAPPY_LIBRARIES)) + get_filename_component( SNAPPY_LIBS ${SNAPPY_LIBRARIES} PATH ) + 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_SHARED_LIB ${SNAPPY_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${SNAPPY_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) ++ set(SNAPPY_STATIC_LIB ${SNAPPY_LIBRARIES}) ++ set(SNAPPY_SHARED_LIB ${SNAPPY_LIBRARIES}) + else () + set(SNAPPY_FOUND FALSE) + endif () +diff --git a/cmake_modules/FindThrift.cmake b/cmake_modules/FindThrift.cmake +index 25f5082..f27857f 100644 +--- a/cmake_modules/FindThrift.cmake ++++ b/cmake_modules/FindThrift.cmake +@@ -14,55 +14,28 @@ + + # - Find Thrift (a cross platform RPC lib/tool) + # +-# Variables used by this module, they can change the default behaviour and need +-# to be set before calling find_package: +-# +-# Thrift_HOME - When set, this path is inspected instead of standard library +-# locations as the root of the Thrift installation. +-# The environment variable THRIFT_HOME overrides this variable. +-# + # This module defines + # THRIFT_VERSION, version string of ant if found + # THRIFT_INCLUDE_DIR, where to find THRIFT headers +-# THRIFT_CONTRIB_DIR, where contrib thrift files (e.g. fb303.thrift) are installed + # THRIFT_STATIC_LIB, THRIFT static library + # THRIFT_FOUND, If false, do not try to use ant + +-# prefer the thrift version supplied in THRIFT_HOME +-if( NOT "${THRIFT_HOME}" STREQUAL "") +- file( TO_CMAKE_PATH "${THRIFT_HOME}" _native_path ) +- list( APPEND _thrift_roots ${_native_path} ) +-elseif ( Thrift_HOME ) +- list( APPEND _thrift_roots ${Thrift_HOME} ) +-endif() +- +-message(STATUS "THRIFT_HOME: ${THRIFT_HOME}") +-find_path(THRIFT_INCLUDE_DIR thrift/Thrift.h HINTS +- ${_thrift_roots} +- NO_DEFAULT_PATH ++find_path(THRIFT_INCLUDE_DIR thrift/Thrift.h + PATH_SUFFIXES "include" + ) + +-find_path(THRIFT_CONTRIB_DIR share/fb303/if/fb303.thrift HINTS +- ${_thrift_roots} +- NO_DEFAULT_PATH +-) +- +-if (MSVC AND NOT THRIFT_MSVC_STATIC_LIB_SUFFIX) +- set(THRIFT_MSVC_STATIC_LIB_SUFFIX md) ++if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") ++ set(THRIFT_LIB_SUFFIX mdd) ++else() ++ set(THRIFT_LIB_SUFFIX md) + endif() + + find_library(THRIFT_STATIC_LIB NAMES +- ${CMAKE_STATIC_LIBRARY_PREFIX}thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX} +- HINTS ${_thrift_roots} +- NO_DEFAULT_PATH +- PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib" ++ thrift${THRIFT_LIB_SUFFIX} + ) + + find_program(THRIFT_COMPILER thrift HINTS +- ${_thrift_roots} +- NO_DEFAULT_PATH +- PATH_SUFFIXES "bin" ++ PATH_SUFFIXES "tools" + ) + + if (THRIFT_STATIC_LIB) +@@ -94,7 +67,6 @@ else () + endif () + endif () + +- + mark_as_advanced( + THRIFT_STATIC_LIB + THRIFT_COMPILER +diff --git a/cmake_modules/FindZLIB.cmake b/cmake_modules/FindZLIB.cmake +index 78b84f2..1ef0305 100644 +--- a/cmake_modules/FindZLIB.cmake ++++ b/cmake_modules/FindZLIB.cmake +@@ -32,27 +32,17 @@ + # ZLIB_SHARED_LIB, path to libz's shared library + # ZLIB_FOUND, whether zlib has been found + +-if( NOT "${ZLIB_HOME}" STREQUAL "") +- file( TO_CMAKE_PATH "${ZLIB_HOME}" _native_path ) +- list( APPEND _zlib_roots ${_native_path} ) +-elseif ( ZLIB_HOME ) +- list( APPEND _zlib_roots ${ZLIB_HOME} ) ++find_path( ZLIB_INCLUDE_DIR NAMES zlib.h ++ PATH_SUFFIXES "include" ) ++ ++if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") ++ set(ZLIB_LIB_SUFFIX "d") ++else() ++ set(ZLIB_LIB_SUFFIX "") + endif() +- +-# Try the parameterized roots, if they exist +-if ( _zlib_roots ) +- find_path( ZLIB_INCLUDE_DIR NAMES zlib.h +- PATHS ${_zlib_roots} NO_DEFAULT_PATH +- PATH_SUFFIXES "include" ) +- find_library( ZLIB_LIBRARIES NAMES libz.a zlib +- PATHS ${_zlib_roots} NO_DEFAULT_PATH +- PATH_SUFFIXES "lib" ) +-else () +- find_path( ZLIB_INCLUDE_DIR NAMES zlib.h ) +- # Only look for the static library +- find_library( ZLIB_LIBRARIES NAMES libz.a zlib ) +-endif () +- ++ ++find_library( ZLIB_LIBRARIES NAMES libz.a zlib${ZLIB_LIB_SUFFIX} ++ PATH_SUFFIXES "lib" ) + + if (ZLIB_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR ZLIB_LIBRARIES)) + set(ZLIB_FOUND TRUE) +@@ -66,8 +56,8 @@ if (ZLIB_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR ZLIB_LIBRARIES)) + 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_SHARED_LIB ${ZLIB_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${ZLIB_MSVC_SHARED_LIB_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}) ++ set(ZLIB_STATIC_LIB ${ZLIB_LIBRARIES}) ++ set(ZLIB_SHARED_LIB ${ZLIB_LIBRARIES}) + else () + set(ZLIB_FOUND FALSE) + endif () +diff --git a/cmake_modules/FindZSTD.cmake b/cmake_modules/FindZSTD.cmake +new file mode 100644 +index 0000000..062cfa9 +--- /dev/null ++++ b/cmake_modules/FindZSTD.cmake +@@ -0,0 +1,62 @@ ++# ++# Licensed under the Apache License, Version 2.0 (the "License"); ++# you may not use this file except in compliance with the License. ++# You may obtain a copy of the License at ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, ++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++# See the License for the specific language governing permissions and ++# limitations under the License. ++# ++# Tries to find ZSTD headers and libraries. ++# ++# Usage of this module as follows: ++# ++# find_package(Snappy) ++# ++# This module defines ++# ZSTD_INCLUDE_DIR, directory containing headers ++# ZSTD_LIBS, directory containing ZSTD libraries ++# ZSTD_STATIC_LIB, path to zstd.a ++# ZSTD_SHARED_LIB, path to ZSTD's shared library ++# ZSTD_FOUND, whether ZSTD has been found ++ ++find_path(ZSTD_INCLUDE_DIR ZSTD.h ++ PATH_SUFFIXES "include") ++ ++if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") ++ set(ZSTD_LIB_SUFFIX "d") ++else() ++ set(ZSTD_LIB_SUFFIX "") ++endif() ++ ++find_library( ZSTD_LIBRARIES NAMES zstd${ZSTD_LIB_SUFFIX} zstd_static${ZSTD_LIB_SUFFIX} ++ PATH_SUFFIXES "lib") ++ ++if (ZSTD_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR ZSTD_LIBRARIES)) ++ set(ZSTD_FOUND TRUE) ++ get_filename_component( ZSTD_LIBS ${ZSTD_LIBRARIES} PATH ) ++ set(ZSTD_HEADER_NAME zstd.h) ++ set(ZSTD_HEADER ${ZSTD_INCLUDE_DIR}/${ZSTD_HEADER_NAME}) ++ set(ZSTD_STATIC_LIB ${ZSTD_LIBRARIES}) ++ set(ZSTD_SHARED_LIB ${ZSTD_LIBRARIES}) ++else () ++ set(ZSTD_FOUND FALSE) ++endif () ++ ++if (ZSTD_FOUND) ++ message(STATUS "Found the ZSTD library: ${ZSTD_LIBRARIES}") ++else () ++ message(FATAL_ERROR "Could not find the ZSTD library.") ++endif () ++ ++mark_as_advanced( ++ ZSTD_INCLUDE_DIR ++ ZSTD_LIBS ++ ZSTD_LIBRARIES ++ ZSTD_STATIC_LIB ++ ZSTD_SHARED_LIB ++) +diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake +index 690fd0b..d74bb3d 100644 +--- a/cmake_modules/ThirdpartyToolchain.cmake ++++ b/cmake_modules/ThirdpartyToolchain.cmake +@@ -276,54 +276,11 @@ endif() + if(PARQUET_BUILD_TESTS AND NOT IGNORE_OPTIONAL_PACKAGES) + add_custom_target(unittest ctest -L unittest) + +- if("$ENV{GTEST_HOME}" STREQUAL "") +- if(APPLE) +- set(GTEST_CMAKE_CXX_FLAGS "${EP_CXX_FLAGS} -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-value -Wno-ignored-attributes") +- else() +- set(GTEST_CMAKE_CXX_FLAGS "${EP_CXX_FLAGS}") +- endif() +- +- set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix/src/googletest_ep") +- set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include") +- set(GTEST_STATIC_LIB +- "${GTEST_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}") +- set(GTEST_MAIN_STATIC_LIB +- "${GTEST_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}") +- +- set(GTEST_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} +- -DCMAKE_INSTALL_PREFIX=${GTEST_PREFIX} +- -DCMAKE_CXX_FLAGS=${GTEST_CMAKE_CXX_FLAGS}) +- +- if (MSVC AND NOT PARQUET_USE_STATIC_CRT) +- set(GTEST_CMAKE_ARGS ${GTEST_CMAKE_ARGS} -Dgtest_force_shared_crt=ON) +- endif() +- +- ExternalProject_Add(googletest_ep +- URL "https://github.com/google/googletest/archive/release-${GTEST_VERSION}.tar.gz" +- BUILD_BYPRODUCTS "${GTEST_STATIC_LIB}" "${GTEST_MAIN_STATIC_LIB}" +- CMAKE_ARGS ${GTEST_CMAKE_ARGS} +- ${EP_LOG_OPTIONS}) +- set(GTEST_VENDORED 1) +- else() +- find_package(GTest REQUIRED) +- set(GTEST_VENDORED 0) +- endif() ++ find_package(GTest REQUIRED) ++ include_directories(SYSTEM ${GTEST_INCLUDE_DIR}) + + message(STATUS "GTest include dir: ${GTEST_INCLUDE_DIR}") + message(STATUS "GTest static library: ${GTEST_STATIC_LIB}") +- include_directories(SYSTEM ${GTEST_INCLUDE_DIR}) +- +- add_library(gtest STATIC IMPORTED) +- set_target_properties(gtest PROPERTIES IMPORTED_LOCATION ${GTEST_STATIC_LIB}) +- +- add_library(gtest_main STATIC IMPORTED) +- set_target_properties(gtest_main PROPERTIES IMPORTED_LOCATION +- ${GTEST_MAIN_STATIC_LIB}) +- +- if(GTEST_VENDORED) +- add_dependencies(gtest googletest_ep) +- add_dependencies(gtest_main googletest_ep) +- endif() + endif() + + ## Google Benchmark diff --git a/ports/parquet/portfile.cmake b/ports/parquet/portfile.cmake new file mode 100644 index 00000000000..5a67bf3460e --- /dev/null +++ b/ports/parquet/portfile.cmake @@ -0,0 +1,51 @@ +include(vcpkg_common_functions) + +if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + message(FATAL_ERROR "Apache Parquet only supports x64") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/parquet-cpp + REF apache-parquet-cpp-1.4.0 + SHA512 a6c12e39dcae123ae1893f7fc32bae32e32a1943182b1c0c1c2726134ee4fa6470d73a6ff8e3ce312eeb250d7fa35c9b9f3c227a35ba0aa6f873ce3954217bed + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/all.patch" +) + +SET(ENV{GTEST_HOME} ${CURRENT_INSTALLED_DIR}) + +string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" PARQUET_BUILD_SHARED) +string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" PARQUET_BUILD_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DTHRIFT_HOME=${CURRENT_INSTALLED_DIR} + -DARROW_HOME=${CURRENT_INSTALLED_DIR} + -DPARQUET_BUILD_STATIC=${PARQUET_BUILD_STATIC} + -DPARQUET_BUILD_SHARED=${PARQUET_BUILD_SHARED} + -DPARQUET_ARROW_LINKAGE=${VCPKG_LIBRARY_LINKAGE} + -DPARQUET_BUILD_TOOLCHAIN=${CURRENT_INSTALLED_DIR} + -DPARQUET_BOOST_USE_SHARED=${PARQUET_BUILD_SHARED} +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/parquet RENAME copyright) + +# Put CMake files in the right place +file(INSTALL ${CURRENT_PACKAGES_DIR}/cmake/parquet-cppConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/parquet) +file(INSTALL ${CURRENT_PACKAGES_DIR}/cmake/parquet-cppConfigVersion.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/parquet RENAME parquet-cppConfigVersion-release.cmake) +file(INSTALL ${CURRENT_PACKAGES_DIR}/debug/cmake/parquet-cppConfigVersion.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/parquet RENAME parquet-cppConfigVersion-debug.cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/parson/CONTROL b/ports/parson/CONTROL index 7c82a9ebaf0..1210c7e2eda 100644 --- a/ports/parson/CONTROL +++ b/ports/parson/CONTROL @@ -1,3 +1,3 @@ Source: parson -Version: 2018-04-17 +Version: 2018-09-18 Description: a lighweight json library written in C diff --git a/ports/parson/portfile.cmake b/ports/parson/portfile.cmake index 87fda6451e6..cfc1d861ec5 100644 --- a/ports/parson/portfile.cmake +++ b/ports/parson/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO kgabis/parson - REF 921da6f5d7b82ac3c8c809341028daafe47e3210 - SHA512 fac1989d03148c1efec5e483704e76110c6575258c7ad0585f4598c1666b22804b8bd672fa31869227b5334fb1ba0b70eb380a971950df1a8f52e56e646956d9 + REF 0a1896939faff5f69e179637fc49f678ff0128ba + SHA512 cb982ce7dbbe0b5a4d08a28a459e9dce5347f90d75b0a37c56698f5b79ad37aa0bd22fe6b6d5c8a6fda2dd83b072605486581360b8ed3591012ebaa1e1518fc6 HEAD_REF master ) diff --git a/ports/pbc/CONTROL b/ports/pbc/CONTROL new file mode 100644 index 00000000000..a8ee1048642 --- /dev/null +++ b/ports/pbc/CONTROL @@ -0,0 +1,4 @@ +Source: pbc +Version: 0.5.14 +Build-Depends: mpir +Description: Pairing-Based Crypto library provides low-level routines for pairing-based cryptosystems. diff --git a/ports/pbc/linux.patch b/ports/pbc/linux.patch new file mode 100644 index 00000000000..198277739f2 --- /dev/null +++ b/ports/pbc/linux.patch @@ -0,0 +1,45 @@ +--- configure.ac 2018-11-29 13:51:14.495012138 +0100 ++++ configure.ac 2018-11-29 13:51:45.308095312 +0100 +@@ -10,7 +10,6 @@ + LT_INIT + #AC_CANONICAL_HOST + +-CFLAGS= + default_fink_path=/sw + case $host_os in + darwin*) +@@ -78,20 +77,7 @@ + AC_PROG_MAKE_SET + + AC_PROG_LEX +-if test "x$LEX" != xflex; then +- echo "************************" +- echo "flex not found" +- echo "************************" +- exit -1 +-fi +- + AC_PROG_YACC +-if test "x$YACC" != "xbison -y"; then +- echo "************************" +- echo "bison not found" +- echo "************************" +- exit -1 +-fi + + # Checks for libraries. + lib_err_msg="add its path to LDFLAGS\nsee ./configure --help" +@@ -121,13 +134,6 @@ + + CFLAGS="$CFLAGS -Wall -W -Wfloat-equal -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wredundant-decls \ + -Wendif-labels -Wshadow -pipe -ffast-math -U__STRICT_ANSI__ -std=gnu99" +-if test "$with_debug" == "y"; then +- CFLAGS="$CFLAGS -g3 -O0" +-elif test "$with_enable_optimized" != "no"; then +- CFLAGS="$CFLAGS -g -O2" +-else +- CFLAGS="$CFLAGS -fomit-frame-pointer -O3" +-fi + + if test "$with_safe_clean" != "n"; then + CFLAGS="$CFLAGS -DSAFE_CLEAN" diff --git a/ports/pbc/portfile.cmake b/ports/pbc/portfile.cmake new file mode 100644 index 00000000000..32e233420c7 --- /dev/null +++ b/ports/pbc/portfile.cmake @@ -0,0 +1,153 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "PBC currently can only be built for desktop") +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "static" AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "PBC currently can only be built using the dynamic CRT when building DLLs") +endif() + +set(PBC_VERSION 0.5.14) + +if(VCPKG_CMAKE_SYSTEM_NAME) + vcpkg_download_distfile( + ARCHIVE + URLS "https://crypto.stanford.edu/pbc/files/pbc-${PBC_VERSION}.tar.gz" + FILENAME pbc-${PBC_VERSION}.tar.gz + SHA512 d75d4ceb3f67ee62c7ca41e2a91ee914fbffaeb70256675aed6734d586950ea8e64e2f16dc069d71481eddb703624df8d46497005fb58e75cf098dd7e7961333 + ) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${PBC_VERSION} + PATCHES linux.patch + ) + + vcpkg_find_acquire_program(BISON) + vcpkg_find_acquire_program(FLEX) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(SHARED_STATIC --enable-static --disable-shared) + else() + set(SHARED_STATIC --disable-static --enable-shared) + endif() + + set(OPTIONS ${SHARED_STATIC} LEX=${FLEX} YACC=${BISON}\ -y) + vcpkg_execute_required_process( + COMMAND ${SOURCE_PATH}/setup + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME setup-${TARGET_TRIPLET} + ) + + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + set(ENV{CFLAGS} "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG} -O0 -g -I${SOURCE_PATH}/include") + set(ENV{LDFLAGS} "${VCPKG_LINKER_FLAGS}") + vcpkg_execute_required_process( + COMMAND ${SOURCE_PATH}/configure --prefix=${CURRENT_PACKAGES_DIR}/debug ${OPTIONS} --with-sysroot=${CURRENT_INSTALLED_DIR}/debug + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME configure-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND make -j install + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME install-${TARGET_TRIPLET}-dbg + ) + + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + set(ENV{CFLAGS} "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE} -O3 -I${SOURCE_PATH}/include") + set(ENV{LDFLAGS} "${VCPKG_LINKER_FLAGS}") + vcpkg_execute_required_process( + COMMAND ${SOURCE_PATH}/configure --prefix=${CURRENT_PACKAGES_DIR} ${OPTIONS} --with-sysroot=${CURRENT_INSTALLED_DIR} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME configure-${TARGET_TRIPLET}-rel + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND make -j install + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME install-${TARGET_TRIPLET}-rel + ) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/info) + configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/pbc/copyright COPYONLY) +else() + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO blynn/pbc + REF fbf4589036ce4f662e2d06905862c9e816cf9d08 + SHA512 9348afd3866090b9fca189ae3a6bbb86c842b5f6ee7e1972f1a579993e589952c5926cb0795d4db1e647e3af263827e22c7602314c39bd97e03ffe9ad0fb48ab + HEAD_REF master + PATCHES windows.patch + ) + + set(CMAKE_FIND_LIBRARY_PREFIXES "") + set(CMAKE_FIND_LIBRARY_SUFFIXES "") + + find_path(MPIR_INCLUDE_DIR "gmp.h" HINTS ${CURRENT_INSTALLED_DIR} PATH_SUFFIXES include) + if(NOT MPIR_INCLUDE_DIR) + message(FATAL_ERROR "GMP includes not found") + endif() + + find_library(MPIR_LIBRARIES_REL NAMES "mpir.lib" HINTS ${CURRENT_INSTALLED_DIR} PATH_SUFFIXES lib) + if(NOT MPIR_LIBRARIES_REL) + message(FATAL_ERROR "mpir library not found") + endif() + + find_library(MPIR_LIBRARIES_DBG NAMES "mpir.lib" HINTS ${CURRENT_INSTALLED_DIR} PATH_SUFFIXES debug/lib) + if(NOT MPIR_LIBRARIES_DBG) + message(FATAL_ERROR "mpir debug library not found") + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(LibrarySuffix "lib") + set(ConfigurationSuffix "") + else() + set(LibrarySuffix "dll") + set(ConfigurationSuffix " DLL") + endif() + + if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(RuntimeLibraryExt "") + else() + set(RuntimeLibraryExt "DLL") + endif() + + if(TRIPLET_SYSTEM_ARCH STREQUAL "x86") + set(Platform "Win32") + else() + set(Platform ${TRIPLET_SYSTEM_ARCH}) + endif() + + # PBC expects mpir directory in build root + get_filename_component(SOURCE_PATH_PARENT ${SOURCE_PATH} DIRECTORY) + file(REMOVE_RECURSE ${SOURCE_PATH_PARENT}/mpir) + file(MAKE_DIRECTORY ${SOURCE_PATH_PARENT}/mpir) + file(GLOB FILES ${MPIR_INCLUDE_DIR}/gmp*.h) + file(COPY ${FILES} ${MPIR_LIBRARIES_REL} DESTINATION "${SOURCE_PATH_PARENT}/mpir/${LibrarySuffix}/${Platform}/Release") + file(COPY ${FILES} ${MPIR_LIBRARIES_DBG} DESTINATION "${SOURCE_PATH_PARENT}/mpir/${LibrarySuffix}/${Platform}/Debug") + + get_filename_component(SOURCE_PATH_SUFFIX ${SOURCE_PATH} NAME) + vcpkg_install_msbuild(SOURCE_PATH ${SOURCE_PATH_PARENT} + PROJECT_SUBPATH ${SOURCE_PATH_SUFFIX}/pbcwin/projects/pbclib.vcxproj + INCLUDES_SUBPATH ${SOURCE_PATH_SUFFIX}/include + LICENSE_SUBPATH ${SOURCE_PATH_SUFFIX}/COPYING + RELEASE_CONFIGURATION "Release${ConfigurationSuffix}" + DEBUG_CONFIGURATION "Debug${ConfigurationSuffix}" + OPTIONS_DEBUG "/p:RuntimeLibrary=MultiThreadedDebug${RuntimeLibraryExt}" + OPTIONS_RELEASE "/p:RuntimeLibrary=MultiThreaded${RuntimeLibraryExt}" + OPTIONS /p:SolutionDir=../ + ALLOW_ROOT_INCLUDES ON + ) + + # clean up mpir stuff + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mpir.lib ${CURRENT_PACKAGES_DIR}/debug/lib/mpir.lib) +endif() diff --git a/ports/pbc/windows.patch b/ports/pbc/windows.patch new file mode 100644 index 00000000000..5b790767afa --- /dev/null +++ b/ports/pbc/windows.patch @@ -0,0 +1,108 @@ +diff --git "a/include/pbc_vc_compat.win32.h" "b/include/pbc_vc_compat.win32.h" +index 27d3bba..7f772d4 100644 +--- "a/include/pbc_vc_compat.win32.h" ++++ "b/include/pbc_vc_compat.win32.h" +@@ -3,7 +3,3 @@ + #define __attribute__(X) + #define inline + #define __func__ __FUNCTION__ +- +-#define NULL 0 +- +-#define snprintf _snprintf +\ No newline at end of file +diff --git "a/pbcwin/projects/pbclib.vcxproj" "b/pbcwin/projects/pbclib.vcxproj" +index f0a9b3f..507c24d 100644 +--- "a/pbcwin/projects/pbclib.vcxproj" ++++ "b/pbcwin/projects/pbclib.vcxproj" +@@ -214,13 +214,13 @@  + + + $(SolutionDir)..\include;$(SolutionDir)..;$(SolutionDir)..\..\mpir\lib\$(Platform)\Release;$(IncludePath) +- $(SolutionDir)..\..\mpir\lib\x64\Release;$(LibraryPath) ++ $(SolutionDir)..\..\mpir\lib\$(Platform)\Release;$(LibraryPath) + $(SolutionDir)lib\$(Platform)\Release\ + $(SolutionDir)obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + +- $(SolutionDir)..\include;$(SolutionDir)..;$(SolutionDir)..\..\mpir\lib\x64\Release;$(IncludePath) +- $(SolutionDir)..\..\mpir\lib\x64\Release;$(LibraryPath) ++ $(SolutionDir)..\include;$(SolutionDir)..;$(SolutionDir)..\..\mpir\lib\$(Platform)\Release;$(IncludePath) ++ $(SolutionDir)..\..\mpir\lib\$(Platform)\Release;$(LibraryPath) + $(SolutionDir)lib\$(Platform)\Release\ + $(SolutionDir)obj\$(Platform)\$(Configuration)\$(ProjectName)\ + +@@ -245,7 +245,8 @@  + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + pbc_vc_compat.win32.h + 4068 +- MultiThreadedDebug ++ $(RuntimeLibrary) ++ OldStyle + + + true +@@ -275,7 +276,8 @@ echo *************************************************************************** + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + pbc_vc_compat.win32.h + 4068 +- MultiThreadedDebug ++ $(RuntimeLibrary) ++ OldStyle + + + true +@@ -305,7 +307,7 @@ echo *************************************************************************** + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + pbc_vc_compat.win32.h + 4068 +- MultiThreadedDebugDLL ++ $(RuntimeLibrary) + + + true +@@ -332,7 +334,7 @@ echo *************************************************************************** + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + pbc_vc_compat.win32.h + 4068 +- MultiThreadedDebugDLL ++ $(RuntimeLibrary) + + + true +@@ -361,7 +363,7 @@ echo *************************************************************************** + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + pbc_vc_compat.win32.h + 4068 +- MultiThreaded ++ $(RuntimeLibrary) + + + true +@@ -395,7 +397,7 @@ echo *************************************************************************** + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + pbc_vc_compat.win32.h + 4068 +- MultiThreaded ++ $(RuntimeLibrary) + + + true +@@ -429,7 +431,7 @@ echo *************************************************************************** + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + pbc_vc_compat.win32.h + 4068 +- MultiThreadedDLL ++ $(RuntimeLibrary) + + + true +@@ -460,7 +462,7 @@ echo *************************************************************************** + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + pbc_vc_compat.win32.h + 4068 +- MultiThreadedDLL ++ $(RuntimeLibrary) + + + true diff --git a/ports/pcg/CONTROL b/ports/pcg/CONTROL new file mode 100644 index 00000000000..e0103507637 --- /dev/null +++ b/ports/pcg/CONTROL @@ -0,0 +1,3 @@ +Source: pcg +Version: 0.98.1 +Description: Permuted Congruential Generator diff --git a/ports/pcg/portfile.cmake b/ports/pcg/portfile.cmake new file mode 100644 index 00000000000..75a4c904057 --- /dev/null +++ b/ports/pcg/portfile.cmake @@ -0,0 +1,14 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO imneme/pcg-cpp + REF v0.98.1 + SHA512 3625913eba3b5d3ff0763a00728535cd5273a335f0ce0a9ab8e0cd8183a52309cbf72ae50d089cfea89445201993466a5533469db1cb6e82b14c62564731fe70 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include/pcg_extras.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/include/pcg_random.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/include/pcg_uint128.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/pcg RENAME copyright) diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index 82f5cdea35a..a9f23813d20 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,5 +1,5 @@ Source: pcl -Version: 1.8.1-10 +Version: 1.9.1-1 Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. Build-Depends: eigen3, flann, qhull, vtk, libpng, boost-system, boost-filesystem, boost-thread, boost-date-time, boost-iostreams, boost-random, boost-foreach, boost-dynamic-bitset, boost-property-map, boost-graph, boost-multi-array, boost-signals2, boost-ptr-container, boost-uuid, boost-interprocess, boost-asio diff --git a/ports/pcl/boost_uuid_random_generator_compat.patch b/ports/pcl/boost_uuid_random_generator_compat.patch deleted file mode 100644 index 891890b46b5..00000000000 --- a/ports/pcl/boost_uuid_random_generator_compat.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0405dca2..00e5238e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -168,6 +168,8 @@ if(CMAKE_COMPILER_IS_MSVC) - endif() - endif() - -+add_definitions(-DBOOST_UUID_RANDOM_GENERATOR_COMPAT) -+ - if(CMAKE_COMPILER_IS_PATHSCALE) - if("${CMAKE_CXX_FLAGS}" STREQUAL "") - SET(CMAKE_CXX_FLAGS "-Wno-uninitialized -zerouv -pthread -mp") diff --git a/ports/pcl/cmakelists.patch b/ports/pcl/cmakelists.patch deleted file mode 100644 index d385fd29133..00000000000 --- a/ports/pcl/cmakelists.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d36a581fb..b68962e97 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -258,7 +258,7 @@ if(OPENMP_FOUND) - set(OPENMP_DLL VCOMP120) - elseif(MSVC_VERSION EQUAL 1900) - set(OPENMP_DLL VCOMP140) -- elseif(MSVC_VERSION EQUAL 1910) -+ elseif(MSVC_VERSION MATCHES "^191[0-9]$") - set(OPENMP_DLL VCOMP140) - endif() - if(OPENMP_DLL) -@@ -327,9 +327,9 @@ endif(WITH_PNG) - # Qhull - option(WITH_QHULL "Include convex-hull operations" TRUE) - if(WITH_QHULL) -- if(NOT PCL_SHARED_LIBS OR WIN32) -+ if(NOT PCL_SHARED_LIBS) - set(QHULL_USE_STATIC ON) -- endif(NOT PCL_SHARED_LIBS OR WIN32) -+ endif(NOT PCL_SHARED_LIBS) - find_package(Qhull) - if(QHULL_FOUND) - include_directories(${QHULL_INCLUDE_DIRS}) diff --git a/ports/pcl/config_install.patch b/ports/pcl/config_install.patch deleted file mode 100644 index ae5e8257b79..00000000000 --- a/ports/pcl/config_install.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/cmake/pcl_utils.cmake b/cmake/pcl_utils.cmake -index 69f1e76a4..37305815e 100644 ---- a/cmake/pcl_utils.cmake -+++ b/cmake/pcl_utils.cmake -@@ -105,7 +105,7 @@ macro(SET_INSTALL_DIRS) - endif (NOT DEFINED LIB_INSTALL_DIR) - if(NOT ANDROID) - set(INCLUDE_INSTALL_ROOT -- "include/${PROJECT_NAME_LOWER}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}") -+ "include") - else(NOT ANDROID) - set(INCLUDE_INSTALL_ROOT "include") # Android, don't put into subdir - endif(NOT ANDROID) -@@ -114,7 +114,7 @@ macro(SET_INSTALL_DIRS) - set(BIN_INSTALL_DIR "bin") - set(PKGCFG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig") - if(WIN32 AND NOT MINGW) -- set(PCLCONFIG_INSTALL_DIR "cmake") -+ set(PCLCONFIG_INSTALL_DIR "share/pcl") - else(WIN32 AND NOT MINGW) - set(PCLCONFIG_INSTALL_DIR "share/${PROJECT_NAME_LOWER}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}") - endif(WIN32 AND NOT MINGW) diff --git a/ports/pcl/find_cuda.patch b/ports/pcl/find_cuda.patch deleted file mode 100644 index 6e872cdab4d..00000000000 --- a/ports/pcl/find_cuda.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/cmake/pcl_find_cuda.cmake b/cmake/pcl_find_cuda.cmake -index fd9cfa9..ae9e612 100644 ---- a/cmake/pcl_find_cuda.cmake -+++ b/cmake/pcl_find_cuda.cmake -@@ -43,7 +43,9 @@ if(CUDA_FOUND) - - # Find a complete list for CUDA compute capabilities at http://developer.nvidia.com/cuda-gpus - -- if(NOT ${CUDA_VERSION_STRING} VERSION_LESS "8.0") -+ if(NOT ${CUDA_VERSION_STRING} VERSION_LESS "9.0") -+ set(__cuda_arch_bin "3.0 3.5 5.0 5.2 5.3 6.0 6.1 7.0") -+ elseif(NOT ${CUDA_VERSION_STRING} VERSION_LESS "8.0") - set(__cuda_arch_bin "2.0 2.1(2.0) 3.0 3.5 5.0 5.2 5.3 6.0 6.1") - elseif(NOT ${CUDA_VERSION_STRING} VERSION_LESS "6.5") - set(__cuda_arch_bin "2.0 2.1(2.0) 3.0 3.5 5.0 5.2") diff --git a/ports/pcl/find_flann.patch b/ports/pcl/find_flann.patch index e9760e502d4..263be292619 100644 --- a/ports/pcl/find_flann.patch +++ b/ports/pcl/find_flann.patch @@ -1,5 +1,5 @@ diff --git a/cmake/Modules/FindFLANN.cmake b/cmake/Modules/FindFLANN.cmake -index b5739dc95..d2c3fd07e 100644 +index 1cecacfa9..3169d6d7b 100644 --- a/cmake/Modules/FindFLANN.cmake +++ b/cmake/Modules/FindFLANN.cmake @@ -10,8 +10,8 @@ @@ -13,12 +13,3 @@ index b5739dc95..d2c3fd07e 100644 else(FLANN_USE_STATIC) set(FLANN_RELEASE_NAME flann_cpp) set(FLANN_DEBUG_NAME flann_cpp-gd) -@@ -41,7 +41,7 @@ find_library(FLANN_LIBRARY_DEBUG - NAMES ${FLANN_DEBUG_NAME} ${FLANN_RELEASE_NAME} - HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT}" "$ENV{FLANN_ROOT}" - PATHS "$ENV{PROGRAMFILES}/Flann" "$ENV{PROGRAMW6432}/Flann" -- PATH_SUFFIXES lib) -+ PATH_SUFFIXES lib debug/lib) - - if(NOT FLANN_LIBRARY_DEBUG) - set(FLANN_LIBRARY_DEBUG ${FLANN_LIBRARY}) diff --git a/ports/pcl/find_openni2.patch b/ports/pcl/find_openni2.patch deleted file mode 100644 index 4bd3e0799a7..00000000000 --- a/ports/pcl/find_openni2.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/cmake/Modules/FindOpenNI2.cmake b/cmake/Modules/FindOpenNI2.cmake -index 713099a14..f31de96a6 100644 ---- a/cmake/Modules/FindOpenNI2.cmake -+++ b/cmake/Modules/FindOpenNI2.cmake -@@ -51,6 +51,7 @@ find_path(OPENNI2_INCLUDE_DIRS OpenNI.h - PATHS - "$ENV{OPENNI2_INCLUDE${OPENNI2_SUFFIX}}" # Win64 needs '64' suffix - /usr/include/openni2 # common path for deb packages -+ PATH_SUFFIXES include/openni2 - ) - - find_library(OPENNI2_LIBRARY diff --git a/ports/pcl/find_qhull.patch b/ports/pcl/find_qhull.patch deleted file mode 100644 index e845293be48..00000000000 --- a/ports/pcl/find_qhull.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/Modules/FindQhull.cmake b/cmake/Modules/FindQhull.cmake -index 698bd151b..44c1d5d8d 100644 ---- a/cmake/Modules/FindQhull.cmake -+++ b/cmake/Modules/FindQhull.cmake -@@ -55,7 +55,7 @@ find_library(QHULL_LIBRARY_DEBUG - NAMES ${QHULL_DEBUG_NAME} ${QHULL_RELEASE_NAME} - HINTS "${QHULL_ROOT}" "$ENV{QHULL_ROOT}" - PATHS "$ENV{PROGRAMFILES}/QHull" "$ENV{PROGRAMW6432}/QHull" -- PATH_SUFFIXES project build bin lib) -+ PATH_SUFFIXES project build bin lib debug/lib) - - if(NOT QHULL_LIBRARY_DEBUG) - set(QHULL_LIBRARY_DEBUG ${QHULL_LIBRARY}) diff --git a/ports/pcl/config.patch b/ports/pcl/pcl_config.patch similarity index 66% rename from ports/pcl/config.patch rename to ports/pcl/pcl_config.patch index 1b46ab7cea7..17af6cfb6ef 100644 --- a/ports/pcl/config.patch +++ b/ports/pcl/pcl_config.patch @@ -1,26 +1,8 @@ diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in -index f4ef6a0ff..3a2c259dc 100644 +index 7ec40baa0..837d78c82 100644 --- a/PCLConfig.cmake.in +++ b/PCLConfig.cmake.in -@@ -155,7 +155,7 @@ macro(find_qhull) - NAMES "@QHULL_LIBRARY_DEBUG_NAME@" - HINTS "${QHULL_ROOT}" "$ENV{QHULL_ROOT}" - PATHS "$ENV{PROGRAMFILES}/qhull" "$ENV{PROGRAMW6432}/qhull" -- PATH_SUFFIXES project build bin lib) -+ PATH_SUFFIXES project build bin lib debug/lib) - - find_package_handle_standard_args(qhull DEFAULT_MSG QHULL_LIBRARY QHULL_INCLUDE_DIRS) - -@@ -443,7 +443,7 @@ macro(find_flann) - HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT}" "$ENV{FLANN_ROOT}" - PATHS "$ENV{PROGRAMFILES}/flann 1.6.9" "$ENV{PROGRAMW6432}/flann 1.6.9" - "$ENV{PROGRAMFILES}/flann" "$ENV{PROGRAMW6432}/flann" -- PATH_SUFFIXES lib) -+ PATH_SUFFIXES lib debug/lib) - - find_package_handle_standard_args(Flann DEFAULT_MSG FLANN_LIBRARY FLANN_INCLUDE_DIRS) - if(FLANN_FOUND) -@@ -715,25 +715,18 @@ file(TO_CMAKE_PATH "${PCL_DIR}" PCL_DIR) +@@ -388,25 +388,18 @@ file(TO_CMAKE_PATH "${PCL_DIR}" PCL_DIR) if(WIN32 AND NOT MINGW) # PCLConfig.cmake is installed to PCL_ROOT/cmake get_filename_component(PCL_ROOT "${PCL_DIR}" PATH) @@ -49,13 +31,13 @@ index f4ef6a0ff..3a2c259dc 100644 if(EXISTS "${PCL_ROOT}/3rdParty") set(PCL_ALL_IN_ONE_INSTALLER ON) endif(EXISTS "${PCL_ROOT}/3rdParty") -@@ -743,9 +736,9 @@ elseif(EXISTS "${PCL_DIR}/include/pcl/pcl_config.h") +@@ -416,9 +409,9 @@ elseif(EXISTS "${PCL_DIR}/include/pcl/pcl_config.h") set(PCL_INCLUDE_DIRS "${PCL_DIR}/include") # for pcl_config.h set(PCL_LIBRARY_DIRS "${PCL_DIR}/@LIB_INSTALL_DIR@") set(PCL_SOURCES_TREE "@CMAKE_SOURCE_DIR@") -else(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl/pcl_config.h") +else(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h") - pcl_report_not_found("PCL can not be found on this machine") + pcl_report_not_found("PCL can not be found on this machine") -endif(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl/pcl_config.h") +endif(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h") diff --git a/ports/pcl/pcl_utils.patch b/ports/pcl/pcl_utils.patch new file mode 100644 index 00000000000..9c12e4d05e8 --- /dev/null +++ b/ports/pcl/pcl_utils.patch @@ -0,0 +1,28 @@ +diff --git a/cmake/pcl_utils.cmake b/cmake/pcl_utils.cmake +index f523dbc8c..a171b6d24 100644 +--- a/cmake/pcl_utils.cmake ++++ b/cmake/pcl_utils.cmake +@@ -97,21 +97,12 @@ macro(SET_INSTALL_DIRS) + if (NOT DEFINED LIB_INSTALL_DIR) + set(LIB_INSTALL_DIR "lib") + endif (NOT DEFINED LIB_INSTALL_DIR) +- if(NOT ANDROID) +- set(INCLUDE_INSTALL_ROOT +- "include/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") +- else(NOT ANDROID) +- set(INCLUDE_INSTALL_ROOT "include") # Android, don't put into subdir +- endif(NOT ANDROID) ++ set(INCLUDE_INSTALL_ROOT "include") + set(INCLUDE_INSTALL_DIR "${INCLUDE_INSTALL_ROOT}/pcl") + set(DOC_INSTALL_DIR "share/doc/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") + set(BIN_INSTALL_DIR "bin") + set(PKGCFG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig") +- if(WIN32 AND NOT MINGW) +- set(PCLCONFIG_INSTALL_DIR "cmake") +- else(WIN32 AND NOT MINGW) +- set(PCLCONFIG_INSTALL_DIR "share/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") +- endif(WIN32 AND NOT MINGW) ++ set(PCLCONFIG_INSTALL_DIR "share/pcl") + endmacro(SET_INSTALL_DIRS) + + diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index 12c9ec39849..4036d534680 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -3,22 +3,12 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO PointCloudLibrary/pcl - REF pcl-1.8.1 - SHA512 9e7c87fb750a176712f08d215a906012c9e8174b687bbc8c08fa65de083b4468951bd8017b10409015d5eff0fc343885d2aae5c340346118b1a251af7bdd5cd7 + REF pcl-1.9.1 + SHA512 ca95028c23861ac2df0fa7e18fdd0202255cb2e49ab714325eb36c35289442c6eedbf489e6f9f232b30fa2a93eff4c9619f8a14d3fdfe58f353a4a6e26206bdf HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/cmakelists.patch" - "${CMAKE_CURRENT_LIST_DIR}/config.patch" - "${CMAKE_CURRENT_LIST_DIR}/config_install.patch" - "${CMAKE_CURRENT_LIST_DIR}/find_flann.patch" - "${CMAKE_CURRENT_LIST_DIR}/find_qhull.patch" - "${CMAKE_CURRENT_LIST_DIR}/find_openni2.patch" - "${CMAKE_CURRENT_LIST_DIR}/find_cuda.patch" - "${CMAKE_CURRENT_LIST_DIR}/vs2017-15.4-workaround.patch" - "${CMAKE_CURRENT_LIST_DIR}/boost_uuid_random_generator_compat.patch" + PATCHES pcl_utils.patch + pcl_config.patch + find_flann.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PCL_SHARED_LIBS) @@ -60,6 +50,7 @@ vcpkg_configure_cmake( # PCL -DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=${PCL_SHARED_LIBS} -DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=${PCL_SHARED_LIBS} + -DPCL_BUILD_WITH_QHULL_DYNAMIC_LINKING_WIN32=${PCL_SHARED_LIBS} -DPCL_SHARED_LIBS=${PCL_SHARED_LIBS} # WITH -DWITH_CUDA=${WITH_CUDA} diff --git a/ports/pcl/vs2017-15.4-workaround.patch b/ports/pcl/vs2017-15.4-workaround.patch deleted file mode 100644 index 5600c9dc8fb..00000000000 --- a/ports/pcl/vs2017-15.4-workaround.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/io/include/pcl/io/ply/ply_parser.h b/io/include/pcl/io/ply/ply_parser.h -index 649d19a..45709a8 100644 ---- a/io/include/pcl/io/ply/ply_parser.h -+++ b/io/include/pcl/io/ply/ply_parser.h -@@ -115,7 +115,7 @@ namespace pcl - - class scalar_property_definition_callbacks_type - { -- private: -+ public: - template - struct callbacks_element - { -@@ -123,7 +123,8 @@ namespace pcl - typedef T scalar_type; - typename scalar_property_definition_callback_type::type callback; - }; -- -+ -+ private: - typedef boost::mpl::inherit_linearly< - scalar_types, - boost::mpl::inherit< -@@ -218,6 +219,7 @@ namespace pcl - boost::mpl::_1,boost::mpl::transform > > > - {}; - -+ public: - template - struct callbacks_element - { -@@ -225,7 +227,8 @@ namespace pcl - typedef typename T::second scalar_type; - typename list_property_definition_callback_type::type callback; - }; -- -+ -+ private: - typedef boost::mpl::inherit_linearly::type, boost::mpl::inherit > >::type callbacks; - callbacks callbacks_; - diff --git a/ports/pdal/0001-win32_compiler_options.cmake.patch b/ports/pdal/0001-win32_compiler_options.cmake.patch new file mode 100644 index 00000000000..8486cc1cd97 --- /dev/null +++ b/ports/pdal/0001-win32_compiler_options.cmake.patch @@ -0,0 +1,14 @@ +diff -Nuar a/cmake/win32_compiler_options.cmake b/cmake/win32_compiler_options.cmake +--- a/cmake/win32_compiler_options.cmake 2018-04-06 20:24:17.000000000 +0200 ++++ b/cmake/win32_compiler_options.cmake 2018-04-28 19:40:54.534593200 +0200 +@@ -67,10 +67,6 @@ + endif() + endif() + +-set(CMAKE_INCLUDE_PATH "c:/OSGeo4W64/include;$ENV{CMAKE_INCLUDE_PATH}") +-set(CMAKE_LIBRARY_PATH "c:/OSGeo4W64/lib;$ENV{CMAKE_LIBRARY_PATH}") +-set(CMAKE_PREFIX_PATH "c:/OSGeo4W64/cmake;$ENV{CMAKE_LIBRARY_PATH}") +- + #ABELL (& gadomski) - WHY? + set(PDAL_PLATFORM_WIN32 1) + set(WINSOCK_LIBRARY ws2_32) diff --git a/ports/pdal/CONTROL b/ports/pdal/CONTROL new file mode 100644 index 00000000000..ebb658c90f9 --- /dev/null +++ b/ports/pdal/CONTROL @@ -0,0 +1,4 @@ +Source: pdal +Version: 1.7.1-3 +Description: PDAL - Point Data Abstraction Library is a library for manipulating point cloud data. +Build-Depends: gdal, geos, jsoncpp, libgeotiff, laszip diff --git a/ports/pdal/FindGDAL.cmake b/ports/pdal/FindGDAL.cmake new file mode 100644 index 00000000000..9683cb0e520 --- /dev/null +++ b/ports/pdal/FindGDAL.cmake @@ -0,0 +1,13 @@ +find_path(GDAL_INCLUDE_DIR gdal.h) + +find_library(GDAL_LIBRARY_DEBUG NAMES gdald) +find_library(GDAL_LIBRARY_RELEASE NAMES gdal) + +include(SelectLibraryConfigurations) +select_library_configurations(GDAL) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + GDAL DEFAULT_MSG + GDAL_LIBRARY GDAL_INCLUDE_DIR +) diff --git a/ports/pdal/FindGEOS.cmake b/ports/pdal/FindGEOS.cmake new file mode 100644 index 00000000000..88d17b0733d --- /dev/null +++ b/ports/pdal/FindGEOS.cmake @@ -0,0 +1,13 @@ +find_path(GEOS_INCLUDE_DIR geos_c.h) + +find_library(GEOS_LIBRARY_DEBUG NAMES geos_cd) +find_library(GEOS_LIBRARY_RELEASE NAMES geos_c) + +include(SelectLibraryConfigurations) +select_library_configurations(GEOS) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + GEOS DEFAULT_MSG + GEOS_LIBRARY GEOS_INCLUDE_DIR +) diff --git a/ports/pdal/FindGeoTIFF.cmake b/ports/pdal/FindGeoTIFF.cmake new file mode 100644 index 00000000000..51a5fb2d8df --- /dev/null +++ b/ports/pdal/FindGeoTIFF.cmake @@ -0,0 +1,13 @@ +find_path(GEOTIFF_INCLUDE_DIR geotiff.h) + +find_library(GEOTIFF_LIBRARY_DEBUG NAMES geotiff_d) +find_library(GEOTIFF_LIBRARY_RELEASE NAMES geotiff) + +include(SelectLibraryConfigurations) +select_library_configurations(GEOTIFF) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + GEOTIFF DEFAULT_MSG + GEOTIFF_LIBRARY GEOTIFF_INCLUDE_DIR +) diff --git a/ports/pdal/no-source-dir-writes.patch b/ports/pdal/no-source-dir-writes.patch new file mode 100644 index 00000000000..f7ec12f6bfb --- /dev/null +++ b/ports/pdal/no-source-dir-writes.patch @@ -0,0 +1,49 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dc146d1..9b82544 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -140,7 +140,7 @@ get_git_head_revision(GIT_REFSPEC GIT_SHA1) + + configure_file( + "${PROJECT_SOURCE_DIR}/gitsha.cpp.in" +- "${PROJECT_SOURCE_DIR}/pdal/gitsha.cpp") ++ "${PROJECT_BINARY_DIR}/pdal/gitsha.cpp") + + # needs to come before configuration of pdal_features + if(APPLE) +@@ -201,6 +201,7 @@ file(GLOB BASE_SRCS + ${PDAL_IO_DIR}/*.cpp + ${PDAL_KERNELS_DIR}/*.cpp + ${PDAL_SRC_DIR}/*.cpp ++ ${PROJECT_BINARY_DIR}/pdal/gitsha.cpp + ${PDAL_SRC_DIR}/compression/*.cpp) + file(GLOB_RECURSE PRIVATE_SRCS + ${PDAL_FILTERS_DIR}/private/*.cpp +diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt +index b02aa4a..d60b041 100644 +--- a/apps/CMakeLists.txt ++++ b/apps/CMakeLists.txt +@@ -66,9 +66,9 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pdal.pc + if(UNIX OR APPLE) + # Autoconf compatibility variables to use the same script source. + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pdal-config.in" +- "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config" @ONLY) ++ "${CMAKE_CURRENT_BINARY_DIR}/pdal-config" @ONLY) + +- file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config" ++ file(COPY "${CMAKE_CURRENT_BINARY_DIR}/pdal-config" + DESTINATION + "${PDAL_OUTPUT_BIN_DIR}/" + FILE_PERMISSIONS +@@ -85,9 +85,9 @@ if(UNIX OR APPLE) + elseif(WIN32) + # Autoconf compatibility variables to use the same script source. + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pdal-config-bat.in" +- "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config.bat" @ONLY) ++ "${CMAKE_CURRENT_BINARY_DIR}/pdal-config.bat" @ONLY) + +- file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config.bat" ++ file(COPY "${CMAKE_CURRENT_BINARY_DIR}/pdal-config.bat" + DESTINATION + "${PDAL_OUTPUT_BIN_DIR}/" + FILE_PERMISSIONS diff --git a/ports/pdal/portfile.cmake b/ports/pdal/portfile.cmake new file mode 100644 index 00000000000..cbcb97cedb6 --- /dev/null +++ b/ports/pdal/portfile.cmake @@ -0,0 +1,82 @@ +# vcpkg portfile.cmake for PDAL +# +# NOTE: update the version string for new PDAL release +set(PDAL_VERSION_STR "1.7.1") +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/PDAL-${PDAL_VERSION_STR}-src) + +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.osgeo.org/pdal/PDAL-${PDAL_VERSION_STR}-src.tar.gz" + FILENAME "PDAL-${PDAL_VERSION_STR}-src.tar.gz" + SHA512 e3e63bb05930c1a28c4f46c7edfaa8e9ea20484f1888d845b660a29a76f1dd1daea3db30a98607be0c2eeb86930ec8bfd0965d5d7d84b07a4fe4cb4512da9b09 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001-win32_compiler_options.cmake.patch + ${CMAKE_CURRENT_LIST_DIR}/no-source-dir-writes.patch +) + +file(REMOVE "${SOURCE_PATH}/pdal/gitsha.cpp") + +# Deploy custom CMake modules to enforce expected dependencies look-up +foreach(_module IN ITEMS FindGDAL FindGEOS FindGeoTIFF) + file(REMOVE "${SOURCE_PATH}/cmake/modules/${_module}.cmake") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/${_module}.cmake + DESTINATION ${SOURCE_PATH}/cmake/modules/ + ) +endforeach() + +# NOTE: CMake native BUILD_SHARED_LIBS option will be set by vcpkg_configure_cmake +# TODO: Remove this as soon as PDAL switches to use BUILD_SHARED_LIBS +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(PDAL_BUILD_STATIC OFF) +else() + set(PDAL_BUILD_STATIC ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPDAL_BUILD_STATIC:BOOL=${PDAL_BUILD_STATIC} + -DWITH_TESTS:BOOL=OFF + -DWITH_COMPLETION:BOOL=OFF +) + +vcpkg_install_cmake(ADD_BIN_TO_PATH) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/pdal/cmake) +vcpkg_copy_pdbs() + +# Install copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/pdal RENAME copyright +) + +# Install PDAL executable +file(GLOB _pdal_apps ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(COPY ${_pdal_apps} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/pdal) +file(REMOVE ${_pdal_apps}) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +# Post-install clean-up +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/lib/pdal + ${CURRENT_PACKAGES_DIR}/debug/lib/pdal + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +else() + file(GLOB _pdal_bats ${CURRENT_PACKAGES_DIR}/bin/*.bat) + file(REMOVE ${_pdal_bats}) + file(GLOB _pdal_bats ${CURRENT_PACKAGES_DIR}/debug/bin/*.bat) + file(REMOVE ${_pdal_bats}) + file(GLOB _pdal_apps ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${_pdal_apps}) +endif() diff --git a/ports/pdcurses/CONTROL b/ports/pdcurses/CONTROL index befa5c2fc1b..29cbff29bdb 100644 --- a/ports/pdcurses/CONTROL +++ b/ports/pdcurses/CONTROL @@ -1,3 +1,3 @@ Source: pdcurses -Version: 3.4-1 +Version: 3.6 Description: Public Domain Curses - a curses library for environments that don't fit the termcap/terminfo model. diff --git a/ports/pdcurses/portfile.cmake b/ports/pdcurses/portfile.cmake index f9db020b9e9..8581b558344 100644 --- a/ports/pdcurses/portfile.cmake +++ b/ports/pdcurses/portfile.cmake @@ -9,8 +9,8 @@ find_program(NMAKE nmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO wmcbrine/PDCurses - REF PDCurses_3_4 - SHA512 a05065c2e43771bf769f25f229b6058c4dc6add65d993f2e304e98bded8a8af88e674638c7385383451fddc45cf3bd8c9a95febffc7abcbcce0e6384e4f397b3 + REF 3.6 + SHA512 1ed34e7eb791c9e00aae60878339e79f6b3af086c45d88d2b59d9b2b4020481ff5a5c21e078e59ae24f2de3b4d412f0240f21a50eb743f7e172c832a7e17ed5e HEAD_REF master ) @@ -24,23 +24,11 @@ file(COPY ${SOURCES} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}") -file(READ ${SOURCE_PATH}/win32/vcwin32.mak PDC_MAK_ORIG) -string(REPLACE " -pdb:none" "" PDC_MAK_ORIG ${PDC_MAK_ORIG}) +set(PDC_NMAKE_CMD ${NMAKE} /A -f ${SOURCE_PATH}/wincon/Makefile.vc WIDE=Y UTF8=Y) -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - string(REPLACE "/MACHINE:IX86 " "/MACHINE:X64 " PDC_MAK_X64 ${PDC_MAK_ORIG}) - file(WRITE ${SOURCE_PATH}/win32/vcpkg_x64.mak ${PDC_MAK_X64}) - set(PDC_NMAKE_CMD ${NMAKE} /A -f vcpkg_x64.mak WIDE=Y UTF8=Y) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - string(REPLACE "/MACHINE:IX86 " "/MACHINE:X86 " PDC_MAK_X86 ${PDC_MAK_ORIG}) - file(WRITE ${SOURCE_PATH}/win32/vcpkg_x86.mak ${PDC_MAK_X86}) - set(PDC_NMAKE_CMD ${NMAKE} /A -f vcpkg_x86.mak WIDE=Y UTF8=Y) -else() - message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") -endif() -set(PDC_NMAKE_CWD ${SOURCE_PATH}/win32) -set(PDC_PDCLIB ${SOURCE_PATH}/win32/pdcurses) +set(PDC_NMAKE_CWD ${SOURCE_PATH}/wincon) +set(PDC_PDCLIB ${SOURCE_PATH}/wincon/pdcurses) if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(PDC_NMAKE_CMD ${PDC_NMAKE_CMD} DLL=Y) diff --git a/ports/pegtl/CONTROL b/ports/pegtl/CONTROL new file mode 100644 index 00000000000..124e7ace7a3 --- /dev/null +++ b/ports/pegtl/CONTROL @@ -0,0 +1,3 @@ +Source: pegtl +Version: 2.7.1 +Description: The Parsing Expression Grammar Template Library (PEGTL) is a zero-dependency C++ header-only parser combinator library for creating parsers according to a Parsing Expression Grammar (PEG). \ No newline at end of file diff --git a/ports/pegtl/portfile.cmake b/ports/pegtl/portfile.cmake new file mode 100644 index 00000000000..2de1f945def --- /dev/null +++ b/ports/pegtl/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO taocpp/pegtl + REF 2.7.1 + SHA512 fe89ef5a519f7b0070a8cfaf7d1a76f9a73e747065d872cc9434a31b2e77c12140d581b87fade9498c9db9d7867556b0c34fcd43f9d6e0946029d4886d291b21 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPEGTL_BUILD_TESTS=OFF + -DPEGTL_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/pegtl/cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pegtl RENAME copyright) diff --git a/ports/physfs/CONTROL b/ports/physfs/CONTROL index 20d973f1841..5d5d697556e 100644 --- a/ports/physfs/CONTROL +++ b/ports/physfs/CONTROL @@ -1,4 +1,4 @@ Source: physfs -Version: 2.0.3-2 +Version: 3.0.1-1 Description: a library to provide abstract access to various archives Build-Depends: zlib diff --git a/ports/physfs/physfs.3.0.1.GetUserProfileDirectory.patch b/ports/physfs/physfs.3.0.1.GetUserProfileDirectory.patch new file mode 100644 index 00000000000..4338e52e5b9 --- /dev/null +++ b/ports/physfs/physfs.3.0.1.GetUserProfileDirectory.patch @@ -0,0 +1,25 @@ + +diff -r a29fef4a20fd -r ece6769c0676 src/physfs_platform_windows.c +--- a/src/physfs_platform_windows.c Wed May 16 19:54:51 2018 -0400 ++++ b/src/physfs_platform_windows.c Wed Oct 03 22:40:57 2018 -0400 +@@ -566,7 +566,6 @@ + else + { + DWORD psize = 0; +- WCHAR dummy = 0; + LPWSTR wstr = NULL; + BOOL rc = 0; + +@@ -575,7 +574,7 @@ + * psize. Also note that the second parameter can't be + * NULL or the function fails. + */ +- rc = pGetDir(accessToken, &dummy, &psize); ++ rc = pGetDir(accessToken, NULL, &psize); + GOTO_IF(rc, PHYSFS_ERR_OS_ERROR, done); /* should have failed! */ + + /* Allocate memory for the profile directory */ + + + + diff --git a/ports/physfs/portfile.cmake b/ports/physfs/portfile.cmake index 08b49e69ff2..feee3b456b5 100644 --- a/ports/physfs/portfile.cmake +++ b/ports/physfs/portfile.cmake @@ -6,7 +6,13 @@ vcpkg_download_distfile(ARCHIVE FILENAME "physfs-${PHYSFS_VERSION}.tar.bz2" SHA512 ddf3b075ccb506da5e9a1ce96001be402752b9b777c2e816a85d48aff3626ff0886ea43eb07bd300fe3a9f59b9a002f54d822c51d483a4ee94b38378534c1879 ) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${PHYSFS_VERSION} + PATCHES + physfs.3.0.1.GetUserProfileDirectory.patch # Fixes GetUserProfileDirectory issue on Win10 build 1809(+?); See: https://hg.icculus.org/icculus/physfs/rev/ece6769c0676 +) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PHYSFS_STATIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PHYSFS_SHARED) diff --git a/ports/picosha2/CONTROL b/ports/picosha2/CONTROL index 468daffce90..7203b8aeea6 100644 --- a/ports/picosha2/CONTROL +++ b/ports/picosha2/CONTROL @@ -1,3 +1,3 @@ Source: picosha2 -Version: 2018-02-25 +Version: 2018-07-30 Description: PicoSHA2 - a C++ SHA256 hash generator diff --git a/ports/picosha2/portfile.cmake b/ports/picosha2/portfile.cmake index 0937072585b..7a93b2d8f92 100644 --- a/ports/picosha2/portfile.cmake +++ b/ports/picosha2/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO okdshin/PicoSHA2 - REF 77b1e29e94b3a131f202e69d35eafe709ae8e587 - SHA512 b3b11f56bc31734c899d417f10f9d44ea7f384191e147973269f9518fe1d5139f8c580d6c3d70ff5376ae80025c9dbf0956bbcd3b3455d87d26fa17174a2dbe2 + REF b699e6c900be6e00152db5a3d123c1db42ea13d0 + SHA512 5972dfe7675c560a0c58491e72938e8e5ea46eabb2e2f564086001eda21b237035aa0deef94bb36a21154a4b5cbc160b9b0f6b5988f6580d693ad74cfbc53bb5 HEAD_REF master ) diff --git a/ports/pixel/CONTROL b/ports/pixel/CONTROL new file mode 100644 index 00000000000..50b1bd0a828 --- /dev/null +++ b/ports/pixel/CONTROL @@ -0,0 +1,4 @@ +Source: pixel +Version: 0.3 +Description: Simple 2D Graphics based on standard and portable OpenGL. +Build-Depends: glew, opengl, sdl2 diff --git a/ports/pixel/portfile.cmake b/ports/pixel/portfile.cmake new file mode 100644 index 00000000000..4e2e9d7ac26 --- /dev/null +++ b/ports/pixel/portfile.cmake @@ -0,0 +1,21 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dascandy/pixel + REF v0.3 + SHA512 d7d622679195d0eb30c8ed411333711369b108e2171d1e4b0a93c7ae3bd1fb36a25fbe1f5771c858615c07ee139412e5353b8cb5489cb409dd94829253c18a7b + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() diff --git a/ports/pixman/CMakeLists.txt b/ports/pixman/CMakeLists.txt index 322c08a9ca2..c7557486525 100644 --- a/ports/pixman/CMakeLists.txt +++ b/ports/pixman/CMakeLists.txt @@ -1,9 +1,13 @@ cmake_minimum_required(VERSION 3.0) -project(pixman VERSION 0.32.0 LANGUAGES C) +project(pixman VERSION 0.34.0 LANGUAGES C) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) set(CMAKE_DEBUG_POSTFIX "d") +if(UNIX) + add_definitions(-DHAVE_PTHREADS) +endif() + include_directories(".") file(GLOB SOURCES @@ -41,14 +45,14 @@ file(GLOB SOURCES ) add_library(pixman-1 ${SOURCES}) +target_include_directories(pixman-1 PUBLIC $) # pixman requires the three PACKAGE* definitions in order to compile. The USE_SSE2 definition lets it use SSE2 instructions for speed. Every target machine should have SSE2 these days. target_compile_definitions(pixman-1 - PUBLIC + PRIVATE PACKAGE="pixman-1" PACKAGE_VERSION="0.34.0" PACKAGE_BUGREPORT="" - PRIVATE USE_SSE2 ) @@ -58,7 +62,15 @@ if(MSVC) endif() install(TARGETS pixman-1 + EXPORT pixman-targets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) + +install( + EXPORT pixman-targets + NAMESPACE unofficial::pixman:: + FILE unofficial-pixman-config.cmake + DESTINATION share/unofficial-pixman +) diff --git a/ports/pixman/CONTROL b/ports/pixman/CONTROL index 940c30cc204..64d8abde08b 100644 --- a/ports/pixman/CONTROL +++ b/ports/pixman/CONTROL @@ -1,3 +1,3 @@ Source: pixman -Version: 0.34.0-2 +Version: 0.34.0-5 Description: Pixman is a low-level software library for pixel manipulation, providing features such as image compositing and trapezoid rasterization. diff --git a/ports/pixman/portfile.cmake b/ports/pixman/portfile.cmake index 4fb37f6d99c..83daa9a516b 100644 --- a/ports/pixman/portfile.cmake +++ b/ports/pixman/portfile.cmake @@ -1,13 +1,16 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pixman-0.34.0) - +set(PIXMAN_VERSION 0.34.0) vcpkg_download_distfile(ARCHIVE - URLS "https://www.cairographics.org/releases/pixman-0.34.0.tar.gz" - FILENAME "pixman-0.34.0.tar.gz" + URLS "https://www.cairographics.org/releases/pixman-${PIXMAN_VERSION}.tar.gz" + FILENAME "pixman-${PIXMAN_VERSION}.tar.gz" SHA512 81caca5b71582b53aaac473bc37145bd66ba9acebb4773fa8cdb51f4ed7fbcb6954790d8633aad85b2826dd276bcce725e26e37997a517760e9edd72e2669a6d ) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${PIXMAN_VERSION} +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/pixman) @@ -18,6 +21,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-pixman TARGET_PATH share/unofficial-pixman) + # Copy the appropriate header files. file(COPY "${SOURCE_PATH}/pixman/pixman.h" @@ -36,3 +41,5 @@ file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pixma file(RENAME ${CURRENT_PACKAGES_DIR}/share/pixman/COPYING ${CURRENT_PACKAGES_DIR}/share/pixman/copyright) vcpkg_copy_pdbs() + +vcpkg_test_cmake(PACKAGE_NAME unofficial-pixman) diff --git a/ports/plib/CMakeLists.txt b/ports/plib/CMakeLists.txt new file mode 100644 index 00000000000..ac35b667433 --- /dev/null +++ b/ports/plib/CMakeLists.txt @@ -0,0 +1,361 @@ +cmake_minimum_required(VERSION 3.3.0) + +project(plib VERSION 1.8.5) + +set(CMAKE_DEBUG_POSTFIX d) + +# Sources & Headers +set(fnt_SOURCES + src/fnt/fnt.cxx + src/fnt/fntBitmap.cxx + src/fnt/fntTXF.cxx) + +set(fnt_HEADERS + src/fnt/fnt.h + src/fnt/fntLocal.h) + +set(js_SOURCES + src/js/js.cxx + src/js/jsBSD.cxx + src/js/jsLinux.cxx + src/js/jsMacOS.cxx + src/js/jsMacOSX.cxx + src/js/jsNone.cxx + src/js/jsWindows.cxx) + +set(js_HEADERS + src/js/js.h) + +set(net_SOURCES + src/net/netBuffer.cxx + src/net/netChannel.cxx + src/net/netChat.cxx + src/net/netMessage.cxx + src/net/netMonitor.cxx + src/net/netSocket.cxx) + +set(net_HEADERS + src/net/netBuffer.h + src/net/netChannel.h + src/net/netChat.h + src/net/netMessage.h + src/net/netMonitor.h + src/net/netSocket.h) + +set(psl_SOURCES + src/psl/psl.cxx + src/psl/pslCodeGen.cxx + src/psl/pslCompiler.cxx + src/psl/pslContext.cxx + src/psl/pslDump.cxx + src/psl/pslError.cxx + src/psl/pslExpression.cxx + src/psl/pslFileIO.cxx + src/psl/pslProgram.cxx + src/psl/pslSymbols.cxx + src/psl/pslToken.cxx) + +set(psl_HEADERS + src/psl/psl.h + src/psl/pslCompiler.h + src/psl/pslContext.h + src/psl/pslFileIO.h + src/psl/pslLocal.h + src/psl/pslOpcodes.h + src/psl/pslSymbol.h) + +set(puAux_SOURCES + src/puAux/puAux.cxx + src/puAux/puAuxBiSlider.cxx + src/puAux/puAuxBiSliderWithEnds.cxx + src/puAux/puAuxChooser.cxx + src/puAux/puAuxComboBox.cxx + src/puAux/puAuxCompass.cxx + src/puAux/puAuxFileSelector.cxx + src/puAux/puAuxLargeInput.cxx + src/puAux/puAuxList.cxx + src/puAux/puAuxScrollBar.cxx + src/puAux/puAuxSelectBox.cxx + src/puAux/puAuxSliderWithInput.cxx + src/puAux/puAuxSpinBox.cxx + src/puAux/puAuxTriSlider.cxx + src/puAux/puAuxVerticalMenu.cxx) + +set(puAux_HEADERS + src/puAux/puAux.h + src/puAux/puAuxLocal.h) + +set(pui_SOURCES + src/pui/pu.cxx + src/pui/puArrowButton.cxx + src/pui/puBox.cxx + src/pui/puButton.cxx + src/pui/puButtonBox.cxx + src/pui/puDial.cxx + src/pui/puDialogBox.cxx + src/pui/puFont.cxx + src/pui/puFrame.cxx + src/pui/puGroup.cxx + src/pui/puInput.cxx + src/pui/puInputBase.cxx + src/pui/puInterface.cxx + src/pui/puListBox.cxx + src/pui/puMenuBar.cxx + src/pui/puObject.cxx + src/pui/puOneShot.cxx + src/pui/puPopup.cxx + src/pui/puPopupMenu.cxx + src/pui/puRange.cxx + src/pui/puSlider.cxx + src/pui/puText.cxx + src/pui/puValue.cxx) + +set(pui_HEADERS + src/pui/pu.h + src/pui/puFLTK.h + src/pui/puGLUT.h + src/pui/puLocal.h + src/pui/puNative.h + src/pui/puPW.h + src/pui/puSDL.h) + +set(pw_SOURCES + src/pw/pwWindows.cxx) + +set(pw_HEADERS + src/pw/pw.h) + +set(sg_SOURCES + src/sg/sg.cxx + src/sg/sgd.cxx + src/sg/sgdIsect.cxx + src/sg/sgIsect.cxx + src/sg/sgPerlinNoise.cxx) + +set(sg_HEADERS + src/sg/sg.h) + +set(sl_SOURCES + src/sl/slDSP.cxx + src/sl/slEnvelope.cxx + src/sl/slMODdacio.cxx + src/sl/slMODfile.cxx + src/sl/slMODinst.cxx + src/sl/slMODnote.cxx + src/sl/slMODPlayer.cxx + src/sl/slPlayer.cxx + src/sl/slSample.cxx + src/sl/slSamplePlayer.cxx + src/sl/slScheduler.cxx + src/sl/smMixer.cxx) + +set(sl_HEADERS + src/sl/sl.h + src/sl/slMODfile.h + src/sl/slMODPrivate.h + src/sl/slPortability.h + src/sl/sm.h) + +set(ssg_SOURCES + src/ssg/ssg.cxx + src/ssg/ssgAnimation.cxx + src/ssg/ssgAnimTransform.cxx + src/ssg/ssgAxisTransform.cxx + src/ssg/ssgBase.cxx + src/ssg/ssgBaseTransform.cxx + src/ssg/ssgBranch.cxx + src/ssg/ssgContext.cxx + src/ssg/ssgCutout.cxx + src/ssg/ssgDList.cxx + src/ssg/ssgEntity.cxx + src/ssg/ssgInvisible.cxx + src/ssg/ssgIO.cxx + src/ssg/ssgIsect.cxx + src/ssg/ssgLeaf.cxx + src/ssg/ssgList.cxx + src/ssg/ssgLoad.cxx + src/ssg/ssgLoad3ds.cxx + src/ssg/ssgLoadAC.cxx + src/ssg/ssgLoadASC.cxx + src/ssg/ssgLoadASE.cxx + src/ssg/ssgLoadATG.cxx + src/ssg/ssgLoadBMP.cxx + src/ssg/ssgLoadDOF.cxx + src/ssg/ssgLoadDXF.cxx + src/ssg/ssgLoaderWriterStuff.cxx + src/ssg/ssgLoadFLT.cxx + src/ssg/ssgLoadIV.cxx + src/ssg/ssgLoadM.cxx + src/ssg/ssgLoadMD2.cxx + src/ssg/ssgLoadMDL.cxx + src/ssg/ssgLoadMDL_BGLTexture.cxx + src/ssg/ssgLoadOBJ.cxx + src/ssg/ssgLoadOFF.cxx + src/ssg/ssgLoadPCX.cxx + src/ssg/ssgLoadPNG.cxx + src/ssg/ssgLoadSGI.cxx + src/ssg/ssgLoadSSG.cxx + src/ssg/ssgLoadStrip.cxx + src/ssg/ssgLoadTexture.cxx + src/ssg/ssgLoadTGA.cxx + src/ssg/ssgLoadTRI.cxx + src/ssg/ssgLoadVRML1.cxx + src/ssg/ssgLoadX.cxx + src/ssg/ssgLoadXPlaneObj.cxx + src/ssg/ssgOptimiser.cxx + src/ssg/ssgParser.cxx + src/ssg/ssgRangeSelector.cxx + src/ssg/ssgRoot.cxx + src/ssg/ssgSave3ds.cxx + src/ssg/ssgSaveAC.cxx + src/ssg/ssgSaveASC.cxx + src/ssg/ssgSaveASE.cxx + src/ssg/ssgSaveATG.cxx + src/ssg/ssgSaveDXF.cxx + src/ssg/ssgSaveFLT.cxx + src/ssg/ssgSaveIV.cxx + src/ssg/ssgSaveM.cxx + src/ssg/ssgSaveOBJ.cxx + src/ssg/ssgSaveOFF.cxx + src/ssg/ssgSaveQHI.cxx + src/ssg/ssgSaveTRI.cxx + src/ssg/ssgSaveVRML1.cxx + src/ssg/ssgSaveX.cxx + src/ssg/ssgSelector.cxx + src/ssg/ssgSimpleList.cxx + src/ssg/ssgSimpleState.cxx + src/ssg/ssgState.cxx + src/ssg/ssgStateSelector.cxx + src/ssg/ssgStateTables.cxx + src/ssg/ssgStatistics.cxx + src/ssg/ssgStats.cxx + src/ssg/ssgTexTrans.cxx + src/ssg/ssgTexture.cxx + src/ssg/ssgTransform.cxx + src/ssg/ssgTween.cxx + src/ssg/ssgTweenController.cxx + src/ssg/ssgVertSplitter.cxx + src/ssg/ssgVTable.cxx + src/ssg/ssgVtxArray.cxx + src/ssg/ssgVtxTable.cxx) + +set(ssg_HEADERS + src/ssg/ssg.h + src/ssg/ssg3ds.h + src/ssg/ssgKeyFlier.h + src/ssg/ssgLoaderWriterStuff.h + src/ssg/ssgLoadMDL.h + src/ssg/ssgLoadVRML.h + src/ssg/ssgLocal.h + src/ssg/ssgMSFSPalette.h + src/ssg/ssgParser.h + src/ssg/ssgVertSplitter.h) + +set(ssgAux_SOURCES + src/ssgAux/ssgAux.cxx + src/ssgAux/ssgaBillboards.cxx + src/ssgAux/ssgaCelestialBody.cxx + src/ssgAux/ssgaCloudLayer.cxx + src/ssgAux/ssgaFire.cxx + src/ssgAux/ssgaLensFlare.cxx + src/ssgAux/ssgaLensFlareTexture.cxx + src/ssgAux/ssgaParticleSystem.cxx + src/ssgAux/ssgaPatch.cxx + src/ssgAux/ssgaScreenDump.cxx + src/ssgAux/ssgaShapes.cxx + src/ssgAux/ssgaSky.cxx + src/ssgAux/ssgaSkyDome.cxx + src/ssgAux/ssgaSphere.cxx + src/ssgAux/ssgaStars.cxx + src/ssgAux/ssgaTeapot.cxx + src/ssgAux/ssgaWaveSystem.cxx) + +set(ssgAux_HEADERS + src/ssgAux/ssgAux.h + src/ssgAux/ssgaBillboards.h + src/ssgAux/ssgaFire.h + src/ssgAux/ssgaLensFlare.h + src/ssgAux/ssgaParticleSystem.h + src/ssgAux/ssgaScreenDump.h + src/ssgAux/ssgaShapes.h + src/ssgAux/ssgaSky.h + src/ssgAux/ssgaSphere.h + src/ssgAux/ssgaWaveSystem.h) + +set(ul_SOURCES + src/util/ul.cxx + src/util/ulClock.cxx + src/util/ulError.cxx + src/util/ulLinkedList.cxx + src/util/ulList.cxx + src/util/ulRTTI.cxx) + +set(ul_HEADERS + src/util/ul.h + src/util/ulLocal.h + src/util/ulRTTI.h) + +# Create and configure the targets +add_library(plib_fnt STATIC ${fnt_SOURCES} ${fnt_HEADERS}) +target_include_directories(plib_fnt PRIVATE src/sg src/util) + +add_library(plib_js STATIC ${js_SOURCES} ${js_HEADERS}) +target_include_directories(plib_js PRIVATE src/util) + +add_library(plib_net STATIC ${net_SOURCES} ${net_HEADERS}) +target_include_directories(plib_net PRIVATE src/util) + +add_library(plib_psl STATIC ${psl_SOURCES} ${psl_HEADERS}) +target_include_directories(plib_psl PRIVATE src/util) + +add_library(plib_puAux STATIC ${puAux_SOURCES} ${puAux_HEADERS}) +target_include_directories(plib_puAux PRIVATE + src/fnt + src/pui + src/sg + src/util +) + +add_library(plib_pui STATIC ${pui_SOURCES} ${pui_HEADERS}) +target_include_directories(plib_pui PRIVATE src/fnt src/sg src/util) + +add_library(plib_pw STATIC ${pw_SOURCES} ${pw_HEADERS}) +target_include_directories(plib_pw PRIVATE src/util) + +add_library(plib_sg STATIC ${sg_SOURCES} ${sg_HEADERS}) +target_include_directories(plib_sg PRIVATE src/util) + +add_library(plib_sl STATIC ${sl_SOURCES} ${sl_HEADERS}) +target_include_directories(plib_sl PRIVATE src/util) + +add_library(plib_ssg STATIC ${ssg_SOURCES} ${ssg_HEADERS}) +target_include_directories(plib_ssg PRIVATE src/sg src/util) + +add_library(plib_ssgAux STATIC ${ssgAux_SOURCES} ${ssgAux_HEADERS}) +target_include_directories(plib_ssgAux PRIVATE src/sg src/ssg src/util) + +add_library(plib_ul STATIC ${ul_SOURCES} ${ul_HEADERS}) + +# Install +install( + TARGETS plib_fnt plib_js plib_net plib_psl plib_puAux plib_pui plib_pw plib_sg plib_sl plib_ssg plib_ssgAux plib_ul + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + +install( + FILES ${fnt_HEADERS} + ${js_HEADERS} + ${net_HEADERS} + ${psl_HEADERS} + ${puAux_HEADERS} + ${pui_HEADERS} + ${pw_HEADERS} + ${sg_HEADERS} + ${sl_HEADERS} + ${ssg_HEADERS} + ${ssgAux_HEADERS} + ${ul_HEADERS} + DESTINATION include/plib +) diff --git a/ports/plib/CONTROL b/ports/plib/CONTROL new file mode 100644 index 00000000000..f1509d029da --- /dev/null +++ b/ports/plib/CONTROL @@ -0,0 +1,3 @@ +Source: plib +Version: 1.8.5-2 +Description: A suite of portable game libraries diff --git a/ports/plib/portfile.cmake b/ports/plib/portfile.cmake new file mode 100644 index 00000000000..16c5673c9cf --- /dev/null +++ b/ports/plib/portfile.cmake @@ -0,0 +1,27 @@ +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("Note: plib only supports static library linkage") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/plib-1.8.5) +vcpkg_download_distfile(ARCHIVE + URLS "http://plib.sourceforge.net/dist/plib-1.8.5.tar.gz" + FILENAME "plib-1.8.5.tar.gz" + SHA512 17154cc77243fe576c2bcbcb0285b98aef1a0634658f5473e95fe0ac8fa3ed477dbe5620e44ccf0b7cc616f812af0cd44d6fcbba0c563180d3b61c9d6f158e1d +) +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 +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/plib RENAME copyright) diff --git a/ports/plibsys/CONTROL b/ports/plibsys/CONTROL index 92d57ca474b..3bb95f45bf1 100644 --- a/ports/plibsys/CONTROL +++ b/ports/plibsys/CONTROL @@ -1,3 +1,3 @@ Source: plibsys -Version: 0.0.3-1 +Version: 0.0.4-1 Description: Highly portable C system library: threads and synchronization, sockets, IPC, data structures and more. diff --git a/ports/plibsys/portfile.cmake b/ports/plibsys/portfile.cmake index b70fe771dd9..210fddd37eb 100644 --- a/ports/plibsys/portfile.cmake +++ b/ports/plibsys/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO saprykin/plibsys - REF 0.0.3 - SHA512 e2393fecb3e5feae81a4d60cd03e2ca17bc58453efaa5598beacdc5acedbc7c90374f9f851301fee08ace8dace843a2dff8c1c449cd457302363c98dd24e0415 + REF 0.0.4 + SHA512 61957666fb454469e1ff68435463eaf426e960caed33540dbb495e1aa7c446c9803d100f33f1a6ea70d5f2ee2d0d19ec315f3a8c651747f65a186ad061c05e51 HEAD_REF master ) diff --git a/ports/plustache/CMakeLists.txt b/ports/plustache/CMakeLists.txt new file mode 100644 index 00000000000..f9579c0c6e9 --- /dev/null +++ b/ports/plustache/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +project(plustache LANGUAGES CXX) + +find_package(Boost REQUIRED COMPONENTS regex) + +add_library( + plustache + + src/template.cpp + src/context.cpp + ) + + +target_include_directories( + plustache + + PUBLIC + ${CMAKE_CURRENT_LIST_DIR}/include + PRIVATE + ${Boost_INCLUDE_DIRS} +) + +target_link_libraries( + plustache + + PRIVATE + ${Boost_LIBRARIES} +) + + +install(TARGETS plustache + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) +install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/include/plustache DESTINATION include) diff --git a/ports/plustache/CONTROL b/ports/plustache/CONTROL new file mode 100644 index 00000000000..f01f1598b00 --- /dev/null +++ b/ports/plustache/CONTROL @@ -0,0 +1,4 @@ +Source: plustache +Version: 0.4.0-1 +Description: {{mustaches}} for C++ +Build-Depends: boost-regex, boost-algorithm diff --git a/ports/plustache/portfile.cmake b/ports/plustache/portfile.cmake new file mode 100644 index 00000000000..237e1b26f7b --- /dev/null +++ b/ports/plustache/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mrtazz/plustache + REF 3208529343e1858cfe504041be8c1fa0af0a59d1 + SHA512 8d9ae368b2f276da2faaf4e3b543fc7ded88ebd8fbe33544aa7d85765a38d085d4c31bb68f6a2f73d4f660da1618d187fb94c74a5f6594e7642bf3949707c67b + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +#Debug +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/plustache) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/plustache/LICENSE ${CURRENT_PACKAGES_DIR}/share/plustache/copyright) diff --git a/ports/pmdk/CONTROL b/ports/pmdk/CONTROL index f440b68bc50..4c667eac088 100644 --- a/ports/pmdk/CONTROL +++ b/ports/pmdk/CONTROL @@ -1,3 +1,3 @@ Source: pmdk -Version: 1.4-1 +Version: 1.4.2 Description: Persistent Memory Development Kit \ No newline at end of file diff --git a/ports/pmdk/addPowerShellExecutionPolicy.patch b/ports/pmdk/addPowerShellExecutionPolicy.patch new file mode 100644 index 00000000000..692ff176a67 --- /dev/null +++ b/ports/pmdk/addPowerShellExecutionPolicy.patch @@ -0,0 +1,22 @@ +diff --git a/src/windows/srcversion/srcversion.vcxproj b/src/windows/srcversion/srcversion.vcxproj +index 8761197..795d1a7 100644 +--- a/src/windows/srcversion/srcversion.vcxproj ++++ b/src/windows/srcversion/srcversion.vcxproj +@@ -72,7 +72,7 @@ + + + +- powershell.exe -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION) ++ powershell.exe -ExecutionPolicy Bypass -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION) + __NON_EXISTENT_FILE__ + generate srcversion.h + +@@ -99,7 +99,7 @@ + + + +- powershell.exe -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION) ++ powershell.exe -ExecutionPolicy Bypass -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION) + __NON_EXISTENT_FILE__ + generate srcversion.h + diff --git a/ports/pmdk/portfile.cmake b/ports/pmdk/portfile.cmake index 89c48a8fbd3..330a8abeb90 100644 --- a/ports/pmdk/portfile.cmake +++ b/ports/pmdk/portfile.cmake @@ -18,9 +18,12 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pmem/pmdk - REF 1.4 - SHA512 95dbea9acfea4a6cb433a25f56f7484946a93fbce1c5e0e1d6ff36e0824e3e0e9f28f37024918998358f8ff12e69d0902fcf88357b9ad12695f32e06e86ffac8 + REF 1.4.2 + SHA512 87aa226487046aba14f3a0b51d066f4498a6021580fd203df45f0900fc0c0c5cdb192156a4c730a5a7dc5826e204d688531e5680145161750057803cb24d088d HEAD_REF master + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/addPowerShellExecutionPolicy.patch" + "${CMAKE_CURRENT_LIST_DIR}/v141.patch" ) get_filename_component(PMDK_VERSION "${SOURCE_PATH}" NAME) @@ -29,9 +32,6 @@ string(REPLACE "pmdk-" "" PMDK_VERSION "${PMDK_VERSION}") # Build only the selected projects vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/src/PMDK.sln - PLATFORM x64 - PLATFORM_TOOLSET v140 - TARGET_PLATFORM_VERSION 10.0.16299.0 TARGET "Solution Items\\libpmem,Solution Items\\libpmemlog,Solution Items\\libpmemblk,Solution Items\\libpmemobj,Solution Items\\libpmemcto,Solution Items\\libpmempool,Solution Items\\libvmem,Solution Items\\Tools\\pmempool" OPTIONS /p:SRCVERSION=${PMDK_VERSION} ) diff --git a/ports/pmdk/v141.patch b/ports/pmdk/v141.patch new file mode 100644 index 00000000000..f77abe93f78 --- /dev/null +++ b/ports/pmdk/v141.patch @@ -0,0 +1,13 @@ +diff --git a/src/common/util.h b/src/common/util.h +index 04b098f..33a64c2 100644 +--- a/src/common/util.h ++++ b/src/common/util.h +@@ -284,7 +284,7 @@ typedef enum { + #error MSVC ports of util_atomic_ only work on X86_64 + #endif + +-#if _MSC_VER > 1911 ++#if _MSC_VER >= 2000 + #error util_atomic_ utility functions not tested with this version of VC++ + #error These utility functions are not future proof, as they are not + #error based on publicly available documentation. diff --git a/ports/pngwriter/CONTROL b/ports/pngwriter/CONTROL new file mode 100644 index 00000000000..667dafa2424 --- /dev/null +++ b/ports/pngwriter/CONTROL @@ -0,0 +1,4 @@ +Source: pngwriter +Version: 0.7.0-1 +Build-Depends: zlib, libpng, freetype +Description: PNGwriter is a very easy to use open source graphics library that uses PNG as its output format diff --git a/ports/pngwriter/portfile.cmake b/ports/pngwriter/portfile.cmake new file mode 100644 index 00000000000..93701052297 --- /dev/null +++ b/ports/pngwriter/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("Only static linkage is supported by pngwriter.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pngwriter/pngwriter + REF 0.7.0 + SHA512 3e4ef098e4d715d18844cada64f32dbf079fdd1f7a64b6fe5e19584094f6b2a61f80c53804f936b6eefd7ef9dad4a01a7210b1273939d385a0850e48f8ba6683 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/PNGwriter) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/doc/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pngwriter RENAME copyright) diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL index e979e224744..5817429faf8 100644 --- a/ports/poco/CONTROL +++ b/ports/poco/CONTROL @@ -1,5 +1,5 @@ Source: poco -Version: 1.8.1-1 +Version: 1.9.0-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/poco/portfile.cmake b/ports/poco/portfile.cmake index 399f1a064df..0eb160daaef 100644 --- a/ports/poco/portfile.cmake +++ b/ports/poco/portfile.cmake @@ -3,21 +3,18 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pocoproject/poco - REF poco-1.8.1-release - SHA512 ca57b30c10fc4e611dbdd90c7e36db34b8cb9a7dae675dc8aed37457a26d3433080caf26eaace85adf8d6a6ad7945c49f7c66f274b26fe9cc0c7d5107be3828e - HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} + REF poco-1.9.0-release + SHA512 de2346d62b2e89ba04abe62a83f6ede7a496e80bcbe53a880a1aa8e87a8ebd9a430dd70fdc6aada836bb1021c6df21375fd0cbcf62dbb6e29a2f65d6d90cf2b9 + HEAD_REF develop PATCHES - ${CMAKE_CURRENT_LIST_DIR}/config_h.patch - ${CMAKE_CURRENT_LIST_DIR}/find_pcre.patch - ${CMAKE_CURRENT_LIST_DIR}/foundation-public-include-pcre.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-static-internal-pcre.patch + config_h.patch + find_pcre.patch + foundation-public-include-pcre.patch + fix-static-internal-pcre.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" POCO_STATIC) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" POCO_MT) if("mysql" IN_LIST FEATURES) # enabling MySQL support @@ -31,6 +28,7 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DPOCO_STATIC=${POCO_STATIC} + -DPOCO_MT=${POCO_MT} -DENABLE_SEVENZIP=ON -DENABLE_TESTS=OFF -DPOCO_UNBUNDLED=ON # OFF means: using internal copy of sqlite, libz, pcre, expat, ... @@ -44,15 +42,20 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/cpspc.exe ${CURRENT_PACKAGES_DIR}/tools/cpspc.exe) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/f2cpsp.exe ${CURRENT_PACKAGES_DIR}/tools/f2cpsp.exe) +if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/cpspc.exe") + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/cpspc.exe ${CURRENT_PACKAGES_DIR}/tools/cpspc.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/f2cpsp.exe ${CURRENT_PACKAGES_DIR}/tools/f2cpsp.exe) +else() + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/cpspc ${CURRENT_PACKAGES_DIR}/tools/cpspc) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/f2cpsp ${CURRENT_PACKAGES_DIR}/tools/f2cpsp) +endif() if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) else() - file(REMOVE + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/cpspc.pdb ${CURRENT_PACKAGES_DIR}/bin/f2cpsp.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/cpspc.exe @@ -62,7 +65,7 @@ else() endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/poco) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Poco) # copy license file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/poco) diff --git a/ports/podofo/CONTROL b/ports/podofo/CONTROL index 55fa20a282a..e5485c49351 100644 --- a/ports/podofo/CONTROL +++ b/ports/podofo/CONTROL @@ -1,4 +1,8 @@ Source: podofo -Version: 0.9.5-1 +Version: 0.9.6-1 Description: PoDoFo is a library to work with the PDF file format -Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openssl, freetype, fontconfig +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openssl (!windows&!uwp), freetype + +Feature: fontconfig +Description: Enable font manager support on Unix platforms. +Build-Depends: fontconfig diff --git a/ports/podofo/portfile.cmake b/ports/podofo/portfile.cmake index 7c62ea07a2c..0897576d08b 100644 --- a/ports/podofo/portfile.cmake +++ b/ports/podofo/portfile.cmake @@ -1,39 +1,48 @@ -# 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 = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/podofo-0.9.5) -vcpkg_download_distfile(ARCHIVE - URLS "https://downloads.sourceforge.net/project/podofo/podofo/0.9.5/podofo-0.9.5.tar.gz" - FILENAME "podofo-0.9.5.tar.gz" - SHA512 d13b30bfebc89b809173cd2251eed1f15dfa90abb58371bfdce875797d40663923571824ad2b0b1d97aa1be212bdbb710c3a0439bc05bed7022b8eb75ca74705 -) -vcpkg_extract_source_archive(${ARCHIVE}) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DPODOFO_BUILD_LIB_ONLY=1 -DPODOFO_BUILD_SHARED=1 - ) -elseif (VCPKG_LIBRARY_LINKAGE STREQUAL static) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DPODOFO_BUILD_LIB_ONLY=1 -DPODOFO_BUILD_STATIC=1 - ) +set(PODOFO_VERSION 0.9.6) +vcpkg_download_distfile(ARCHIVE + URLS "https://sourceforge.net/projects/podofo/files/podofo/${PODOFO_VERSION}/podofo-${PODOFO_VERSION}.tar.gz/download" + FILENAME "podofo-${PODOFO_VERSION}.tar.gz" + SHA512 35c1a457758768bdadc93632385f6b9214824fead279f1b85420443fb2135837cefca9ced476df0d47066f060e9150e12fcd40f60fa1606b177da433feb20130 +) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${PODOFO_VERSION} +) + +set(PODOFO_NO_FONTMANAGER ON) +if("fontconfig" IN_LIST FEATURES) + set(PODOFO_NO_FONTMANAGER OFF) endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PODOFO_BUILD_SHARED) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PODOFO_BUILD_STATIC) + +set(IS_WIN32 OFF) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + set(IS_WIN32 ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPODOFO_BUILD_LIB_ONLY=1 + -DPODOFO_BUILD_SHARED=${PODOFO_BUILD_SHARED} + -DPODOFO_BUILD_STATIC=${PODOFO_BUILD_STATIC} + -DPODOFO_NO_FONTMANAGER=${PODOFO_NO_FONTMANAGER} + -DCMAKE_DISABLE_FIND_PACKAGE_FONTCONFIG=${PODOFO_NO_FONTMANAGER} + -DCMAKE_DISABLE_FIND_PACKAGE_LIBCRYPTO=${IS_WIN32} + -DCMAKE_DISABLE_FIND_PACKAGE_LIBIDN=ON + -DCMAKE_DISABLE_FIND_PACKAGE_CppUnit=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON +) + vcpkg_install_cmake() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/podofo) file(RENAME ${CURRENT_PACKAGES_DIR}/share/podofo/COPYING ${CURRENT_PACKAGES_DIR}/share/podofo/copyright) diff --git a/ports/portaudio/CONTROL b/ports/portaudio/CONTROL index 829a8702665..ceeec644c7e 100644 --- a/ports/portaudio/CONTROL +++ b/ports/portaudio/CONTROL @@ -1,3 +1,3 @@ Source: portaudio -Version: 19.0.6.00-2 +Version: 19.0.6.00-4 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/portaudio/pa_win_waveformat.patch b/ports/portaudio/pa_win_waveformat.patch new file mode 100644 index 00000000000..cba07394775 --- /dev/null +++ b/ports/portaudio/pa_win_waveformat.patch @@ -0,0 +1,27 @@ +From fa727918e9e56c2a18dbdcfd276c60ac616c56ba Mon Sep 17 00:00:00 2001 +From: Etienne Dechamps +Date: Sat, 27 Oct 2018 15:14:27 +0100 +Subject: [PATCH] Add pa_win_waveformat.h to public includes. + +pa_win_wasapi.h includes pa_win_waveformat.h, so it has to be +distributed for pa_win_wasapi.h to be usable. +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 789671a..6a3ed8e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -210,7 +210,7 @@ IF(WIN32) + IF(PA_USE_WASAPI) + SET(PA_WASAPI_SOURCES src/hostapi/wasapi/pa_win_wasapi.c) + SOURCE_GROUP("hostapi\\wasapi" FILES ${PA_WASAPI_SOURCES}) +- SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_win_wasapi.h) ++ SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_win_wasapi.h include/pa_win_waveformat.h) + SET(PA_SOURCES ${PA_SOURCES} ${PA_WASAPI_SOURCES}) + SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ole32 uuid) + IF(NOT MSVC) +-- +2.14.1.windows.1 + diff --git a/ports/portaudio/portfile.cmake b/ports/portaudio/portfile.cmake index 74a9cdcf665..503b0804837 100644 --- a/ports/portaudio/portfile.cmake +++ b/ports/portaudio/portfile.cmake @@ -1,26 +1,20 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# TARGET_TRIPLET is the current triplet (${VCPKG_TARGET_ARCHITECTURE}-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/portaudio) + vcpkg_download_distfile(ARCHIVE URLS "http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz" FILENAME "pa_stable_v190600_20161030.tgz" SHA512 7ec692cbd8c23878b029fad9d9fd63a021f57e60c4921f602995a2fca070c29f17a280c7f2da5966c4aad29d28434538452f4c822eacf3a60af59a6dc8e9704c ) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/cmakelists-install.patch - ${CMAKE_CURRENT_LIST_DIR}/find_dsound.patch - ${CMAKE_CURRENT_LIST_DIR}/crt_linkage_build_config.patch) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + cmakelists-install.patch + find_dsound.patch + wasapi_support.patch + crt_linkage_build_config.patch + pa_win_waveformat.patch +) # NOTE: the ASIO backend will be built automatically if the ASIO-SDK is provided # in a sibling folder of the portaudio source in vcpkg/buildtrees/portaudio/src @@ -32,6 +26,7 @@ vcpkg_configure_cmake( -DPA_USE_WASAPI=ON -DPA_USE_WDMKS=ON -DPA_USE_WMME=ON + -DPA_ENABLE_DEBUG_OUTPUT:BOOL=ON ) vcpkg_install_cmake() @@ -54,6 +49,8 @@ else () file (REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) endif () +vcpkg_copy_pdbs() + # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/portaudio) file(RENAME ${CURRENT_PACKAGES_DIR}/share/portaudio/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/portaudio/copyright) diff --git a/ports/portaudio/wasapi_support.patch b/ports/portaudio/wasapi_support.patch new file mode 100644 index 00000000000..0ff8a213430 --- /dev/null +++ b/ports/portaudio/wasapi_support.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists_org.txt ++++ b/CMakeLists.txt +@@ -200,7 +200,7 @@ + SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ole32 uuid) + ENDIF() + +- IF(MSVS) ++ IF(MSVC) + OPTION(PA_USE_WASAPI "Enable support for WASAPI" ON) + ELSE() + # I was unable to get WASAPI to compile outside of Visual Studio. If diff --git a/ports/proj4/portfile.cmake b/ports/proj4/portfile.cmake index 66b3a099bf7..3317172ea26 100644 --- a/ports/proj4/portfile.cmake +++ b/ports/proj4/portfile.cmake @@ -59,11 +59,13 @@ string(REPLACE "set(_IMPORT_PREFIX \"${CURRENT_PACKAGES_DIR}\")" ) file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets.cmake "${_contents}") -if(MSVC AND NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/proj_4_9.lib ${CURRENT_PACKAGES_DIR}/lib/proj.lib) -endif() -if(MSVC AND NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/proj_4_9_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/projd.lib) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/proj_4_9.lib ${CURRENT_PACKAGES_DIR}/lib/proj.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/proj_4_9_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/projd.lib) + endif() endif() # Remove duplicate headers installed from debug build diff --git a/ports/prometheus-cpp/CONTROL b/ports/prometheus-cpp/CONTROL new file mode 100644 index 00000000000..e89b84cb27d --- /dev/null +++ b/ports/prometheus-cpp/CONTROL @@ -0,0 +1,16 @@ +Source: prometheus-cpp +Version: 0.6.0 +Description: Prometheus Client Library for Modern C++ +Default-Features: compression, pull + +Feature: compression +Build-Depends: zlib +Description: Enable zlib compression + +Feature: pull +Build-Depends: civetweb +Description: Support for regular pull mode + +Feature: push +Build-Depends: curl +Description: Support push gateway diff --git a/ports/prometheus-cpp/portfile.cmake b/ports/prometheus-cpp/portfile.cmake new file mode 100644 index 00000000000..388623d4890 --- /dev/null +++ b/ports/prometheus-cpp/portfile.cmake @@ -0,0 +1,43 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jupp0r/prometheus-cpp + REF v0.6.0 + SHA512 a7e6f902f3007007ec68add5ac63e833c6f383ed0ce103e238b7248497f495e664446df7801000e36021adcb7cfb1d461bbb45e1b4fba9ffa4edfcaf5b5957dd + HEAD_REF master +) + +macro(feature FEATURENAME OPTIONNAME) + if("${FEATURENAME}" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -D${OPTIONNAME}=TRUE) + else() + list(APPEND FEATURE_OPTIONS -D${OPTIONNAME}=FALSE) + endif() +endmacro() + +feature(compression ENABLE_COMPRESSION) +feature(pull ENABLE_PULL) +feature(push ENABLE_PUSH) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DUSE_THIRDPARTY_LIBRARIES=OFF # use vcpkg packages + -DENABLE_TESTING=FALSE # need gtest 1.8.1 + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/prometheus-cpp) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/prometheus-cpp/copyright COPYONLY) diff --git a/ports/protobuf/001-add-compiler-flag.patch b/ports/protobuf/001-add-compiler-flag.patch deleted file mode 100644 index ad545cad3a7..00000000000 --- a/ports/protobuf/001-add-compiler-flag.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt -index 7618ba2..d282a60 100644 ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -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) -+endif() - - if (protobuf_BUILD_TESTS) - include(tests.cmake) - -diff --git a/cmake/install.cmake b/cmake/install.cmake -index 441bf55..20b3aa0 100644 ---- a/cmake/install.cmake -+++ b/cmake/install.cmake -@@ -1,14 +1,17 @@ - include(GNUInstallDirs) - -+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}/protobuf.pc.cmake - ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc @ONLY) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf-lite.pc.cmake - ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc @ONLY) - - foreach(_library -- libprotobuf-lite -- libprotobuf -- libprotoc) -+ ${LIBRARIES_TO_SET_DEST}) - set_property(TARGET ${_library} - PROPERTY INTERFACE_INCLUDE_DIRECTORIES - $ -@@ -19,8 +22,10 @@ foreach(_library - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library}) - endforeach() - --install(TARGETS protoc EXPORT protobuf-targets -- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc) -+if(protobuf_BUILD_COMPILER) -+ install(TARGETS protoc EXPORT protobuf-targets -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc) -+endif() - - 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. --export(TARGETS libprotobuf-lite libprotobuf libprotoc protoc -+set(FIND_DIRS libprotobuf-lite libprotobuf) -+if(protobuf_BUILD_COMPILER) -+ list(APPEND FIND_DIRS libprotoc protoc) -+endif() -+ -+export(TARGETS ${FIND_DIRS} - NAMESPACE protobuf:: - FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake - ) diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index ba20ec0c922..c2be8e0f357 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,5 +1,5 @@ Source: protobuf -Version: 3.5.1-3 +Version: 3.6.1-4 Description: Protocol Buffers - Google's data interchange format Feature: zlib diff --git a/ports/protobuf/disable-lite.patch b/ports/protobuf/disable-lite.patch new file mode 100644 index 00000000000..ceb34671c32 --- /dev/null +++ b/ports/protobuf/disable-lite.patch @@ -0,0 +1,41 @@ +diff --git a/cmake/install.cmake b/cmake/install.cmake +index 82036cb..378db2d 100644 +--- a/cmake/install.cmake ++++ b/cmake/install.cmake +@@ -15,10 +15,12 @@ foreach(_library ${_protobuf_libraries}) + PROPERTY INTERFACE_INCLUDE_DIRECTORIES + $ + $) ++ if(NOT "${_library}" STREQUAL "libprotobuf-lite") + install(TARGETS ${_library} EXPORT protobuf-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${_library} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library}) ++ endif() + endforeach() + + if (protobuf_BUILD_PROTOC_BINARIES) +@@ -26,7 +28,7 @@ if (protobuf_BUILD_PROTOC_BINARIES) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc) + endif (protobuf_BUILD_PROTOC_BINARIES) + +-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + + file(STRINGS extract_includes.bat.in _extract_strings + REGEX "^copy") +@@ -107,12 +109,12 @@ configure_file(protobuf-options.cmake + # Allows the build directory to be used as a find directory. + + if (protobuf_BUILD_PROTOC_BINARIES) +- export(TARGETS libprotobuf-lite libprotobuf libprotoc protoc ++ export(TARGETS libprotobuf libprotoc protoc + NAMESPACE protobuf:: + FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake + ) + else (protobuf_BUILD_PROTOC_BINARIES) +- export(TARGETS libprotobuf-lite libprotobuf ++ export(TARGETS libprotobuf + NAMESPACE protobuf:: + FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake + ) diff --git a/ports/protobuf/export-ParseGeneratorParameter.patch b/ports/protobuf/export-ParseGeneratorParameter.patch deleted file mode 100644 index 38b45a4c4e1..00000000000 --- a/ports/protobuf/export-ParseGeneratorParameter.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/google/protobuf/compiler/code_generator.h b/src/google/protobuf/compiler/code_generator.h -index 4b1d90b..4c2b3ee 100644 ---- a/src/google/protobuf/compiler/code_generator.h -+++ b/src/google/protobuf/compiler/code_generator.h -@@ -166,7 +166,7 @@ typedef GeneratorContext OutputDirectory; - // "foo=bar,baz,qux=corge" - // parses to the pairs: - // ("foo", "bar"), ("baz", ""), ("qux", "corge") --void ParseGeneratorParameter( -+LIBPROTOC_EXPORT void ParseGeneratorParameter( - const string&, std::vector >*); - - } // namespace compiler diff --git a/ports/protobuf/fix-uwp.patch b/ports/protobuf/fix-uwp.patch new file mode 100644 index 00000000000..ba09d591319 --- /dev/null +++ b/ports/protobuf/fix-uwp.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index 3afe376..1a0b6a7 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -151,6 +151,7 @@ if (MSVC) + /wd4506 # no definition for inline function 'function' + /wd4800 # 'type' : forcing value to bool 'true' or 'false' (performance warning) + /wd4996 # The compiler encountered a deprecated declaration. ++ /wd4703 # Potentially uninitialized local pointer variable 'name' used. + ) + # Allow big object + add_definitions(/bigobj) diff --git a/ports/protobuf/js-embed.patch b/ports/protobuf/js-embed.patch deleted file mode 100644 index df20fe03012..00000000000 --- a/ports/protobuf/js-embed.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/cmake/libprotoc.cmake b/cmake/libprotoc.cmake -index 107c1c5..233bcf6 100644 ---- a/cmake/libprotoc.cmake -+++ b/cmake/libprotoc.cmake -@@ -73,7 +73,7 @@ set(libprotoc_files - ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_message_field.cc - ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_primitive_field.cc - ${protobuf_source_dir}/src/google/protobuf/compiler/js/js_generator.cc -- ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc -+ ${CMAKE_CURRENT_BINARY_DIR}/well_known_types_embed.cc - ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum.cc - ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc - ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_extension.cc -@@ -210,9 +210,9 @@ set(js_well_known_types_sources - ) - add_executable(js_embed ${protobuf_source_dir}/src/google/protobuf/compiler/js/embed.cc) - add_custom_command( -- OUTPUT ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc -+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/well_known_types_embed.cc - DEPENDS js_embed ${js_well_known_types_sources} -- COMMAND js_embed ${js_well_known_types_sources} > ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc -+ COMMAND "$" ${js_well_known_types_sources} > ${CMAKE_CURRENT_BINARY_DIR}/well_known_types_embed.cc - ) - - add_library(libprotoc ${protobuf_SHARED_OR_STATIC} diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index a6875edb9c1..1dc7e6cf503 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -1,52 +1,35 @@ include(vcpkg_common_functions) -set(PROTOBUF_VERSION 3.5.1) -set(PROTOC_VERSION 3.5.1) - -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 195ccb210229e0a1080dcdb0a1d87b2e421ad55f6b036c56db3183bd50a942c75b4cc84e6af8a10ad88022a247781a06f609a145a461dfbb8f04051b7dd714b3 -) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}) - -vcpkg_extract_source_archive(${ARCHIVE_FILE}) - -# Add a flag that can be set to disable the protobuf compiler -vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION} +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/protobuf + REF v3.6.1 + SHA512 1bc175d24b49de1b1e41eaf39598194e583afffb924c86c8d2e569d935af21874be76b2cbd4d9655a1d38bac3d4cd811de88bc2c72d81bad79115e69e5b0d839 + HEAD_REF master PATCHES - "${CMAKE_CURRENT_LIST_DIR}/001-add-compiler-flag.patch" - "${CMAKE_CURRENT_LIST_DIR}/export-ParseGeneratorParameter.patch" - "${CMAKE_CURRENT_LIST_DIR}/js-embed.patch" + fix-uwp.patch + disable-lite.patch ) -if(CMAKE_HOST_WIN32) - set(TOOL_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}-win32) - vcpkg_download_distfile(TOOL_ARCHIVE_FILE - URLS "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-win32.zip" - FILENAME "protoc-${PROTOC_VERSION}-win32.zip" - SHA512 27b1b82e92d82c35158362435a29f590961b91f68cda21bffe46e52271340ea4587c4e3177668809af0d053b61e6efa69f0f62156ea11393cd9e6eb4474a3049 - ) - - vcpkg_extract_source_archive(${TOOL_ARCHIVE_FILE} ${TOOL_PATH}) -endif() - - -# Disable the protobuf compiler when targeting UWP -if(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME) - set(protobuf_BUILD_COMPILER OFF) +if(CMAKE_HOST_WIN32 AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + set(protobuf_BUILD_PROTOC_BINARIES OFF) +elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME) + set(protobuf_BUILD_PROTOC_BINARIES OFF) else() - set(protobuf_BUILD_COMPILER ON) + set(protobuf_BUILD_PROTOC_BINARIES ON) endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if(NOT protobuf_BUILD_PROTOC_BINARIES AND NOT EXISTS ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/protobuf) + message(FATAL_ERROR "Cross-targetting protobuf requires the x86-windows protoc to be available. Please install protobuf:x86-windows first.") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(protobuf_BUILD_SHARED_LIBS ON) else() set(protobuf_BUILD_SHARED_LIBS OFF) endif() -if(VCPKG_CRT_LINKAGE STREQUAL static) +if(VCPKG_CRT_LINKAGE STREQUAL "static") set(protobuf_MSVC_STATIC_RUNTIME ON) else() set(protobuf_MSVC_STATIC_RUNTIME OFF) @@ -66,8 +49,8 @@ vcpkg_configure_cmake( -Dprotobuf_MSVC_STATIC_RUNTIME=${protobuf_MSVC_STATIC_RUNTIME} -Dprotobuf_WITH_ZLIB=${protobuf_WITH_ZLIB} -Dprotobuf_BUILD_TESTS=OFF - -Dprotobuf_BUILD_COMPILER=${protobuf_BUILD_COMPILER} - -DCMAKE_INSTALL_CMAKEDIR=share/protobuf + -DCMAKE_INSTALL_CMAKEDIR:STRING=share/protobuf + -Dprotobuf_BUILD_PROTOC_BINARIES=${protobuf_BUILD_PROTOC_BINARIES} ) vcpkg_install_cmake() @@ -93,21 +76,28 @@ endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") file(READ ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake RELEASE_MODULE) - string(REPLACE "\${_IMPORT_PREFIX}/bin/protoc${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protoc${EXECUTABLE_SUFFIX}" RELEASE_MODULE "${RELEASE_MODULE}") + string(REPLACE "\${_IMPORT_PREFIX}/bin/protoc${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protobuf/protoc${EXECUTABLE_SUFFIX}" RELEASE_MODULE "${RELEASE_MODULE}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake "${RELEASE_MODULE}") endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") file(READ ${CURRENT_PACKAGES_DIR}/debug/share/protobuf/protobuf-targets-debug.cmake DEBUG_MODULE) string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}") - string(REPLACE "\${_IMPORT_PREFIX}/debug/bin/protoc${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protoc${EXECUTABLE_SUFFIX}" DEBUG_MODULE "${DEBUG_MODULE}") + string(REPLACE "\${_IMPORT_PREFIX}/debug/bin/protoc${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protobuf/protoc${EXECUTABLE_SUFFIX}" DEBUG_MODULE "${DEBUG_MODULE}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-debug.cmake "${DEBUG_MODULE}") endif() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/share) if(CMAKE_HOST_WIN32) - if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + if(protobuf_BUILD_PROTOC_BINARIES) + file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/protobuf) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/protobuf) + else() + file(COPY ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/protobuf DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin) protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin) else() @@ -116,19 +106,20 @@ if(CMAKE_HOST_WIN32) endif() else() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin) - file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/protoc DESTINATION ${CURRENT_PACKAGES_DIR}/tools + file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/protoc DESTINATION ${CURRENT_PACKAGES_DIR}/tools/protobuf PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ) protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin) endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/libprotobuf-lite.lib) + message(FATAL_ERROR "Expected to not build the lite runtime because it contains some of the same symbols as the full runtime.") +endif() + +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) -if(CMAKE_HOST_WIN32) - file(INSTALL ${TOOL_PATH}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) -endif() vcpkg_copy_pdbs() diff --git a/ports/pybind11/CONTROL b/ports/pybind11/CONTROL index 66157db1d0b..67fdaea5d1e 100644 --- a/ports/pybind11/CONTROL +++ b/ports/pybind11/CONTROL @@ -1,4 +1,4 @@ Source: pybind11 -Version: 2.2.1 +Version: 2.2.3-1 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 +Build-Depends: python3 (windows) \ No newline at end of file diff --git a/ports/pybind11/aliastemplates.patch b/ports/pybind11/aliastemplates.patch new file mode 100644 index 00000000000..a692ad583fa --- /dev/null +++ b/ports/pybind11/aliastemplates.patch @@ -0,0 +1,45 @@ +From 598ec67e4d6727dd9455bcc9959e32fee02a80ac Mon Sep 17 00:00:00 2001 +From: Michael Goulding +Date: Wed, 18 Jul 2018 10:59:15 -0700 +Subject: [PATCH 1/2] VS 15.8.0 Preview 4.0 has a bug with alias templates + +--- + include/pybind11/detail/common.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h +index 3c6722891..89d922190 100644 +--- a/include/pybind11/detail/common.h ++++ b/include/pybind11/detail/common.h +@@ -476,7 +476,7 @@ template struct void_t_impl { using type = void; }; + template using void_t = typename void_t_impl::type; + + /// Compile-time all/any/none of that check the boolean value of all template types +-#ifdef __cpp_fold_expressions ++#if (!defined(_MSC_VER) || ( _MSC_VER >= 1916 )) && defined(__cpp_fold_expressions) + template using all_of = bool_constant<(Ts::value && ...)>; + template using any_of = bool_constant<(Ts::value || ...)>; + #elif !defined(_MSC_VER) + +From 7d534251ca67c5e725ed549900f04adeb5ddb99e Mon Sep 17 00:00:00 2001 +From: Michael Goulding +Date: Thu, 19 Jul 2018 10:27:41 -0700 +Subject: [PATCH 2/2] Address feedback + +--- + include/pybind11/detail/common.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h +index 89d922190..8d65b260d 100644 +--- a/include/pybind11/detail/common.h ++++ b/include/pybind11/detail/common.h +@@ -476,7 +476,7 @@ template struct void_t_impl { using type = void; }; + template using void_t = typename void_t_impl::type; + + /// Compile-time all/any/none of that check the boolean value of all template types +-#if (!defined(_MSC_VER) || ( _MSC_VER >= 1916 )) && defined(__cpp_fold_expressions) ++#if defined(__cpp_fold_expressions) && !(defined(_MSC_VER) && (_MSC_VER < 1916)) + template using all_of = bool_constant<(Ts::value && ...)>; + template using any_of = bool_constant<(Ts::value || ...)>; + #elif !defined(_MSC_VER) diff --git a/ports/pybind11/portfile.cmake b/ports/pybind11/portfile.cmake index 9425baae6f9..16a9b972653 100644 --- a/ports/pybind11/portfile.cmake +++ b/ports/pybind11/portfile.cmake @@ -3,9 +3,11 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pybind/pybind11 - REF v2.2.1 - SHA512 1bc0646862fabef1111c05403a7238965ce5661a6f53945a1b7c4faad33f039d2ea278de64190099a8ae4fd66487a070de59334a7f32e187060bbbc7e0c3060e + REF v2.2.3 + SHA512 3a43b43f44ae4a6453fe3b875384acc868310177216938cb564536e6b73c56002743137e5f61cf4ecbd6c56e3b39476ebf06aea33d460581fc7d8ba7b2a22a67 HEAD_REF master + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/aliastemplates.patch ) vcpkg_find_acquire_program(PYTHON3) diff --git a/ports/python2/001-build-msvc.patch b/ports/python2/001-build-msvc.patch new file mode 100644 index 00000000000..e16258e1554 --- /dev/null +++ b/ports/python2/001-build-msvc.patch @@ -0,0 +1,227 @@ +From 4988ea4f4ce6af0b567e6a2dc2c23aaf7cc5f12d Mon Sep 17 00:00:00 2001 +From: Jean-Christophe Fillion-Robin +Date: Mon, 31 Jul 2017 10:59:47 -0400 +Subject: [PATCH 1/3] VS2010 Support: Backport "Fix #13210. Port the Windows + build from VS2008 to VS2010." + +This commit is a partial backport of python/cpython@401f9f3. It was +originally designed to work with python-cmake-buildsystem. + +The following modules have NOT been backported: + +* Tools/msi +* Tools/buildbot +* PCBuild +--- + Lib/distutils/command/build_ext.py | 2 +- + Lib/distutils/msvc9compiler.py | 11 ++++++----- + PC/dl_nt.c | 11 ++++++++++- + PC/msvcrtmodule.c | 15 ++++++++++++++- + PC/pyconfig.h | 9 +++++++-- + Python/dynload_win.c | 8 ++++++++ + 6 files changed, 46 insertions(+), 10 deletions(-) + +diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py +index 2c68be3..f1d184b 100644 +--- a/Lib/distutils/command/build_ext.py ++++ b/Lib/distutils/command/build_ext.py +@@ -193,7 +193,7 @@ class build_ext (Command): + # Append the source distribution include and library directories, + # this allows distutils on windows to work in the source tree + self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC')) +- if MSVC_VERSION == 9: ++ if MSVC_VERSION >= 9: + # Use the .lib files for the correct architecture + if self.plat_name == 'win32': + suffix = '' +diff --git a/Lib/distutils/msvc9compiler.py b/Lib/distutils/msvc9compiler.py +index 33d3e51..f6de11c 100644 +--- a/Lib/distutils/msvc9compiler.py ++++ b/Lib/distutils/msvc9compiler.py +@@ -662,11 +662,12 @@ class MSVCCompiler(CCompiler) : + if mfinfo is not None: + mffilename, mfid = mfinfo + out_arg = '-outputresource:%s;%s' % (output_filename, mfid) +- try: +- self.spawn(['mt.exe', '-nologo', '-manifest', +- mffilename, out_arg]) +- except DistutilsExecError, msg: +- raise LinkError(msg) ++ if self.__version < 10: ++ try: ++ self.spawn(['mt.exe', '-nologo', '-manifest', ++ temp_manifest, out_arg]) ++ except PackagingExecError as msg: ++ raise LinkError(msg) + else: + log.debug("skipping %s (up-to-date)", output_filename) + +diff --git a/PC/dl_nt.c b/PC/dl_nt.c +index ef1ce09..5ff07fd 100644 +--- a/PC/dl_nt.c ++++ b/PC/dl_nt.c +@@ -18,7 +18,8 @@ char dllVersionBuffer[16] = ""; // a private buffer + HMODULE PyWin_DLLhModule = NULL; + const char *PyWin_DLLVersionString = dllVersionBuffer; + +-// Windows "Activation Context" work: ++#if HAVE_SXS ++// Windows "Activation Context" work. + // Our .pyd extension modules are generally built without a manifest (ie, + // those included with Python and those built with a default distutils. + // This requires we perform some "activation context" magic when loading our +@@ -29,6 +30,8 @@ const char *PyWin_DLLVersionString = dllVersionBuffer; + // As an added complication, this magic only works on XP or later - we simply + // use the existence (or not) of the relevant function pointers from kernel32. + // See bug 4566 (http://python.org/sf/4566) for more details. ++// In Visual Studio 2010, side by side assemblies are no longer used by ++// default. + + typedef BOOL (WINAPI * PFN_GETCURRENTACTCTX)(HANDLE *); + typedef BOOL (WINAPI * PFN_ACTIVATEACTCTX)(HANDLE, ULONG_PTR *); +@@ -76,6 +79,8 @@ void _Py_DeactivateActCtx(ULONG_PTR cookie) + OutputDebugString("Python failed to de-activate the activation context\n"); + } + ++#endif /* HAVE_SXS */ ++ + BOOL WINAPI DllMain (HANDLE hInst, + ULONG ul_reason_for_call, + LPVOID lpReserved) +@@ -87,17 +92,21 @@ BOOL WINAPI DllMain (HANDLE hInst, + // 1000 is a magic number I picked out of the air. Could do with a #define, I spose... + LoadString(hInst, 1000, dllVersionBuffer, sizeof(dllVersionBuffer)); + ++#if HAVE_SXS + // and capture our activation context for use when loading extensions. + _LoadActCtxPointers(); + if (pfnGetCurrentActCtx && pfnAddRefActCtx) + if ((*pfnGetCurrentActCtx)(&PyWin_DLLhActivationContext)) + if (!(*pfnAddRefActCtx)(PyWin_DLLhActivationContext)) + OutputDebugString("Python failed to load the default activation context\n"); ++#endif + break; + + case DLL_PROCESS_DETACH: ++#if HAVE_SXS + if (pfnReleaseActCtx) + (*pfnReleaseActCtx)(PyWin_DLLhActivationContext); ++#endif + break; + } + return TRUE; +diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c +index 44c82e4..68928dd 100644 +--- a/PC/msvcrtmodule.c ++++ b/PC/msvcrtmodule.c +@@ -25,6 +25,8 @@ + #ifdef _MSC_VER + #if _MSC_VER >= 1500 && _MSC_VER < 1600 + #include ++#elif _MSC_VER >= 1600 ++#include + #endif + #endif + +@@ -398,7 +400,7 @@ PyMODINIT_FUNC + initmsvcrt(void) + { + int st; +- PyObject *d; ++ PyObject *d, *version; + PyObject *m = Py_InitModule("msvcrt", msvcrt_functions); + if (m == NULL) + return; +@@ -412,6 +414,7 @@ initmsvcrt(void) + insertint(d, "LK_UNLCK", _LK_UNLCK); + + /* constants for the crt versions */ ++ (void)st; + #ifdef _VC_ASSEMBLY_PUBLICKEYTOKEN + st = PyModule_AddStringConstant(m, "VC_ASSEMBLY_PUBLICKEYTOKEN", + _VC_ASSEMBLY_PUBLICKEYTOKEN); +@@ -427,4 +430,14 @@ initmsvcrt(void) + __LIBRARIES_ASSEMBLY_NAME_PREFIX); + if (st < 0)return; + #endif ++ ++/* constants for the 2010 crt versions */ ++#if defined(_VC_CRT_MAJOR_VERSION) && defined (_VC_CRT_MINOR_VERSION) && defined(_VC_CRT_BUILD_VERSION) && defined(_VC_CRT_RBUILD_VERSION) ++ version = PyUnicode_FromFormat("%d.%d.%d.%d", _VC_CRT_MAJOR_VERSION, ++ _VC_CRT_MINOR_VERSION, ++ _VC_CRT_BUILD_VERSION, ++ _VC_CRT_RBUILD_VERSION); ++ st = PyModule_AddObject(m, "CRT_ASSEMBLY_VERSION", version); ++ if (st < 0) return NULL; ++#endif + } +diff --git a/PC/pyconfig.h b/PC/pyconfig.h +index 5d1c90a..b60af1e 100644 +--- a/PC/pyconfig.h ++++ b/PC/pyconfig.h +@@ -231,14 +231,19 @@ typedef int pid_t; + #define hypot _hypot + #endif + +-#endif /* _MSC_VER */ ++/* Side by Side assemblies supported in VS 2005 and VS 2008 but not 2010*/ ++#if _MSC_VER >= 1400 && _MSC_VER < 1600 ++#define HAVE_SXS 1 ++#endif + + /* define some ANSI types that are not defined in earlier Win headers */ +-#if defined(_MSC_VER) && _MSC_VER >= 1200 ++#if _MSC_VER >= 1200 + /* This file only exists in VC 6.0 or higher */ + #include + #endif + ++#endif /* _MSC_VER */ ++ + /* ------------------------------------------------------------------------*/ + /* The Borland compiler defines __BORLANDC__ */ + /* XXX These defines are likely incomplete, but should be easy to fix. */ +diff --git a/Python/dynload_win.c b/Python/dynload_win.c +index 4e5555e..8626642 100644 +--- a/Python/dynload_win.c ++++ b/Python/dynload_win.c +@@ -12,8 +12,10 @@ + #include + + // "activation context" magic - see dl_nt.c... ++#if HAVE_SXS + extern ULONG_PTR _Py_ActivateActCtx(); + void _Py_DeactivateActCtx(ULONG_PTR cookie); ++#endif + + const struct filedescr _PyImport_DynLoadFiletab[] = { + #ifdef _DEBUG +@@ -176,7 +178,9 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, + char pathbuf[260]; + LPTSTR dummy; + unsigned int old_mode; ++#if HAVE_SXS + ULONG_PTR cookie = 0; ++#endif + /* We use LoadLibraryEx so Windows looks for dependent DLLs + in directory of pathname first. However, Windows95 + can sometimes not work correctly unless the absolute +@@ -190,11 +194,15 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, + sizeof(pathbuf), + pathbuf, + &dummy)) { ++#if HAVE_SXS + ULONG_PTR cookie = _Py_ActivateActCtx(); ++#endif + /* XXX This call doesn't exist in Windows CE */ + hDLL = LoadLibraryEx(pathname, NULL, + LOAD_WITH_ALTERED_SEARCH_PATH); ++#if HAVE_SXS + _Py_DeactivateActCtx(cookie); ++#endif + } + + /* restore old error mode settings */ +-- +2.5.0 + diff --git a/ports/python2/002-build-msvc.patch b/ports/python2/002-build-msvc.patch new file mode 100644 index 00000000000..85748fc8fa2 --- /dev/null +++ b/ports/python2/002-build-msvc.patch @@ -0,0 +1,264 @@ +From e6a1f39d2d876bbfc8b02e628dfd1d0fef4a0651 Mon Sep 17 00:00:00 2001 +From: Jean-Christophe Fillion-Robin +Date: Tue, 1 Aug 2017 15:40:29 -0400 +Subject: [PATCH 2/3] VS2015 Support: Backport "Issue #22919: Windows build + updated to support VC 14.0 (Visual Studio 2015), which will be used for the + official 3.5 release." + +This commit is a partial backport of python/cpython@65e4cb1. It was +originally designed to work with python-cmake-buildsystem. + +This patch do not backport the define "timezone" as "_timezone" as it was done in Python 3.x. +Keeping "timezone" is required in Python 2.7.x to avoid the following build issue +``error C2032: '__timezone': function cannot be member of struct '__timeb64'`` +associated with `sys/timeb.h`. The need for `sys/timeb.h` was removed in Python 3.x in python/cpython@6fc4ade and python/cpython@0011124 +but is still used in Python 2.7.x. + +The following modules have NOT been backported: + +* Lib/distutils/sysconfig +* Modules/socketmodule.c .... : Not required since changes related to WSA have been introduced in Python 3.x (see python/cpython@6b4883d) +* Tools/buildbot +* PCBuild +--- + Lib/ctypes/util.py | 6 +++++- + Lib/distutils/command/build_ext.py | 2 +- + Lib/distutils/msvc9compiler.py | 3 +++ + Lib/distutils/msvccompiler.py | 3 +++ + Modules/posixmodule.c | 22 ++++++++++++++++++++-- + Modules/timemodule.c | 4 ++-- + PC/bdist_wininst/install.c | 29 ++++++----------------------- + PC/pyconfig.h | 7 +++++++ + 8 files changed, 47 insertions(+), 29 deletions(-) + +diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py +index ab10ec5..a163239 100644 +--- a/Lib/ctypes/util.py ++++ b/Lib/ctypes/util.py +@@ -19,6 +19,8 @@ if os.name == "nt": + i = i + len(prefix) + s, rest = sys.version[i:].split(" ", 1) + majorVersion = int(s[:-2]) - 6 ++ if majorVersion >= 13: ++ majorVersion += 1 + minorVersion = int(s[2:3]) / 10.0 + # I don't think paths are affected by minor version in version 6 + if majorVersion == 6: +@@ -36,8 +38,10 @@ if os.name == "nt": + return None + if version <= 6: + clibname = 'msvcrt' +- else: ++ elif version <= 13: + clibname = 'msvcr%d' % (version * 10) ++ else: ++ clibname = 'appcrt%d' % (version * 10) + + # If python was built with in debug mode + import imp +diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py +index f1d184b..0851690 100644 +--- a/Lib/distutils/command/build_ext.py ++++ b/Lib/distutils/command/build_ext.py +@@ -196,7 +196,7 @@ class build_ext (Command): + if MSVC_VERSION >= 9: + # Use the .lib files for the correct architecture + if self.plat_name == 'win32': +- suffix = '' ++ suffix = 'win32' + else: + # win-amd64 or win-ia64 + suffix = self.plat_name[4:] +diff --git a/Lib/distutils/msvc9compiler.py b/Lib/distutils/msvc9compiler.py +index f6de11c..ee61ac2 100644 +--- a/Lib/distutils/msvc9compiler.py ++++ b/Lib/distutils/msvc9compiler.py +@@ -182,6 +182,9 @@ def get_build_version(): + i = i + len(prefix) + s, rest = sys.version[i:].split(" ", 1) + majorVersion = int(s[:-2]) - 6 ++ if majorVersion >= 13: ++ # v13 was skipped and should be v14 ++ majorVersion += 1 + minorVersion = int(s[2:3]) / 10.0 + # I don't think paths are affected by minor version in version 6 + if majorVersion == 6: +diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py +index 0e69fd3..77025c6 100644 +--- a/Lib/distutils/msvccompiler.py ++++ b/Lib/distutils/msvccompiler.py +@@ -164,6 +164,9 @@ def get_build_version(): + i = i + len(prefix) + s, rest = sys.version[i:].split(" ", 1) + majorVersion = int(s[:-2]) - 6 ++ if majorVersion >= 13: ++ # v13 was skipped and should be v14 ++ majorVersion += 1 + minorVersion = int(s[2:3]) / 10.0 + # I don't think paths are affected by minor version in version 6 + if majorVersion == 6: +diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c +index e73805f..90d5318 100644 +--- a/Modules/posixmodule.c ++++ b/Modules/posixmodule.c +@@ -558,15 +558,33 @@ _PyInt_FromDev(PY_LONG_LONG v) + /* The actual size of the structure is determined at runtime. + * Only the first items must be present. + */ ++ ++#if _MSC_VER >= 1900 ++ ++typedef struct { ++ CRITICAL_SECTION lock; ++ intptr_t osfhnd; ++ __int64 startpos; ++ char osfile; ++} my_ioinfo; ++ ++#define IOINFO_L2E 6 ++#define IOINFO_ARRAYS 128 ++ ++#else ++ + typedef struct { + intptr_t osfhnd; + char osfile; + } my_ioinfo; + +-extern __declspec(dllimport) char * __pioinfo[]; + #define IOINFO_L2E 5 +-#define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E) + #define IOINFO_ARRAYS 64 ++ ++#endif ++ ++extern __declspec(dllimport) char * __pioinfo[]; ++#define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E) + #define _NHANDLE_ (IOINFO_ARRAYS * IOINFO_ARRAY_ELTS) + #define FOPEN 0x01 + #define _NO_CONSOLE_FILENO (intptr_t)-2 +diff --git a/Modules/timemodule.c b/Modules/timemodule.c +index 12c43b0..db190b8 100644 +--- a/Modules/timemodule.c ++++ b/Modules/timemodule.c +@@ -808,7 +808,7 @@ inittimezone(PyObject *m) { + #ifdef PYOS_OS2 + PyModule_AddIntConstant(m, "timezone", _timezone); + #else /* !PYOS_OS2 */ +- PyModule_AddIntConstant(m, "timezone", timezone); ++ PyModule_AddIntConstant(m, "timezone", _timezone); + #endif /* PYOS_OS2 */ + #ifdef HAVE_ALTZONE + PyModule_AddIntConstant(m, "altzone", altzone); +@@ -816,7 +816,7 @@ inittimezone(PyObject *m) { + #ifdef PYOS_OS2 + PyModule_AddIntConstant(m, "altzone", _timezone-3600); + #else /* !PYOS_OS2 */ +- PyModule_AddIntConstant(m, "altzone", timezone-3600); ++ PyModule_AddIntConstant(m, "altzone", _timezone-3600); + #endif /* PYOS_OS2 */ + #endif + PyModule_AddIntConstant(m, "daylight", daylight); +diff --git a/PC/bdist_wininst/install.c b/PC/bdist_wininst/install.c +index f1cc7fe..5b11dcc 100644 +--- a/PC/bdist_wininst/install.c ++++ b/PC/bdist_wininst/install.c +@@ -1184,7 +1184,7 @@ static void CenterWindow(HWND hwnd) + + #include + +-BOOL CALLBACK ++INT_PTR CALLBACK + IntroDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) + { + LPNMHDR lpnm; +@@ -1533,7 +1533,7 @@ SCHEME *GetScheme(int major, int minor) + return old_scheme; + } + +-BOOL CALLBACK ++INT_PTR CALLBACK + SelectPythonDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) + { + LPNMHDR lpnm; +@@ -1835,7 +1835,7 @@ static void CloseLogfile(void) + fclose(logfile); + } + +-BOOL CALLBACK ++INT_PTR CALLBACK + InstallFilesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) + { + LPNMHDR lpnm; +@@ -1990,7 +1990,7 @@ InstallFilesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) + } + + +-BOOL CALLBACK ++INT_PTR CALLBACK + FinishedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) + { + LPNMHDR lpnm; +@@ -2166,23 +2166,6 @@ BOOL NeedAutoUAC() + return TRUE; + } + +-// Returns TRUE if the platform supports UAC. +-BOOL PlatformSupportsUAC() +-{ +- // Note that win2k does seem to support ShellExecute with 'runas', +- // but does *not* support IsUserAnAdmin - so we just pretend things +- // only work on XP and later. +- BOOL bIsWindowsXPorLater; +- OSVERSIONINFO winverinfo; +- winverinfo.dwOSVersionInfoSize = sizeof(winverinfo); +- if (!GetVersionEx(&winverinfo)) +- return FALSE; // something bad has gone wrong +- bIsWindowsXPorLater = +- ( (winverinfo.dwMajorVersion > 5) || +- ( (winverinfo.dwMajorVersion == 5) && (winverinfo.dwMinorVersion >= 1) )); +- return bIsWindowsXPorLater; +-} +- + // Spawn ourself as an elevated application. On failure, a message is + // displayed to the user - but this app will always terminate, even + // on error. +@@ -2238,7 +2221,7 @@ int DoInstall(void) + + // See if we need to do the Vista UAC magic. + if (strcmp(user_access_control, "force")==0) { +- if (PlatformSupportsUAC() && !MyIsUserAnAdmin()) { ++ if (!MyIsUserAnAdmin()) { + SpawnUAC(); + return 0; + } +@@ -2246,7 +2229,7 @@ int DoInstall(void) + } else if (strcmp(user_access_control, "auto")==0) { + // Check if it looks like we need UAC control, based + // on how Python itself was installed. +- if (PlatformSupportsUAC() && !MyIsUserAnAdmin() && NeedAutoUAC()) { ++ if (!MyIsUserAnAdmin() && NeedAutoUAC()) { + SpawnUAC(); + return 0; + } +diff --git a/PC/pyconfig.h b/PC/pyconfig.h +index b60af1e..b517146 100644 +--- a/PC/pyconfig.h ++++ b/PC/pyconfig.h +@@ -231,6 +231,13 @@ typedef int pid_t; + #define hypot _hypot + #endif + ++/* VS 2015 defines these names with a leading underscore */ ++#if _MSC_VER >= 1900 ++// #define timezone _timezone ++#define daylight _daylight ++#define tzname _tzname ++#endif ++ + /* Side by Side assemblies supported in VS 2005 and VS 2008 but not 2010*/ + #if _MSC_VER >= 1400 && _MSC_VER < 1600 + #define HAVE_SXS 1 +-- +2.5.0 + diff --git a/ports/python2/003-build-msvc.patch b/ports/python2/003-build-msvc.patch new file mode 100644 index 00000000000..71d5569f5d1 --- /dev/null +++ b/ports/python2/003-build-msvc.patch @@ -0,0 +1,234 @@ +From 00164b4a9821e82f513183035587bea9243a7d5e Mon Sep 17 00:00:00 2001 +From: Jean-Christophe Fillion-Robin +Date: Tue, 1 Aug 2017 14:13:24 -0400 +Subject: [PATCH 3/3] VS2015 Support: Backport of "Issue #23524: Replace + _PyVerify_fd function with calling + _set_thread_local_invalid_parameter_handler on every thread." + +This commit is a partial backport of python/cpython@d81431f. It was +originally designed to work with python-cmake-buildsystem. + +Implementation of "_PyVerify_fd" in "Python/fileutils.c" found only in +Python 3.x has been copied into "Modules/posixmodule.c" + +The following modules have NOT been backported: + +* PCbuild +--- + Modules/posixmodule.c | 54 +++++++++++++++++++++++------------------- + PC/invalid_parameter_handler.c | 22 +++++++++++++++++ + Python/pystate.c | 12 ++++++++++ + PCbuild/pythoncore.vcxproj | 1 + + PCbuild/pythoncore.vcxproj.filters | 1 + + 5 files changed, 65 insertions(+), 26 deletions(-) + create mode 100644 PC/invalid_parameter_handler.c + +diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c +index 90d5318..6a180a0 100644 +--- a/Modules/posixmodule.c ++++ b/Modules/posixmodule.c +@@ -277,6 +277,7 @@ extern int lstat(const char *, struct stat *); + #include "osdefs.h" + #include + #include ++#include + #include /* for ShellExecute() */ + #define popen _popen + #define pclose _pclose +@@ -535,8 +534,28 @@ _PyInt_FromDev(PY_LONG_LONG v) + # define _PyInt_FromDev PyInt_FromLong + #endif + ++#ifdef _MSC_VER ++#if _MSC_VER >= 1900 ++ ++/* This function lets the Windows CRT validate the file handle without ++ terminating the process if it's invalid. */ ++int ++_PyVerify_fd(int fd) ++{ ++ intptr_t osh; ++ /* Fast check for the only condition we know */ ++ if (fd < 0) { ++ _set_errno(EBADF); ++ return 0; ++ } ++ osh = _get_osfhandle(fd); ++ return osh != (intptr_t)-1; ++} ++ ++#define _PyVerify_fd_dup2(fd1, fd2) (_PyVerify_fd(fd1) && (fd2) >= 0) ++ ++#elif _MSC_VER >= 1400 + +-#if defined _MSC_VER && _MSC_VER >= 1400 + /* Microsoft CRT in VS2005 and higher will verify that a filehandle is + * valid and raise an assertion if it isn't. + * Normally, an invalid fd is likely to be a C program error and therefore +@@ -601,35 +580,18 @@ _PyInt_FromDev(PY_LONG_LONG v) + * Only the first items must be present. + */ + +-#if _MSC_VER >= 1900 +- +-typedef struct { +- CRITICAL_SECTION lock; +- intptr_t osfhnd; +- __int64 startpos; +- char osfile; +-} my_ioinfo; +- +-#define IOINFO_L2E 6 +-#define IOINFO_ARRAYS 128 +- +-#else +- + typedef struct { + intptr_t osfhnd; + char osfile; + } my_ioinfo; + +-#define IOINFO_L2E 5 +-#define IOINFO_ARRAYS 64 +- +-#endif +- + extern __declspec(dllimport) char * __pioinfo[]; + #define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E) + #define _NHANDLE_ (IOINFO_ARRAYS * IOINFO_ARRAY_ELTS) + #define FOPEN 0x01 + #define _NO_CONSOLE_FILENO (intptr_t)-2 ++#define IOINFO_L2E 5 ++#define IOINFO_ARRAYS 64 + + /* This function emulates what the windows CRT does to validate file handles */ + int +@@ -653,6 +649,8 @@ _PyVerify_fd_dup2(int fd1, int fd2) + #define _PyVerify_fd_dup2(A, B) (1) + #endif + ++#endif /* defined _MSC_VER */ ++ + /* Return a dictionary corresponding to the POSIX environment table */ + #if defined(WITH_NEXT_FRAMEWORK) || (defined(__APPLE__) && defined(Py_ENABLE_SHARED)) + /* On Darwin/MacOSX a shared library or framework has no access to +@@ -1260,14 +1254,10 @@ win32_fstat(int file_number, struct win32_stat *result) + + h = (HANDLE)_get_osfhandle(file_number); + +- /* Protocol violation: we explicitly clear errno, instead of +- setting it to a POSIX error. Callers should use GetLastError. */ + errno = 0; + + if (h == INVALID_HANDLE_VALUE) { +- /* This is really a C library error (invalid file handle). +- We set the Win32 error to the closes one matching. */ +- SetLastError(ERROR_INVALID_HANDLE); ++ errno = EBADF; + return -1; + } + memset(result, 0, sizeof(*result)); +@@ -1268,6 +1266,7 @@ win32_fstat(int file_number, struct win32_stat *result) + if (type == FILE_TYPE_UNKNOWN) { + DWORD error = GetLastError(); + if (error != 0) { ++ errno = EINVAL; + return -1; + } + /* else: valid but unknown file */ +@@ -1284,6 +1281,7 @@ win32_fstat(int file_number, struct win32_stat *result) + } + + if (!GetFileInformationByHandle(h, &info)) { ++ errno = EINVAL; + return -1; + } + +diff --git a/PC/invalid_parameter_handler.c b/PC/invalid_parameter_handler.c +new file mode 100644 +index 0000000..3bc0104 +--- /dev/null ++++ b/PC/invalid_parameter_handler.c +@@ -0,0 +1,22 @@ ++#ifdef _MSC_VER ++ ++#include ++ ++#if _MSC_VER >= 1900 ++/* pyconfig.h uses this function in the _Py_BEGIN/END_SUPPRESS_IPH ++ * macros. It does not need to be defined when building using MSVC ++ * earlier than 14.0 (_MSC_VER == 1900). ++ */ ++ ++static void __cdecl _silent_invalid_parameter_handler( ++ wchar_t const* expression, ++ wchar_t const* function, ++ wchar_t const* file, ++ unsigned int line, ++ uintptr_t pReserved) { } ++ ++void *_Py_silent_invalid_parameter_handler = ++ (void*)_silent_invalid_parameter_handler; ++#endif ++ ++#endif +diff --git a/Python/pystate.c b/Python/pystate.c +index eb992c1..1c0f970 100644 +--- a/Python/pystate.c ++++ b/Python/pystate.c +@@ -22,6 +22,12 @@ the expense of doing their own locking). + #endif + #endif + ++#if defined _MSC_VER && _MSC_VER >= 1900 ++/* Issue #23524: Temporary fix to disable termination due to invalid parameters */ ++PyAPI_DATA(void*) _Py_silent_invalid_parameter_handler; ++#include ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -202,6 +208,12 @@ new_threadstate(PyInterpreterState *interp, int init) + tstate->next = interp->tstate_head; + interp->tstate_head = tstate; + HEAD_UNLOCK(); ++ ++#if defined _MSC_VER && _MSC_VER >= 1900 ++ /* Issue #23524: Temporary fix to disable termination due to invalid parameters */ ++ _set_thread_local_invalid_parameter_handler((_invalid_parameter_handler)_Py_silent_invalid_parameter_handler); ++#endif ++ + } + + return tstate; +-- +2.5.0 + +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index 99291ea..af17762 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -333,6 +333,7 @@ + + + ++ + + + + +diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters +index 99291ea..af17762 100644 +--- a/PCbuild/pythoncore.vcxproj.filters ++++ b/PCbuild/pythoncore.vcxproj.filters +@@ -794,6 +794,9 @@ + + Parser + ++ ++ PC ++ + + PC + diff --git a/ports/python2/004-static-library-msvc.patch b/ports/python2/004-static-library-msvc.patch new file mode 100644 index 00000000000..6c5cb75945f --- /dev/null +++ b/ports/python2/004-static-library-msvc.patch @@ -0,0 +1,38 @@ +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -41,7 +41,7 @@ + + + +- DynamicLibrary ++ StaticLibrary + false + + +@@ -70,12 +70,24 @@ + + /Zm200 %(AdditionalOptions) + $(PySourcePath)Python;$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories) +- _USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) ++ _USRDLL;Py_BUILD_CORE;Py_NO_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) + + + ws2_32.lib;%(AdditionalDependencies) + 0x1e000000 + ++ ++ MachineX86 ++ ++ ++ MachineX86 ++ ++ ++ MachineX86 ++ ++ ++ MachineX86 ++ + + + +-- diff --git a/ports/python2/005-static-crt-msvc.patch b/ports/python2/005-static-crt-msvc.patch new file mode 100644 index 00000000000..0bcd389c1ef --- /dev/null +++ b/ports/python2/005-static-crt-msvc.patch @@ -0,0 +1,15 @@ +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -71,6 +71,10 @@ + /Zm200 %(AdditionalOptions) + $(PySourcePath)Python;$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories) + _USRDLL;Py_BUILD_CORE;Py_NO_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) ++ MultiThreadedDebug ++ MultiThreadedDebug ++ MultiThreaded ++ MultiThreaded + + + ws2_32.lib;%(AdditionalDependencies) +-- + diff --git a/ports/python2/006-static-fix-headers.patch b/ports/python2/006-static-fix-headers.patch new file mode 100644 index 00000000000..9e3030b4542 --- /dev/null +++ b/ports/python2/006-static-fix-headers.patch @@ -0,0 +1,14 @@ +diff --git a/PC/pyconfig.h b/PC/pyconfig.h +index 64e7aec..aa36745 100644 +--- a/PC/pyconfig.h ++++ b/PC/pyconfig.h +@@ -331,6 +331,7 @@ typedef int pid_t; + + /* For Windows the Python core is in a DLL by default. Test + Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ ++#define Py_NO_ENABLE_SHARED + #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED) + # define Py_ENABLE_SHARED 1 /* standard symbol for shared library */ + # define MS_COREDLL /* deprecated old symbol */ +-- + diff --git a/ports/python2/007-fix-build-path.patch b/ports/python2/007-fix-build-path.patch new file mode 100644 index 00000000000..5dc4633e07a --- /dev/null +++ b/ports/python2/007-fix-build-path.patch @@ -0,0 +1,14 @@ +diff --git a/PCbuild/python.props b/PCbuild/python.props +index d2b1991..a22c054 100644 +--- a/PCbuild/python.props ++++ b/PCbuild/python.props +@@ -26,8 +26,7 @@ + $(PySourcePath)\ + + +- $(PySourcePath)PCBuild\ +- $(BuildPath)\$(ArchName)\ ++ $(PySourcePath)PCBuild\$(ArchName)\ + $(BuildPath)\ + + diff --git a/ports/python2/CONTROL b/ports/python2/CONTROL new file mode 100644 index 00000000000..c0510dcac17 --- /dev/null +++ b/ports/python2/CONTROL @@ -0,0 +1,3 @@ +Source: python2 +Version: 2.7.15-1 +Description: The Python programming language as an embeddable library \ No newline at end of file diff --git a/ports/python2/portfile.cmake b/ports/python2/portfile.cmake new file mode 100644 index 00000000000..0c53ec12871 --- /dev/null +++ b/ports/python2/portfile.cmake @@ -0,0 +1,79 @@ +# Patches are from: +# - https://github.com/python-cmake-buildsystem/python-cmake-buildsystem/tree/master/patches/2.7.13/Windows-MSVC/1900 +# - https://github.com/Microsoft/vcpkg/tree/master/ports/python3 + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_CRT_LINKAGE STREQUAL static) + message(STATUS "Warning: Dynamic library with static CRT is not supported. Building static library.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +set(PYTHON_VERSION_MAJOR 2) +set(PYTHON_VERSION_MINOR 7) +set(PYTHON_VERSION_PATCH 15) +set(PYTHON_VERSION ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH}) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/python-${PYTHON_VERSION}) + +include(vcpkg_common_functions) + +vcpkg_download_distfile( + PYTHON_ARCHIVE + URLS https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz + FILENAME Python-${PYTHON_VERSION}.tar.xz + SHA512 27ea43eb45fc68f3d2469d5f07636e10801dee11635a430ec8ec922ed790bb426b072da94df885e4dfa1ea8b7a24f2f56dd92f9b0f51e162330f161216bd6de6 +) + +vcpkg_extract_source_archive(${PYTHON_ARCHIVE}) + +set(_PYTHON_PATCHES "") + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + list(APPEND _PYTHON_PATCHES + ${CMAKE_CURRENT_LIST_DIR}/004-static-library-msvc.patch + ${CMAKE_CURRENT_LIST_DIR}/006-static-fix-headers.patch + ) +endif() +if (VCPKG_CRT_LINKAGE STREQUAL static) + list(APPEND _PYTHON_PATCHES ${CMAKE_CURRENT_LIST_DIR}/005-static-crt-msvc.patch) +endif() + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/001-build-msvc.patch + ${CMAKE_CURRENT_LIST_DIR}/002-build-msvc.patch + ${CMAKE_CURRENT_LIST_DIR}/003-build-msvc.patch + ${_PYTHON_PATCHES} + ${CMAKE_CURRENT_LIST_DIR}/007-fix-build-path.patch +) + +if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + set(BUILD_ARCH "Win32") + set(OUT_DIR "win32") +elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64") + set(BUILD_ARCH "x64") + set(OUT_DIR "amd64") +else() + message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/PCBuild/pythoncore.vcxproj + PLATFORM ${BUILD_ARCH}) + +file(GLOB HEADERS ${SOURCE_PATH}/Include/*.h) +file(COPY ${HEADERS} ${SOURCE_PATH}/PC/pyconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) + +file(COPY ${SOURCE_PATH}/Lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}) + +file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_d.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/LICENSE ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/copyright) + +vcpkg_copy_pdbs() diff --git a/ports/python3/0005-Fix-DefaultWindowsSDKVersion.patch b/ports/python3/0005-Fix-DefaultWindowsSDKVersion.patch new file mode 100644 index 00000000000..13f7b39e09e --- /dev/null +++ b/ports/python3/0005-Fix-DefaultWindowsSDKVersion.patch @@ -0,0 +1,12 @@ +diff --git a/PCbuild/python.props b/PCbuild/python.props +--- a/PCbuild/python.props ++++ b/PCbuild/python.props +@@ -76,7 +76,7 @@ + --> + <_RegistryVersion>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) + <_RegistryVersion Condition="$(_RegistryVersion) == ''">$(Registry:HKEY_LOCAL_MACHINE\WOW6432Node\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) +- 10.0.15063.0 ++ 10.0.15063.0 + 10.0.14393.0 + 10.0.10586.0 + 10.0.10240.0 diff --git a/ports/python3/CONTROL b/ports/python3/CONTROL index c8331f8cf63..26a0bce9380 100644 --- a/ports/python3/CONTROL +++ b/ports/python3/CONTROL @@ -1,3 +1,3 @@ Source: python3 -Version: 3.6.4-1 +Version: 3.6.4-2 Description: The Python programming language as an embeddable library \ No newline at end of file diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index 16b3a3db3db..576a35e8a67 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -16,12 +16,9 @@ vcpkg_from_github( REF v${PYTHON_VERSION} SHA512 32cca5e344ee66f08712ab5533e5518f724f978ec98d985f7612d0bd8d7f5cac25625363c9eead192faf1806d4ea3393515f72ba962a2a0bed26261e56d8c637 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${TEMP_SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/0004-Fix-iomodule-for-RS4-SDK.patch + ${CMAKE_CURRENT_LIST_DIR}/0005-Fix-DefaultWindowsSDKVersion.patch ) # We need per-triplet directories because we need to patch the project files differently based on the linkage diff --git a/ports/qca/CONTROL b/ports/qca/CONTROL index 4f484666f0f..72f20869f18 100644 --- a/ports/qca/CONTROL +++ b/ports/qca/CONTROL @@ -1,4 +1,4 @@ Source: qca -Version: 2.2.0-2 +Version: 2.2.0-3 Description: Qt Cryptographic Architecture (QCA). Sources: https://cgit.kde.org/qca.git/ Build-Depends: qt5-base diff --git a/ports/qca/portfile.cmake b/ports/qca/portfile.cmake index 6ad35d1f775..ff667cd6c7e 100644 --- a/ports/qca/portfile.cmake +++ b/ports/qca/portfile.cmake @@ -5,50 +5,24 @@ # Updated certstore. See certstore.pem in the output dirs # -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported yet. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() - include(vcpkg_common_functions) -find_program(GIT git) +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + vcpkg_find_acquire_program(PERL) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") +vcpkg_add_to_path(${PERL_EXE_PATH}) -# Set git variables to qca version 2.2.0 commit -set(GIT_URL "git://anongit.kde.org/qca.git") -set(GIT_REF "19ec49f89a0a560590ec733c549b92e199792837") # Commit - -# Prepare source dir -if(NOT EXISTS "${DOWNLOADS}/qca.git") - message(STATUS "Cloning") - vcpkg_execute_required_process( - COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/qca.git - WORKING_DIRECTORY ${DOWNLOADS} - LOGNAME clone - ) +if(EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) endif() -message(STATUS "Cloning done") -if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") - message(STATUS "Adding worktree") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) - vcpkg_execute_required_process( - COMMAND ${GIT} worktree add -f --detach ${CURRENT_BUILDTREES_DIR}/src ${GIT_REF} - WORKING_DIRECTORY ${DOWNLOADS}/qca.git - LOGNAME worktree - ) -endif() -message(STATUS "Adding worktree done") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/) - -# Apply the patch to install to the expected folders -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-fix-path-for-vcpkg.patch +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/qca + REF 19ec49f89a0a560590ec733c549b92e199792837 + SHA512 6a83ee6715a9a922f4fde5af571e2aad043ac5cbd522f57365038dd31879b44eb57a099ff797793d7ee19e320e0a151e5beacdff3bed525d39ea0b8e46efca9a + PATCHES 0001-fix-path-for-vcpkg.patch ) # According to: @@ -72,9 +46,8 @@ message(STATUS "Importing certstore done") # Configure and build vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - CURRENT_PACKAGES_DIR ${CURRENT_PACKAGES_DIR} + PREFER_NINJA OPTIONS - -DBUILD_SHARED_LIBS=ON -DUSE_RELATIVE_PATHS=ON -DQT4_BUILD=OFF -DBUILD_TESTS=OFF diff --git a/ports/qhull/CONTROL b/ports/qhull/CONTROL index 8eb3f87722c..411b3ee7c6c 100644 --- a/ports/qhull/CONTROL +++ b/ports/qhull/CONTROL @@ -1,3 +1,3 @@ Source: qhull -Version: 2015.2-2 +Version: 2015.2-3 Description: computes the convex hull, Delaunay triangulation, Voronoi diagram diff --git a/ports/qhull/portfile.cmake b/ports/qhull/portfile.cmake index 25ee8f0d1b2..c13287b0ffc 100644 --- a/ports/qhull/portfile.cmake +++ b/ports/qhull/portfile.cmake @@ -31,7 +31,6 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(GLOB EXEFILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qhull) -file(COPY ${EXEFILES_DEBUG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qhull) file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG}) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") diff --git a/ports/qpid-proton/CONTROL b/ports/qpid-proton/CONTROL index 6f64c3fcf41..34309a95956 100644 --- a/ports/qpid-proton/CONTROL +++ b/ports/qpid-proton/CONTROL @@ -1,4 +1,4 @@ Source: qpid-proton -Version: 0.18.1 +Version: 0.24.0 Build-Depends: openssl Description: Qpid Proton is a high-performance, lightweight messaging library. \ No newline at end of file diff --git a/ports/qpid-proton/portfile.cmake b/ports/qpid-proton/portfile.cmake index 65189c4967b..64a43d43191 100644 --- a/ports/qpid-proton/portfile.cmake +++ b/ports/qpid-proton/portfile.cmake @@ -10,7 +10,7 @@ endif() include(vcpkg_common_functions) # Use this throughout rather than literal string -set(QPID_PROTON_VERSION 0.18.1) +set(QPID_PROTON_VERSION 0.24.0) vcpkg_find_acquire_program(PYTHON2) # Go grab the code. Set SHA512 to 1 to get correct sha from download @@ -18,7 +18,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/qpid-proton REF ${QPID_PROTON_VERSION} - SHA512 92cbd7f534e8b180fb72888999af2735541663c70dde1e4e1382f39c5057920df0fb72527db23008823d69a7ddac335217f16270c0bbdb4dfe26733feddf94cc + SHA512 a22154d5ea96330e22245a54233101256f02d10ee814a7f0f4b654e56128615acee0cfc0387cbec9b877dd20cc23a5b1635aa9e1d1b60a4b9aa985e449dcb62e HEAD_REF next ) @@ -38,7 +38,7 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/proton-${QPID_PROTON_VERSION} ${CURRENT_PACKAGES_DIR}/share/${PORT}) # Vcpkg expects file with name "copyright" -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) # Remove extraneous unrequired-for-vcpkg files diff --git a/ports/qscintilla/CONTROL b/ports/qscintilla/CONTROL index 6453ad6435d..59b75c8c1e0 100644 --- a/ports/qscintilla/CONTROL +++ b/ports/qscintilla/CONTROL @@ -1,4 +1,4 @@ Source: qscintilla -Version: 2.10-4 +Version: 2.10-7 Description: QScintilla is a port to Qt of the Scintilla editing component. Features syntax highlighting, code-completion and much more (Barebone build without python bindings (missing dependeny PyQt) and without QtDesigner plugin) Build-Depends: qt5-base diff --git a/ports/qscintilla/portfile.cmake b/ports/qscintilla/portfile.cmake index 18ff18a9790..71778e402f1 100644 --- a/ports/qscintilla/portfile.cmake +++ b/ports/qscintilla/portfile.cmake @@ -11,15 +11,9 @@ vcpkg_find_acquire_program(PYTHON3) # Add python3 to path get_filename_component(PYTHON_PATH ${PYTHON3} DIRECTORY) -SET(ENV{PATH} "${PYTHON_PATH};$ENV{PATH}") - -set(BUILD_OPTIONS - "${SOURCE_PATH}/Qt4Qt5/qscintilla.pro" - CONFIG+=build_all - CONFIG-=hide_symbols -) - -SET(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin") +vcpkg_add_to_path(PREPEND ${PYTHON_PATH}) +vcpkg_add_to_path(${CURRENT_INSTALLED_DIR}/bin) +vcpkg_add_to_path(${CURRENT_INSTALLED_DIR}/debug/bin) #Store build paths set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") @@ -30,6 +24,7 @@ vcpkg_configure_qmake( OPTIONS CONFIG+=build_all CONFIG-=hide_symbols + DEFINES+=SCI_NAMESPACE ) vcpkg_build_qmake( @@ -38,27 +33,27 @@ vcpkg_build_qmake( ) file(GLOB HEADER_FILES ${SOURCE_PATH}/Qt4Qt5/Qsci/*) -file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/Qsci) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/Qsci) -file(INSTALL +configure_file( ${RELEASE_DIR}/release/qscintilla2_qt5.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - RENAME qscintilla2.lib + ${CURRENT_PACKAGES_DIR}/lib/qscintilla2.lib + COPYONLY ) -file(INSTALL +configure_file( ${DEBUG_DIR}/debug/qscintilla2_qt5.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - RENAME qscintilla2.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/qscintilla2.lib + COPYONLY ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(INSTALL + file(COPY ${RELEASE_DIR}/release/qscintilla2_qt5.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin ) - file(INSTALL + file(COPY ${DEBUG_DIR}/debug/qscintilla2_qt5.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin ) diff --git a/ports/qt5-3d/CONTROL b/ports/qt5-3d/CONTROL index 9213e035676..bcf523665fc 100644 --- a/ports/qt5-3d/CONTROL +++ b/ports/qt5-3d/CONTROL @@ -1,4 +1,4 @@ Source: qt5-3d -Version: 5.9.2-0 +Version: 5.11.2 Description: Qt5 3d Module - Functionality for near-realtime simulation systems with support for 2D and 3D rendering Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-3d/portfile.cmake b/ports/qt5-3d/portfile.cmake index 7de7bb5d555..e98d4da831d 100644 --- a/ports/qt5-3d/portfile.cmake +++ b/ports/qt5-3d/portfile.cmake @@ -2,4 +2,4 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qt3d 1c7dbd4e557cdd183ec6e929aae5727ce2ffcb519517942b588594bb81a78cb3d732cde4dae58085a70ec2968a8c2443eae96536125c25938222ff7c89f4f9a2) +qt_modular_library(qt3d 706aa7e9a43d50823e8cd1e4838417a44761d6391ca3f8bae54d371742789ee63ba36e219c0a66ad3957ae0d68ed8e58c13f56a5f151b2d09e2c99e986aea4fe) diff --git a/ports/qt5-activeqt/CONTROL b/ports/qt5-activeqt/CONTROL new file mode 100644 index 00000000000..2df3903301a --- /dev/null +++ b/ports/qt5-activeqt/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-activeqt +Version: 5.11.2 +Description: Qt5 ActiveQt Module - ActiveX components +Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-activeqt/portfile.cmake b/ports/qt5-activeqt/portfile.cmake new file mode 100644 index 00000000000..6f2e479a962 --- /dev/null +++ b/ports/qt5-activeqt/portfile.cmake @@ -0,0 +1,7 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtactiveqt 50027f3429a4e9f140e259f228ea46420284a9632bba3ed92b9b44fbc1c168b6b2d039986d6a07e17ae1afff4f0aec3ccfe8a660322449a3258ab251c1910135) + +#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/qt5-activeqt/platforminputcontexts) diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL index e0b9e0e1593..820137710a3 100644 --- a/ports/qt5-base/CONTROL +++ b/ports/qt5-base/CONTROL @@ -1,4 +1,4 @@ Source: qt5-base -Version: 5.9.2-6 +Version: 5.11.2-1 Description: Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components. Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion, openssl diff --git a/ports/qt5-base/configure_qt.cmake b/ports/qt5-base/configure_qt.cmake index 356361a9b43..aa3fe4aff1c 100644 --- a/ports/qt5-base/configure_qt.cmake +++ b/ports/qt5-base/configure_qt.cmake @@ -30,7 +30,8 @@ function(configure_qt) vcpkg_execute_required_process( COMMAND "${_csc_SOURCE_PATH}/${CONFIGURE_BAT}" ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} -debug - -prefix ${CURRENT_PACKAGES_DIR}/debug + -prefix ${CURRENT_INSTALLED_DIR}/debug + -extprefix ${CURRENT_PACKAGES_DIR}/debug -hostbindir ${CURRENT_PACKAGES_DIR}/debug/tools/qt5 -archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug -datadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug @@ -44,13 +45,14 @@ function(configure_qt) LOGNAME config-${TARGET_TRIPLET}-dbg ) message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") - + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) vcpkg_execute_required_process( COMMAND "${_csc_SOURCE_PATH}/${CONFIGURE_BAT}" ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} -release - -prefix ${CURRENT_PACKAGES_DIR} + -prefix ${CURRENT_INSTALLED_DIR} + -extprefix ${CURRENT_PACKAGES_DIR} -hostbindir ${CURRENT_PACKAGES_DIR}/tools/qt5 -archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5 -datadir ${CURRENT_PACKAGES_DIR}/share/qt5 @@ -64,4 +66,4 @@ function(configure_qt) ) message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") -endfunction() \ No newline at end of file +endfunction() diff --git a/ports/qt5-base/fix-system-pcre2-linux.patch b/ports/qt5-base/fix-system-pcre2-linux.patch index c5669a4c996..92bdf04cec8 100644 --- a/ports/qt5-base/fix-system-pcre2-linux.patch +++ b/ports/qt5-base/fix-system-pcre2-linux.patch @@ -1,17 +1,16 @@ -diff --git a/src/corelib/configure.json b/src/corelib/configure.json -index a5a1b66..5a48a05 100644 ---- a/src/corelib/configure.json -+++ b/src/corelib/configure.json -@@ -163,8 +163,10 @@ - "builds": { - "debug": "-lpcre2-16d", - "release": "-lpcre2-16" -- } -- } -+ }, -+ "condition": "config.win32" -+ }, -+ { "libs": "-lpcre2-16", "condition": "!config.win32" } - ] - }, - "pps": { +diff -Naur a/src/corelib/configure.json b/src/corelib/configure.json +--- a/src/corelib/configure.json 2018-08-23 02:58:54.544949500 -0400 ++++ b/src/corelib/configure.json 2018-08-23 02:59:31.481175300 -0400 +@@ -181,8 +181,10 @@ + "builds": { + "debug": "-lpcre2-16d", + "release": "-lpcre2-16" +- } +- } ++ }, ++ "condition": "config.win32" ++ }, ++ { "libs": "-lpcre2-16", "condition": "!config.win32" } + ] + }, + "pps": { diff --git a/ports/qt5-base/fix-system-pcre2.patch b/ports/qt5-base/fix-system-pcre2.patch index be401d448ec..5e8d4616e87 100644 --- a/ports/qt5-base/fix-system-pcre2.patch +++ b/ports/qt5-base/fix-system-pcre2.patch @@ -1,11 +1,10 @@ -diff --git a/src/corelib/configure.json b/src/corelib/configure.json -index a5b69a2..01c5cde 100644 ---- a/src/corelib/configure.json -+++ b/src/corelib/configure.json -@@ -159,7 +159,12 @@ - ] +diff -Naur a/src/corelib/configure.json b/src/corelib/configure.json +--- a/src/corelib/configure.json 2018-06-15 03:29:31.000000000 -0400 ++++ b/src/corelib/configure.json 2018-08-23 00:46:04.380187100 -0400 +@@ -177,7 +177,12 @@ }, "sources": [ + { "type": "pkgConfig", "args": "libpcre2-16" }, - "-lpcre2-16" + { + "builds": { diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index 569540213e5..b6d140f88cf 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -7,31 +7,31 @@ if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) ) endif() -if((NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") AND VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) include(configure_qt) include(install_qt) -set(SRCDIR_NAME "qtbase-5.9.2") -set(ARCHIVE_NAME "qtbase-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") +set(MAJOR_MINOR 5.11) +set(FULL_VERSION ${MAJOR_MINOR}.2) +set(ARCHIVE_NAME "qtbase-everywhere-src-${FULL_VERSION}.tar.xz") -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 a2f965871645256f3d019f71f3febb875455a29d03fccc7a3371ddfeb193b0af12394e779df05adf69fd10fe7b0d966f3915a24528ec7eb3bc36c2db6af2b6e7 + URLS "http://download.qt.io/official_releases/qt/${MAJOR_MINOR}/${FULL_VERSION}/submodules/${ARCHIVE_NAME}" + FILENAME ${ARCHIVE_NAME} + SHA512 b2f14126caa1c664887203a9a98551b85b57630cf7745c17f76e1e8aaf464f0091fe2de5615a138506dac7c8fbb16e5f33f984aef8e61e23f0c3bf74f6ef0835 +) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE_FILE}" + REF ${FULL_VERSION} + PATCHES + fix-system-freetype.patch + fix-system-pcre2.patch + fix-system-pcre2-linux.patch ) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() # Remove vendored dependencies to ensure they are not picked up by the build -foreach(DEPENDENCY freetype zlib harfbuzzng libjpeg libpng double-conversion) +foreach(DEPENDENCY freetype zlib harfbuzzng libjpeg libpng double-conversion sqlite) if(EXISTS ${SOURCE_PATH}/src/3rdparty/${DEPENDENCY}) file(REMOVE_RECURSE ${SOURCE_PATH}/src/3rdparty/${DEPENDENCY}) endif() @@ -39,14 +39,6 @@ endforeach() file(REMOVE_RECURSE ${SOURCE_PATH}/include/QtZlib) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - "${CMAKE_CURRENT_LIST_DIR}/fix-system-pcre2.patch" - "${CMAKE_CURRENT_LIST_DIR}/fix-system-freetype.patch" - "${CMAKE_CURRENT_LIST_DIR}/fix-system-pcre2-linux.patch" -) - # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") @@ -60,26 +52,31 @@ set(CORE_OPTIONS -system-pcre -system-harfbuzz -system-doubleconversion + -system-sqlite -no-fontconfig - -nomake examples -nomake tests + -nomake examples + -nomake tests ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND CORE_OPTIONS + -static + ) +else() + list(APPEND CORE_OPTIONS + -sql-sqlite + -sql-psql + ) +endif() + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - if(VCPKG_PLATFORM_TOOLSET MATCHES "v140") - set(PLATFORM "win32-msvc2015") - elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(PLATFORM "win32-msvc2017") - elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v120") - set(PLATFORM "win32-msvc2013") - endif() + set(PLATFORM "win32-msvc") + configure_qt( SOURCE_PATH ${SOURCE_PATH} PLATFORM ${PLATFORM} OPTIONS ${CORE_OPTIONS} - -sql-sqlite - -sql-psql - -system-sqlite -mp -opengl desktop # other options are "-no-opengl", "-opengl angle", and "-opengl desktop" LIBJPEG_LIBS="-ljpeg" @@ -87,12 +84,14 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore ZLIB_LIBS="-lzlib" LIBPNG_LIBS="-llibpng16" FREETYPE_LIBS="-lfreetype" + PSQL_LIBS="-llibpq" OPTIONS_DEBUG ZLIB_LIBS="-lzlibd" LIBPNG_LIBS="-llibpng16d" PSQL_LIBS="-llibpqd" FREETYPE_LIBS="-lfreetyped" ) + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") configure_qt( SOURCE_PATH ${SOURCE_PATH} @@ -167,6 +166,15 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib) 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) + + #--------------------------------------------------------------------------- + # Qt5Bootstrap: only used to bootstrap qmake dependencies + #--------------------------------------------------------------------------- + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Qt5Bootstrap.lib ${CURRENT_PACKAGES_DIR}/tools/qt5/Qt5Bootstrap.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Qt5Bootstrap.prl ${CURRENT_PACKAGES_DIR}/tools/qt5/Qt5Bootstrap.prl) + #--------------------------------------------------------------------------- endif() file(GLOB_RECURSE PRL_FILES "${CURRENT_PACKAGES_DIR}/lib/*.prl" "${CURRENT_PACKAGES_DIR}/debug/lib/*.prl") diff --git a/ports/qt5-base/qt_debug.conf b/ports/qt5-base/qt_debug.conf index 45cac7a4b4b..d0b17866161 100644 --- a/ports/qt5-base/qt_debug.conf +++ b/ports/qt5-base/qt_debug.conf @@ -6,7 +6,7 @@ Libraries = debug/lib Binaries = debug/tools/qt5 LibraryExecutables = debug/tools/qt5 Plugins = debug/plugins -Qml2Imports = qml +Qml2Imports = debug/qml Data = share/qt5/debug ArchData = share/qt5/debug HostData = share/qt5/debug diff --git a/ports/qt5-base/qtdeploy.ps1 b/ports/qt5-base/qtdeploy.ps1 index 26bd1025729..2161f69c8a5 100644 --- a/ports/qt5-base/qtdeploy.ps1 +++ b/ports/qt5-base/qtdeploy.ps1 @@ -9,17 +9,16 @@ # Note: this function signature and behavior is depended upon by applocal.ps1 function deployPluginsIfQt([string]$targetBinaryDir, [string]$QtPluginsDir, [string]$targetBinaryName) { - $baseDir = Split-Path $QtPluginsDir -parent $binDir = "$baseDir\bin" function deployPlugins([string]$pluginSubdirName) { if (Test-Path "$QtPluginsDir\$pluginSubdirName") { Write-Verbose " Deploying plugins directory '$pluginSubdirName'" - New-Item "$targetBinaryDir\$pluginSubdirName" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null + New-Item "$targetBinaryDir\plugins\$pluginSubdirName" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null Get-ChildItem "$QtPluginsDir\$pluginSubdirName\*.dll" | % { - deployBinary "$targetBinaryDir\$pluginSubdirName" "$QtPluginsDir\$pluginSubdirName" $_.Name - resolve $_ + deployBinary "$targetBinaryDir\plugins\$pluginSubdirName" "$QtPluginsDir\$pluginSubdirName" $_.Name + resolve "$targetBinaryDir\plugins\$pluginSubdirName\$($_.Name)" } } else { Write-Verbose " Skipping plugins directory '$pluginSubdirName': doesn't exist" @@ -27,33 +26,55 @@ function deployPluginsIfQt([string]$targetBinaryDir, [string]$QtPluginsDir, [str } # We detect Qt modules in use via the DLLs themselves. See qtModuleEntries in Qt to find the mapping. - if ($targetBinaryName -like "Qt5Gui*.dll") { + if ($targetBinaryName -match "Qt5Cored?.dll") { + if (!(Test-Path "$targetBinaryDir\qt.conf")) { + "[Paths]" | Out-File -encoding ascii "$targetBinaryDir\qt.conf" + } + } elseif ($targetBinaryName -match "Qt5Guid?.dll") { Write-Verbose " Deploying platforms" - New-Item "$targetBinaryDir\platforms" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null + New-Item "$targetBinaryDir\plugins\platforms" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null Get-ChildItem "$QtPluginsDir\platforms\qwindows*.dll" | % { - deployBinary "$targetBinaryDir\platforms" "$QtPluginsDir\platforms" $_.Name + deployBinary "$targetBinaryDir\plugins\platforms" "$QtPluginsDir\platforms" $_.Name } deployPlugins "accessible" deployPlugins "imageformats" deployPlugins "iconengines" deployPlugins "platforminputcontexts" - } elseif ($targetBinaryName -like "Qt5Network*.dll") { + } elseif ($targetBinaryName -match "Qt5Networkd?.dll") { deployPlugins "bearer" if (Test-Path "$binDir\libeay32.dll") { deployBinary "$targetBinaryDir" "$binDir" "libeay32.dll" deployBinary "$targetBinaryDir" "$binDir" "ssleay32.dll" } - } elseif ($targetBinaryName -like "Qt5Sql*.dll") { + } elseif ($targetBinaryName -match "Qt5Sqld?.dll") { deployPlugins "sqldrivers" - } elseif ($targetBinaryName -like "Qt5Multimedia*.dll") { + } elseif ($targetBinaryName -match "Qt5Multimediad?.dll") { deployPlugins "audio" deployPlugins "mediaservice" deployPlugins "playlistformats" - } elseif ($targetBinaryName -like "Qt5PrintSupport*.dll") { + } elseif ($targetBinaryName -match "Qt5PrintSupportd?.dll") { deployPlugins "printsupport" - } elseif ($targetBinaryName -like "Qt5Quick*.dll") { + } elseif ($targetBinaryName -match "Qt5Qmld?.dll") { + if(!(Test-Path "$targetBinaryDir\qml")) + { + if (Test-Path "$binDir\..\qml") { + cp -r "$binDir\..\qml" $targetBinaryDir + } elseif (Test-Path "$binDir\..\..\qml") { + cp -r "$binDir\..\..\qml" $targetBinaryDir + } else { + throw "FAILED" + } + } + } elseif ($targetBinaryName -match "Qt5Quickd?.dll") { + foreach ($a in @("Qt5QuickControls2", "Qt5QuickControls2d", "Qt5QuickTemplates2", "Qt5QuickTemplates2d")) + { + if (Test-Path "$binDir\$a.dll") + { + deployBinary "$targetBinaryDir" "$binDir" "$a.dll" + } + } deployPlugins "scenegraph" deployPlugins "qmltooling" } elseif ($targetBinaryName -like "Qt5Declarative*.dll") { diff --git a/ports/qt5-charts/CONTROL b/ports/qt5-charts/CONTROL index 6f71277b6fd..4a73bcdc434 100644 --- a/ports/qt5-charts/CONTROL +++ b/ports/qt5-charts/CONTROL @@ -1,4 +1,4 @@ Source: qt5-charts -Version: 5.9.2-0 +Version: 5.11.2 Description: Qt5 Charts Module - UI components for displaying charts, driven by static or dynamic data models Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-charts/portfile.cmake b/ports/qt5-charts/portfile.cmake index 45a53b63d31..fdf59fe17cf 100644 --- a/ports/qt5-charts/portfile.cmake +++ b/ports/qt5-charts/portfile.cmake @@ -2,4 +2,4 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtcharts 297547b565dd71b05237bb05ecc1abf1a774a4909668417e78bd65e805c1e47a456a5a06898fe06d4c4614118e4129e19893d4c77598667a9354ab969307a293) +qt_modular_library(qtcharts 19a9a0d78cba75d7ed237647c04237797b6002f9c6a4a08f4d4a90426bd44bdbde3f4ffc78dfafab3abb56faaef458a2577f5249200ad89e125e86049aafb85d) diff --git a/ports/qt5-datavis3d/CONTROL b/ports/qt5-datavis3d/CONTROL index cb4d7e393d2..34842f14d64 100644 --- a/ports/qt5-datavis3d/CONTROL +++ b/ports/qt5-datavis3d/CONTROL @@ -1,4 +1,4 @@ Source: qt5-datavis3d -Version: 5.9.2-0 +Version: 5.11.2 Description: Qt5 Data Visualization 3d Module - UI Components for creating 3D data visualizations Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-datavis3d/portfile.cmake b/ports/qt5-datavis3d/portfile.cmake index d7a552cbaaa..a74f82cd78a 100644 --- a/ports/qt5-datavis3d/portfile.cmake +++ b/ports/qt5-datavis3d/portfile.cmake @@ -2,4 +2,4 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtdatavis3d 5f173401ba2f0ebb4bbb1ff65053f1ece44a97a8bf1d9fc8d81540709c588e140c533d5f317d6a9109d538e38aa742d42bf00906f63d433811bc1c8526788dc3) +qt_modular_library(qtdatavis3d ec5599d95e30a9d6b4fbed53087aed4607a4ad5f8322610ec785c970a0c65b215344ec842c6c21791f27ec015610fca47e6af2608f2682ac2e6d114b0f0b80a8) diff --git a/ports/qt5-declarative/CONTROL b/ports/qt5-declarative/CONTROL index ad3ebf978a0..9de06547865 100644 --- a/ports/qt5-declarative/CONTROL +++ b/ports/qt5-declarative/CONTROL @@ -1,4 +1,4 @@ Source: qt5-declarative -Version: 5.9.2-0 +Version: 5.11.2 Description: Qt5 Declarative (Quick 2) Module. Includes QtQuick, QtQuickParticles, QtQuickWidgets, QtQml, and QtPacketProtocol. Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-declarative/portfile.cmake b/ports/qt5-declarative/portfile.cmake index 1075c9c72f3..7949ba8f8c7 100644 --- a/ports/qt5-declarative/portfile.cmake +++ b/ports/qt5-declarative/portfile.cmake @@ -2,6 +2,6 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtdeclarative 49b8b50932b73ea39da14ac3425044193dfd64eabceadba379aa01cf2fc141177f9870c387caf1cf93ce09e8b197828a54b8d9fcefc4d9cdf400a6c6dd9a9e90) +qt_modular_library(qtdeclarative 30d3ddfabceaf48666cb5ebc5c3a25318152daeed599b1a0a1b3c2feff353708de4760472babbe55a685582c0640a2789fa2fa239d151d17fe2b36950836f7ee) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/qt5-declarative/platforminputcontexts) \ No newline at end of file +#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/qt5-declarative/platforminputcontexts) \ No newline at end of file diff --git a/ports/qt5-gamepad/CONTROL b/ports/qt5-gamepad/CONTROL index 977b48a8e2d..68927e58c55 100644 --- a/ports/qt5-gamepad/CONTROL +++ b/ports/qt5-gamepad/CONTROL @@ -1,4 +1,4 @@ Source: qt5-gamepad -Version: 5.9.2-0 +Version: 5.11.2 Description: Qt5 Gamepad Module - Enables Qt applications to support the use of gamepad hardware Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-gamepad/portfile.cmake b/ports/qt5-gamepad/portfile.cmake index f4b81f4fd6c..9e97d17ea94 100644 --- a/ports/qt5-gamepad/portfile.cmake +++ b/ports/qt5-gamepad/portfile.cmake @@ -2,4 +2,4 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtgamepad 398d6ff0268460358584a4ea8ba0588881970dcc1dff6c5aa91d1630065ba112c86d7a1fe96dceb8ff301b350aef7f74ad1ee6212048a4cdfb26ff5d944d6222) +qt_modular_library(qtgamepad 65200780a7a27ca6fd6bd624b38c6568eacc2209816b3214ac2b63b5e510613cd492f846b5f67922aa5605eab1064e3e6ff060b610519e0546a0005736f55274) diff --git a/ports/qt5-graphicaleffects/CONTROL b/ports/qt5-graphicaleffects/CONTROL index caecc659937..f8c7d27cdcd 100644 --- a/ports/qt5-graphicaleffects/CONTROL +++ b/ports/qt5-graphicaleffects/CONTROL @@ -1,4 +1,4 @@ Source: qt5-graphicaleffects -Version: 5.9.2-0 +Version: 5.11.2 Description: Qt5 GraphicalEffects Module. Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-graphicaleffects/portfile.cmake b/ports/qt5-graphicaleffects/portfile.cmake index 372d62b6a7f..3b765d796ae 100644 --- a/ports/qt5-graphicaleffects/portfile.cmake +++ b/ports/qt5-graphicaleffects/portfile.cmake @@ -4,4 +4,4 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtgraphicaleffects 66464c26c9cc78763fda18898cd9c424bc4c0a5cbffc83d68d388e53327aeb77ae0e3c2c4cea947c3b6b7ec5af7bf5124492fc9642ff3c4ba75b06b9fa3883a4) +qt_modular_library(qtgraphicaleffects a76bc46e6442fb66d0f99056c527593ff6df1336f24644fc6d265f21c5be3ff9329cdebb8b677b8b29e3a49fc98b90c9a5838a991ae998b81cda21028826071f) diff --git a/ports/qt5-imageformats/CONTROL b/ports/qt5-imageformats/CONTROL index 0406f0027fe..f8cb675b9b5 100644 --- a/ports/qt5-imageformats/CONTROL +++ b/ports/qt5-imageformats/CONTROL @@ -1,4 +1,4 @@ Source: qt5-imageformats -Version: 5.9.2-0 +Version: 5.11.2 Description: Qt5 Image Formats Module - Plugins for additional image formats: TIFF, MNG, TGA, WBMP Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-imageformats/portfile.cmake b/ports/qt5-imageformats/portfile.cmake index ae3025b51ce..b87bebaeee5 100644 --- a/ports/qt5-imageformats/portfile.cmake +++ b/ports/qt5-imageformats/portfile.cmake @@ -2,6 +2,6 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtimageformats 5f1b93c0e5fffa4c2c063d14c12ad97114a452b16814ca9ac45f00ec36308a09770b3b4d137cb5d19bd3aa3a6f576724084df5d0dad75236d49868af9243c9d2) +qt_modular_library(qtimageformats 9de3fa9ff8b985a89806ad33ed276454429aada01119d8f36b7d571f01d23c42afd588353fe62d80cf6b9b83b6c91d53ccbf61ed1ec4d66ddc0ce4f5719bdca1) set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/qt5-modularscripts/CONTROL b/ports/qt5-modularscripts/CONTROL index fd3f723925a..09e07dd08d5 100644 --- a/ports/qt5-modularscripts/CONTROL +++ b/ports/qt5-modularscripts/CONTROL @@ -1,3 +1,3 @@ Source: qt5-modularscripts -Version: 3 +Version: 2018-11-01-1 Description: Vcpkg helpers to package qt5 modules diff --git a/ports/qt5-modularscripts/qt_modular_library.cmake b/ports/qt5-modularscripts/qt_modular_library.cmake index 1ead66d8370..4066a6b5146 100644 --- a/ports/qt5-modularscripts/qt_modular_library.cmake +++ b/ports/qt5-modularscripts/qt_modular_library.cmake @@ -8,24 +8,20 @@ function(qt_modular_library NAME HASH) ) endif() - if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") - endif() + set(MAJOR_MINOR 5.11) + set(FULL_VERSION ${MAJOR_MINOR}.2) + set(ARCHIVE_NAME "${NAME}-everywhere-src-${FULL_VERSION}.tar.xz") - set(SRCDIR_NAME "${NAME}-5.9.2") - set(ARCHIVE_NAME "${NAME}-opensource-src-5.9.2") - set(ARCHIVE_EXTENSION ".tar.xz") - - set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + URLS "http://download.qt.io/official_releases/qt/${MAJOR_MINOR}/${FULL_VERSION}/submodules/${ARCHIVE_NAME}" + FILENAME ${ARCHIVE_NAME} SHA512 ${HASH} ) - vcpkg_extract_source_archive(${ARCHIVE_FILE}) - if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) - endif() + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE_FILE}" + REF ${FULL_VERSION} + ) # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") @@ -61,9 +57,11 @@ function(qt_modular_library NAME HASH) file(GLOB_RECURSE MAKEFILES ${DEBUG_DIR}/*Makefile* ${RELEASE_DIR}/*Makefile*) - #Set the correct install directory to packages foreach(MAKEFILE ${MAKEFILES}) - vcpkg_replace_string(${MAKEFILE} "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}") + file(READ "${MAKEFILE}" _contents) + #Set the correct install directory to packages + string(REPLACE "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}" _contents "${_contents}") + file(WRITE "${MAKEFILE}" "${_contents}") endforeach() #Install the module files @@ -132,6 +130,8 @@ function(qt_modular_library NAME HASH) set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") endif() file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/qt5-multimedia/CONTROL b/ports/qt5-multimedia/CONTROL index 6e68c399de9..7c910ee27e7 100644 --- a/ports/qt5-multimedia/CONTROL +++ b/ports/qt5-multimedia/CONTROL @@ -1,4 +1,4 @@ Source: qt5-multimedia -Version: 5.9.2-0 +Version: 5.11.2 Description: Qt5 Multimedia Module - Classes and widgets for audio, video, radio and camera functionality Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-multimedia/portfile.cmake b/ports/qt5-multimedia/portfile.cmake index 878c2b150ff..f03f71183c1 100644 --- a/ports/qt5-multimedia/portfile.cmake +++ b/ports/qt5-multimedia/portfile.cmake @@ -2,4 +2,4 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtmultimedia b9fab874706440e97185475bfd0ad769c23d5ddbff5086cc0da9783777e81ed8140fb06fa0e7536ebfb67f2c9db39e1b9f3c2241834e74a9e1fb6ffd5cb7af11) +qt_modular_library(qtmultimedia f83c57ad35b713118d1d0ba27f78687aefa8f1ccd850be9b78a9c3477e0e9bb5f9a66bf39c2505f81987f0ca7d07dbc3f471d5efb4b9e4c21e41b308fc83040f) diff --git a/ports/qt5-networkauth/CONTROL b/ports/qt5-networkauth/CONTROL index 97cdfd865f1..bf8b15e0c8f 100644 --- a/ports/qt5-networkauth/CONTROL +++ b/ports/qt5-networkauth/CONTROL @@ -1,4 +1,4 @@ Source: qt5-networkauth -Version: 5.9.2-0 +Version: 5.11.2 Description: Qt5 Network Authorization Module Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-networkauth/portfile.cmake b/ports/qt5-networkauth/portfile.cmake index c9b9db47c6e..2a27d21e9d6 100644 --- a/ports/qt5-networkauth/portfile.cmake +++ b/ports/qt5-networkauth/portfile.cmake @@ -2,4 +2,4 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtnetworkauth 2e83eefd5db62aa1cdbe451b432ba1937541e435dcc35205d3bb9b947f2ac7e31663dc069a6cfad5bbf34e1fa799d519820f7ed61b9c247016611a533385bebf) \ No newline at end of file +qt_modular_library(qtnetworkauth f723e8af1ab511f090d1830bf42899ec51b4a027a91c58c46179c16c9e635a3c3f51c13faf943936074ad768407824e57161e28d872868daaed6254c15fc852d) diff --git a/ports/qt5-quickcontrols/CONTROL b/ports/qt5-quickcontrols/CONTROL index 1d77861b6c5..fc4fb902bfe 100644 --- a/ports/qt5-quickcontrols/CONTROL +++ b/ports/qt5-quickcontrols/CONTROL @@ -1,4 +1,4 @@ Source: qt5-quickcontrols -Version: 5.9.2-1 +Version: 5.11.2 Description: Qt5 QuickControls Module. Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-quickcontrols/portfile.cmake b/ports/qt5-quickcontrols/portfile.cmake index 98e491a230d..6b8983cf7cc 100644 --- a/ports/qt5-quickcontrols/portfile.cmake +++ b/ports/qt5-quickcontrols/portfile.cmake @@ -4,4 +4,4 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtquickcontrols fd5833bd3823e3a53b54ac542857af5bb109952035869ad0a151e807abc9d304ef5d3fa04b75df3b59faf0b95412f593d86b56198f96734f3a75b1620688ba4f) +qt_modular_library(qtquickcontrols 621101df5966d74232edfe0ab1130968cf311a73e020604a4b329b412062599ab5a0f4f95a4d4c2bb6c2f91143485cd760dd6efac573dbd74f787361a99d5d25) diff --git a/ports/qt5-quickcontrols2/CONTROL b/ports/qt5-quickcontrols2/CONTROL index b46022a10fd..f13d9df721c 100644 --- a/ports/qt5-quickcontrols2/CONTROL +++ b/ports/qt5-quickcontrols2/CONTROL @@ -1,4 +1,4 @@ Source: qt5-quickcontrols2 -Version: 5.9.2-1 +Version: 5.11.2 Description: Qt5 QuickControls2 Module. Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-quickcontrols2/portfile.cmake b/ports/qt5-quickcontrols2/portfile.cmake index 05a7dd6168d..7f96cf5a37a 100644 --- a/ports/qt5-quickcontrols2/portfile.cmake +++ b/ports/qt5-quickcontrols2/portfile.cmake @@ -2,4 +2,4 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtquickcontrols2 e283320aabbaa153067c909804cb34bbcbf6fcb7246bb214957b6092ceb0f01c4fae2efd9d7a6cb011274deafff4aaf0a45dbda06a3fdce1154622e48740048c) +qt_modular_library(qtquickcontrols2 94e8113feb222b85fa890fc65c59a371e29eb6838c2221b12d795d9809a605478f1c0b35a75b06bc67a02b3827dbb6bc4c4bf3fdd7485ee518cd0e5c409061a6) diff --git a/ports/qt5-script/CONTROL b/ports/qt5-script/CONTROL new file mode 100755 index 00000000000..2b49490c98c --- /dev/null +++ b/ports/qt5-script/CONTROL @@ -0,0 +1,3 @@ +Source: qt5-script +Version: 5.11.2 +Description:Qt5 Script Module. diff --git a/ports/qt5-script/portfile.cmake b/ports/qt5-script/portfile.cmake new file mode 100755 index 00000000000..9999ad6cf34 --- /dev/null +++ b/ports/qt5-script/portfile.cmake @@ -0,0 +1,5 @@ + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtscript b0b4badc78cdebb3b42fe91104d112afd3bf9d4ead962c58ececa1db3db7fae6d5368f94d940195e2791ebfd09c5d6d5d892e9c4e48d64ec77dd366eddb1ab00) diff --git a/ports/qt5-scxml/CONTROL b/ports/qt5-scxml/CONTROL index ed3f9381224..a00542c74b6 100644 --- a/ports/qt5-scxml/CONTROL +++ b/ports/qt5-scxml/CONTROL @@ -1,4 +1,4 @@ Source: qt5-scxml -Version: 5.9.2-0 +Version: 5.11.2 Description: Qt5 SCXML Module - Provides classes and tools for creating state machines from SCXML files and embedding them in applications Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-scxml/portfile.cmake b/ports/qt5-scxml/portfile.cmake index b0827216e0a..7680b6eb031 100644 --- a/ports/qt5-scxml/portfile.cmake +++ b/ports/qt5-scxml/portfile.cmake @@ -2,4 +2,4 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtscxml c33db992ab456e5dd8b9be65c5619c503048106bbb1839b0930f2d4df36eed0780dfa1fc2912d7758aa72195269e59cbe8826cbaa414c2f339ca66c565809c88) +qt_modular_library(qtscxml 4175d02224654a6a6b220f52937a22093be8b06e737f5575d4227b9038cb7c227f37eb17b7bb6878c16a34eae342c06e33cb2c356a389137e9f7d15886aa30ab) diff --git a/ports/qt5-serialport/CONTROL b/ports/qt5-serialport/CONTROL index 5887105d805..af03e1254df 100644 --- a/ports/qt5-serialport/CONTROL +++ b/ports/qt5-serialport/CONTROL @@ -1,4 +1,4 @@ Source: qt5-serialport -Version: 5.9.2-0 +Version: 5.11.2 Description: Qt5 Serial Port - provides access to hardware and virtual serial ports Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-serialport/portfile.cmake b/ports/qt5-serialport/portfile.cmake index f4a42f38f5e..daf037cdb9d 100644 --- a/ports/qt5-serialport/portfile.cmake +++ b/ports/qt5-serialport/portfile.cmake @@ -2,4 +2,4 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtserialport cc8899c1ae2ed9fd8cf1c213ab7efaec12b3b16836006fdbf74cb7ea457705505a13e82c2f2873ee9426ae66473ec42259f4e728de64576ee44420f116cc433d) +qt_modular_library(qtserialport babf89583fc025de511601f608300a01453e06c2eebe51c0d3cad3eb9c8179fa9cf9982690306ffaf7ce0a0abb7174ae0078a1fd36f6a34a2d5277bff9d4ea9d) diff --git a/ports/qt5-speech/CONTROL b/ports/qt5-speech/CONTROL index 44b8324f557..1f4c2420c60 100644 --- a/ports/qt5-speech/CONTROL +++ b/ports/qt5-speech/CONTROL @@ -1,4 +1,4 @@ Source: qt5-speech -Version: 5.9.2-0 +Version: 5.11.2 Description: Qt5 Speech Module -Build-Depends: qt5-modularscripts, qt5-base, atlmfc +Build-Depends: qt5-modularscripts, qt5-base, atlmfc (windows) diff --git a/ports/qt5-speech/portfile.cmake b/ports/qt5-speech/portfile.cmake index 8a271b28958..b1d36265be3 100644 --- a/ports/qt5-speech/portfile.cmake +++ b/ports/qt5-speech/portfile.cmake @@ -2,4 +2,4 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtspeech 8213ad13d33732fee3fc5b5e408b870970a3003d461be24195222e1d1209210039d1d0cd2f3c537a0db62629fb297d88b33ed4734ecb6c8d74f5406a87e7e0c0) +qt_modular_library(qtspeech b3e433b308c6c3454e40e7e19a075d1bd181a33ecea9c8f970852251488c12d1227e0b92aaeb6f7f75ac0efcb04bbe22c49562c594d8b9773528a2aaf73f8d02) diff --git a/ports/qt5-svg/CONTROL b/ports/qt5-svg/CONTROL index 71abad30c69..d88bb174245 100644 --- a/ports/qt5-svg/CONTROL +++ b/ports/qt5-svg/CONTROL @@ -1,4 +1,4 @@ Source: qt5-svg -Version: 5.9.2-0 +Version: 5.11.2 Description: Qt5 SVG Module - provides classes for displaying the contents of SVG files Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-svg/portfile.cmake b/ports/qt5-svg/portfile.cmake index 83283d37699..0de3de3fda4 100644 --- a/ports/qt5-svg/portfile.cmake +++ b/ports/qt5-svg/portfile.cmake @@ -2,4 +2,4 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtsvg c21c5a12fa10ff9f91deda88c99c995ee2138bdffa21c793b0c42f25155f01f87ede5206624b9d82713649f8cf1cfdb95f1d5b7e792de62f3848d3a9ec665fdd) +qt_modular_library(qtsvg d6b83bc0c4b348f65890fbb4cd4df81828fb1ef88192c13b06dca695fe499d65da6a52ba57ca289aa31f035309f10af90593cd9ee17362219cfd1337cc801c57) diff --git a/ports/qt5-tools/CONTROL b/ports/qt5-tools/CONTROL index 9f3bdaf6d26..81df6926722 100644 --- a/ports/qt5-tools/CONTROL +++ b/ports/qt5-tools/CONTROL @@ -1,4 +1,4 @@ Source: qt5-tools -Version: 5.9.2-0 +Version: 5.11.2 Description: Qt5 Tools Module; Includes deployment tools and helpers, Qt Designer, Assistant, and other applications Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-tools/portfile.cmake b/ports/qt5-tools/portfile.cmake index a79a1b1348d..8c7d0c0477a 100644 --- a/ports/qt5-tools/portfile.cmake +++ b/ports/qt5-tools/portfile.cmake @@ -2,6 +2,6 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qttools afce063e167de96dfa264cfd27dc8d80c23ef091a30f4f8119575cae83f39716c3b332427630b340f518b82d6396cca1893f28e00f3c667ba201d7e4fc2aefe1) +qt_modular_library(qttools a950a3c1d8e6e92ba200e6834d1f88b8b98b91e3ab2e238aa4d229248f19103e38a06f0a81304ebdae70b96a60c87fdea8caae0181d2114da3e20e9148d08be5) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}//tools/qt5-tools/platforminputcontexts) \ No newline at end of file +#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/qt5-tools/platforminputcontexts) \ No newline at end of file diff --git a/ports/qt5-virtualkeyboard/CONTROL b/ports/qt5-virtualkeyboard/CONTROL index 6fff91b58ce..ebdb2762328 100644 --- a/ports/qt5-virtualkeyboard/CONTROL +++ b/ports/qt5-virtualkeyboard/CONTROL @@ -1,4 +1,4 @@ Source: qt5-virtualkeyboard -Version: 5.9.2-0 +Version: 5.11.2 Description: Qt5 Virtual Keyboard Module - A framework for implementing different input methods. Supports localized keyboard layouts and custom visual themes Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-virtualkeyboard/portfile.cmake b/ports/qt5-virtualkeyboard/portfile.cmake index cceed38949c..210997bfc15 100644 --- a/ports/qt5-virtualkeyboard/portfile.cmake +++ b/ports/qt5-virtualkeyboard/portfile.cmake @@ -2,6 +2,6 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtvirtualkeyboard f8c39b789e877e60389ee9aab4a5c17e6018093f72fc57f526ce2584183135206306d4d5a7c7551a6de45969aa6f55444bb39f4ea3324cdf10611533f0bc2b22) +qt_modular_library(qtvirtualkeyboard 1a471a719771c3a07b8d7b524692bdd085eae1787b8e91f523b224c260bc950b514ce88d885bbbe90c1556619bae15c59debfb221ec01042885d71443e046912) set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/qt5-websockets/CONTROL b/ports/qt5-websockets/CONTROL index 2f43b9d2cf1..e10c241d031 100644 --- a/ports/qt5-websockets/CONTROL +++ b/ports/qt5-websockets/CONTROL @@ -1,4 +1,4 @@ Source: qt5-websockets -Version: 5.9.2-0 +Version: 5.11.2 Description: Qt5 Web Sockets Module - provides WebSocket communication compliant with RFC 6455 Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-websockets/portfile.cmake b/ports/qt5-websockets/portfile.cmake index 98442f4c087..67ea215f306 100644 --- a/ports/qt5-websockets/portfile.cmake +++ b/ports/qt5-websockets/portfile.cmake @@ -2,4 +2,4 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtwebsockets 9330d6806251bc77d4c2a497a31b1b0e42a1e6bfe3ea7c00cee123052e9e1f9080e33cf4dfcd6ee6e4732c62f41257a77ec25ad607528f4e8ebe61ccaee3e159) +qt_modular_library(qtwebsockets 28fb4442a5e00c1aad8f7d3e9c6828030a76d7e396b1ecc7743925fb3981a2d900df9c25cbeecf3247d8d6a54a11083d979681cff1171bb0b680584e954e8fc3) diff --git a/ports/qt5-winextras/CONTROL b/ports/qt5-winextras/CONTROL index d00ad7a0c78..5b937707710 100644 --- a/ports/qt5-winextras/CONTROL +++ b/ports/qt5-winextras/CONTROL @@ -1,4 +1,4 @@ Source: qt5-winextras -Version: 5.9.2-0 +Version: 5.11.2 Description: Qt5 Windows Extras Module. Provides platform-specific APIs for Windows. Build-Depends: qt5-modularscripts, qt5-base, atlmfc diff --git a/ports/qt5-winextras/portfile.cmake b/ports/qt5-winextras/portfile.cmake index 692683adfed..adc3bdbe1d2 100644 --- a/ports/qt5-winextras/portfile.cmake +++ b/ports/qt5-winextras/portfile.cmake @@ -2,4 +2,4 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtwinextras dbfb89833cc291fade8e9fe2ad9c7b7a78c2032de8dcbca1049d637f829811b99e1852ae39ca73a6eac2960df168765bee28023bb723e69c87e2f3bb50b7ef02) +qt_modular_library(qtwinextras ac9ca4d188f7dadbdd124321cba39fb159f9225c23ab955c06ff3939080065a5e8f176f34504c59ae5fee602328550487187ed0648e7896dcd6bed698a6b45d8) diff --git a/ports/qt5-xmlpatterns/CONTROL b/ports/qt5-xmlpatterns/CONTROL index 5fcec19be37..21e0069ab3d 100644 --- a/ports/qt5-xmlpatterns/CONTROL +++ b/ports/qt5-xmlpatterns/CONTROL @@ -1,4 +1,4 @@ Source: qt5-xmlpatterns -Version: 5.9.2-0 +Version: 5.11.2 Description: Qt5 XML Patterns Module - Support for XPath, XQuery, XSLT and XML schema validation Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-xmlpatterns/portfile.cmake b/ports/qt5-xmlpatterns/portfile.cmake index 6fbc6953862..6484f4610fa 100644 --- a/ports/qt5-xmlpatterns/portfile.cmake +++ b/ports/qt5-xmlpatterns/portfile.cmake @@ -2,4 +2,4 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -qt_modular_library(qtxmlpatterns c14dbd97988473ba73b4e21352c5560278aa4dbfdf2be1d12e9119c0b5dbe8a0e4eff9a682052024a01bb21dcf52d40ba00da98947901fb91518af92a225da83) +qt_modular_library(qtxmlpatterns f659de3da93f83a215914a35b32dcd7d585cabae30044e8d512cbf2a29514043b18ad512e18e6de5b99546ddee2475d807f42e51baa46f15488841314372b26f) diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL index dc34eee953f..9f3ea377852 100644 --- a/ports/qt5/CONTROL +++ b/ports/qt5/CONTROL @@ -1,4 +1,4 @@ Source: qt5 -Version: 5.9.2-1 +Version: 5.11.2 Description: Qt5 Application Framework Build-Depends: qt5-base, qt5-charts, qt5-datavis3d, qt5-declarative, qt5-gamepad, qt5-graphicaleffects, qt5-imageformats, qt5-multimedia, qt5-networkauth, qt5-quickcontrols, qt5-quickcontrols2, qt5-scxml, qt5-serialport, qt5-speech, qt5-svg, qt5-tools, qt5-virtualkeyboard, qt5-websockets, qt5-3d, qt5-winextras, qt5-xmlpatterns \ No newline at end of file diff --git a/ports/qwt/CONTROL b/ports/qwt/CONTROL index 383ac11cee6..fad52600fdf 100644 --- a/ports/qwt/CONTROL +++ b/ports/qwt/CONTROL @@ -1,4 +1,4 @@ Source: qwt -Version: 6.1.3-5 +Version: 6.1.3-6 Description: Qt widgets library for technical applications Build-Depends: qt5-base, qt5-svg, qt5-tools diff --git a/ports/range-v3-vs2015/CONTROL b/ports/range-v3-vs2015/CONTROL new file mode 100644 index 00000000000..62c9f63cedf --- /dev/null +++ b/ports/range-v3-vs2015/CONTROL @@ -0,0 +1,3 @@ +Source: range-v3-vs2015 +Version: 20151130-vcpkg5 +Description: Range library for C++11/14/17. diff --git a/ports/range-v3-vs2015/portfile.cmake b/ports/range-v3-vs2015/portfile.cmake new file mode 100644 index 00000000000..bc7153a534a --- /dev/null +++ b/ports/range-v3-vs2015/portfile.cmake @@ -0,0 +1,14 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/Range-V3-VS2015 + REF 423bcae5cf18948591361329784d3b12ef41711b + SHA512 c6756bc6b5131c4c0ffb96550fb40decf734fc8c30e3d51c5c2bf03aae4d7426de36e896a1abf0a200a49a3906d4b60c1cf52f43504554b64d89c91de3e92746 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/range-v3-vs2015) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/range-v3-vs2015/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/range-v3-vs2015/copyright) +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp") +vcpkg_copy_pdbs() diff --git a/ports/range-v3/CONTROL b/ports/range-v3/CONTROL index 6325b3a555b..076c7121128 100644 --- a/ports/range-v3/CONTROL +++ b/ports/range-v3/CONTROL @@ -1,3 +1,3 @@ Source: range-v3 -Version: 20151130-vcpkg5 +Version: 0.4.0-20181129 Description: Range library for C++11/14/17. diff --git a/ports/range-v3/portfile.cmake b/ports/range-v3/portfile.cmake index b4c0c14033f..f7577c9bb94 100644 --- a/ports/range-v3/portfile.cmake +++ b/ports/range-v3/portfile.cmake @@ -1,28 +1,30 @@ -#header-only library include(vcpkg_common_functions) -# set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/range-v3-6eb5c831ffe12cd5cb96390dbe917ca1b248772d) -# vcpkg_download_distfile(ARCHIVE -# URLS "https://github.com/ericniebler/range-v3/archive/6eb5c831ffe12cd5cb96390dbe917ca1b248772d.zip" -# FILENAME "range-v3-6eb5c831ffe12cd5cb96390dbe917ca1b248772d.zip" -# SHA512 2605af46c2c049f66dc982b1c4e506a8f115d47cc6c61a80f08921c667e52ad3097c485280ee43711c84b84a1490929e085b89cf9ad4c83b93222315210e92aa -# ) -# vcpkg_download_distfile(DIFF -# URLS "https://github.com/Microsoft/Range-V3-VS2015/compare/fork_base...00ed689bac7a9dcd8601dbde382758675516799d.diff" -# FILENAME "range-v3-fork_base_to_00ed689bac7a9dcd8601dbde382758675516799d.diff" -# SHA512 6158cd9ee1f5957294a26dc780c881839e0bae8610688a618cd11d47df34d5e543fa09ac9a3b33d4a65af8eceae0a6a3055621206c291ef75f982e7915daf91a -# ) -# vcpkg_extract_source_archive(${ARCHIVE}) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO Microsoft/Range-V3-VS2015 - REF 423bcae5cf18948591361329784d3b12ef41711b - SHA512 c6756bc6b5131c4c0ffb96550fb40decf734fc8c30e3d51c5c2bf03aae4d7426de36e896a1abf0a200a49a3906d4b60c1cf52f43504554b64d89c91de3e92746 + REPO ericniebler/range-v3 + REF cf8add9f467aac695b9fa38e168b90df36b1a806 + SHA512 92b1c09a423f6672b710abfde886b28d789a030f0f5db1c340ab75eead4abcf1a8b213adeb197af92747678873b1cae62362ee878c2a6bb38e532b0e83ac7bb2 HEAD_REF master ) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DRANGE_V3_TESTS=OFF + -DRANGE_V3_EXAMPLES=OFF + -DRANGE_V3_PERF=OFF + -DRANGE_V3_HEADER_CHECKS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/range-v3) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +vcpkg_copy_pdbs() + file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/range-v3) file(RENAME ${CURRENT_PACKAGES_DIR}/share/range-v3/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/range-v3/copyright) -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp") -vcpkg_copy_pdbs() diff --git a/ports/rapidcheck/CONTROL b/ports/rapidcheck/CONTROL new file mode 100644 index 00000000000..67c82313c24 --- /dev/null +++ b/ports/rapidcheck/CONTROL @@ -0,0 +1,3 @@ +Source: rapidcheck +Version: 2018-11-05-1 +Description: A property-based testing library for C++ (a la QuickCheck) with the goal of being simple to use with as little boilerplate as possible. diff --git a/ports/rapidcheck/portfile.cmake b/ports/rapidcheck/portfile.cmake new file mode 100644 index 00000000000..bdebdb656d4 --- /dev/null +++ b/ports/rapidcheck/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO emil-e/rapidcheck + REF cf9e0d8bd8c94e9dc00dc0ab302352bfaf1a3ac5 + SHA512 6cef62edbda391c3527d63db350842f669841ad2c751a64773250cd40bb65f26c2c394b107ef5530c2d3bd15b7079148fa9778d68a7346225bbb15227b1553c5 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DRC_INSTALL_ALL_EXTRAS=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/rapidcheck/cmake) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/rapidcheck/copyright COPYONLY) + +# Post-build test for cmake libraries +vcpkg_test_cmake(PACKAGE_NAME rapidcheck) diff --git a/ports/rapidjson/CONTROL b/ports/rapidjson/CONTROL index 7646755a549..5e7d4e5cf8a 100644 --- a/ports/rapidjson/CONTROL +++ b/ports/rapidjson/CONTROL @@ -1,3 +1,3 @@ Source: rapidjson -Version: 1.1.0-1 +Version: 1.1.0-2 Description: A fast JSON parser/generator for C++ with both SAX/DOM style API diff --git a/ports/rapidjson/arm64-endian.patch b/ports/rapidjson/arm64-endian.patch new file mode 100644 index 00000000000..81fd9213229 --- /dev/null +++ b/ports/rapidjson/arm64-endian.patch @@ -0,0 +1,13 @@ +diff --git a/include/rapidjson/rapidjson.h b/include/rapidjson/rapidjson.h +index 053b2ce..1e0b8f3 100644 +--- a/include/rapidjson/rapidjson.h ++++ b/include/rapidjson/rapidjson.h +@@ -236,7 +236,7 @@ + # define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN + # elif defined(__i386__) || defined(__alpha__) || defined(__ia64) || defined(__ia64__) || defined(_M_IX86) || defined(_M_IA64) || defined(_M_ALPHA) || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || defined(__bfin__) + # define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN +-# elif defined(_MSC_VER) && defined(_M_ARM) ++# elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64)) + # define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN + # elif defined(RAPIDJSON_DOXYGEN_RUNNING) + # define RAPIDJSON_ENDIAN diff --git a/ports/rapidjson/portfile.cmake b/ports/rapidjson/portfile.cmake index 4f87ed6f448..45686aab042 100644 --- a/ports/rapidjson/portfile.cmake +++ b/ports/rapidjson/portfile.cmake @@ -7,6 +7,7 @@ vcpkg_from_github( REF v1.1.0 SHA512 2e82a4bddcd6c4669541f5945c2d240fb1b4fdd6e239200246d3dd50ce98733f0a4f6d3daa56f865d8c88779c036099c52a9ae85d47ad263686b68a88d832dff HEAD_REF master + PATCHES arm64-endian.patch ) # Use RapidJSON's own build process, skipping examples and tests diff --git a/ports/rapidjson/usage b/ports/rapidjson/usage index 81e541e17b0..b72b8e3d695 100644 --- a/ports/rapidjson/usage +++ b/ports/rapidjson/usage @@ -1,4 +1,4 @@ The package rapidjson provides CMake integration: - find_package(RapidJSON REQUIRED) + find_package(RapidJSON CONFIG REQUIRED) target_include_directories(main PRIVATE ${RAPIDJSON_INCLUDE_DIRS}) diff --git a/ports/re2/CONTROL b/ports/re2/CONTROL index 0a1a4fb1d68..6e82bc86eaf 100644 --- a/ports/re2/CONTROL +++ b/ports/re2/CONTROL @@ -1,3 +1,3 @@ -Source: re2 -Version: 2018-03-17 +Source: re2 +Version: 2018-11-01-1 Description: RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library. \ No newline at end of file diff --git a/ports/re2/portfile.cmake b/ports/re2/portfile.cmake index cec69eb6afc..b5689944b2a 100644 --- a/ports/re2/portfile.cmake +++ b/ports/re2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/re2 - REF f2cc1aeb5de463c45d020c446cbcb028385b49f3 - SHA512 68df93cac6916cf5d944b57de505f7c592dcc66bbe003dbaffdf88cfd6648787a272740a861d8c8440ff2888434776141a7710b326907687285f8e9340be127c + REF d9cebde0175aa1ffd38aab9a395a038464d55ce7 + SHA512 820ebc96f6cc583e50bdd637b8bf6b4e8ef6be5a74a49174bf845d037f0dd21ee3b1fbc220bc3cbbd6987205195b6c0990040f43da723f90038a20690a7553ff HEAD_REF master ) @@ -15,6 +15,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_copy_pdbs() + # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/re2 RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/readerwriterqueue/CONTROL b/ports/readerwriterqueue/CONTROL new file mode 100644 index 00000000000..f02b34f1e79 --- /dev/null +++ b/ports/readerwriterqueue/CONTROL @@ -0,0 +1,3 @@ +Source: readerwriterqueue +Version: 1.0.0 +Description: A single-producer, single-consumer lock-free queue diff --git a/ports/readerwriterqueue/portfile.cmake b/ports/readerwriterqueue/portfile.cmake new file mode 100644 index 00000000000..46fd0a8cae6 --- /dev/null +++ b/ports/readerwriterqueue/portfile.cmake @@ -0,0 +1,15 @@ +# header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cameron314/readerwriterqueue + REF v1.0.0 + SHA512 3bb8320e35e8911350df1bd5349e006f85cbd0863cc2bb8ac1912aaf7a5686f42966b7508a845cfdca280ab65a308148315c987ef333d74b6d085638dd6d8578 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/readerwriterqueue RENAME copyright) + +file(GLOB HEADER_FILES ${SOURCE_PATH}/*.h) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/readline-win32/CMakeLists.txt b/ports/readline-win32/CMakeLists.txt new file mode 100644 index 00000000000..ac062d0dc9c --- /dev/null +++ b/ports/readline-win32/CMakeLists.txt @@ -0,0 +1,56 @@ +cmake_minimum_required(VERSION 3.0) +project(readline C) + +add_definitions(-DREADLINE_LIBRARY) +add_definitions(-DHAVE_CONFIG_H) +add_definitions(-D_CRT_SECURE_NO_WARNINGS) + +if(BUILD_SHARED_LIBS) + add_definitions(-DBUILD_READLINE_DLL) +else() + add_definitions(-DREADLINE_STATIC) +endif() + +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} # thats where the config.h is located +) + +add_library(readline + readline.c + funmap.c + keymaps.c + vi_mode.c + parens.c + rltty.c + complete.c + bind.c + isearch.c + display.c + signals.c + util.c + kill.c + undo.c + macro.c + input.c + callback.c + terminal.c + xmalloc.c + history.c + histsearch.c + histexpand.c + histfile.c + nls.c + search.c + shell.c + savestring.c + tilde.c + text.c + misc.c + compat.c + mbutil.c + support/wcwidth.c) + +install(TARGETS readline + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) diff --git a/ports/readline-win32/CONTROL b/ports/readline-win32/CONTROL new file mode 100644 index 00000000000..d04614bacdd --- /dev/null +++ b/ports/readline-win32/CONTROL @@ -0,0 +1,3 @@ +Source: readline-win32 +Version: 5.0-2 +Description: Implementation of readline for Windows Desktop provided by https://github.com/lltcggie \ No newline at end of file diff --git a/ports/readline-win32/config.h b/ports/readline-win32/config.h new file mode 100644 index 00000000000..de0a352fe56 --- /dev/null +++ b/ports/readline-win32/config.h @@ -0,0 +1,58 @@ +#define RETSIGTYPE void +#define VOID_SIGHANDLER 1 +#define PROTOTYPES 1 +#define HAVE_ISASCII 1 +#define HAVE_ISXDIGIT 1 +#define HAVE_MBRLEN 1 +#define HAVE_MBRTOWC 1 +#define HAVE_MBRTOWC 1 +#define HAVE_MBSRTOWCS 1 +#define HAVE_MEMMOVE 1 +#define HAVE_PUTENV 1 +#define HAVE_SETENV 1 +#define HAVE_SETLOCALE 1 +#define HAVE_STRCOLL 1 +#define STRCOLL_BROKEN 1 +#define HAVE_STRPBRK 1 +#define HAVE_TCGETATTR 1 +#define HAVE_VSNPRINTF 1 +#define HAVE_WCTOMB 1 +#define HAVE_WCWIDTH 1 +#define STDC_HEADERS 1 +#define HAVE_LANGINFO_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_LOCALE_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STDARG_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_TERMIOS_H 1 +#define HAVE_WCHAR_H 1 +#define HAVE_WCTYPE_H 1 +#define HAVE_MBSTATE_T 1 +#define HAVE_LANGINFO_CODESET 1 +#define VOID_SIGHANDLER 1 +#define STRUCT_WINSIZE_IN_SYS_IOCTL 1 +#define HAVE_GETPW_DECLS 1 +#define MUST_REINSTALL_SIGHANDLERS 1 +#define CTYPE_NON_ASCII 1 + +/* Ultrix botches type-ahead when switching from canonical to + non-canonical mode, at least through version 4.3 */ +#if !defined (HAVE_TERMIOS_H) || !defined (HAVE_TCGETATTR) || defined (ultrix) +# define TERMIOS_MISSING +#endif + +#if defined (STRCOLL_BROKEN) +# define HAVE_STRCOLL 1 +#endif + +#if defined (__STDC__) && defined (HAVE_STDARG_H) +# define PREFER_STDARG +# define USE_VARARGS +#else +# if defined (HAVE_VARARGS_H) +# define PREFER_VARARGS +# define USE_VARARGS +# endif +#endif diff --git a/ports/readline-win32/portfile.cmake b/ports/readline-win32/portfile.cmake new file mode 100644 index 00000000000..51ad377e77a --- /dev/null +++ b/ports/readline-win32/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lltcggie/readline + REF ea414b4e98475e3976198738061824e8a8379a50 + SHA512 82d54ab3e19fb2673fe97eff07117d36704791669baa283ec737c704635f872e4c7cd30485a6648d445cb2912e4364286e664e9425444f456a4c862b9e4de843 + HEAD_REF master +) + +set(SOURCE_PATH "${SOURCE_PATH}/src/readline/5.0/readline-5.0-src") + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Copy headers +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include/readline) +file(GLOB headers "${SOURCE_PATH}/*.h") +file(COPY ${headers} DESTINATION ${CURRENT_PACKAGES_DIR}/include/readline) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/readline/CONTROL b/ports/readline/CONTROL new file mode 100644 index 00000000000..4fdb10939fb --- /dev/null +++ b/ports/readline/CONTROL @@ -0,0 +1,4 @@ +Source: readline +Version: 0 +Description: GNU readline and history libraries +Build-Depends: readline-win32 (windows) diff --git a/ports/readline/portfile.cmake b/ports/readline/portfile.cmake new file mode 100644 index 00000000000..45db4f37a1f --- /dev/null +++ b/ports/readline/portfile.cmake @@ -0,0 +1,5 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "No implementation of readline is currently available for UWP targets") +endif() + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/realsense2/CONTROL b/ports/realsense2/CONTROL index f87152bc6ad..959292d5c34 100644 --- a/ports/realsense2/CONTROL +++ b/ports/realsense2/CONTROL @@ -1,5 +1,5 @@ Source: realsense2 -Version: 2.10.4 +Version: 2.16.1 Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). Feature: tools diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake index 6a02259ba98..e6073099ce2 100644 --- a/ports/realsense2/portfile.cmake +++ b/ports/realsense2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO IntelRealSense/librealsense - REF v2.10.4 - SHA512 35580cd4ab65b85eb7fcebac3be629960993223437e3c44b0bcc2f7572d85231e822a922b2f5e22480fcc1edb9295ab2c5893794d638c2ab6faf49a9eea57603 + REF v2.16.1 + SHA512 e030f7b1833db787b8976ead734535fb2209a19317d74d4f68bd8f8cae38abe2343d584e88131a1a66bf6f9f1c0a17bc2c64540841a74cf6300fecf3e69f9dff HEAD_REF development ) diff --git a/ports/redshell/CONTROL b/ports/redshell/CONTROL deleted file mode 100644 index adb34e49076..00000000000 --- a/ports/redshell/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: redshell -Version: 1.1.2 -Description: RedShell C++ SDK. Steam attribution tracking, www.redshell.io -# Built-Using: openssl (= 1.0.2m), cpprestsdk (= 2.10.0), boost (= 1.65.1-3), websocketpp (= 0.7.0-1), zlib (= 1.2.11-3), bzip2 (= 1.0.6-2) diff --git a/ports/redshell/portfile.cmake b/ports/redshell/portfile.cmake deleted file mode 100644 index 52d5c105e19..00000000000 --- a/ports/redshell/portfile.cmake +++ /dev/null @@ -1,64 +0,0 @@ -include(vcpkg_common_functions) - -if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm) - message(FATAL_ERROR "Error: redshell does not support the ARM architecture.") -endif() - -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "Error: redshell does not support UWP builds.") -endif() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - message("Redshell only supports dynamic library linkage") - set(VCPKG_LIBRARY_LINKAGE "dynamic") -endif() - -if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") - message(FATAL_ERROR "Redshell only supports dynamic CRT linkage") -endif() - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/redshell) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO Innervate/red-shell-cpp - REF 1.1.2 - SHA512 9e0705508928efed5ae5c216316cb0429090cd7131ca7993f585eaf26bccd1e18b93dfeaff0406c64921b06c8312c0d147024af1c29e6003ff35556cda36e57c - HEAD_REF master -) - -# Header .h -file(COPY - "${SOURCE_PATH}/include/RedShell.h" - DESTINATION ${CURRENT_PACKAGES_DIR}/include/redshell -) - -# Debug .lib -file(COPY - "${SOURCE_PATH}/lib/${VCPKG_TARGET_ARCHITECTURE}/debug/RedShell.lib" - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib -) - -# Release .lib -file(COPY - "${SOURCE_PATH}/lib/${VCPKG_TARGET_ARCHITECTURE}/RedShell.lib" - DESTINATION ${CURRENT_PACKAGES_DIR}/lib -) - -# Debug .dll -file(COPY - "${SOURCE_PATH}/bin/${VCPKG_TARGET_ARCHITECTURE}/debug/RedShell.dll" - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin -) - -# Release .dll -file(COPY - "${SOURCE_PATH}/bin/${VCPKG_TARGET_ARCHITECTURE}/RedShell.dll" - DESTINATION ${CURRENT_PACKAGES_DIR}/bin -) - -# Copyright -file(COPY - "${SOURCE_PATH}/LICENSE.txt" - DESTINATION ${CURRENT_PACKAGES_DIR}/share/redshell/copyright -) diff --git a/ports/reproc/CONTROL b/ports/reproc/CONTROL new file mode 100644 index 00000000000..14b08a4163b --- /dev/null +++ b/ports/reproc/CONTROL @@ -0,0 +1,3 @@ +Source: reproc +Version: v1.0.0 +Description: Cross-platform library that simplifies working with external CLI applications from C and C++ diff --git a/ports/reproc/portfile.cmake b/ports/reproc/portfile.cmake new file mode 100644 index 00000000000..54c0cc70c6f --- /dev/null +++ b/ports/reproc/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO DaanDeMeyer/reproc + REF v1.0.0 + SHA512 f567de9d6cd8bca0b34f1f48231a59c6698730c5b63f1d733de14fecf09991de74e4b3a99cc98ae7f62dcba8b2b7831d5e617fd32ca38b296b9073bc07fb2d92 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DREPROC_BUILD_CXX_WRAPPER=ON + -DREPROC_INSTALL=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/reproc) + + +# Debug +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle License +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/reproc) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/reproc/LICENSE ${CURRENT_PACKAGES_DIR}/share/reproc/copyright) \ No newline at end of file diff --git a/ports/restbed/CONTROL b/ports/restbed/CONTROL new file mode 100644 index 00000000000..d0eab13ce84 --- /dev/null +++ b/ports/restbed/CONTROL @@ -0,0 +1,4 @@ +Source: restbed +Version: 4.16-07-28-2018 +Description: Corvusoft's Restbed framework brings asynchronous RESTful functionality to C++11 applications. +Build-Depends: asio \ No newline at end of file diff --git a/ports/restbed/cmake.patch b/ports/restbed/cmake.patch new file mode 100644 index 00000000000..5d73409f9b8 --- /dev/null +++ b/ports/restbed/cmake.patch @@ -0,0 +1,59 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b66143e..85c5315 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,7 +42,9 @@ endif ( ) + set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake" ) + + find_package( asio REQUIRED ) ++if(NOT DISABLE_TESTS) + find_package( catch REQUIRED ) ++endif() + if ( BUILD_SSL ) + find_package( openssl REQUIRED ) + endif ( ) +@@ -54,6 +56,7 @@ include_directories( ${INCLUDE_DIR} SYSTEM ${asio_INCLUDE} ${kashmir_INCLUDE} ${ + # + file( GLOB_RECURSE MANIFEST "${SOURCE_DIR}/*.cpp" ) + ++if(NOT BUILD_SHARED_LIBS) + set( STATIC_LIBRARY_NAME "${PROJECT_NAME}-static" ) + add_library( ${STATIC_LIBRARY_NAME} STATIC ${MANIFEST} ) + set_property( TARGET ${STATIC_LIBRARY_NAME} PROPERTY CXX_STANDARD 11 ) +@@ -64,7 +67,9 @@ if ( BUILD_SSL ) + else ( ) + target_link_libraries( ${STATIC_LIBRARY_NAME} ) + endif ( ) ++endif() + ++if(BUILD_SHARED_LIBS) + set( SHARED_LIBRARY_NAME "${PROJECT_NAME}-shared" ) + add_library( ${SHARED_LIBRARY_NAME} SHARED ${MANIFEST} ) + set_property( TARGET ${SHARED_LIBRARY_NAME} PROPERTY CXX_STANDARD 11 ) +@@ -76,12 +81,15 @@ if ( BUILD_SSL ) + else ( ) + target_link_libraries( ${SHARED_LIBRARY_NAME} ) + endif ( ) ++endif() + ++if(NOT DISABLE_TESTS) + enable_testing( ) + add_subdirectory( "${PROJECT_SOURCE_DIR}/test/unit" ) + add_subdirectory( "${PROJECT_SOURCE_DIR}/test/feature" ) + add_subdirectory( "${PROJECT_SOURCE_DIR}/test/regression" ) + add_subdirectory( "${PROJECT_SOURCE_DIR}/test/integration" ) ++endif() + + # + # Install +@@ -90,5 +98,8 @@ file( GLOB ARTIFACTS "${SOURCE_DIR}/*.hpp" ) + + install( FILES "${INCLUDE_DIR}/${PROJECT_NAME}" DESTINATION "${CMAKE_INSTALL_PREFIX}/include" ) + install( FILES ${ARTIFACTS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/corvusoft/${PROJECT_NAME}" ) +-install( TARGETS ${STATIC_LIBRARY_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library ) +-install( TARGETS ${SHARED_LIBRARY_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library ) ++if(NOT BUILD_SHARED_LIBS) ++install( TARGETS ${STATIC_LIBRARY_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library ) ++else() ++install( TARGETS ${SHARED_LIBRARY_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library ) ++endif() diff --git a/ports/restbed/portfile.cmake b/ports/restbed/portfile.cmake new file mode 100644 index 00000000000..60f1247d87d --- /dev/null +++ b/ports/restbed/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Corvusoft/restbed + REF 0f8af8d8ed183a88e208adeb22da0080d5d74d1e + SHA512 f0175a10c88f1ad4f16c8e4cff7ceea7b80c56b0724b59791c23e91f1ecf146dfdbda9e9238d31a35f21d8cdcc413b586cc633725dd0ba87de6b599a7087916f + HEAD_REF master + PATCHES cmake.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_SSL=OFF + -DDISABLE_TESTS=ON +) + +vcpkg_install_cmake() + +#Remove include debug files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/restbed/copyright COPYONLY) diff --git a/ports/restinio/CONTROL b/ports/restinio/CONTROL new file mode 100644 index 00000000000..1e0ad1d522a --- /dev/null +++ b/ports/restinio/CONTROL @@ -0,0 +1,4 @@ +Source: restinio +Version: 0.4.8 +Description: A header-only C++14 library that gives you an embedded HTTP/Websocket server targeted primarily for asynchronous processing of HTTP-requests. +Build-Depends: asio, fmt, http-parser diff --git a/ports/restinio/portfile.cmake b/ports/restinio/portfile.cmake new file mode 100644 index 00000000000..2ce2b726341 --- /dev/null +++ b/ports/restinio/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) + +vcpkg_from_bitbucket( + OUT_SOURCE_PATH SOURCE_PATH + REPO sobjectizerteam/restinio-0.4 + REF v.0.4.8 + SHA512 da44a6df47f68294b1f26241d63ab282b16a8111580959ea5d69e18d9faca68fe9932451d07c4cd5732d5ac4e6fab6550842fd6bac6385a622fb618b4a916975 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/vcpkg + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/restinio") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/restinio) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/restinio/LICENSE ${CURRENT_PACKAGES_DIR}/share/restinio/copyright) diff --git a/ports/robin-map/CONTROL b/ports/robin-map/CONTROL new file mode 100644 index 00000000000..f24dc8337ca --- /dev/null +++ b/ports/robin-map/CONTROL @@ -0,0 +1,3 @@ +Source: robin-map +Version: 0.2.0 +Description: A C++ implementation of a fast hash map and hash set using robin hood hashing diff --git a/ports/robin-map/portfile.cmake b/ports/robin-map/portfile.cmake new file mode 100644 index 00000000000..6436f61944b --- /dev/null +++ b/ports/robin-map/portfile.cmake @@ -0,0 +1,17 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Tessil/robin-map + REF v0.2.0 + SHA512 6d16c612a0d646fd08857f2f6ee2909fb607ff05fa9c7733a2b618d662f63bba2f99677b75a09870a1582b7b37f255c4ff1f9171c897c3cfa73dd8879de1ec18 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/tsl DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/robin-map + RENAME copyright +) diff --git a/ports/rocksdb/0001-disable-gtest.patch b/ports/rocksdb/0001-disable-gtest.patch new file mode 100644 index 00000000000..82fe3ff6266 --- /dev/null +++ b/ports/rocksdb/0001-disable-gtest.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5b7d37359..9ab8954b6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -445,7 +445,7 @@ include_directories(${PROJECT_SOURCE_DIR}/include) + include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third-party/gtest-1.7.0/fused-src) + find_package(Threads REQUIRED) + +-add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest) ++#add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest) + + # Main library source code + diff --git a/ports/rocksdb/0002-disable-gtest.patch b/ports/rocksdb/0002-disable-gtest.patch deleted file mode 100644 index 8d42bbaf153..00000000000 --- a/ports/rocksdb/0002-disable-gtest.patch +++ /dev/null @@ -1,25 +0,0 @@ -From f1ecf23b8a10ab5a917da4a39fba343a00cab1a9 Mon Sep 17 00:00:00 2001 -From: Robert Schumacher -Date: Fri, 23 Feb 2018 01:44:57 -0800 -Subject: [PATCH 2/3] disable gtest - ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5fb551a..faffc91 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -393,7 +393,7 @@ include_directories(${PROJECT_SOURCE_DIR}/include) - include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third-party/gtest-1.7.0/fused-src) - find_package(Threads REQUIRED) - --add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest) -+#add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest) - - # Main library source code - --- -2.16.2.windows.1 - diff --git a/ports/rocksdb/0003-only-build-one-flavor.patch b/ports/rocksdb/0002-only-build-one-flavor.patch similarity index 69% rename from ports/rocksdb/0003-only-build-one-flavor.patch rename to ports/rocksdb/0002-only-build-one-flavor.patch index d9b4cf6e5a3..2d6b3aa07ff 100644 --- a/ports/rocksdb/0003-only-build-one-flavor.patch +++ b/ports/rocksdb/0002-only-build-one-flavor.patch @@ -1,17 +1,8 @@ -From f77366e2bf8c136990b89ab235af8e0cf0e566f4 Mon Sep 17 00:00:00 2001 -From: Robert Schumacher -Date: Fri, 23 Feb 2018 01:45:18 -0800 -Subject: [PATCH 3/3] only build one flavor - ---- - CMakeLists.txt | 9 +++++++++ - 1 file changed, 9 insertions(+) - diff --git a/CMakeLists.txt b/CMakeLists.txt -index faffc91..89dc537 100644 +index 9ab8954b6..5b0405f4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -723,6 +723,7 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS) +@@ -793,6 +793,7 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS) install(DIRECTORY include/rocksdb COMPONENT devel DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") @@ -19,7 +10,7 @@ index faffc91..89dc537 100644 install( TARGETS ${ROCKSDB_STATIC_LIB} EXPORT RocksDBTargets -@@ -730,15 +731,23 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS) +@@ -800,15 +801,23 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS) ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ) @@ -43,6 +34,3 @@ index faffc91..89dc537 100644 install( EXPORT RocksDBTargets --- -2.16.2.windows.1 - diff --git a/ports/rocksdb/0003-zlib-findpackage.patch b/ports/rocksdb/0003-zlib-findpackage.patch new file mode 100644 index 00000000000..c2d71dc0067 --- /dev/null +++ b/ports/rocksdb/0003-zlib-findpackage.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5b0405f4a..43256fc04 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -88,7 +88,7 @@ else() + endif() + + if(WITH_ZLIB) +- find_package(zlib REQUIRED) ++ find_package(ZLIB REQUIRED) + add_definitions(-DZLIB) + include_directories(${ZLIB_INCLUDE_DIR}) + list(APPEND THIRDPARTY_LIBS ${ZLIB_LIBRARIES}) diff --git a/ports/rocksdb/use-find-package.patch b/ports/rocksdb/0004-use-find-package.patch similarity index 69% rename from ports/rocksdb/use-find-package.patch rename to ports/rocksdb/0004-use-find-package.patch index 1a79c228662..a6c7b5f5899 100644 --- a/ports/rocksdb/use-find-package.patch +++ b/ports/rocksdb/0004-use-find-package.patch @@ -1,13 +1,13 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f3ac9ce..931e9f2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -45,7 +45,7 @@ option(WITH_JEMALLOC "build with JeMalloc" OFF) - option(WITH_SNAPPY "build with SNAPPY" OFF) - option(WITH_LZ4 "build with lz4" OFF) - option(WITH_ZLIB "build with zlib" OFF) --if(MSVC) -+if(MSVC AND NOT VCPKG_TOOLCHAIN) - # Defaults currently different for GFLAGS. - # We will address find_package work a little later - option(WITH_GFLAGS "build with GFlags" OFF) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 43256fc04..204761256 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -49,7 +49,7 @@ option(WITH_SNAPPY "build with SNAPPY" OFF) + option(WITH_LZ4 "build with lz4" OFF) + option(WITH_ZLIB "build with zlib" OFF) + option(WITH_ZSTD "build with zstd" OFF) +-if(MSVC) ++if(MSVC AND NOT VCPKG_TOOLCHAIN) + # Defaults currently different for GFLAGS. + # We will address find_package work a little later + option(WITH_GFLAGS "build with GFlags" OFF) diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index 85228192442..9f70efb7874 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,5 +1,5 @@ Source: rocksdb -Version: 5.12.2 +Version: 5.15.10 Description: A library that provides an embeddable, persistent key-value store for fast storage Default-Features: zlib diff --git a/ports/rocksdb/pass-major-version.patch b/ports/rocksdb/pass-major-version.patch deleted file mode 100644 index 1cc3f2d13bd..00000000000 --- a/ports/rocksdb/pass-major-version.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d6bfbf2..ea6a884 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -132,6 +132,7 @@ endif() - - string(REGEX REPLACE "[^0-9a-f]+" "" GIT_SHA "${GIT_SHA}") - -+if(NOT DEFINED ROCKSDB_VERSION OR NOT DEFINED ROCKSDB_VERSION_MAJOR) - set(SH_CMD "sh") - execute_process(COMMAND - ${SH_CMD} -c "build_tools/version.sh full" -@@ -145,6 +146,7 @@ execute_process(COMMAND - OUTPUT_VARIABLE ROCKSDB_VERSION_MAJOR - ) - string(STRIP "${ROCKSDB_VERSION_MAJOR}" ROCKSDB_VERSION_MAJOR) -+endif() - - option(WITH_MD_LIBRARY "build with MD" ON) - if(WIN32 AND MSVC) diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 92ca0c2fa5b..0d124361bc3 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -3,18 +3,14 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/rocksdb - REF v5.12.2 - SHA512 53e81e87e84f0500cd09d754c39e86265a16a52d4b84f9044f8d9759c224881eb7ef4bf89f9b01fdff25f123ed4dfa7b5cb272d2311f27b322c15fe2e893bbe3 + REF v5.15.10 + SHA512 3faef43cc343c20e044f92af7cd9eae9783612d888bfe17b7d0ae6812090088f43a128e5686600ec56f5a88c100eaa893b2551f8c32df793a4ccd94330c07037 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - "${CMAKE_CURRENT_LIST_DIR}/0002-disable-gtest.patch" - "${CMAKE_CURRENT_LIST_DIR}/0003-only-build-one-flavor.patch" - "${CMAKE_CURRENT_LIST_DIR}/use-find-package.patch" - "${CMAKE_CURRENT_LIST_DIR}/pass-major-version.patch" + 0001-disable-gtest.patch + 0002-only-build-one-flavor.patch + 0003-zlib-findpackage.patch + 0004-use-find-package.patch ) file(REMOVE "${SOURCE_PATH}/cmake/modules/Findzlib.cmake") @@ -24,12 +20,7 @@ file(COPY DESTINATION "${SOURCE_PATH}/cmake/modules" ) -if(VCPKG_CRT_LINKAGE STREQUAL "static") - set(WITH_MD_LIBRARY OFF) -else() - set(WITH_MD_LIBRARY ON) -endif() - +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" WITH_MD_LIBRARY) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ROCKSDB_DISABLE_INSTALL_SHARED_LIB) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ROCKSDB_DISABLE_INSTALL_STATIC_LIB) @@ -48,10 +39,6 @@ if("zlib" IN_LIST FEATURES) set(WITH_ZLIB ON) endif() -get_filename_component(ROCKSDB_VERSION "${SOURCE_PATH}" NAME) -string(REPLACE "rocksdb-" "" ROCKSDB_VERSION "${ROCKSDB_VERSION}") -string(REGEX REPLACE "^([0-9]+)." "\\1" ROCKSDB_MAJOR_VERSION "${ROCKSDB_VERSION}") - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -68,8 +55,6 @@ vcpkg_configure_cmake( -DCMAKE_DEBUG_POSTFIX=d -DROCKSDB_DISABLE_INSTALL_SHARED_LIB=${ROCKSDB_DISABLE_INSTALL_SHARED_LIB} -DROCKSDB_DISABLE_INSTALL_STATIC_LIB=${ROCKSDB_DISABLE_INSTALL_STATIC_LIB} - -DROCKSDB_VERSION=${ROCKSDB_VERSION} - -DROCKSDB_VERSION_MAJOR=${ROCKSDB_MAJOR_VERSION} -DCMAKE_DISABLE_FIND_PACKAGE_TBB=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_NUMA=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_gtest=TRUE @@ -83,6 +68,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/rocksdb) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/LICENSE.Apache DESTINATION ${CURRENT_PACKAGES_DIR}/share/rocksdb RENAME copyright) -file(INSTALL ${SOURCE_PATH}/LICENSE.leveldb DESTINATION ${CURRENT_PACKAGES_DIR}/share/rocksdb) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${SOURCE_PATH}/LICENSE.leveldb DESTINATION ${CURRENT_PACKAGES_DIR}/share/rocksdb) vcpkg_copy_pdbs() diff --git a/ports/rocksdb/vcpkg-cmake-wrapper.cmake b/ports/rocksdb/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000..455facf22bf --- /dev/null +++ b/ports/rocksdb/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,9 @@ +_find_package(${ARGS}) +if(NOT TARGET RocksDB::rocksdb AND TARGET RocksDB::rocksdb-shared) + add_library(RocksDB::rocksdb INTERFACE IMPORTED) + set_target_properties(RocksDB::rocksdb PROPERTIES INTERFACE_LINK_LIBRARIES "RocksDB::rocksdb-shared") +endif() +if(TARGET RocksDB::rocksdb AND NOT TARGET RocksDB::rocksdb-shared) + add_library(RocksDB::rocksdb-shared INTERFACE IMPORTED) + set_target_properties(RocksDB::rocksdb-shared PROPERTIES INTERFACE_LINK_LIBRARIES "RocksDB::rocksdb") +endif() diff --git a/ports/rpclib/CONTROL b/ports/rpclib/CONTROL index 160f4651c94..2123f29c43a 100644 --- a/ports/rpclib/CONTROL +++ b/ports/rpclib/CONTROL @@ -1,3 +1,3 @@ Source: rpclib -Version: 2.2.0 +Version: 2.2.1 Description: a RPC library for C++, providing both a client and server implementation. It is built using modern C++14. diff --git a/ports/rpclib/portfile.cmake b/ports/rpclib/portfile.cmake index 5f4ac6a576e..40aea10bb15 100644 --- a/ports/rpclib/portfile.cmake +++ b/ports/rpclib/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO rpclib/rpclib - REF v2.2.0 - SHA512 73d2344debb3a6ced6a045ba3bf8839a6f91d8f43dfac8760c65d19d1fc7960e778457a20fddbd771d7dd4b12e32d8a925f1fc008d11ccc5654dbeb08ba0f50a + REF v2.2.1 + SHA512 a63c6d09a411fb6b87d0df7c4f75a189f775ff0208f5f1c67333a85030a47efe60d5518e5939e98abc683a6063afb6cfed51f118f594a2a08be32330a9691051 HEAD_REF master ) diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL index d7e5830540b..564b25807bc 100644 --- a/ports/rs-core-lib/CONTROL +++ b/ports/rs-core-lib/CONTROL @@ -1,4 +1,4 @@ Source: rs-core-lib -Version: 2018-04-12 +Version: 2018-10-25 Description: Minimal common utilities by Ross Smith diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake index 0994afa4d9d..a3eddc38d5b 100644 --- a/ports/rs-core-lib/portfile.cmake +++ b/ports/rs-core-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/rs-core-lib - REF 529b74de173a77ba057ebc54d1f91629e7b643bd - SHA512 d836ee1c022522618f37fdeba941986977317fa68a909d8255e6abfd39564f72f47f8c78c2fa9e4ccc52da75987b56a02f8f2d5aad2890ef7b93ea843c85940c + REF 5e2e7bb8663d078957a2f6994d9f1e3d4cf50601 + SHA512 d159b11c650572e486ce8376c03e688b5448fdf00d956edf141106d2e1173d86faf0eda843da69687a6f79eb443017dfe0fb1d9f70284444bfda7006d78aee38 HEAD_REF master ) diff --git a/ports/rttr/CONTROL b/ports/rttr/CONTROL index 80cff00bdee..50aa2172444 100644 --- a/ports/rttr/CONTROL +++ b/ports/rttr/CONTROL @@ -1,3 +1,3 @@ Source: rttr -Version: 0.9.5-2 +Version: 0.9.5-3 Description: an easy and intuitive way to use reflection in C++ diff --git a/ports/rttr/portfile.cmake b/ports/rttr/portfile.cmake index bfb1d23ad73..8ce171cc662 100644 --- a/ports/rttr/portfile.cmake +++ b/ports/rttr/portfile.cmake @@ -13,33 +13,23 @@ vcpkg_from_github( REF v0.9.5 SHA512 b451f24fd4bdc4b7d9ecabdb6fd261744852e68357ec36573109354a25f2bf494908b9d4174602b59dd5005c42ba8edc3b35ec1d1386384db421805ac9994608 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - "${CMAKE_CURRENT_LIST_DIR}/fix-directory-output.patch" - "${CMAKE_CURRENT_LIST_DIR}/disable-unit-tests.patch" - "${CMAKE_CURRENT_LIST_DIR}/remove-owner-read-perms.patch" + fix-directory-output.patch + disable-unit-tests.patch + remove-owner-read-perms.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DBUILD_BENCHMARKS=OFF ) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) -file(GLOB REL_EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(GLOB DBG_EXES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -if(REL_EXES) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/rttr) - file(COPY ${REL_EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/rttr) -endif() -file(REMOVE ${REL_EXES} ${DBG_EXES}) - #Handle copyright file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rttr) file(RENAME ${CURRENT_PACKAGES_DIR}/share/rttr/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/rttr/copyright) @@ -51,5 +41,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/README.md ) - - diff --git a/ports/safeint/CONTROL b/ports/safeint/CONTROL new file mode 100644 index 00000000000..726ebdc6b41 --- /dev/null +++ b/ports/safeint/CONTROL @@ -0,0 +1,3 @@ +Source: safeint +Version: 3.19.2 +Description: SafeInt is a class library for C++ that manages integer overflows diff --git a/ports/safeint/portfile.cmake b/ports/safeint/portfile.cmake new file mode 100644 index 00000000000..dd8e41aca2d --- /dev/null +++ b/ports/safeint/portfile.cmake @@ -0,0 +1,13 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dcleblanc/SafeInt + REF b1c48bd32b5e748ed57c153c418a5ed67538045a + SHA512 d0b59430da353e0af55a9ab83964e35bfb61edff00f8a2aef6df139720f271aae851ea9de54ca4280e220eff9946590a7b5c85c102f3c2e5f051a6cb7d7a3e5e + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/SafeInt.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/safeint RENAME copyright) diff --git a/ports/sais/CONTROL b/ports/sais/CONTROL new file mode 100644 index 00000000000..3c6262c6b05 --- /dev/null +++ b/ports/sais/CONTROL @@ -0,0 +1,3 @@ +Source: sais +Version: 2.4.1 +Description: An implementation of the induced sorting algorithm diff --git a/ports/sais/portfile.cmake b/ports/sais/portfile.cmake new file mode 100644 index 00000000000..0387f1313d5 --- /dev/null +++ b/ports/sais/portfile.cmake @@ -0,0 +1,26 @@ + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sais-2.4.1) +vcpkg_download_distfile(ARCHIVE + URLS "https://sites.google.com/site/yuta256/sais-2.4.1.zip" + FILENAME "sais-2.4.1.zip" + SHA512 6f6dd11f842f680bebc1d9b7f6b75752c9589c600fdd5e6373bb7290a686f1de35d4cc3226347e717f89a295363f7fee0ae8b1aa05ad341f4c2ea056fb5b1425 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_SAIS64=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + + + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/sais RENAME copyright) diff --git a/ports/scintilla/CONTROL b/ports/scintilla/CONTROL index 7cf89dfd213..8f1b2f38c0c 100644 --- a/ports/scintilla/CONTROL +++ b/ports/scintilla/CONTROL @@ -1,3 +1,3 @@ Source: scintilla -Version: 4.0.3 +Version: 4.1.2 Description: A free source code editing component for Win32, GTK+, and OS X diff --git a/ports/scintilla/portfile.cmake b/ports/scintilla/portfile.cmake index ecf554abdf4..aad39a8dc2b 100644 --- a/ports/scintilla/portfile.cmake +++ b/ports/scintilla/portfile.cmake @@ -1,55 +1,22 @@ -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - message(FATAL_ERROR "scintilla only supports dynamic linkage") -endif() -if(VCPKG_CRT_LINKAGE STREQUAL "static") - message(FATAL_ERROR "scintilla only supports dynamic crt") -endif() - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/scintilla) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + vcpkg_download_distfile(ARCHIVE - URLS "http://www.scintilla.org/scintilla403.zip" - FILENAME "scintilla403.zip" - SHA512 51704651e99a6b51afff9957676afcf71fa1cc289c1713402c6e50c44a12ec956d5216751ebbbe6f251a23fa8c974510e7c9f37cb66f25f69c30e500e426baad + URLS "http://www.scintilla.org/scintilla412.zip" + FILENAME "scintilla412.zip" + SHA512 10e24a2def5b3104b0f2eec473c53edb0a0cc19fbbef261e460a77415ec68ff83f9ee20c76cda7987627708c1d4ead5f964d4d5a98929d8256280bfa9bd0cddc ) -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) -vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) - -if(TRIPLET_SYSTEM_ARCH MATCHES "x86") - set(BUILD_ARCH "Win32") -else() - set(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) -endif() - -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/Win32/SciLexer.vcxproj - PLATFORM ${MSBUILD_PLATFORM} +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF 4.1.2 ) -# Handle headers -file(INSTALL ${SOURCE_PATH}/include/ILexer.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/include/Sci_Position.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/include/SciLexer.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/include/Scintilla.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) - -# Handle libraries -if(BUILD_ARCH STREQUAL "Win32") - set(BUILD_DIR_DEBUG "/Debug") - set(BUILD_DIR_RELEASE "/Release") -else() - set(BUILD_DIR_DEBUG "${BUILD_ARCH}/Debug") - set(BUILD_DIR_RELEASE "${BUILD_ARCH}/Release") -endif() - -file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_RELEASE}/SciLexer.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_DEBUG}/SciLexer.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_RELEASE}/SciLexer.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_DEBUG}/SciLexer.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - -# Handle PDBs - -file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_RELEASE}/SciLexer.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_DEBUG}/SciLexer.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/scintilla RENAME copyright) +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH Win32/SciLexer.vcxproj + INCLUDES_SUBPATH include + LICENSE_SUBPATH License.txt + ALLOW_ROOT_INCLUDES +) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index 5e573c89930..fb49f7b3689 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.1.6 +Version: 4.2.2 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 7a10297b226..2c51304218c 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,8 +12,8 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_REVISION 1f6f9afc6bf3c4f60ea510fc75f89634f282d15d) -set(SCITER_SHA 53be8007c22349e9801c413483d70cad437bc3399686f2c503da9b7aa96bf212e7563b13fff8e62942b0991fa775e87e542b5ff9c3dbc4aff1fd5291200b2c8e) +set(SCITER_REVISION 8add927504c84d72833973a659e834081672237f) +set(SCITER_SHA 85aa711b51e7911f62162cf8c3b74e7693c92a02618e074ed24578da56cf7a589e8336a677b21e7359957bcd7357adfb5da54a9fafa12b7f0bee8e480115c84c) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) @@ -21,6 +21,7 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) set(SCITER_ARCH 32) endif() + # check out the `https://github.com/c-smile/sciter-sdk/archive/${SCITER_REVISION}.tar.gz` # hash checksum can be obtained with `curl -L -o tmp.tgz ${URL} && vcpkg hash tmp.tgz` vcpkg_from_github( @@ -39,15 +40,15 @@ vcpkg_apply_patches( # install include directory file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/sciter FILES_MATCHING - PATTERN "sciter-gtk-main.cpp" EXCLUDE - PATTERN "sciter-osx-main.mm" EXCLUDE PATTERN "*.cpp" + PATTERN "*.mm" PATTERN "*.h" PATTERN "*.hpp" ) set(SCITER_SHARE ${CURRENT_PACKAGES_DIR}/share/sciter) set(SCITER_TOOLS ${CURRENT_PACKAGES_DIR}/tools/sciter) +set(TOOL_PERMS FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) # license file(COPY ${SOURCE_PATH}/logfile.htm DESTINATION ${SCITER_SHARE}) @@ -59,16 +60,42 @@ file(COPY ${SOURCE_PATH}/samples DESTINATION ${SCITER_SHARE}) file(COPY ${SOURCE_PATH}/widgets DESTINATION ${SCITER_SHARE}) # tools -file(INSTALL ${SOURCE_PATH}/bin/packfolder.exe DESTINATION ${SCITER_TOOLS}) -file(INSTALL ${SOURCE_PATH}/bin/tiscript.exe DESTINATION ${SCITER_TOOLS}) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Linux AND VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(SCITER_BIN ${SOURCE_PATH}/bin.gtk/x64) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/sciter.exe DESTINATION ${SCITER_TOOLS}) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/inspector.exe DESTINATION ${SCITER_TOOLS}) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/sciter.dll DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN}/packfolder DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SCITER_BIN}/usciter DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SCITER_BIN}/inspector DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${SCITER_TOOLS}) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Darwin) + set(SCITER_BIN ${SOURCE_PATH}/bin.osx) + + file(INSTALL ${SCITER_BIN}/packfolder DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SCITER_BIN}/inspector.app DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN}/sciter.app DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${SCITER_TOOLS}) + + file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + +else() + set(SCITER_BIN ${SOURCE_PATH}/bin/${SCITER_ARCH}) + + file(INSTALL ${SOURCE_PATH}/bin/packfolder.exe DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SOURCE_PATH}/bin/tiscript.exe DESTINATION ${SCITER_TOOLS}) + + file(INSTALL ${SCITER_BIN}/sciter.exe DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN}/inspector.exe DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${SCITER_TOOLS}) + + file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${SCITER_BIN}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SCITER_BIN}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() message(STATUS "Warning: Sciter requires manual deployment of the correct DLL files.") diff --git a/ports/sdl1-net/CMakeLists.txt b/ports/sdl1-net/CMakeLists.txt new file mode 100644 index 00000000000..05bdac9f86e --- /dev/null +++ b/ports/sdl1-net/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 3.0) +project(SDL1_NET C) + +if (MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244 /wd4996") +endif() + +find_path(SDL_INCLUDE_DIR SDL.h) +find_library(SDL_LIBRARY NAMES SDLd SDL) + +add_library(SDL_net SDLnet.c SDLnetselect.c SDLnetTCP.c SDLnetUDP.c version.rc) + +set_target_properties(SDL_net PROPERTIES DEFINE_SYMBOL SDL1_EXPORTS) +target_compile_definitions(SDL_net PRIVATE _WINSOCK_DEPRECATED_NO_WARNINGS) +target_include_directories(SDL_net PRIVATE ${SDL_INCLUDE_DIR}) +target_link_libraries(SDL_net ${SDL_LIBRARY} ws2_32 iphlpapi) + +install(TARGETS SDL_net + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +if(NOT DEFINED SDL_NET_SKIP_HEADERS) + install(FILES SDL_net.h DESTINATION include) +endif() + +message(STATUS "Link-time dependencies:") +message(STATUS " " ${SDL_LIBRARY}) diff --git a/ports/sdl1-net/CONTROL b/ports/sdl1-net/CONTROL new file mode 100644 index 00000000000..ae968e58125 --- /dev/null +++ b/ports/sdl1-net/CONTROL @@ -0,0 +1,4 @@ +Source: sdl1-net +Version: 1.2.8-2 +Description: Networking library for SDL +Build-Depends: sdl1 diff --git a/ports/sdl1-net/portfile.cmake b/ports/sdl1-net/portfile.cmake new file mode 100644 index 00000000000..8bdf4bd3c18 --- /dev/null +++ b/ports/sdl1-net/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL_net-1.2.8) +vcpkg_download_distfile(ARCHIVE + URLS "https://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.8.tar.gz" + FILENAME "SDL_net-1.2.8.tar.gz" + SHA512 2766ca55343127c619958ab3a3ae3052a27a676839f10a158f7dfc071b8db38c2f1fc853e8add32b9fef94ab07eaa986f46a68e264e8087b57c990af30ea9a0b +) + +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 + -DSDL_NET_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl1-net) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl1-net/COPYING ${CURRENT_PACKAGES_DIR}/share/sdl1-net/copyright) diff --git a/ports/sdl1/CONTROL b/ports/sdl1/CONTROL new file mode 100644 index 00000000000..483813f516f --- /dev/null +++ b/ports/sdl1/CONTROL @@ -0,0 +1,3 @@ +Source: sdl1 +Version: 1.2.15-3 +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/sdl1/SDL.vcxproj b/ports/sdl1/SDL.vcxproj new file mode 100644 index 00000000000..1db10bb7689 --- /dev/null +++ b/ports/sdl1/SDL.vcxproj @@ -0,0 +1,354 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + SDL + + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.27924.0 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;%(PreprocessorDefinitions) + MultiThreadedDLL + false + + .\Debug/SDL.pch + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + false + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;%(PreprocessorDefinitions) + MultiThreadedDLL + false + + .\Debug/SDL.pch + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + MachineX64 + false + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ports/sdl1/SDL1_2017.sln b/ports/sdl1/SDL1_2017.sln new file mode 100644 index 00000000000..a255cb6aad1 --- /dev/null +++ b/ports/sdl1/SDL1_2017.sln @@ -0,0 +1,50 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2003 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL", "SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLmain", "SDLmain\SDLmain.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release_NoSTDIO|Win32 = Release_NoSTDIO|Win32 + Release_NoSTDIO|x64 = Release_NoSTDIO|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.ActiveCfg = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.Build.0 = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|Win32.Build.0 = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|x64.ActiveCfg = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|x64.Build.0 = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.ActiveCfg = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.Build.0 = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.Build.0 = Debug|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|Win32.ActiveCfg = Release_NoSTDIO|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|Win32.Build.0 = Release_NoSTDIO|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|x64.ActiveCfg = Release_NoSTDIO|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|x64.Build.0 = Release_NoSTDIO|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.ActiveCfg = Release|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.Build.0 = Release|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.ActiveCfg = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D0FB7C52-B8AE-4A23-A002-2F7DEF5F6BD6} + EndGlobalSection +EndGlobal diff --git a/ports/sdl1/SDLmain.vcxproj b/ports/sdl1/SDLmain.vcxproj new file mode 100644 index 00000000000..228045d417a --- /dev/null +++ b/ports/sdl1/SDLmain.vcxproj @@ -0,0 +1,215 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release_NoSTDIO + Win32 + + + Release_NoSTDIO + x64 + + + Release + Win32 + + + Release + x64 + + + + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.27924.0 + + + .\Release\ + .\Release\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + .\Release_NOSTDIO\ + .\Release_NOSTDIO\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + .\Debug\ + .\Debug\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + .\Release/SDLmain.pch + Level3 + Default + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + .\Release/SDLmain.pch + Level3 + Default + + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + X64 + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + + + + + \ No newline at end of file diff --git a/ports/sdl1/export-symbols-only-in-shared-build.patch b/ports/sdl1/export-symbols-only-in-shared-build.patch new file mode 100644 index 00000000000..c1ea96dc3b1 --- /dev/null +++ b/ports/sdl1/export-symbols-only-in-shared-build.patch @@ -0,0 +1,15 @@ +diff -r 8df7a59b5528 -r 46ec9baae30c include/begin_code.h +--- a/include/begin_code.h Fri Sep 22 11:25:52 2017 -0700 ++++ b/include/begin_code.h Sun Sep 24 14:32:30 2017 +0300 +@@ -54,8 +54,10 @@ + # else + # define DECLSPEC __declspec(dllimport) + # endif ++# elif defined(_DLL) ++# define DECLSPEC __declspec(dllexport) + # else +-# define DECLSPEC __declspec(dllexport) ++# define DECLSPEC + # endif + # elif defined(__OS2__) + # ifdef __WATCOMC__ diff --git a/ports/sdl1/portfile.cmake b/ports/sdl1/portfile.cmake new file mode 100644 index 00000000000..de2d855e621 --- /dev/null +++ b/ports/sdl1/portfile.cmake @@ -0,0 +1,40 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SDL-Mirror/SDL + REF release-1.2.15 + SHA512 38b94a650ec205377ae1503d0ec8a5254ef6d50ed0acac8d985b57b64bc16ea042cfa41e19e5ef8317980c4afb83186829f5bc3da9433d0a649dfd10554801b5 + HEAD_REF master + PATCHES export-symbols-only-in-shared-build.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/SDL1_2017.sln DESTINATION ${SOURCE_PATH}/VisualC/ ) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/SDL.vcxproj DESTINATION ${SOURCE_PATH}/VisualC/SDL ) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/SDLmain.vcxproj DESTINATION ${SOURCE_PATH}/VisualC/SDLmain ) + +configure_file(${SOURCE_PATH}/include/SDL_config.h.default ${SOURCE_PATH}/include/SDL_config.h COPYONLY) + +# This text file gets copied as a library, and included as one in the package +file(REMOVE_RECURSE ${SOURCE_PATH}/src/hermes/COPYING.LIB) + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH VisualC/SDL1_2017.sln + INCLUDES_SUBPATH include + LICENSE_SUBPATH COPYING + ALLOW_ROOT_INCLUDES +) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/doxyfile) + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/SDLmain.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/SDLmain.lib) +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/SDLmain.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDLmaind.lib) +endif() diff --git a/ports/sdl2-image/CMakeLists.txt b/ports/sdl2-image/CMakeLists.txt index 0df7e7d3667..e1ef48bd9f7 100644 --- a/ports/sdl2-image/CMakeLists.txt +++ b/ports/sdl2-image/CMakeLists.txt @@ -3,7 +3,7 @@ project(SDL2_image C) ### configuration ### -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") +list(APPEND CMAKE_MODULE_PATH "${CURRENT_INSTALLED_DIR}/share/libwebp") # enable all file formats which are supported natively set(SUPPORTED_FORMATS BMP GIF LBM PCX PNM TGA XPM XCF XV SVG) @@ -11,6 +11,8 @@ set(SUPPORTED_FORMATS BMP GIF LBM PCX PNM TGA XPM XCF XV SVG) # first try to load them statically (lib file in vcpkg installation) # if this fails try to make them a dynamic dependency (dll will be loaded at runtime) if possible. vcpkg cannot resolve these dependencies! # else do not support this file format at all + +# Can be explicitly enabled or disabled via USE_XYZ set(DEPENDENCIES PNG JPEG TIFF WEBP) # patch library names for preprocessor flags @@ -62,7 +64,10 @@ include_directories(${CMAKE_SOURCE_DIR}) target_link_libraries(SDL2_image ${SDL_LIBRARY}) # external dependencies -foreach(DEPENDENCY ${DEPENDENCIES}) +foreach(DEPENDENCY IN LISTS DEPENDENCIES) + if(NOT USE_${DEPENDENCY}) + continue() + endif() find_package(${DEPENDENCY}) if(NOT DEFINED ${DEPENDENCY}_FLAG) diff --git a/ports/sdl2-image/CONTROL b/ports/sdl2-image/CONTROL index f9d5e14edc0..c91b0c83849 100644 --- a/ports/sdl2-image/CONTROL +++ b/ports/sdl2-image/CONTROL @@ -1,5 +1,16 @@ Source: sdl2-image -Version: 2.0.2-1 -Build-Depends: sdl2, libpng, libjpeg-turbo, tiff, libwebp +Version: 2.0.2-3 +Build-Depends: sdl2, libpng 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 +Feature: libjpeg-turbo +Description: Support for JPEG image format +Build-Depends: libjpeg-turbo + +Feature: tiff +Description: Support for TIFF image format +Build-Depends: tiff + +Feature: libwebp +Description: Support for WEBP image format. +Build-Depends: libwebp diff --git a/ports/sdl2-image/FindWEBP.cmake b/ports/sdl2-image/FindWEBP.cmake deleted file mode 100644 index fb3f9caa1c2..00000000000 --- a/ports/sdl2-image/FindWEBP.cmake +++ /dev/null @@ -1,24 +0,0 @@ -# - Find WEBP -# Find the WEBP library -# This module defines -# WEBP_INCLUDE_DIRS, where to find webp/decode.h -# WEBP_LIBRARIES, the libraries needed to use WEBP -# - -find_path(WEBP_INCLUDE_DIRS - NAMES webp/decode.h -) -mark_as_advanced(WEBP_INCLUDE_DIRS) - -find_library( - WEBP_LIBRARIES - NAMES webp -) - -find_library(WEBP_LIBRARY_RELEASE NAMES webp PATH_SUFFIXES lib) -find_library(WEBP_LIBRARY_DEBUG NAMES webpd PATH_SUFFIXES lib) -include(SelectLibraryConfigurations) -select_library_configurations(WEBP) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(WEBP DEFAULT_MSG WEBP_INCLUDE_DIRS WEBP_LIBRARIES) \ No newline at end of file diff --git a/ports/sdl2-image/portfile.cmake b/ports/sdl2-image/portfile.cmake index 10567a13131..82adedaaf7f 100644 --- a/ports/sdl2-image/portfile.cmake +++ b/ports/sdl2-image/portfile.cmake @@ -1,11 +1,3 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# 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(SDL2_IMAGE_VERSION "2.0.2") set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2_image-${SDL2_IMAGE_VERSION}) @@ -17,14 +9,31 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindWEBP.cmake DESTINATION ${SOURCE_PATH}/cmake) + +set(USE_JPEG OFF) +if("libjpeg-turbo" IN_LIST FEATURES) + set(USE_JPEG ON) +endif() + +set(USE_TIFF OFF) +if("tiff" IN_LIST FEATURES) + set(USE_TIFF ON) +endif() + +set(USE_WEBP OFF) +if("libwebp" IN_LIST FEATURES) + set(USE_WEBP ON) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - # OPTIONS - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + OPTIONS + "-DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR}" + -DUSE_PNG=ON + -DUSE_JPEG=${USE_JPEG} + -DUSE_TIFF=${USE_TIFF} + -DUSE_WEBP=${USE_WEBP} ) vcpkg_install_cmake() diff --git a/ports/sdl2-mixer/CMakeLists.txt b/ports/sdl2-mixer/CMakeLists.txt index 1df35c44afe..6992521b1bd 100644 --- a/ports/sdl2-mixer/CMakeLists.txt +++ b/ports/sdl2-mixer/CMakeLists.txt @@ -7,14 +7,14 @@ set(SDL_MIXER_INCLUDES ${SDL_INCLUDE_DIR}) set(SDL_MIXER_LIBRARIES ${SDL_LIBRARY}) # builtin formats -set(SDL_MIXER_DEFINES +set(SDL_MIXER_DEFINES MUSIC_WAV MUSIC_MID_NATIVE) # MP3 support if(SDL_MIXER_ENABLE_MP3) find_path(MPG123_INCLUDE_DIR mpg123.h) - find_library(MPG123_LIBRARY libmpg123) + find_library(MPG123_LIBRARY NAMES libmpg123 mpg123) list(APPEND SDL_MIXER_INCLUDES ${MPG123_INCLUDE_DIR}) list(APPEND SDL_MIXER_LIBRARIES ${MPG123_LIBRARY}) list(APPEND SDL_MIXER_DEFINES MUSIC_MP3_MPG123) @@ -47,7 +47,7 @@ if(SDL_MIXER_ENABLE_OGGVORBIS) list(APPEND SDL_MIXER_DEFINES MUSIC_OGG) endif() -add_library(SDL2_mixer +add_library(SDL2_mixer effect_position.c effect_stereoreverse.c effects_internal.c diff --git a/ports/sdl2-mixer/CONTROL b/ports/sdl2-mixer/CONTROL index e66081fc7d6..7f953a2f9d3 100644 --- a/ports/sdl2-mixer/CONTROL +++ b/ports/sdl2-mixer/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-mixer -Version: 2.0.2-2 +Version: 2.0.2-4 Description: Multi-channel audio mixer library for SDL. Build-Depends: sdl2, libflac, mpg123, libmodplug, libvorbis diff --git a/ports/sdl2-net/CMakeLists.txt b/ports/sdl2-net/CMakeLists.txt index aea5f005e42..5ee86e9bdf0 100644 --- a/ports/sdl2-net/CMakeLists.txt +++ b/ports/sdl2-net/CMakeLists.txt @@ -1,7 +1,9 @@ cmake_minimum_required(VERSION 3.0) project(SDL2_NET C) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244 /wd4996") +if (MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244 /wd4996") +endif() find_path(SDL_INCLUDE_DIR SDL2/SDL.h) find_library(SDL_LIBRARY NAMES SDL2d SDL2) diff --git a/ports/sdl2-ttf/CMakeLists.txt b/ports/sdl2-ttf/CMakeLists.txt index 7c3e8fc7717..2954a1e20fa 100644 --- a/ports/sdl2-ttf/CMakeLists.txt +++ b/ports/sdl2-ttf/CMakeLists.txt @@ -3,7 +3,7 @@ project(SDL2_TTF C) find_path(SDL_INCLUDE_DIR SDL2/SDL.h) find_library(SDL_LIBRARY NAMES SDL2d SDL2) -find_package(FreeType REQUIRED) +find_package(Freetype REQUIRED) add_library(SDL2_ttf SDL_ttf.c version.rc) diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL index 6f39484dd6b..18e867b7c67 100644 --- a/ports/sdl2/CONTROL +++ b/ports/sdl2/CONTROL @@ -1,3 +1,3 @@ Source: sdl2 -Version: 2.0.8-1 +Version: 2.0.9-1 Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. diff --git a/ports/sdl2/enable-winrt-cmake.patch b/ports/sdl2/enable-winrt-cmake.patch index dcd2afa67c9..858c7d460ab 100644 --- a/ports/sdl2/enable-winrt-cmake.patch +++ b/ports/sdl2/enable-winrt-cmake.patch @@ -1,206 +1,175 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 73d9407..082fbc5 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -3,7 +3,11 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) - endif() - - cmake_minimum_required(VERSION 2.8.11) --project(SDL2 C) -+if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") -+ project(SDL2 C CXX) -+else() -+ project(SDL2 C) -+endif() - - # !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property - # !!! FIXME: for the SDL2 shared library (so you get an -@@ -358,7 +362,6 @@ file(GLOB SOURCE_FILES - ${SDL2_SOURCE_DIR}/src/timer/*.c - ${SDL2_SOURCE_DIR}/src/video/*.c) - -- - if(ASSERTIONS STREQUAL "auto") - # Do nada - use optimization settings to determine the assertion level - elseif(ASSERTIONS STREQUAL "disabled") -@@ -1132,6 +1135,22 @@ elseif(WINDOWS) - file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c) - set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES}) - -+ if(WINDOWS_STORE) -+ cmake_minimum_required(VERSION 3.0) -+ add_definitions(-DSDL_BUILDING_WINRT=1 -ZW) -+ link_libraries( -+ -nodefaultlib:vccorlib$<$:d> -+ -nodefaultlib:msvcrt$<$:d> -+ vccorlib$<$:d>.lib -+ msvcrt$<$:d>.lib -+ ) -+ endif() -+ -+ if(WINDOWS_STORE) -+ file(GLOB WINRT_SOURCE_FILES ${SDL2_SOURCE_DIR}/src/core/winrt/*.c ${SDL2_SOURCE_DIR}/src/core/winrt/*.cpp) -+ set(SOURCE_FILES ${SOURCE_FILES} ${WINRT_SOURCE_FILES}) -+ endif() -+ - if(MSVC) - # Prevent codegen that would use the VC runtime libraries. - set_property(DIRECTORY . APPEND PROPERTY COMPILE_OPTIONS "/GS-") -@@ -1176,7 +1195,11 @@ elseif(WINDOWS) - check_include_file(d3d11_1.h HAVE_D3D11_H) - check_include_file(ddraw.h HAVE_DDRAW_H) - check_include_file(dsound.h HAVE_DSOUND_H) -- check_include_file(dinput.h HAVE_DINPUT_H) -+ if(WINDOWS_STORE) -+ set(HAVE_DINPUT_H 0) -+ else() -+ check_include_file(dinput.h HAVE_DINPUT_H) -+ endif() - check_include_file(xaudio2.h HAVE_XAUDIO2_H) - check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H) - check_include_file(audioclient.h HAVE_AUDIOCLIENT_H) -@@ -1193,12 +1216,14 @@ elseif(WINDOWS) - endif() - - if(SDL_AUDIO) -- set(SDL_AUDIO_DRIVER_WINMM 1) -- file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c) -- set(SOURCE_FILES ${SOURCE_FILES} ${WINMM_AUDIO_SOURCES}) -- set(HAVE_SDL_AUDIO TRUE) -+ if(NOT WINDOWS_STORE) -+ set(SDL_AUDIO_DRIVER_WINMM 1) -+ file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c) -+ set(SOURCE_FILES ${SOURCE_FILES} ${WINMM_AUDIO_SOURCES}) -+ set(HAVE_SDL_AUDIO TRUE) -+ endif() - -- if(HAVE_DSOUND_H) -+ if(HAVE_DSOUND_H AND NOT WINDOWS_STORE) - set(SDL_AUDIO_DRIVER_DSOUND 1) - file(GLOB DSOUND_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/directsound/*.c) - set(SOURCE_FILES ${SOURCE_FILES} ${DSOUND_AUDIO_SOURCES}) -@@ -1208,9 +1233,10 @@ elseif(WINDOWS) - set(SDL_AUDIO_DRIVER_XAUDIO2 1) - file(GLOB XAUDIO2_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/xaudio2/*.c) - set(SOURCE_FILES ${SOURCE_FILES} ${XAUDIO2_AUDIO_SOURCES}) -+ set(HAVE_SDL_AUDIO TRUE) - endif() - -- if(HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H) -+ if(HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H AND NOT WINDOWS_STORE) - set(SDL_AUDIO_DRIVER_WASAPI 1) - file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c) - set(SOURCE_FILES ${SOURCE_FILES} ${WASAPI_AUDIO_SOURCES}) -@@ -1222,11 +1248,20 @@ elseif(WINDOWS) - if(NOT SDL_LOADSO) - message_error("SDL_VIDEO requires SDL_LOADSO, which is not enabled") - endif() -- set(SDL_VIDEO_DRIVER_WINDOWS 1) -- file(GLOB WIN_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/windows/*.c) -+ if(WINDOWS_STORE) -+ set(SDL_VIDEO_DRIVER_WINRT 1) -+ file(GLOB WIN_VIDEO_SOURCES -+ ${SDL2_SOURCE_DIR}/src/video/winrt/*.c -+ ${SDL2_SOURCE_DIR}/src/video/winrt/*.cpp -+ ${SDL2_SOURCE_DIR}/src/render/direct3d11/*.cpp -+ ) -+ else() -+ set(SDL_VIDEO_DRIVER_WINDOWS 1) -+ file(GLOB WIN_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/windows/*.c) -+ endif() - set(SOURCE_FILES ${SOURCE_FILES} ${WIN_VIDEO_SOURCES}) - -- if(RENDER_D3D AND HAVE_D3D_H) -+ if(RENDER_D3D AND HAVE_D3D_H AND NOT WINDOWS_STORE) - set(SDL_VIDEO_RENDER_D3D 1) - set(HAVE_RENDER_D3D TRUE) - endif() -@@ -1249,20 +1284,31 @@ elseif(WINDOWS) - endif() - - if(SDL_POWER) -- set(SDL_POWER_WINDOWS 1) -- set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/windows/SDL_syspower.c) -+ if(WINDOWS_STORE) -+ set(SDL_POWER_WINRT 1) -+ set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/winrt/SDL_syspower.cpp) -+ else() -+ set(SDL_POWER_WINDOWS 1) -+ set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/windows/SDL_syspower.c) -+ endif() - set(HAVE_SDL_POWER TRUE) - endif() - - if(SDL_FILESYSTEM) - set(SDL_FILESYSTEM_WINDOWS 1) -- file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/windows/*.c) -+ if(WINDOWS_STORE) -+ file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/winrt/*.cpp) -+ else() -+ file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/windows/*.c) -+ endif() - set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES}) - set(HAVE_SDL_FILESYSTEM TRUE) - endif() - - # Libraries for Win32 native and MinGW -- list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid) -+ if(NOT WINDOWS_STORE) -+ list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid) -+ endif() - - # TODO: in configure.in the check for timers is set on - # cygwin | mingw32* - does this include mingw32CE? -@@ -1284,7 +1330,7 @@ elseif(WINDOWS) - set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES}) - - if(SDL_VIDEO) -- if(VIDEO_OPENGL) -+ if(VIDEO_OPENGL AND NOT WINDOWS_STORE) - set(SDL_VIDEO_OPENGL 1) - set(SDL_VIDEO_OPENGL_WGL 1) - set(SDL_VIDEO_RENDER_OGL 1) -@@ -1688,9 +1734,11 @@ endif() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") - - # Always build SDLmain --add_library(SDL2main STATIC ${SDLMAIN_SOURCES}) --target_include_directories(SDL2main PUBLIC $) --set(_INSTALL_LIBS "SDL2main") -+if(NOT WINDOWS_STORE) -+ add_library(SDL2main STATIC ${SDLMAIN_SOURCES}) -+ target_include_directories(SDL2main PUBLIC $) -+ set(_INSTALL_LIBS "SDL2main") -+endif() - - if(SDL_SHARED) - add_library(SDL2 SHARED ${SOURCE_FILES} ${VERSION_SOURCES}) -diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake -index 9b20398..7ae6e35 100644 ---- a/include/SDL_config.h.cmake -+++ b/include/SDL_config.h.cmake -@@ -298,6 +298,7 @@ - #cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@ - #cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@ - #cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@ -+#cmakedefine SDL_VIDEO_DRIVER_WINRT @SDL_VIDEO_DRIVER_WINRT@ - #cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@ - #cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@ - #cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@ -@@ -365,6 +366,7 @@ - #cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@ - #cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@ - #cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@ -+#cmakedefine SDL_POWER_WINRT @SDL_POWER_WINRT@ - #cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@ - #cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@ - #cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@ -@@ -387,7 +389,7 @@ - #cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@ - - /* Platform specific definitions */ --#if !defined(__WIN32__) -+#if !defined(__WIN32__) && !defined(__WINRT__) - # if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H) - typedef unsigned int size_t; - typedef signed char int8_t; +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0128c7a..bd534e4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,6 +5,18 @@ endif() + cmake_minimum_required(VERSION 2.8.11) + project(SDL2 C) + ++if(WINDOWS_STORE) ++ enable_language(CXX) ++ cmake_minimum_required(VERSION 3.11) ++ add_definitions(-DSDL_BUILDING_WINRT=1 -ZW) ++ link_libraries( ++ -nodefaultlib:vccorlib$<$:d> ++ -nodefaultlib:msvcrt$<$:d> ++ vccorlib$<$:d>.lib ++ msvcrt$<$:d>.lib ++ ) ++endif() ++ + # !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property + # !!! FIXME: for the SDL2 shared library (so you get an + # !!! FIXME: install_name ("soname") of "@rpath/libSDL-whatever.dylib" +@@ -1166,6 +1178,11 @@ elseif(WINDOWS) + file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c) + set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES}) + ++ if(WINDOWS_STORE) ++ file(GLOB WINRT_SOURCE_FILES ${SDL2_SOURCE_DIR}/src/core/winrt/*.c ${SDL2_SOURCE_DIR}/src/core/winrt/*.cpp) ++ list(APPEND SOURCE_FILES ${WINRT_SOURCE_FILES}) ++ endif() ++ + if(MSVC) + # Prevent codegen that would use the VC runtime libraries. + set_property(DIRECTORY . APPEND PROPERTY COMPILE_OPTIONS "/GS-") +@@ -1211,6 +1228,9 @@ elseif(WINDOWS) + check_include_file(ddraw.h HAVE_DDRAW_H) + check_include_file(dsound.h HAVE_DSOUND_H) + check_include_file(dinput.h HAVE_DINPUT_H) ++ if(WINDOWS_STORE) ++ set(HAVE_DINPUT_H 0) ++ endif() + check_include_file(dxgi.h HAVE_DXGI_H) + if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H) + set(HAVE_DIRECTX TRUE) +@@ -1229,18 +1249,20 @@ elseif(WINDOWS) + check_include_file(endpointvolume.h HAVE_ENDPOINTVOLUME_H) + + if(SDL_AUDIO) ++ if(NOT WINDOWS_STORE) + set(SDL_AUDIO_DRIVER_WINMM 1) + file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c) + set(SOURCE_FILES ${SOURCE_FILES} ${WINMM_AUDIO_SOURCES}) ++ endif() + set(HAVE_SDL_AUDIO TRUE) + +- if(HAVE_DSOUND_H) ++ if(HAVE_DSOUND_H AND NOT WINDOWS_STORE) + set(SDL_AUDIO_DRIVER_DSOUND 1) + file(GLOB DSOUND_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/directsound/*.c) + set(SOURCE_FILES ${SOURCE_FILES} ${DSOUND_AUDIO_SOURCES}) + endif() + +- if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H) ++ if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H AND NOT WINDOWS_STORE) + set(SDL_AUDIO_DRIVER_WASAPI 1) + file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c) + set(SOURCE_FILES ${SOURCE_FILES} ${WASAPI_AUDIO_SOURCES}) +@@ -1252,11 +1274,20 @@ elseif(WINDOWS) + if(NOT SDL_LOADSO) + message_error("SDL_VIDEO requires SDL_LOADSO, which is not enabled") + endif() ++ if(WINDOWS_STORE) ++ set(SDL_VIDEO_DRIVER_WINRT 1) ++ file(GLOB WIN_VIDEO_SOURCES ++ ${SDL2_SOURCE_DIR}/src/video/winrt/*.c ++ ${SDL2_SOURCE_DIR}/src/video/winrt/*.cpp ++ ${SDL2_SOURCE_DIR}/src/render/direct3d11/*.cpp ++ ) ++ else() + set(SDL_VIDEO_DRIVER_WINDOWS 1) + file(GLOB WIN_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/windows/*.c) ++ endif() + set(SOURCE_FILES ${SOURCE_FILES} ${WIN_VIDEO_SOURCES}) + +- if(RENDER_D3D AND HAVE_D3D_H) ++ if(RENDER_D3D AND HAVE_D3D_H AND NOT WINDOWS_STORE) + set(SDL_VIDEO_RENDER_D3D 1) + set(HAVE_RENDER_D3D TRUE) + endif() +@@ -1279,20 +1310,31 @@ elseif(WINDOWS) + endif() + + if(SDL_POWER) ++ if(WINDOWS_STORE) ++ set(SDL_POWER_WINRT 1) ++ set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/winrt/SDL_syspower.cpp) ++ else() + set(SDL_POWER_WINDOWS 1) + set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/windows/SDL_syspower.c) ++ endif() + set(HAVE_SDL_POWER TRUE) + endif() + + if(SDL_FILESYSTEM) + set(SDL_FILESYSTEM_WINDOWS 1) ++ if(WINDOWS_STORE) ++ file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/winrt/*.cpp) ++ else() + file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/windows/*.c) ++ endif() + set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES}) + set(HAVE_SDL_FILESYSTEM TRUE) + endif() + + # Libraries for Win32 native and MinGW ++ if(NOT WINDOWS_STORE) + list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 shell32) ++ endif() + + # TODO: in configure.in the check for timers is set on + # cygwin | mingw32* - does this include mingw32CE? +@@ -1314,7 +1356,7 @@ elseif(WINDOWS) + set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES}) + + if(SDL_VIDEO) +- if(VIDEO_OPENGL) ++ if(VIDEO_OPENGL AND NOT WINDOWS_STORE) + set(SDL_VIDEO_OPENGL 1) + set(SDL_VIDEO_OPENGL_WGL 1) + set(SDL_VIDEO_RENDER_OGL 1) +@@ -1731,12 +1773,14 @@ endif() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") + + # Always build SDLmain ++if(NOT WINDOWS_STORE) + add_library(SDL2main STATIC ${SDLMAIN_SOURCES}) + target_include_directories(SDL2main PUBLIC "$" $) + set(_INSTALL_LIBS "SDL2main") + if (NOT ANDROID) + set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX}) + endif() ++endif() + + if(SDL_SHARED) + add_library(SDL2 SHARED ${SOURCE_FILES} ${VERSION_SOURCES}) +diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake +index 48dd2d4..0c4fa28 100644 +--- a/include/SDL_config.h.cmake ++++ b/include/SDL_config.h.cmake +@@ -324,6 +324,7 @@ + #cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@ + #cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@ + #cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@ ++#cmakedefine SDL_VIDEO_DRIVER_WINRT @SDL_VIDEO_DRIVER_WINRT@ + #cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@ + #cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@ + #cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@ +@@ -392,6 +393,7 @@ + #cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@ + #cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@ + #cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@ ++#cmakedefine SDL_POWER_WINRT @SDL_POWER_WINRT@ + #cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@ + #cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@ + #cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@ +@@ -414,7 +416,7 @@ + #cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@ + + /* Platform specific definitions */ +-#if !defined(__WIN32__) ++#if !defined(__WIN32__) && !defined(__WINRT__) + # if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H) + typedef unsigned int size_t; + typedef signed char int8_t; diff --git a/ports/sdl2/fix-x86-windows.patch b/ports/sdl2/fix-x86-windows.patch new file mode 100644 index 00000000000..853b68722cd --- /dev/null +++ b/ports/sdl2/fix-x86-windows.patch @@ -0,0 +1,15 @@ +diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c +index ff23c5e..fc90bba 100644 +--- a/src/events/SDL_mouse.c ++++ b/src/events/SDL_mouse.c +@@ -20,6 +20,10 @@ + */ + #include "../SDL_internal.h" + ++#ifdef __WIN32__ ++#include "../core/windows/SDL_windows.h" ++#endif ++ + /* General mouse handling code for SDL */ + + #include "SDL_assert.h" diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake index 5d7ac5314d8..4bcfa5a9afc 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -3,16 +3,13 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO SDL-Mirror/SDL - REF release-2.0.8 - SHA512 5922dbeb14bb22991160251664b417d3f846867c18b5ecc1bd19c328ffd69b16252b7d45b9a317bafd1207fdb66d93a022dfb239e02447db9babd941956b6b37 + REF release-2.0.9 + SHA512 444c906c0baa720c86ca72d1b4cd66fdf6f516d5d2a9836169081a2997a5aebaaf9caa687ec060fa02292d79cfa4a62442333e00f90a0239edd1601529f6b056 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/export-symbols-only-in-shared-build.patch - ${CMAKE_CURRENT_LIST_DIR}/enable-winrt-cmake.patch + export-symbols-only-in-shared-build.patch + fix-x86-windows.patch + enable-winrt-cmake.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC) @@ -75,5 +72,6 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME) endforeach() endif() -file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2 RENAME copyright) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2) +configure_file(${SOURCE_PATH}/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/sdl2/copyright COPYONLY) vcpkg_copy_pdbs() diff --git a/ports/sdl2/vcpkg-cmake-wrapper.cmake b/ports/sdl2/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000..c99178db1a1 --- /dev/null +++ b/ports/sdl2/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,8 @@ +_find_package(${ARGS}) +if(TARGET SDL2::SDL2 AND NOT TARGET SDL2::SDL2-static) + add_library( SDL2::SDL2-static INTERFACE IMPORTED) + set_target_properties(SDL2::SDL2-static PROPERTIES INTERFACE_LINK_LIBRARIES "SDL2::SDL2") +elseif(TARGET SDL2::SDL2-static AND NOT TARGET SDL2::SDL2) + add_library( SDL2::SDL2 INTERFACE IMPORTED) + set_target_properties(SDL2::SDL2 PROPERTIES INTERFACE_LINK_LIBRARIES "SDL2::SDL2-static") +endif() diff --git a/ports/sdl2pp/CONTROL b/ports/sdl2pp/CONTROL new file mode 100644 index 00000000000..19fecb09201 --- /dev/null +++ b/ports/sdl2pp/CONTROL @@ -0,0 +1,4 @@ +Source: sdl2pp +Version: 0.16.0-1 +Description: C++11 bindings/wrapper for SDL2 https://sdl2pp.amdmi3.ru +Build-Depends: sdl2, sdl2-mixer, sdl2-image, sdl2-ttf diff --git a/ports/sdl2pp/find-debug-libs.patch b/ports/sdl2pp/find-debug-libs.patch new file mode 100644 index 00000000000..282324345e0 --- /dev/null +++ b/ports/sdl2pp/find-debug-libs.patch @@ -0,0 +1,54 @@ +diff --git a/cmake/FindSDL2.cmake b/cmake/FindSDL2.cmake +index 8b2addb..4def5f3 100644 +--- a/cmake/FindSDL2.cmake ++++ b/cmake/FindSDL2.cmake +@@ -8,8 +8,8 @@ + + FIND_PATH(SDL2_INCLUDE_DIR NAMES SDL.h PATH_SUFFIXES SDL2) + +-FIND_LIBRARY(SDL2_LIBRARY NAMES SDL2) +-FIND_LIBRARY(SDL2MAIN_LIBRARY NAMES SDL2main) ++FIND_LIBRARY(SDL2_LIBRARY NAMES SDL2d SDL2) ++FIND_LIBRARY(SDL2MAIN_LIBRARY NAMES SDL2maind SDL2main) + + INCLUDE(FindPackageHandleStandardArgs) + +diff --git a/cmake/FindSDL2_image.cmake b/cmake/FindSDL2_image.cmake +index 88adb3f..d6e829d 100644 +--- a/cmake/FindSDL2_image.cmake ++++ b/cmake/FindSDL2_image.cmake +@@ -8,7 +8,7 @@ + + FIND_PATH(SDL2_IMAGE_INCLUDE_DIR NAMES SDL_image.h PATH_SUFFIXES SDL2) + +-FIND_LIBRARY(SDL2_IMAGE_LIBRARY NAMES SDL2_image) ++FIND_LIBRARY(SDL2_IMAGE_LIBRARY NAMES SDL2_imaged SDL2_image) + + INCLUDE(FindPackageHandleStandardArgs) + +diff --git a/cmake/FindSDL2_mixer.cmake b/cmake/FindSDL2_mixer.cmake +index ef5748b..c2dbbde 100644 +--- a/cmake/FindSDL2_mixer.cmake ++++ b/cmake/FindSDL2_mixer.cmake +@@ -8,7 +8,7 @@ + + FIND_PATH(SDL2_MIXER_INCLUDE_DIR NAMES SDL_mixer.h PATH_SUFFIXES SDL2) + +-FIND_LIBRARY(SDL2_MIXER_LIBRARY NAMES SDL2_mixer) ++FIND_LIBRARY(SDL2_MIXER_LIBRARY NAMES SDL2_mixerd SDL2_mixer) + + INCLUDE(FindPackageHandleStandardArgs) + +diff --git a/cmake/FindSDL2_ttf.cmake b/cmake/FindSDL2_ttf.cmake +index b480d55..9fb65b9 100644 +--- a/cmake/FindSDL2_ttf.cmake ++++ b/cmake/FindSDL2_ttf.cmake +@@ -8,7 +8,7 @@ + + FIND_PATH(SDL2_TTF_INCLUDE_DIR NAMES SDL_ttf.h PATH_SUFFIXES SDL2) + +-FIND_LIBRARY(SDL2_TTF_LIBRARY NAMES SDL2_ttf) ++FIND_LIBRARY(SDL2_TTF_LIBRARY NAMES SDL2_ttfd SDL2_ttf) + + INCLUDE(FindPackageHandleStandardArgs) + diff --git a/ports/sdl2pp/portfile.cmake b/ports/sdl2pp/portfile.cmake new file mode 100644 index 00000000000..7fbaf9c693a --- /dev/null +++ b/ports/sdl2pp/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libSDL2pp/libSDL2pp + REF 0.16.0 + SHA512 36603a0b1c3ba9294fffa5368357866e5689ceed9743352ff52c096d8b0070cc3f8708a5e837c10c871b410b6bda3ed7e8e3b95cb9afc136d91afb035cde6361 + HEAD_REF master + PATCHES "${CMAKE_CURRENT_LIST_DIR}/find-debug-libs.patch" +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL2PP_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSDL2PP_WITH_EXAMPLES=OFF + -DSDL2PP_WITH_TESTS=OFF + -DSDL2PP_STATIC=${SDL2PP_STATIC} +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2pp RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/selene/CONTROL b/ports/selene/CONTROL new file mode 100644 index 00000000000..ddf9e22ea57 --- /dev/null +++ b/ports/selene/CONTROL @@ -0,0 +1,4 @@ +Source: selene +Version: 0.1.1 +Description: A C++14 image representation, processing and I/O library. +Build-Depends: zlib, libpng, libjpeg-turbo diff --git a/ports/selene/portfile.cmake b/ports/selene/portfile.cmake new file mode 100644 index 00000000000..c292a64d1b1 --- /dev/null +++ b/ports/selene/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/selene-0.1.1) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(SELENE_EXPORT_SYMBOLS TRUE) +else() + set(SELENE_EXPORT_SYMBOLS FALSE) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kmhofmann/selene + REF v0.1.1 + SHA512 7738c7b803ae6178f0099b2db2148d20edeff01c524e108e724896201800d82d3852a1ab7d0bd697907673d7030c55c81411f77bb957a0ee3811c46d07104c3e + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=${SELENE_EXPORT_SYMBOLS} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/${PORT}") +vcpkg_copy_pdbs() + +# Include files should not be duplicated into the /debug/include directory. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/selene RENAME copyright) \ No newline at end of file diff --git a/ports/sery/CONTROL b/ports/sery/CONTROL deleted file mode 100644 index 1a771771b8a..00000000000 --- a/ports/sery/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: sery -Version: 1.0.0-1 -Description: Simple binary (de)serialization library diff --git a/ports/sery/portfile.cmake b/ports/sery/portfile.cmake deleted file mode 100644 index d6ebad5b69e..00000000000 --- a/ports/sery/portfile.cmake +++ /dev/null @@ -1,32 +0,0 @@ -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(STATUS "Warning: Dynamic building not supported yet. Building static.") - set(VCPKG_LIBRARY_LINKAGE static) -endif() -include(vcpkg_common_functions) -SET(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/Sery-1.0") -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Ninetainedo/Sery/archive/v1.0.zip" - FILENAME "sery-1.0.0.zip" - SHA512 15ef97bf094e8931049d8dd667a778e23847555f0f8d5b949b250e26edcc2541744fac5c34d935880d070546777fa787b1baf018d8ca2240fcd18a820aded04f -) -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() - -# Removes unnecessary directories -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) - -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sery) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/sery/LICENSE ${CURRENT_PACKAGES_DIR}/share/sery/copyright) - -# Moves cmake files where appropriate -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/share/sery/cmake) diff --git a/ports/sfgui/CONTROL b/ports/sfgui/CONTROL index 39962e0e5b5..59a7cdab3d4 100644 --- a/ports/sfgui/CONTROL +++ b/ports/sfgui/CONTROL @@ -1,4 +1,4 @@ Source: sfgui -Version: 0.3.2-1 +Version: 0.3.2-2 Description: simple and fast graphical user interface library Build-Depends: sfml diff --git a/ports/sfgui/portfile.cmake b/ports/sfgui/portfile.cmake index 7764a60a12a..66ce7d83034 100644 --- a/ports/sfgui/portfile.cmake +++ b/ports/sfgui/portfile.cmake @@ -6,15 +6,12 @@ vcpkg_from_github( REF 0.3.2 SHA512 cd97e421695f6189995c1b7a4180e3738bf785abae37d3eb51ac6d687a88a26a1f088863b37e065edaff6ba43eea379e423b31118324c4daa65dba0b3e904869 HEAD_REF master + PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-sfml-targets.patch" ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(SFGUI_BUILD_SHARED_LIBS ON) - set(SFML_STATIC_LIBRARIES OFF) -else() - set(SFGUI_BUILD_SHARED_LIBS OFF) - set(SFML_STATIC_LIBRARIES ON) -endif() +file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindSFML.cmake) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SFGUI_BUILD_SHARED_LIBS) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -23,7 +20,6 @@ vcpkg_configure_cmake( -DSFGUI_BUILD_DOC=OFF -DSFGUI_BUILD_EXAMPLES=OFF -DSFGUI_BUILD_SHARED_LIBS=${SFGUI_BUILD_SHARED_LIBS} - -DSFML_STATIC_LIBRARIES=${SFML_STATIC_LIBRARIES} ) vcpkg_install_cmake() diff --git a/ports/sfgui/use-sfml-targets.patch b/ports/sfgui/use-sfml-targets.patch new file mode 100644 index 00000000000..337949f5ad8 --- /dev/null +++ b/ports/sfgui/use-sfml-targets.patch @@ -0,0 +1,44 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index abc9be0..eb999f5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -190,7 +190,6 @@ endif() + + include_directories( "${INCLUDE_PATH}" ) + include_directories( "${SOURCE_PATH}" ) +-include_directories( SYSTEM "${SFML_INCLUDE_DIR}" ) + include_directories( SYSTEM "${PROJECT_SOURCE_DIR}/extlibs/libELL/include" ) + + # Set the library output directory +@@ -244,7 +243,7 @@ if( WIN32 ) + endif() + + add_definitions( -DWIN32 ) +- target_link_libraries( sfgui ${SFML_LIBRARIES} ${SFML_DEPENDENCIES} ${OPENGL_gl_LIBRARY} ) ++ target_link_libraries( sfgui sfml-graphics sfml-window sfml-system ${OPENGL_gl_LIBRARY} ) + + if( CMAKE_COMPILER_IS_GNUCXX ) + if( SFGUI_BUILD_SHARED_LIBS ) +@@ -261,11 +260,11 @@ elseif( APPLE ) + mark_as_advanced( COREFOUNDATION_LIBRARY ) + + include_directories( SYSTEM /System/Library/Frameworks/CoreFoundation.framework/Headers ) +- target_link_libraries( sfgui ${SFML_LIBRARIES} ${SFML_DEPENDENCIES} ${OPENGL_gl_LIBRARY} ${COREFOUNDATION_LIBRARY} ) ++ target_link_libraries( sfgui sfml-graphics sfml-window sfml-system ${OPENGL_gl_LIBRARY} ${COREFOUNDATION_LIBRARY} ) + set( SHARE_PATH "${CMAKE_INSTALL_PREFIX}/share/SFGUI" ) + set( LIB_PATH "lib" ) + elseif( "${CMAKE_SYSTEM_NAME}" MATCHES "Linux" ) +- target_link_libraries( sfgui ${SFML_LIBRARIES} ${SFML_DEPENDENCIES} ${OPENGL_gl_LIBRARY} ${X11_LIBRARIES} ) ++ target_link_libraries( sfgui sfml-graphics sfml-window sfml-system ${OPENGL_gl_LIBRARY} ${X11_LIBRARIES} ) + set( SHARE_PATH "${CMAKE_INSTALL_PREFIX}/share/SFGUI" ) + + if( LIB_SUFFIX ) +@@ -274,7 +273,7 @@ elseif( "${CMAKE_SYSTEM_NAME}" MATCHES "Linux" ) + set( LIB_PATH "lib" ) + endif() + else() +- target_link_libraries( sfgui ${SFML_LIBRARIES} ${SFML_DEPENDENCIES} ${OPENGL_gl_LIBRARY} ) ++ target_link_libraries( sfgui sfml-graphics sfml-window sfml-system ${OPENGL_gl_LIBRARY} ) + set( SHARE_PATH "${CMAKE_INSTALL_PREFIX}/share/SFGUI" ) + set( LIB_PATH "lib" ) + endif() diff --git a/ports/sfml/CMakeLists.txt b/ports/sfml/CMakeLists.txt deleted file mode 100644 index e8e16edec89..00000000000 --- a/ports/sfml/CMakeLists.txt +++ /dev/null @@ -1,122 +0,0 @@ -cmake_minimum_required(VERSION 2.6) -project(SFML) - -include_directories(${PROJECT_SOURCE_DIR}/include) -include_directories(${PROJECT_SOURCE_DIR}/src) - -if(NOT BUILD_SHARED_LIBS) - add_definitions(-DSFML_STATIC) -endif() -add_definitions(-DUNICODE -D_UNICODE) -add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS) - -# import SFML's 'sfml_add_library' macro and find_package utils - -set(VERSION_MAJOR 2) -set(SFML_OS_WINDOWS ON) -set(SFML_GENERATE_PDB ON) -include(cmake/macros.cmake) -set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules/) - -# system module - -file(GLOB SFML_SYSTEM_SOURCES - ${PROJECT_SOURCE_DIR}/src/SFML/System/*.cpp - ${PROJECT_SOURCE_DIR}/src/SFML/System/Win32/*cpp) - -sfml_add_library(sfml-system - SOURCES ${SFML_SYSTEM_SOURCES} - EXTERNAL_LIBS winmm) - -# window module - -file(GLOB SFML_WINDOW_SOURCES - ${PROJECT_SOURCE_DIR}/src/SFML/Window/*.cpp - ${PROJECT_SOURCE_DIR}/src/SFML/Window/Win32/*cpp) - -list(REMOVE_ITEM SFML_WINDOW_SOURCES - ${PROJECT_SOURCE_DIR}/src/SFML/Window/EGLCheck.cpp - ${PROJECT_SOURCE_DIR}/src/SFML/Window/EglContext.cpp) - -sfml_add_library(sfml-window - SOURCES ${SFML_WINDOW_SOURCES} - DEPENDS sfml-system - EXTERNAL_LIBS winmm gdi32 opengl32) - -# network module - -file(GLOB SFML_NETWORK_SOURCES - ${PROJECT_SOURCE_DIR}/src/SFML/Network/*.cpp - ${PROJECT_SOURCE_DIR}/src/SFML/Network/Win32/*cpp) - -sfml_add_library(sfml-network - SOURCES ${SFML_NETWORK_SOURCES} - DEPENDS sfml-system - EXTERNAL_LIBS ws2_32) - -# audio module - -file(GLOB SFML_AUDIO_SOURCES - ${PROJECT_SOURCE_DIR}/src/SFML/Audio/*.cpp) - -find_package(OpenAL REQUIRED) -find_package(Vorbis REQUIRED) -find_package(FLAC REQUIRED) - -sfml_add_library(sfml-audio - SOURCES ${SFML_AUDIO_SOURCES} - DEPENDS sfml-system - EXTERNAL_LIBS ${OPENAL_LIBRARY} ${VORBIS_LIBRARIES} ${FLAC_LIBRARY}) - -target_include_directories(sfml-audio SYSTEM PRIVATE ${OPENAL_INCLUDE_DIR}) -target_include_directories(sfml-audio SYSTEM PRIVATE ${VORBIS_INCLUDE_DIRS}) -target_include_directories(sfml-audio SYSTEM PRIVATE ${FLAC_INCLUDE_DIR}) - -# graphics module - -file(GLOB SFML_GRAPHICS_SOURCES - ${PROJECT_SOURCE_DIR}/src/SFML/Graphics/*.cpp) - -find_package(JPEG REQUIRED) -find_package(Freetype REQUIRED) # fails to find debug lib -if(CMAKE_BUILD_TYPE MATCHES Debug) - find_library(FREETYPE_DEBUG_LIBRARY freetyped) - set(FREETYPE_ACTUAL_LIBRARY ${FREETYPE_DEBUG_LIBRARY}) -else() - set(FREETYPE_ACTUAL_LIBRARY ${FREETYPE_LIBRARY}) -endif() -find_path(STB_HEADERS stb_image.h) - -sfml_add_library(sfml-graphics - SOURCES ${SFML_GRAPHICS_SOURCES} - DEPENDS sfml-system sfml-window - EXTERNAL_LIBS ${FREETYPE_ACTUAL_LIBRARY} ${JPEG_LIBRARY} opengl32) - -target_include_directories(sfml-graphics SYSTEM PRIVATE ${STB_HEADERS}) -target_include_directories(sfml-graphics SYSTEM PRIVATE ${FREETYPE_INCLUDE_DIRS}) -target_include_directories(sfml-graphics SYSTEM PRIVATE ${JPEG_INCLUDE_DIR}) -set_target_properties(sfml-graphics PROPERTIES COMPILE_FLAGS -DSTBI_FAILURE_USERMSG) - -# main module - -add_library(sfml-main STATIC ${PROJECT_SOURCE_DIR}/src/SFML/Main/MainWin32.cpp) -set_target_properties(sfml-main PROPERTIES DEBUG_POSTFIX -d) -install(TARGETS sfml-main ARCHIVE DESTINATION lib) - -# headers - -if(NOT DEFINED SFML_SKIP_HEADERS) - install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include) -endif() - -# log linked libraries - -message(STATUS "Link-time dependencies:") -message(STATUS " " ${VORBIS_LIBRARY}) -message(STATUS " " ${VORBISFILE_LIBRARY}) -message(STATUS " " ${VORBISENC_LIBRARY}) -message(STATUS " " ${OGG_LIBRARY}) -message(STATUS " " ${OPENAL_LIBRARY}) -message(STATUS " " ${FLAC_LIBRARY}) -message(STATUS " " ${FREETYPE_ACTUAL_LIBRARY}) -message(STATUS " " ${JPEG_LIBRARY}) diff --git a/ports/sfml/CONTROL b/ports/sfml/CONTROL index 778638482cf..37130022137 100644 --- a/ports/sfml/CONTROL +++ b/ports/sfml/CONTROL @@ -1,4 +1,4 @@ Source: sfml -Version: 2.4.2-2 +Version: 2.5.1 Description: Simple and fast multimedia library -Build-Depends: freetype, libflac, libjpeg-turbo, libogg, libvorbis, openal-soft, stb +Build-Depends: freetype, libflac, libogg, libvorbis, openal-soft, stb diff --git a/ports/sfml/portfile.cmake b/ports/sfml/portfile.cmake index ea4cfd138c8..22ab3b8a3ca 100644 --- a/ports/sfml/portfile.cmake +++ b/ports/sfml/portfile.cmake @@ -1,37 +1,56 @@ include(vcpkg_common_functions) vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH - REPO "sfml/sfml" - REF "2.4.2" + REPO SFML/SFML + REF 2.5.1 HEAD_REF master - SHA512 8acfdf320939c953a9a3413398f82d02d68a56a337f1366c2677c14ce032baa8ba059113ac3c91bb6e6fc22eef119369a265be7ef6894526e6a97a01f37e1972) - + SHA512 7aed2fc29d1da98e6c4d598d5c86cf536cb4eb5c2079cdc23bb8e502288833c052579dadbe0ce13ad6461792d959bf6d9660229f54c54cf90a541c88c6b03d59 + PATCHES use-system-freetype.patch +) file(REMOVE_RECURSE ${SOURCE_PATH}/extlibs) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +# Without this, we get error: list sub-command REMOVE_DUPLICATES requires list to be present. +file(MAKE_DIRECTORY ${SOURCE_PATH}/extlibs/libs) +file(WRITE ${SOURCE_PATH}/extlibs/libs/x "") +# The embedded FindFreetype doesn't properly handle debug libraries +file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/Modules/FindFreetype.cmake) + +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message("SFML currently requires the following libraries from the system package manager:\n libudev\n libx11\n libxrandr\n opengl\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libxrandr-dev libxi-dev libudev-dev mesa-common-dev") +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS_DEBUG - -DSFML_SKIP_HEADERS=ON) + OPTIONS + -DSFML_BUILD_FRAMEWORKS=OFF + -DSFML_USE_SYSTEM_DEPS=ON + -DSFML_MISC_INSTALL_PREFIX=share/sfml + -DSFML_GENERATE_PDB=OFF +) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SFML) vcpkg_copy_pdbs() -# don't force users to define SFML_STATIC while using static library if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(APPEND ${CURRENT_PACKAGES_DIR}/include/SFML/Config.hpp "#undef SFML_API_IMPORT\n#define SFML_API_IMPORT\n") + FILE(READ ${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake SFML_CONFIG) + FILE(WRITE ${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake "set(SFML_STATIC_LIBRARIES true)\n${SFML_CONFIG}") endif() # move sfml-main to manual link dir -file(COPY ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib) +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib) + file(COPY ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib) + file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib) + file(GLOB FILES "${CURRENT_PACKAGES_DIR}/share/sfml/SFML*Targets-*.cmake") + foreach(FILE ${FILES}) + file(READ "${FILE}" _contents) + string(REPLACE "/lib/sfml-main" "/lib/manual-link/sfml-main" _contents "${_contents}") + file(WRITE "${FILE}" "${_contents}") + endforeach() +endif() -# At the time of writing, HEAD has license.md instead of license.txt -if (VCPKG_HEAD_VERSION) - file(INSTALL ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml RENAME copyright) -else() - file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml RENAME copyright) -endif() \ No newline at end of file +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml RENAME copyright) diff --git a/ports/sfml/use-system-freetype.patch b/ports/sfml/use-system-freetype.patch new file mode 100644 index 00000000000..c58fc1b9577 --- /dev/null +++ b/ports/sfml/use-system-freetype.patch @@ -0,0 +1,13 @@ +diff --git a/src/sfml/Graphics/CMakeLists.txt b/src/sfml/Graphics/CMakeLists.txt +index 883c758..76f3b6f 100644 +--- a/src/sfml/Graphics/CMakeLists.txt ++++ b/src/sfml/Graphics/CMakeLists.txt +@@ -135,7 +135,7 @@ if(SFML_OS_ANDROID) + endif() + + sfml_find_package(Freetype INCLUDE "FREETYPE_INCLUDE_DIRS" LINK "FREETYPE_LIBRARY") +-target_link_libraries(sfml-graphics PRIVATE Freetype) ++target_link_libraries(sfml-graphics PRIVATE Freetype::Freetype) + + # add preprocessor symbols + target_compile_definitions(sfml-graphics PRIVATE "STBI_FAILURE_USERMSG") diff --git a/ports/shaderc/CMakeLists.txt b/ports/shaderc/CMakeLists.txt index 580ffa1d13c..7ecdd03f91e 100644 --- a/ports/shaderc/CMakeLists.txt +++ b/ports/shaderc/CMakeLists.txt @@ -15,8 +15,8 @@ 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") +find_path(glslang_SOURCE_DIR glslang/Include/Common) +set_property(TARGET glslang APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${glslang_SOURCE_DIR}") add_library(OSDependent STATIC IMPORTED GLOBAL) set_property(TARGET OSDependent PROPERTY IMPORTED_LOCATION "${OSDEPENDENT}") diff --git a/ports/shaderc/CMakeLists_spirv.txt b/ports/shaderc/CMakeLists_spirv.txt index 618177fa657..d9e0136012b 100644 --- a/ports/shaderc/CMakeLists_spirv.txt +++ b/ports/shaderc/CMakeLists_spirv.txt @@ -1,14 +1,8 @@ -option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D}) -if(NOT SUFFIX_D) - find_library(SPIRVTOOLSOPT spirv-tools-opt) - find_library(SPIRVTOOLS spirv-tools) -ELSE() - find_library(SPIRVTOOLSOPT spirv-tools-opt) - find_library(SPIRVTOOLS spirv-tools) -ENDIF() +find_library(SPIRVTOOLSOPT SPIRV-Tools-opt) +find_library(SPIRVTOOLS SPIRV-Tools) add_library(SPIRV-Tools-opt STATIC IMPORTED GLOBAL) set_property(TARGET SPIRV-Tools-opt PROPERTY IMPORTED_LOCATION "${SPIRVTOOLSOPT}") add_library(SPIRV-Tools STATIC IMPORTED GLOBAL) -set_property(TARGET SPIRV-Tools PROPERTY IMPORTED_LOCATION "${SPIRVTOOLS}") \ No newline at end of file +set_property(TARGET SPIRV-Tools PROPERTY IMPORTED_LOCATION "${SPIRVTOOLS}") diff --git a/ports/shaderc/CONTROL b/ports/shaderc/CONTROL index 5a5c2c58003..c428c0ea9e8 100644 --- a/ports/shaderc/CONTROL +++ b/ports/shaderc/CONTROL @@ -1,4 +1,4 @@ Source: shaderc -Version: 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da-1 +Version: 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da-2 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 2b925455b50..d3ed5d02387 100644 --- a/ports/shaderc/portfile.cmake +++ b/ports/shaderc/portfile.cmake @@ -1,11 +1,3 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# 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) vcpkg_from_github( @@ -14,11 +6,8 @@ vcpkg_from_github( REF 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da SHA512 6fb45a0b01e6709c44a11658648b9271fe06bd94023dcc5042c47b5f2a04889c2efb0ab4c166f18728594ac9b9aa9f8b354af46d88eb7f7c39c7246f52f5a933 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Do-not-generate-build-version.inc.patch + PATCHES + 0001-Do-not-generate-build-version.inc.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/third_party/glslang) @@ -36,11 +25,11 @@ endif() # shaderc uses python to manipulate copyright information vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +vcpkg_add_to_path(PREPEND "${PYTHON3_EXE_PATH}") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DSHADERC_SKIP_TESTS=true ${OPTIONS} + OPTIONS -DSHADERC_SKIP_TESTS=true ${OPTIONS} -Dglslang_SOURCE_DIR=${CURRENT_INSTALLED_DIR}/include OPTIONS_DEBUG -DSUFFIX_D=true OPTIONS_RELEASE -DSUFFIX_D=false ) diff --git a/ports/shiva-sfml/CONTROL b/ports/shiva-sfml/CONTROL new file mode 100644 index 00000000000..0bd2f08c2f2 --- /dev/null +++ b/ports/shiva-sfml/CONTROL @@ -0,0 +1,4 @@ +Source: shiva-sfml +Version: 1.0 +Description: shiva-sfml plugins of shiva C++ engine +Build-Depends: sfml (windows), shiva diff --git a/ports/shiva-sfml/portfile.cmake b/ports/shiva-sfml/portfile.cmake new file mode 100644 index 00000000000..d3b8d7d718c --- /dev/null +++ b/ports/shiva-sfml/portfile.cmake @@ -0,0 +1,144 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Milerius/shiva + REF 1.0 + SHA512 d1ce33e89b17fa8f82e21b51dfa1308e38c617fea52c34a20b7b6c8643318280df24c043238ddd73ba2dbc139c5b5de1c2cb3add1f5629a54694c78b415d73d1 + HEAD_REF master + ) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSHIVA_BUILD_TESTS=OFF -DSHIVA_USE_SFML_AS_RENDERER=ON -DSHIVA_INSTALL_PLUGINS=ON -DSHIVA_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + + +if (VCPKG_CMAKE_SYSTEM_NAME) + file(GLOB PLUGINS_RELEASE ${SOURCE_PATH}/bin/Release/systems/*) + file(GLOB PLUGINS_DEBUG ${SOURCE_PATH}/bin/Debug/systems/*) +else() + file(GLOB PLUGINS_RELEASE ${SOURCE_PATH}/bin/Release/systems/*.dll) + file(GLOB PLUGINS_DEBUG ${SOURCE_PATH}/bin/Debug/systems/*.dll) +endif() + +message(STATUS "PLUGINS_RELEASE -> ${PLUGINS_RELEASE}") +message(STATUS "PLUGINS_DEBUG -> ${PLUGINS_DEBUG}") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/shiva-sfml) + + +if (VCPKG_CMAKE_SYSTEM_NAME) + set(SUFFIX_BINARY lib) +else() + set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) + set(SUFFIX_BINARY bin) +endif() + +##! Pre removing +if (VCPKG_CMAKE_SYSTEM_NAME) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) +endif() + +##! Include +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include/shiva-sfml) + +##! Release +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/${SUFFIX_BINARY}) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/${SUFFIX_BINARY}/shiva) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/${SUFFIX_BINARY}/shiva/plugins) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml/Release) + +##! Debug +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/${SUFFIX_BINARY}) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/${SUFFIX_BINARY}/shiva) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/${SUFFIX_BINARY}/shiva/plugins) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml/Debug) + +##! Copy Plugins +file(COPY ${PLUGINS_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml/Release) +file(COPY ${PLUGINS_DEBUG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml/Debug) + +if (NOT VCPKG_CMAKE_SYSTEM_NAME) + find_file(LUADLL lua.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) + find_file(FMTDLL fmt.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) + find_file(FLACDLL FLAC.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) + find_file(FREETYPEDLL freetype.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) + find_file(LIBBZ2DLL libbz2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) + find_file(LIBPNG16DLL libpng16.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) + find_file(OGGDLL ogg.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) + find_file(OPENAL32DLL OpenAL32.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) + find_file(SFMLAUDIO2DLL sfml-audio-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) + find_file(SFMLGRAPHICS2DLL sfml-graphics-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) + find_file(SFMLSYSTEM2DLL sfml-system-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) + find_file(SFMLWINDOW2DLL sfml-window-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) + find_file(VORBISDLL vorbis.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) + find_file(VORBISENCDLL vorbisenc.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) + find_file(VORBISFILEDLL vorbisfile.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) + find_file(ZLIB1DLL zlib1.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/bin) + set(DEPENDANCIES_RELEASE_DLL + ${LUADLL} + ${FMTDLL} + ${FLACDLL} + ${FREETYPEDLL} + ${LIBBZ2DLL} + ${LIBPNG16DLL} + ${OGGDLL} + ${OPENAL32DLL} + ${SFMLAUDIO2DLL} + ${SFMLGRAPHICS2DLL} + ${SFMLSYSTEM2DLL} + ${SFMLWINDOW2DLL} + ${VORBISDLL} + ${VORBISENCDLL} + ${VORBISFILEDLL} + ${ZLIB1DLL}) + + find_file(LUADLL_D lua.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) + find_file(FMTDLL_D fmtd.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) + find_file(FLACDLL_D FLAC.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) + find_file(FREETYPEDLL_D freetyped.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) + find_file(LIBBZ2DLL_D libbz2d.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) + find_file(LIBPNG16DLL_D libpng16d.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) + find_file(OGGDLL_D ogg.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) + find_file(OPENAL32DLL_D OpenAL32.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) + find_file(SFMLAUDIO2DLL_D sfml-audio-d-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) + find_file(SFMLGRAPHICS2DLL_D sfml-graphics-d-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) + find_file(SFMLSYSTEM2DLL_D sfml-system-d-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) + find_file(SFMLWINDOW2DLL_D sfml-window-d-2.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) + find_file(VORBISDLL_D vorbis.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) + find_file(VORBISENCDLL_D vorbisenc.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) + find_file(VORBISFILEDLL_D vorbisfile.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) + find_file(ZLIB1DLL_D zlibd1.dll PATHS ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/bin) + set(DEPENDANCIES_DEBUG_DLL + ${LUADLL_D} + ${FMTDLL_D} + ${FLACDLL_D} + ${FREETYPEDLL_D} + ${LIBBZ2DLL_D} + ${LIBPNG16DLL_D} + ${OGGDLL_D} + ${OPENAL32DLL} + ${SFMLAUDIO2DLL_D} + ${SFMLGRAPHICS2DLL_D} + ${SFMLSYSTEM2DLL_D} + ${SFMLWINDOW2DLL_D} + ${VORBISDLL_D} + ${VORBISENCDLL_D} + ${VORBISFILEDLL_D} + ${ZLIB1DLL_D} + ) + + file(COPY ${DEPENDANCIES_RELEASE_DLL} DESTINATION ${CURRENT_PACKAGES_DIR}/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml/Release) + file(COPY ${DEPENDANCIES_DEBUG_DLL} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml/Debug) +endif() + +file(WRITE ${CURRENT_PACKAGES_DIR}/include/shiva-sfml/empty.h "") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/shiva-sfml/copyright "") diff --git a/ports/shiva/CONTROL b/ports/shiva/CONTROL new file mode 100644 index 00000000000..ef9154a294a --- /dev/null +++ b/ports/shiva/CONTROL @@ -0,0 +1,4 @@ +Source: shiva +Version: 1.0 +Description: Modern C++ Game Engine +Build-Depends: boost-stacktrace, boost-filesystem, boost-dll, entt, lua (windows), luafilesystem (windows), sol2, pybind11, spdlog, nlohmann-json diff --git a/ports/shiva/portfile.cmake b/ports/shiva/portfile.cmake new file mode 100644 index 00000000000..1f64fa220bb --- /dev/null +++ b/ports/shiva/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Milerius/shiva + REF 1.0 + SHA512 d1ce33e89b17fa8f82e21b51dfa1308e38c617fea52c34a20b7b6c8643318280df24c043238ddd73ba2dbc139c5b5de1c2cb3add1f5629a54694c78b415d73d1 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DSHIVA_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/shiva) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/shiva) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/shiva/LICENSE ${CURRENT_PACKAGES_DIR}/share/shiva/copyright) diff --git a/ports/signalrclient/0001_cmake.patch b/ports/signalrclient/0001_cmake.patch index 8096679600e..8002aeab736 100644 --- a/ports/signalrclient/0001_cmake.patch +++ b/ports/signalrclient/0001_cmake.patch @@ -26,7 +26,7 @@ index 8c73730..4cd9074 100644 +else() + file(READ include/signalrclient/_exports.h EXPORTS_H) + string(REPLACE "#ifdef NO_SIGNALRCLIENT_EXPORTS" "#if 1" EXPORTS_H_2 ${EXPORTS_H}) -+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/_exports.h ${EXPORTS_H_2}) ++ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/_exports.h "${EXPORTS_H_2}") + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_exports.h DESTINATION include/signalrclient) +endif() diff --git a/ports/signalrclient/CONTROL b/ports/signalrclient/CONTROL index fe8aa7dc5e0..0b53a8fb233 100644 --- a/ports/signalrclient/CONTROL +++ b/ports/signalrclient/CONTROL @@ -1,4 +1,4 @@ Source: signalrclient -Version: 1.0.0-beta1-3 +Version: 1.0.0-beta1-4 Build-Depends: cpprestsdk Description: C++ client for SignalR. diff --git a/ports/signalrclient/portfile.cmake b/ports/signalrclient/portfile.cmake index 50f6b0b890c..c1dc9b5083a 100644 --- a/ports/signalrclient/portfile.cmake +++ b/ports/signalrclient/portfile.cmake @@ -1,6 +1,4 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SignalR-Client-Cpp-1.0.0-beta1) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -8,10 +6,6 @@ vcpkg_from_github( REF 1.0.0-beta1 SHA512 b38f6f946f1499080071949cbcf574405118f9acfb469441e5b5b0df3e5f0d277a83b30e0d613dc5e54732b9071e3273dac1ee65129f994d5a60eef0e45bdf6c HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch ) diff --git a/ports/simpleini/CONTROL b/ports/simpleini/CONTROL new file mode 100644 index 00000000000..b0c70335f5d --- /dev/null +++ b/ports/simpleini/CONTROL @@ -0,0 +1,3 @@ +Source: simpleini +Version: 2018-08-31-1 +Description: Cross-platform C++ library providing a simple API to read and write INI-style configuration files diff --git a/ports/simpleini/portfile.cmake b/ports/simpleini/portfile.cmake new file mode 100644 index 00000000000..508043cd17a --- /dev/null +++ b/ports/simpleini/portfile.cmake @@ -0,0 +1,14 @@ +# header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO brofield/simpleini + REF fe082fa81f4a55ddceb55056622136be616b3c6f + SHA512 9ba3fc0e5d4d426a7943a6783f3e66203d3b822a9ac6bc2b261e877f70e099495ad22e03fd6ad3dd7aab422192701b2b450ace750ebd3bc6b4e6266c6d15184d + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/simpleini.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/LICENCE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/simpleini RENAME copyright) diff --git a/ports/snowhouse/CONTROL b/ports/snowhouse/CONTROL new file mode 100644 index 00000000000..b376f463911 --- /dev/null +++ b/ports/snowhouse/CONTROL @@ -0,0 +1,3 @@ +Source: snowhouse +Version: 3.0.1 +Description: An assertion library for C++ diff --git a/ports/snowhouse/portfile.cmake b/ports/snowhouse/portfile.cmake new file mode 100644 index 00000000000..229a6e5d5c8 --- /dev/null +++ b/ports/snowhouse/portfile.cmake @@ -0,0 +1,14 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO banditcpp/snowhouse + REF v3.0.1 + SHA512 b20a703e79a2821bdc43b2a235ed7634499f877f9e96bd0d39eb563ce5c94d4577449cc15dc850176a1b44eb55cf3425885cb4d46a92444a7aa3001ce5d0a3eb + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/snowhouse DESTINATION ${CURRENT_PACKAGES_DIR}/include/ FILES_MATCHING PATTERN *.h) + +file(COPY ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/snowhouse) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/snowhouse/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/snowhouse/copyright) \ No newline at end of file diff --git a/ports/so5extra/CONTROL b/ports/so5extra/CONTROL new file mode 100644 index 00000000000..41bed72c83e --- /dev/null +++ b/ports/so5extra/CONTROL @@ -0,0 +1,4 @@ +Source: so5extra +Version: 1.2.1 +Description: A set of additional tools for SObjectizer framework. +Build-Depends: sobjectizer diff --git a/ports/so5extra/portfile.cmake b/ports/so5extra/portfile.cmake new file mode 100644 index 00000000000..3d21def42c4 --- /dev/null +++ b/ports/so5extra/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +set(VERSION 1.2.1) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/so_5_extra-${VERSION}/dev/so_5_extra) + +vcpkg_download_distfile(ARCHIVE + URLS "https://sourceforge.net/projects/sobjectizer/files/sobjectizer/so_5_extra/so_5_extra-${VERSION}.zip/download" + FILENAME "so_5_extra-${VERSION}.zip" + SHA512 84294839c800571e98e5599a16609c955296bb10ad90261c5600d3eb13fd1dfc08a7a895e89ad48b3547c9ebe28cd49c944158849a4f1d8e693d8d2259e94100 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DSO5EXTRA_INSTALL=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/so5extra") + +# Remove unnecessary stuff. +# These paths are empty and should be removed too. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/../../LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/so5extra RENAME copyright) diff --git a/ports/sobjectizer/CONTROL b/ports/sobjectizer/CONTROL index 839c2ed42e5..ca08ad3a42d 100644 --- a/ports/sobjectizer/CONTROL +++ b/ports/sobjectizer/CONTROL @@ -1,3 +1,3 @@ Source: sobjectizer -Version: 5.5.22 +Version: 5.5.23 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/sobjectizer/portfile.cmake b/ports/sobjectizer/portfile.cmake index ed6b3f844f1..5ca178ef549 100644 --- a/ports/sobjectizer/portfile.cmake +++ b/ports/sobjectizer/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions) -set(VERSION 5.5.22) +set(VERSION 5.5.23) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/so-${VERSION}/dev) vcpkg_download_distfile(ARCHIVE URLS "https://sourceforge.net/projects/sobjectizer/files/sobjectizer/SObjectizer%20Core%20v.5.5/so-${VERSION}.zip" FILENAME "so-${VERSION}.zip" - SHA512 0f7c109a890fc4271a4f45ff009811d5d7479cec86ce8f6a312979bfd07a55e46069511d7868e1c7bf29e5ff6495d22d71fd3ba2b1253b2fb9299657d7b0384d + SHA512 61c2b9e42d88eafef67b38a1b517af7cbda131835d8ae60c914bd89d21e84801278292064c7ad823c0b31a376b0db68f1ee4a7e87892c2f166c39e8068d86122 ) vcpkg_extract_source_archive(${ARCHIVE}) diff --git a/ports/soci/CONTROL b/ports/soci/CONTROL index 1d1708a6432..41b3d41906b 100644 --- a/ports/soci/CONTROL +++ b/ports/soci/CONTROL @@ -1,3 +1,4 @@ Source: soci -Version: 2016.10.22-1 +Version: 3.2.3-1 +Build-Depends: sqlite3 Description: SOCI database access library diff --git a/ports/soci/no-define-snprintf.patch b/ports/soci/no-define-snprintf.patch new file mode 100644 index 00000000000..ab6db0d1a50 --- /dev/null +++ b/ports/soci/no-define-snprintf.patch @@ -0,0 +1,14 @@ +diff --git a/src/core/soci-platform.h b/src/core/soci-platform.h +index aa5e4b1..2d8c5c7 100644 +--- a/src/core/soci-platform.h ++++ b/src/core/soci-platform.h +@@ -24,7 +24,9 @@ + #endif + + // Define if you have the snprintf variants. ++#if _MSC_VER < 1900 + #define snprintf _snprintf ++#endif + + // Define if you have the strtoll and strtoull variants. + #if _MSC_VER < 1300 diff --git a/ports/soci/portfile.cmake b/ports/soci/portfile.cmake index 0358297c542..b26355293a4 100644 --- a/ports/soci/portfile.cmake +++ b/ports/soci/portfile.cmake @@ -1,53 +1,44 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# 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/soci-6eb1a3e9775ab7cdbf0f7f5aa5891792313cd8d9) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/SOCI/soci/archive/6eb1a3e9775ab7cdbf0f7f5aa5891792313cd8d9.zip" - FILENAME "soci-master-2016.10.22.zip" - SHA512 6bb0f7d3442de627089760485d3e663f12873b4871c4b4b4dfac5d380bad014865ac8382f7356e02514e9140f187dea8dcf8d6c25ac9c3e827e9fa69e9ed13b5 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SOCI/soci + REF 3.2.3 + SHA512 8c597b37efe82c85e6d951f66cb0f818d2c12cb673914bc7b322bc0a9da676e6c02f221c9104fb06d1b4b02fed4e5a4fb872dd3370b9117f248c3b948faf4fb3 + HEAD_REF master + PATCHES "${CMAKE_CURRENT_LIST_DIR}/no-define-snprintf.patch" ) -vcpkg_extract_source_archive(${ARCHIVE}) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(SOCI_STATIC OFF) - set(SOCI_DYNAMIC ON) -elseif(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(SOCI_STATIC ON) - set(SOCI_DYNAMIC OFF) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SOCI_DYNAMIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SOCI_STATIC) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH ${SOURCE_PATH}/src + PREFER_NINJA OPTIONS -DSOCI_TESTS=OFF -DSOCI_CXX_C11=ON - -DSOCI_LIBDIR=lib # This is to always have output in the lib folder and not lib64 for 64-bit builds + -DSOCI_LIBDIR:STRING=lib # This is to always have output in the lib folder and not lib64 for 64-bit builds + -DLIBDIR:STRING=lib -DSOCI_STATIC=${SOCI_STATIC} -DSOCI_SHARED=${SOCI_DYNAMIC} + + -DWITH_SQLITE3=ON + + -DWITH_BOOST=OFF + -DWITH_MYSQL=OFF + -DWITH_ODBC=OFF + -DWITH_ORACLE=OFF + -DWITH_POSTGRESQL=OFF + -DWITH_FIREBIRD=OFF + -DWITH_DB2=OFF ) vcpkg_install_cmake() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/soci) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/SOCI.cmake ${CURRENT_PACKAGES_DIR}/share/soci/SOCIConfig.cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/SOCI-release.cmake ${CURRENT_PACKAGES_DIR}/share/soci/SOCI-release.cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/cmake/SOCI-debug.cmake ${CURRENT_PACKAGES_DIR}/share/soci/SOCI-debug.cmake) -file(READ ${CURRENT_PACKAGES_DIR}/share/soci/SOCIConfig.cmake CONFIG_FILE) -set(pattern "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\n") -string(REPLACE "${pattern}" "${pattern}${pattern}" CONFIG_FILE ${CONFIG_FILE}) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/soci/SOCIConfig.cmake ${CONFIG_FILE}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/soci) +file(COPY ${SOURCE_PATH}/src/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/soci) file(RENAME ${CURRENT_PACKAGES_DIR}/share/soci/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/soci/copyright) vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/socket-io-client/CONTROL b/ports/socket-io-client/CONTROL new file mode 100644 index 00000000000..92a5f20c877 --- /dev/null +++ b/ports/socket-io-client/CONTROL @@ -0,0 +1,4 @@ +Source: socket-io-client +Version: 1.6.1 +Description: C++11 implementation of Socket.IO client +Build-Depends: boost, rapidjson, websocketpp diff --git a/ports/socket-io-client/portfile.cmake b/ports/socket-io-client/portfile.cmake new file mode 100644 index 00000000000..eed7a4d6532 --- /dev/null +++ b/ports/socket-io-client/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO socketio/socket.io-client-cpp + REF 1.6.1 + SHA512 01c9c172e58a16b25af07c6bde593507792726aca28a9b202ed9531d51cd7e77c7e7d536102e50265d66de96e9708616075902dfdcfc72983758755381bad707 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/build/include + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN "*.h") + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/socket-io-client/copyright COPYONLY) diff --git a/ports/soil/CMakeLists.txt b/ports/soil/CMakeLists.txt new file mode 100644 index 00000000000..5cee52a6001 --- /dev/null +++ b/ports/soil/CMakeLists.txt @@ -0,0 +1,50 @@ +cmake_minimum_required(VERSION 3.8) + +project(SOIL C) + +option(INSTALL_HEADERS "Install header files" ON) + +set(INSTALL_CMAKE_DIR share/soil) + +add_library(SOIL STATIC + src/image_helper.c + src/stb_image_aug.c + src/image_DXT.c + src/SOIL.c) + +target_include_directories(SOIL INTERFACE $) + +if(INSTALL_HEADERS) + install(TARGETS SOIL + EXPORT SOILTargets + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + + install(FILES src/SOIL.h + DESTINATION include/SOIL/) + + # Prepare and install package files + set(SOIL_VERSION "2018.7.7") + + export(TARGETS SOIL FILE "${PROJECT_BINARY_DIR}/SOILTargets.cmake") + + export(PACKAGE SOIL) + + # Create the SOILConfig.cmake and SOILConfigVersion files + configure_file(SOILConfig.cmake.in "${PROJECT_BINARY_DIR}/SOILConfig.cmake" @ONLY) + configure_file(SOILConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/SOILConfigVersion.cmake" @ONLY) + + # Install the SOILConfig.cmake and SOILConfigVersion.cmake + install(FILES + "${PROJECT_BINARY_DIR}/SOILConfig.cmake" + "${PROJECT_BINARY_DIR}/SOILConfigVersion.cmake" + DESTINATION "${INSTALL_CMAKE_DIR}") + + # Install the export set for use with the install-tree + install(EXPORT SOILTargets DESTINATION + "${INSTALL_CMAKE_DIR}") +else() + install(TARGETS SOIL + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) +endif() diff --git a/ports/soil/CONTROL b/ports/soil/CONTROL new file mode 100644 index 00000000000..4128570256a --- /dev/null +++ b/ports/soil/CONTROL @@ -0,0 +1,3 @@ +Source: soil +Version: 2008.07.07-1 +Description: Simple OpenGL Image Library diff --git a/ports/soil/LICENSE b/ports/soil/LICENSE new file mode 100644 index 00000000000..22f05fdf9ff --- /dev/null +++ b/ports/soil/LICENSE @@ -0,0 +1,6 @@ +https://www.lonesock.net/soil.html + +Simple OpenGL Image Library + +License: +Public Domain diff --git a/ports/soil/SOILConfig.cmake.in b/ports/soil/SOILConfig.cmake.in new file mode 100644 index 00000000000..730e8879fb8 --- /dev/null +++ b/ports/soil/SOILConfig.cmake.in @@ -0,0 +1,13 @@ +# - Config file for the SOIL package +# It defines the following variables +# SOIL_INCLUDE_DIRS - include directories for SOIL +# SOIL_LIBRARIES - libraries to link against + +# Load targets +get_filename_component(SOIL_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +include("${SOIL_CMAKE_DIR}/SOILTargets.cmake") + +# Set properties +get_target_property(SOIL_INCLUDE_DIRS SOIL INTERFACE_INCLUDE_DIRECTORIES) +set(SOIL_LIBRARIES SOIL) +mark_as_advanced(SOIL_INCLUDE_DIRS SOIL_LIBRARIES) diff --git a/ports/soil/SOILConfigVersion.cmake.in b/ports/soil/SOILConfigVersion.cmake.in new file mode 100644 index 00000000000..1e3e04965e5 --- /dev/null +++ b/ports/soil/SOILConfigVersion.cmake.in @@ -0,0 +1,11 @@ +set(PACKAGE_VERSION "@SOIL_VERSION@") + +# Check whether the requested PACKAGE_FIND_VERSION is compatible +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/ports/soil/portfile.cmake b/ports/soil/portfile.cmake new file mode 100644 index 00000000000..69073e22dfe --- /dev/null +++ b/ports/soil/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/Simple OpenGL Image Library") +vcpkg_download_distfile(ARCHIVE + URLS "http://www.lonesock.net/files/soil.zip" + FILENAME "soil-2008.07.07.zip" + SHA512 a575a84aa65b7556320779d635561341f5cf156418d0462473e5d1eb082829be3bcb30600b4887af75aeddd3715de16bdb3ca1668ebaa93eea62bacf22b79548 +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/SOILConfig.cmake.in + ${CMAKE_CURRENT_LIST_DIR}/SOILConfigVersion.cmake.in + ${CMAKE_CURRENT_LIST_DIR}/LICENSE + DESTINATION ${SOURCE_PATH} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/soil RENAME copyright) diff --git a/ports/sol/CONTROL b/ports/sol2/CONTROL similarity index 68% rename from ports/sol/CONTROL rename to ports/sol2/CONTROL index 42b1be455e1..9534432da57 100644 --- a/ports/sol/CONTROL +++ b/ports/sol2/CONTROL @@ -1,3 +1,4 @@ -Source: sol -Version: 2.19.5 +Source: sol2 +Version: 2.20.4 Description: Sol v2.0 - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great +Build-Depends: lua (windows) \ No newline at end of file diff --git a/ports/sol2/portfile.cmake b/ports/sol2/portfile.cmake new file mode 100644 index 00000000000..403e9e6465f --- /dev/null +++ b/ports/sol2/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ThePhD/sol2 + REF 7f1c2e3ecfc2b78e396c60e067f6486ae1df66c5 + SHA512 a7e84d3eca26fb3cd4eb73ce0daa2f6f41136e9e919f27713d2d903ec7793017dfd87e7c4fdf54b9ee9b601da1412dad02a191dd614661dfa96da521dfc58a65 + HEAD_REF develop +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sol2) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sol2 RENAME copyright) diff --git a/ports/spaceland/CONTROL b/ports/spaceland/CONTROL new file mode 100644 index 00000000000..2baf3463316 --- /dev/null +++ b/ports/spaceland/CONTROL @@ -0,0 +1,4 @@ +Source: spaceland +Version: 7.8.2-0 +Description: Spaceland Lib (sl) is a suite for geometric computation, specifically adapted to OpenGL. +Build-Depends: zlib diff --git a/ports/spaceland/portfile.cmake b/ports/spaceland/portfile.cmake new file mode 100644 index 00000000000..d22276d6016 --- /dev/null +++ b/ports/spaceland/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(STATUS "WARNING: Dynamic building not supported. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sl-7.8.2-Source) + +vcpkg_download_distfile(ARCHIVE + URLS "http://vic.crs4.it/vic/download/pkgs/sl-7.8.2-Source.tar.gz" + FILENAME "sl-7.8.2-Source.tar.gz" + SHA512 1391dac1474ddb47d0cf0eb7baeb7db68d6356c2116f732dd57b8a050739523282ded0643cc466640f2b22f25dd6bfced00ede4e041b7ff83754a99ae6725d7d +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DSL_TEST=OFF + -DSL_INSTALL_SLFIND_MODULE=OFF + OPTIONS_DEBUG + -DSL_TEST=OFF + -DSL_INSTALL_SLFIND_MODULE=OFF +) + +vcpkg_install_cmake() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle license +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/spaceland) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/spaceland/COPYING ${CURRENT_PACKAGES_DIR}/share/spaceland/license) + +# Handle copyright +file(COPY ${SOURCE_PATH}/copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/spaceland) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/spaceland/copyright.txt ${CURRENT_PACKAGES_DIR}/share/spaceland/copyright) diff --git a/ports/spatialite-tools/portfile.cmake b/ports/spatialite-tools/portfile.cmake index 6bfd19966dd..25de070ee58 100644 --- a/ports/spatialite-tools/portfile.cmake +++ b/ports/spatialite-tools/portfile.cmake @@ -23,7 +23,7 @@ if(VCPKG_CRT_LINKAGE STREQUAL dynamic) set(CL_FLAGS_DBG "/MDd /Zi") set(CL_FLAGS_REL "/MD /Ox") set(GEOS_LIBS_REL "${LDIR}/lib/geos_c.lib") - set(GEOS_LIBS_DBG "${LDIR}/debug/lib/geos_c.lib") + set(GEOS_LIBS_DBG "${LDIR}/debug/lib/geos_cd.lib") set(LIBXML2_LIBS_REL "${LDIR}/lib/libxml2.lib") set(LIBXML2_LIBS_DBG "${LDIR}/debug/lib/libxml2.lib") set(SPATIALITE_LIBS_REL "${LDIR}/lib/spatialite.lib") diff --git a/ports/spdlog/CONTROL b/ports/spdlog/CONTROL index 1bb6b3ebfd9..8ff960a23ee 100644 --- a/ports/spdlog/CONTROL +++ b/ports/spdlog/CONTROL @@ -1,4 +1,4 @@ Source: spdlog -Version: 0.16.3 +Version: 1.2.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 a7d13527e5e..21f3121e9ea 100644 --- a/ports/spdlog/portfile.cmake +++ b/ports/spdlog/portfile.cmake @@ -3,9 +3,9 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gabime/spdlog - REF v0.16.3 - SHA512 6e08473825cf97dfb10b0e919b77996c1023bbfb583d851e961ec4a95094e4afffd1fc6f6e7e728ce8c2c69c9fb280c59f8d6494b50224bdf8cc68914ffd21e8 - HEAD_REF master + REF v1.2.1 + SHA512 418f91efc207fa227558212d82c41639c0bb59e84ea47447e0b6276c4842e97f1f8aaf5802c071ef15d80ec525e317e70b6a39661a6c96ab39d33d9bd1570da1 + HEAD_REF v1.x ) vcpkg_configure_cmake( @@ -17,9 +17,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -# Move cmake files, ensuring they will be 3 directories up the import prefix -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/spdlog) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/spdlog/ ${CURRENT_PACKAGES_DIR}/share/spdlog/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/spdlog) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) diff --git a/ports/spirv-cross/CONTROL b/ports/spirv-cross/CONTROL new file mode 100644 index 00000000000..cfba267dd95 --- /dev/null +++ b/ports/spirv-cross/CONTROL @@ -0,0 +1,3 @@ +Source: spirv-cross +Version: 2018-08-07-1 +Description: SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages. diff --git a/ports/spirv-cross/portfile.cmake b/ports/spirv-cross/portfile.cmake new file mode 100644 index 00000000000..8ed881d416d --- /dev/null +++ b/ports/spirv-cross/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/SPIRV-Cross + REF 2018-08-07 + SHA512 1ac6ee6b2864d950199d4e856ae1576f9435827501baa5d53821a973cd68aaa03ec428094bf74c570784997baac5b2e3802ddc7f02844e2ee546741fa726bf91 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +foreach(COMPONENT core cpp glsl hlsl msl reflect util) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/spirv_cross_${COMPONENT}/cmake TARGET_PATH share/spirv_cross_${COMPONENT}) +endforeach() + +# cleanup +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/spirv-cross/copyright COPYONLY) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) diff --git a/ports/spirv-tools/portfile.cmake b/ports/spirv-tools/portfile.cmake index 5120dc4f1b4..11d332a3926 100644 --- a/ports/spirv-tools/portfile.cmake +++ b/ports/spirv-tools/portfile.cmake @@ -1,9 +1,6 @@ include(vcpkg_common_functions) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(WARNING "Dynamic not supported. Building static") - set(VCPKG_LIBRARY_LINKAGE "static") -endif() +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -23,12 +20,14 @@ vcpkg_from_github( vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") +vcpkg_add_to_path("${PYTHON3_DIR}") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DSPIRV-Headers_SOURCE_DIR=${SPIRV_HEADERS_PATH} + OPTIONS + -DSPIRV-Headers_SOURCE_DIR=${SPIRV_HEADERS_PATH} + -DSPIRV_WERROR=OFF ) vcpkg_install_cmake() diff --git a/ports/sqlite-modern-cpp/CONTROL b/ports/sqlite-modern-cpp/CONTROL index a70a64a2124..fde7c2eb11a 100644 --- a/ports/sqlite-modern-cpp/CONTROL +++ b/ports/sqlite-modern-cpp/CONTROL @@ -1,4 +1,4 @@ Source: sqlite-modern-cpp -Version: 3.2 +Version: 3.2-e2248fa Build-Depends: sqlite3 Description: The C++14 wrapper around sqlite library diff --git a/ports/sqlite-modern-cpp/portfile.cmake b/ports/sqlite-modern-cpp/portfile.cmake index 7d6c20308a6..d51dc0bd20e 100644 --- a/ports/sqlite-modern-cpp/portfile.cmake +++ b/ports/sqlite-modern-cpp/portfile.cmake @@ -1,12 +1,13 @@ # header only include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sqlite_modern_cpp-3.2) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/aminroosta/sqlite_modern_cpp/archive/v3.2.tar.gz" - FILENAME "sqlite_modern_cpp-3.2.tar.gz" - SHA512 7e54cc41713247c9f6373a441854e8dace8e334e6ee29f870f11bc3fd3b53b5cff4e1a6d4c7e3cda33509b70a3f9a47363922a589b9a6d0730ce6dc0c884d878 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO aminroosta/sqlite_modern_cpp + REF e2248fae15c9e1a240f54d29a148e501f4ea2347 + SHA512 89f0ff234e5600ff5f51cb75934fa71d86b51f4e06f1cf4b7cffc0498985120877f8d58bbdbe02fc3cae212acc071a74cd5a3e44fdaf95c3aeaf79338f43fe9d + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) file(INSTALL ${SOURCE_PATH}/hdr/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/sqlite-orm/CONTROL b/ports/sqlite-orm/CONTROL index 893a0dfe991..5de84f58efd 100644 --- a/ports/sqlite-orm/CONTROL +++ b/ports/sqlite-orm/CONTROL @@ -1,4 +1,4 @@ Source: sqlite-orm -Version: 1.1 +Version: 1.2 Build-Depends: sqlite3 Description: SQLite ORM light header only library for modern C++ diff --git a/ports/sqlite-orm/portfile.cmake b/ports/sqlite-orm/portfile.cmake index 876bbd0e3f9..2e6686bfc16 100644 --- a/ports/sqlite-orm/portfile.cmake +++ b/ports/sqlite-orm/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO fnc12/sqlite_orm - REF v1.1 - SHA512 ebd3c956660b90b1ea64420374db009c68cbab1edd3694d15e953c968190c066e084934327dcf674bcea31e23b14d32c54af7e9ba54f7c6036c3e7cb7cdc6c8d + REF v1.2 + SHA512 b2c87bb643337b5f59d96f8a22e2c6ae040116f51bd86b75e1085d0c06618af131a36d312040d0cf49533269fa840f4e575812b017c7b80b121e1f27825723b5 HEAD_REF master ) diff --git a/ports/sqlite3/CMakeLists.txt b/ports/sqlite3/CMakeLists.txt index b4b105a6550..a2f0aeb03f4 100644 --- a/ports/sqlite3/CMakeLists.txt +++ b/ports/sqlite3/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.10) project(sqlite3 C) include_directories(.) @@ -9,13 +9,20 @@ else() endif() add_library(sqlite3 sqlite3.c) -target_compile_definitions(sqlite3 PRIVATE - $<$:SQLITE_DEBUG> - ${API} - -DSQLITE_ENABLE_RTREE - -DSQLITE_ENABLE_UNLOCK_NOTIFY - ) +target_compile_definitions( + sqlite3 + PRIVATE + $<$:SQLITE_DEBUG> + ${API} + -DSQLITE_ENABLE_RTREE + -DSQLITE_ENABLE_UNLOCK_NOTIFY + -DSQLITE_ENABLE_COLUMN_METADATA +) target_include_directories(sqlite3 INTERFACE $) +if(NOT WIN32) + find_package(Threads REQUIRED) + target_link_libraries(sqlite3 PRIVATE Threads::Threads ${CMAKE_DL_LIBS}) +endif() if(CMAKE_SYSTEM_NAME MATCHES "WindowsStore") target_compile_definitions(sqlite3 PRIVATE -DSQLITE_OS_WINRT=1) @@ -32,11 +39,13 @@ if(NOT SQLITE3_SKIP_TOOLS) ) endif() -install(TARGETS sqlite3 EXPORT sqlite3Config +install( + TARGETS sqlite3 + EXPORT sqlite3 RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) install(FILES sqlite3.h sqlite3ext.h DESTINATION include CONFIGURATIONS Release) -install(EXPORT sqlite3Config DESTINATION share/sqlite3) +install(EXPORT sqlite3 FILE sqlite3-targets.cmake DESTINATION share/sqlite3) diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL index 74d70909bcb..91ea02a14c2 100644 --- a/ports/sqlite3/CONTROL +++ b/ports/sqlite3/CONTROL @@ -1,5 +1,5 @@ Source: sqlite3 -Version: 3.23.1-1 +Version: 3.25.2 Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. Feature: tool diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake index bd7bcc15caa..b2422aecc8c 100644 --- a/ports/sqlite3/portfile.cmake +++ b/ports/sqlite3/portfile.cmake @@ -1,14 +1,19 @@ include(vcpkg_common_functions) -set(SQLITE_VERSION 3230100) -set(SQLITE_HASH 5784f4dea7f14d7dcf5dd07f0e111c8f0b64ff55c68b32a23fba7a36baf1f095c7a35573fc3b57b84822878218b78f9b0187c4e3f0439d4215471ee5f556eee1) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sqlite-amalgamation-${SQLITE_VERSION}) +set(SQLITE_VERSION 3250200) +set(SQLITE_HASH f87b4ab405f85df85b5d63e9e28c4db76202dc2d5461e0d0c626fa7521570d89a1122403c037704859ecb58ac1747ebf4b3c8a2f3a3c3d8492e8060df92e379f) vcpkg_download_distfile(ARCHIVE URLS "https://sqlite.org/2018/sqlite-amalgamation-${SQLITE_VERSION}.zip" FILENAME "sqlite-amalgamation-${SQLITE_VERSION}.zip" - SHA512 ${SQLITE_HASH}) -vcpkg_extract_source_archive(${ARCHIVE}) + SHA512 ${SQLITE_HASH} +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${SQLITE_VERSION} +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -27,14 +32,15 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(READ ${CURRENT_PACKAGES_DIR}/debug/share/sqlite3/sqlite3Config-debug.cmake SQLITE3_DEBUG_CONFIG) - string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" SQLITE3_DEBUG_CONFIG "${SQLITE3_DEBUG_CONFIG}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/sqlite3/sqlite3Config-debug.cmake "${SQLITE3_DEBUG_CONFIG}") -endif() +vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/sqlite3-config.in.cmake + ${CURRENT_PACKAGES_DIR}/share/sqlite3/sqlite3-config.cmake + @ONLY +) + file(WRITE ${CURRENT_PACKAGES_DIR}/share/sqlite3/copyright "SQLite is in the Public Domain.\nhttp://www.sqlite.org/copyright.html\n") vcpkg_copy_pdbs() diff --git a/ports/sqlite3/sqlite3-config.in.cmake b/ports/sqlite3/sqlite3-config.in.cmake new file mode 100644 index 00000000000..538342cf429 --- /dev/null +++ b/ports/sqlite3/sqlite3-config.in.cmake @@ -0,0 +1,7 @@ + +if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT WIN32) + include(CMakeFindDependencyMacro) + find_dependency(Threads) +endif() + +include(${CMAKE_CURRENT_LIST_DIR}/sqlite3-targets.cmake) diff --git a/ports/stlab/CONTROL b/ports/stlab/CONTROL new file mode 100644 index 00000000000..c1a752a5eef --- /dev/null +++ b/ports/stlab/CONTROL @@ -0,0 +1,5 @@ +Source: stlab +Version: 1.3.3 +Description: + stlab is the ongoing work of what was Adobe’s Software Technology Lab. + The Concurrency library provides futures and channels, high level constructs for implementing algorithms that eases the use of multiple CPU cores while minimizing contention. This library solves several problems of the C++11 and C++17 TS futures. \ No newline at end of file diff --git a/ports/stlab/portfile.cmake b/ports/stlab/portfile.cmake new file mode 100644 index 00000000000..a2bd71e5627 --- /dev/null +++ b/ports/stlab/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stlab/libraries + REF v1.3.3 + SHA512 2c0eec5638b40f8285cc3b0d756df619b53ba44421c47713aaf45196100765a31a6aea3c5bedba4fcc44494b74e3f0a919271601e717e7f274fe15beb93f8889 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +# cleanup +file(RENAME ${CURRENT_PACKAGES_DIR}/share/cmake/stlab ${CURRENT_PACKAGES_DIR}/share/stlab) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/cmake) + +# handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/stlab RENAME copyright) \ No newline at end of file diff --git a/ports/string-theory/CONTROL b/ports/string-theory/CONTROL index 04384f8fb19..841f6abefff 100644 --- a/ports/string-theory/CONTROL +++ b/ports/string-theory/CONTROL @@ -1,3 +1,3 @@ Source: string-theory -Version: 1.7 +Version: 2.1 Description: Flexible C++11 string library with type-safe formatting. diff --git a/ports/string-theory/portfile.cmake b/ports/string-theory/portfile.cmake index c986839e16a..3cfb24c9222 100644 --- a/ports/string-theory/portfile.cmake +++ b/ports/string-theory/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zrax/string_theory - REF 1.7 - SHA512 59b367542a0dde727bf58791a94eed1b0f7007d1c661a8e728f3668bb284cadd98a03379cb96dc832e5230b6e991b66b9c8522e3525ed168505d9b930af5d239 + REF 2.1 + SHA512 c20f481ba1bd3f1add2d7ee085db7dfa387e3675df5551e64bf294a96f4902551635e83faf2580fb0d6a55fd5ed1c906510d6cb39580a07234e5638e6c747fe0 HEAD_REF master ) diff --git a/ports/strtk/CONTROL b/ports/strtk/CONTROL index 2fbac574366..613ee7db189 100644 --- a/ports/strtk/CONTROL +++ b/ports/strtk/CONTROL @@ -1,4 +1,4 @@ Source: strtk -Version: 2018.01.01-5579ed1 +Version: 2018.09.30-b887974 Description: robust, optimized and portable string processing algorithms for the C++ language Build-Depends: boost diff --git a/ports/strtk/portfile.cmake b/ports/strtk/portfile.cmake index c5998a538a9..1fed1a4a6d7 100644 --- a/ports/strtk/portfile.cmake +++ b/ports/strtk/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ArashPartow/strtk - REF 5579ed1fa9766a5f9b67ed4773a3f59e7b107093 - SHA512 552ada7aa36fd057003a0fcaeabd3b457bb7b4dbc05ae595b905503d254c95334569c63b7c9f014a174489e56902a38744417b14eaa08f86558e3c66063863b3 + REF b88797408e614ff5a127df12cc520bf41769ada6 + SHA512 3bb5bfc5f12f46180bc7751b865c5ef9120b3c8764ccc86ca2b4b344d6b9d1744e7bd45e9a9202fe4349f8ce75fbb0c37e807cb1e072f5aef28e790ec94646ca ) file(COPY ${SOURCE_PATH}/strtk.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/suitesparse/CONTROL b/ports/suitesparse/CONTROL index 702692497dd..84263e1e8eb 100644 --- a/ports/suitesparse/CONTROL +++ b/ports/suitesparse/CONTROL @@ -1,8 +1,8 @@ -Source: suitesparse -Version: 4.5.5-4 -Build-Depends: clapack -Description: algebra library - -Feature: metis -Build-Depends: metis -Description: Use metis in SuiteSparse +Source: suitesparse +Version: 5.1.2 +Build-Depends: clapack +Description: algebra library + +Feature: metis +Build-Depends: metis +Description: Use metis in SuiteSparse diff --git a/ports/suitesparse/portfile.cmake b/ports/suitesparse/portfile.cmake index 75399609edb..ac479c6cc17 100644 --- a/ports/suitesparse/portfile.cmake +++ b/ports/suitesparse/portfile.cmake @@ -1,92 +1,71 @@ -# 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 = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - -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() - -set(SUITESPARSE_VER SuiteSparse-4.5.5) #if you change the version, becarefull of changing the SHA512 checksum accordingly -set(SUITESPARSEWIN_PATH ${CURRENT_BUILDTREES_DIR}/src/suitesparse-metis-for-windows-1.3.1) -set(SUITESPARSE_PATH ${SUITESPARSEWIN_PATH}/Suitesparse) - -#download suitesparse libary -vcpkg_download_distfile(SUITESPARSE - URLS "http://faculty.cse.tamu.edu/davis/SuiteSparse/${SUITESPARSE_VER}.tar.gz" - FILENAME "${SUITESPARSE_VER}.tar.gz" - SHA512 4337c683027efca6c0800815587409db14db7d70df673451e307eb3ece5538815d06d90f3a831fa45071372f70b6f37eaa68fe951f69dbb52a5bfd84d2dc4913 -) - -#download suitesparse-metis-for-windows scripts, suitesparse does not have CMake build system, jlblancoc has made one for it -vcpkg_download_distfile(SUITESPARSEWIN - URLS "https://github.com/jlblancoc/suitesparse-metis-for-windows/archive/v1.3.1.zip" - FILENAME "suitesparse-metis-for-windows-1.3.1.zip" - SHA512 f8b9377420432f1c0a05bf884fe9e72f1f4eaf7e05663c66a383b5d8ddbd4fbfaa7d433727b4dc3e66b41dbb96b1327d380b68a51a424276465512666e63393d -) - -#extract suitesparse-metis-for-windows first and merge with suitesparse library -vcpkg_extract_source_archive(${SUITESPARSEWIN}) -vcpkg_extract_source_archive(${SUITESPARSE} ${SUITESPARSEWIN_PATH}) - -vcpkg_apply_patches( - SOURCE_PATH ${SUITESPARSEWIN_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install-suitesparse.patch" - PATCHES "${CMAKE_CURRENT_LIST_DIR}/remove-debug-postfix.patch" -) - -set(USE_VCPKG_METIS OFF) -if("metis" IN_LIST FEATURES) - set(USE_VCPKG_METIS ON) -endif() - -vcpkg_configure_cmake( - SOURCE_PATH ${SUITESPARSEWIN_PATH} - PREFER_NINJA - OPTIONS - -DBUILD_METIS=OFF #Disable the option to build metis from source - -DUSE_VCPKG_METIS=${USE_VCPKG_METIS} #Force using vcpckg metis library - -DMETIS_SOURCE_DIR=${CURRENT_INSTALLED_DIR} - -DLIB_POSTFIX= - -DSUITESPARSE_USE_CUSTOM_BLAS_LAPACK_LIBS=ON - -DSUITESPARSE_CUSTOM_BLAS_LIB=${CURRENT_INSTALLED_DIR}/lib/openblas.lib - -DSUITESPARSE_CUSTOM_LAPACK_LIB=${CURRENT_INSTALLED_DIR}/lib/lapack.lib - OPTIONS_DEBUG - -DSUITESPARSE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug - OPTIONS_RELEASE - -DSUITESPARSE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR} -) - -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") - -file(RENAME ${CURRENT_PACKAGES_DIR}/UseSuiteSparse.cmake ${CURRENT_PACKAGES_DIR}/share/suitesparse/UseSuiteSparse.cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/SuiteSparseConfig.cmake ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparseConfig.cmake) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/UseSuiteSparse.cmake) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/SuiteSparseConfig.cmake) - -# Update paths in SuiteSparseConfig.cmake -file(READ ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparseConfig.cmake _contents) -string(REPLACE "set(SuiteSparse_LIB_POSTFIX \"64\")" "set(SuiteSparse_LIB_POSTFIX \"\")" _contents "${_contents}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparseConfig.cmake "${_contents}") - -#clean folders -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -# Handle copyright of suitesparse and suitesparse-metis-for-windows -file(COPY ${SUITESPARSE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/suitesparse) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/suitesparse/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/suitesparse/copyright) - -file(COPY ${SUITESPARSEWIN_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/suitesparse) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/suitesparse/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/suitesparse/copyright_suitesparse-metis-for-windows) +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() + +set(SUITESPARSE_VER SuiteSparse-5.1.2) #if you change the version, becarefull of changing the SHA512 checksum accordingly +set(SUITESPARSEWIN_VER 1.4.0) +set(SUITESPARSEWIN_PATH ${CURRENT_BUILDTREES_DIR}/src/suitesparse-metis-for-windows-${SUITESPARSEWIN_VER}) +set(SUITESPARSE_PATH ${SUITESPARSEWIN_PATH}/Suitesparse) + +#download suitesparse libary +vcpkg_download_distfile(SUITESPARSE + URLS "http://faculty.cse.tamu.edu/davis/SuiteSparse/${SUITESPARSE_VER}.tar.gz" + FILENAME "${SUITESPARSE_VER}.tar.gz" + SHA512 38c7f9847cf161390f73de39ed3d9fd07f7bcec2d6d4e6f141af6a015826215843db9f2e16ca255eeb233c593ffc19ffa04816aa5b6ba200b55b9472ac33ba85 +) + +#download suitesparse-metis-for-windows scripts, suitesparse does not have CMake build system, jlblancoc has made one for it +vcpkg_download_distfile(SUITESPARSEWIN + URLS "https://github.com/jlblancoc/suitesparse-metis-for-windows/archive/v${SUITESPARSEWIN_VER}.zip" + FILENAME "suitesparse-metis-for-windows-${SUITESPARSEWIN_VER}.zip" + SHA512 2859d534200ab9b76fca1530eae5de2f9328aa867c727dbc83a96c6f16e1f87e70123fb2decbb84531d75dac58b6f0ce7323e48c57aeede324fd9a1f77ba74c6 +) + +#extract suitesparse-metis-for-windows first and merge with suitesparse library +vcpkg_extract_source_archive(${SUITESPARSEWIN}) +vcpkg_extract_source_archive(${SUITESPARSE} ${SUITESPARSEWIN_PATH}) + +vcpkg_apply_patches( + SOURCE_PATH ${SUITESPARSEWIN_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install-suitesparse.patch" + PATCHES "${CMAKE_CURRENT_LIST_DIR}/remove-debug-postfix.patch" +) + +set(USE_VCPKG_METIS OFF) +if("metis" IN_LIST FEATURES) + set(USE_VCPKG_METIS ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SUITESPARSEWIN_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_METIS=OFF #Disable the option to build metis from source + -DUSE_VCPKG_METIS=${USE_VCPKG_METIS} #Force using vcpckg metis library + -DMETIS_SOURCE_DIR=${CURRENT_INSTALLED_DIR} + -DLIB_POSTFIX= + -DSUITESPARSE_USE_CUSTOM_BLAS_LAPACK_LIBS=ON + -DSUITESPARSE_CUSTOM_BLAS_LIB=${CURRENT_INSTALLED_DIR}/lib/openblas.lib + -DSUITESPARSE_CUSTOM_LAPACK_LIB=${CURRENT_INSTALLED_DIR}/lib/lapack.lib + OPTIONS_DEBUG + -DSUITESPARSE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug + OPTIONS_RELEASE + -DSUITESPARSE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake") + +#clean folders +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright of suitesparse and suitesparse-metis-for-windows +file(COPY ${SUITESPARSE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/suitesparse) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/suitesparse/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/suitesparse/copyright) + +file(COPY ${SUITESPARSEWIN_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/suitesparse) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/suitesparse/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/suitesparse/copyright_suitesparse-metis-for-windows) diff --git a/ports/sundials/CONTROL b/ports/sundials/CONTROL index 376a430fc9a..7651993bf2f 100644 --- a/ports/sundials/CONTROL +++ b/ports/sundials/CONTROL @@ -1,3 +1,3 @@ Source: sundials -Version: 2.7.0-1 +Version: 3.1.1 Description: SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers) diff --git a/ports/sundials/portfile.cmake b/ports/sundials/portfile.cmake index 141cb3b11b9..6798f027274 100644 --- a/ports/sundials/portfile.cmake +++ b/ports/sundials/portfile.cmake @@ -1,15 +1,21 @@ include(vcpkg_common_functions) -set(ARCHIVE_NAME "sundials-2.7.0") +set(ARCHIVE_NAME "sundials-3.1.1") set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}") vcpkg_download_distfile(ARCHIVE_FILE URLS "https://computation.llnl.gov/projects/sundials/download/${ARCHIVE_NAME}.tar.gz" FILENAME "${ARCHIVE_NAME}.tar.gz" - SHA512 c86c167538065a4109b36ae7c8f60f3d92184133cfa661b5acfccee052c38f40be865412a1746bb57907b61602c212c0f15e1e30ef29e8a49db6d46a75a28e69 + SHA512 3e8fc7183c5503943f1ba00c73b04c1614a48b6e6cb90559ec5481f9acffaa19acd97bd961611b251ebdc032f1a13f0919b0ab0cdfe9d9b4ddc99d40bef5719f ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/uwp-c4703-warning.patch +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DEXAMPLES_ENABLE=OFF @@ -41,6 +47,8 @@ if(DEBUG_DLLS) endif() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sundials RENAME copyright) +file(REMOVE "${CURRENT_PACKAGES_DIR}/LICENSE") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/LICENSE") if(REMOVE_DLLS) file(REMOVE ${REMOVE_DLLS}) diff --git a/ports/sundials/uwp-c4703-warning.patch b/ports/sundials/uwp-c4703-warning.patch new file mode 100644 index 00000000000..3718753cfba --- /dev/null +++ b/ports/sundials/uwp-c4703-warning.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4030f4d..afef556 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -602,6 +602,7 @@ MARK_AS_ADVANCED(FORCE SUNDIALS_DEVTESTS) + + IF(WIN32) + ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) ++ ADD_COMPILE_OPTIONS(/wd4703) # Needed for uwp + ENDIF(WIN32) + + IF(APPLE) diff --git a/ports/tacopie/portfile.cmake b/ports/tacopie/portfile.cmake index d1e30e67e53..a86ca1339b3 100644 --- a/ports/tacopie/portfile.cmake +++ b/ports/tacopie/portfile.cmake @@ -6,10 +6,6 @@ vcpkg_from_github( REF 3.2.0 SHA512 079b294b537aaffe3bcf43a485c3be5b15f633c3f7c70140032d60cb010d35b76e76ef4ddd7596f6bfaf3f7edca7cb086c67552efffbf65846e725d7be54ce72 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch ${CMAKE_CURRENT_LIST_DIR}/fix-export.patch @@ -21,9 +17,11 @@ else() set(MSVC_RUNTIME_LIBRARY_CONFIG "/MT") endif() -# tacopie forcibly removes "/RTC1" in its cmake file. Because this is an ABI-sensitive flag, we need to re-add it in a form that won't be detected. -set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -RTC1") -set(VCPKG_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG} -RTC1") +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + # tacopie forcibly removes "/RTC1" in its cmake file. Because this is an ABI-sensitive flag, we need to re-add it in a form that won't be detected. + set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -RTC1") + set(VCPKG_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG} -RTC1") +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/tbb/CMakeLists.txt b/ports/tbb/CMakeLists.txt new file mode 100644 index 00000000000..cc1dd393371 --- /dev/null +++ b/ports/tbb/CMakeLists.txt @@ -0,0 +1,18 @@ +project(tbb CXX) + +file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*) +file(COPY ${SOURCES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/src) + +include(${CMAKE_CURRENT_BINARY_DIR}/src/cmake/TBBBuild.cmake REQUIRED) +tbb_build(TBB_ROOT ${CMAKE_CURRENT_BINARY_DIR}/src MAKE_ARGS extra_inc=big_iron.inc) + +set(SUBDIR ${CMAKE_CURRENT_BINARY_DIR}/tbb_cmake_build/tbb_cmake_build_subdir) +if(CMAKE_BUILD_TYPE STREQUAL "Release") + set(SUBDIR "${SUBDIR}_release") +else() + set(SUBDIR "${SUBDIR}_debug") +endif() + +file(GLOB OUTPUTS ${SUBDIR}/*.so.* ${SUBDIR}/*.so ${SUBDIR}/*.a ${SUBDIR}/*.dylib ${SUBDIR}/*.dylib.*) + +install(FILES ${OUTPUTS} DESTINATION lib) diff --git a/ports/tbb/CONTROL b/ports/tbb/CONTROL index 0e19d650bff..8aa6dee78a1 100644 --- a/ports/tbb/CONTROL +++ b/ports/tbb/CONTROL @@ -1,3 +1,3 @@ Source: tbb -Version: 2018_U3 +Version: 2018_U6 Description: Intel's Threading Building Blocks. diff --git a/ports/tbb/portfile.cmake b/ports/tbb/portfile.cmake index 4a0b80ec489..a4e91274264 100644 --- a/ports/tbb/portfile.cmake +++ b/ports/tbb/portfile.cmake @@ -1,91 +1,86 @@ -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported yet. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() -if (VCPKG_CRT_LINKAGE STREQUAL static) - message(FATAL_ERROR "TBB does not currently support static crt linkage") +include(vcpkg_common_functions) + +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) endif() -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO 01org/tbb - REF 633b01ad27e012e1dc4e392c3230250d1f4967a4 - SHA512 5576b5e1efa0c7938dc08a1a9503ea19234b20f6a742f3d13a8de19b47f5bdafa1bb855e4de022a4b096a429e66739599a198fdf687c167c659f7556235fa01f - HEAD_REF tbb_2018) + REF 2018_U6 + SHA512 efcd020a24fa41e07ff9232098cecce42ceec5882849bc30edc29ead1694fcc8820a0defb307e0a065c1db1d649a731e13d8cb6fd6f927b4bd3bdc46de0d1709 + HEAD_REF tbb_2018 +) -if(TRIPLET_SYSTEM_ARCH STREQUAL x86) - set(BUILD_ARCH Win32) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + ) + + vcpkg_install_cmake() + + # Settings for TBBConfigForSource.cmake.in + set(TBB_LIB_EXT a) + set(TBB_LIB_PREFIX lib) else() - set(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) + if (VCPKG_CRT_LINKAGE STREQUAL static) + set(RELEASE_CONFIGURATION Release-MT) + set(DEBUG_CONFIGURATION Debug-MT) + else() + set(RELEASE_CONFIGURATION Release) + set(DEBUG_CONFIGURATION Debug) + endif() + + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH build/vs2013/makefile.sln + RELEASE_CONFIGURATION ${RELEASE_CONFIGURATION} + DEBUG_CONFIGURATION ${DEBUG_CONFIGURATION} + ) + # Settings for TBBConfigForSource.cmake.in + set(TBB_LIB_EXT lib) + set(TBB_LIB_PREFIX) endif() -set(TBB_MSBUILD_PROJECT_DIR ${SOURCE_PATH}/build/vs2013) - -vcpkg_build_msbuild(PROJECT_PATH ${TBB_MSBUILD_PROJECT_DIR}/makefile.sln PLATFORM ${BUILD_ARCH}) - -# Installation -message(STATUS "Installing") file(COPY ${SOURCE_PATH}/include/tbb ${SOURCE_PATH}/include/serial DESTINATION ${CURRENT_PACKAGES_DIR}/include) -set(DEBUG_OUTPUT_PATH ${TBB_MSBUILD_PROJECT_DIR}/${BUILD_ARCH}/Debug) -set(RELEASE_OUTPUT_PATH ${TBB_MSBUILD_PROJECT_DIR}/${BUILD_ARCH}/Release) +# Settings for TBBConfigForSource.cmake.in +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(TBB_DEFAULT_COMPONENTS tbb tbbmalloc) +else() + set(TBB_DEFAULT_COMPONENTS tbb tbbmalloc tbbmalloc_proxy) +endif() +file(READ "${SOURCE_PATH}/include/tbb/tbb_stddef.h" _tbb_stddef) +string(REGEX REPLACE ".*#define TBB_VERSION_MAJOR ([0-9]+).*" "\\1" _tbb_ver_major "${_tbb_stddef}") +string(REGEX REPLACE ".*#define TBB_VERSION_MINOR ([0-9]+).*" "\\1" _tbb_ver_minor "${_tbb_stddef}") +string(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_tbb_stddef}") +set(TBB_VERSION "${_tbb_ver_major}.${_tbb_ver_minor}") +set(TBB_RELEASE_DIR "\${_tbb_root}/lib") +set(TBB_DEBUG_DIR "\${_tbb_root}/debug/lib") -file(COPY - ${RELEASE_OUTPUT_PATH}/tbb.lib - ${RELEASE_OUTPUT_PATH}/tbbmalloc.lib - ${RELEASE_OUTPUT_PATH}/tbbmalloc_proxy.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(COPY - ${DEBUG_OUTPUT_PATH}/tbb_debug.lib - ${DEBUG_OUTPUT_PATH}/tbbmalloc_debug.lib - ${DEBUG_OUTPUT_PATH}/tbbmalloc_proxy_debug.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - -file(COPY - ${RELEASE_OUTPUT_PATH}/tbb.dll - ${RELEASE_OUTPUT_PATH}/tbbmalloc.dll - ${RELEASE_OUTPUT_PATH}/tbbmalloc_proxy.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(COPY - ${DEBUG_OUTPUT_PATH}/tbb_debug.dll - ${DEBUG_OUTPUT_PATH}/tbbmalloc_debug.dll - ${DEBUG_OUTPUT_PATH}/tbbmalloc_proxy_debug.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - -vcpkg_copy_pdbs() - -include(${SOURCE_PATH}/cmake/TBBMakeConfig.cmake) -tbb_make_config(TBB_ROOT ${CURRENT_PACKAGES_DIR} - CONFIG_DIR TBB_CONFIG_DIR # is set to ${CURRENT_PACKAGES_DIR}/cmake - SYSTEM_NAME "Windows" - CONFIG_FOR_SOURCE - TBB_RELEASE_DIR "\${_tbb_root}/bin" - TBB_DEBUG_DIR "\${_tbb_root}/debug/bin") - -file(COPY ${TBB_CONFIG_DIR}/TBBConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb) -file(COPY ${TBB_CONFIG_DIR}/TBBConfigVersion.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb) -file(REMOVE_RECURSE ${TBB_CONFIG_DIR}) - -# make it work with our installation layout -file(READ ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake TBB_CONFIG_CMAKE) +configure_file( + ${SOURCE_PATH}/cmake/templates/TBBConfigForSource.cmake.in + ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake + @ONLY +) +file(READ ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake _contents) string(REPLACE -"get_filename_component(_tbb_root \"\${_tbb_root}\" PATH)" -"get_filename_component(_tbb_root \"\${_tbb_root}\" PATH) -get_filename_component(_tbb_root \"\${_tbb_root}\" PATH)" TBB_CONFIG_CMAKE "${TBB_CONFIG_CMAKE}") -string(REPLACE -"\${_tbb_root}/bin/\${_tbb_component}.lib" -"\${_tbb_root}/lib/\${_tbb_component}.lib" TBB_CONFIG_CMAKE "${TBB_CONFIG_CMAKE}") -string(REPLACE -"\${_tbb_root}/debug/bin/\${_tbb_component}_debug.lib" -"\${_tbb_root}/debug/lib/\${_tbb_component}_debug.lib" TBB_CONFIG_CMAKE "${TBB_CONFIG_CMAKE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake "${TBB_CONFIG_CMAKE}") - -message(STATUS "Installing done") + "get_filename_component(_tbb_root \"\${_tbb_root}\" PATH)" + "get_filename_component(_tbb_root \"\${_tbb_root}\" PATH)\nget_filename_component(_tbb_root \"\${_tbb_root}\" PATH)" + _contents + "${_contents}" +) +string(REPLACE "SHARED IMPORTED)" "UNKNOWN IMPORTED)" _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake "${_contents}") # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb) +file(COPY ${SOURCE_PATH}/LICENSE ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb) file(RENAME ${CURRENT_PACKAGES_DIR}/share/tbb/LICENSE ${CURRENT_PACKAGES_DIR}/share/tbb/copyright) + +vcpkg_test_cmake(PACKAGE_NAME TBB) diff --git a/ports/tbb/usage b/ports/tbb/usage new file mode 100644 index 00000000000..ecea9834c9a --- /dev/null +++ b/ports/tbb/usage @@ -0,0 +1,4 @@ +The package tbb provides CMake targets: + + find_package(TBB CONFIG REQUIRED) + target_link_libraries(main PRIVATE TBB::tbb) diff --git a/ports/tesseract/CONTROL b/ports/tesseract/CONTROL index 264a0958475..1c6121c1af8 100644 --- a/ports/tesseract/CONTROL +++ b/ports/tesseract/CONTROL @@ -1,4 +1,4 @@ Source: tesseract -Version: 3.05.01-3 +Version: 3.05.02 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/leptonica.patch b/ports/tesseract/leptonica.patch new file mode 100644 index 00000000000..507721d9d6a --- /dev/null +++ b/ports/tesseract/leptonica.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/templates/TesseractConfig.cmake.in b/cmake/templates/TesseractConfig.cmake.in +index 13838361..245ca2bc 100644 +--- a/cmake/templates/TesseractConfig.cmake.in ++++ b/cmake/templates/TesseractConfig.cmake.in +@@ -21,6 +21,8 @@ + + include(${CMAKE_CURRENT_LIST_DIR}/TesseractTargets.cmake) + ++find_package(Leptonica REQUIRED) ++ + # ====================================================== + # Version variables: + # ====================================================== diff --git a/ports/tesseract/portfile.cmake b/ports/tesseract/portfile.cmake index cebf4316b9d..24e27283c2c 100644 --- a/ports/tesseract/portfile.cmake +++ b/ports/tesseract/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tesseract-ocr/tesseract - REF 3.05.01 - SHA512 a49c20c98386684cd89582e57b772811204fad8e5ff18214fb0da109f73629c70845054985e31e8deeb49107fbcf56e546aff661f08eb5dd60fbf83dbe976e81 + REF 3.05.02 + SHA512 4cb23a6981dd5ec9eefea7b9674847ae88a411a7308ee6d946a920c76eefcf5fe7a90f6cb3ff00493a0e69b5c327d052fa8514d7f3ed506bccbe4b0163065793 HEAD_REF master ) @@ -18,6 +18,7 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/use-vcpkg-icu.patch ${CMAKE_CURRENT_LIST_DIR}/ws2-32.patch + ${CMAKE_CURRENT_LIST_DIR}/leptonica.patch ) # The built-in cmake FindICU is better diff --git a/ports/thor/CONTROL b/ports/thor/CONTROL index cdb393f38ed..4ff531d142a 100644 --- a/ports/thor/CONTROL +++ b/ports/thor/CONTROL @@ -1,4 +1,4 @@ Source: thor -Version: 2.0-1 +Version: 2.0-2 Description: Extends the multimedia library SFML with higher-level features Build-Depends: sfml, aurora diff --git a/ports/thor/portfile.cmake b/ports/thor/portfile.cmake index c96df472848..57285306445 100644 --- a/ports/thor/portfile.cmake +++ b/ports/thor/portfile.cmake @@ -1,45 +1,31 @@ include(vcpkg_common_functions) - - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tests) vcpkg_from_github(ARCHIVE OUT_SOURCE_PATH SOURCE_PATH REPO Bromeon/Thor REF v2.0 SHA512 634fa5286405d9a8a837c082ace98bbb02e609521418935855b9e2fcad57003dbe35088bd771cf6a9292e55d3787f7e463d7a4cca0d0f007509de2520d9a8cf9 HEAD_REF master + PATCHES "${CMAKE_CURRENT_LIST_DIR}/sfml-no-depend-libjpeg.patch" ) +file(REMOVE_RECURSE ${SOURCE_PATH}/extlibs) file(COPY ${CURRENT_INSTALLED_DIR}/include/Aurora DESTINATION ${SOURCE_PATH}/extlibs/aurora/include) +file(WRITE "${SOURCE_PATH}/extlibs/aurora/License.txt") - -set(ENV{SFML_ROOT} ${CURRENT_INSTALLED_DIR}) - -if(VCPKG_CRT_LINKAGE STREQUAL static) - set(THOR_STATIC_STD_LIBS ON) -else() - set(THOR_STATIC_STD_LIBS OFF) -endif() - - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(THOR_SHARED_LIBS ON) -else() - set(THOR_SHARED_LIBS OFF) -endif() +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" THOR_STATIC_STD_LIBS) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" THOR_SHARED_LIBS) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DTHOR_SHARED_LIBS=${THOR_SHARED_LIBS} - -DTHOR_STATIC_STD_LIBS=${THOR_STATIC_STD_LIBS} + -DTHOR_SHARED_LIBS=${THOR_SHARED_LIBS} + -DTHOR_STATIC_STD_LIBS=${THOR_STATIC_STD_LIBS} ) vcpkg_install_cmake() - set(CONFIG_FILE "${CURRENT_PACKAGES_DIR}/include/Thor/Config.hpp") file(READ ${CONFIG_FILE} CONFIG_H) @@ -48,7 +34,6 @@ file(READ ${CONFIG_FILE} CONFIG_H) else() string(REPLACE "defined(SFML_STATIC)" "0" CONFIG_H "${CONFIG_H}") endif() - file(WRITE ${CONFIG_FILE} "${CONFIG_H}") file(GLOB LICENSE diff --git a/ports/thor/sfml-no-depend-libjpeg.patch b/ports/thor/sfml-no-depend-libjpeg.patch new file mode 100644 index 00000000000..7fcf73ff0eb --- /dev/null +++ b/ports/thor/sfml-no-depend-libjpeg.patch @@ -0,0 +1,16 @@ +diff --git a/cmake/Modules/FindSFML.cmake b/cmake/Modules/FindSFML.cmake +index 48873ef..a1834f6 100644 +--- a/cmake/Modules/FindSFML.cmake ++++ b/cmake/Modules/FindSFML.cmake +@@ -312,10 +312,9 @@ if(SFML_STATIC_LIBRARIES) + + # find libraries + find_sfml_dependency(FREETYPE_LIBRARY "FreeType" freetype) +- find_sfml_dependency(JPEG_LIBRARY "libjpeg" jpeg) + + # update the list +- set(SFML_GRAPHICS_DEPENDENCIES ${FREETYPE_LIBRARY} ${JPEG_LIBRARY}) ++ set(SFML_GRAPHICS_DEPENDENCIES ${FREETYPE_LIBRARY}) + set(SFML_DEPENDENCIES ${SFML_GRAPHICS_DEPENDENCIES} ${SFML_DEPENDENCIES}) + endif() + diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 449a6a4caa9..d52f25eba86 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-04-17 +Version: 2018-11-01 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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 81b65cea058..9fb495c84d0 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 4a00fc658a1dc90be33a223a2c7ee336679e8745 - SHA512 b5f380b195498103d0ab4612c1754b29a8dce8e9360e46f5d6dd6daead477c6d2b9b0092ef83a081d937973e21a77fa8b55d5cb7c1d2d5abe71c6b0caa4dae30 + REF 92be4f312b88eac0a4ac450eda29fd20de11b1f0 + SHA512 0c1c7eb30fc63efa483cd9970305b5285c7d6f57151a9e0f602ff757b05cede3adb13688c5d1436c05ffd4bd142ca7676db8e35cbf4d38e9112033f6a2e77ff4 HEAD_REF master ) @@ -42,10 +42,10 @@ vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/thrift RENAME copyright) -file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe") -if(EXES) - file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/thrift) - file(REMOVE ${EXES}) +file(GLOB COMPILER "${CURRENT_PACKAGES_DIR}/bin/thrift*") +if(COMPILER) + file(COPY ${COMPILER} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/thrift) + file(REMOVE ${COMPILER}) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/thrift) endif() diff --git a/ports/tiff/CONTROL b/ports/tiff/CONTROL index 7a91d1d5bc3..86643773733 100644 --- a/ports/tiff/CONTROL +++ b/ports/tiff/CONTROL @@ -1,4 +1,4 @@ Source: tiff -Version: 4.0.9 -Build-Depends: zlib, libjpeg-turbo, liblzma (windows) +Version: 4.0.10 +Build-Depends: zlib, libjpeg-turbo, liblzma (!uwp) Description: A library that supports the manipulation of TIFF image files diff --git a/ports/tiff/portfile.cmake b/ports/tiff/portfile.cmake index e14079c310b..13d8ac7bc1b 100644 --- a/ports/tiff/portfile.cmake +++ b/ports/tiff/portfile.cmake @@ -1,21 +1,20 @@ include(vcpkg_common_functions) -set(LIBTIFF_VERSION 4.0.9) -set(LIBTIFF_HASH 04f3d5eefccf9c1a0393659fe27f3dddd31108c401ba0dc587bca152a1c1f6bc844ba41622ff5572da8cc278593eff8c402b44e7af0a0090e91d326c2d79f6cd) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tiff-${LIBTIFF_VERSION}) +set(LIBTIFF_VERSION 4.0.10) vcpkg_download_distfile(ARCHIVE URLS "http://download.osgeo.org/libtiff/tiff-${LIBTIFF_VERSION}.tar.gz" FILENAME "tiff-${LIBTIFF_VERSION}.tar.gz" - SHA512 ${LIBTIFF_HASH} + SHA512 d213e5db09fd56b8977b187c5a756f60d6e3e998be172550c2892dbdb4b2a8e8c750202bc863fe27d0d1c577ab9de1710d15e9f6ed665aadbfd857525a81eea8 ) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-component-options.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-cxx-shared-libs.patch - ${CMAKE_CURRENT_LIST_DIR}/crt-secure-no-deprecate.patch +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${LIBTIFF_VERSION} + PATCHES + add-component-options.patch + fix-cxx-shared-libs.patch + crt-secure-no-deprecate.patch ) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") @@ -42,10 +41,19 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share ) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/tiff) +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + ${CURRENT_PACKAGES_DIR}/share/tiff + @ONLY +) file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff RENAME copyright ) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff) vcpkg_copy_pdbs() + +vcpkg_test_cmake(PACKAGE_NAME TIFF MODULE) diff --git a/ports/tiff/usage b/ports/tiff/usage new file mode 100644 index 00000000000..d5312603a57 --- /dev/null +++ b/ports/tiff/usage @@ -0,0 +1,4 @@ +The package tiff is compatible with built-in CMake targets: + + find_package(TIFF REQUIRED) + target_link_libraries(main PRIVATE TIFF::TIFF) diff --git a/ports/tiff/vcpkg-cmake-wrapper.cmake b/ports/tiff/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000..5ccb0e7ff2a --- /dev/null +++ b/ports/tiff/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,20 @@ +_find_package(${ARGS}) + +if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") + find_package(LibLZMA) + find_package(JPEG) + find_package(ZLIB) + + if(TARGET TIFF::TIFF) + set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${LIBLZMA_LIBRARIES} JPEG::JPEG ZLIB::ZLIB) + if(UNIX) + set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES m) + endif() + endif() + if(TIFF_LIBRARIES) + list(APPEND TIFF_LIBRARIES ${LIBLZMA_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES}) + if(UNIX) + list(APPEND TIFF_LIBRARIES m) + endif() + endif() +endif() diff --git a/ports/tiny-dnn/CONTROL b/ports/tiny-dnn/CONTROL index 6468f2473f3..9198ef7fdca 100644 --- a/ports/tiny-dnn/CONTROL +++ b/ports/tiny-dnn/CONTROL @@ -1,3 +1,3 @@ Source: tiny-dnn -Version: 2018-03-13 +Version: 2018-10-25 Description: A C++14 implementation of deep learning. It is suitable for deep learning on limited computational resource. diff --git a/ports/tiny-dnn/portfile.cmake b/ports/tiny-dnn/portfile.cmake index 151f5dbee08..500a42906a1 100644 --- a/ports/tiny-dnn/portfile.cmake +++ b/ports/tiny-dnn/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tiny-dnn/tiny-dnn - REF 1c5259477b8b4eab376cc19fd1d55ae965ef5e5a - SHA512 756b8e3d5d00b44973bbae2c0bedbe15206bce479dc70ae5fc89f455772deadc05503afd7abcae2048aeabefd7a45cba0fae38555df7e0d9eb33e9feed21b099 + REF c0f576f5cb7b35893f62127cb7aec18f77a3bcc5 + SHA512 f2bdf8a39781e0b2e3383d9e7a4a92daa28ee32e6f390c3fb21e9b24a597a50a8ccc4b5be345c433943db4db70fd2df8922ce3f13a792a4e73cd1fdd35842acf HEAD_REF master ) diff --git a/ports/tinyexif/CONTROL b/ports/tinyexif/CONTROL index 9c984a507c0..ce7162ae914 100644 --- a/ports/tinyexif/CONTROL +++ b/ports/tinyexif/CONTROL @@ -1,4 +1,4 @@ Source: tinyexif -Version: 1.0.1-1 +Version: 1.0.1-2 Build-Depends: tinyxml2 Description: tiny ISO-compliant C++ EXIF and XMP parsing library for JPEG images diff --git a/ports/tinyexif/namespace_tinyxml2.patch b/ports/tinyexif/namespace_tinyxml2.patch new file mode 100644 index 00000000000..d27c99c680f --- /dev/null +++ b/ports/tinyexif/namespace_tinyxml2.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f22584b..1ba8329 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -84,7 +84,7 @@ if(BUILD_SHARED_LIBS) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251") # needs to have dll-interface + endif() + +- target_link_libraries(TinyEXIF tinyxml2) ++ target_link_libraries(TinyEXIF tinyxml2::tinyxml2) + set_target_properties(TinyEXIF PROPERTIES + COMPILE_DEFINITIONS "TINYEXIF_EXPORT" + VERSION "${GENERIC_LIB_VERSION}" +@@ -121,7 +121,7 @@ endif() + if(BUILD_STATIC_LIBS) + add_library(TinyEXIFstatic STATIC TinyEXIF.cpp TinyEXIF.h) + +- target_link_libraries(TinyEXIFstatic tinyxml2) ++ target_link_libraries(TinyEXIFstatic tinyxml2::tinyxml2) + set_target_properties(TinyEXIFstatic PROPERTIES + OUTPUT_NAME TinyEXIF + VERSION "${GENERIC_LIB_VERSION}" +@@ -162,7 +162,7 @@ if(BUILD_DEMO) + target_compile_definitions(TinyEXIFdemo PRIVATE TINYEXIF_IMPORT) + else(BUILD_STATIC_LIBS) + add_dependencies(TinyEXIFdemo TinyEXIFstatic) +- target_link_libraries(TinyEXIFdemo TinyEXIFstatic tinyxml2) ++ target_link_libraries(TinyEXIFdemo TinyEXIFstatic tinyxml2::tinyxml2) + endif() + endif() + diff --git a/ports/tinyexif/portfile.cmake b/ports/tinyexif/portfile.cmake index 4ee127d4aa4..716415453b5 100644 --- a/ports/tinyexif/portfile.cmake +++ b/ports/tinyexif/portfile.cmake @@ -6,6 +6,8 @@ vcpkg_from_github( REF 1.0.1 SHA512 d018d882adbcebf9fa8ad67a78304a1dd21ffd3a01e3cf2d269fa34efedc5ec5f293767f3a21d62cb1bb9b88b2c364977a9125e9b88b2eac7866a8d6b27c2f23 HEAD_REF master + PATCHES + namespace_tinyxml2.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS) diff --git a/ports/tinyfiledialogs/CMakeLists.txt b/ports/tinyfiledialogs/CMakeLists.txt new file mode 100644 index 00000000000..4adabaf9a5e --- /dev/null +++ b/ports/tinyfiledialogs/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.4) +project(tinyfiledialogs C) + +add_library(tinyfiledialogs tinyfiledialogs.c) + +install( + TARGETS tinyfiledialogs + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) diff --git a/ports/tinyfiledialogs/CONTROL b/ports/tinyfiledialogs/CONTROL new file mode 100644 index 00000000000..bb3a2ff33b7 --- /dev/null +++ b/ports/tinyfiledialogs/CONTROL @@ -0,0 +1,3 @@ +Source: tinyfiledialogs +Version: 3.3.7-1 +Description: Highly portable and cross-platform dialogs for native inputbox, passwordbox, colorpicker and more diff --git a/ports/tinyfiledialogs/portfile.cmake b/ports/tinyfiledialogs/portfile.cmake new file mode 100644 index 00000000000..66f1735a889 --- /dev/null +++ b/ports/tinyfiledialogs/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(SHA 03d35a86696859128d41f8b967c1ef3e39c980ce) + +vcpkg_download_distfile(HEADERFILE + URLS "https://sourceforge.net/p/tinyfiledialogs/code/ci/${SHA}/tree/tinyfiledialogs.h?format=raw" + FILENAME "tinyfiledialogs-h-${SHA}" + SHA512 e3503165bcbb665c2f09c19591f28eba63e50b8d20fd4e65f31ec6a33742879c007aa7402cfd429ff92a2847534f0f0cc1b979954372be0c6578d49ed5f3e18d +) +vcpkg_download_distfile(SOURCEFILE + URLS "https://sourceforge.net/p/tinyfiledialogs/code/ci/${SHA}/tree/tinyfiledialogs.c?format=raw" + FILENAME "tinyfiledialogs-c-${SHA}" + SHA512 263a9fcd11af3dcfd3cd7b6cfaad216cfdd94925639e613d43e7a2dbae2b4387fe8182cd72401e19b2891a08809bc68caece341df28e91b5894cc4b9ecd157f4 +) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SHA}) + +configure_file(${HEADERFILE} ${SOURCE_PATH}/tinyfiledialogs.h COPYONLY) +configure_file(${SOURCEFILE} ${SOURCE_PATH}/tinyfiledialogs.c COPYONLY) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +configure_file(${HEADERFILE} ${CURRENT_PACKAGES_DIR}/include/tinyfiledialogs.h COPYONLY) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/tinyfiledialogs) +file(READ ${HEADERFILE} _contents) +string(SUBSTRING "${_contents}" 0 1024 _contents) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/tinyfiledialogs/copyright "${_contents}") diff --git a/ports/tinyobjloader/CONTROL b/ports/tinyobjloader/CONTROL new file mode 100644 index 00000000000..16668c16769 --- /dev/null +++ b/ports/tinyobjloader/CONTROL @@ -0,0 +1,3 @@ +Source: tinyobjloader +Version: 1.2.0-1 +Description: Tiny but powerful single file wavefront obj loader diff --git a/ports/tinyobjloader/portfile.cmake b/ports/tinyobjloader/portfile.cmake new file mode 100644 index 00000000000..bc70373a6d2 --- /dev/null +++ b/ports/tinyobjloader/portfile.cmake @@ -0,0 +1,39 @@ +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")) + message("tinyobjloader doesn't support dynamic linkage on Windows. Building static instead.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO syoyo/tinyobjloader + REF 8fd9f6e57bf8c70d5ae47cf0f0d1bf1ccae2dfc2 + SHA512 5b6a2822989c5a28eabee0a33724c045b5d07cf0ccfd4288c7c3a5a2cc5b0c3f6ee8aca45e8e22c941278fbbfabd8f909f5010cd34b9d905c4d84102d151c73b + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" TINYOBJLOADER_COMPILATION_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + -DTINYOBJLOADER_COMPILATION_SHARED=${TINYOBJLOADER_COMPILATION_SHARED} + -DCMAKE_INSTALL_DOCDIR:STRING=share/tinyobjloader +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/tinyobjloader/cmake) + +file( + REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/lib/tinyobjloader + ${CURRENT_PACKAGES_DIR}/debug/lib/tinyobjloader +) + +vcpkg_copy_pdbs() + +# Put the licence file where vcpkg expects it +file(RENAME ${CURRENT_PACKAGES_DIR}/share/tinyobjloader/LICENSE ${CURRENT_PACKAGES_DIR}/share/tinyobjloader/copyright) diff --git a/ports/tinyspline/CONTROL b/ports/tinyspline/CONTROL new file mode 100644 index 00000000000..ef83e311bdc --- /dev/null +++ b/ports/tinyspline/CONTROL @@ -0,0 +1,3 @@ +Source: tinyspline +Version: 0.2.0-1 +Description: Library for NURBS, B-Splines, and B?zier curves, allowing you to handle splines with ease diff --git a/ports/tinyspline/cmake.patch b/ports/tinyspline/cmake.patch new file mode 100644 index 00000000000..2cb6a260204 --- /dev/null +++ b/ports/tinyspline/cmake.patch @@ -0,0 +1,29 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 02dfb83..35e01f8 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -387,6 +387,9 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + # TINYSPLINE_LIBRARY_C_FLAGS + set(TINYSPLINE_LIBRARY_C_FLAGS "${TINYSPLINE_LIBRARY_C_FLAGS} /Wall") + set(TINYSPLINE_LIBRARY_C_FLAGS "${TINYSPLINE_LIBRARY_C_FLAGS} /WX") ++ set(TINYSPLINE_LIBRARY_C_FLAGS "${TINYSPLINE_LIBRARY_C_FLAGS} /wd4820") ++ set(TINYSPLINE_LIBRARY_C_FLAGS "${TINYSPLINE_LIBRARY_C_FLAGS} /wd5045") ++ set(TINYSPLINE_LIBRARY_C_FLAGS "${TINYSPLINE_LIBRARY_C_FLAGS} /wd4711") + + # TINYSPLINE_LIBRARY_CXX_FLAGS + set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /Wall") +@@ -395,6 +398,14 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4710") + set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4350") + set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4820") ++ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd5045") ++ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4571") ++ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4625") ++ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4626") ++ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd5026") ++ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd5027") ++ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4774") ++ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4711") + + # TINYSPLINE_BINDING_CXX_FLAGS + set(TINYSPLINE_BINDING_CXX_FLAGS "${TINYSPLINE_BINDING_CXX_FLAGS} /w") diff --git a/ports/tinyspline/portfile.cmake b/ports/tinyspline/portfile.cmake new file mode 100644 index 00000000000..a290cf3a78e --- /dev/null +++ b/ports/tinyspline/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO msteinbeck/tinyspline + REF 0.2.0 + SHA512 50cf4927b311eeca6de7954f1b8d585cbf71355f5e5b0aac2f92f5f4ba37986df16eb3251f94a2304d27dab27d4f6b838b410f53e30de28bab53facf194eb640 + HEAD_REF master + PATCHES + cmake.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/src + PREFER_NINJA +) + +vcpkg_install_cmake() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/tinyspline/copyright COPYONLY) diff --git a/ports/tinyutf8/CONTROL b/ports/tinyutf8/CONTROL new file mode 100644 index 00000000000..e67cee3fc3f --- /dev/null +++ b/ports/tinyutf8/CONTROL @@ -0,0 +1,3 @@ +Source: tinyutf8 +Version: 2.1.1-1 +Description: TINYUTF8 is a library for extremely easy integration of Unicode into an arbitrary C++11 project. diff --git a/ports/tinyutf8/fixbuild.patch b/ports/tinyutf8/fixbuild.patch new file mode 100644 index 00000000000..c1798ada194 --- /dev/null +++ b/ports/tinyutf8/fixbuild.patch @@ -0,0 +1,29 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4ec8787..cfea5b3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,7 @@ + cmake_minimum_required(VERSION 3.1) + project(tinyutf8) + +-set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_CXX_STANDARD 17) + + option(TINYUTF8_BUILD_STATIC "Build as static library" On) + +@@ -14,3 +14,14 @@ endif() + add_library(tinyutf8 ${LIB_BUILD_TYPE} lib/tinyutf8.cpp) + + target_include_directories(tinyutf8 PUBLIC include) ++ ++if(MSVC) ++ ADD_DEFINITIONS(-D_UNICODE) ++endif() ++ ++install(TARGETS tinyutf8 ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib) ++ ++install(FILES include/tinyutf8.h DESTINATION include) +\ No newline at end of file diff --git a/ports/tinyutf8/portfile.cmake b/ports/tinyutf8/portfile.cmake new file mode 100644 index 00000000000..c768260c962 --- /dev/null +++ b/ports/tinyutf8/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO DuffsDevice/tinyutf8 + REF v2.1.1 + SHA512 0be9cebe1ac962c89e0620586d4f8d4f3059b52394e13506f19723855d146c35e6a1205ae5430a53ba95a89c60216054bfad9c4e8e8f1ec047f4096585de2efc + HEAD_REF master + PATCHES fixbuild.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" TINYUTF8_BUILD_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DTINYUTF8_BUILD_STATIC=${TINYUTF8_BUILD_STATIC} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENCE ${CURRENT_PACKAGES_DIR}/share/tinyutf8/copyright COPYONLY) + +# remove unneeded files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/tinyxml2/CONTROL b/ports/tinyxml2/CONTROL index 185fa749c8c..5c4fb87a25c 100644 --- a/ports/tinyxml2/CONTROL +++ b/ports/tinyxml2/CONTROL @@ -1,3 +1,3 @@ Source: tinyxml2 -Version: 6.2.0 +Version: 7.0.1 Description: A simple, small, efficient, C++ XML parser diff --git a/ports/tinyxml2/portfile.cmake b/ports/tinyxml2/portfile.cmake index 8a28b424b1d..d1e7d4ce64d 100644 --- a/ports/tinyxml2/portfile.cmake +++ b/ports/tinyxml2/portfile.cmake @@ -3,21 +3,13 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO leethomason/tinyxml2 - REF 6.2.0 - SHA512 ef784240aeb090ab04aad659352ad4b224c431feecf485f33aca7936bcaa0ef4ab9d0a2e0692d3cf6036ac3e8012019d65665e780a920bbad3d4820f736445b1 + REF 7.0.1 + SHA512 623cd7eff542d20b434a67111ac98110101c95a18767318bf906e5e56d8cc25622269f740f50477fe907a4c52d875b614cb6167f4760d42ab18dc55b9d4bf380 HEAD_REF master ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(BUILD_STATIC_LIBS 1) -else() - set(BUILD_STATIC_LIBS 0) -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} ) vcpkg_install_cmake() @@ -31,7 +23,6 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(COPY ${SOURCE_PATH}/readme.md - ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml2 ) file(RENAME ${CURRENT_PACKAGES_DIR}/share/tinyxml2/readme.md ${CURRENT_PACKAGES_DIR}/share/tinyxml2/copyright) diff --git a/ports/tinyxml2/vcpkg-cmake-wrapper.cmake b/ports/tinyxml2/vcpkg-cmake-wrapper.cmake deleted file mode 100644 index 867426f1e3d..00000000000 --- a/ports/tinyxml2/vcpkg-cmake-wrapper.cmake +++ /dev/null @@ -1,5 +0,0 @@ -_find_package(${ARGS}) -if(TARGET tinyxml2_static AND NOT TARGET tinyxml2) - _add_library(tinyxml2 INTERFACE IMPORTED) - set_target_properties(tinyxml2 PROPERTIES INTERFACE_LINK_LIBRARIES "tinyxml2_static") -endif() diff --git a/ports/tl-expected/CONTROL b/ports/tl-expected/CONTROL new file mode 100644 index 00000000000..440efe9faa8 --- /dev/null +++ b/ports/tl-expected/CONTROL @@ -0,0 +1,3 @@ +Source: tl-expected +Version: 0.3-1 +Description: C++11/14/17 std::expected implementation with functional-style extensions diff --git a/ports/tl-expected/portfile.cmake b/ports/tl-expected/portfile.cmake new file mode 100644 index 00000000000..95a4861c23c --- /dev/null +++ b/ports/tl-expected/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO TartanLlama/expected + REF v0.3 + SHA512 a228399f7103020ed814f1c755b82cf831b3d8c6aaa23dbc3aedc226b3cbd39c22075952dda3af84c8cf6f74ab1131c6997a2431ee62314bd82ccafdc9ab23a3 + HEAD_REF master +) + +# Install header file +file(INSTALL ${SOURCE_PATH}/tl DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/tl-expected RENAME copyright) diff --git a/ports/tl-optional/CONTROL b/ports/tl-optional/CONTROL new file mode 100644 index 00000000000..3be044dbe4b --- /dev/null +++ b/ports/tl-optional/CONTROL @@ -0,0 +1,3 @@ +Source: tl-optional +Version: 0.5-1 +Description: C++11/14/17 std::optional implementation with functional-style extensions diff --git a/ports/tl-optional/portfile.cmake b/ports/tl-optional/portfile.cmake new file mode 100644 index 00000000000..b6d98b9e076 --- /dev/null +++ b/ports/tl-optional/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO TartanLlama/optional + REF v0.5 + SHA512 f4f72c1ba431737fb7b1b6468b7dbbb025f299775e0a3401993490a60d5999d31ccf1e48c0cd57836293a5534ea4749b9f1c8f65f896144204af3389a5e512f9 + HEAD_REF master +) + +# Install header file +file(INSTALL ${SOURCE_PATH}/tl DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/tl-optional RENAME copyright) diff --git a/ports/tmx/CONTROL b/ports/tmx/CONTROL new file mode 100644 index 00000000000..9079cb85ef3 --- /dev/null +++ b/ports/tmx/CONTROL @@ -0,0 +1,4 @@ +Source: tmx +Version: 1.0.0 +Description: A portable C library to load tiled maps in your games. +Build-Depends: zlib, libxml2 diff --git a/ports/tmx/portfile.cmake b/ports/tmx/portfile.cmake new file mode 100644 index 00000000000..b3f70f4d195 --- /dev/null +++ b/ports/tmx/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO baylej/tmx + REF tmx_1.0.0 + HEAD_REF master + SHA512 d045c45efd03f91a81dae471cb9ddc80d222b3ac52e13b729deeaf3e07d0a03b8e0956b30336ef410c72ddbbf33bea6811da5454b88d44b1db75683ef2a9383a +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/tmx/tmxExports.cmake ${CURRENT_PACKAGES_DIR}/lib/cmake/tmx/tmxTargets.cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/tmx") +file(RENAME ${CURRENT_PACKAGES_DIR}/share/tmx/tmxTargets.cmake ${CURRENT_PACKAGES_DIR}/share/tmx/tmxExports.cmake) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +# Handle copyright +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/tmx/copyright COPYONLY) diff --git a/ports/tmxparser/CONTROL b/ports/tmxparser/CONTROL new file mode 100644 index 00000000000..66132e4fd1d --- /dev/null +++ b/ports/tmxparser/CONTROL @@ -0,0 +1,4 @@ +Source: tmxparser +Version: 2.1.0-1 +Description: C++11 library for parsing the maps generated by the Map Editor called Tiled. +Build-Depends: zlib, tinyxml2 diff --git a/ports/tmxparser/portfile.cmake b/ports/tmxparser/portfile.cmake new file mode 100644 index 00000000000..ffe58c89f91 --- /dev/null +++ b/ports/tmxparser/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sainteos/tmxparser + REF v2.1.0 + HEAD_REF master + SHA512 011cce3bb98057f8e2a0a82863fedb7c4b9e41324d5cfa6daade4d000c3f6c8c157da7b153f7f2564ecdefe8019fc8446c9b1b8a675be04329b04a0891ee1c27 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(GLOB LIBS ${CURRENT_PACKAGES_DIR}/lib/*.so* ${CURRENT_PACKAGES_DIR}/debug/lib/*.so*) + if(LIBS) + file(REMOVE ${LIBS}) + endif() +else() + file(GLOB LIBS ${CURRENT_PACKAGES_DIR}/lib/*.a ${CURRENT_PACKAGES_DIR}/debug/lib/*.a) + if(LIBS) + file(REMOVE ${LIBS}) + endif() +endif() + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/tmxparser/copyright COPYONLY) diff --git a/ports/torch-th/CONTROL b/ports/torch-th/CONTROL index 7c8f7988315..9505e6659bd 100644 --- a/ports/torch-th/CONTROL +++ b/ports/torch-th/CONTROL @@ -1,3 +1,3 @@ Source: torch-th -Version: 20180131-89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8-2 +Version: 2018-07-03 Description: Torch's TH library diff --git a/ports/torch-th/portfile.cmake b/ports/torch-th/portfile.cmake index 7d31fccc415..69ecd1c006e 100644 --- a/ports/torch-th/portfile.cmake +++ b/ports/torch-th/portfile.cmake @@ -10,8 +10,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO torch/torch7 - REF 89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8 - SHA512 0b28762768129f5e59e24d505e271418bb4513db0e99acb293f01095949700711116463b299fe42d65ca07c1f0a9f6d0d1d72e21275a2825a4a9fb0197525e72 + REF fd0ee3bbf7bfdd21ab10c5ee70b74afaef9409e1 + SHA512 3a7a006ec624f25216e2b433380ccaf04710fd452f28ce853d3018e4ced6b6e066e61ff9165b8c0526825748a335c976cfb7accff4d1a16ae1be0db94b2c8a22 HEAD_REF master ) diff --git a/ports/treehopper/CONTROL b/ports/treehopper/CONTROL new file mode 100644 index 00000000000..336a4225018 --- /dev/null +++ b/ports/treehopper/CONTROL @@ -0,0 +1,3 @@ +Source: treehopper +Version: 1.11.3-1 +Description: Treehopper connects the physical world to your computer, tablet, or smartphone. For more information, visit https://treehopper.io. diff --git a/ports/treehopper/portfile.cmake b/ports/treehopper/portfile.cmake new file mode 100644 index 00000000000..fd90f039272 --- /dev/null +++ b/ports/treehopper/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message("treehopper only supports dynamic library linkage") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() +if(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "treehopper does not support static crt linkage") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO treehopper-electronics/treehopper-sdk + REF 1.11.3 + SHA512 65b748375b798787c8b59f9657151f340920c939c3f079105b9b78f4e3b775125598106c6dfa4feba111a64d30f007003a70110ac767802a7dd1127a25c9fb14 + HEAD_REF master) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/C++/API/ + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/treehopper) + +file(INSTALL ${SOURCE_PATH}/C++/API/inc/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/Treehopper/) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/treehopper RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) \ No newline at end of file diff --git a/ports/trompeloeil/CONTROL b/ports/trompeloeil/CONTROL new file mode 100644 index 00000000000..4c7b96ec1a0 --- /dev/null +++ b/ports/trompeloeil/CONTROL @@ -0,0 +1,4 @@ +Source: trompeloeil +Version: 32-1 +Description: A thread-safe header-only mocking framework for C++11/14 using the Boost Software License 1.0 + For issues/pull requests/questions visit https://github.com/rollbear/trompeloeil diff --git a/ports/trompeloeil/disable_master_project.patch b/ports/trompeloeil/disable_master_project.patch new file mode 100644 index 00000000000..155363d7df8 --- /dev/null +++ b/ports/trompeloeil/disable_master_project.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6e59ab8..615a6cb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -34,9 +34,6 @@ target_include_directories( + ) + + set(MASTER_PROJECT OFF) +-if (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR}) +- set(MASTER_PROJECT ON) +-endif() + + if (MASTER_PROJECT AND CMAKE_BUILD_TYPE MATCHES Debug) + diff --git a/ports/trompeloeil/portfile.cmake b/ports/trompeloeil/portfile.cmake new file mode 100644 index 00000000000..a499ad4dead --- /dev/null +++ b/ports/trompeloeil/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rollbear/trompeloeil + REF v32 + SHA512 001660b540880d9b1777d41ceb564b603a8d442649da86f9272e34cc642e10b43217ffadbc7d7fa7d32cb60dcc3daa0be17f86d5de48e8fce25f8681c645025d + HEAD_REF master + PATCHES disable_master_project.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/trompeloeil TARGET_PATH share/trompeloeil) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include/trompeloeil.hpp) + message(FATAL_ERROR "Main includes have moved. Please update the forwarder.") +endif() + +configure_file(${SOURCE_PATH}/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/trompeloeil/copyright COPYONLY) diff --git a/ports/unicorn-lib/CONTROL b/ports/unicorn-lib/CONTROL index 4a46f6343a1..29f822e7017 100644 --- a/ports/unicorn-lib/CONTROL +++ b/ports/unicorn-lib/CONTROL @@ -1,4 +1,4 @@ Source: unicorn-lib -Version: 2018-04-09 +Version: 2018-10-25 Description: Unicode library for C++ by Ross Smith -Build-Depends: rs-core-lib, pcre, zlib, libiconv +Build-Depends: rs-core-lib, pcre2, zlib, libiconv diff --git a/ports/unicorn-lib/portfile.cmake b/ports/unicorn-lib/portfile.cmake index c215e7ccd23..009d54cbe31 100644 --- a/ports/unicorn-lib/portfile.cmake +++ b/ports/unicorn-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/unicorn-lib - REF 38b8bfe7b22978d42923a55ed3303a0aadd86abd - SHA512 423dc648476cc957273a7a81770ce5b25452bd685aaa36688cecb1e7cc83495ede6a441fb33e010e80782986c32a8cc87fe42844b0ccd597ce9a4e5286dc6791 + REF 40da6ff4c2af8a393674513285f00ada5960e79c + SHA512 39657646ea04777fb083a049d4fa8e48a57808817d718f0f7f942d3c19da1249341f9010ab00466a33d64d5a196ff35a8bd5f8ffe24230903b3c7e83b4273c59 HEAD_REF master ) @@ -12,6 +12,7 @@ file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS_DEBUG -DUNICORN_LIB_SKIP_HEADERS=ON ) diff --git a/ports/unicorn/CONTROL b/ports/unicorn/CONTROL index 6d907bd94a5..bd863c73e53 100644 --- a/ports/unicorn/CONTROL +++ b/ports/unicorn/CONTROL @@ -1,3 +1,3 @@ Source: unicorn -Version: 2018-03-20 +Version: 2018-10-25 Description: Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework diff --git a/ports/unicorn/portfile.cmake b/ports/unicorn/portfile.cmake index bec0088edae..849726575b4 100644 --- a/ports/unicorn/portfile.cmake +++ b/ports/unicorn/portfile.cmake @@ -14,8 +14,8 @@ set(VCPKG_CRT_LINKAGE "static") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO unicorn-engine/unicorn - REF 9a01ae8379b0a4bc37cf50f7aeba63fddeb523c4 - SHA512 04d5e850bc1ba36856052be5a4e2a433db8d229ae90b2fbf6a5bf32c9dc86829518a8882d331d0bc7d42a23e9f5c43d6609a20dcca388c717940c081ff21b3a4 + REF 873fffc505b29c6179a8aece18b7e331e5f879e8 + SHA512 7fce35aaee00871ee7ab0517a51ef65f7e748252ac2a97a07ee18a04dcc733b5470fd6de8e0bc433c4bbecd47b8269b33871ba7df64975600d52b3ece15715ea HEAD_REF master ) diff --git a/ports/uriparser/CONTROL b/ports/uriparser/CONTROL index 553d44de91c..4777fe8e9a3 100644 --- a/ports/uriparser/CONTROL +++ b/ports/uriparser/CONTROL @@ -1,3 +1,3 @@ Source: uriparser -Version: 0.8.5 +Version: 0.9.0 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/uriparser/portfile.cmake b/ports/uriparser/portfile.cmake index cb8f1b14a94..8061a6221dc 100644 --- a/ports/uriparser/portfile.cmake +++ b/ports/uriparser/portfile.cmake @@ -1,11 +1,10 @@ - include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO uriparser/uriparser - REF uriparser-0.8.5 - SHA512 b5a4eb316b96bdd5b87cac9fdd30b8988c158914e71030a45aafabd04df67a94bba9696782d98e9fa2169baf351e95ab1479bc76d8afe37968a941bc27a3ffb6 + REF uriparser-0.9.0 + SHA512 d0a317fa55531f75b0e7ec712ea36f8e36a8cf72fdb4f959f3df7cc7c519d09752b194579a4f288bcea56d7be105da3d79dd8323960e74daff93f1dad2b5085d HEAD_REF master ) diff --git a/ports/usbmuxd/CONTROL b/ports/usbmuxd/CONTROL new file mode 100644 index 00000000000..6d7978bad4f --- /dev/null +++ b/ports/usbmuxd/CONTROL @@ -0,0 +1,4 @@ +Source: usbmuxd +Version: 1.1.1.133-1 +Description: A socket daemon to multiplex connections from and to iOS devices +Build-Depends: libimobiledevice, libusb, libusb-win32, pthreads \ No newline at end of file diff --git a/ports/usbmuxd/portfile.cmake b/ports/usbmuxd/portfile.cmake new file mode 100644 index 00000000000..34768cf88c0 --- /dev/null +++ b/ports/usbmuxd/portfile.cmake @@ -0,0 +1,19 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libimobiledevice-win32/usbmuxd + REF 1.1.1.133 + SHA512 1a5f9abc239deeb15e2aab419ba9e88ef41ffa80396546fb65bc06b0f419cbabc80cdf95995caf71d5628d1537fb0329a73d923202e91ea43fcc7c32b840d047 + HEAD_REF master-msvc +) + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH usbmuxd.vcxproj + LICENSE_SUBPATH COPYING.GPLv2 + USE_VCPKG_INTEGRATION +) + +# No headers +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/usrsctp/CONTROL b/ports/usrsctp/CONTROL new file mode 100644 index 00000000000..42699473266 --- /dev/null +++ b/ports/usrsctp/CONTROL @@ -0,0 +1,3 @@ +Source: usrsctp +Version: 35c1d97020a-2 +Description: This is a userland SCTP stack supporting FreeBSD, Linux, Mac OS X and Windows. diff --git a/ports/usrsctp/portfile.cmake b/ports/usrsctp/portfile.cmake new file mode 100644 index 00000000000..416cdc6c33d --- /dev/null +++ b/ports/usrsctp/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sctplab/usrsctp + REF 35c1d97020a20014b989bba4f20225fd9429c4f4 + SHA512 18786825ec2c8c8aeb6b0bcab97deeac40420f7a9bdb427c891b26633ff759266409381ae2545c5572a740322ae1a56f80da1a784d71e50fce97177c343d27ce + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -Dsctp_werror=OFF -Dsctp_build_programs=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/lib/usrsctp.dll + ${CURRENT_PACKAGES_DIR}/lib/usrsctp.dll +) + +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/usrsctp/copyright COPYONLY) + +vcpkg_copy_pdbs() diff --git a/ports/uvw/CONTROL b/ports/uvw/CONTROL new file mode 100644 index 00000000000..1fc066ee287 --- /dev/null +++ b/ports/uvw/CONTROL @@ -0,0 +1,3 @@ +Source: uvw +Version: 1.11.2 +Description: Header-only, event based, tiny and easy to use libuv wrapper in modern C++. diff --git a/ports/uvw/portfile.cmake b/ports/uvw/portfile.cmake new file mode 100644 index 00000000000..0cbacec21f2 --- /dev/null +++ b/ports/uvw/portfile.cmake @@ -0,0 +1,18 @@ +#header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO skypjack/uvw + REF v1.11.2_libuv-v1.23 + SHA512 0125233645351b94acb1b42f1632365a60892c64f00b27f04ae76fa523c4ee32c9910f0fcfb160b15269bfb0b5ae0c0f8b46d83a1ca9f9fc661b75eecb7a04d3 +) + +file(INSTALL + ${SOURCE_PATH}/src/uvw + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +# Handle copyright/readme/package files +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/uvw RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/uvw) diff --git a/ports/uwebsockets/CMakeLists.txt b/ports/uwebsockets/CMakeLists.txt index 43ccd039c25..c3c4f97d8f5 100644 --- a/ports/uwebsockets/CMakeLists.txt +++ b/ports/uwebsockets/CMakeLists.txt @@ -11,6 +11,7 @@ file(GLOB SOURCES src/*.cpp) add_library(uWS ${SOURCES}) target_include_directories(uWS PUBLIC ${OPENSSL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS}) target_link_libraries(uWS PUBLIC ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBUV_LIBRARY}) +target_compile_features(uWS PRIVATE cxx_range_for) install(TARGETS uWS RUNTIME DESTINATION bin diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL index 3871e86916d..c212611de9b 100644 --- a/ports/uwebsockets/CONTROL +++ b/ports/uwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: uwebsockets -Version: 0.14.8-1 +Version: 0.14.8-2 Build-Depends: libuv, openssl, zlib Description: Highly scalable cross-platform WebSocket & HTTP library for C++11 and Node.js diff --git a/ports/vlpp/CMakeLists.txt b/ports/vlpp/CMakeLists.txt index 238600f6e32..d5fec60c492 100644 --- a/ports/vlpp/CMakeLists.txt +++ b/ports/vlpp/CMakeLists.txt @@ -7,7 +7,10 @@ set(SRCS Import/Vlpp.cpp Import/VlppWorkflow.cpp Import/VlppWorkflowCompiler.cpp) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") + +if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") +endif() # Create and configure the target add_library(Vlpp ${SRCS}) diff --git a/ports/vlpp/CONTROL b/ports/vlpp/CONTROL index aa8381caea7..392beec5e1b 100644 --- a/ports/vlpp/CONTROL +++ b/ports/vlpp/CONTROL @@ -1,3 +1,3 @@ Source: vlpp -Version: 0.9.3.1 +Version: 0.9.3.1-1 Description: Common C++ construction, including string operation / generic container / linq / General-LR parser generator / multithreading / reflection for C++ / etc diff --git a/ports/vtk-dicom/CONTROL b/ports/vtk-dicom/CONTROL new file mode 100644 index 00000000000..fdd8e04d3cd --- /dev/null +++ b/ports/vtk-dicom/CONTROL @@ -0,0 +1,8 @@ +Source: vtk-dicom +Version: 0.8.8-alpha-1 +Description: DICOM for VTK +Build-Depends: vtk, zlib + +Feature: gdcm +Description: Use gdcm for decompressing DICOM files. +Build-Depends: gdcm2 diff --git a/ports/vtk-dicom/portfile.cmake b/ports/vtk-dicom/portfile.cmake new file mode 100644 index 00000000000..e7f5c65aa18 --- /dev/null +++ b/ports/vtk-dicom/portfile.cmake @@ -0,0 +1,42 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dgobbi/vtk-dicom + REF ca27801fad6356c98ba19e760b9b4b8e9128f60e + SHA512 d4916fa385e6f26da0a5d7eb981497c9121ff4f67b4b03e518aa4974d2b0ef207168e939e5063e705c15f627ace56e39aca5f5891d333924cbc80c9277aa7dd2 + HEAD_REF master +) + +if ("gdcm" IN_LIST FEATURES) + set(USE_GDCM ON ) +else() + set(USE_GDCM OFF ) +endif() + + +if(USE_GDCM) + list(APPEND ADDITIONAL_OPTIONS + -DUSE_GDCM=ON + -DUSE_DCMTK=OFF + ) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_PROGRAMS=OFF + -DBUILD_EXAMPLES=OFF + ${ADDITIONAL_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(COPY ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk-dicom) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/vtk-dicom/Copyright.txt ${CURRENT_PACKAGES_DIR}/share/vtk-dicom/copyright) diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 8b9ae8f6b0e..d06f1633147 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,5 +1,5 @@ Source: vtk -Version: 8.1.0-1 +Version: 8.1.0-3 Description: Software system for 3D computer graphics, image processing, and visualization Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora diff --git a/ports/vtk/fix-find-lz4.patch b/ports/vtk/fix-find-lz4.patch new file mode 100644 index 00000000000..7389a24f438 --- /dev/null +++ b/ports/vtk/fix-find-lz4.patch @@ -0,0 +1,20 @@ +diff --git a/CMake/FindLZ4.cmake b/CMake/FindLZ4.cmake +index 07343e1f79..b43a9af2c7 100644 +--- a/CMake/FindLZ4.cmake ++++ b/CMake/FindLZ4.cmake +@@ -1,7 +1,13 @@ +- +-find_library(LZ4_LIBRARIES NAMES lz4) ++find_library(LZ4_LIBRARY NAMES lz4 PATH_SUFFIXES lib) ++find_library(LZ4_LIBRARY_DEBUG NAME lz4d PATH_SUFFIXES debug/lib) + find_path(LZ4_INCLUDE_DIRS NAMES lz4.h) + ++if(NOT LZ4_LIBRARY_DEBUG) ++ set(LZ4_LIBRARY_DEBUG ${LZ4_LIBRARY}) ++endif(NOT LZ4_LIBRARY_DEBUG) ++ ++set(LZ4_LIBRARIES optimized ${LZ4_LIBRARY} debug ${LZ4_LIBRARY_DEBUG}) ++ + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(LZ4 + DEFAULT_MSG diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 54246008aad..86616fd1f26 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -2,15 +2,6 @@ include(vcpkg_common_functions) set(VTK_SHORT_VERSION "8.1") set(VTK_LONG_VERSION "${VTK_SHORT_VERSION}.0") - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO "Kitware/VTK" - REF "v${VTK_LONG_VERSION}" - SHA512 09e110cba4ad9a6684e9b2af0cbb5b9053e3596ccb62aab96cd9e71aa4a96c809d96e13153ff44c28ad83015a61ba5195f7d34056707b62654c1bc057f9b9edf - HEAD_REF "master" -) - # ============================================================================= # Options: @@ -46,13 +37,18 @@ endif() set(VTK_WITH_ALL_MODULES OFF) # IMPORTANT: if ON make sure `qt5`, `mpi`, `python3`, `ffmpeg`, `gdal`, `fontconfig`, # `libmysql` and `atlmfc` are listed as dependency in the CONTROL file + # ============================================================================= -# Apply patches to the source code -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} +# Clone & patch +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "Kitware/VTK" + REF "v${VTK_LONG_VERSION}" + SHA512 09e110cba4ad9a6684e9b2af0cbb5b9053e3596ccb62aab96cd9e71aa4a96c809d96e13153ff44c28ad83015a61ba5195f7d34056707b62654c1bc057f9b9edf + HEAD_REF "master" PATCHES # Disable ssize_t because this can conflict with ssize_t that is defined on windows. - ${CMAKE_CURRENT_LIST_DIR}/dont-define-ssize_t.patch + dont-define-ssize_t.patch # We force CMake to use it's own version of the FindHDF5 module since newer versions # shipped with CMake behave differently. E.g. the one shipped with CMake 3.9 always @@ -61,16 +57,17 @@ vcpkg_apply_patches( # Maybe in the future we can disable the patch and use the new version shipped with CMake # together with the hdf5-config.cmake that is written by HDF5 itself, but currently VTK # disables taking the config into account explicitly. - ${CMAKE_CURRENT_LIST_DIR}/use-fixed-find-hdf5.patch + use-fixed-find-hdf5.patch # We disable a workaround in the VTK CMake scripts that can lead to the fact that a dependency # will link to both, the debug and the release library. - ${CMAKE_CURRENT_LIST_DIR}/disable-workaround-findhdf5.patch + disable-workaround-findhdf5.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-find-libproj4.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-find-libharu.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-find-mysql.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-find-odbc.patch + fix-find-libproj4.patch + fix-find-libharu.patch + fix-find-mysql.patch + fix-find-odbc.patch + fix-find-lz4.patch ) # Remove the FindGLEW.cmake and FindPythonLibs.cmake that are distributed with VTK, @@ -294,6 +291,14 @@ file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" VTK_TARGETS_CONTE string(REGEX REPLACE "${CURRENT_INSTALLED_DIR}/lib/[^\\.]*\\.lib" "" VTK_TARGETS_CONTENT "${VTK_TARGETS_CONTENT}") file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" "${VTK_TARGETS_CONTENT}") +# Remove any remaining stray absolute references to the installed directory. +file(GLOB_RECURSE CMAKE_FILES ${CURRENT_PACKAGES_DIR}/share/vtk/*.cmake) +foreach(FILE IN LISTS CMAKE_FILES) + file(READ "${FILE}" _contents) + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${VTK_INSTALL_PREFIX}" _contents "${_contents}") + file(WRITE "${FILE}" "${_contents}") +endforeach() + # ============================================================================= # Clean-up other directories diff --git a/ports/vulkan-memory-allocator/CONTROL b/ports/vulkan-memory-allocator/CONTROL new file mode 100644 index 00000000000..ec6c0757a83 --- /dev/null +++ b/ports/vulkan-memory-allocator/CONTROL @@ -0,0 +1,3 @@ +Source: vulkan-memory-allocator +Version: 2.1.0-1 +Description: Easy to integrate Vulkan memory allocation library from GPUOpen diff --git a/ports/vulkan-memory-allocator/portfile.cmake b/ports/vulkan-memory-allocator/portfile.cmake new file mode 100644 index 00000000000..c72af89350f --- /dev/null +++ b/ports/vulkan-memory-allocator/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator + REF v2.1.0 + SHA512 4d7d431d52503d4d448a8b571935678a8a04d8f4a7eceb6ad49cde4f78954e7a2a0a91e48c75382699a62d81cf00601aaa0a358d979ed8e14741a9956484b51e + HEAD_REF master +) + +file(COPY "${SOURCE_PATH}/src/vk_mem_alloc.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include") + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/unofficial-vulkan-memory-allocator-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-vulkan-memory-allocator) + +configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/vulkan-memory-allocator/copyright COPYONLY) diff --git a/ports/vulkan-memory-allocator/unofficial-vulkan-memory-allocator-config.cmake b/ports/vulkan-memory-allocator/unofficial-vulkan-memory-allocator-config.cmake new file mode 100644 index 00000000000..fc9f62550f8 --- /dev/null +++ b/ports/vulkan-memory-allocator/unofficial-vulkan-memory-allocator-config.cmake @@ -0,0 +1,8 @@ + +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) + +add_library(unofficial::vulkan-memory-allocator::vulkan-memory-allocator INTERFACE IMPORTED) +set_target_properties(unofficial::vulkan-memory-allocator::vulkan-memory-allocator PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include") +set(_IMPORT_PREFIX) diff --git a/ports/vulkan/CONTROL b/ports/vulkan/CONTROL new file mode 100644 index 00000000000..77f99641d70 --- /dev/null +++ b/ports/vulkan/CONTROL @@ -0,0 +1,3 @@ +Source: vulkan +Version: 1.1.82.1 +Description: A graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs on a wide variety of devices. \ No newline at end of file diff --git a/ports/vulkan/portfile.cmake b/ports/vulkan/portfile.cmake new file mode 100644 index 00000000000..31eb802b43c --- /dev/null +++ b/ports/vulkan/portfile.cmake @@ -0,0 +1,37 @@ +# Due to the complexity involved, this package doesn't install the Vulkan SDK. +# It instead verifies that Vulkan is installed. +# Other packages can depend on this package to declare a dependency on Vulkan. +include(vcpkg_common_functions) + +message(STATUS "Querying VULKAN_SDK Enviroment variable") +file(TO_CMAKE_PATH "$ENV{VULKAN_SDK}" VULKAN_DIR) +set(VULKAN_INCLUDE "${VULKAN_DIR}/Include/vulkan/") +set(VULKAN_ERROR_DL "Before continuing, please download and install Vulkan from:\n https://vulkan.lunarg.com/sdk/home\n") + +if(NOT DEFINED ENV{VULKAN_SDK}) + message(FATAL_ERROR "Could not find Vulkan SDK. ${VULKAN_ERROR_DL}") +endif() + +message(STATUS "Searching " ${VULKAN_INCLUDE} " for vulkan.h") +if(NOT EXISTS "${VULKAN_INCLUDE}/vulkan.h") + message(FATAL_ERROR "Could not find vulkan.h. ${VULKAN_ERROR_DL}") +endif() +message(STATUS "Found vulkan.h") + +# Check if the user left the version in the installation directory e.g. c:/vulkanSDK/1.1.82.1/ +if(VULKAN_DIR MATCHES "(([0-9]+)\\.([0-9]+)\\.([0-9]+)\\.([0-9]+))") + set(VULKAN_VERSION "${CMAKE_MATCH_1}") + set(VULKAN_MAJOR "${CMAKE_MATCH_2}") + set(VULKAN_MINOR "${CMAKE_MATCH_3}") + set(VULKAN_PATCH "${CMAKE_MATCH_4}") + message(STATUS "Found Vulkan SDK version ${VULKAN_VERSION}") + + set(VULKAN_REQUIRED_VERSION "1.1.82.1") + if (VULKAN_MAJOR LESS 1 OR VULKAN_MINOR LESS 1 OR VULKAN_PATCH LESS 82) + message(FATAL_ERROR "Vulkan ${VULKAN_VERSION} but ${VULKAN_REQUIRED_VERSION} is required. Please download and install a more recent version from:" + "\n https://vulkan.lunarg.com/sdk/home\n") + endif() +endif() + +configure_file(${VULKAN_DIR}/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/vulkan/copyright COPYONLY) +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/ports/vxl/CONTROL b/ports/vxl/CONTROL index 52d725f456c..d9340d9f3d1 100644 --- a/ports/vxl/CONTROL +++ b/ports/vxl/CONTROL @@ -1,4 +1,5 @@ Source: vxl -Version: 20180414-7a130cf-1 -Build-Depends: zlib, tiff, expat, libpng, bzip2, libjpeg-turbo, shapelib, libgeotiff +Version: v1.18.0-2 +Build-Depends: bzip2, libgeotiff, libjpeg-turbo, libpng, tiff, zlib, expat, shapelib +# Build-Depends: bzip2, dcmtk, libgeotiff, libjpeg-turbo, openjpeg, libpng, tiff, zlib Description: A multi-platform collection of C++ software libraries for Computer Vision and Image Understanding. diff --git a/ports/vxl/portfile.cmake b/ports/vxl/portfile.cmake index 7e27591e581..75d89ee2d9a 100644 --- a/ports/vxl/portfile.cmake +++ b/ports/vxl/portfile.cmake @@ -1,29 +1,42 @@ include(vcpkg_common_functions) +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openjpeg.h") + message(FATAL_ERROR "Can't build VXL with non built-in OpenJpeg in current version. Please remove OpenJpeg, and try install VXL again.") +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vxl/vxl - REF 7a130cf05e907a6500e3e717297082c46e77f524 - SHA512 b9f7e48e37b44469031c6de1bf2a3d0aa0ecf4d3c2f4dd0d1a84c273ca8a778b48f3caf7ec6ef0f2dea1dc534ebfdb6b2cde47a56d81aa4f0685114c0bda157c + REF v1.18.0 + SHA512 6666d647b2e7010b91cb0b05016b5f49ae46d198f6bd160fe13fc09bc674eff5b937331fa11d81a8496473968b63452d950eee4fc2512152af57304a14bed63f HEAD_REF master ) +set(USE_WIN_WCHAR_T OFF) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(USE_WIN_WCHAR_T ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DVXL_USING_NATIVE_ZLIB=ON - -DVXL_USING_NATIVE_BZLIB2=ON - -DVXL_USING_NATIVE_JPEG=ON - -DVXL_USING_NATIVE_TIFF=ON - -DVXL_USING_NATIVE_EXPAT=ON - -DVXL_USING_NATIVE_PNG=ON - -DVXL_USING_NATIVE_SHAPELIB=ON - -DVXL_USING_NATIVE_GEOTIFF=ON - -DVXL_FORCE_V3P_OPENJPEG2=ON - -DVXL_FORCE_V3P_J2K=ON - -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF + -DBUILD_TESTING=OFF + -DVXL_FORCE_V3P_BZLIB2=OFF + -DVXL_USING_NATIVE_BZLIB2=TRUE # for disable build built-in bzip2 (v3p/bzlib/CMakeLists.txt#L10-L26) + -DVXL_FORCE_V3P_CLIPPER=ON # TODO : need add clipper port to turn off + -DVXL_FORCE_V3P_DCMTK=OFF + -DVXL_FORCE_V3P_GEOTIFF=OFF + -DVXL_FORCE_V3P_J2K=OFF + -DVXL_FORCE_V3P_JPEG=OFF + -DVXL_FORCE_V3P_OPENJPEG2=ON # TODO : need fix compile error when using openjpeg port to turn off + -DVXL_FORCE_V3P_PNG=OFF + -DVXL_FORCE_V3P_TIFF=OFF + -DVXL_FORCE_V3P_ZLIB=OFF + -DVXL_USE_DCMTK=OFF # TODO : need fix dcmtk support to turn on + -DXVL_USE_GEOTIFF=ON + -DVXL_USE_WIN_WCHAR_T=${USE_WIN_WCHAR_T} ) vcpkg_install_cmake() diff --git a/ports/wangle/CONTROL b/ports/wangle/CONTROL new file mode 100644 index 00000000000..b7d4dcd17cb --- /dev/null +++ b/ports/wangle/CONTROL @@ -0,0 +1,4 @@ +Source: wangle +Version: 2018.11.05.00 +Build-Depends: fizz, folly, openssl, gtest, glog, libevent, double-conversion +Description: Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way. diff --git a/ports/wangle/build.patch b/ports/wangle/build.patch new file mode 100644 index 00000000000..d695f5b186a --- /dev/null +++ b/ports/wangle/build.patch @@ -0,0 +1,25 @@ +diff --git a/wangle/CMakeLists.txt b/wangle/CMakeLists.txt +index 15dc8b6..ed8c79b 100644 +--- a/wangle/CMakeLists.txt ++++ b/wangle/CMakeLists.txt +@@ -39,9 +39,9 @@ endif() + find_package(fizz CONFIG REQUIRED) + find_package(Boost REQUIRED COMPONENTS system thread filesystem regex context) + find_package(OpenSSL REQUIRED) +-find_package(Glog REQUIRED) +-find_package(Gflags REQUIRED) +-find_package(Libevent REQUIRED) ++find_package(Glog CONFIG REQUIRED) ++find_package(Gflags CONFIG REQUIRED) ++find_package(Libevent CONFIG REQUIRED) + find_package(DoubleConversion REQUIRED) + find_package(Threads REQUIRED) + if (UNIX AND NOT APPLE) +@@ -123,6 +123,7 @@ target_include_directories( + PUBLIC + $ + $ ++ PRIVATE + ${FIZZ_INCLUDE_DIR} + ${FOLLY_INCLUDE_DIR} + ${Boost_INCLUDE_DIR} diff --git a/ports/wangle/gflags.patch b/ports/wangle/gflags.patch new file mode 100644 index 00000000000..20921c72cae --- /dev/null +++ b/ports/wangle/gflags.patch @@ -0,0 +1,31 @@ +diff --git a/wangle/cmake/FindGflags.cmake b/wangle/cmake/FindGflags.cmake +index 0243aa3..be3780f 100644 +--- a/wangle/cmake/FindGflags.cmake ++++ b/wangle/cmake/FindGflags.cmake +@@ -7,19 +7,11 @@ + + include(FindPackageHandleStandardArgs) + +-find_library(GFLAGS_LIBRARY gflags +- PATHS ${GFLAGS_LIBRARYDIR}) ++find_package(gflags CONFIG REQUIRED) + +-find_path(GFLAGS_INCLUDE_DIR gflags/gflags.h +- PATHS ${GFLAGS_INCLUDEDIR}) +- +-find_package_handle_standard_args(gflags DEFAULT_MSG +- GFLAGS_LIBRARY +- GFLAGS_INCLUDE_DIR) +- +-mark_as_advanced( +- GFLAGS_LIBRARY +- GFLAGS_INCLUDE_DIR) +- +-set(GFLAGS_LIBRARIES ${GFLAGS_LIBRARY}) +-set(GFLAGS_INCLUDE_DIRS ${GFLAGS_INCLUDE_DIR}) ++if(TARGET gflags_static) ++ set(GFLAGS_LIBRARIES gflags_static) ++else() ++ set(GFLAGS_LIBRARIES gflags_shared) ++endif() ++set(GFLAGS_INCLUDE_DIRS) diff --git a/ports/wangle/portfile.cmake b/ports/wangle/portfile.cmake new file mode 100644 index 00000000000..5f17212c9f5 --- /dev/null +++ b/ports/wangle/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebook/wangle + REF v2018.11.05.00 + SHA512 287fd19e352f04666d2d925eb6322aa5b74b1b8808142d37c1089b34df650bc56f0489ff4746b1ddfbec7544d99df71f9583d47ef5abef600e9bc5d434dceab6 + HEAD_REF master + PATCHES + build.patch + gflags.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}/wangle" + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF + -DINCLUDE_INSTALL_DIR:STRING=include +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/wangle") +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/include/wangle/util/test + ${CURRENT_PACKAGES_DIR}/include/wangle/ssl/test/certs + ${CURRENT_PACKAGES_DIR}/include/wangle/service/test + ${CURRENT_PACKAGES_DIR}/include/wangle/deprecated/rx/test +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wangle RENAME copyright) diff --git a/ports/websocketpp/CONTROL b/ports/websocketpp/CONTROL index 991e6635c57..5c7457a2ac9 100644 --- a/ports/websocketpp/CONTROL +++ b/ports/websocketpp/CONTROL @@ -1,4 +1,4 @@ Source: websocketpp -Version: 0.7.0-1 +Version: 0.8.1 Build-Depends: zlib, openssl, boost-asio Description: Library that implements RFC6455 The WebSocket Protocol \ No newline at end of file diff --git a/ports/websocketpp/portfile.cmake b/ports/websocketpp/portfile.cmake index 71711e8c51c..35514259cfd 100644 --- a/ports/websocketpp/portfile.cmake +++ b/ports/websocketpp/portfile.cmake @@ -4,27 +4,24 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zaphoyd/websocketpp - REF 0.7.0 - SHA512 91a86d4f5120db3f474169bb146f865f82167b1e9eedabec8793b31005e4ce3d22083283bc1b9f9e37fa0da835addcb2b68260a27c753852c06b3b1bb2f3c12e + REF 0.8.1 + SHA512 35e0261ed0285acf77d300768819bd380197de8acdf68223e2d7598481b9bfd69cb1653b435139771b1db6c16530c8d8cf9a887a8a6bba3fea126d0da4dbc13c HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/openssl_110.patch + openssl_110.patch ) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/websocketpp) -# Put the license file where vcpkg expects it -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/websocketpp/) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/websocketpp/COPYING ${CURRENT_PACKAGES_DIR}/share/websocketpp/copyright) - # Copy the header files file(COPY "${SOURCE_PATH}/websocketpp" DESTINATION "${CURRENT_PACKAGES_DIR}/include" FILES_MATCHING PATTERN "*.hpp") -set(INSTALL_INCLUDE_DIR "\${CMAKE_CURRENT_LIST_DIR}/../../include") -set(WEBSOCKETPP_VERSION 0.7.0) +set(PACKAGE_INSTALL_INCLUDE_DIR "\${CMAKE_CURRENT_LIST_DIR}/../../include") +set(WEBSOCKETPP_VERSION 0.8.1) +set(PACKAGE_INIT " +macro(set_and_check) + set(\${ARGV}) +endmacro() +") configure_file(${SOURCE_PATH}/websocketpp-config.cmake.in "${CURRENT_PACKAGES_DIR}/share/websocketpp/websocketpp-config.cmake" @ONLY) -configure_file(${SOURCE_PATH}/websocketpp-configVersion.cmake.in "${CURRENT_PACKAGES_DIR}/share/websocketpp/websocketpp-configVersion.cmake" @ONLY) +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/websocketpp/copyright COPYONLY) diff --git a/ports/winpcap/CONTROL b/ports/winpcap/CONTROL index 3a09db5588c..1454948d288 100644 --- a/ports/winpcap/CONTROL +++ b/ports/winpcap/CONTROL @@ -1,3 +1,3 @@ Source: winpcap -Version: 4.1.3-1 +Version: 4.1.3-2 Description: WinPcap is the industry-standard tool for link-layer network access in Windows environments. diff --git a/ports/winpcap/portfile.cmake b/ports/winpcap/portfile.cmake index 701c9892e15..613a5733e4c 100644 --- a/ports/winpcap/portfile.cmake +++ b/ports/winpcap/portfile.cmake @@ -1,28 +1,22 @@ -# 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 = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/winpcap) + +set(WINPCAP_VERSION 4_1_3) + vcpkg_download_distfile(ARCHIVE - URLS "https://www.winpcap.org/install/bin/WpcapSrc_4_1_3.zip" - FILENAME "WpcapSrc_4_1_3.zip" + URLS "https://www.winpcap.org/install/bin/WpcapSrc_${WINPCAP_VERSION}.zip" + FILENAME "WpcapSrc_${WINPCAP_VERSION}.zip" SHA512 89a5109ed17f8069f7a43497f6fec817c58620dbc5fa506e52069b9113c5bc13f69c307affe611281cb727cfa0f8529d07044d41427e350b24468ccc89a87f33 ) +vcpkg_download_distfile(COPYRIGHT + URLS "https://www.winpcap.org/misc/copyright.htm" + FILENAME "Wpcap_license.htm" + SHA512 661e848f229612a4354e8243cdb0cb7ef387abc8933412b8c09ccfcaa3335143a958ea9ec9da558f89afe71afea29f0548872e3544ea51144c297a1aa1276718 +) + # MSBuild performs in-source builds, so to ensure reliability we must clear them each time file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) -vcpkg_extract_source_archive(${ARCHIVE}) - if(VCPKG_CRT_LINKAGE STREQUAL "static") set(CRT_LINKAGE "MT") elseif(VCPKG_CRT_LINKAGE STREQUAL "dynamic") @@ -30,19 +24,22 @@ elseif(VCPKG_CRT_LINKAGE STREQUAL "dynamic") endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") -set(LIBRARY_LINKAGE "4") + set(LIBRARY_LINKAGE "4") elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") -set(LIBRARY_LINKAGE "2") + 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) +configure_file("${CMAKE_CURRENT_LIST_DIR}/packetNtx.patch.in" "${CURRENT_BUILDTREES_DIR}/src/packetNtx.patch" @ONLY) +configure_file("${CMAKE_CURRENT_LIST_DIR}/wpcap.patch.in" "${CURRENT_BUILDTREES_DIR}/src/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" +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${WINPCAP_VERSION} + PATCHES + "${CURRENT_BUILDTREES_DIR}/src/packetNtx.patch" + "${CURRENT_BUILDTREES_DIR}/src/wpcap.patch" + "${CMAKE_CURRENT_LIST_DIR}/create_lib.patch" ) file( @@ -185,6 +182,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") ) 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) +configure_file(${COPYRIGHT} ${CURRENT_PACKAGES_DIR}/share/winpcap/copyright COPYONLY) diff --git a/ports/winpcap/wpcap.patch b/ports/winpcap/wpcap.patch deleted file mode 100644 index 6296bbd3970..00000000000 --- a/ports/winpcap/wpcap.patch +++ /dev/null @@ -1,414 +0,0 @@ -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 /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPCAP_EXPORTS" /YX /FD /c -+# ADD CPP /nologo /MD /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 /MDd /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 /MDd /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 /MDd /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 /MDd /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 /MDd /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 /MDd /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 /MD /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 /MD /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 /MD /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 /MD /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 /MD /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 /MD /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 /MDd /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 /MDd /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="2" - CharacterSet="2" - > - - -@@ -205,7 +205,7 @@ - -@@ -285,7 +285,7 @@ - - - -@@ -525,7 +525,7 @@ - -@@ -605,7 +605,7 @@ - - - #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 @@ - (reinterpret_cast(&name[0])); + } + + /** +@@ -261,7 +261,7 @@ + #pragma warning(disable: 4244) + theHandleType theSearchHandle = + _wfindfirst( +- const_cast(theConversionFunction(theFullSearchSpec)), ++ reinterpret_cast(const_cast(theConversionFunction(theFullSearchSpec))), + &theFindData); + #pragma warning(pop) + +diff -urN a/c/src/xalanc/PlatformSupport/DOMStringHelper.cpp b/c/src/xalanc/PlatformSupport/DOMStringHelper.cpp +--- a/c/src/xalanc/PlatformSupport/DOMStringHelper.cpp 2012-03-19 16:18:10.000000000 +0000 ++++ b/c/src/xalanc/PlatformSupport/DOMStringHelper.cpp 2018-09-07 16:08:39.207316486 +0100 +@@ -868,7 +868,7 @@ + const XalanDOMChar* theRHS) + { + #if defined(XALAN_USE_WINDOWS_COLLATION) +- return _wcscoll_l(theLHS, theRHS, s_locale); ++ return _wcscoll_l(reinterpret_cast(theLHS), reinterpret_cast(theRHS), s_locale); + #else + return doCollationCompare( + theLHS, +diff -urN a/c/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp b/c/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp +--- a/c/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp 2012-03-19 16:18:10.000000000 +0000 ++++ b/c/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp 2018-09-07 16:08:39.207316486 +0100 +@@ -123,7 +123,7 @@ + + #if defined(XALAN_WINDOWS) + HandleType theFileHandle = CreateFileW( +- theFileName.c_str(), ++ reinterpret_cast(theFileName.c_str()), + GENERIC_WRITE, + 0, + 0, diff --git a/ports/xalan-c/0004-macosx-dyld-fallback.patch b/ports/xalan-c/0004-macosx-dyld-fallback.patch new file mode 100644 index 00000000000..db087169850 --- /dev/null +++ b/ports/xalan-c/0004-macosx-dyld-fallback.patch @@ -0,0 +1,12 @@ +diff -urN a/c/Makefile.incl.in b/c/Makefile.incl.in +--- a/c/Makefile.incl.in 2012-10-14 21:54:01.000000000 +0100 ++++ b/c/Makefile.incl.in 2018-09-07 16:08:15.559182228 +0100 +@@ -598,7 +598,7 @@ + MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -dynamiclib -prebind -seg1addr 0x38000000 -compatibility_version 1 -current_version $(LIB_MAJOR_DOT_VER) -install_name ${LINK_NAME} ${LDFLAGS} + LINK = ${CXX} $(CXXFLAGS) ${PLATFORM_COMPILE_OPTIONS} ${LDFLAGS} + +- export DYLD_LIBRARY_PATH := $(XERCESCROOT)/lib:$(ICULIB_LOC):$(DYLD_LIBRARY_PATH) ++ export DYLD_FALLBACK_LIBRARY_PATH := $(XERCESCROOT)/lib:$(ICULIB_LOC):$(DYLD_FALLBACK_LIBRARY_PATH) + LOC_LIB = ${LOC_LIBNAME}.${LIB_MAJOR_VER}.${LIB_MINOR_VER}$(SHLIBSUFFIX) + LOC_SONAME = ${LOC_LIBNAME}.${LIB_MAJOR_VER}${SHLIBSUFFIX} + MAKE_SHARED_LOC= ${CXX} $(CXXFLAGS) -D${PLATFORM} -dynamiclib -prebind -seg1addr 0x40000000 -compatibility_version 1 -current_version $(LIB_MAJOR_DOT_VER) -install_name ${LOC_LIBNAME}${SHLIBSUFFIX} ${LDFLAGS} diff --git a/ports/xalan-c/0005-fix-ftbfs-ld-as-needed.patch b/ports/xalan-c/0005-fix-ftbfs-ld-as-needed.patch new file mode 100644 index 00000000000..43487721406 --- /dev/null +++ b/ports/xalan-c/0005-fix-ftbfs-ld-as-needed.patch @@ -0,0 +1,186 @@ +diff -urN a/c/samples/Makefile.in b/c/samples/Makefile.in +--- a/c/samples/Makefile.in 2012-03-19 16:18:12.000000000 +0000 ++++ b/c/samples/Makefile.in 2018-09-07 16:07:59.063089005 +0100 +@@ -88,7 +88,7 @@ + + $(XSL_LIB_DIR)/mod_xslt$(SHLIBSUFFIX) : $(XSL_OBJ_DIR)/mod_xslt.o + $(MAKE_SHARED) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/ApacheModuleXSLT/%.c + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) -I/usr/include/apache/ $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -96,7 +96,7 @@ + + $(XSL_BIN_DIR)/CompileStylesheet: $(XSL_OBJ_DIR)/CompileStylesheet.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/CompileStylesheet/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -104,7 +104,7 @@ + + $(XSL_BIN_DIR)/DocumentBuilder: $(XSL_OBJ_DIR)/DocumentBuilder.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/DocumentBuilder/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -112,7 +112,7 @@ + + $(XSL_BIN_DIR)/EntityResolver: $(XSL_OBJ_DIR)/EntityResolver.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/EntityResolver/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -120,7 +120,7 @@ + + $(XSL_BIN_DIR)/ExternalFunction: $(XSL_OBJ_DIR)/ExternalFunction.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/ExternalFunction/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -128,7 +128,7 @@ + + $(XSL_BIN_DIR)/ParsedSourceWrappers: $(XSL_OBJ_DIR)/ParsedSourceWrappers.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/ParsedSourceWrappers/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -136,7 +136,7 @@ + + $(XSL_BIN_DIR)/SerializeNodeSet: $(XSL_OBJ_DIR)/SerializeNodeSet.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/SerializeNodeSet/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -144,7 +144,7 @@ + + $(XSL_BIN_DIR)/SimpleTransform: $(XSL_OBJ_DIR)/SimpleTransform.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/SimpleTransform/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -152,7 +152,7 @@ + + $(XSL_BIN_DIR)/SimpleXPathAPI: $(XSL_OBJ_DIR)/SimpleXPathAPI.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/SimpleXPathAPI/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -160,7 +160,7 @@ + + $(XSL_BIN_DIR)/SimpleXPathCAPI: $(XSL_OBJ_DIR)/SimpleXPathCAPI.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/SimpleXPathCAPI/%.c + $(CC4) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -168,7 +168,7 @@ + + $(XSL_BIN_DIR)/StreamTransform: $(XSL_OBJ_DIR)/StreamTransform.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/StreamTransform/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -176,7 +176,7 @@ + + $(XSL_BIN_DIR)/TraceListen: $(XSL_OBJ_DIR)/TraceListen.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/TraceListen/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -184,7 +184,7 @@ + + $(XSL_BIN_DIR)/TransformToXercesDOM: $(XSL_OBJ_DIR)/TransformToXercesDOM.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/TransformToXercesDOM/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -192,7 +192,7 @@ + + $(XSL_BIN_DIR)/UseStylesheetParam: $(XSL_OBJ_DIR)/UseStylesheetParam.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/UseStylesheetParam/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -200,7 +200,7 @@ + + $(XSL_BIN_DIR)/XalanTransform: $(XSL_OBJ_DIR)/XalanTransform.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/XalanTransform/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -208,7 +208,7 @@ + + $(XSL_BIN_DIR)/XalanTransformerCallback: $(XSL_OBJ_DIR)/XalanTransformerCallback.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/XalanTransformerCallback/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -216,7 +216,7 @@ + + $(XSL_BIN_DIR)/ThreadSafe: $(XSL_OBJ_DIR)/ThreadSafe.o + $(LINK) $(XSL_BUILD_OPTIONS) $(PLATFORM_LIB_LINK_OPTIONS) \ +- $(EXTRA_LINK_OPTIONS) $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ $(EXTRA_LINK_OPTIONS) $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + $(XSL_OBJ_DIR)/%.o:$(SAMPLES_DIR)/ThreadSafe/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +diff -urN a/c/Tests/Makefile.in b/c/Tests/Makefile.in +--- a/c/Tests/Makefile.in 2012-03-19 16:18:12.000000000 +0000 ++++ b/c/Tests/Makefile.in 2018-09-07 16:07:59.063089005 +0100 +@@ -62,7 +62,7 @@ + + $(XSL_BIN_DIR)/ThreadTest: ${XSL_OBJ_DIR}/ThreadTest.o + ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ +- ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + ${XSL_OBJ_DIR}/%.o:$(TESTS_DIR)/Threads/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -70,7 +70,7 @@ + + $(XSL_BIN_DIR)/Conf: ${XSL_OBJ_DIR}/conf.o + ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ +- ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + ${XSL_OBJ_DIR}/%.o:$(TESTS_DIR)/Conf/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< + +@@ -92,7 +92,7 @@ + + $(XSL_BIN_DIR)/Perf: $(PERF_OBJECTS) + ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} \ +- ${EXTRA_LINK_OPTIONS} $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) $^ -o $@ $(OTHER_LINK_PARAMETERS) ++ ${EXTRA_LINK_OPTIONS} $^ $(XALAN_LIB) $(ALLLIBS) $(CXXFLAGS) -o $@ $(OTHER_LINK_PARAMETERS) + + ${XSL_OBJ_DIR}/%.o:$(TESTS_DIR)/Performance/%.cpp + $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $< diff --git a/ports/xalan-c/0006-fix-testxslt-segfault.patch b/ports/xalan-c/0006-fix-testxslt-segfault.patch new file mode 100644 index 00000000000..b8f9b09aba1 --- /dev/null +++ b/ports/xalan-c/0006-fix-testxslt-segfault.patch @@ -0,0 +1,12 @@ +diff -urN a/c/src/xalanc/PlatformSupport/XalanLocator.hpp b/c/src/xalanc/PlatformSupport/XalanLocator.hpp +--- a/c/src/xalanc/PlatformSupport/XalanLocator.hpp 2012-09-27 07:59:33.000000000 +0100 ++++ b/c/src/xalanc/PlatformSupport/XalanLocator.hpp 2018-09-07 16:07:11.070819930 +0100 +@@ -91,7 +91,7 @@ + const XalanDOMChar* theAlternateId = getEmptyPtr()) + { + return theLocator == 0 ? theAlternateId : (theLocator->getSystemId() ? +- theLocator->getPublicId() : theAlternateId); ++ theLocator->getSystemId() : theAlternateId); + } + + /** diff --git a/ports/xalan-c/0007-fix-readme-typos.patch b/ports/xalan-c/0007-fix-readme-typos.patch new file mode 100644 index 00000000000..e97d1674975 --- /dev/null +++ b/ports/xalan-c/0007-fix-readme-typos.patch @@ -0,0 +1,21 @@ +diff -urN a/c/README b/c/README +--- a/c/README 2012-10-13 05:52:45.000000000 +0100 ++++ b/c/README 2018-09-07 16:06:24.602562653 +0100 +@@ -3,7 +3,7 @@ + + Project Description: + The Apache Xalan C/C++ Project provides a library and a +- comand line program to transform XML documents using a ++ command line program to transform XML documents using a + stylesheet that conforms to XSLT 1.0 standards. + + The source package contains all the code to create the library, +@@ -84,7 +84,7 @@ + XalanMessages_1_11.exp - Windows DLL export definitions + XalanMessages_1_11.lib - Windows DLL library definitions + XalanMessages_1_11D.exp - Windows DLL export definitions +- XalanMessages_1_11D.lib - Windows DLL library defnitions ++ XalanMessages_1_11D.lib - Windows DLL library definitions + + SUPPORTED PLATFORMS: + - This is only a partial list diff --git a/ports/xalan-c/CONTROL b/ports/xalan-c/CONTROL index 314ea1ecd23..aa2345462b9 100644 --- a/ports/xalan-c/CONTROL +++ b/ports/xalan-c/CONTROL @@ -1,4 +1,4 @@ Source: xalan-c -Version: 1.11-1 +Version: 1.11-4 Description: Xalan is an XSLT processor for transforming XML documents into HTML, text, or other XML document types -Build-Depends: xerces-c, atlmfc +Build-Depends: xerces-c diff --git a/ports/xalan-c/portfile.cmake b/ports/xalan-c/portfile.cmake index 4f4da914303..4c035260a40 100644 --- a/ports/xalan-c/portfile.cmake +++ b/ports/xalan-c/portfile.cmake @@ -1,81 +1,60 @@ -# 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 = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - message(STATUS "Only DLL builds are currently supported.") - set(VCPKG_LIBRARY_LINKAGE "dynamic") -endif() - -if(VCPKG_CRT_LINKAGE STREQUAL "static") - message(FATAL_ERROR "Only dynamic linking against the CRT is currently supported.") -endif() - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xalan-c-1.11) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +set(XALANC_VERSION 1.11) + vcpkg_download_distfile(ARCHIVE - URLS "http://www-us.apache.org/dist/xalan/xalan-c/sources/xalan_c-1.11-src.zip" - FILENAME "xalan_c-1.11-src.zip" + URLS "http://www-us.apache.org/dist/xalan/xalan-c/sources/xalan_c-${XALANC_VERSION}-src.zip" + FILENAME "xalan_c-${XALANC_VERSION}-src.zip" SHA512 2e79a2c8f755c9660ffc94b26b6bd4b140685e05a88d8e5abb19a2f271383a3f2f398b173ef403f65dc33af75206214bd21ac012c39b4c0051b3a9f61f642fe6 ) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-ALLOW_RTCc_IN_STL.patch") +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${XALANC_VERSION} + PATCHES + 0001-ALLOW_RTCc_IN_STL.patch + 0002-no-mfc.patch + 0003-char16_t.patch + 0004-macosx-dyld-fallback.patch + 0005-fix-ftbfs-ld-as-needed.patch + 0006-fix-testxslt-segfault.patch + 0007-fix-readme-typos.patch +) if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") - set(BUILD_ARCH "Win32") - set(OUTPUT_DIR "Win32") elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64") - set(BUILD_ARCH "x64") - set(OUTPUT_DIR "Win64") else() message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") endif() -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/c/projects/Win32/VC10/AllInOne/AllInOne.vcxproj - PLATFORM ${BUILD_ARCH} - USE_VCPKG_INTEGRATION -) +set(ENV{CL} "$ENV{CL} \"/I${CURRENT_INSTALLED_DIR}/include\"") +set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin") -# This is needed to generate the required LocalMsgIndex.hpp header -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/c/projects/Win32/VC10/Utils/XalanMsgLib/XalanMsgLib.vcxproj - PLATFORM ${BUILD_ARCH} - USE_VCPKG_INTEGRATION +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH c/projects/Win32/VC10/AllInOne/AllInOne.vcxproj + OPTIONS_RELEASE /p:XERCESCROOT=${CURRENT_INSTALLED_DIR} + OPTIONS_DEBUG /p:XERCESCROOT=${CURRENT_INSTALLED_DIR}/debug + LICENSE_SUBPATH c/LICENSE + SKIP_CLEAN ) -file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Debug/XalanMessages_1_11D.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Debug/Xalan-C_1_11D.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Debug/Xalan-C_1D.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Release/XalanMessages_1_11.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Release/Xalan-C_1_11.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Release/Xalan-C_1.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(COPY ${SOURCE_PATH}/c/src/xalanc DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.hpp) -# LocalMsgIndex.hpp is here -file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Release/Nls/Include/LocalMsgIndex.hpp - DESTINATION ${CURRENT_PACKAGES_DIR}/include/xalanc/PlatformSupport) +# LocalMsgIndex.hpp and LocalMsgData.hpp are here +file(GLOB NLS_INCLUDES "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/c/Build/*/VC10/Release/Nls/Include/*.hpp") +if(NOT NLS_INCLUDES) + message(FATAL_ERROR "Could not locate LocalMsgIndex.hpp") +endif() +file(COPY ${NLS_INCLUDES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/xalanc/PlatformSupport) + +vcpkg_clean_msbuild() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xalanc/NLS) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xalanc/util/MsgLoaders/ICU/resources) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xalanc/TestXSLT) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xalanc/XalanExe) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xalanc/XPathCAPI) - -# Handle copyright -file(COPY ${SOURCE_PATH}/c/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/xalan-c) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/xalan-c/LICENSE ${CURRENT_PACKAGES_DIR}/share/xalan-c/copyright) - -vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/xerces-c/CONTROL b/ports/xerces-c/CONTROL index 81a76c32570..006210e2fc8 100644 --- a/ports/xerces-c/CONTROL +++ b/ports/xerces-c/CONTROL @@ -1,3 +1,3 @@ Source: xerces-c -Version: 3.1.4-3 +Version: 3.2.2-5 Description: Xerces-C++ is a XML parser, for parsing, generating, manipulating, and validating XML documents using the DOM, SAX, and SAX2 APIs. diff --git a/ports/xerces-c/disable-tests.patch b/ports/xerces-c/disable-tests.patch new file mode 100644 index 00000000000..843b022d732 --- /dev/null +++ b/ports/xerces-c/disable-tests.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4254f89..aa08565 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -175,10 +175,16 @@ install( + COMPONENT "development") + + # Process subdirectories ++if(NOT DISABLE_DOC) + add_subdirectory(doc) ++endif() + add_subdirectory(src) ++if(NOT DISABLE_TESTS) + add_subdirectory(tests) ++endif() ++if(NOT DISABLE_SAMPLES) + add_subdirectory(samples) ++endif() + + # Display configuration summary + message(STATUS "") diff --git a/ports/xerces-c/portfile.cmake b/ports/xerces-c/portfile.cmake index c0a4166fb4a..b14981c749f 100644 --- a/ports/xerces-c/portfile.cmake +++ b/ports/xerces-c/portfile.cmake @@ -1,58 +1,47 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = -# 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) -if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") - message(STATUS "Static libraries not supported; building dynamic instead") - set(VCPKG_LIBRARY_LINKAGE "dynamic") -endif() -if (VCPKG_CRT_LINKAGE STREQUAL "static") - message(STATUS "Static linking against the CRT not supported; building dynamic instead") - set(VCPKG_CRT_LINKAGE "dynamic") -endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/xerces-c - REF Xerces-C_3_1_4 - SHA512 6dc3e4bb68bc32a0e8ec6dcc7ec67e21239a79c909d08ccc16c96dc5de4e73800993d1c09f589606925507baf0b2a9bf6037d28c84dae826935bf1f7a151071e - HEAD_REF master + REF Xerces-C_3_2_2 + SHA512 66f60fe9194376ac0ca99d13ea5bce23ada86e0261dde30686c21ceb5499e754dab8eb0a98adadd83522bda62709377715501f6dac49763e3a686f9171cc63ea + HEAD_REF trunk + PATCHES disable-tests.patch ) -if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") - set(BUILD_ARCH "Win32") - set(OUTPUT_DIR "Win32") -elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64") - set(BUILD_ARCH "x64") - set(OUTPUT_DIR "Win64") +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDISABLE_TESTS=ON + -DDISABLE_DOC=ON + -DDISABLE_SAMPLES=ON +) + +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/xercesc) else() - message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/XercesC TARGET_PATH share/xercesc) endif() -vcpkg_build_msbuild( - #PROJECT_PATH ${SOURCE_PATH}/projects/Win32/VC14/xerces-all/xerces-all.sln - PROJECT_PATH ${SOURCE_PATH}/projects/Win32/VC14/xerces-all/xercesLib/xercesLib.vcxproj - PLATFORM ${BUILD_ARCH}) +file(READ ${CURRENT_PACKAGES_DIR}/share/xercesc/XercesCConfigInternal.cmake _contents) +string(REPLACE + "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + _contents + "${_contents}" +) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/xercesc/XercesCConfigInternal.cmake "${_contents}") -file(COPY ${SOURCE_PATH}/Build/${OUTPUT_DIR}/VC14/Debug/xerces-c_3_1D.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -file(COPY ${SOURCE_PATH}/Build/${OUTPUT_DIR}/VC14/Debug/xerces-c_3D.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(COPY ${SOURCE_PATH}/Build/${OUTPUT_DIR}/VC14/Release/xerces-c_3_1.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(COPY ${SOURCE_PATH}/Build/${OUTPUT_DIR}/VC14/Release/xerces-c_3.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - -file(COPY ${SOURCE_PATH}/src/xercesc DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.hpp) -# Certain headers under xercesc/util include .c files, so we need these copied over as well -file(COPY ${SOURCE_PATH}/src/xercesc DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.c) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xercesc/NLS) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xercesc/util/MsgLoaders/ICU/resources) +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/xerces-c) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/xerces-c) file(RENAME ${CURRENT_PACKAGES_DIR}/share/xerces-c/LICENSE ${CURRENT_PACKAGES_DIR}/share/xerces-c/copyright) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/xlnt/CONTROL b/ports/xlnt/CONTROL index 25b4ce01037..80606821ba8 100644 --- a/ports/xlnt/CONTROL +++ b/ports/xlnt/CONTROL @@ -1,3 +1,3 @@ Source: xlnt -Version: 1.2.0-1 +Version: 1.3.0-1 Description: Cross-platform user-friendly xlsx library for C++14 diff --git a/ports/xlnt/portfile.cmake b/ports/xlnt/portfile.cmake index f0cb9425d50..29a0e22012f 100644 --- a/ports/xlnt/portfile.cmake +++ b/ports/xlnt/portfile.cmake @@ -1,17 +1,13 @@ include(vcpkg_common_functions) -set(XLNT_VERSION 1.2.0) -set(XLNT_HASH 359ff1e99531513d7b1228ff07f137531be99d7a95bbc5b399168a6c609f56dba2e030464f8203db92db137ab80dbe10f71de71a62b0bcb96eaafc0f09256339) -set(XLNT_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xlnt-${XLNT_VERSION}) - -vcpkg_download_distfile(ARCHIVE - URLS https://github.com/tfussell/xlnt/archive/v${XLNT_VERSION}.zip - FILENAME xlnt-${XLNT_VERSION}.zip - SHA512 ${XLNT_HASH} +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tfussell/xlnt + REF v1.3.0 + SHA512 716b93a6138daf1e293980a3c26801bfd00aa713afdd9cbe9be672ccff8c86b69b26eb0f3e8259bd0844e04d0e6148b64467d7db6815c76ecf412715d506786f + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) - if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(STATIC OFF) else() @@ -19,7 +15,7 @@ else() endif() vcpkg_configure_cmake( - SOURCE_PATH ${XLNT_SOURCE_PATH} + SOURCE_PATH ${SOURCE_PATH} OPTIONS -DTESTS=OFF -DSAMPLES=OFF -DBENCHMARKS=OFF -DSTATIC=${STATIC} ) @@ -28,6 +24,6 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) -file(INSTALL ${XLNT_SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/xlnt RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/xlnt RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/xmsh/CONTROL b/ports/xmsh/CONTROL new file mode 100644 index 00000000000..7f53c582ca6 --- /dev/null +++ b/ports/xmsh/CONTROL @@ -0,0 +1,4 @@ +Source: xmsh +Version: 0.4.1 +Description: Reference Implementation of XMSH Library +Build-Depends: tl-expected diff --git a/ports/xmsh/portfile.cmake b/ports/xmsh/portfile.cmake new file mode 100644 index 00000000000..51897e6bd73 --- /dev/null +++ b/ports/xmsh/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_find_acquire_program(PYTHON3) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nagzira/xmsh + REF v0.4.1 + SHA512 7bd9fe9e565b33722fec37a7e3d9bd8b7b132692add5d26e31954367fb284b49a26a21532ddcb0e425af7f8208e755f21f2d8de81b33ed2a1149724f4ccd2c38 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPYTHON3_EXECUTABLE=${PYTHON3} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() diff --git a/ports/yajl/CONTROL b/ports/yajl/CONTROL new file mode 100644 index 00000000000..6811dc84af4 --- /dev/null +++ b/ports/yajl/CONTROL @@ -0,0 +1,3 @@ +Source: yajl +Version: 2.1.0-1 +Description: Yet Another JSON Library diff --git a/ports/yajl/cmake.patch b/ports/yajl/cmake.patch new file mode 100644 index 00000000000..c631ead2137 --- /dev/null +++ b/ports/yajl/cmake.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4c0a9be..cbec22f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,7 +28,7 @@ ENDIF (NOT CMAKE_BUILD_TYPE) + + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + +-IF (WIN32) ++IF (WIN32 AND FALSE) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4") + ADD_DEFINITIONS(-DWIN32) + SET(linkFlags "/PDB:NONE /INCREMENTAL:NO /OPT:NOREF /OPT:NOICF") +@@ -46,7 +46,8 @@ IF (WIN32) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996 /wd4255 /wd4130 /wd4100 /wd4711") + SET(CMAKE_C_FLAGS_DEBUG "/D DEBUG /Od /Z7") + SET(CMAKE_C_FLAGS_RELEASE "/D NDEBUG /O2") +-ELSE (WIN32) ++endif() ++if (NOT WIN32) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") + IF(CMAKE_COMPILER_IS_GNUCC) + INCLUDE(CheckCCompilerFlag) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 99cf9e9..454482a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -78,7 +78,7 @@ INCLUDE_DIRECTORIES(${incDir}/..) + # at build time you may specify the cmake variable LIB_SUFFIX to handle + # 64-bit systems which use 'lib64' + INSTALL(TARGETS yajl +- RUNTIME DESTINATION lib${LIB_SUFFIX} ++ RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) + INSTALL(TARGETS yajl_s ARCHIVE DESTINATION lib${LIB_SUFFIX}) diff --git a/ports/yajl/portfile.cmake b/ports/yajl/portfile.cmake new file mode 100644 index 00000000000..92742e0a775 --- /dev/null +++ b/ports/yajl/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lloyd/yajl + REF 2.1.0 + SHA512 9e786d080803df80ec03a9c2f447501e6e8e433a6baf636824bc1d50ecf4f5f80d7dfb1d47958aeb0a30fe459bd0ef033d41bc6a79e1dc6e6b5eade930b19b02 + HEAD_REF master + PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/yajl RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/pkgconfig) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(GLOB SHAREDOBJECTS ${CURRENT_PACKAGES_DIR}/lib/libyajl.so* ${CURRENT_PACKAGES_DIR}/debug/lib/libyajl.so*) + file(REMOVE_RECURSE ${SHAREDOBJECTS} ${CURRENT_PACKAGES_DIR}/lib/yajl.lib ${CURRENT_PACKAGES_DIR}/debug/lib/yajl.lib) +else() + file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE_RECURSE + ${EXES} + ${CURRENT_PACKAGES_DIR}/lib/yajl_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/yajl_s.lib + ${CURRENT_PACKAGES_DIR}/lib/libyajl_s.a ${CURRENT_PACKAGES_DIR}/debug/lib/libyajl_s.a + ) +endif() diff --git a/ports/yaml-cpp/0001-noexcept.patch b/ports/yaml-cpp/0001-noexcept.patch new file mode 100644 index 00000000000..e5e1882c041 --- /dev/null +++ b/ports/yaml-cpp/0001-noexcept.patch @@ -0,0 +1,26 @@ +diff --git a/include/yaml-cpp/exceptions.h b/include/yaml-cpp/exceptions.h +index 9c96859..a6045ee 100644 +--- a/include/yaml-cpp/exceptions.h ++++ b/include/yaml-cpp/exceptions.h +@@ -15,7 +15,7 @@ + + // This is here for compatibility with older versions of Visual Studio + // which don't support noexcept +-#ifdef _MSC_VER ++#if defined(_MSC_VER) && _MSC_VER < 1900 + #define YAML_CPP_NOEXCEPT _NOEXCEPT + #else + #define YAML_CPP_NOEXCEPT noexcept +diff --git a/src/exceptions.cpp b/src/exceptions.cpp +index 9b6d891..931b4bc 100644 +--- a/src/exceptions.cpp ++++ b/src/exceptions.cpp +@@ -2,7 +2,7 @@ + + // This is here for compatibility with older versions of Visual Studio + // which don't support noexcept +-#ifdef _MSC_VER ++#if defined(_MSC_VER) && _MSC_VER < 1900 + #define YAML_CPP_NOEXCEPT _NOEXCEPT + #else + #define YAML_CPP_NOEXCEPT noexcept diff --git a/ports/yaml-cpp/CONTROL b/ports/yaml-cpp/CONTROL index 1e2d0e5c949..0689f8d4e10 100644 --- a/ports/yaml-cpp/CONTROL +++ b/ports/yaml-cpp/CONTROL @@ -1,3 +1,3 @@ Source: yaml-cpp -Version: 0.6.2 +Version: 0.6.2-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 071931f64c1..6233bc07681 100644 --- a/ports/yaml-cpp/portfile.cmake +++ b/ports/yaml-cpp/portfile.cmake @@ -5,6 +5,8 @@ vcpkg_from_github( REF yaml-cpp-0.6.2 SHA512 fea8ce0a20a00cbc75023d1db442edfcd32d0ac57a3c41b32ec8d56f87cc1d85d7dd7a923ce662f5d3a315f91a736d6be0d649997acd190915c1d68cc93795e4 HEAD_REF master + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001-noexcept.patch ) vcpkg_configure_cmake( diff --git a/ports/yara/CMakeLists.txt b/ports/yara/CMakeLists.txt index 783d322fbbb..89780ce4222 100644 --- a/ports/yara/CMakeLists.txt +++ b/ports/yara/CMakeLists.txt @@ -17,12 +17,28 @@ include_directories( libyara/include ) +set(PROC_PLATFORM_SOURCE "libyara/proc/none.c") +set(PROC_PLATFORM_INTERFACE "USE_NO_PROC") + +if(APPLE AND CMAKE_SYSTEM_NAME MATCHES "Darwin") + set(PROC_PLATFORM_SOURCE "libyara/proc/mach.c") + set(PROC_PLATFORM_INTERFACE "USE_MACH_PROC") +elseif(WIN32 OR MINGW OR CYGWIN) + set(PROC_PLATFORM_SOURCE "libyara/proc/windows.c") + set(PROC_PLATFORM_INTERFACE "USE_WINDOWS_PROC") +elseif(UNIX AND CMAKE_SYSTEM_NAME MATCHES "Linux") + set(THREADS_PREFER_PTHREAD_FLAG TRUE) + set(PROC_PLATFORM_SOURCE "libyara/proc/linux.c") + set(PROC_PLATFORM_INTERFACE "USE_LINUX_PROC") +endif() + set( libyara_sources libyara/ahocorasick.c libyara/arena.c libyara/atoms.c libyara/compiler.c + libyara/endian.c libyara/exec.c libyara/exefiles.c libyara/filemap.c @@ -47,13 +63,14 @@ set( libyara/object.c libyara/parser.c libyara/proc.c - libyara/proc/windows.c + ${PROC_PLATFORM_SOURCE} libyara/re.c libyara/re_grammar.c libyara/re_lexer.c libyara/rules.c libyara/scan.c libyara/sizedstr.c + libyara/stopwatch.c libyara/stream.c libyara/strutils.c libyara/threading.c @@ -70,22 +87,40 @@ set( yarac_sources yarac.c ) -add_library(libyara ${libyara_sources}) -target_link_libraries(libyara PRIVATE OpenSSL::SSL OpenSSL::Crypto ${JANSSON_LIBRARY}) -target_compile_definitions( - libyara - PRIVATE - -DHAVE_LIBCRYPTO -DUSE_WINDOWS_PROC - -DCUCKOO_MODULE- DHASH_MODULE -DDOTNET_MODULE +find_package(Threads REQUIRED) + +set( + libyara_dependencies + OpenSSL::SSL + OpenSSL::Crypto + Threads::Threads + ${JANSSON_LIBRARY} ) +if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") + list(APPEND libyara_dependencies m) +endif() + +set( + libyara_definitions + -DHAVE_LIBCRYPTO + -D${PROC_PLATFORM_INTERFACE} + -DCUCKOO_MODULE + -DHASH_MODULE + -DDOTNET_MODULE +) + +add_library(libyara ${libyara_sources}) +target_link_libraries(libyara PRIVATE ${libyara_dependencies}) +target_compile_definitions(libyara PRIVATE ${libyara_definitions}) + add_executable(yara ${yara_sources}) add_executable(yarac ${yarac_sources}) -target_link_libraries(yarac PRIVATE libyara OpenSSL::SSL OpenSSL::Crypto ${JANSSON_LIBRARY}) -target_link_libraries(yara PRIVATE libyara OpenSSL::SSL OpenSSL::Crypto ${JANSSON_LIBRARY}) +target_link_libraries(yarac PRIVATE libyara ${libyara_dependencies}) +target_link_libraries(yara PRIVATE libyara ${libyara_dependencies}) install( TARGETS libyara diff --git a/ports/yara/CONTROL b/ports/yara/CONTROL index 8772a00c611..fb29eaad0f2 100644 --- a/ports/yara/CONTROL +++ b/ports/yara/CONTROL @@ -1,4 +1,4 @@ Source: yara -Version: e3439e4ead4ed5d3b75a0b46eaf15ddda2110bb9 +Version: e3439e4ead4ed5d3b75a0b46eaf15ddda2110bb9-1 Description: The pattern matching swiss knife Build-Depends: openssl, jansson diff --git a/ports/yato/CONTROL b/ports/yato/CONTROL index f3793fb806f..f1951931501 100644 --- a/ports/yato/CONTROL +++ b/ports/yato/CONTROL @@ -1,3 +1,3 @@ Source: yato -Version: 1.0 +Version: 1.0-1 Description: Modern C++14 containers and utilities, actors system, typesafe config diff --git a/ports/yato/portfile.cmake b/ports/yato/portfile.cmake index f688675bab8..44ee937820d 100644 --- a/ports/yato/portfile.cmake +++ b/ports/yato/portfile.cmake @@ -12,30 +12,30 @@ vcpkg_from_bitbucket( file(COPY "${SOURCE_PATH}/include/yato" DESTINATION "${CURRENT_PACKAGES_DIR}/include" ) +file(COPY "${SOURCE_PATH}/modules/actors/yato" + DESTINATION "${CURRENT_PACKAGES_DIR}/include" +) +file(COPY "${SOURCE_PATH}/modules/config/yato" + DESTINATION "${CURRENT_PACKAGES_DIR}/include" +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DYATO_BUILD_TESTS:BOOL=OFF -DYATO_BUILD_ACTORS:BOOL=ON -DYATO_BUILD_CONFIG:BOOL=ON -DYATO_CONFIG_MANUAL:BOOL=ON + OPTIONS + -DYATO_BUILD_TESTS:BOOL=OFF + -DYATO_BUILD_ACTORS:BOOL=ON + -DYATO_BUILD_CONFIG:BOOL=ON + -DYATO_CONFIG_MANUAL:BOOL=ON + -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:PATH=${CURRENT_PACKAGES_DIR}/debug/lib/ + -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG:PATH=${CURRENT_PACKAGES_DIR}/debug/lib/ + -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG:PATH=${CURRENT_PACKAGES_DIR}/debug/lib/ + -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=${CURRENT_PACKAGES_DIR}/lib/ + -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE:PATH=${CURRENT_PACKAGES_DIR}/lib/ + -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE:PATH=${CURRENT_PACKAGES_DIR}/lib/ ) vcpkg_build_cmake() -set(BUILD_ROOT_DEBUG "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(BUILD_ROOT_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - -file(COPY "${BUILD_ROOT_DEBUG}/modules/actors/Debug/YatoActors.lib" - "${BUILD_ROOT_DEBUG}/modules/config/Debug/YatoConfig.lib" - DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/" -) - -file(COPY "${BUILD_ROOT_RELEASE}/modules/actors/Release/YatoActors.lib" - "${BUILD_ROOT_RELEASE}/modules/config/Release/YatoConfig.lib" - DESTINATION "${CURRENT_PACKAGES_DIR}/lib/" -) - # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/yato) file(RENAME ${CURRENT_PACKAGES_DIR}/share/yato/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/yato/copyright) - - - diff --git a/ports/yoga/CONTROL b/ports/yoga/CONTROL index 7a96eb9c22c..a9fcd9419cd 100644 --- a/ports/yoga/CONTROL +++ b/ports/yoga/CONTROL @@ -1,3 +1,3 @@ Source: yoga -Version: 1.8.0-1 +Version: 1.10.0 Description: Yoga is a cross-platform layout engine which implements Flexbox diff --git a/ports/yoga/portfile.cmake b/ports/yoga/portfile.cmake index 5dbb4e527e5..a8d532474ef 100644 --- a/ports/yoga/portfile.cmake +++ b/ports/yoga/portfile.cmake @@ -21,8 +21,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/yoga - REF v1.8.0 - SHA512 9af0e9e66ce223c99a9cab12721099ca40f85d2fa2a0e0a7d2bcff6d5acc5b6ca0edaaa53e49ec921bf78bb986070702cfe3271c4819147486dad6f6ee93e690 + REF 1.10.0 + SHA512 629d9fbc4e4ad3c495a92896803bf7a0fca8dd986068d9862ba2c9aa0a70f8542a35c0e9ce9974ccdc004827e5e072f45b6eabff1d00462ec437b48de9dfacf4 HEAD_REF master ) diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index b74483695fb..84b0ad93c57 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 2018-04-17 +Version: 2018-11-01 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 a907be9af05..ebff91236e3 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/libzmq - REF c971445025535b9f989ab0b78f5ddd1c026f1878 - SHA512 4eb85e207f53de73cf5369c4c3e79d858ee380e1374ebe807dfc6f99782efc2b98984f48a2cce11b9bf22c7934ef3d1a075cb98fb9e90d5f216a4e128d6df212 + REF efc9a3021fb61ca92b9869f0ad8308d29a3ebfa3 + SHA512 04c2d94c497a0398243c1fc8c5e1bdcc3a9da873ccf688a9345db334d12e562c8131e7976fa2123fb8f760cc450bd0cfe33a486d1f31880b7d69379e10be7caa HEAD_REF master ) diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake index d924e213554..bc36b27814c 100644 --- a/ports/zlib/portfile.cmake +++ b/ports/zlib/portfile.cmake @@ -43,3 +43,5 @@ file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DI vcpkg_copy_pdbs() file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +vcpkg_test_cmake(PACKAGE_NAME ZLIB MODULE) diff --git a/ports/zstd/CONTROL b/ports/zstd/CONTROL index fa139d86849..985c24b0cf2 100644 --- a/ports/zstd/CONTROL +++ b/ports/zstd/CONTROL @@ -1,3 +1,3 @@ Source: zstd -Version: 1.3.3 +Version: 1.3.7-1 Description: Zstandard - Fast real-time compression algorithm http://www.zstd.net diff --git a/ports/zstd/enable-debug-mode.patch b/ports/zstd/enable-debug-mode.patch new file mode 100644 index 00000000000..a3e82903226 --- /dev/null +++ b/ports/zstd/enable-debug-mode.patch @@ -0,0 +1,13 @@ +diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt +index 1e2921d..31fe3d5 100644 +--- a/build/cmake/CMakeLists.txt ++++ b/build/cmake/CMakeLists.txt +@@ -12,7 +12,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9) + SET(ZSTD_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..") + + # Ensure Release build even if not invoked via Makefile +-SET(CMAKE_BUILD_TYPE "Release") ++# SET(CMAKE_BUILD_TYPE "Release") + + LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules") + INCLUDE(GNUInstallDirs) diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake index c69ee0cd060..dfbb2e3f28f 100644 --- a/ports/zstd/portfile.cmake +++ b/ports/zstd/portfile.cmake @@ -2,11 +2,13 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/zstd - REF v1.3.3 - SHA512 72b63f96f65ca987cdc82c24354f7665c7dc3b2563cb0646f355c34bf8f090d8a0759729f8beaba8317272bdab34749f934055707b25cfd69c98a9fdcfbc59ae - HEAD_REF dev) + REF v1.3.7 + SHA512 b7a432b13e237ac1490cd82b87727f6a4385d5ea7b89f566dea61a3993e17909c03288f727326ada326e36eb47ea5f9eab67c097808ee42f52cc800a7f7e1738 + HEAD_REF dev + PATCHES enable-debug-mode.patch +) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") set(ZSTD_STATIC 1) set(ZSTD_SHARED 0) else() @@ -14,10 +16,12 @@ 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}") +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + # 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}") +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/build/cmake @@ -28,13 +32,15 @@ vcpkg_configure_cmake( -DZSTD_LEGACY_SUPPORT=1 -DZSTD_BUILD_PROGRAMS=0 -DZSTD_BUILD_TESTS=0 - -DZSTD_BUILD_CONTRIB=0) + -DZSTD_BUILD_CONTRIB=0 + OPTIONS_DEBUG + -DCMAKE_DEBUG_POSTFIX=d) vcpkg_install_cmake() vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") foreach(HEADER zdict.h zstd.h zstd_errors.h) file(READ ${CURRENT_PACKAGES_DIR}/include/${HEADER} HEADER_CONTENTS) string(REPLACE "defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1)" "1" HEADER_CONTENTS "${HEADER_CONTENTS}") diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 deleted file mode 100644 index fdd89e7b9e7..00000000000 --- a/scripts/VcpkgPowershellUtils.ps1 +++ /dev/null @@ -1,318 +0,0 @@ -function vcpkgHasModule([Parameter(Mandatory=$true)][string]$moduleName) -{ - return [bool](Get-Module -ListAvailable -Name $moduleName) -} - -function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName) -{ - if ($object -eq $null) - { - return $false - } - - return [bool]($object.psobject.Properties | where { $_.Name -eq "$propertyName"}) -} - -function vcpkgCreateDirectoryIfNotExists([Parameter(Mandatory=$true)][string]$dirPath) -{ - if (!(Test-Path $dirPath)) - { - New-Item -ItemType Directory -Path $dirPath | Out-Null - } -} - -function vcpkgCreateParentDirectoryIfNotExists([Parameter(Mandatory=$true)][string]$path) -{ - $parentDir = split-path -parent $path - if ([string]::IsNullOrEmpty($parentDir)) - { - return - } - - if (!(Test-Path $parentDir)) - { - New-Item -ItemType Directory -Path $parentDir | Out-Null - } -} - -function vcpkgIsDirectory([Parameter(Mandatory=$true)][string]$path) -{ - return (Get-Item $path) -is [System.IO.DirectoryInfo] -} - -function vcpkgRemoveItem([Parameter(Mandatory=$true)][string]$path) -{ - if ([string]::IsNullOrEmpty($path)) - { - return - } - - if (Test-Path $path) - { - # Remove-Item -Recurse occasionally fails. This is a workaround - if (vcpkgIsDirectory $path) - { - & cmd.exe /c rd /s /q $path - } - else - { - Remove-Item $path -Force - } - } -} - -function vcpkgHasCommand([Parameter(Mandatory=$true)][string]$commandName) -{ - return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue) -} - -function vcpkgHasCommandParameter([Parameter(Mandatory=$true)][string]$commandName, [Parameter(Mandatory=$true)][string]$parameterName) -{ - return (Get-Command $commandName).Parameters.Keys -contains $parameterName -} - -function vcpkgGetCredentials() -{ - if (vcpkgHasCommandParameter -commandName 'Get-Credential' -parameterName 'Message') - { - return Get-Credential -Message "Enter credentials for Proxy Authentication" - } - else - { - Write-Host "Enter credentials for Proxy Authentication" - return Get-Credential - } -} - -function vcpkgGetSHA512([Parameter(Mandatory=$true)][string]$filePath) -{ - if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Utility\Get-FileHash') - { - Write-Verbose("Hashing with Microsoft.PowerShell.Utility\Get-FileHash") - $hash = (Microsoft.PowerShell.Utility\Get-FileHash -Path $filePath -Algorithm SHA512).Hash - } - elseif(vcpkgHasCommand -commandName 'Pscx\Get-Hash') - { - Write-Verbose("Hashing with Pscx\Get-Hash") - $hash = (Pscx\Get-Hash -Path $filePath -Algorithm SHA512).HashString - } - else - { - Write-Verbose("Hashing with .NET") - $hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA512") - $fileAsByteArray = [io.File]::ReadAllBytes($filePath) - $hashByteArray = $hashAlgorithm.ComputeHash($fileAsByteArray) - $hash = -Join ($hashByteArray | ForEach-Object {"{0:x2}" -f $_}) - } - - return $hash.ToLower() -} - -function vcpkgCheckEqualFileHash( [Parameter(Mandatory=$true)][string]$url, - [Parameter(Mandatory=$true)][string]$filePath, - [Parameter(Mandatory=$true)][string]$expectedHash) -{ - $actualHash = vcpkgGetSHA512 $filePath - if ($expectedHash -ne $actualHash) - { - Write-Host ("`nFile does not have expected hash:`n" + - " url: [ $url ]`n" + - " File path: [ $filePath ]`n" + - " Expected hash: [ $expectedHash ]`n" + - " Actual hash: [ $actualHash ]`n") - throw - } -} - -function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, - [Parameter(Mandatory=$true)][string]$downloadPath, - [Parameter(Mandatory=$true)][string]$sha512) -{ - if ($url -match "github") - { - if ([System.Enum]::IsDefined([Net.SecurityProtocolType], "Tls12")) - { - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - } - else - { - Write-Warning "Github has dropped support for TLS versions prior to 1.2, which is not available on your system" - Write-Warning "Please manually download $url to $downloadPath" - Write-Warning "To solve this issue for future downloads, you can also install Windows Management Framework 5.1+" - throw "Download failed" - } - } - - vcpkgCreateParentDirectoryIfNotExists $downloadPath - - $downloadPartPath = "$downloadPath.part" - vcpkgRemoveItem $downloadPartPath - - $wc = New-Object System.Net.WebClient - if (!$wc.Proxy.IsBypassed($url)) - { - $wc.Proxy.Credentials = vcpkgGetCredentials - } - - $wc.DownloadFile($url, $downloadPartPath) - vcpkgCheckEqualFileHash -url $url -filePath $downloadPartPath -expectedHash $sha512 - Move-Item -Path $downloadPartPath -Destination $downloadPath -} - -function vcpkgDownloadFileWithAria2( [Parameter(Mandatory=$true)][string]$aria2exe, - [Parameter(Mandatory=$true)][string]$url, - [Parameter(Mandatory=$true)][string]$downloadPath, - [Parameter(Mandatory=$true)][string]$sha512) -{ - vcpkgCreateParentDirectoryIfNotExists $downloadPath - $downloadPartPath = "$downloadPath.part" - vcpkgRemoveItem $downloadPartPath - - $parentDir = split-path -parent $downloadPath - $filename = split-path -leaf $downloadPath - - if ((Test-Path $url) -or ($url.StartsWith("file://"))) # if is local file - { - vcpkgDownloadFile $url $downloadPath $sha512 - return - } - - $ec = vcpkgInvokeCommand "$aria2exe" "--dir `"$parentDir`" --out `"$filename.part`" $url" - if ($ec -ne 0) - { - Write-Host "Could not download $url" - throw - } - - vcpkgCheckEqualFileHash -url $url -filePath $downloadPartPath -expectedHash $sha512 - Move-Item -Path $downloadPartPath -Destination $downloadPath -} - -function vcpkgExtractFileWith7z([Parameter(Mandatory=$true)][string]$sevenZipExe, - [Parameter(Mandatory=$true)][string]$archivePath, - [Parameter(Mandatory=$true)][string]$destinationDir) -{ - vcpkgRemoveItem $destinationDir - $destinationPartial = "$destinationDir.partial" - vcpkgRemoveItem $destinationPartial - vcpkgCreateDirectoryIfNotExists $destinationPartial - $ec = vcpkgInvokeCommand "$sevenZipExe" "x `"$archivePath`" -o`"$destinationPartial`" -y" - if ($ec -ne 0) - { - Write-Host "Could not extract $archivePath" - throw - } - Rename-Item -Path "$destinationPartial" -NewName $destinationDir -} - -function vcpkgExtractZipFile( [Parameter(Mandatory=$true)][string]$archivePath, - [Parameter(Mandatory=$true)][string]$destinationDir) -{ - vcpkgRemoveItem $destinationDir - $destinationPartial = "$destinationDir.partial" - vcpkgRemoveItem $destinationPartial - vcpkgCreateDirectoryIfNotExists $destinationPartial - - - if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Archive\Expand-Archive') - { - Write-Verbose("Extracting with Microsoft.PowerShell.Archive\Expand-Archive") - Microsoft.PowerShell.Archive\Expand-Archive -path $archivePath -destinationpath $destinationPartial - } - elseif (vcpkgHasCommand -commandName 'Pscx\Expand-Archive') - { - Write-Verbose("Extracting with Pscx\Expand-Archive") - Pscx\Expand-Archive -path $archivePath -OutputPath $destinationPartial - } - else - { - Write-Verbose("Extracting via shell") - $shell = new-object -com shell.application - $zip = $shell.NameSpace($(Get-Item $archivePath).fullname) - foreach($item in $zip.items()) - { - # Piping to Out-Null is used to block until finished - $shell.Namespace($destinationPartial).copyhere($item) | Out-Null - } - } - - Rename-Item -Path "$destinationPartial" -NewName $destinationDir -} - -function vcpkgInvokeCommand() -{ - param ( [Parameter(Mandatory=$true)][string]$executable, - [string]$arguments = "") - - Write-Verbose "Executing: ${executable} ${arguments}" - $process = Start-Process -FilePath "`"$executable`"" -ArgumentList $arguments -PassThru -NoNewWindow - Wait-Process -InputObject $process - $ec = $process.ExitCode - Write-Verbose "Execution terminated with exit code $ec." - return $ec -} - -function vcpkgInvokeCommandClean() -{ - param ( [Parameter(Mandatory=$true)][string]$executable, - [string]$arguments = "") - - Write-Verbose "Clean-Executing: ${executable} ${arguments}" - $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition - $cleanEnvScript = "$scriptsDir\VcpkgPowershellUtils-ClearEnvironment.ps1" - $tripleQuotes = "`"`"`"" - $argumentsWithEscapedQuotes = $arguments -replace "`"", $tripleQuotes - $command = ". $tripleQuotes$cleanEnvScript$tripleQuotes; & $tripleQuotes$executable$tripleQuotes $argumentsWithEscapedQuotes" - $arg = "-NoProfile", "-ExecutionPolicy Bypass", "-command $command" - - $process = Start-Process -FilePath powershell.exe -ArgumentList $arg -PassThru -NoNewWindow - Wait-Process -InputObject $process - $ec = $process.ExitCode - Write-Verbose "Execution terminated with exit code $ec." - return $ec -} - -function vcpkgFormatElapsedTime([TimeSpan]$ts) -{ - if ($ts.TotalHours -ge 1) - { - return [string]::Format( "{0:N2} h", $ts.TotalHours); - } - - if ($ts.TotalMinutes -ge 1) - { - return [string]::Format( "{0:N2} min", $ts.TotalMinutes); - } - - if ($ts.TotalSeconds -ge 1) - { - return [string]::Format( "{0:N2} s", $ts.TotalSeconds); - } - - if ($ts.TotalMilliseconds -ge 1) - { - return [string]::Format( "{0:N2} ms", $ts.TotalMilliseconds); - } - - throw $ts -} - -function vcpkgFindFileRecursivelyUp() -{ - param( - [ValidateNotNullOrEmpty()] - [Parameter(Mandatory=$true)][string]$startingDir, - [ValidateNotNullOrEmpty()] - [Parameter(Mandatory=$true)][string]$filename - ) - - $currentDir = $startingDir - - while (!($currentDir -eq "") -and !(Test-Path "$currentDir\$filename")) - { - Write-Verbose "Examining $currentDir for $filename" - $currentDir = Split-path $currentDir -Parent - } - Write-Verbose "Examining $currentDir for $filename - Found" - return $currentDir -} diff --git a/scripts/addPoshVcpkgToPowershellProfile.ps1 b/scripts/addPoshVcpkgToPowershellProfile.ps1 index dcbd2e0be4d..1dd27aacff5 100644 --- a/scripts/addPoshVcpkgToPowershellProfile.ps1 +++ b/scripts/addPoshVcpkgToPowershellProfile.ps1 @@ -14,14 +14,13 @@ function findExistingImportModuleDirectives([Parameter(Mandatory=$true)][string] } $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -. "$scriptsDir\VcpkgPowershellUtils.ps1" $profileEntry = "Import-Module '$scriptsDir\posh-vcpkg'" $profilePath = $PROFILE # Implicit powershell variable -if (!(Test-Path $profilePath)) +$profileDir = Split-Path $profilePath -Parent +if (!(Test-Path $profileDir)) { - $profileDir = Split-Path $profilePath -Parent - vcpkgCreateDirectoryIfNotExists $profileDir + New-Item -ItemType Directory -Path $profileDir | Out-Null } Write-Host "`nAdding the following line to ${profilePath}:" @@ -38,6 +37,7 @@ if ($existingImports.Count -gt 0) return } +# Modifying the profile will invalidate any signatures. # Posh-git does the following check, so we should too. # https://github.com/dahlbyk/posh-git/blob/master/src/Utils.ps1 # If the profile script exists and is signed, then we should not modify it diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index c8ba503d844..ed82a6ab153 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -1,38 +1,61 @@ [CmdletBinding()] param( - [ValidateNotNullOrEmpty()][string]$disableMetrics = "0", - [Parameter(Mandatory=$False)][string]$withVSPath = "" + $badParam, + [Parameter(Mandatory=$False)][switch]$disableMetrics = $false, + [Parameter(Mandatory=$False)][switch]$win64 = $false, + [Parameter(Mandatory=$False)][string]$withVSPath = "", + [Parameter(Mandatory=$False)][string]$withWinSDK = "" ) Set-StrictMode -Version Latest -$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -. "$scriptsDir\VcpkgPowershellUtils.ps1" -$vcpkgRootDir = vcpkgFindFileRecursivelyUp $scriptsDir .vcpkg-root -Write-Verbose("vcpkg Path " + $vcpkgRootDir) - -$gitHash = "unknownhash" -$oldpath = $env:path -try +# Powershell2-compatible way of forcing named-parameters +if ($badParam) { - [xml]$asXml = Get-Content "$scriptsDir\vcpkgTools.xml" - $toolData = $asXml.SelectSingleNode("//tools/tool[@name=`"git`"]") - $gitFromDownload = "$vcpkgRootDir\downloads\$($toolData.exeRelativePath)" - $gitDir = split-path -parent $gitFromDownload - - $env:path += ";$gitDir" - if (Get-Command "git" -ErrorAction SilentlyContinue) + if ($disableMetrics -and $badParam -eq "1") { - $gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short - if ($LASTEXITCODE -ne 0) - { - $gitHash = "unknownhash" - } + Write-Warning "'disableMetrics 1' is deprecated, please change to 'disableMetrics' (without '1')" + } + else + { + throw "Only named parameters are allowed" } } -finally + +$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition +$withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash + +function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName) { - $env:path = $oldpath + if ($object -eq $null) + { + return $false + } + + return [bool]($object.psobject.Properties | Where-Object { $_.Name -eq "$propertyName"}) } -Write-Verbose("Git repo version string is " + $gitHash) + +function getProgramFiles32bit() +{ + $out = ${env:PROGRAMFILES(X86)} + if ($out -eq $null) + { + $out = ${env:PROGRAMFILES} + } + + if ($out -eq $null) + { + throw "Could not find [Program Files 32-bit]" + } + + return $out +} + +$vcpkgRootDir = $scriptsDir +while (!($vcpkgRootDir -eq "") -and !(Test-Path "$vcpkgRootDir\.vcpkg-root")) +{ + Write-Verbose "Examining $vcpkgRootDir for .vcpkg-root" + $vcpkgRootDir = Split-path $vcpkgRootDir -Parent +} +Write-Verbose "Examining $vcpkgRootDir for .vcpkg-root - Found" $vcpkgSourcesPath = "$vcpkgRootDir\toolsrc" @@ -42,22 +65,318 @@ if (!(Test-Path $vcpkgSourcesPath)) return } -$msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 $withVSPath +function getVisualStudioInstances() +{ + $programFiles = getProgramFiles32bit + $results = New-Object System.Collections.ArrayList + $vswhereExe = "$programFiles\Microsoft Visual Studio\Installer\vswhere.exe" + if (Test-Path $vswhereExe) + { + $output = & $vswhereExe -prerelease -legacy -products * -format xml + [xml]$asXml = $output + + foreach ($instance in $asXml.instances.instance) + { + $installationPath = $instance.InstallationPath -replace "\\$" # Remove potential trailing backslash + $installationVersion = $instance.InstallationVersion + + $isPrerelease = -7 + if (vcpkgHasProperty -object $instance -propertyName "isPrerelease") + { + $isPrerelease = $instance.isPrerelease + } + + if ($isPrerelease -eq 0) + { + $releaseType = "PreferenceWeight3::StableRelease" + } + elseif ($isPrerelease -eq 1) + { + $releaseType = "PreferenceWeight2::PreRelease" + } + else + { + $releaseType = "PreferenceWeight1::Legacy" + } + + # Placed like that for easy sorting according to preference + $results.Add("${releaseType}::${installationVersion}::${installationPath}") > $null + } + } + else + { + Write-Verbose "Could not locate vswhere at $vswhereExe" + } + + if ("$env:vs140comntools" -ne "") + { + $installationPath = Split-Path -Parent $(Split-Path -Parent "$env:vs140comntools") + $clExe = "$installationPath\VC\bin\cl.exe" + $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" + + if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) + { + $results.Add("PreferenceWeight1::Legacy::14.0::$installationPath") > $null + } + } + + $installationPath = "$programFiles\Microsoft Visual Studio 14.0" + $clExe = "$installationPath\VC\bin\cl.exe" + $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" + + if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) + { + $results.Add("PreferenceWeight1::Legacy::14.0::$installationPath") > $null + } + + $results.Sort() + $results.Reverse() + + return $results +} + +function findAnyMSBuildWithCppPlatformToolset([string]$withVSPath) +{ + $VisualStudioInstances = getVisualStudioInstances + if ($VisualStudioInstances -eq $null) + { + throw "Could not find Visual Studio. VS2015 or VS2017 (with C++) needs to be installed." + } + + Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstances))" + foreach ($instanceCandidate in $VisualStudioInstances) + { + Write-Verbose "Inspecting: $instanceCandidate" + $split = $instanceCandidate -split "::" + # $preferenceWeight = $split[0] + # $releaseType = $split[1] + $version = $split[2] + $path = $split[3] + + if ($withVSPath -ne "" -and $withVSPath -ne $path) + { + Write-Verbose "Skipping: $instanceCandidate" + continue + } + + $majorVersion = $version.Substring(0,2); + if ($majorVersion -eq "15") + { + $VCFolder= "$path\VC\Tools\MSVC\" + if (Test-Path $VCFolder) + { + Write-Verbose "Picking: $instanceCandidate" + return "$path\MSBuild\15.0\Bin\MSBuild.exe", "v141" + } + } + + if ($majorVersion -eq "14") + { + $clExe= "$path\VC\bin\cl.exe" + if (Test-Path $clExe) + { + Write-Verbose "Picking: $instanceCandidate" + $programFilesPath = getProgramFiles32bit + return "$programFilesPath\MSBuild\14.0\Bin\MSBuild.exe", "v140" + } + } + } + + throw "Could not find MSBuild version with C++ support. VS2015 or VS2017 (with C++) needs to be installed." +} +function getWindowsSDK( [Parameter(Mandatory=$False)][switch]$DisableWin10SDK = $False, + [Parameter(Mandatory=$False)][switch]$DisableWin81SDK = $False, + [Parameter(Mandatory=$False)][string]$withWinSDK) +{ + if ($DisableWin10SDK -and $DisableWin81SDK) + { + throw "Both Win10SDK and Win81SDK were disabled." + } + + Write-Verbose "Finding WinSDK" + + $validInstances = New-Object System.Collections.ArrayList + + # Windows 10 SDK + function CheckWindows10SDK($path) + { + if ($path -eq $null) + { + return + } + + $folder = (Join-Path $path "Include") + if (!(Test-Path $folder)) + { + Write-Verbose "$folder - Not Found" + return + } + + Write-Verbose "$folder - Found" + $win10sdkVersions = @(Get-ChildItem $folder | Where-Object {$_.Name -match "^10"} | Sort-Object) + [array]::Reverse($win10sdkVersions) # Newest SDK first + + foreach ($win10sdkV in $win10sdkVersions) + { + $windowsheader = "$folder\$win10sdkV\um\windows.h" + if (!(Test-Path $windowsheader)) + { + Write-Verbose "$windowsheader - Not Found" + continue + } + Write-Verbose "$windowsheader - Found" + + $ddkheader = "$folder\$win10sdkV\shared\sdkddkver.h" + if (!(Test-Path $ddkheader)) + { + Write-Verbose "$ddkheader - Not Found" + continue + } + + Write-Verbose "$ddkheader - Found" + $win10sdkVersionString = $win10sdkV.ToString() + Write-Verbose "Found $win10sdkVersionString" + $validInstances.Add($win10sdkVersionString) > $null + } + } + + Write-Verbose "`n" + Write-Verbose "Looking for Windows 10 SDK" + $regkey10 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue + $regkey10Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue + if (vcpkgHasProperty -object $regkey10 "KitsRoot10") { CheckWindows10SDK($regkey10.KitsRoot10) } + if (vcpkgHasProperty -object $regkey10Wow6432 "KitsRoot10") { CheckWindows10SDK($regkey10Wow6432.KitsRoot10) } + CheckWindows10SDK("$env:ProgramFiles\Windows Kits\10") + CheckWindows10SDK("${env:ProgramFiles(x86)}\Windows Kits\10") + + # Windows 8.1 SDK + function CheckWindows81SDK($path) + { + if ($path -eq $null) + { + return + } + + $folder = "$path\Include" + if (!(Test-Path $folder)) + { + Write-Verbose "$folder - Not Found" + return + } + + Write-Verbose "$folder - Found" + $win81sdkVersionString = "8.1" + Write-Verbose "Found $win81sdkVersionString" + $validInstances.Add($win81sdkVersionString) > $null + } + + Write-Verbose "`n" + Write-Verbose "Looking for Windows 8.1 SDK" + $regkey81 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue + $regkey81Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue + if (vcpkgHasProperty -object $regkey81 "KitsRoot81") { CheckWindows81SDK($regkey81.KitsRoot81) } + if (vcpkgHasProperty -object $regkey81Wow6432 "KitsRoot81") { CheckWindows81SDK($regkey81Wow6432.KitsRoot81) } + CheckWindows81SDK("$env:ProgramFiles\Windows Kits\8.1") + CheckWindows81SDK("${env:ProgramFiles(x86)}\Windows Kits\8.1") + + Write-Verbose "`n`n`n" + Write-Verbose "The following Windows SDKs were found:" + foreach ($instance in $validInstances) + { + Write-Verbose $instance + } + + # Selecting + if ($withWinSDK -ne "") + { + foreach ($instance in $validInstances) + { + if ($instance -eq $withWinSDK) + { + return $instance + } + } + + throw "Could not find the requested Windows SDK version: $withWinSDK" + } + + foreach ($instance in $validInstances) + { + if (!$DisableWin10SDK -and $instance -match "10.") + { + return $instance + } + + if (!$DisableWin81SDK -and $instance -match "8.1") + { + return $instance + } + } + + throw "Could not detect a Windows SDK / TargetPlatformVersion" +} + +$msbuildExeWithPlatformToolset = findAnyMSBuildWithCppPlatformToolset $withVSPath $msbuildExe = $msbuildExeWithPlatformToolset[0] $platformToolset = $msbuildExeWithPlatformToolset[1] -$windowsSDK = & $scriptsDir\getWindowsSDK.ps1 +$windowsSDK = getWindowsSDK -withWinSDK $withWinSDK + +$disableMetricsValue = "0" +if ($disableMetrics) +{ + $disableMetricsValue = "1" +} + +$platform = "x86" +$vcpkgReleaseDir = "$vcpkgSourcesPath\msbuild.x86.release" + +if ($win64) +{ + $architecture=(Get-WmiObject win32_operatingsystem | Select-Object osarchitecture).osarchitecture + if (-not $architecture -like "*64*") + { + throw "Cannot build 64-bit on non-64-bit system" + } + + $platform = "x64" + $vcpkgReleaseDir = "$vcpkgSourcesPath\msbuild.x64.release" +} $arguments = ( -"`"/p:VCPKG_VERSION=-$gitHash`"", -"`"/p:DISABLE_METRICS=$disableMetrics`"", +"`"/p:VCPKG_VERSION=-nohash`"", +"`"/p:DISABLE_METRICS=$disableMetricsValue`"", "/p:Configuration=Release", -"/p:Platform=x86", +"/p:Platform=$platform", "/p:PlatformToolset=$platformToolset", "/p:TargetPlatformVersion=$windowsSDK", +"/p:PreferredToolArchitecture=x64", +"/verbosity:minimal", "/m", +"/nologo", "`"$vcpkgSourcesPath\dirs.proj`"") -join " " +function vcpkgInvokeCommandClean() +{ + param ( [Parameter(Mandatory=$true)][string]$executable, + [string]$arguments = "") + + Write-Verbose "Clean-Executing: ${executable} ${arguments}" + $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition + $cleanEnvScript = "$scriptsDir\cleanEnvironmentHelper.ps1" + $tripleQuotes = "`"`"`"" + $argumentsWithEscapedQuotes = $arguments -replace "`"", $tripleQuotes + $command = ". $tripleQuotes$cleanEnvScript$tripleQuotes; & $tripleQuotes$executable$tripleQuotes $argumentsWithEscapedQuotes" + $arg = "-NoProfile", "-ExecutionPolicy Bypass", "-command $command" + + $process = Start-Process -FilePath powershell.exe -ArgumentList $arg -PassThru -NoNewWindow + Wait-Process -InputObject $process + $ec = $process.ExitCode + Write-Verbose "Execution terminated with exit code $ec." + return $ec +} + # vcpkgInvokeCommandClean cmd "/c echo %PATH%" +Write-Host "`nBuilding vcpkg.exe ...`n" $ec = vcpkgInvokeCommandClean $msbuildExe $arguments if ($ec -ne 0) @@ -65,8 +384,10 @@ if ($ec -ne 0) Write-Error "Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++." return } +Write-Host "`nBuilding vcpkg.exe... done.`n" Write-Verbose("Placing vcpkg.exe in the correct location") -Copy-Item $vcpkgSourcesPath\Release\vcpkg.exe $vcpkgRootDir\vcpkg.exe | Out-Null -Copy-Item $vcpkgSourcesPath\Release\vcpkgmetricsuploader.exe $vcpkgRootDir\scripts\vcpkgmetricsuploader.exe | Out-Null +Copy-Item "$vcpkgReleaseDir\vcpkg.exe" "$vcpkgRootDir\vcpkg.exe" +Copy-Item "$vcpkgReleaseDir\vcpkgmetricsuploader.exe" "$vcpkgRootDir\scripts\vcpkgmetricsuploader.exe" +Remove-Item "$vcpkgReleaseDir" -Force -Recurse -ErrorAction SilentlyContinue diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 95ee75af15f..47818337275 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -1,5 +1,16 @@ #!/bin/sh +vcpkgDisableMetrics="OFF" +for var in "$@" +do + if [ "$var" = "-disableMetrics" ]; then + vcpkgDisableMetrics="ON" + else + echo "Unknown argument $var" + exit 1 + fi +done + # Find vcpkg-root vcpkgRootDir=$(X= cd -- "$(dirname -- "$0")" && pwd -P) while [ "$vcpkgRootDir" != "/" ] && ! [ -e "$vcpkgRootDir/.vcpkg-root" ]; do @@ -97,7 +108,7 @@ fetchTool() return 1 fi - xmlFileAsString=`cat $vcpkgRootDir/scripts/vcpkgTools.xml` + xmlFileAsString=`cat "$vcpkgRootDir/scripts/vcpkgTools.xml"` toolRegexStart="" toolData="$(extractStringBetweenDelimiters "$xmlFileAsString" "$toolRegexStart" "")" if [ "$toolData" = "" ]; then @@ -157,7 +168,9 @@ selectCXX() if [ "x$CXX" = "x" ]; then CXX=g++ - if which g++-7 >/dev/null 2>&1; then + if which g++-8 >/dev/null 2>&1; then + CXX=g++-8 + elif which g++-7 >/dev/null 2>&1; then CXX=g++-7 elif which g++-6 >/dev/null 2>&1; then CXX=g++-6 @@ -166,7 +179,7 @@ selectCXX() gccversion="$("$CXX" -v 2>&1)" gccversion="$(extractStringBetweenDelimiters "$gccversion" "gcc version " ".")" - if [ "$gccversion" = "5" ]; then + if [ "$gccversion" -lt "6" ]; then echo "CXX ($CXX) is too old; please install a newer compiler such as g++-7." echo "sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y" echo "sudo apt-get update -y" @@ -188,7 +201,7 @@ buildDir="$vcpkgRootDir/toolsrc/build.rel" rm -rf "$buildDir" mkdir -p "$buildDir" -(cd "$buildDir" && CXX=$CXX "$cmakeExe" .. -DCMAKE_BUILD_TYPE=Release -G "Ninja" "-DCMAKE_MAKE_PROGRAM=$ninjaExe") +(cd "$buildDir" && CXX=$CXX "$cmakeExe" .. -DCMAKE_BUILD_TYPE=Release -G "Ninja" "-DCMAKE_MAKE_PROGRAM=$ninjaExe" "-DDEFINE_DISABLE_METRICS=$vcpkgDisableMetrics") (cd "$buildDir" && "$cmakeExe" --build .) rm -rf "$vcpkgRootDir/vcpkg" diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1 index e5f3c3dd0a6..42bad4bcda2 100644 --- a/scripts/buildsystems/msbuild/applocal.ps1 +++ b/scripts/buildsystems/msbuild/applocal.ps1 @@ -62,7 +62,7 @@ function resolve([string]$targetBinary) { $g_searched.Set_Item($_, $true) if (Test-Path "$installedDir\$_") { deployBinary $baseTargetBinaryDir $installedDir "$_" - if (Test-Path function:\deployPluginsIfQt) { deployPluginsIfQt $targetBinaryDir "$g_install_root\plugins" "$_" } + if (Test-Path function:\deployPluginsIfQt) { deployPluginsIfQt $baseTargetBinaryDir "$g_install_root\plugins" "$_" } if (Test-Path function:\deployOpenNI2) { deployOpenNI2 $targetBinaryDir "$g_install_root" "$_" } if (Test-Path function:\deployPluginsIfMagnum) { if ($g_is_debug) { diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index 499052e4d70..8807befd824 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -47,13 +47,17 @@ true arm64-uwp - + $(Configuration) Debug Release $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), .vcpkg-root))\installed\$(VcpkgTriplet)\ + true + + false @@ -77,7 +81,7 @@ - + diff --git a/scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 b/scripts/cleanEnvironmentHelper.ps1 similarity index 98% rename from scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 rename to scripts/cleanEnvironmentHelper.ps1 index 0a133f5f8ac..a3792ecd342 100644 --- a/scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 +++ b/scripts/cleanEnvironmentHelper.ps1 @@ -17,7 +17,7 @@ foreach ($name in $nameSet) } # PATH needs to be concatenated as it has values in both machine and user environment. Any other values should be set. - if ($name -match 'path') + if ($name -eq 'path') { $pathValuePartial = @() # Machine values before user values diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index eec08e3f1e9..ed4f7ac294e 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -39,6 +39,10 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) set(TOOLPATH ${DOWNLOADS}/tools/msys2) cmake_parse_arguments(_am "" "" "PACKAGES" ${ARGN}) + if(NOT CMAKE_HOST_WIN32) + message(FATAL_ERROR "vcpkg_acquire_msys() can only be used on Windows hosts") + endif() + # detect host architecture if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) set(_vam_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITEW6432}) diff --git a/scripts/cmake/vcpkg_add_to_path.cmake b/scripts/cmake/vcpkg_add_to_path.cmake new file mode 100644 index 00000000000..6890dfe31e3 --- /dev/null +++ b/scripts/cmake/vcpkg_add_to_path.cmake @@ -0,0 +1,41 @@ +## # vcpkg_add_to_path +## +## Add a directory to the PATH environment variable +## +## ## Usage +## ```cmake +## vcpkg_add_to_path([PREPEND] <${PYTHON3_DIR}>) +## ``` +## +## ## Parameters +## ### +## The directory to add +## +## ### PREPEND +## Prepends the directory. +## +## The default is to append. +function(vcpkg_add_to_path) + if(NOT "${ARGC}" STREQUAL "1" AND NOT "${ARGC}" STREQUAL "2") + message(FATAL_ERROR "vcpkg_add_to_path() only accepts 1 or 2 arguments.") + endif() + if("${ARGV0}" STREQUAL "PREPEND") + if(NOT "${ARGC}" STREQUAL "2") + message(FATAL_ERROR "Expected second argument.") + endif() + if(CMAKE_HOST_WIN32) + set(ENV{PATH} "${ARGV1};$ENV{PATH}") + else() + set(ENV{PATH} "${ARGV1}:$ENV{PATH}") + endif() + else() + if(NOT "${ARGC}" STREQUAL "1") + message(FATAL_ERROR "Unexpected second argument: ${ARGV1}") + endif() + if(CMAKE_HOST_WIN32) + set(ENV{PATH} "$ENV{PATH};${ARGV0}") + else() + set(ENV{PATH} "$ENV{PATH}:${ARGV0}") + endif() + endif() +endfunction() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_apply_patches.cmake b/scripts/cmake/vcpkg_apply_patches.cmake index 1894d6e9ac4..ac0b78e20c2 100644 --- a/scripts/cmake/vcpkg_apply_patches.cmake +++ b/scripts/cmake/vcpkg_apply_patches.cmake @@ -37,10 +37,11 @@ function(vcpkg_apply_patches) find_program(GIT NAMES git git.cmd) set(PATCHNUM 0) foreach(PATCH ${_ap_PATCHES}) + get_filename_component(ABSOLUTE_PATCH "${PATCH}" ABSOLUTE BASE_DIR "${CURRENT_PORT_DIR}") message(STATUS "Applying patch ${PATCH}") set(LOGNAME patch-${TARGET_TRIPLET}-${PATCHNUM}) execute_process( - COMMAND ${GIT} --work-tree=. --git-dir=.git apply "${PATCH}" --ignore-whitespace --whitespace=nowarn --verbose + COMMAND ${GIT} --work-tree=. --git-dir=.git apply "${ABSOLUTE_PATCH}" --ignore-whitespace --whitespace=nowarn --verbose OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-out.log ERROR_FILE ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-err.log WORKING_DIRECTORY ${_ap_SOURCE_PATH} @@ -51,7 +52,6 @@ function(vcpkg_apply_patches) message(STATUS "Applying patch failed. This is expected if this patch was previously applied.") endif() - message(STATUS "Applying patch ${PATCH} done") math(EXPR PATCHNUM "${PATCHNUM}+1") endforeach() endfunction() diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index 983ac922146..2f0da07f96a 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -74,16 +74,21 @@ function(vcpkg_build_cmake) set(CONFIG "Release") endif() - message(STATUS "Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE}") + message(STATUS "Building ${TARGET_TRIPLET}-${SHORT_BUILDTYPE}") set(LOGPREFIX "${CURRENT_BUILDTREES_DIR}/${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-${SHORT_BUILDTYPE}") set(LOGS) if(_bc_ADD_BIN_TO_PATH) set(_BACKUP_ENV_PATH "$ENV{PATH}") - if(BUILDTYPE STREQUAL "debug") - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/bin;$ENV{PATH}") + if(CMAKE_HOST_WIN32) + set(_PATHSEP ";") else() - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin;$ENV{PATH}") + set(_PATHSEP ":") + endif() + if(BUILDTYPE STREQUAL "debug") + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/bin${_PATHSEP}$ENV{PATH}") + else() + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin${_PATHSEP}$ENV{PATH}") endif() endif() execute_process( @@ -174,7 +179,6 @@ function(vcpkg_build_cmake) ${STRINGIFIED_LOGS}) endif() endif() - message(STATUS "Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE} done") if(_bc_ADD_BIN_TO_PATH) set(ENV{PATH} "${_BACKUP_ENV_PATH}") endif() diff --git a/scripts/cmake/vcpkg_build_msbuild.cmake b/scripts/cmake/vcpkg_build_msbuild.cmake index db04530efdd..7a65127f044 100644 --- a/scripts/cmake/vcpkg_build_msbuild.cmake +++ b/scripts/cmake/vcpkg_build_msbuild.cmake @@ -1,6 +1,6 @@ ## # vcpkg_build_msbuild ## -## Build an msbuild-based project. +## Build an msbuild-based project. Deprecated in favor of `vcpkg_install_msbuild()`. ## ## ## Usage ## ```cmake @@ -15,6 +15,7 @@ ## [OPTIONS ...] ## [OPTIONS_RELEASE ...] ## [OPTIONS_DEBUG ...] +## [USE_VCPKG_INTEGRATION] ## ) ## ``` ## @@ -105,7 +106,11 @@ function(vcpkg_build_msbuild) endif() if(_csc_USE_VCPKG_INTEGRATION) - list(APPEND _csc_OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets) + list( + APPEND _csc_OPTIONS + /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets + "/p:VcpkgTriplet=${TARGET_TRIPLET}" + ) endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") diff --git a/scripts/cmake/vcpkg_build_qmake.cmake b/scripts/cmake/vcpkg_build_qmake.cmake index 194ab8206b5..189a1113b12 100644 --- a/scripts/cmake/vcpkg_build_qmake.cmake +++ b/scripts/cmake/vcpkg_build_qmake.cmake @@ -33,7 +33,6 @@ function(vcpkg_build_qmake) WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${LOG_SUFFIX} LOGNAME package-${LOG_PREFIX}-${TARGET_TRIPLET}-${LOG_SUFFIX} ) - message(STATUS "Package ${LOG_PREFIX}-${TARGET_TRIPLET}-${LOG_SUFFIX} done") endfunction() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings @@ -53,6 +52,11 @@ function(vcpkg_build_qmake) string(REPLACE "zlib.lib" "zlibd.lib" _contents "${_contents}") string(REPLACE "installed\\${TARGET_TRIPLET}\\lib" "installed\\${TARGET_TRIPLET}\\debug\\lib" _contents "${_contents}") string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib qtmaind.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib\\manual-link qtmaind.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib" _contents "${_contents}") + string(REPLACE "tools\\qt5\\qmlcachegen.exe" "tools\\qt5-declarative\\qmlcachegen.exe" _contents "${_contents}") + string(REPLACE "tools/qt5/qmlcachegen" "tools/qt5-declarative/qmlcachegen" _contents "${_contents}") + string(REPLACE "debug\\lib\\Qt5Bootstrap.lib" "tools\\qt5\\Qt5Bootstrap.lib" _contents "${_contents}") + string(REPLACE "lib\\Qt5Bootstrap.lib" "tools\\qt5\\Qt5Bootstrap.lib" _contents "${_contents}") + string(REPLACE " Qt5Bootstrap.lib " " ${NATIVE_INSTALLED_DIR}\\tools\\qt5\\Qt5Bootstrap.lib Ole32.lib Netapi32.lib Advapi32.lib ${NATIVE_INSTALLED_DIR}\\lib\\zlib.lib Shell32.lib " _contents "${_contents}") file(WRITE "${DEBUG_MAKEFILE}" "${_contents}") endforeach() endif() @@ -69,6 +73,11 @@ function(vcpkg_build_qmake) foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) file(READ "${RELEASE_MAKEFILE}" _contents) string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\lib qtmain.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib\\manual-link qtmain.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib" _contents "${_contents}") + string(REPLACE "tools\\qt5\\qmlcachegen.exe" "tools\\qt5-declarative\\qmlcachegen.exe" _contents "${_contents}") + string(REPLACE "tools/qt5/qmlcachegen" "tools/qt5-declarative/qmlcachegen" _contents "${_contents}") + string(REPLACE "debug\\lib\\Qt5Bootstrap.lib" "tools\\qt5\\Qt5Bootstrap.lib" _contents "${_contents}") + string(REPLACE "lib\\Qt5Bootstrap.lib" "tools\\qt5\\Qt5Bootstrap.lib" _contents "${_contents}") + string(REPLACE " Qt5Bootstrap.lib " " ${NATIVE_INSTALLED_DIR}\\tools\\qt5\\Qt5Bootstrap.lib Ole32.lib Netapi32.lib Advapi32.lib ${NATIVE_INSTALLED_DIR}\\lib\\zlib.lib Shell32.lib " _contents "${_contents}") file(WRITE "${RELEASE_MAKEFILE}" "${_contents}") endforeach() endif() diff --git a/scripts/cmake/vcpkg_check_linkage.cmake b/scripts/cmake/vcpkg_check_linkage.cmake new file mode 100644 index 00000000000..101adc4fd58 --- /dev/null +++ b/scripts/cmake/vcpkg_check_linkage.cmake @@ -0,0 +1,53 @@ +## # vcpkg_check_linkage +## +## Asserts the available library and CRT linkage options for the port. +## +## ## Usage +## ```cmake +## vcpkg_check_linkage( +## [ONLY_STATIC_LIBRARY | ONLY_DYNAMIC_LIBRARY] +## [ONLY_STATIC_CRT | ONLY_DYNAMIC_CRT] +## ) +## ``` +## +## ## Parameters +## ### ONLY_STATIC_LIBRARY +## Indicates that this port can only be built with static library linkage. +## +## ### ONLY_DYNAMIC_LIBRARY +## Indicates that this port can only be built with dynamic/shared library linkage. +## +## ### ONLY_STATIC_CRT +## Indicates that this port can only be built with static CRT linkage. +## +## ### ONLY_DYNAMIC_CRT +## Indicates that this port can only be built with dynamic/shared CRT linkage. +## +## ## Notes +## This command will either alter the settings for `VCPKG_LIBRARY_LINKAGE` or fail, depending on what was requested by the user versus what the library supports. +## +## ## Examples +## +## * [libimobiledevice](https://github.com/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake) +function(vcpkg_check_linkage) + cmake_parse_arguments(_csc "ONLY_STATIC_LIBRARY;ONLY_DYNAMIC_LIBRARY;ONLY_DYNAMIC_CRT;ONLY_STATIC_CRT" "" "" ${ARGN}) + + if(_csc_ONLY_STATIC_LIBRARY AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(STATUS "Note: ${PORT} only supports static library linkage. Building static library.") + set(VCPKG_LIBRARY_LINKAGE static PARENT_SCOPE) + endif() + if(_csc_ONLY_DYNAMIC_LIBRARY AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(STATUS "Note: ${PORT} only supports dynamic library linkage. Building dynamic library.") + if(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "Refusing to build unexpected dynamic library against the static CRT. If this is desired, please configure your triplet to directly request this configuration.") + endif() + set(VCPKG_LIBRARY_LINKAGE dynamic PARENT_SCOPE) + endif() + + if(_csc_ONLY_DYNAMIC_CRT AND VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "${PORT} only supports dynamic crt linkage") + endif() + if(_csc_ONLY_STATIC_CRT AND VCPKG_CRT_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "${PORT} only supports static crt linkage") + endif() +endfunction() diff --git a/scripts/cmake/vcpkg_clean_msbuild.cmake b/scripts/cmake/vcpkg_clean_msbuild.cmake new file mode 100644 index 00000000000..b0d77dfd2b6 --- /dev/null +++ b/scripts/cmake/vcpkg_clean_msbuild.cmake @@ -0,0 +1,19 @@ +## # vcpkg_clean_msbuild +## +## Clean intermediate files generated by `vcpkg_install_msbuild()`. +## +## ## Usage +## ```cmake +## vcpkg_clean_msbuild() +## ``` +## +## ## Examples +## +## * [xalan-c](https://github.com/Microsoft/vcpkg/blob/master/ports/xalan-c/portfile.cmake) + +function(vcpkg_clean_msbuild) + file(REMOVE_RECURSE + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + ) +endfunction() diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index 27dd0732dc6..d66fc5effd7 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -1,17 +1,23 @@ include(vcpkg_acquire_msys) +include(vcpkg_add_to_path) +include(vcpkg_check_linkage) +include(vcpkg_clean_msbuild) include(vcpkg_download_distfile) include(vcpkg_extract_source_archive) +include(vcpkg_extract_source_archive_ex) include(vcpkg_execute_required_process) include(vcpkg_execute_required_process_repeat) include(vcpkg_find_acquire_program) include(vcpkg_fixup_cmake_targets) include(vcpkg_from_github) +include(vcpkg_from_gitlab) include(vcpkg_from_bitbucket) include(vcpkg_build_cmake) include(vcpkg_build_msbuild) include(vcpkg_build_qmake) include(vcpkg_install_cmake) include(vcpkg_install_meson) +include(vcpkg_install_msbuild) include(vcpkg_configure_cmake) include(vcpkg_configure_meson) include(vcpkg_configure_qmake) @@ -21,4 +27,6 @@ include(vcpkg_copy_tool_dependencies) include(vcpkg_get_program_files_32_bit) include(vcpkg_get_program_files_platform_bitness) include(vcpkg_get_windows_sdk) -include(vcpkg_replace_string) \ No newline at end of file +include(vcpkg_replace_string) +include(vcpkg_from_git) +include(vcpkg_test_cmake) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 3e092242817..617fe1a0ffb 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -62,6 +62,12 @@ function(vcpkg_configure_cmake) set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITECTURE}) endif() + if(CMAKE_HOST_WIN32) + set(_PATHSEP ";") + else() + set(_PATHSEP ":") + endif() + set(NINJA_CAN_BE_USED ON) # Ninja as generator set(NINJA_HOST ON) # Ninja as parallel configurator if(_csc_HOST_ARCHITECTURE STREQUAL "x86") @@ -114,7 +120,7 @@ function(vcpkg_configure_cmake) if(GENERATOR STREQUAL "Ninja") vcpkg_find_acquire_program(NINJA) get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) - set(ENV{PATH} "$ENV{PATH};${NINJA_PATH}") + set(ENV{PATH} "$ENV{PATH}${_PATHSEP}${NINJA_PATH}") list(APPEND _csc_OPTIONS "-DCMAKE_MAKE_PROGRAM=${NINJA}") endif() @@ -122,6 +128,9 @@ function(vcpkg_configure_cmake) if(DEFINED VCPKG_CMAKE_SYSTEM_NAME) list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}") + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT DEFINED VCPKG_CMAKE_SYSTEM_VERSION) + set(VCPKG_CMAKE_SYSTEM_VERSION 10.0) + endif() endif() if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION) list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}") @@ -192,6 +201,17 @@ function(vcpkg_configure_cmake) ) endif() + # Sets configuration variables for macOS builds + if(DEFINED VCPKG_INSTALL_NAME_DIR) + list(APPEND _csc_OPTIONS "-DCMAKE_INSTALL_NAME_DIR=${VCPKG_INSTALL_NAME_DIR}") + endif() + if(DEFINED VCPKG_OSX_DEPLOYMENT_TARGET) + list(APPEND _csc_OPTIONS "-DCMAKE_OSX_DEPLOYMENT_TARGET=${VCPKG_OSX_DEPLOYMENT_TARGET}") + endif() + if(DEFINED VCPKG_OSX_SYSROOT) + list(APPEND _csc_OPTIONS "-DCMAKE_OSX_SYSROOT=${VCPKG_OSX_SYSROOT}") + endif() + set(rel_command ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} "${_csc_OPTIONS}" "${_csc_OPTIONS_RELEASE}" -G ${GENERATOR} @@ -207,7 +227,7 @@ function(vcpkg_configure_cmake) vcpkg_find_acquire_program(NINJA) get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) - set(ENV{PATH} "$ENV{PATH};${NINJA_PATH}") + set(ENV{PATH} "$ENV{PATH}${_PATHSEP}${NINJA_PATH}") #parallelize the configure step set(_contents @@ -239,7 +259,6 @@ function(vcpkg_configure_cmake) WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure LOGNAME config-${TARGET_TRIPLET} ) - message(STATUS "Configuring ${TARGET_TRIPLET} done") else() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") @@ -249,7 +268,6 @@ function(vcpkg_configure_cmake) WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME config-${TARGET_TRIPLET}-dbg ) - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") @@ -260,7 +278,6 @@ function(vcpkg_configure_cmake) WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME config-${TARGET_TRIPLET}-rel ) - message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") endif() endif() diff --git a/scripts/cmake/vcpkg_configure_meson.cmake b/scripts/cmake/vcpkg_configure_meson.cmake index 9b87261d5b4..3c6903c9dba 100644 --- a/scripts/cmake/vcpkg_configure_meson.cmake +++ b/scripts/cmake/vcpkg_configure_meson.cmake @@ -39,7 +39,12 @@ function(vcpkg_configure_meson) vcpkg_find_acquire_program(MESON) vcpkg_find_acquire_program(NINJA) get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) - set(ENV{PATH} "$ENV{PATH};${NINJA_PATH}") + if(CMAKE_HOST_WIN32) + set(_PATHSEP ";") + else() + set(_PATHSEP ":") + endif() + set(ENV{PATH} "$ENV{PATH}${_PATHSEP}${NINJA_PATH}") # configure release if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") diff --git a/scripts/cmake/vcpkg_copy_pdbs.cmake b/scripts/cmake/vcpkg_copy_pdbs.cmake index ca55eb01548..4e9f642b5b4 100644 --- a/scripts/cmake/vcpkg_copy_pdbs.cmake +++ b/scripts/cmake/vcpkg_copy_pdbs.cmake @@ -4,17 +4,32 @@ ## ## ## Usage ## ```cmake -## vcpkg_copy_pdbs() +## vcpkg_copy_pdbs([BUILD_PATHS <${CURRENT_PACKAGES_DIR}/bin/*.dll> ...]) ## ``` ## ## ## Notes ## This command should always be called by portfiles after they have finished rearranging the binary output. ## +## ## Parameters +## ### BUILD_PATHS +## Path patterns passed to `file(GLOB_RECURSE)` for locating dlls. +## +## Defaults to `${CURRENT_PACKAGES_DIR}/bin/*.dll` and `${CURRENT_PACKAGES_DIR}/debug/bin/*.dll`. +## ## ## Examples ## ## * [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) ## * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) function(vcpkg_copy_pdbs) + cmake_parse_arguments(_vcp "" "" "BUILD_PATHS" ${ARGN}) + + if(NOT _vcp_BUILD_PATHS) + set( + _vcp_BUILD_PATHS + ${CURRENT_PACKAGES_DIR}/bin/*.dll + ${CURRENT_PACKAGES_DIR}/debug/bin/*.dll + ) + endif() function(merge_filelist OUTVAR INVAR) set(MSG "") @@ -25,7 +40,7 @@ function(vcpkg_copy_pdbs) endfunction() if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(GLOB_RECURSE DLLS ${CURRENT_PACKAGES_DIR}/bin/*.dll ${CURRENT_PACKAGES_DIR}/debug/bin/*.dll) + file(GLOB_RECURSE DLLS ${_vcp_BUILD_PATHS}) set(DLLS_WITHOUT_MATCHING_PDBS) diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 9fc0a0c9ab2..949036c884f 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -68,7 +68,12 @@ function(vcpkg_download_distfile VAR) set(downloaded_file_path ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME}) set(download_file_path_part "${DOWNLOADS}/temp/${vcpkg_download_distfile_FILENAME}") - file(REMOVE_RECURSE "${DOWNLOADS}/temp") + # Works around issue #3399 + if(IS_DIRECTORY "${DOWNLOADS}/temp") + file(REMOVE_RECURSE "${DOWNLOADS}/temp0") + file(RENAME "${DOWNLOADS}/temp" "${DOWNLOADS}/temp0") + file(REMOVE_RECURSE "${DOWNLOADS}/temp0") + endif() file(MAKE_DIRECTORY "${DOWNLOADS}/temp") function(test_hash FILE_PATH FILE_KIND CUSTOM_ERROR_ADVICE) @@ -81,9 +86,8 @@ function(vcpkg_download_distfile VAR) return() endif() - message(STATUS "Testing integrity of ${FILE_KIND}...") file(SHA512 ${FILE_PATH} FILE_HASH) - if(NOT "${FILE_HASH}" STREQUAL "${vcpkg_download_distfile_SHA512}") + if(NOT FILE_HASH STREQUAL vcpkg_download_distfile_SHA512) message(FATAL_ERROR "\nFile does not have expected hash:\n" " File path: [ ${FILE_PATH} ]\n" @@ -91,10 +95,9 @@ function(vcpkg_download_distfile VAR) " Actual hash: [ ${FILE_HASH} ]\n" "${CUSTOM_ERROR_ADVICE}\n") endif() - message(STATUS "Testing integrity of ${FILE_KIND}... OK") endfunction() - if(EXISTS ${downloaded_file_path}) + if(EXISTS "${downloaded_file_path}") message(STATUS "Using cached ${downloaded_file_path}") test_hash("${downloaded_file_path}" "cached file" "Please delete the file and retry if this file should be downloaded again.") else() @@ -104,7 +107,7 @@ function(vcpkg_download_distfile VAR) # Tries to download the file. list(GET vcpkg_download_distfile_URLS 0 SAMPLE_URL) - if(${_VCPKG_DOWNLOAD_TOOL} MATCHES "ARIA2" AND NOT ${SAMPLE_URL} MATCHES "aria2") + if(_VCPKG_DOWNLOAD_TOOL STREQUAL "ARIA2" AND NOT SAMPLE_URL MATCHES "aria2") vcpkg_find_acquire_program("ARIA2") message(STATUS "Downloading ${vcpkg_download_distfile_FILENAME}...") execute_process( @@ -127,7 +130,6 @@ function(vcpkg_download_distfile VAR) ) set(download_success 0) else() - message(STATUS "Downloading ${vcpkg_download_distfile_FILENAME}... OK") file(REMOVE ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-out.log ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-err.log @@ -144,7 +146,6 @@ function(vcpkg_download_distfile VAR) message(STATUS "Downloading ${url}... Failed. Status: ${download_status}") set(download_success 0) else() - message(STATUS "Downloading ${url}... OK") set(download_success 1) break() endif() diff --git a/scripts/cmake/vcpkg_extract_source_archive.cmake b/scripts/cmake/vcpkg_extract_source_archive.cmake index 5c16616c628..a55419b19cd 100644 --- a/scripts/cmake/vcpkg_extract_source_archive.cmake +++ b/scripts/cmake/vcpkg_extract_source_archive.cmake @@ -1,6 +1,6 @@ ## # vcpkg_extract_source_archive ## -## Extract an archive into the source directory. +## Extract an archive into the source directory. Deprecated in favor of [`vcpkg_extract_source_archive_ex`](vcpkg_extract_source_archive_ex.md). ## ## ## Usage ## ```cmake @@ -29,40 +29,22 @@ ## * [msgpack](https://github.com/Microsoft/vcpkg/blob/master/ports/msgpack/portfile.cmake) include(vcpkg_execute_required_process) -function(vcpkg_extract_source_archive_ex) - cmake_parse_arguments(_vesae "" "ARCHIVE;WORKING_DIRECTORY" "" ${ARGN}) - - if(NOT _vesae_ARCHIVE) - message(FATAL_ERROR "Must specify ARCHIVE parameter to vcpkg_extract_source_archive_ex()") - endif() - - if(DEFINED _vesae_WORKING_DIRECTORY) - set(WORKING_DIRECTORY ${_vesae_WORKING_DIRECTORY}) +function(vcpkg_extract_source_archive ARCHIVE) + if(NOT ARGC EQUAL 2) + set(WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src") else() - set(WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src) + set(WORKING_DIRECTORY ${ARGV1}) endif() - get_filename_component(ARCHIVE_FILENAME ${_vesae_ARCHIVE} NAME) + get_filename_component(ARCHIVE_FILENAME "${ARCHIVE}" NAME) if(NOT EXISTS ${WORKING_DIRECTORY}/${ARCHIVE_FILENAME}.extracted) - message(STATUS "Extracting source ${_vesae_ARCHIVE}") + message(STATUS "Extracting source ${ARCHIVE}") file(MAKE_DIRECTORY ${WORKING_DIRECTORY}) vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} -E tar xjf ${_vesae_ARCHIVE} + COMMAND ${CMAKE_COMMAND} -E tar xjf ${ARCHIVE} WORKING_DIRECTORY ${WORKING_DIRECTORY} LOGNAME extract ) file(WRITE ${WORKING_DIRECTORY}/${ARCHIVE_FILENAME}.extracted) endif() - message(STATUS "Extracting done") endfunction() - -function(vcpkg_extract_source_archive ARCHIVE) - if(NOT ARGC EQUAL 2) - vcpkg_extract_source_archive_ex(ARCHIVE ${ARCHIVE}) - else() - vcpkg_extract_source_archive_ex( - ARCHIVE ${ARCHIVE} - WORKING_DIRECTORY ${ARGV1} - ) - endif() -endfunction() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_extract_source_archive_ex.cmake b/scripts/cmake/vcpkg_extract_source_archive_ex.cmake new file mode 100644 index 00000000000..a70a5e4a34f --- /dev/null +++ b/scripts/cmake/vcpkg_extract_source_archive_ex.cmake @@ -0,0 +1,130 @@ +## # vcpkg_extract_source_archive_ex +## +## Extract an archive into the source directory. Replaces [`vcpkg_extract_source_archive`](vcpkg_extract_source_archive.md). +## +## ## Usage +## ```cmake +## vcpkg_extract_source_archive_ex( +## OUT_SOURCE_PATH +## ARCHIVE <${ARCHIVE}> +## [REF <1.0.0>] +## [NO_REMOVE_ONE_LEVEL] +## [WORKING_DIRECTORY <${CURRENT_BUILDTREES_DIR}/src>] +## [PATCHES ...] +## ) +## ``` +## ## Parameters +## ### OUT_SOURCE_PATH +## Specifies the out-variable that will contain the extracted location. +## +## This should be set to `SOURCE_PATH` by convention. +## +## ### ARCHIVE +## The full path to the archive to be extracted. +## +## This is usually obtained from calling [`vcpkg_download_distfile`](vcpkg_download_distfile.md). +## +## ### REF +## A friendly name that will be used instead of the filename of the archive. +## +## By convention, this is set to the version number or tag fetched +## +## ### WORKING_DIRECTORY +## If specified, the archive will be extracted into the working directory instead of `${CURRENT_BUILDTREES_DIR}/src/`. +## +## Note that the archive will still be extracted into a subfolder underneath that directory (`${WORKING_DIRECTORY}/${REF}-${HASH}/`). +## +## ### PATCHES +## A list of patches to be applied to the extracted sources. +## +## Relative paths are based on the port directory. +## +## ### NO_REMOVE_ONE_LEVEL +## Specifies that the default removal of the top level folder should not occur. +## +## ## Examples +## +## * [bzip2](https://github.com/Microsoft/vcpkg/blob/master/ports/bzip2/portfile.cmake) +## * [sqlite3](https://github.com/Microsoft/vcpkg/blob/master/ports/sqlite3/portfile.cmake) +## * [cairo](https://github.com/Microsoft/vcpkg/blob/master/ports/cairo/portfile.cmake) +include(vcpkg_apply_patches) +include(vcpkg_extract_source_archive) + +function(vcpkg_extract_source_archive_ex) + cmake_parse_arguments(_vesae "NO_REMOVE_ONE_LEVEL" "OUT_SOURCE_PATH;ARCHIVE;REF;WORKING_DIRECTORY" "PATCHES" ${ARGN}) + + if(NOT _vesae_ARCHIVE) + message(FATAL_ERROR "Must specify ARCHIVE parameter to vcpkg_extract_source_archive_ex()") + endif() + + if(NOT DEFINED _vesae_OUT_SOURCE_PATH) + message(FATAL_ERROR "Must specify OUT_SOURCE_PATH parameter to vcpkg_extract_source_archive_ex()") + endif() + + if(NOT DEFINED _vesae_WORKING_DIRECTORY) + set(_vesae_WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src) + endif() + + if(NOT DEFINED _vesae_REF) + get_filename_component(_vesae_REF ${_vesae_ARCHIVE} NAME_WE) + endif() + + string(REPLACE "/" "-" SANITIZED_REF "${_vesae_REF}") + + # Take the last 10 chars of the REF + set(REF_MAX_LENGTH 10) + string(LENGTH ${SANITIZED_REF} REF_LENGTH) + math(EXPR FROM_REF ${REF_LENGTH}-${REF_MAX_LENGTH}) + if(FROM_REF LESS 0) + set(FROM_REF 0) + endif() + string(SUBSTRING ${SANITIZED_REF} ${FROM_REF} ${REF_LENGTH} SHORTENED_SANITIZED_REF) + + # Hash the archive hash along with the patches. Take the first 10 chars of the hash + file(SHA512 ${_vesae_ARCHIVE} PATCHSET_HASH) + foreach(PATCH IN LISTS _vesae_PATCHES) + get_filename_component(ABSOLUTE_PATCH "${PATCH}" ABSOLUTE BASE_DIR "${CURRENT_PORT_DIR}") + file(SHA512 ${ABSOLUTE_PATCH} CURRENT_HASH) + string(APPEND PATCHSET_HASH ${CURRENT_HASH}) + endforeach() + + string(SHA512 PATCHSET_HASH ${PATCHSET_HASH}) + string(SUBSTRING ${PATCHSET_HASH} 0 10 PATCHSET_HASH) + set(SOURCE_PATH "${_vesae_WORKING_DIRECTORY}/${SHORTENED_SANITIZED_REF}-${PATCHSET_HASH}") + + if(NOT EXISTS ${SOURCE_PATH}) + set(TEMP_DIR "${_vesae_WORKING_DIRECTORY}/TEMP") + file(REMOVE_RECURSE ${TEMP_DIR}) + vcpkg_extract_source_archive("${_vesae_ARCHIVE}" "${TEMP_DIR}") + + if(_vesae_NO_REMOVE_ONE_LEVEL) + set(TEMP_SOURCE_PATH ${TEMP_DIR}) + else() + file(GLOB _ARCHIVE_FILES "${TEMP_DIR}/*") + list(LENGTH _ARCHIVE_FILES _NUM_ARCHIVE_FILES) + set(TEMP_SOURCE_PATH) + foreach(dir IN LISTS _ARCHIVE_FILES) + if (IS_DIRECTORY ${dir}) + set(TEMP_SOURCE_PATH "${dir}") + break() + endif() + endforeach() + + if(NOT _NUM_ARCHIVE_FILES EQUAL 2 OR NOT TEMP_SOURCE_PATH) + message(FATAL_ERROR "Could not unwrap top level directory from archive. Pass NO_REMOVE_ONE_LEVEL to disable this.") + endif() + endif() + + vcpkg_apply_patches( + SOURCE_PATH ${TEMP_SOURCE_PATH} + PATCHES ${_vesae_PATCHES} + ) + + file(RENAME ${TEMP_SOURCE_PATH} ${SOURCE_PATH}) + file(REMOVE_RECURSE ${TEMP_DIR}) + endif() + + set(${_vesae_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) + message(STATUS "Using source at ${SOURCE_PATH}") + return() +endfunction() diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 39a722d93a2..ebe46b33563 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -77,12 +77,18 @@ function(vcpkg_find_acquire_program VAR) set(NOEXTRACT ON) set(HASH c1945669d983b632a10c5ff31e86d6ecbff143c3d8b2c433c0d3d18f84356d2b351f71ac05fd44e5403651b00c31db0d14615d7f9a6ecce5750438d37105c55b) elseif(VAR MATCHES "PYTHON3") - set(PROGNAME python) - set(SUBDIR "python3") - set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR}) - set(URL "https://www.python.org/ftp/python/3.5.4/python-3.5.4-embed-win32.zip") - set(ARCHIVE "python-3.5.4-embed-win32.zip") - set(HASH b5240fdc95088c2d7f65d2dd598650f8dd106b49589d94156bd4a078b108c6cabbe7a38ef73e2b2cf00e8312a93d2e587eac2c54ce85540d3c7a26cc60013156) + if(CMAKE_HOST_WIN32) + set(PROGNAME python) + set(SUBDIR "python3") + set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR}) + set(URL "https://www.python.org/ftp/python/3.5.4/python-3.5.4-embed-win32.zip") + set(ARCHIVE "python-3.5.4-embed-win32.zip") + set(HASH b5240fdc95088c2d7f65d2dd598650f8dd106b49589d94156bd4a078b108c6cabbe7a38ef73e2b2cf00e8312a93d2e587eac2c54ce85540d3c7a26cc60013156) + else() + set(PROGNAME python3) + set(BREW_PACKAGE_NAME "python") + set(APT_PACKAGE_NAME "python3") + endif() elseif(VAR MATCHES "PYTHON2") set(PROGNAME python) set(SUBDIR "python2") @@ -128,23 +134,43 @@ function(vcpkg_find_acquire_program VAR) elseif(VAR MATCHES "MESON") set(PROGNAME meson) set(REQUIRED_INTERPRETER PYTHON3) - set(SCRIPTNAME meson.py) - set(PATHS ${DOWNLOADS}/tools/meson/meson-0.43.0) - set(URL "https://github.com/mesonbuild/meson/archive/0.43.0.zip") - set(ARCHIVE "meson-0.43.0.zip") - set(HASH dde4de72eff37046731224f32aa5f4618d45bdf148cec2d1af6e25e7522ebc2b04aedc9eceed483dfa93823a0ea7ea472d0c0c9380061bf3ee2f16b87dd1425e) + set(BREW_PACKAGE_NAME "meson") + set(APT_PACKAGE_NAME "meson") + if(CMAKE_HOST_WIN32) + set(SCRIPTNAME meson.py) + else() + set(SCRIPTNAME meson) + endif() + set(PATHS ${DOWNLOADS}/tools/meson/meson-0.47.1) + set(URL "https://github.com/mesonbuild/meson/archive/0.47.1.zip") + set(ARCHIVE "meson-0.47.1.zip") + set(HASH 0f6462835583a51707bee82d852018cfcb7444c0dad95b2ba08814e500a5cfe3f731dc6c1fb73c765d1120ee2a2d6600e15d8d393bab1993e84bd4354b2e6855) elseif(VAR MATCHES "FLEX") - set(PROGNAME win_flex) - set(PATHS ${DOWNLOADS}/tools/win_flex) - set(URL "https://sourceforge.net/projects/winflexbison/files/win_flex_bison-2.5.9.zip/download") - set(ARCHIVE "win_flex_bison-2.5.9.zip") - set(HASH 9580f0e46893670a011645947c1becda69909a41a38bb4197fe33bd1ab7719da6b80e1be316f269e1a4759286870d49a9b07ef83afc4bac33232bd348e0bc814) + if(CMAKE_HOST_WIN32) + set(PROGNAME win_flex) + set(SUBDIR win_flex-2.5.16) + set(PATHS ${DOWNLOADS}/tools/win_flex/${SUBDIR}) + set(URL "https://sourceforge.net/projects/winflexbison/files/winflexbison-2.5.16.zip/download") + set(ARCHIVE "win_flex_bison-2.5.16.zip") + set(HASH 0a14154bff5d998feb23903c46961528f8ccb4464375d5384db8c4a7d230c0c599da9b68e7a32f3217a0a0735742242eaf3769cb4f03e00931af8640250e9123) + else() + set(PROGNAME flex) + set(APT_PACKAGE_NAME flex) + set(BREW_PACKAGE_NAME flex) + endif() elseif(VAR MATCHES "BISON") - set(PROGNAME win_bison) - set(PATHS ${DOWNLOADS}/tools/win_bison) - set(URL "https://sourceforge.net/projects/winflexbison/files/win_flex_bison-2.5.9.zip/download") - set(ARCHIVE "win_flex_bison-2.5.9.zip") - set(HASH 9580f0e46893670a011645947c1becda69909a41a38bb4197fe33bd1ab7719da6b80e1be316f269e1a4759286870d49a9b07ef83afc4bac33232bd348e0bc814) + if(CMAKE_HOST_WIN32) + set(PROGNAME win_bison) + set(SUBDIR win_bison-2.5.16) + set(PATHS ${DOWNLOADS}/tools/win_bison/${SUBDIR}) + set(URL "https://sourceforge.net/projects/winflexbison/files/winflexbison-2.5.16.zip/download") + set(ARCHIVE "win_flex_bison-2.5.16.zip") + set(HASH 0a14154bff5d998feb23903c46961528f8ccb4464375d5384db8c4a7d230c0c599da9b68e7a32f3217a0a0735742242eaf3769cb4f03e00931af8640250e9123) + else() + set(PROGNAME bison) + set(APT_PACKAGE_NAME bison) + set(BREW_PACKAGE_NAME bison) + endif() elseif(VAR MATCHES "GPERF") set(PROGNAME gperf) set(PATHS ${DOWNLOADS}/tools/gperf/bin) diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 47c91f83cd8..ea9923df3ce 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -117,7 +117,7 @@ function(vcpkg_fixup_cmake_targets) file(READ ${DEBUG_TARGET} _contents) string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" _contents "${_contents}") - string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+\\.exe)" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}") + string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \";]+\\.exe)" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}") string(REPLACE "\${_IMPORT_PREFIX}/lib" "\${_IMPORT_PREFIX}/debug/lib" _contents "${_contents}") string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/debug/bin" _contents "${_contents}") file(WRITE ${RELEASE_SHARE}/${DEBUG_TARGET_REL} "${_contents}") @@ -134,9 +134,9 @@ function(vcpkg_fixup_cmake_targets) "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" _contents "${_contents}") string(REPLACE "${CURRENT_INSTALLED_DIR}" "_INVALID_ROOT_" _contents "${_contents}") - string(REGEX REPLACE ";_INVALID_ROOT_/[^\";]*" "" _contents "${_contents}") - string(REGEX REPLACE "_INVALID_ROOT_/[^\";]*;" "" _contents "${_contents}") - string(REGEX REPLACE "\"_INVALID_ROOT_/[^\";]*\"" "\"\"" _contents "${_contents}") + string(REGEX REPLACE "_INVALID_ROOT_/[^\";>]*" "" _contents "${_contents}") + string(REGEX REPLACE ";;+" ";" _contents "${_contents}") + string(REGEX REPLACE "\";\"" "\"\"" _contents "${_contents}") file(WRITE ${MAIN_TARGET} "${_contents}") endforeach() diff --git a/scripts/cmake/vcpkg_from_bitbucket.cmake b/scripts/cmake/vcpkg_from_bitbucket.cmake index a12d86b43fa..5f23714ead5 100644 --- a/scripts/cmake/vcpkg_from_bitbucket.cmake +++ b/scripts/cmake/vcpkg_from_bitbucket.cmake @@ -11,6 +11,7 @@ ## [REF ] ## [SHA512 <45d0d7f8cc350...>] ## [HEAD_REF ] +## [PATCHES ...] ## ) ## ``` ## @@ -40,6 +41,11 @@ ## ## For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms. ## +## ### PATCHES +## A list of patches to be applied to the extracted sources. +## +## Relative paths are based on the port directory. +## ## ## Notes: ## At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. ## @@ -50,7 +56,7 @@ ## * [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) + set(multipleValuesArgs PATCHES) cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) if(NOT _vdud_OUT_SOURCE_PATH) @@ -115,7 +121,7 @@ function(vcpkg_from_bitbucket) 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}) + string(SUBSTRING ${_vdud_REF} 0 12 _version) # Get the 12 first numbers from commit hash endif() vcpkg_download_distfile(ARCHIVE @@ -123,8 +129,14 @@ function(vcpkg_from_bitbucket) 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}) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF "${_vdud_REF}" + PATCHES ${_vdud_PATCHES} + ) + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) return() endif() @@ -164,11 +176,6 @@ function(vcpkg_from_bitbucket) ) endif() - vcpkg_extract_source_archive_ex( - ARCHIVE "${ARCHIVE}" - 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 "${ARCHIVE_VERSION}" _contents) @@ -179,5 +186,12 @@ function(vcpkg_from_bitbucket) # 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}) + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${downloaded_file_path}" + REF "${_vdud_HEAD_REF}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/head" + PATCHES ${_vdud_PATCHES} + ) + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) endfunction() diff --git a/scripts/cmake/vcpkg_from_git.cmake b/scripts/cmake/vcpkg_from_git.cmake new file mode 100644 index 00000000000..2fc66b279ea --- /dev/null +++ b/scripts/cmake/vcpkg_from_git.cmake @@ -0,0 +1,127 @@ +## # vcpkg_from_git +## +## Download and extract a project from git +## +## ## Usage: +## ```cmake +## vcpkg_from_git( +## OUT_SOURCE_PATH +## URL +## REF <59f7335e4d...> +## SHA512 +## [PATCHES ...] +## ) +## ``` +## +## ## Parameters: +## ### OUT_SOURCE_PATH +## Specifies the out-variable that will contain the extracted location. +## +## This should be set to `SOURCE_PATH` by convention. +## +## ### URL +## The url of the git repository. +## +## ### SHA512 +## The SHA512 hash that should match the archive form of the commit. +## +## This is most easily determined by first setting it to `0`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. +## +## ### REF +## A stable git commit-ish (ideally a tag or commit) 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. +## +## ### PATCHES +## A list of patches to be applied to the extracted sources. +## +## Relative paths are based on the port directory. +## +## ## Notes: +## `OUT_SOURCE_PATH`, `REF`, `SHA512`, and `URL` must be specified. +## +## ## Examples: +## +## * [fdlibm](https://github.com/Microsoft/vcpkg/blob/master/ports/fdlibm/portfile.cmake) + +function(vcpkg_from_git) + set(oneValueArgs OUT_SOURCE_PATH URL REF SHA512) + set(multipleValuesArgs PATCHES) + cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + + if(NOT DEFINED _vdud_OUT_SOURCE_PATH) + message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.") + endif() + + if(NOT DEFINED _vdud_URL) + message(FATAL_ERROR "The git url must be specified") + endif() + + if(NOT DEFINED _vdud_REF) + message(FATAL_ERROR "The git ref must be specified.") + endif() + + if(NOT DEFINED _vdud_SHA512) + message(FATAL_ERROR "vcpkg_from_git requires a SHA512 argument. If you do not know the SHA512, add it as 'SHA512 0' and re-run this command.") + endif() + + # using .tar.gz instead of .zip because the hash of the latter is affected by timezone. + string(REPLACE "/" "-" SANITIZED_REF "${_vdud_REF}") + set(TEMP_ARCHIVE "${DOWNLOADS}/temp/${PORT}-${SANITIZED_REF}.tar.gz") + set(ARCHIVE "${DOWNLOADS}/${PORT}-${SANITIZED_REF}.tar.gz") + set(TEMP_SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/${SANITIZED_REF}") + + function(test_hash FILE_PATH FILE_KIND CUSTOM_ERROR_ADVICE) + file(SHA512 ${FILE_PATH} FILE_HASH) + if(NOT FILE_HASH STREQUAL _vdud_SHA512) + message(FATAL_ERROR + "\nFile does not have expected hash:\n" + " File path: [ ${FILE_PATH} ]\n" + " Expected hash: [ ${_vdud_SHA512} ]\n" + " Actual hash: [ ${FILE_HASH} ]\n" + "${CUSTOM_ERROR_ADVICE}\n") + endif() + endfunction() + + if(NOT EXISTS "${ARCHIVE}") + if(_VCPKG_NO_DOWNLOADS) + message(FATAL_ERROR "Downloads are disabled, but '${ARCHIVE}' does not exist.") + endif() + message(STATUS "Fetching ${_vdud_URL}...") + find_program(GIT NAMES git git.cmd) + # Note: git init is safe to run multiple times + vcpkg_execute_required_process( + COMMAND ${GIT} init git-tmp + WORKING_DIRECTORY ${DOWNLOADS} + LOGNAME git-init + ) + vcpkg_execute_required_process( + COMMAND ${GIT} fetch ${_vdud_URL} ${_vdud_REF} --depth 1 -n + WORKING_DIRECTORY ${DOWNLOADS}/git-tmp + LOGNAME git-fetch + ) + file(MAKE_DIRECTORY "${DOWNLOADS}/temp") + vcpkg_execute_required_process( + COMMAND ${GIT} archive FETCH_HEAD -o "${TEMP_ARCHIVE}" + WORKING_DIRECTORY ${DOWNLOADS}/git-tmp + LOGNAME git-archive + ) + test_hash("${TEMP_ARCHIVE}" "downloaded repo" "") + get_filename_component(downloaded_file_dir "${ARCHIVE}" DIRECTORY) + file(MAKE_DIRECTORY "${downloaded_file_dir}") + file(RENAME "${TEMP_ARCHIVE}" "${ARCHIVE}") + else() + message(STATUS "Using cached ${ARCHIVE}") + test_hash("${ARCHIVE}" "cached file" "Please delete the file and retry if this file should be downloaded again.") + endif() + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF "${SANITIZED_REF}" + PATCHES ${_vdud_PATCHES} + NO_REMOVE_ONE_LEVEL + ) + + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) +endfunction() diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index 28ada063129..48bfd828ac8 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -10,6 +10,7 @@ ## [REF ] ## [SHA512 <45d0d7f8cc350...>] ## [HEAD_REF ] +## [PATCHES ...] ## ) ## ``` ## @@ -23,7 +24,7 @@ ## 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.** +## A stable git commit-ish (ideally a tag or commit) 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. ## @@ -39,6 +40,11 @@ ## ## For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms. ## +## ### PATCHES +## A list of patches to be applied to the extracted sources. +## +## Relative paths are based on the port directory. +## ## ## Notes: ## At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. ## @@ -74,16 +80,16 @@ function(vcpkg_from_github) string(REGEX REPLACE "/.*" "" ORG_NAME ${_vdud_REPO}) macro(set_TEMP_SOURCE_PATH BASE BASEREF) - set(TEMP_SOURCE_PATH "${BASE}/${REPO_NAME}-${BASEREF}") - if(NOT EXISTS ${TEMP_SOURCE_PATH}) - # Sometimes GitHub strips a leading 'v' off the REF. - string(REGEX REPLACE "^v" "" REF ${BASEREF}) - string(REPLACE "/" "-" REF ${REF}) - set(TEMP_SOURCE_PATH "${BASE}/${REPO_NAME}-${REF}") + set(TEMP_SOURCE_PATH "${BASE}/${REPO_NAME}-${BASEREF}") if(NOT EXISTS ${TEMP_SOURCE_PATH}) - message(FATAL_ERROR "Could not determine source path: '${BASE}/${REPO_NAME}-${BASEREF}' does not exist") + # Sometimes GitHub strips a leading 'v' off the REF. + string(REGEX REPLACE "^v" "" REF ${BASEREF}) + string(REPLACE "/" "-" REF ${REF}) + set(TEMP_SOURCE_PATH "${BASE}/${REPO_NAME}-${REF}") + if(NOT EXISTS ${TEMP_SOURCE_PATH}) + message(FATAL_ERROR "Could not determine source path: '${BASE}/${REPO_NAME}-${BASEREF}' does not exist") + endif() endif() - endif() endmacro() if(VCPKG_USE_HEAD_VERSION AND NOT DEFINED _vdud_HEAD_REF) @@ -105,43 +111,14 @@ function(vcpkg_from_github) FILENAME "${ORG_NAME}-${REPO_NAME}-${SANITIZED_REF}.tar.gz" ) - # Take the last 10 chars of the REF - set(REF_MAX_LENGTH 10) - string(LENGTH ${SANITIZED_REF} REF_LENGTH) - math(EXPR FROM_REF ${REF_LENGTH}-${REF_MAX_LENGTH}) - if(FROM_REF LESS 0) - set(FROM_REF 0) - endif() - string(SUBSTRING ${SANITIZED_REF} ${FROM_REF} ${REF_LENGTH} SHORTENED_SANITIZED_REF) - - # Hash the archive hash along with the patches. Take the first 10 chars of the hash - set(PATCHSET_HASH "${_vdud_SHA512}") - foreach(PATCH IN LISTS _vdud_PATCHES) - file(SHA512 ${PATCH} CURRENT_HASH) - string(APPEND PATCHSET_HASH ${CURRENT_HASH}) - endforeach() - - string(SHA512 PATCHSET_HASH ${PATCHSET_HASH}) - string(SUBSTRING ${PATCHSET_HASH} 0 10 PATCHSET_HASH) - set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/${SHORTENED_SANITIZED_REF}-${PATCHSET_HASH}") - - if(NOT EXISTS ${SOURCE_PATH}) - set(TEMP_DIR "${CURRENT_BUILDTREES_DIR}/src/TEMP") - file(REMOVE_RECURSE ${TEMP_DIR}) - vcpkg_extract_source_archive_ex(ARCHIVE "${ARCHIVE}" WORKING_DIRECTORY ${TEMP_DIR}) - set_TEMP_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src/TEMP ${SANITIZED_REF}) - - vcpkg_apply_patches( - SOURCE_PATH ${TEMP_SOURCE_PATH} - PATCHES ${_vdud_PATCHES} - ) - - file(RENAME ${TEMP_SOURCE_PATH} ${SOURCE_PATH}) - file(REMOVE_RECURSE ${TEMP_DIR}) - endif() + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF "${SANITIZED_REF}" + PATCHES ${_vdud_PATCHES} + ) set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) - return() endif() @@ -182,11 +159,6 @@ function(vcpkg_from_github) ) endif() - vcpkg_extract_source_archive_ex( - ARCHIVE "${ARCHIVE}" - 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 "${ARCHIVE_VERSION}" _contents) @@ -199,10 +171,12 @@ function(vcpkg_from_github) set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) endif() - set_TEMP_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src/head ${SANITIZED_HEAD_REF}) - vcpkg_apply_patches( - SOURCE_PATH ${TEMP_SOURCE_PATH} + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${downloaded_file_path}" + REF "${SANITIZED_HEAD_REF}" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src/head PATCHES ${_vdud_PATCHES} ) - set(${_vdud_OUT_SOURCE_PATH} "${TEMP_SOURCE_PATH}" PARENT_SCOPE) + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) endfunction() diff --git a/scripts/cmake/vcpkg_from_gitlab.cmake b/scripts/cmake/vcpkg_from_gitlab.cmake new file mode 100644 index 00000000000..f13bc054c99 --- /dev/null +++ b/scripts/cmake/vcpkg_from_gitlab.cmake @@ -0,0 +1,169 @@ +## # vcpkg_from_gitlab +## +## Download and extract a project from Gitlab instances. Enables support for `install --head`. +## +## ## Usage: +## ```cmake +## vcpkg_from_gitlab( +## GITLAB_URL +## OUT_SOURCE_PATH +## REPO +## [REF ] +## [SHA512 <45d0d7f8cc350...>] +## [HEAD_REF ] +## [PATCHES ...] +## ) +## ``` +## +## ## Parameters: +## +## ### GITLAB_URL +## The URL of the Gitlab instance to use. +## +## ### 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 plus the repository name on the Gitlab instance. +## +## ### 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 (${GITLAB_URL}/${REPO}/-/archive/${REF}/${REPO_NAME}-${REF}.tar.gz). +## The REPO_NAME variable is parsed from the value of REPO. +## +## 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. +## +## ### PATCHES +## A list of patches to be applied to the extracted sources. +## +## Relative paths are based on the port directory. +## +## ## 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. +## + +function(vcpkg_from_gitlab) + set(oneValueArgs OUT_SOURCE_PATH GITLAB_URL USER REPO REF SHA512 HEAD_REF) + set(multipleValuesArgs PATCHES) + cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + + if(NOT DEFINED _vdud_GITLAB_URL) + message(FATAL_ERROR "GITLAB_URL must be specified.") + endif() + + if(NOT DEFINED _vdud_OUT_SOURCE_PATH) + message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.") + endif() + + if((DEFINED _vdud_REF AND NOT DEFINED _vdud_SHA512) OR (NOT DEFINED _vdud_REF AND DEFINED _vdud_SHA512)) + message(FATAL_ERROR "SHA512 must be specified if REF is specified.") + endif() + + if(NOT DEFINED _vdud_REPO) + message(FATAL_ERROR "REPO must be specified.") + endif() + + if(NOT DEFINED _vdud_REF AND NOT DEFINED _vdud_HEAD_REF) + message(FATAL_ERROR "At least one of REF and HEAD_REF must be specified.") + endif() + + if(VCPKG_USE_HEAD_VERSION AND NOT DEFINED _vdud_HEAD_REF) + message(STATUS "Package does not specify HEAD_REF. Falling back to non-HEAD version.") + set(VCPKG_USE_HEAD_VERSION OFF) + endif() + + string(REGEX REPLACE ".*/" "" REPO_NAME ${_vdud_REPO}) + string(REGEX REPLACE "/.*" "" ORG_NAME ${_vdud_REPO}) + + # 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() + + string(REPLACE "/" "-" SANITIZED_REF "${_vdud_REF}") + + vcpkg_download_distfile(ARCHIVE + URLS "${_vdud_GITLAB_URL}/${ORG_NAME}/${REPO_NAME}/-/archive/${_vdud_REF}/${REPO_NAME}-${_vdud_REF}.tar.gz" + SHA512 "${_vdud_SHA512}" + FILENAME "${ORG_NAME}-${REPO_NAME}-${SANITIZED_REF}.tar.gz" + ) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF "${SANITIZED_REF}" + PATCHES ${_vdud_PATCHES} + ) + + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) + return() + endif() + + # The following is for --head scenarios + set(URL "${_vdud_GITLAB_URL}/${ORG_NAME}/${REPO_NAME}/-/archive/${_vdud_HEAD_REF}/${_vdud_HEAD_REF}.tar.gz") + string(REPLACE "/" "-" SANITIZED_HEAD_REF "${_vdud_HEAD_REF}") + set(downloaded_file_name "${ORG_NAME}-${REPO_NAME}-${SANITIZED_HEAD_REF}.tar.gz") + set(downloaded_file_path "${DOWNLOADS}/${downloaded_file_name}") + + 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() + + vcpkg_download_distfile(ARCHIVE + URLS ${URL} + FILENAME ${downloaded_file_name} + SKIP_SHA512 + ) + endif() + + # There are issues with the Gitlab API project paths being URL-escaped, so we use git here to get the head revision + execute_process(COMMAND ${GIT} ls-remote + "${_vdud_GITLAB_URL}/${ORG_NAME}/${REPO_NAME}.git" "${_vdud_HEAD_REF}" + RESULT_VARIABLE _git_result + OUTPUT_VARIABLE _git_output + ) + string(REGEX MATCH "[a-f0-9]+" _version "${_git_output}") + # exports VCPKG_HEAD_VERSION to the caller. This will get picked up by ports.cmake after the build. + # When multiple vcpkg_from_gitlab's are used after each other, only use the version from the first (hopefully the primary one). + if(NOT DEFINED VCPKG_HEAD_VERSION) + set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) + endif() + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${downloaded_file_path}" + REF "${SANITIZED_HEAD_REF}" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src/head + PATCHES ${_vdud_PATCHES} + ) + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) +endfunction() diff --git a/scripts/cmake/vcpkg_get_windows_sdk.cmake b/scripts/cmake/vcpkg_get_windows_sdk.cmake index a8aad64a94c..e7d72a12528 100644 --- a/scripts/cmake/vcpkg_get_windows_sdk.cmake +++ b/scripts/cmake/vcpkg_get_windows_sdk.cmake @@ -1,16 +1,6 @@ # Returns Windows SDK number via out variable "ret" function(vcpkg_get_windows_sdk ret) - execute_process( - COMMAND powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "& {& '${VCPKG_ROOT_DIR}/scripts/getWindowsSDK.ps1'}" 2>&1 - INPUT_FILE NUL - OUTPUT_VARIABLE WINDOWS_SDK - RESULT_VARIABLE error_code) - - if (error_code) - message(FATAL_ERROR "Could not find Windows SDK") - endif() - - # Remove trailing newline and non-numeric characters - string(REGEX REPLACE "[^0-9.]" "" WINDOWS_SDK "${WINDOWS_SDK}") + set(WINDOWS_SDK $ENV{WindowsSDKVersion}) + string(REPLACE "\\" "" WINDOWS_SDK "${WINDOWS_SDK}") set(${ret} ${WINDOWS_SDK} PARENT_SCOPE) endfunction() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_install_meson.cmake b/scripts/cmake/vcpkg_install_meson.cmake index f6d49288ccc..7ab9d55b3bf 100644 --- a/scripts/cmake/vcpkg_install_meson.cmake +++ b/scripts/cmake/vcpkg_install_meson.cmake @@ -10,7 +10,6 @@ function(vcpkg_install_meson) WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME package-${TARGET_TRIPLET}-rel ) - message(STATUS "Package ${TARGET_TRIPLET}-rel done") message(STATUS "Package ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( @@ -18,6 +17,5 @@ function(vcpkg_install_meson) WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME package-${TARGET_TRIPLET}-dbg ) - message(STATUS "Package ${TARGET_TRIPLET}-dbg done") endfunction() diff --git a/scripts/cmake/vcpkg_install_msbuild.cmake b/scripts/cmake/vcpkg_install_msbuild.cmake new file mode 100644 index 00000000000..11bcdf189b0 --- /dev/null +++ b/scripts/cmake/vcpkg_install_msbuild.cmake @@ -0,0 +1,226 @@ +## # vcpkg_install_msbuild +## +## Build and install an msbuild-based project. This replaces `vcpkg_build_msbuild()`. +## +## ## Usage +## ```cmake +## vcpkg_install_msbuild( +## SOURCE_PATH <${SOURCE_PATH}> +## PROJECT_SUBPATH +## [INCLUDES_SUBPATH ] +## [LICENSE_SUBPATH ] +## [RELEASE_CONFIGURATION ] +## [DEBUG_CONFIGURATION ] +## [TARGET ] +## [TARGET_PLATFORM_VERSION <10.0.15063.0>] +## [PLATFORM <${TRIPLET_SYSTEM_ARCH}>] +## [PLATFORM_TOOLSET <${VCPKG_PLATFORM_TOOLSET}>] +## [OPTIONS ...] +## [OPTIONS_RELEASE ...] +## [OPTIONS_DEBUG ...] +## [USE_VCPKG_INTEGRATION] +## [ALLOW_ROOT_INCLUDES | REMOVE_ROOT_INCLUDES] +## ) +## ``` +## +## ## Parameters +## ### SOURCE_PATH +## The path to the root of the source tree. +## +## Because MSBuild uses in-source builds, the source tree will be copied into a temporary location for the build. This +## parameter is the base for that copy and forms the base for all XYZ_SUBPATH options. +## +## ### USE_VCPKG_INTEGRATION +## Apply the normal `integrate install` integration for building the project. +## +## By default, projects built with this command will not automatically link libraries or have header paths set. +## +## ### PROJECT_SUBPATH +## The subpath to the solution (`.sln`) or project (`.vcxproj`) file relative to `SOURCE_PATH`. +## +## ### LICENSE_SUBPATH +## The subpath to the license file relative to `SOURCE_PATH`. +## +## ### INCLUDES_SUBPATH +## The subpath to the includes directory relative to `SOURCE_PATH`. +## +## This parameter should be a directory and should not end in a trailing slash. +## +## ### ALLOW_ROOT_INCLUDES +## Indicates that top-level include files (e.g. `include/zlib.h`) should be allowed. +## +## ### REMOVE_ROOT_INCLUDES +## Indicates that top-level include files (e.g. `include/Makefile.am`) should be removed. +## +## ### SKIP_CLEAN +## Indicates that the intermediate files should not be removed. +## +## Ports using this option should later call [`vcpkg_clean_msbuild()`](vcpkg_clean_msbuild.md) to manually clean up. +## +## ### RELEASE_CONFIGURATION +## The configuration (``/p:Configuration`` msbuild parameter) used for Release builds. +## +## ### DEBUG_CONFIGURATION +## The configuration (``/p:Configuration`` msbuild parameter) used for Debug builds. +## +## ### TARGET_PLATFORM_VERSION +## The WindowsTargetPlatformVersion (``/p:WindowsTargetPlatformVersion`` msbuild parameter) +## +## ### TARGET +## The MSBuild target to build. (``/t:``) +## +## ### PLATFORM +## The platform (``/p:Platform`` msbuild parameter) used for the build. +## +## ### PLATFORM_TOOLSET +## The platform toolset (``/p:PlatformToolset`` msbuild parameter) used for the build. +## +## ### OPTIONS +## Additional options passed to msbuild for all builds. +## +## ### OPTIONS_RELEASE +## Additional options passed to msbuild for Release builds. These are in addition to `OPTIONS`. +## +## ### OPTIONS_DEBUG +## Additional options passed to msbuild for Debug builds. These are in addition to `OPTIONS`. +## +## ## Examples +## +## * [xalan-c](https://github.com/Microsoft/vcpkg/blob/master/ports/xalan-c/portfile.cmake) +## * [libimobiledevice](https://github.com/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake) + +include(vcpkg_clean_msbuild) + +function(vcpkg_install_msbuild) + cmake_parse_arguments( + _csc + "USE_VCPKG_INTEGRATION;ALLOW_ROOT_INCLUDES;REMOVE_ROOT_INCLUDES;SKIP_CLEAN" + "SOURCE_PATH;PROJECT_SUBPATH;INCLUDES_SUBPATH;LICENSE_SUBPATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;PLATFORM_TOOLSET;TARGET_PLATFORM_VERSION;TARGET" + "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" + ${ARGN} + ) + + if(NOT DEFINED _csc_RELEASE_CONFIGURATION) + set(_csc_RELEASE_CONFIGURATION Release) + endif() + if(NOT DEFINED _csc_DEBUG_CONFIGURATION) + set(_csc_DEBUG_CONFIGURATION Debug) + endif() + if(NOT DEFINED _csc_PLATFORM) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(_csc_PLATFORM x64) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(_csc_PLATFORM Win32) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL ARM) + set(_csc_PLATFORM ARM) + else() + message(FATAL_ERROR "Unsupported target architecture") + endif() + endif() + if(NOT DEFINED _csc_PLATFORM_TOOLSET) + set(_csc_PLATFORM_TOOLSET ${VCPKG_PLATFORM_TOOLSET}) + endif() + if(NOT DEFINED _csc_TARGET_PLATFORM_VERSION) + vcpkg_get_windows_sdk(_csc_TARGET_PLATFORM_VERSION) + endif() + if(NOT DEFINED _csc_TARGET) + set(_csc_TARGET Rebuild) + endif() + + list(APPEND _csc_OPTIONS + /t:${_csc_TARGET} + /p:Platform=${_csc_PLATFORM} + /p:PlatformToolset=${_csc_PLATFORM_TOOLSET} + /p:VCPkgLocalAppDataDisabled=true + /p:UseIntelMKL=No + /p:WindowsTargetPlatformVersion=${_csc_TARGET_PLATFORM_VERSION} + /m + ) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + # Disable LTCG for static libraries because this setting introduces ABI incompatibility between minor compiler versions + # TODO: Add a way for the user to override this if they want to opt-in to incompatibility + list(APPEND _csc_OPTIONS /p:WholeProgramOptimization=false) + endif() + + if(_csc_USE_VCPKG_INTEGRATION) + list(APPEND _csc_OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets /p:VcpkgApplocalDeps=false) + endif() + + get_filename_component(SOURCE_PATH_SUFFIX "${_csc_SOURCE_PATH}" NAME) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Building ${_csc_PROJECT_SUBPATH} for Release") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + file(COPY ${_csc_SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + set(SOURCE_COPY_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${SOURCE_PATH_SUFFIX}) + vcpkg_execute_required_process( + COMMAND msbuild ${SOURCE_COPY_PATH}/${_csc_PROJECT_SUBPATH} + /p:Configuration=${_csc_RELEASE_CONFIGURATION} + ${_csc_OPTIONS} + ${_csc_OPTIONS_RELEASE} + WORKING_DIRECTORY ${SOURCE_COPY_PATH} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + file(GLOB_RECURSE LIBS ${SOURCE_COPY_PATH}/*.lib) + file(GLOB_RECURSE DLLS ${SOURCE_COPY_PATH}/*.dll) + file(GLOB_RECURSE EXES ${SOURCE_COPY_PATH}/*.exe) + if(LIBS) + file(COPY ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + endif() + if(DLLS) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + endif() + if(EXES) + file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + endif() + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Building ${_csc_PROJECT_SUBPATH} for Debug") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + file(COPY ${_csc_SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + set(SOURCE_COPY_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${SOURCE_PATH_SUFFIX}) + vcpkg_execute_required_process( + COMMAND msbuild ${SOURCE_COPY_PATH}/${_csc_PROJECT_SUBPATH} + /p:Configuration=${_csc_DEBUG_CONFIGURATION} + ${_csc_OPTIONS} + ${_csc_OPTIONS_DEBUG} + WORKING_DIRECTORY ${SOURCE_COPY_PATH} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + file(GLOB_RECURSE LIBS ${SOURCE_COPY_PATH}/*.lib) + file(GLOB_RECURSE DLLS ${SOURCE_COPY_PATH}/*.dll) + if(LIBS) + file(COPY ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() + if(DLLS) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + endif() + + vcpkg_copy_pdbs() + + if(NOT _csc_SKIP_CLEAN) + vcpkg_clean_msbuild() + endif() + + if(DEFINED _csc_INCLUDES_SUBPATH) + file(COPY ${_csc_SOURCE_PATH}/${_csc_INCLUDES_SUBPATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/) + file(GLOB ROOT_INCLUDES LIST_DIRECTORIES false ${CURRENT_PACKAGES_DIR}/include/*) + if(ROOT_INCLUDES) + if(_csc_REMOVE_ROOT_INCLUDES) + file(REMOVE ${ROOT_INCLUDES}) + elseif(_csc_ALLOW_ROOT_INCLUDES) + else() + message(FATAL_ERROR "Top-level files were found in ${CURRENT_PACKAGES_DIR}/include; this may indicate a problem with the call to `vcpkg_install_msbuild()`.\nTo avoid conflicts with other libraries, it is recommended to not put includes into the root `include/` directory.\nPass either ALLOW_ROOT_INCLUDES or REMOVE_ROOT_INCLUDES to handle these files.\n") + endif() + endif() + endif() + + if(DEFINED _csc_LICENSE_SUBPATH) + file(INSTALL ${_csc_SOURCE_PATH}/${_csc_LICENSE_SUBPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + endif() +endfunction() diff --git a/scripts/cmake/vcpkg_test_cmake.cmake b/scripts/cmake/vcpkg_test_cmake.cmake new file mode 100644 index 00000000000..718b2f69c2f --- /dev/null +++ b/scripts/cmake/vcpkg_test_cmake.cmake @@ -0,0 +1,53 @@ +## # vcpkg_test_cmake +## +## Tests a built package for CMake `find_package()` integration. +## +## ## Usage: +## ```cmake +## vcpkg_test_cmake(PACKAGE_NAME [MODULE]) +## ``` +## +## ## Parameters: +## +## ### PACKAGE_NAME +## The expected name to find with `find_package()`. +## +## ### MODULE +## Indicates that the library expects to be found via built-in CMake targets. +## +function(vcpkg_test_cmake) + cmake_parse_arguments(_tc "MODULE" "PACKAGE_NAME" "" ${ARGN}) + + if(NOT DEFINED _tc_PACKAGE_NAME) + message(FATAL_ERROR "PACKAGE_NAME must be specified") + endif() + if(_tc_MODULE) + set(PACKAGE_TYPE MODULE) + else() + set(PACKAGE_TYPE CONFIG) + endif() + + message(STATUS "Performing CMake integration test") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test) + + # Generate test source CMakeLists.txt + set(VCPKG_TEST_CMAKELIST ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test/CMakeLists.txt) + file(WRITE ${VCPKG_TEST_CMAKELIST} "cmake_minimum_required(VERSION 3.10)\n") + file(APPEND ${VCPKG_TEST_CMAKELIST} "set(CMAKE_PREFIX_PATH \"${CURRENT_PACKAGES_DIR};${CURRENT_INSTALLED_DIR}\")\n") + file(APPEND ${VCPKG_TEST_CMAKELIST} "\n") + file(APPEND ${VCPKG_TEST_CMAKELIST} "find_package(${_tc_PACKAGE_NAME} ${PACKAGE_TYPE} REQUIRED)\n") + + # Run cmake config with a generated CMakeLists.txt + set(LOGPREFIX "${CURRENT_BUILDTREES_DIR}/test-cmake-${TARGET_TRIPLET}") + execute_process( + COMMAND ${CMAKE_COMMAND} . + OUTPUT_FILE "${LOGPREFIX}-out.log" + ERROR_FILE "${LOGPREFIX}-err.log" + RESULT_VARIABLE error_code + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test + ) + if(error_code) + message(FATAL_ERROR "CMake integration test failed; unable to find_package(${_tc_PACKAGE_NAME} ${PACKAGE_TYPE} REQUIRED)") + endif() +endfunction() diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 deleted file mode 100644 index dd3f0f9f49e..00000000000 --- a/scripts/fetchTool.ps1 +++ /dev/null @@ -1,107 +0,0 @@ -[CmdletBinding()] -param( - [Parameter(Mandatory=$true)][string]$tool -) - -Set-StrictMode -Version Latest -$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -. "$scriptsDir\VcpkgPowershellUtils.ps1" - -Write-Verbose "Fetching tool: $tool" -$vcpkgRootDir = vcpkgFindFileRecursivelyUp $scriptsDir .vcpkg-root - -$downloadsDir = "$vcpkgRootDir\downloads" -vcpkgCreateDirectoryIfNotExists $downloadsDir - -function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) -{ - $tool = $tool.toLower() - - [xml]$asXml = Get-Content "$scriptsDir\vcpkgTools.xml" - $toolData = $asXml.SelectSingleNode("//tools/tool[@name=`"$tool`"]") # Case-sensitive! - - if ($toolData -eq $null) - { - throw "Unknown tool $tool" - } - - $toolPath="$downloadsDir\tools\$tool-$($toolData.version)-windows" - $exePath = "$toolPath\$($toolData.exeRelativePath)" - - if (Test-Path $exePath) - { - return $exePath - } - - $isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveName" - if ($isArchive) - { - $downloadPath = "$downloadsDir\$($toolData.archiveName)" - } - else - { - $downloadPath = "$toolPath\$($toolData.exeRelativePath)" - } - - [String]$url = $toolData.url - if (!(Test-Path $downloadPath)) - { - Write-Host "Downloading $tool..." - - # Download aria2 with .NET. aria2 will be used to download everything else. - if ($tool -eq "aria2") - { - vcpkgDownloadFile $url $downloadPath $toolData.sha512 - } - else - { - $aria2exe = fetchToolInternal "aria2" - vcpkgDownloadFileWithAria2 $aria2exe $url $downloadPath $toolData.sha512 - } - - Write-Host "Downloading $tool... done." - } - else - { - vcpkgCheckEqualFileHash -url $url -filePath $downloadPath -expectedHash $toolData.sha512 - } - - if ($isArchive) - { - Write-Host "Extracting $tool..." - # Extract 7zip920 with shell because we need it to extract 7zip - # Extract aria2 with shell because we need it to download 7zip - if ($tool -eq "7zip920" -or $tool -eq "aria2") - { - vcpkgExtractZipFile -ArchivePath $downloadPath -DestinationDir $toolPath - } - elseif ($tool -eq "7zip") - { - $sevenZip920 = fetchToolInternal "7zip920" - $ec = vcpkgInvokeCommand "$sevenZip920" "x `"$downloadPath`" -o`"$toolPath`" -y" - if ($ec -ne 0) - { - Write-Host "Could not extract $downloadPath" - throw - } - } - else - { - $sevenZipExe = fetchToolInternal "7zip" - vcpkgExtractFileWith7z -sevenZipExe "$sevenZipExe" -ArchivePath $downloadPath -DestinationDir $toolPath - } - Write-Host "Extracting $tool... done." - } - - if (-not (Test-Path $exePath)) - { - Write-Error "Could not detect or download $tool" - throw - } - - return $exePath -} - -$path = fetchToolInternal $tool -Write-Verbose "Fetching tool: $tool. Done." -return "::$path::" diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 deleted file mode 100644 index d7fd24e2491..00000000000 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ /dev/null @@ -1,58 +0,0 @@ -[CmdletBinding()] -param( - [Parameter(Mandatory=$False)] - [string]$withVSPath = "" -) - -Set-StrictMode -Version Latest -$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition - -$withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash - -$VisualStudioInstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1 -if ($VisualStudioInstallationInstances -eq $null) -{ - throw "Could not find Visual Studio. VS2015 or VS2017 (with C++) needs to be installed." -} - -Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstallationInstances))" -foreach ($instanceCandidateWithEOL in $VisualStudioInstallationInstances) -{ - $instanceCandidate = $instanceCandidateWithEOL -replace "::" -replace "::" - Write-Verbose "Inspecting: $instanceCandidate" - $split = $instanceCandidate -split "::" - # $preferenceWeight = $split[0] - # $releaseType = $split[1] - $version = $split[2] - $path = $split[3] - - if ($withVSPath -ne "" -and $withVSPath -ne $path) - { - Write-Verbose "Skipping: $instanceCandidate" - continue - } - - $majorVersion = $version.Substring(0,2); - if ($majorVersion -eq "15") - { - $VCFolder= "$path\VC\Tools\MSVC\" - if (Test-Path $VCFolder) - { - Write-Verbose "Picking: $instanceCandidate" - return "$path\MSBuild\15.0\Bin\MSBuild.exe", "v141" - } - } - - if ($majorVersion -eq "14") - { - $clExe= "$path\VC\bin\cl.exe" - if (Test-Path $clExe) - { - Write-Verbose "Picking: $instanceCandidate" - $programFilesPath = & $scriptsDir\getProgramFiles32bit.ps1 - return "$programFilesPath\MSBuild\14.0\Bin\MSBuild.exe", "v140" - } - } -} - -throw "Could not find MSBuild version with C++ support. VS2015 or VS2017 (with C++) needs to be installed." \ No newline at end of file diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 deleted file mode 100644 index cb51c345d46..00000000000 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ /dev/null @@ -1,61 +0,0 @@ -[CmdletBinding()] -param( - -) -Set-StrictMode -Version Latest -$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -. "$scriptsDir\VcpkgPowershellUtils.ps1" - -$vswhereExe = (& $scriptsDir\fetchTool.ps1 "vswhere") -replace "::" -replace "::" - -$output = & $vswhereExe -prerelease -legacy -products * -format xml -[xml]$asXml = $output - -$results = New-Object System.Collections.ArrayList -foreach ($instance in $asXml.instances.instance) -{ - $installationPath = $instance.InstallationPath -replace "\\$" # Remove potential trailing backslash - $installationVersion = $instance.InstallationVersion - - $isPrerelease = -7 - if (vcpkgHasProperty -object $instance -propertyName "isPrerelease") - { - $isPrerelease = $instance.isPrerelease - } - - if ($isPrerelease -eq 0) - { - $releaseType = "PreferenceWeight3::StableRelease" - } - elseif ($isPrerelease -eq 1) - { - $releaseType = "PreferenceWeight2::PreRelease" - } - else - { - $releaseType = "PreferenceWeight1::Legacy" - } - - # Placed like that for easy sorting according to preference - $results.Add("::${releaseType}::${installationVersion}::${installationPath}::") > $null -} - -# If nothing is found, attempt to find VS2015 Build Tools (not detected by vswhere.exe) -if ($results.Count -eq 0) -{ - $programFiles = & $scriptsDir\getProgramFiles32bit.ps1 - $installationPath = "$programFiles\Microsoft Visual Studio 14.0" - $clExe = "$installationPath\VC\bin\cl.exe" - $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" - - if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) - { - return "::PreferenceWeight1::Legacy::14.0::$installationPath::" - } -} - - -$results.Sort() -$results.Reverse() - -return $results \ No newline at end of file diff --git a/scripts/getProgramFiles32bit.ps1 b/scripts/getProgramFiles32bit.ps1 deleted file mode 100644 index 6b71915b196..00000000000 --- a/scripts/getProgramFiles32bit.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -[CmdletBinding()] -param( - -) - -$out = ${env:PROGRAMFILES(X86)} -if ($out -eq $null) -{ - $out = ${env:PROGRAMFILES} -} - -if ($out -eq $null) -{ - throw "Could not find [Program Files 32-bit]" -} - -return $out \ No newline at end of file diff --git a/scripts/getProgramFilesPlatformBitness.ps1 b/scripts/getProgramFilesPlatformBitness.ps1 deleted file mode 100644 index 2be4c113711..00000000000 --- a/scripts/getProgramFilesPlatformBitness.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -[CmdletBinding()] -param( - -) - -$out = ${env:ProgramW6432} -if ($out -eq $null) -{ - $out = ${env:PROGRAMFILES} -} - -if ($out -eq $null) -{ - throw "Could not find [Program Files Platform Bitness]" -} - -return $out \ No newline at end of file diff --git a/scripts/getWindowsSDK.ps1 b/scripts/getWindowsSDK.ps1 deleted file mode 100644 index d5e2f59a203..00000000000 --- a/scripts/getWindowsSDK.ps1 +++ /dev/null @@ -1,126 +0,0 @@ -[CmdletBinding()] -param( - [Parameter(Mandatory=$False)] - [switch]$DisableWin10SDK = $False, - - [Parameter(Mandatory=$False)] - [switch]$DisableWin81SDK = $False -) - -Set-StrictMode -Version Latest -$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -. "$scriptsDir\VcpkgPowershellUtils.ps1" - -if ($DisableWin10SDK -and $DisableWin81SDK) -{ - throw "Both Win10SDK and Win81SDK were disabled." -} - -Write-Verbose "Executing $($MyInvocation.MyCommand.Name)" - -$validInstances = New-Object System.Collections.ArrayList - -# Windows 10 SDK -function CheckWindows10SDK($path) -{ - if ($path -eq $null) - { - return - } - - $folder = (Join-Path $path "Include") - if (!(Test-Path $folder)) - { - Write-Verbose "$folder - Not Found" - return - } - - Write-Verbose "$folder - Found" - $win10sdkVersions = @(Get-ChildItem $folder | Where-Object {$_.Name -match "^10"} | Sort-Object) - [array]::Reverse($win10sdkVersions) # Newest SDK first - - foreach ($win10sdkV in $win10sdkVersions) - { - $windowsheader = "$folder\$win10sdkV\um\windows.h" - if (!(Test-Path $windowsheader)) - { - Write-Verbose "$windowsheader - Not Found" - continue - } - Write-Verbose "$windowsheader - Found" - - $ddkheader = "$folder\$win10sdkV\shared\sdkddkver.h" - if (!(Test-Path $ddkheader)) - { - Write-Verbose "$ddkheader - Not Found" - continue - } - - Write-Verbose "$ddkheader - Found" - $win10sdkVersionString = $win10sdkV.ToString() - Write-Verbose "Found $win10sdkVersionString" - $validInstances.Add($win10sdkVersionString) > $null - } -} - -Write-Verbose "`n" -Write-Verbose "Looking for Windows 10 SDK" -$regkey10 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue -$regkey10Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue -if (vcpkgHasProperty -object $regkey10 "KitsRoot10") { CheckWindows10SDK($regkey10.KitsRoot10) } -if (vcpkgHasProperty -object $regkey10Wow6432 "KitsRoot10") { CheckWindows10SDK($regkey10Wow6432.KitsRoot10) } -CheckWindows10SDK("$env:ProgramFiles\Windows Kits\10") -CheckWindows10SDK("${env:ProgramFiles(x86)}\Windows Kits\10") - -# Windows 8.1 SDK -function CheckWindows81SDK($path) -{ - if ($path -eq $null) - { - return - } - - $folder = "$path\Include" - if (!(Test-Path $folder)) - { - Write-Verbose "$folder - Not Found" - return - } - - Write-Verbose "$folder - Found" - $win81sdkVersionString = "8.1" - Write-Verbose "Found $win81sdkVersionString" - $validInstances.Add($win81sdkVersionString) > $null -} - -Write-Verbose "`n" -Write-Verbose "Looking for Windows 8.1 SDK" -$regkey81 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue -$regkey81Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue -if (vcpkgHasProperty -object $regkey81 "KitsRoot81") { CheckWindows81SDK($regkey81.KitsRoot81) } -if (vcpkgHasProperty -object $regkey81Wow6432 "KitsRoot81") { CheckWindows81SDK($regkey81Wow6432.KitsRoot81) } -CheckWindows81SDK("$env:ProgramFiles\Windows Kits\8.1") -CheckWindows81SDK("${env:ProgramFiles(x86)}\Windows Kits\8.1") - -Write-Verbose "`n`n`n" -Write-Verbose "The following Windows SDKs were found:" -foreach ($instance in $validInstances) -{ - Write-Verbose $instance -} - -# Selecting -foreach ($instance in $validInstances) -{ - if (!$DisableWin10SDK -and $instance -match "10.") - { - return $instance - } - - if (!$DisableWin81SDK -and $instance -match "8.1") - { - return $instance - } -} - -throw "Could not detect a Windows SDK / TargetPlatformVersion" diff --git a/scripts/internalCI.ps1 b/scripts/internalCI.ps1 deleted file mode 100644 index 9529c3766df..00000000000 --- a/scripts/internalCI.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -$ErrorActionPreference = "Stop" - -rm TEST-internal-ci.xml -errorAction SilentlyContinue - -New-Item -type directory downloads -errorAction SilentlyContinue | Out-Null -./scripts/bootstrap.ps1 -if (-not $?) { throw $? } - -# Clear out any intermediate files from the previous build -if (Test-Path buildtrees) -{ - Get-ChildItem buildtrees/*/* | ? { $_.Name -ne "src" } | Remove-Item -Recurse -Force -} - -# Purge any outdated packages -./vcpkg remove --outdated --recurse -if (-not $?) { throw $? } - -./vcpkg.exe install azure-storage-cpp cpprestsdk:x64-windows-static cpprestsdk:x86-uwp ` -bond cryptopp zlib expat sdl2 curl sqlite3 libuv protobuf:x64-windows sfml opencv:x64-windows uwebsockets uwebsockets:x64-windows-static ` -opencv:x86-uwp boost:x86-uwp --keep-going "--x-xunit=TEST-internal-ci.xml" --recurse -if (-not $?) { throw $? } diff --git a/scripts/ports.cmake b/scripts/ports.cmake index ef06a4d6539..7a5f2749f35 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -37,7 +37,7 @@ if(CMD MATCHES "^BUILD$") message(FATAL_ERROR "Unsupported target triplet. Triplet file does not exist: ${CMAKE_TRIPLET_FILE}") endif() - if(NOT DEFINED CURRENT_PORT_DIR) + if(NOT DEFINED CURRENT_PORT_DIR) message(FATAL_ERROR "CURRENT_PORT_DIR was not defined") endif() set(TO_CMAKE_PATH "${CURRENT_PORT_DIR}" CURRENT_PORT_DIR) @@ -51,19 +51,18 @@ if(CMD MATCHES "^BUILD$") message(FATAL_ERROR "Port is missing control file: ${CURRENT_PORT_DIR}/CONTROL") endif() - message(STATUS "CURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR}") - message(STATUS "DOWNLOADS=${DOWNLOADS}") - - message(STATUS "CURRENT_PACKAGES_DIR=${CURRENT_PACKAGES_DIR}") - message(STATUS "CURRENT_BUILDTREES_DIR=${CURRENT_BUILDTREES_DIR}") - message(STATUS "CURRENT_PORT_DIR=${CURRENT_PORT_DIR}") - unset(PACKAGES_DIR) unset(BUILDTREES_DIR) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}) if(EXISTS ${CURRENT_PACKAGES_DIR}) - message(FATAL_ERROR "Unable to remove directory: ${CURRENT_PACKAGES_DIR}\n Files are likely in use.") + file(GLOB FILES_IN_CURRENT_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}/*") + if(FILES_IN_CURRENT_PACKAGES_DIR) + file(REMOVE_RECURSE ${FILES_IN_CURRENT_PACKAGES_DIR}) + file(GLOB FILES_IN_CURRENT_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}/*") + if(FILES_IN_CURRENT_PACKAGES_DIR) + message(FATAL_ERROR "Unable to empty directory: ${CURRENT_PACKAGES_DIR}\n Files are likely in use.") + endif() + endif() endif() file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR} ${CURRENT_PACKAGES_DIR}) diff --git a/scripts/templates/portfile.in.cmake b/scripts/templates/portfile.in.cmake index e89ad464059..e44f53aa885 100644 --- a/scripts/templates/portfile.in.cmake +++ b/scripts/templates/portfile.in.cmake @@ -31,3 +31,6 @@ vcpkg_install_cmake() # Handle copyright # file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/@PORT@ RENAME copyright) + +# Post-build test for cmake libraries +# vcpkg_test_cmake(PACKAGE_NAME @PORT@) diff --git a/scripts/toolchains/android.cmake b/scripts/toolchains/android.cmake index 2a37e4c39e5..893463056f9 100644 --- a/scripts/toolchains/android.cmake +++ b/scripts/toolchains/android.cmake @@ -6,8 +6,30 @@ set(ANDROID_TOOLCHAIN clang CACHE STRING "") set(ANDROID_NATIVE_API_LEVEL 21 CACHE STRING "") set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang CACHE STRING "") -if(NOT EXISTS "$ENV{ProgramData}/Microsoft/AndroidNDK64/android-ndk-r13b/build/cmake/android.toolchain.cmake") - message(FATAL_ERROR "Could not find android ndk. Searched at $ENV{ProgramData}/Microsoft/AndroidNDK64/android-ndk-r13b") +if(DEFINED ENV{ANDROID_NDK_HOME}) + set(ANDROID_NDK_HOME $ENV{ANDROID_NDK_HOME}) +else() + set(ANDROID_NDK_HOME "$ENV{ProgramData}/Microsoft/AndroidNDK64/android-ndk-r13b/") endif() -include("$ENV{ProgramData}/Microsoft/AndroidNDK64/android-ndk-r13b/build/cmake/android.toolchain.cmake") +if(NOT EXISTS "${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake") + message(FATAL_ERROR "Could not find android ndk. Searched at ${ANDROID_NDK_HOME}") +endif() + +include("${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake") + +if(NOT _VCPKG_ANDROID_TOOLCHAIN) +set(_VCPKG_ANDROID_TOOLCHAIN 1) +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) +if(NOT _CMAKE_IN_TRY_COMPILE) + string(APPEND CMAKE_C_FLAGS_INIT " -fPIC ${VCPKG_C_FLAGS} ") + string(APPEND CMAKE_CXX_FLAGS_INIT " -fPIC ${VCPKG_CXX_FLAGS} ") + string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " ${VCPKG_C_FLAGS_DEBUG} ") + string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " ${VCPKG_CXX_FLAGS_DEBUG} ") + string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " ${VCPKG_C_FLAGS_RELEASE} ") + string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " ${VCPKG_CXX_FLAGS_RELEASE} ") + + string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") +endif() +endif() diff --git a/scripts/toolchains/freebsd.cmake b/scripts/toolchains/freebsd.cmake index bfeabe18b0c..b6bf5a4791c 100644 --- a/scripts/toolchains/freebsd.cmake +++ b/scripts/toolchains/freebsd.cmake @@ -1,4 +1,20 @@ +if(NOT _VCPKG_FREEBSD_TOOLCHAIN) +set(_VCPKG_FREEBSD_TOOLCHAIN 1) if(CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD") set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "") endif() set(CMAKE_SYSTEM_NAME FreeBSD CACHE STRING "") + +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) +if(NOT _CMAKE_IN_TRY_COMPILE) + string(APPEND CMAKE_C_FLAGS_INIT " -fPIC ${VCPKG_C_FLAGS} ") + string(APPEND CMAKE_CXX_FLAGS_INIT " -fPIC ${VCPKG_CXX_FLAGS} ") + string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " ${VCPKG_C_FLAGS_DEBUG} ") + string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " ${VCPKG_CXX_FLAGS_DEBUG} ") + string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " ${VCPKG_C_FLAGS_RELEASE} ") + string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " ${VCPKG_CXX_FLAGS_RELEASE} ") + + string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") +endif() +endif() diff --git a/scripts/toolchains/linux.cmake b/scripts/toolchains/linux.cmake index ea4f15d60b5..6bfb57621e3 100644 --- a/scripts/toolchains/linux.cmake +++ b/scripts/toolchains/linux.cmake @@ -1,4 +1,20 @@ +if(NOT _VCPKG_LINUX_TOOLCHAIN) +set(_VCPKG_LINUX_TOOLCHAIN 1) if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "") endif() set(CMAKE_SYSTEM_NAME Linux CACHE STRING "") + +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) +if(NOT _CMAKE_IN_TRY_COMPILE) + string(APPEND CMAKE_C_FLAGS_INIT " -fPIC ${VCPKG_C_FLAGS} ") + string(APPEND CMAKE_CXX_FLAGS_INIT " -fPIC ${VCPKG_CXX_FLAGS} ") + string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " ${VCPKG_C_FLAGS_DEBUG} ") + string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " ${VCPKG_CXX_FLAGS_DEBUG} ") + string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " ${VCPKG_C_FLAGS_RELEASE} ") + string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " ${VCPKG_CXX_FLAGS_RELEASE} ") + + string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") +endif() +endif() diff --git a/scripts/toolchains/osx.cmake b/scripts/toolchains/osx.cmake index dd21f5264ba..7f6487c4091 100644 --- a/scripts/toolchains/osx.cmake +++ b/scripts/toolchains/osx.cmake @@ -1,4 +1,28 @@ +if(NOT _VCPKG_OSX_TOOLCHAIN) +set(_VCPKG_OSX_TOOLCHAIN 1) if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "") + + set(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}" CACHE STRING "") + set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}" CACHE STRING "") +else() + set(CMAKE_SYSTEM_VERSION "17.0.0" CACHE STRING "") + set(CMAKE_SYSTEM_PROCESSOR "x86_64" CACHE STRING "") endif() set(CMAKE_SYSTEM_NAME Darwin CACHE STRING "") + +set(CMAKE_MACOSX_RPATH ON CACHE BOOL "") + +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) +if(NOT _CMAKE_IN_TRY_COMPILE) + string(APPEND CMAKE_C_FLAGS_INIT " -fPIC ${VCPKG_C_FLAGS} ") + string(APPEND CMAKE_CXX_FLAGS_INIT " -fPIC ${VCPKG_CXX_FLAGS} ") + string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " ${VCPKG_C_FLAGS_DEBUG} ") + string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " ${VCPKG_CXX_FLAGS_DEBUG} ") + string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " ${VCPKG_C_FLAGS_RELEASE} ") + string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " ${VCPKG_CXX_FLAGS_RELEASE} ") + + string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") +endif() +endif() diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 1a2abae81bc..650e46b0300 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -1,32 +1,44 @@ - 3.10.2 - cmake-3.10.2-win32-x86\bin\cmake.exe - https://cmake.org/files/v3.10/cmake-3.10.2-win32-x86.zip - 9c16861a2ac09c7011b84f38459ecfec2829a9f825b254acbbde46d98f12f8ca0d4db3a6764758cb671507ee7c0327576d87658b81d7ddf1e8280b37569eb16d - cmake-3.10.2-win32-x86.zip + 3.12.4 + cmake-3.12.4-win32-x86\bin\cmake.exe + https://github.com/Kitware/CMake/releases/download/v3.12.4/cmake-3.12.4-win32-x86.zip + ca7097c5917101c39d5fa5325cd256ad3aa616a7e5811915cb2869c24961dc133726015b3576908fbd0666f89c8e31886bed9cf6b532a3fe44681d5245bc25c7 + cmake-3.12.4-win32-x86.zip - 3.10.2 - cmake-3.10.2-Darwin-x86_64/CMake.app/Contents/bin/cmake - https://cmake.org/files/v3.10/cmake-3.10.2-Darwin-x86_64.tar.gz - cb7d76e11c892eb786da5804282c4141564390c3552e08c506c7abb93015eb5f619c55255459872b219399ce8114ac321fe92df7f82a7e42bbc874eec240571e - cmake-3.10.2-Darwin-x86_64.tar.gz + 3.12.4 + cmake-3.12.4-Darwin-x86_64/CMake.app/Contents/bin/cmake + https://github.com/Kitware/CMake/releases/download/v3.12.4/cmake-3.12.4-Darwin-x86_64.tar.gz + 67ce23394d9679818ab0f2792f5d585c8c6f385e18584d488a47d48b768d1ee20b58247d22945aeff1ff9f84b7e843457dac98a50801ac3068ab1fbcbe0b0f45 + cmake-3.12.4-Darwin-x86_64.tar.gz - 3.10.2 - cmake-3.10.2-Linux-x86_64/bin/cmake - https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz - 54389b5cb3f3cb9d182d35e0b1eaf7b301695899930da0d26e9df1dc25056213a077646d23ea609a93daa81d30687757d9cf0dc263339fa3d73dbeb1284bc1a9 - cmake-3.10.2-Linux-x86_64.tar.gz + 3.12.4 + cmake-3.12.4-Linux-x86_64/bin/cmake + https://github.com/Kitware/CMake/releases/download/v3.12.4/cmake-3.12.4-Linux-x86_64.tar.gz + ee9eded0c72e06ef99554f09553d40842478700ca6f07319c28247f1d45301708c703c65ad617cf618833257bacc3b9f63a54b32288bfb619d38758669dcd20f + cmake-3.12.4-Linux-x86_64.tar.gz - 2.17.0 + 2.19.1 cmd\git.exe - https://github.com/git-for-windows/git/releases/download/v2.17.0.windows.1/MinGit-2.17.0-32-bit.zip - a34575ab1b4f553e62535e38492904b512df4d6a837cf4abf205dbcdd05edf1eef450cc5b15a4f63f901424d5f3cd1f78b6b22437d0d4f8cd9ce4e42e82617b9 - MinGit-2.17.0-32-bit.zip + https://github.com/git-for-windows/git/releases/download/v2.19.1.windows.1/MinGit-2.19.1-32-bit.zip + 8a6d2caae2cbaacee073a641cda21465a749325c0af620dabd0e5521c84c92c8d747caa468b111d2ec52b99aee2ee3e6ec41a0a07a8fff582f4c8da568ea329e + MinGit-2.19.1-32-bit.zip + + + 2.7.4 + + + + + + 2.7.4 + + + 2.4.1 @@ -48,18 +60,11 @@ QtInstallerFramework-win-x86.zip - 18.01.0 - 7za.exe - https://www.7-zip.org/a/7z1801-extra.7z - 9133fc551d76515e37fdd4dd8c1e28d464aea493548246b44565a42bba46715764f41f9cfa14d470d298c3a6e9829d200f8be5168cb67cf8f23d8042fca833bc - 7z1801-extra.7z - - - 9.20.0 - 7za.exe - https://www.7-zip.org/a/7za920.zip - 84e830c91a0e8ae499cc4814080da6569d8a6acbddc585c8b62abc86c809793aeb669b0a741063a379fd281ade85f120bc27efeb67d63bf961be893eec8bc3b3 - 7za920.zip + 18.1.0 + 7-Zip.CommandLine.18.1.0\tools\7za.exe + https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 + 8c75314102e68d2b2347d592f8e3eb05812e1ebb525decbac472231633753f1d4ca31c8e6881a36144a8da26b2571305b3ae3f4e2b85fc4a290aeda63d1a13b8 + 7-zip.commandline.18.1.0.nupkg 18.01.0 @@ -68,18 +73,25 @@ 2456176ba3d506a07cf0cc4f61f080e1ff8cb4106426d66f354c5bb67a9a8720b5ddb26904275e61b1f623c932355f7dcde4cd17556cc895f11293c23c3a9bf3 aria2-1.33.1-win-32bit-build1.zip + + 1.8.2 + ninja.exe + https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip + 9b9ce248240665fcd6404b989f3b3c27ed9682838225e6dc9b67b551774f251e4ff8a207504f941e7c811e7a8be1945e7bcb94472a335ef15e23a0200a32e6d5 + ninja-win-1.8.2.zip + 1.8.2 ninja https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip 38fcb68e745c1f15b4b50f20069ffe686b1ef5baf93b74958e132ea5d30d155cf6970d6dc1b095aafd421ebd8bcc63acf4f64e305c496266b5182f99b815cca5 - ninja-linux.zip + ninja-linux-1.8.2.zip 1.8.2 ninja https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-mac.zip acadfb286eb7d93676629701917fa0c3c39f36daa068c169e4a098c29f97380d1ea95abfd42b04798ff118fd9dc93fdb250fcda36086bac20bc5506354214fc3 - ninja-mac.zip + ninja-mac-1.8.2.zip diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt index db756deee8d..a06cbae78e9 100644 --- a/toolsrc/CMakeLists.txt +++ b/toolsrc/CMakeLists.txt @@ -1,6 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(vcpkg C CXX) +OPTION(DEFINE_DISABLE_METRICS "Option for disabling metrics" OFF) + if(CMAKE_COMPILER_IS_GNUXX OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") set(GCC 1) elseif(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") @@ -30,8 +32,14 @@ endif() file(GLOB_RECURSE VCPKGLIB_SOURCES src/vcpkg/*.cpp) +if (DEFINE_DISABLE_METRICS) + set(DISABLE_METRICS_VALUE "1") +else() + set(DISABLE_METRICS_VALUE "0") +endif() + add_executable(vcpkg src/vcpkg.cpp ${VCPKGLIB_SOURCES}) -target_compile_definitions(vcpkg PRIVATE -DDISABLE_METRICS=0) +target_compile_definitions(vcpkg PRIVATE -DDISABLE_METRICS=${DISABLE_METRICS_VALUE}) target_include_directories(vcpkg PRIVATE include) if(GCC) @@ -40,6 +48,10 @@ elseif(CLANG) target_link_libraries(vcpkg PRIVATE c++experimental) endif() +if(WIN32) + target_link_libraries(vcpkg PRIVATE bcrypt) +endif() + set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) target_link_libraries(vcpkg PRIVATE Threads::Threads) diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index ca3fbdad8b8..ce62ec9593a 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.110" \ No newline at end of file +"2018.11.23" \ No newline at end of file diff --git a/toolsrc/dirs.proj b/toolsrc/dirs.proj index 17d9fa1b0b8..7729c989792 100644 --- a/toolsrc/dirs.proj +++ b/toolsrc/dirs.proj @@ -3,8 +3,8 @@ $(MSBuildThisFileDirectory) - + diff --git a/toolsrc/include/vcpkg/archives.h b/toolsrc/include/vcpkg/archives.h new file mode 100644 index 00000000000..2298f9e1e88 --- /dev/null +++ b/toolsrc/include/vcpkg/archives.h @@ -0,0 +1,9 @@ +#pragma once + +#include +#include + +namespace vcpkg::Archives +{ + void extract_archive(const VcpkgPaths& paths, const fs::path& archive, const fs::path& to_path); +} diff --git a/toolsrc/include/vcpkg/base/chrono.h b/toolsrc/include/vcpkg/base/chrono.h index aa764a59783..6f6e2b31773 100644 --- a/toolsrc/include/vcpkg/base/chrono.h +++ b/toolsrc/include/vcpkg/base/chrono.h @@ -52,8 +52,10 @@ namespace vcpkg::Chrono static Optional get_current_date_time(); static Optional parse(CStringView str); - constexpr CTime() noexcept : m_tm{0} {} - explicit constexpr CTime(tm t) noexcept : m_tm{t} {} + constexpr CTime() noexcept : m_tm {0} {} + explicit constexpr CTime(tm t) noexcept : m_tm {t} {} + + CTime add_hours(const int hours) const; std::string to_string() const; @@ -62,4 +64,6 @@ namespace vcpkg::Chrono private: mutable tm m_tm; }; + + tm get_current_date_time_local(); } diff --git a/toolsrc/include/vcpkg/base/downloads.h b/toolsrc/include/vcpkg/base/downloads.h new file mode 100644 index 00000000000..61c79248852 --- /dev/null +++ b/toolsrc/include/vcpkg/base/downloads.h @@ -0,0 +1,16 @@ +#pragma once + +#include + +namespace vcpkg::Downloads +{ + void verify_downloaded_file_hash(const Files::Filesystem& fs, + const std::string& url, + const fs::path& path, + const std::string& sha512); + + void download_file(Files::Filesystem& fs, + const std::string& url, + const fs::path& download_path, + const std::string& sha512); +} diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index f16805d0a5d..b07ff25b3c4 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -20,7 +20,7 @@ namespace fs inline bool is_regular_file(file_status s) { return stdfs::is_regular_file(s); } inline bool is_directory(file_status s) { return stdfs::is_directory(s); } - inline bool status_known(file_status s) { return stdfs::status_known(s); } + inline bool is_symlink(file_status s) { return stdfs::is_symlink(s); } } namespace vcpkg::Files @@ -37,6 +37,10 @@ namespace vcpkg::Files virtual void write_contents(const fs::path& file_path, const std::string& data, std::error_code& ec) = 0; virtual void rename(const fs::path& oldpath, const fs::path& newpath) = 0; virtual void rename(const fs::path& oldpath, const fs::path& newpath, std::error_code& ec) = 0; + virtual void rename_or_copy(const fs::path& oldpath, + const fs::path& newpath, + StringLiteral temp_suffix, + std::error_code& ec) = 0; virtual bool remove(const fs::path& path) = 0; virtual bool remove(const fs::path& path, std::error_code& ec) = 0; virtual std::uintmax_t remove_all(const fs::path& path, std::error_code& ec) = 0; @@ -51,15 +55,13 @@ namespace vcpkg::Files const fs::path& newpath, fs::copy_options opts, std::error_code& ec) = 0; + virtual void copy_symlink(const fs::path& oldpath, const fs::path& newpath, std::error_code& ec) = 0; virtual fs::file_status status(const fs::path& path, std::error_code& ec) const = 0; + virtual fs::file_status symlink_status(const fs::path& path, std::error_code& ec) const = 0; - inline void write_contents(const fs::path& file_path, const std::string& data) - { - std::error_code ec; - write_contents(file_path, data, ec); - Checks::check_exit( - VCPKG_LINE_INFO, !ec, "error while writing file: %s: %s", file_path.u8string(), ec.message()); - } + virtual std::vector find_from_PATH(const std::string& name) const = 0; + + void write_contents(const fs::path& file_path, const std::string& data); }; Filesystem& get_real_filesystem(); @@ -69,6 +71,4 @@ namespace vcpkg::Files bool has_invalid_chars_for_filesystem(const std::string& s); void print_paths(const std::vector& paths); - - std::vector find_from_PATH(const std::string& name); } diff --git a/toolsrc/include/vcpkg/base/hash.h b/toolsrc/include/vcpkg/base/hash.h new file mode 100644 index 00000000000..9e6f118c0ec --- /dev/null +++ b/toolsrc/include/vcpkg/base/hash.h @@ -0,0 +1,11 @@ +#pragma once + +#include + +#include + +namespace vcpkg::Hash +{ + std::string get_string_hash(const std::string& s, const std::string& hash_type); + std::string get_file_hash(const Files::Filesystem& fs, const fs::path& path, const std::string& hash_type); +} diff --git a/toolsrc/include/vcpkg/base/stringliteral.h b/toolsrc/include/vcpkg/base/stringliteral.h index c07f04cec4e..9970adc2a1a 100644 --- a/toolsrc/include/vcpkg/base/stringliteral.h +++ b/toolsrc/include/vcpkg/base/stringliteral.h @@ -7,7 +7,8 @@ namespace vcpkg struct StringLiteral { template - constexpr StringLiteral(const char (&str)[N]) : m_size(N), m_cstr(str) + constexpr StringLiteral(const char (&str)[N]) + : m_size(N - 1) /* -1 here accounts for the null byte at the end*/, m_cstr(str) { } diff --git a/toolsrc/include/vcpkg/base/stringrange.h b/toolsrc/include/vcpkg/base/stringrange.h new file mode 100644 index 00000000000..6126ec48f72 --- /dev/null +++ b/toolsrc/include/vcpkg/base/stringrange.h @@ -0,0 +1,33 @@ +#pragma once + +#include + +#include +#include + +namespace vcpkg +{ + struct StringRange + { + static std::vector find_all_enclosed(const StringRange& input, + const std::string& left_delim, + const std::string& right_delim); + + static StringRange find_exactly_one_enclosed(const StringRange& input, + const std::string& left_tag, + const std::string& right_tag); + + static Optional find_at_most_one_enclosed(const StringRange& input, + const std::string& left_tag, + const std::string& right_tag); + + StringRange() = default; + StringRange(const std::string& s); // Implicit by design + StringRange(const std::string::const_iterator begin, const std::string::const_iterator end); + + std::string::const_iterator begin; + std::string::const_iterator end; + + std::string to_string() const; + }; +} diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 4cc17bcf48b..4b39b0a2876 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include @@ -34,9 +35,11 @@ namespace vcpkg::Strings return details::format_internal(fmtstr, to_printf_arg(to_printf_arg(args))...); } +#if defined(_WIN32) std::wstring to_utf16(const CStringView& s); std::string to_utf8(const wchar_t* w); +#endif std::string escape_string(const CStringView& s, char char_to_escape, char escape_char); @@ -51,6 +54,7 @@ namespace vcpkg::Strings std::string ascii_to_uppercase(std::string s); bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern); + bool ends_with(const std::string& s, StringLiteral pattern); template std::string join(const char* delimiter, const Container& v, Transformer transformer) diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index 0d089276feb..af56e45c1cf 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -8,8 +8,6 @@ namespace vcpkg::System { - tm get_current_date_time(); - fs::path get_exe_path_of_current_process(); struct CMakeVariable @@ -25,15 +23,6 @@ namespace vcpkg::System const fs::path& cmake_script, const std::vector& pass_variables); - struct PowershellParameter - { - PowershellParameter(const CStringView varname, const char* varvalue); - PowershellParameter(const CStringView varname, const std::string& varvalue); - PowershellParameter(const CStringView varname, const fs::path& path); - - std::string s; - }; - struct ExitCodeAndOutput { int exit_code; @@ -41,19 +30,15 @@ namespace vcpkg::System }; int cmd_execute_clean(const CStringView cmd_line, - const std::unordered_map& extra_env = {}); + const std::unordered_map& extra_env = {}) noexcept; - int cmd_execute(const CStringView cmd_line); + int cmd_execute(const CStringView cmd_line) noexcept; - ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line); +#if defined(_WIN32) + void cmd_execute_no_wait(const CStringView cmd_line) noexcept; +#endif - void powershell_execute(const std::string& title, - const fs::path& script_path, - const std::vector& parameters = {}); - - std::string powershell_execute_and_capture_output(const std::string& title, - const fs::path& script_path, - const std::vector& parameters = {}); + ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line) noexcept; enum class Color { diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 7266fbbc636..65ce02b9923 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -71,18 +71,6 @@ namespace vcpkg::Util return ret; } - template - void stable_keep_if(Container& cont, Pred pred) - { - cont.erase(std::stable_partition(cont.begin(), cont.end(), pred), cont.end()); - } - - template - void unstable_keep_if(Container& cont, Pred pred) - { - cont.erase(std::partition(cont.begin(), cont.end(), pred), cont.end()); - } - template void erase_remove_if(Container& cont, Pred pred) { diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index c5e7e8d8843..f27e9d67bf1 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -64,6 +64,18 @@ namespace vcpkg::Build }; const std::string& to_string(DownloadTool tool); + enum class BinaryCaching + { + NO = 0, + YES + }; + + enum class FailOnTombstone + { + NO = 0, + YES + }; + struct BuildPackageOptions { UseHeadVersion use_head_version; @@ -71,6 +83,8 @@ namespace vcpkg::Build CleanBuildtrees clean_buildtrees; CleanPackages clean_packages; DownloadTool download_tool; + BinaryCaching binary_caching; + FailOnTombstone fail_on_tombstone; }; enum class BuildResult diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index 6d29b79600c..fd7d832b32d 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -25,17 +25,7 @@ namespace vcpkg::Commands namespace CI { - struct UnknownCIPortsResults - { - std::vector unknown; - std::map known; - }; - extern const CommandStructure COMMAND_STRUCTURE; - UnknownCIPortsResults find_unknown_ports_for_ci(const VcpkgPaths& paths, - const std::set& exclusions, - const Dependencies::PortFileProvider& provider, - const std::vector& fspecs); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); } @@ -129,18 +119,19 @@ namespace vcpkg::Commands void perform_and_exit(const VcpkgCmdArguments& args); } + namespace X_VSInstances + { + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + } + namespace Hash { - std::string get_string_hash(const std::string& s, const std::string& hash_type); - std::string get_file_hash(const VcpkgPaths& paths, const fs::path& path, const std::string& hash_type); - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } namespace Fetch { - std::vector find_toolset_instances(const VcpkgPaths& paths); - fs::path get_tool_path(const VcpkgPaths& paths, const std::string& tool); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } diff --git a/toolsrc/include/vcpkg/globalstate.h b/toolsrc/include/vcpkg/globalstate.h index bc28e3ff8dd..ae66ca355fd 100644 --- a/toolsrc/include/vcpkg/globalstate.h +++ b/toolsrc/include/vcpkg/globalstate.h @@ -18,5 +18,27 @@ namespace vcpkg static std::atomic g_init_console_cp; static std::atomic g_init_console_output_cp; + static std::atomic g_init_console_initialized; + + struct CtrlCStateMachine + { + CtrlCStateMachine(); + + void transition_to_spawn_process() noexcept; + void transition_from_spawn_process() noexcept; + void transition_handle_ctrl_c() noexcept; + + private: + enum class CtrlCState + { + normal, + blocked_on_child, + exit_requested, + }; + + std::atomic m_state; + }; + + static CtrlCStateMachine g_ctrl_c_state; }; } diff --git a/toolsrc/include/vcpkg/tools.h b/toolsrc/include/vcpkg/tools.h new file mode 100644 index 00000000000..6a096c32185 --- /dev/null +++ b/toolsrc/include/vcpkg/tools.h @@ -0,0 +1,21 @@ +#pragma once + +#include + +#include +#include + +namespace vcpkg +{ + struct VcpkgPaths; + + struct ToolCache + { + virtual ~ToolCache() {} + + virtual const fs::path& get_tool_path(const VcpkgPaths& paths, const std::string& tool) const = 0; + virtual const std::string& get_tool_version(const VcpkgPaths& paths, const std::string& tool) const = 0; + }; + + std::unique_ptr get_tool_cache(); +} diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index 9c8f2911a15..42de40d9c09 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -2,6 +2,7 @@ #include #include +#include #include #include @@ -66,6 +67,7 @@ namespace vcpkg fs::path triplets; fs::path scripts; + fs::path tools; fs::path buildsystems; fs::path buildsystems_msbuild_targets; @@ -77,6 +79,7 @@ namespace vcpkg fs::path ports_cmake; const fs::path& get_tool_exe(const std::string& tool) const; + const std::string& get_tool_version(const std::string& tool) const; /// Retrieve a toolset matching a VS version /// @@ -88,10 +91,11 @@ namespace vcpkg private: Lazy> available_triplets; - Cache tool_paths; Lazy> toolsets; Lazy> toolsets_vs2013; fs::path default_vs_path; + + mutable std::unique_ptr m_tool_cache; }; } diff --git a/toolsrc/include/vcpkg/visualstudio.h b/toolsrc/include/vcpkg/visualstudio.h new file mode 100644 index 00000000000..cd99db35278 --- /dev/null +++ b/toolsrc/include/vcpkg/visualstudio.h @@ -0,0 +1,14 @@ +#pragma once + +#if defined(_WIN32) + +#include + +namespace vcpkg::VisualStudio +{ + std::vector get_visual_studio_instances(const VcpkgPaths& paths); + + std::vector find_toolset_instances_preferred_first(const VcpkgPaths& paths); +} + +#endif diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 06c99e9a81b..3589881a7c7 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -33,6 +33,12 @@ using namespace vcpkg; +// 24 hours/day * 30 days/month * 6 months +static constexpr int SURVEY_INTERVAL_IN_HOURS = 24 * 30 * 6; + +// Initial survey appears after 10 days. Therefore, subtract 24 hours/day * 10 days +static constexpr int SURVEY_INITIAL_OFFSET_IN_HOURS = SURVEY_INTERVAL_IN_HOURS - 24 * 10; + void invalid_command(const std::string& cmd) { System::println(System::Color::error, "invalid command: %s", cmd); @@ -70,7 +76,7 @@ static void inner(const VcpkgCmdArguments& args) fs::path vcpkg_root_dir; if (args.vcpkg_root_dir != nullptr) { - vcpkg_root_dir = fs::stdfs::absolute(Strings::to_utf16(*args.vcpkg_root_dir)); + vcpkg_root_dir = fs::stdfs::absolute(fs::u8path(*args.vcpkg_root_dir)); } else { @@ -94,6 +100,8 @@ static void inner(const VcpkgCmdArguments& args) Checks::check_exit(VCPKG_LINE_INFO, !vcpkg_root_dir.empty(), "Error: Could not detect vcpkg-root."); + Debug::println("Using vcpkg-root: %s", vcpkg_root_dir.u8string()); + auto default_vs_path = System::get_environment_variable("VCPKG_DEFAULT_VS_PATH").value_or(""); const Expected expected_paths = VcpkgPaths::create(vcpkg_root_dir, default_vs_path); @@ -102,7 +110,7 @@ static void inner(const VcpkgCmdArguments& args) "Error: Invalid vcpkg root directory %s: %s", vcpkg_root_dir.string(), expected_paths.error().message()); - const VcpkgPaths paths = expected_paths.value_or_exit(VCPKG_LINE_INFO); + const VcpkgPaths& paths = expected_paths.value_or_exit(VCPKG_LINE_INFO); #if defined(_WIN32) const int exit_code = _wchdir(paths.root.c_str()); @@ -111,19 +119,19 @@ static void inner(const VcpkgCmdArguments& args) #endif Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Changing the working dir failed"); - if (args.command != "autocomplete") + if (args.command == "install" || args.command == "remove" || args.command == "export" || args.command == "update") { Commands::Version::warn_if_vcpkg_version_mismatch(paths); std::string surveydate = *GlobalState::g_surveydate.lock(); auto maybe_surveydate = Chrono::CTime::parse(surveydate); if (auto p_surveydate = maybe_surveydate.get()) { - auto delta = std::chrono::system_clock::now() - p_surveydate->to_time_point(); - // 24 hours/day * 30 days/month - if (std::chrono::duration_cast(delta).count() > 24 * 30) + const auto now = Chrono::CTime::get_current_date_time().value_or_exit(VCPKG_LINE_INFO); + const auto delta = now.to_time_point() - p_surveydate->to_time_point(); + if (std::chrono::duration_cast(delta).count() > SURVEY_INTERVAL_IN_HOURS) { std::default_random_engine generator( - static_cast(std::chrono::system_clock::now().time_since_epoch().count())); + static_cast(now.to_time_point().time_since_epoch().count())); std::uniform_int_distribution distribution(1, 4); if (distribution(generator) == 1) @@ -212,7 +220,9 @@ static void load_config() if (config.last_completed_survey.empty()) { - config.last_completed_survey = config.user_time; + const auto now = Chrono::CTime::parse(config.user_time).value_or_exit(VCPKG_LINE_INFO); + const Chrono::CTime offset = now.add_hours(-SURVEY_INITIAL_OFFSET_IN_HOURS); + config.last_completed_survey = offset.to_string(); } GlobalState::g_surveydate.lock()->assign(config.last_completed_survey); @@ -259,6 +269,7 @@ int main(const int argc, const char* const* const argv) #if defined(_WIN32) GlobalState::g_init_console_cp = GetConsoleCP(); GlobalState::g_init_console_output_cp = GetConsoleOutputCP(); + GlobalState::g_init_console_initialized = true; SetConsoleCP(CP_UTF8); SetConsoleOutputCP(CP_UTF8); @@ -273,6 +284,9 @@ int main(const int argc, const char* const* const argv) locked_metrics->track_property("cmdline", trimmed_command_line); #endif } + + Checks::register_console_ctrl_handler(); + load_config(); const auto vcpkg_feature_flags_env = System::get_environment_variable("VCPKG_FEATURE_FLAGS"); @@ -291,8 +305,6 @@ int main(const int argc, const char* const* const argv) 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 (GlobalState::debugging) { inner(args); diff --git a/toolsrc/src/vcpkg/archives.cpp b/toolsrc/src/vcpkg/archives.cpp new file mode 100644 index 00000000000..8943893d620 --- /dev/null +++ b/toolsrc/src/vcpkg/archives.cpp @@ -0,0 +1,106 @@ +#include "pch.h" + +#include +#include + +namespace vcpkg::Archives +{ + void extract_archive(const VcpkgPaths& paths, const fs::path& archive, const fs::path& to_path) + { + Files::Filesystem& fs = paths.get_filesystem(); + const fs::path to_path_partial = to_path.u8string() + ".partial"; + + std::error_code ec; + fs.remove_all(to_path, ec); + fs.remove_all(to_path_partial, ec); + fs.create_directories(to_path_partial, ec); + const auto ext = archive.extension(); +#if defined(_WIN32) + if (ext == ".nupkg") + { + static bool recursion_limiter_sevenzip_old = false; + Checks::check_exit(VCPKG_LINE_INFO, !recursion_limiter_sevenzip_old); + recursion_limiter_sevenzip_old = true; + const auto nuget_exe = paths.get_tool_exe(Tools::NUGET); + + const std::string stem = archive.stem().u8string(); + // assuming format of [name].[version in the form d.d.d] + // This assumption may not always hold + std::smatch match; + const bool has_match = std::regex_match(stem, match, std::regex{R"###(^(.+)\.(\d+\.\d+\.\d+)$)###"}); + Checks::check_exit(VCPKG_LINE_INFO, + has_match, + "Could not deduce nuget id and version from filename: %s", + archive.u8string()); + + const std::string nugetid = match[1]; + const std::string version = match[2]; + + const auto code_and_output = System::cmd_execute_and_capture_output(Strings::format( + R"("%s" install %s -Version %s -OutputDirectory "%s" -Source "%s" -nocache -DirectDownload -NonInteractive -ForceEnglishOutput -PackageSaveMode nuspec)", + nuget_exe.u8string(), + nugetid, + version, + to_path_partial.u8string(), + paths.downloads.u8string())); + + Checks::check_exit(VCPKG_LINE_INFO, + code_and_output.exit_code == 0, + "Failed to extract '%s' with message:\n%s", + archive.u8string(), + code_and_output.output); + recursion_limiter_sevenzip_old = false; + } + else + { + static bool recursion_limiter_sevenzip = false; + Checks::check_exit(VCPKG_LINE_INFO, !recursion_limiter_sevenzip); + recursion_limiter_sevenzip = true; + const auto seven_zip = paths.get_tool_exe(Tools::SEVEN_ZIP); + const auto code_and_output = System::cmd_execute_and_capture_output(Strings::format( + R"("%s" x "%s" -o"%s" -y)", seven_zip.u8string(), archive.u8string(), to_path_partial.u8string())); + Checks::check_exit(VCPKG_LINE_INFO, + code_and_output.exit_code == 0, + "7zip failed while extracting '%s' with message:\n%s", + archive.u8string(), + code_and_output.output); + recursion_limiter_sevenzip = false; + } +#else + if (ext == ".gz" && ext.extension() != ".tar") + { + const auto code = System::cmd_execute( + Strings::format(R"(cd '%s' && tar xzf '%s')", to_path_partial.u8string(), archive.u8string())); + Checks::check_exit(VCPKG_LINE_INFO, code == 0, "tar failed while extracting %s", archive.u8string()); + } + else if (ext == ".zip") + { + const auto code = System::cmd_execute( + Strings::format(R"(cd '%s' && unzip -qqo '%s')", to_path_partial.u8string(), archive.u8string())); + Checks::check_exit(VCPKG_LINE_INFO, code == 0, "unzip failed while extracting %s", archive.u8string()); + } + else + { + Checks::exit_with_message(VCPKG_LINE_INFO, "Unexpected archive extension: %s", ext.u8string()); + } +#endif + + fs.rename(to_path_partial, to_path, ec); + + for (int i = 0; i < 5 && ec; i++) + { + i++; + using namespace std::chrono_literals; + std::this_thread::sleep_for(i * 100ms); + fs.rename(to_path_partial, to_path, ec); + } + + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Failed to do post-extract rename-in-place.\n" + "fs.rename(%s, %s, %s)", + to_path_partial.u8string(), + to_path.u8string(), + ec.message()); + } +} diff --git a/toolsrc/src/vcpkg/base/checks.cpp b/toolsrc/src/vcpkg/base/checks.cpp index d96cb98ffb2..cc439adfe19 100644 --- a/toolsrc/src/vcpkg/base/checks.cpp +++ b/toolsrc/src/vcpkg/base/checks.cpp @@ -14,18 +14,29 @@ namespace vcpkg::Checks if (have_entered) std::terminate(); have_entered = true; - const auto elapsed_us = GlobalState::timer.lock()->microseconds(); + const auto elapsed_us_inner = GlobalState::timer.lock()->microseconds(); + + bool debugging = GlobalState::debugging; auto metrics = Metrics::g_metrics.lock(); - metrics->track_metric("elapsed_us", elapsed_us); + metrics->track_metric("elapsed_us", elapsed_us_inner); GlobalState::debugging = false; metrics->flush(); #if defined(_WIN32) - SetConsoleCP(GlobalState::g_init_console_cp); - SetConsoleOutputCP(GlobalState::g_init_console_output_cp); + if (GlobalState::g_init_console_initialized) + { + SetConsoleCP(GlobalState::g_init_console_cp); + SetConsoleOutputCP(GlobalState::g_init_console_output_cp); + } #endif + auto elapsed_us = GlobalState::timer.lock()->microseconds(); + if (debugging) + System::println("[DEBUG] Exiting after %d us (%d us)", + static_cast(elapsed_us), + static_cast(elapsed_us_inner)); + fflush(nullptr); #if defined(_WIN32) @@ -38,12 +49,11 @@ namespace vcpkg::Checks #if defined(_WIN32) static BOOL ctrl_handler(DWORD fdw_ctrl_type) { + switch (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."); + case CTRL_C_EVENT: GlobalState::g_ctrl_c_state.transition_handle_ctrl_c(); return TRUE; + default: return FALSE; } - cleanup_and_exit(EXIT_FAILURE); } void register_console_ctrl_handler() diff --git a/toolsrc/src/vcpkg/base/chrono.cpp b/toolsrc/src/vcpkg/base/chrono.cpp index 2a76f5df0ec..405e7660564 100644 --- a/toolsrc/src/vcpkg/base/chrono.cpp +++ b/toolsrc/src/vcpkg/base/chrono.cpp @@ -5,6 +5,61 @@ namespace vcpkg::Chrono { + static std::time_t get_current_time_as_time_since_epoch() + { + using std::chrono::system_clock; + return system_clock::to_time_t(system_clock::now()); + } + + static std::time_t utc_mktime(tm* time_ptr) + { +#if defined(_WIN32) + return _mkgmtime(time_ptr); +#else + return timegm(time_ptr); +#endif + } + + static tm to_local_time(const std::time_t& t) + { + tm parts {}; +#if defined(_WIN32) + localtime_s(&parts, &t); +#else + parts = *localtime(&t); +#endif + return parts; + } + + static Optional to_utc_time(const std::time_t& t) + { + tm parts {}; +#if defined(_WIN32) + const errno_t err = gmtime_s(&parts, &t); + if (err) + { + return nullopt; + } +#else + auto null_if_failed = gmtime_r(&t, &parts); + if (null_if_failed == nullptr) + { + return nullopt; + } +#endif + return parts; + } + + static tm date_plus_hours(tm* date, const int hours) + { + using namespace std::chrono_literals; + static constexpr std::chrono::seconds SECONDS_IN_ONE_HOUR = + std::chrono::duration_cast(1h); + + const std::time_t date_in_seconds = utc_mktime(date) + (hours * SECONDS_IN_ONE_HOUR.count()); + return to_utc_time(date_in_seconds).value_or_exit(VCPKG_LINE_INFO); + } + static std::string format_time_userfriendly(const std::chrono::nanoseconds& nanos) { using std::chrono::duration_cast; @@ -63,30 +118,14 @@ namespace vcpkg::Chrono Optional CTime::get_current_date_time() { - CTime ret; - -#if defined(_WIN32) - struct _timeb timebuffer; - - _ftime_s(&timebuffer); - - const errno_t err = gmtime_s(&ret.m_tm, &timebuffer.time); - - if (err) + const std::time_t ct = get_current_time_as_time_since_epoch(); + const Optional opt = to_utc_time(ct); + if (auto p_tm = opt.get()) { - return nullopt; + return CTime {*p_tm}; } -#else - time_t now = {0}; - time(&now); - auto null_if_failed = gmtime_r(&now, &ret.m_tm); - if (null_if_failed == nullptr) - { - return nullopt; - } -#endif - return ret; + return nullopt; } Optional CTime::parse(CStringView str) @@ -111,19 +150,28 @@ namespace vcpkg::Chrono ret.m_tm.tm_year -= 1900; if (ret.m_tm.tm_mon < 1) return nullopt; ret.m_tm.tm_mon -= 1; - mktime(&ret.m_tm); + utc_mktime(&ret.m_tm); + return ret; } + CTime CTime::add_hours(const int hours) const { return CTime {date_plus_hours(&this->m_tm, hours)}; } + std::string CTime::to_string() const { - std::array date{}; + std::array date {}; strftime(&date[0], date.size(), "%Y-%m-%dT%H:%M:%S.0Z", &m_tm); return &date[0]; } std::chrono::system_clock::time_point CTime::to_time_point() const { - const time_t t = mktime(&m_tm); + const time_t t = utc_mktime(&m_tm); return std::chrono::system_clock::from_time_t(t); } + + tm get_current_date_time_local() + { + const std::time_t now_time = get_current_time_as_time_since_epoch(); + return Chrono::to_local_time(now_time); + } } diff --git a/toolsrc/src/vcpkg/base/downloads.cpp b/toolsrc/src/vcpkg/base/downloads.cpp new file mode 100644 index 00000000000..57156224475 --- /dev/null +++ b/toolsrc/src/vcpkg/base/downloads.cpp @@ -0,0 +1,183 @@ +#include "pch.h" + +#include +#include +#include + +#if defined(_WIN32) +#include +#else +#include +#endif + +namespace vcpkg::Downloads +{ +#if defined(_WIN32) + static void winhttp_download_file(Files::Filesystem& fs, + CStringView target_file_path, + CStringView hostname, + CStringView url_path) + { + // Make sure the directories are present, otherwise fopen_s fails + const auto dir = fs::path(target_file_path.c_str()).parent_path(); + std::error_code ec; + fs.create_directories(dir, ec); + Checks::check_exit(VCPKG_LINE_INFO, !ec, "Could not create directories %s", dir.u8string()); + + FILE* f = nullptr; + const errno_t err = fopen_s(&f, target_file_path.c_str(), "wb"); + Checks::check_exit(VCPKG_LINE_INFO, + !err, + "Could not download https://%s%s. Failed to open file %s. Error code was %s", + hostname, + url_path, + target_file_path, + std::to_string(err)); + + auto hSession = WinHttpOpen(L"vcpkg/1.0", + IsWindows8Point1OrGreater() ? WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY + : WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, + WINHTTP_NO_PROXY_NAME, + WINHTTP_NO_PROXY_BYPASS, + 0); + Checks::check_exit(VCPKG_LINE_INFO, hSession, "WinHttpOpen() failed: %d", GetLastError()); + + // Win7 IE Proxy fallback + if (IsWindows7OrGreater() && !IsWindows8Point1OrGreater()) { + // First check if any proxy has been found automatically + WINHTTP_PROXY_INFO proxyInfo; + DWORD proxyInfoSize = sizeof(WINHTTP_PROXY_INFO); + auto noProxyFound = + !WinHttpQueryOption(hSession, WINHTTP_OPTION_PROXY, &proxyInfo, &proxyInfoSize) + || proxyInfo.dwAccessType == WINHTTP_ACCESS_TYPE_NO_PROXY; + + // If no proxy was found automatically, use IE's proxy settings, if any + if (noProxyFound) { + WINHTTP_CURRENT_USER_IE_PROXY_CONFIG ieProxy; + if (WinHttpGetIEProxyConfigForCurrentUser(&ieProxy) && ieProxy.lpszProxy != nullptr) { + WINHTTP_PROXY_INFO proxy; + proxy.dwAccessType = WINHTTP_ACCESS_TYPE_NAMED_PROXY; + proxy.lpszProxy = ieProxy.lpszProxy; + proxy.lpszProxyBypass = ieProxy.lpszProxyBypass; + WinHttpSetOption(hSession, WINHTTP_OPTION_PROXY, &proxy, sizeof(proxy)); + } + } + } + + // Use Windows 10 defaults on Windows 7 + DWORD secure_protocols(WINHTTP_FLAG_SECURE_PROTOCOL_SSL3 | WINHTTP_FLAG_SECURE_PROTOCOL_TLS1 | + WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1 | WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2); + WinHttpSetOption(hSession, WINHTTP_OPTION_SECURE_PROTOCOLS, &secure_protocols, sizeof(secure_protocols)); + + // Specify an HTTP server. + auto hConnect = WinHttpConnect(hSession, Strings::to_utf16(hostname).c_str(), INTERNET_DEFAULT_HTTPS_PORT, 0); + Checks::check_exit(VCPKG_LINE_INFO, hConnect, "WinHttpConnect() failed: %d", GetLastError()); + + // Create an HTTP request handle. + auto hRequest = WinHttpOpenRequest(hConnect, + L"GET", + Strings::to_utf16(url_path).c_str(), + nullptr, + WINHTTP_NO_REFERER, + WINHTTP_DEFAULT_ACCEPT_TYPES, + WINHTTP_FLAG_SECURE); + Checks::check_exit(VCPKG_LINE_INFO, hRequest, "WinHttpOpenRequest() failed: %d", GetLastError()); + + // Send a request. + auto bResults = + WinHttpSendRequest(hRequest, WINHTTP_NO_ADDITIONAL_HEADERS, 0, WINHTTP_NO_REQUEST_DATA, 0, 0, 0); + Checks::check_exit(VCPKG_LINE_INFO, bResults, "WinHttpSendRequest() failed: %d", GetLastError()); + + // End the request. + bResults = WinHttpReceiveResponse(hRequest, NULL); + Checks::check_exit(VCPKG_LINE_INFO, bResults, "WinHttpReceiveResponse() failed: %d", GetLastError()); + + std::vector buf; + + size_t total_downloaded_size = 0; + DWORD dwSize = 0; + do + { + DWORD downloaded_size = 0; + bResults = WinHttpQueryDataAvailable(hRequest, &dwSize); + Checks::check_exit(VCPKG_LINE_INFO, bResults, "WinHttpQueryDataAvailable() failed: %d", GetLastError()); + + if (buf.size() < dwSize) buf.resize(dwSize * 2); + + bResults = WinHttpReadData(hRequest, (LPVOID)buf.data(), dwSize, &downloaded_size); + Checks::check_exit(VCPKG_LINE_INFO, bResults, "WinHttpReadData() failed: %d", GetLastError()); + fwrite(buf.data(), 1, downloaded_size, f); + + total_downloaded_size += downloaded_size; + } while (dwSize > 0); + + WinHttpCloseHandle(hSession); + WinHttpCloseHandle(hConnect); + WinHttpCloseHandle(hRequest); + fflush(f); + fclose(f); + } +#endif + + void verify_downloaded_file_hash(const Files::Filesystem& fs, + const std::string& url, + const fs::path& path, + const std::string& sha512) + { + std::string actual_hash = vcpkg::Hash::get_file_hash(fs, path, "SHA512"); + + // + // This is the NEW hash for 7zip + if (actual_hash == "a9dfaaafd15d98a2ac83682867ec5766720acf6e99d40d1a00d480692752603bf3f3742623f0ea85647a92374df" + "405f331afd6021c5cf36af43ee8db198129c0") + // This is the OLD hash for 7zip + actual_hash = "8c75314102e68d2b2347d592f8e3eb05812e1ebb525decbac472231633753f1d4ca31c8e6881a36144a8da26b257" + "1305b3ae3f4e2b85fc4a290aeda63d1a13b8"; + // + + Checks::check_exit(VCPKG_LINE_INFO, + sha512 == actual_hash, + "File does not have the expected hash:\n" + " url : [ %s ]\n" + " File path : [ %s ]\n" + " Expected hash : [ %s ]\n" + " Actual hash : [ %s ]\n", + url, + path.u8string(), + sha512, + actual_hash); + } + + void download_file(vcpkg::Files::Filesystem& fs, + const std::string& url, + const fs::path& download_path, + const std::string& sha512) + { + const std::string download_path_part = download_path.u8string() + ".part"; + std::error_code ec; + fs.remove(download_path, ec); + fs.remove(download_path_part, ec); +#if defined(_WIN32) + auto url_no_proto = url.substr(8); // drop https:// + auto path_begin = Util::find(url_no_proto, '/'); + std::string hostname(url_no_proto.begin(), path_begin); + std::string path(path_begin, url_no_proto.end()); + + winhttp_download_file(fs, download_path_part.c_str(), hostname, path); +#else + const auto code = System::cmd_execute( + Strings::format(R"(curl -L '%s' --create-dirs --output '%s')", url, download_path_part)); + Checks::check_exit(VCPKG_LINE_INFO, code == 0, "Could not download %s", url); +#endif + + verify_downloaded_file_hash(fs, url, download_path_part, sha512); + fs.rename(download_path_part, download_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Failed to do post-download rename-in-place.\n" + "fs.rename(%s, %s, %s)", + download_path_part, + download_path.u8string(), + ec.message()); + } +} diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index 1723b467e48..f9bce863164 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -4,10 +4,26 @@ #include #include +#if defined(__linux__) +#include +#include +#include +#include +#include +#endif + namespace vcpkg::Files { static const std::regex FILESYSTEM_INVALID_CHARACTERS_REGEX = std::regex(R"([\/:*?"<>|])"); + void Filesystem::write_contents(const fs::path& file_path, const std::string& data) + { + std::error_code ec; + write_contents(file_path, data, ec); + Checks::check_exit( + VCPKG_LINE_INFO, !ec, "error while writing file: %s: %s", file_path.u8string(), ec.message()); + } + struct RealFilesystem final : Filesystem { virtual Expected read_contents(const fs::path& file_path) const override @@ -55,17 +71,18 @@ namespace vcpkg::Files virtual fs::path find_file_recursively_up(const fs::path& starting_dir, const std::string& filename) const override { + static const fs::path UNIX_ROOT = "/"; fs::path current_dir = starting_dir; - for (; !current_dir.empty(); current_dir = current_dir.parent_path()) + for (; !current_dir.empty() && current_dir != UNIX_ROOT; current_dir = current_dir.parent_path()) { const fs::path candidate = current_dir / filename; if (exists(candidate)) { - break; + return current_dir; } } - return current_dir; + return fs::path(); } virtual std::vector get_files_recursive(const fs::path& dir) const override @@ -116,6 +133,42 @@ namespace vcpkg::Files { fs::stdfs::rename(oldpath, newpath); } + virtual void rename_or_copy(const fs::path& oldpath, + const fs::path& newpath, + StringLiteral temp_suffix, + std::error_code& ec) override + { + this->rename(oldpath, newpath, ec); +#if defined(__linux__) + if (ec) + { + auto dst = newpath; + dst.replace_filename(dst.filename() + temp_suffix.c_str()); + + int i_fd = open(oldpath.c_str(), O_RDONLY); + if (i_fd == -1) return; + + int o_fd = creat(dst.c_str(), 0664); + if (o_fd == -1) + { + close(i_fd); + return; + } + + off_t bytes = 0; + struct stat info = {0}; + fstat(i_fd, &info); + auto written_bytes = sendfile(o_fd, i_fd, &bytes, info.st_size); + close(i_fd); + close(o_fd); + if (written_bytes == -1) return; + + this->rename(dst, newpath, ec); + if (ec) return; + this->remove(oldpath, ec); + } +#endif + } virtual bool remove(const fs::path& path) override { return fs::stdfs::remove(path); } virtual bool remove(const fs::path& path, std::error_code& ec) override { return fs::stdfs::remove(path, ec); } virtual std::uintmax_t remove_all(const fs::path& path, std::error_code& ec) override @@ -163,11 +216,19 @@ namespace vcpkg::Files { return fs::stdfs::copy_file(oldpath, newpath, opts, ec); } + virtual void copy_symlink(const fs::path& oldpath, const fs::path& newpath, std::error_code& ec) + { + return fs::stdfs::copy_symlink(oldpath, newpath, ec); + } virtual fs::file_status status(const fs::path& path, std::error_code& ec) const override { return fs::stdfs::status(path, ec); } + virtual fs::file_status symlink_status(const fs::path& path, std::error_code& ec) const override + { + return fs::stdfs::symlink_status(path, ec); + } virtual void write_contents(const fs::path& file_path, const std::string& data, std::error_code& ec) override { ec.clear(); @@ -196,6 +257,40 @@ namespace vcpkg::Files } } } + + virtual std::vector find_from_PATH(const std::string& name) const override + { +#if defined(_WIN32) + static constexpr StringLiteral EXTS[] = {".cmd", ".exe", ".bat"}; + auto paths = Strings::split(System::get_environment_variable("PATH").value_or_exit(VCPKG_LINE_INFO), ";"); + + std::vector ret; + for (auto&& path : paths) + { + auto base = path + "/" + name; + for (auto&& ext : EXTS) + { + auto p = fs::u8path(base + ext.c_str()); + if (Util::find(ret, p) == ret.end() && this->exists(p)) + { + ret.push_back(p); + Debug::println("Found path: %s", p.u8string()); + } + } + } + + return ret; +#else + const std::string cmd = Strings::format("which %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); }); +#endif + } }; Filesystem& get_real_filesystem() @@ -218,20 +313,4 @@ namespace vcpkg::Files } System::println(); } - - std::vector find_from_PATH(const std::string& name) - { -#if defined(_WIN32) - const std::string cmd = Strings::format("where.exe %s", name); -#else - const std::string cmd = Strings::format("which %s", name); -#endif - auto out = System::cmd_execute_and_capture_output(cmd); - if (out.exit_code != 0) - { - return {}; - } - - return Util::fmap(Strings::split(out.output, "\n"), [](auto&& s) { return fs::path(s); }); - } } diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/base/hash.cpp similarity index 76% rename from toolsrc/src/vcpkg/commands.hash.cpp rename to toolsrc/src/vcpkg/base/hash.cpp index 1f709f87bd4..7a74371dbd5 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/base/hash.cpp @@ -4,10 +4,16 @@ #include #include #include -#include -#include -namespace vcpkg::Commands::Hash +#if defined(_WIN32) +#include + +#ifndef NT_SUCCESS +#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0) +#endif +#endif + +namespace vcpkg::Hash { static void verify_has_only_allowed_chars(const std::string& s) { @@ -18,17 +24,7 @@ namespace vcpkg::Commands::Hash " % s", s); } -} - #if defined(_WIN32) -#include - -#ifndef NT_SUCCESS -#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0) -#endif - -namespace vcpkg::Commands::Hash -{ namespace { std::string to_hex(const unsigned char* string, const size_t bytes) @@ -154,10 +150,9 @@ namespace vcpkg::Commands::Hash }; } - std::string get_file_hash(const VcpkgPaths& paths, const fs::path& path, const std::string& hash_type) + std::string get_file_hash(const Files::Filesystem& fs, const fs::path& path, const std::string& hash_type) { - Checks::check_exit( - VCPKG_LINE_INFO, paths.get_filesystem().exists(path), "File %s does not exist", path.u8string()); + Checks::check_exit(VCPKG_LINE_INFO, fs.exists(path), "File %s does not exist", path.u8string()); return BCryptHasher{hash_type}.hash_file(path); } @@ -166,11 +161,8 @@ namespace vcpkg::Commands::Hash verify_has_only_allowed_chars(s); return BCryptHasher{hash_type}.hash_string(s); } -} #else -namespace vcpkg::Commands::Hash -{ static std::string get_digest_size(const std::string& hash_type) { if (!Strings::case_insensitive_ascii_starts_with(hash_type, "SHA")) @@ -182,33 +174,45 @@ namespace vcpkg::Commands::Hash return hash_type.substr(3, hash_type.length() - 3); } - static std::string run_shasum_and_post_process(const std::string& cmd_line) + static std::string parse_shasum_output(const std::string& shasum_output) { - const auto ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, - ec_data.exit_code == 0, - "Failed to run:\n" - " %s", - cmd_line); - - std::vector split = Strings::split(ec_data.output, " "); + std::vector split = Strings::split(shasum_output, " "); Checks::check_exit(VCPKG_LINE_INFO, split.size() == 3, "Expected output of the form [hash filename\n] (3 tokens), but got\n" "[%s] (%s tokens)", - ec_data.output, + shasum_output, std::to_string(split.size())); return split[0]; } - std::string get_file_hash(const VcpkgPaths& paths, const fs::path& path, const std::string& hash_type) + std::string get_file_hash(const Files::Filesystem& fs, const fs::path& path, const std::string& hash_type) { const std::string digest_size = get_digest_size(hash_type); - Checks::check_exit( - VCPKG_LINE_INFO, paths.get_filesystem().exists(path), "File %s does not exist", path.u8string()); - const std::string cmd_line = Strings::format(R"(shasum -a %s "%s")", digest_size, path.u8string()); - return run_shasum_and_post_process(cmd_line); + Checks::check_exit(VCPKG_LINE_INFO, fs.exists(path), "File %s does not exist", path.u8string()); + + // Try hash-specific tools, like sha512sum + { + const auto ec_data = System::cmd_execute_and_capture_output( + Strings::format(R"(sha%ssum "%s")", digest_size, path.u8string())); + if (ec_data.exit_code == 0) + { + return parse_shasum_output(ec_data.output); + } + } + + // Try shasum + { + const auto ec_data = System::cmd_execute_and_capture_output( + Strings::format(R"(shasum -a %s "%s")", digest_size, path.u8string())); + if (ec_data.exit_code == 0) + { + return parse_shasum_output(ec_data.output); + } + } + + Checks::exit_with_message(VCPKG_LINE_INFO, "Could not hash file %s with %s", path.u8string(), hash_type); } std::string get_string_hash(const std::string& s, const std::string& hash_type) @@ -216,31 +220,27 @@ namespace vcpkg::Commands::Hash const std::string digest_size = get_digest_size(hash_type); verify_has_only_allowed_chars(s); - const std::string cmd_line = Strings::format(R"(echo -n "%s" | shasum -a %s)", s, digest_size); - return run_shasum_and_post_process(cmd_line); + // Try hash-specific tools, like sha512sum + { + const auto ec_data = + System::cmd_execute_and_capture_output(Strings::format(R"(echo -n "%s" | sha%ssum)", s, digest_size)); + if (ec_data.exit_code == 0) + { + return parse_shasum_output(ec_data.output); + } + } + + // Try shasum + { + const auto ec_data = System::cmd_execute_and_capture_output( + Strings::format(R"(echo -n "%s" | shasum -a %s)", s, digest_size)); + if (ec_data.exit_code == 0) + { + return parse_shasum_output(ec_data.output); + } + } + + Checks::exit_with_message(VCPKG_LINE_INFO, "Could not hash input string with %s", hash_type); } -} #endif - -namespace vcpkg::Commands::Hash -{ - const CommandStructure COMMAND_STRUCTURE = { - Strings::format("The argument should be a file path\n%s", - Help::create_example_string("hash boost_1_62_0.tar.bz2")), - 1, - 2, - {}, - nullptr, - }; - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); - - const fs::path file_to_hash = args.command_arguments[0]; - const std::string algorithm = args.command_arguments.size() == 2 ? args.command_arguments[1] : "SHA512"; - const std::string hash = get_file_hash(paths, file_to_hash, algorithm); - System::println(hash); - Checks::exit_success(VCPKG_LINE_INFO); - } } diff --git a/toolsrc/src/vcpkg/base/stringrange.cpp b/toolsrc/src/vcpkg/base/stringrange.cpp new file mode 100644 index 00000000000..f7e431c88c0 --- /dev/null +++ b/toolsrc/src/vcpkg/base/stringrange.cpp @@ -0,0 +1,79 @@ +#include "pch.h" + +#include +#include + +namespace vcpkg +{ + std::vector StringRange::find_all_enclosed(const StringRange& input, + const std::string& left_delim, + const std::string& right_delim) + { + std::string::const_iterator it_left = input.begin; + std::string::const_iterator it_right = input.begin; + + std::vector output; + + while (true) + { + it_left = std::search(it_right, input.end, left_delim.cbegin(), left_delim.cend()); + if (it_left == input.end) break; + + it_left += left_delim.length(); + + it_right = std::search(it_left, input.end, right_delim.cbegin(), right_delim.cend()); + if (it_right == input.end) break; + + output.emplace_back(it_left, it_right); + + ++it_right; + } + + return output; + } + + StringRange StringRange::find_exactly_one_enclosed(const StringRange& input, + const std::string& left_tag, + const std::string& right_tag) + { + std::vector result = find_all_enclosed(input, left_tag, right_tag); + Checks::check_exit(VCPKG_LINE_INFO, + result.size() == 1, + "Found %d sets of %s.*%s but expected exactly 1, in block:\n%s", + result.size(), + left_tag, + right_tag, + input); + return result.front(); + } + + Optional StringRange::find_at_most_one_enclosed(const StringRange& input, + const std::string& left_tag, + const std::string& right_tag) + { + std::vector result = find_all_enclosed(input, left_tag, right_tag); + Checks::check_exit(VCPKG_LINE_INFO, + result.size() <= 1, + "Found %d sets of %s.*%s but expected at most 1, in block:\n%s", + result.size(), + left_tag, + right_tag, + input); + + if (result.empty()) + { + return nullopt; + } + + return result.front(); + } + + StringRange::StringRange(const std::string& s) : begin(s.cbegin()), end(s.cend()) {} + + StringRange::StringRange(const std::string::const_iterator begin, const std::string::const_iterator end) + : begin(begin), end(end) + { + } + + std::string StringRange::to_string() const { return std::string(this->begin, this->end); } +} diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index fbc33ca4238..8d43e7af749 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -49,33 +49,29 @@ namespace vcpkg::Strings::details namespace vcpkg::Strings { +#if defined(_WIN32) std::wstring to_utf16(const CStringView& s) { -#if defined(_WIN32) std::wstring output; const size_t size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, nullptr, 0); if (size == 0) return output; output.resize(size - 1); MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, output.data(), static_cast(size) - 1); return output; -#else - Checks::unreachable(VCPKG_LINE_INFO); -#endif } +#endif +#if defined(_WIN32) std::string to_utf8(const wchar_t* w) { -#if defined(_WIN32) std::string output; const size_t size = WideCharToMultiByte(CP_UTF8, 0, w, -1, nullptr, 0, nullptr, nullptr); if (size == 0) return output; output.resize(size - 1); WideCharToMultiByte(CP_UTF8, 0, w, -1, output.data(), static_cast(size) - 1, nullptr, nullptr); return output; -#else - Checks::unreachable(VCPKG_LINE_INFO); -#endif } +#endif std::string escape_string(const CStringView& s, char char_to_escape, char escape_char) { @@ -132,6 +128,12 @@ namespace vcpkg::Strings #endif } + bool ends_with(const std::string& s, StringLiteral pattern) + { + if (s.size() < pattern.size()) return false; + return std::equal(s.end() - pattern.size(), s.end(), pattern.c_str(), pattern.c_str() + pattern.size()); + } + std::string replace_all(std::string&& s, const std::string& search, const std::string& rep) { size_t pos = 0; diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index d4210fe6d3c..9c72f8401dc 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -19,19 +19,6 @@ namespace vcpkg::System { - tm get_current_date_time() - { - using std::chrono::system_clock; - std::time_t now_time = system_clock::to_time_t(system_clock::now()); - tm parts{}; -#if defined(_WIN32) - localtime_s(&parts, &now_time); -#else - parts = *localtime(&now_time); -#endif - return parts; - } - fs::path get_exe_path_of_current_process() { #if defined(_WIN32) @@ -40,8 +27,9 @@ namespace vcpkg::System if (bytes == 0) std::abort(); return fs::path(buf, buf + bytes); #elif defined(__APPLE__) - uint32_t size = 1024 * 32; - char buf[size] = {}; + static constexpr const uint32_t buff_size = 1024 * 32; + uint32_t size = buff_size; + char buf[buff_size] = {}; bool result = _NSGetExecutablePath(buf, &size); Checks::check_exit(VCPKG_LINE_INFO, result != -1, "Could not determine current executable path."); std::unique_ptr canonicalPath(realpath(buf, NULL)); @@ -128,34 +116,9 @@ namespace vcpkg::System R"("%s" %s -P "%s")", cmake_exe.u8string(), cmd_cmake_pass_variables, cmake_script.generic_u8string()); } - PowershellParameter::PowershellParameter(const CStringView varname, const char* varvalue) - : s(Strings::format(R"(-%s '%s')", varname, varvalue)) - { - } - - PowershellParameter::PowershellParameter(const CStringView varname, const std::string& varvalue) - : PowershellParameter(varname, varvalue.c_str()) - { - } - - PowershellParameter::PowershellParameter(const CStringView varname, const fs::path& path) - : PowershellParameter(varname, path.generic_u8string()) - { - } - - static std::string make_powershell_cmd(const fs::path& script_path, - const std::vector& parameters) - { - const std::string args = Strings::join(" ", parameters, [](auto&& v) { return v.s; }); - - // TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned - return Strings::format( - R"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.u8string(), args); - } - - int cmd_execute_clean(const CStringView cmd_line, const std::unordered_map& extra_env) - { #if defined(_WIN32) + static std::wstring compute_clean_environment(const std::unordered_map& extra_env) + { static const std::string SYSTEM_ROOT = get_environment_variable("SystemRoot").value_or_exit(VCPKG_LINE_INFO); static const std::string SYSTEM_32 = SYSTEM_ROOT + R"(\system32)"; std::string new_path = Strings::format( @@ -205,11 +168,10 @@ namespace vcpkg::System L"CUDA_PATH", // Environmental variable generated automatically by CUDA after installation L"NVCUDASAMPLES_ROOT", + // Enables find_package(Vulkan) in CMake. Environmental variable generated by Vulkan SDK installer + L"VULKAN_SDK", }; - // Flush stdout before launching external process - fflush(nullptr); - std::wstring env_cstr; for (auto&& env_wstring : env_wstrings) @@ -240,14 +202,28 @@ namespace vcpkg::System env_cstr.push_back(L'\0'); } + return env_cstr; + } +#endif + +#if defined(_WIN32) + /// If non-null, an environment block to use for the new process. If null, the new + /// process will inherit the current environment. + static void windows_create_process(const CStringView cmd_line, + const wchar_t* maybe_environment, + DWORD dwCreationFlags, + PROCESS_INFORMATION* process_info) noexcept + { + Checks::check_exit(VCPKG_LINE_INFO, process_info != nullptr); + 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)); + // Flush stdout before launching external process + fflush(nullptr); - // Basically we are wrapping it in quotes + // Wrapping the command in a single set of quotes causes cmd.exe to correctly execute const std::string actual_cmd_line = Strings::format(R"###(cmd.exe /c "%s")###", cmd_line); Debug::println("CreateProcessW(%s)", actual_cmd_line); bool succeeded = TRUE == CreateProcessW(nullptr, @@ -255,40 +231,81 @@ namespace vcpkg::System nullptr, nullptr, FALSE, - IDLE_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT, - env_cstr.data(), + IDLE_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT | dwCreationFlags, + (void*)maybe_environment, nullptr, &startup_info, - &process_info); + process_info); Checks::check_exit(VCPKG_LINE_INFO, succeeded, "Process creation failed with error code: %lu", GetLastError()); + } +#endif + +#if defined(_WIN32) + void cmd_execute_no_wait(const CStringView cmd_line) noexcept + { + auto timer = Chrono::ElapsedTimer::create_started(); + + PROCESS_INFORMATION process_info; + memset(&process_info, 0, sizeof(PROCESS_INFORMATION)); + + windows_create_process(cmd_line, nullptr, DETACHED_PROCESS, &process_info); + + CloseHandle(process_info.hThread); + CloseHandle(process_info.hProcess); + + Debug::println("CreateProcessW() took %d us", static_cast(timer.microseconds())); + } +#endif + + int cmd_execute_clean(const CStringView cmd_line, + const std::unordered_map& extra_env) noexcept + { + auto timer = Chrono::ElapsedTimer::create_started(); +#if defined(_WIN32) + + PROCESS_INFORMATION process_info; + memset(&process_info, 0, sizeof(PROCESS_INFORMATION)); + + GlobalState::g_ctrl_c_state.transition_to_spawn_process(); + auto clean_env = compute_clean_environment(extra_env); + windows_create_process(cmd_line, clean_env.c_str(), NULL, &process_info); CloseHandle(process_info.hThread); const DWORD result = WaitForSingleObject(process_info.hProcess, INFINITE); + GlobalState::g_ctrl_c_state.transition_from_spawn_process(); 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); + CloseHandle(process_info.hProcess); + + Debug::println("CreateProcessW() returned %lu after %d us", exit_code, static_cast(timer.microseconds())); + return static_cast(exit_code); #else + Debug::println("system(%s)", cmd_line.c_str()); fflush(nullptr); - return system(cmd_line.c_str()); + int rc = system(cmd_line.c_str()); + Debug::println("system() returned %d after %d us", rc, static_cast(timer.microseconds())); + return rc; #endif } - int cmd_execute(const CStringView cmd_line) + int cmd_execute(const CStringView cmd_line) noexcept { // Flush stdout before launching external process fflush(nullptr); - // Basically we are wrapping it in quotes #if defined(_WIN32) + // We are wrap the command line in quotes to cause cmd.exe to correctly process it const std::string& actual_cmd_line = Strings::format(R"###("%s")###", cmd_line); Debug::println("_wsystem(%s)", actual_cmd_line); + GlobalState::g_ctrl_c_state.transition_to_spawn_process(); const int exit_code = _wsystem(Strings::to_utf16(actual_cmd_line).c_str()); + GlobalState::g_ctrl_c_state.transition_from_spawn_process(); Debug::println("_wsystem() returned %d", exit_code); #else Debug::println("_system(%s)", cmd_line); @@ -298,11 +315,8 @@ namespace vcpkg::System return exit_code; } - ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line) + ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line) noexcept { - // Flush stdout before launching external process - fflush(stdout); - auto timer = Chrono::ElapsedTimer::create_started(); #if defined(_WIN32) @@ -311,9 +325,13 @@ namespace vcpkg::System Debug::println("_wpopen(%s)", actual_cmd_line); std::wstring output; wchar_t buf[1024]; + GlobalState::g_ctrl_c_state.transition_to_spawn_process(); + // Flush stdout before launching external process + fflush(stdout); const auto pipe = _wpopen(Strings::to_utf16(actual_cmd_line).c_str(), L"r"); if (pipe == nullptr) { + GlobalState::g_ctrl_c_state.transition_from_spawn_process(); return {1, Strings::to_utf8(output.c_str())}; } while (fgetws(buf, 1024, pipe)) @@ -322,10 +340,12 @@ namespace vcpkg::System } if (!feof(pipe)) { + GlobalState::g_ctrl_c_state.transition_from_spawn_process(); return {1, Strings::to_utf8(output.c_str())}; } const auto ec = _pclose(pipe); + GlobalState::g_ctrl_c_state.transition_from_spawn_process(); // On Win7, output from powershell calls contain a utf-8 byte order mark in the utf-16 stream, so we strip it // out if it is present. 0xEF,0xBB,0xBF is the UTF-8 byte-order mark @@ -344,6 +364,8 @@ namespace vcpkg::System Debug::println("popen(%s)", actual_cmd_line); std::string output; char buf[1024]; + // Flush stdout before launching external process + fflush(stdout); const auto pipe = popen(actual_cmd_line.c_str(), "r"); if (pipe == nullptr) { @@ -366,71 +388,6 @@ namespace vcpkg::System #endif } - void powershell_execute(const std::string& title, - const fs::path& script_path, - const std::vector& parameters) - { - const std::string cmd = make_powershell_cmd(script_path, parameters); - const int rc = System::cmd_execute(cmd); - - if (rc) - { - System::println(Color::error, - "%s\n" - "Could not run:\n" - " '%s'", - title, - script_path.generic_string()); - - { - auto locked_metrics = Metrics::g_metrics.lock(); - locked_metrics->track_property("error", "powershell script failed"); - locked_metrics->track_property("title", title); - } - - Checks::exit_with_code(VCPKG_LINE_INFO, rc); - } - } - - std::string powershell_execute_and_capture_output(const std::string& title, - const fs::path& script_path, - const std::vector& parameters) - { - const std::string cmd = make_powershell_cmd(script_path, parameters); - auto rc = System::cmd_execute_and_capture_output(cmd); - - if (rc.exit_code) - { - System::println(Color::error, - "%s\n" - "Could not run:\n" - " '%s'\n" - "Error message was:\n" - " %s", - title, - script_path.generic_string(), - rc.output); - - { - auto locked_metrics = Metrics::g_metrics.lock(); - locked_metrics->track_property("error", "powershell script failed"); - locked_metrics->track_property("title", title); - } - - Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code); - } - - // Remove newline from all output. - // Powershell returns newlines when it hits the column count of the console. - // For example, this is 80 in cmd on Windows 7. If the expected output is longer than 80 lines, we get - // newlines in-between the data. - // To solve this, we design our interaction with powershell to not depend on newlines, - // and then strip all newlines here. - rc.output = Strings::replace_all(std::move(rc.output), "\n", ""); - - return rc.output; - } - void println() { putchar('\n'); } void print(const CStringView message) { fputs(message.c_str(), stdout); } @@ -446,7 +403,7 @@ namespace vcpkg::System #if defined(_WIN32) const HANDLE console_handle = GetStdHandle(STD_OUTPUT_HANDLE); - CONSOLE_SCREEN_BUFFER_INFO console_screen_buffer_info{}; + CONSOLE_SCREEN_BUFFER_INFO console_screen_buffer_info {}; GetConsoleScreenBufferInfo(console_handle, &console_screen_buffer_info); const auto original_color = console_screen_buffer_info.wAttributes; diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 7a9d35667fb..0e60fd50e21 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -3,9 +3,11 @@ #include #include #include +#include #include #include #include + #include #include #include @@ -61,11 +63,15 @@ namespace vcpkg::Build::Command spec.name()); const StatusParagraphs status_db = database_load_check(paths); - const Build::BuildPackageOptions build_package_options{Build::UseHeadVersion::NO, - Build::AllowDownloads::YES, - Build::CleanBuildtrees::NO, - Build::CleanPackages::NO, - Build::DownloadTool::BUILT_IN}; + const Build::BuildPackageOptions build_package_options{ + Build::UseHeadVersion::NO, + Build::AllowDownloads::YES, + Build::CleanBuildtrees::NO, + Build::CleanPackages::NO, + Build::DownloadTool::BUILT_IN, + GlobalState::g_binary_caching ? Build::BinaryCaching::YES : Build::BinaryCaching::NO, + Build::FailOnTombstone::NO, + }; std::set features_as_set(full_spec.features.begin(), full_spec.features.end()); features_as_set.emplace("core"); @@ -217,7 +223,12 @@ namespace vcpkg::Build if (it != toolset.supported_architectures.end()) return it->name; } - Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported toolchain combination %s", target_architecture); + Checks::exit_with_message(VCPKG_LINE_INFO, + "Unsupported toolchain combination. Target was: %s but supported ones were:\n%s", + target_architecture, + Strings::join(",", toolset.supported_architectures, [](const ToolsetArchOption& t) { + return t.name.c_str(); + })); } std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset) @@ -234,7 +245,7 @@ namespace vcpkg::Build 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::format(R"("%s" %s %s %s %s 2>&1)", + return Strings::format(R"("%s" %s %s %s %s 2>&1 name}, - {"CURRENT_PORT_DIR", config.port_dir / "/."}, + {"CURRENT_PORT_DIR", config.port_dir}, {"TARGET_TRIPLET", spec.triplet().canonical_name()}, {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, {"VCPKG_USE_HEAD_VERSION", @@ -370,9 +381,15 @@ namespace vcpkg::Build }); auto command = make_build_env_cmd(pre_build_info, toolset); - if (!command.empty()) command.append(" && "); + if (!command.empty()) + { +#ifdef _WIN32 + command.append(" & "); +#else + command.append(" && "); +#endif + } command.append(cmd_launch_cmake); - const auto timer = Chrono::ElapsedTimer::create_started(); const int return_code = System::cmd_execute_clean(command); @@ -429,7 +446,7 @@ namespace vcpkg::Build auto buildtree_files = fs.get_files_non_recursive(buildtrees_dir); for (auto&& file : buildtree_files) { - if (fs.is_directory(file) && file.filename() != "src") + if (fs.is_directory(file)) // Will only keep the logs { std::error_code ec; fs.remove_all(file, ec); @@ -445,20 +462,22 @@ namespace vcpkg::Build const PreBuildInfo& pre_build_info, Span dependency_abis) { - if (!GlobalState::g_binary_caching) return nullopt; + if (config.build_package_options.binary_caching == BinaryCaching::NO) return nullopt; auto& fs = paths.get_filesystem(); const Triplet& triplet = config.triplet; const std::string& name = config.scf.core_paragraph->name; - std::vector abi_tag_entries; + std::vector abi_tag_entries(dependency_abis.begin(), dependency_abis.end()); - abi_tag_entries.insert(abi_tag_entries.end(), dependency_abis.begin(), dependency_abis.end()); + abi_tag_entries.emplace_back(AbiEntry{"cmake", paths.get_tool_version(Tools::CMAKE)}); abi_tag_entries.emplace_back( - AbiEntry{"portfile", Commands::Hash::get_file_hash(paths, config.port_dir / "portfile.cmake", "SHA1")}); + AbiEntry{"portfile", vcpkg::Hash::get_file_hash(fs, config.port_dir / "portfile.cmake", "SHA1")}); abi_tag_entries.emplace_back( - AbiEntry{"control", Commands::Hash::get_file_hash(paths, config.port_dir / "CONTROL", "SHA1")}); + AbiEntry{"control", vcpkg::Hash::get_file_hash(fs, config.port_dir / "CONTROL", "SHA1")}); + + abi_tag_entries.emplace_back(AbiEntry{"vcpkg_fixup_cmake_targets", "1"}); abi_tag_entries.emplace_back(AbiEntry{"triplet", pre_build_info.triplet_abi_tag}); @@ -484,7 +503,7 @@ namespace vcpkg::Build } auto abi_tag_entries_missing = abi_tag_entries; - Util::stable_keep_if(abi_tag_entries_missing, [](const AbiEntry& p) { return p.value.empty(); }); + Util::erase_remove_if(abi_tag_entries_missing, [](const AbiEntry& p) { return !p.value.empty(); }); if (abi_tag_entries_missing.empty()) { @@ -493,7 +512,7 @@ namespace vcpkg::Build const auto abi_file_path = paths.buildtrees / name / (triplet.canonical_name() + ".vcpkg_abi_info.txt"); fs.write_contents(abi_file_path, full_abi_info); - return AbiTagAndFile{Commands::Hash::get_file_hash(paths, abi_file_path, "SHA1"), abi_file_path}; + return AbiTagAndFile{Hash::get_file_hash(fs, abi_file_path, "SHA1"), abi_file_path}; } System::println( @@ -520,8 +539,8 @@ namespace vcpkg::Build System::cmd_execute_clean(Strings::format( R"("%s" x "%s" -o"%s" -y >nul)", seven_zip_exe.u8string(), archive_path.u8string(), pkg_path.u8string())); #else - System::cmd_execute_clean(Strings::format( - R"(unzip -qq "%s" "-d%s")", archive_path.u8string(), pkg_path.u8string())); + System::cmd_execute_clean( + Strings::format(R"(unzip -qq "%s" "-d%s")", archive_path.u8string(), pkg_path.u8string())); #endif } @@ -537,11 +556,10 @@ namespace vcpkg::Build #if defined(_WIN32) auto&& seven_zip_exe = paths.get_tool_exe(Tools::SEVEN_ZIP); - System::cmd_execute_clean(Strings::format( - R"("%s" a "%s" "%s\*" >nul)", - seven_zip_exe.u8string(), - tmp_archive_path.u8string(), - paths.package_dir(spec).u8string())); + System::cmd_execute_clean(Strings::format(R"("%s" a "%s" "%s\*" >nul)", + seven_zip_exe.u8string(), + tmp_archive_path.u8string(), + paths.package_dir(spec).u8string())); #else System::cmd_execute_clean(Strings::format( R"(cd '%s' && zip --quiet -r '%s' *)", paths.package_dir(spec).u8string(), tmp_archive_path.u8string())); @@ -563,8 +581,8 @@ namespace vcpkg::Build Util::sort_unique_erase(dep_pspecs); // Find all features that aren't installed. This mutates required_fspecs. - Util::unstable_keep_if(required_fspecs, [&](FeatureSpec const& fspec) { - return !status_db.is_installed(fspec) && fspec.name() != name; + Util::erase_remove_if(required_fspecs, [&](FeatureSpec const& fspec) { + return status_db.is_installed(fspec) || fspec.name() == name; }); if (!required_fspecs.empty()) @@ -593,7 +611,7 @@ namespace vcpkg::Build const auto abi_tag_and_file = maybe_abi_tag_and_file.get(); - if (GlobalState::g_binary_caching && abi_tag_and_file) + if (config.build_package_options.binary_caching == BinaryCaching::YES && abi_tag_and_file) { const fs::path archives_root_dir = paths.root / "archives"; const std::string archive_name = abi_tag_and_file->tag + ".zip"; @@ -615,8 +633,16 @@ namespace vcpkg::Build if (fs.exists(archive_tombstone_path)) { - System::println("Found failure tombstone: %s", archive_tombstone_path.u8string()); - return BuildResult::BUILD_FAILED; + if (config.build_package_options.fail_on_tombstone == FailOnTombstone::YES) + { + System::println("Found failure tombstone: %s", archive_tombstone_path.u8string()); + return BuildResult::BUILD_FAILED; + } + else + { + System::println( + System::Color::warning, "Found failure tombstone: %s", archive_tombstone_path.u8string()); + } } System::println("Could not locate cached archive: %s", archive_path.u8string()); @@ -637,10 +663,14 @@ namespace vcpkg::Build compress_archive(paths, spec, tmp_archive_path); fs.create_directories(archive_path.parent_path(), ec); - fs.rename(tmp_archive_path, archive_path, ec); + fs.rename_or_copy(tmp_archive_path, archive_path, ".tmp", ec); if (ec) - System::println( - System::Color::warning, "Failed to store binary cache: %s", archive_path.u8string()); + { + System::println(System::Color::warning, + "Failed to store binary cache %s: %s", + archive_path.u8string(), + ec.message()); + } else System::println("Stored binary cache: %s", archive_path.u8string()); } @@ -769,26 +799,6 @@ namespace vcpkg::Build const fs::path ports_cmake_script_path = paths.scripts / "get_triplet_environment.cmake"; const fs::path triplet_file_path = paths.triplets / (triplet.canonical_name() + ".cmake"); - const std::string triplet_abi_tag = [&]() { - static std::map s_hash_cache; - - if (GlobalState::g_binary_caching) - { - auto it_hash = s_hash_cache.find(triplet_file_path); - if (it_hash != s_hash_cache.end()) - { - return it_hash->second; - } - auto hash = Commands::Hash::get_file_hash(paths, triplet_file_path, "SHA1"); - s_hash_cache.emplace(triplet_file_path, hash); - return hash; - } - else - { - return std::string(); - } - }(); - const auto cmd_launch_cmake = System::make_cmake_cmd(cmake_exe_path, ports_cmake_script_path, { @@ -800,7 +810,6 @@ namespace vcpkg::Build const std::vector lines = Strings::split(ec_data.output, "\n"); PreBuildInfo pre_build_info; - pre_build_info.triplet_abi_tag = triplet_abi_tag; const auto e = lines.cend(); auto cur = std::find(lines.cbegin(), e, FLAG_GUID); @@ -876,6 +885,47 @@ namespace vcpkg::Build Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown variable name %s", line); } + pre_build_info.triplet_abi_tag = [&]() { + const auto& fs = paths.get_filesystem(); + static std::map s_hash_cache; + + auto it_hash = s_hash_cache.find(triplet_file_path); + if (it_hash != s_hash_cache.end()) + { + return it_hash->second; + } + auto hash = Hash::get_file_hash(fs, triplet_file_path, "SHA1"); + + if (auto p = pre_build_info.external_toolchain_file.get()) + { + hash += "-"; + hash += Hash::get_file_hash(fs, *p, "SHA1"); + } + else if (pre_build_info.cmake_system_name == "Linux") + { + hash += "-"; + hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "linux.cmake", "SHA1"); + } + else if (pre_build_info.cmake_system_name == "Darwin") + { + hash += "-"; + hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "osx.cmake", "SHA1"); + } + else if (pre_build_info.cmake_system_name == "FreeBSD") + { + hash += "-"; + hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "freebsd.cmake", "SHA1"); + } + else if (pre_build_info.cmake_system_name == "Android") + { + hash += "-"; + hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "android.cmake", "SHA1"); + } + + s_hash_cache.emplace(triplet_file_path, hash); + return hash; + }(); + return pre_build_info; } ExtendedBuildResult::ExtendedBuildResult(BuildResult code) : code(code) {} diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index 5644044213c..3b353feec5d 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -40,26 +40,25 @@ namespace vcpkg::Commands::Autocomplete const std::string requested_command = match[1].str(); // First try public commands - std::vector public_commands = { - "install", - "search", - "remove", - "list", - "update", - "hash", - "help", - "integrate", - "export", - "edit", - "create", - "owns", - "cache", - "version", - "contact", - }; + std::vector public_commands = {"install", + "search", + "remove", + "list", + "update", + "hash", + "help", + "integrate", + "export", + "edit", + "create", + "owns", + "cache", + "version", + "contact", + "upgrade"}; - Util::unstable_keep_if(public_commands, [&](const std::string& s) { - return Strings::case_insensitive_ascii_starts_with(s, requested_command); + Util::erase_remove_if(public_commands, [&](const std::string& s) { + return !Strings::case_insensitive_ascii_starts_with(s, requested_command); }); if (!public_commands.empty()) @@ -78,8 +77,8 @@ namespace vcpkg::Commands::Autocomplete "portsdiff", }; - Util::unstable_keep_if(private_commands, [&](const std::string& s) { - return Strings::case_insensitive_ascii_starts_with(s, requested_command); + Util::erase_remove_if(private_commands, [&](const std::string& s) { + return !Strings::case_insensitive_ascii_starts_with(s, requested_command); }); output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(private_commands)); @@ -98,8 +97,8 @@ namespace vcpkg::Commands::Autocomplete } std::vector triplets = paths.get_available_triplets(); - Util::unstable_keep_if(triplets, [&](const std::string& s) { - return Strings::case_insensitive_ascii_starts_with(s, triplet_prefix); + Util::erase_remove_if(triplets, [&](const std::string& s) { + return !Strings::case_insensitive_ascii_starts_with(s, triplet_prefix); }); auto result = combine_port_with_triplets(port_name, triplets); @@ -124,6 +123,7 @@ namespace vcpkg::Commands::Autocomplete CommandEntry{"edit", R"###(^edit\s(.*\s|)(\S*)$)###", Edit::COMMAND_STRUCTURE}, CommandEntry{"remove", R"###(^remove\s(.*\s|)(\S*)$)###", Remove::COMMAND_STRUCTURE}, CommandEntry{"integrate", R"###(^integrate(\s+)(\S*)$)###", Integrate::COMMAND_STRUCTURE}, + CommandEntry{"upgrade", R"###(^upgrade(\s+)(\S*)$)###", Upgrade::COMMAND_STRUCTURE}, }; for (auto&& command : COMMANDS) @@ -150,8 +150,8 @@ namespace vcpkg::Commands::Autocomplete } } - Util::unstable_keep_if(results, [&](const std::string& s) { - return Strings::case_insensitive_ascii_starts_with(s, prefix); + Util::erase_remove_if(results, [&](const std::string& s) { + return !Strings::case_insensitive_ascii_starts_with(s, prefix); }); if (command.name == "install" && results.size() == 1 && !is_option) diff --git a/toolsrc/src/vcpkg/commands.cache.cpp b/toolsrc/src/vcpkg/commands.cache.cpp index a9d8ba03cef..464f4f9ee9f 100644 --- a/toolsrc/src/vcpkg/commands.cache.cpp +++ b/toolsrc/src/vcpkg/commands.cache.cpp @@ -61,7 +61,7 @@ namespace vcpkg::Commands::Cache for (const BinaryParagraph& binary_paragraph : binary_paragraphs) { const std::string displayname = binary_paragraph.displayname(); - if (Strings::case_insensitive_ascii_find(displayname, args.command_arguments[0]) == displayname.end()) + if (!Strings::case_insensitive_ascii_contains(displayname, args.command_arguments[0])) { continue; } diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index e2b93dc7e27..551eee27bd6 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -28,6 +28,7 @@ namespace vcpkg::Commands::CI static constexpr StringLiteral OPTION_DRY_RUN = "--dry-run"; static constexpr StringLiteral OPTION_EXCLUDE = "--exclude"; + static constexpr StringLiteral OPTION_PURGE_TOMBSTONES = "--purge-tombstones"; static constexpr StringLiteral OPTION_XUNIT = "--x-xunit"; static constexpr std::array CI_SETTINGS = {{ @@ -35,8 +36,10 @@ namespace vcpkg::Commands::CI {OPTION_XUNIT, "File to output results in XUnit format (internal)"}, }}; - static constexpr std::array CI_SWITCHES = { - {{OPTION_DRY_RUN, "Print out plan without execution"}}}; + static constexpr std::array CI_SWITCHES = {{ + {OPTION_DRY_RUN, "Print out plan without execution"}, + {OPTION_PURGE_TOMBSTONES, "Purge failure tombstones and retry building the ports"}, + }}; const CommandStructure COMMAND_STRUCTURE = { Help::create_example_string("ci x64-windows"), @@ -46,10 +49,18 @@ namespace vcpkg::Commands::CI nullptr, }; - UnknownCIPortsResults find_unknown_ports_for_ci(const VcpkgPaths& paths, - const std::set& exclusions, - const Dependencies::PortFileProvider& provider, - const std::vector& fspecs) + struct UnknownCIPortsResults + { + std::vector unknown; + std::map known; + std::map> features; + }; + + static UnknownCIPortsResults find_unknown_ports_for_ci(const VcpkgPaths& paths, + const std::set& exclusions, + const Dependencies::PortFileProvider& provider, + const std::vector& fspecs, + const bool purge_tombstones) { UnknownCIPortsResults ret; @@ -58,14 +69,19 @@ namespace vcpkg::Commands::CI std::map abi_tag_map; std::set will_fail; - const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, - Build::AllowDownloads::YES, - Build::CleanBuildtrees::YES, - Build::CleanPackages::YES}; + const Build::BuildPackageOptions install_plan_options = { + Build::UseHeadVersion::NO, + Build::AllowDownloads::YES, + Build::CleanBuildtrees::YES, + Build::CleanPackages::YES, + Build::DownloadTool::BUILT_IN, + GlobalState::g_binary_caching ? Build::BinaryCaching::YES : Build::BinaryCaching::NO, + Build::FailOnTombstone::YES, + }; vcpkg::Cache pre_build_info_cache; - auto action_plan = Dependencies::create_feature_install_plan(provider, fspecs, StatusParagraphs{}); + auto action_plan = Dependencies::create_feature_install_plan(provider, fspecs, StatusParagraphs {}); for (auto&& action : action_plan) { @@ -77,7 +93,7 @@ namespace vcpkg::Commands::CI { auto triplet = p->spec.triplet(); - const Build::BuildPackageConfig build_config{ + const Build::BuildPackageConfig build_config { *scf, triplet, paths.port_dir(p->spec), install_plan_options, p->feature_list}; auto dependency_abis = @@ -114,8 +130,17 @@ namespace vcpkg::Commands::CI auto archive_path = archives_root_dir / archive_subpath; auto archive_tombstone_path = archives_root_dir / "fail" / archive_subpath; + if (purge_tombstones) + { + std::error_code ec; + fs.remove(archive_tombstone_path, ec); // Ignore error + } + bool b_will_build = false; + ret.features.emplace(p->spec, + std::vector {p->feature_list.begin(), p->feature_list.end()}); + if (Util::Sets::contains(exclusions, p->spec.name())) { ret.known.emplace(p->spec, BuildResult::EXCLUDED); @@ -141,7 +166,7 @@ namespace vcpkg::Commands::CI } else { - ret.unknown.push_back(p->spec); + ret.unknown.push_back({p->spec, {p->feature_list.begin(), p->feature_list.end()}}); b_will_build = true; } @@ -169,7 +194,8 @@ namespace vcpkg::Commands::CI exclusions_set.insert(exclusions.begin(), exclusions.end()); } - auto is_dry_run = Util::Sets::contains(options.switches, OPTION_DRY_RUN); + const auto is_dry_run = Util::Sets::contains(options.switches, OPTION_DRY_RUN); + const auto purge_tombstones = Util::Sets::contains(options.switches, OPTION_PURGE_TOMBSTONES); std::vector triplets; for (const std::string& triplet : args.command_arguments) @@ -185,10 +211,15 @@ namespace vcpkg::Commands::CI StatusParagraphs status_db = database_load_check(paths); const auto& paths_port_file = Dependencies::PathsPortFileProvider(paths); - const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, - Build::AllowDownloads::YES, - Build::CleanBuildtrees::YES, - Build::CleanPackages::YES}; + const Build::BuildPackageOptions install_plan_options = { + Build::UseHeadVersion::NO, + Build::AllowDownloads::YES, + Build::CleanBuildtrees::YES, + Build::CleanPackages::YES, + Build::DownloadTool::BUILT_IN, + GlobalState::g_binary_caching ? Build::BinaryCaching::YES : Build::BinaryCaching::NO, + Build::FailOnTombstone::YES, + }; std::vector> all_known_results; @@ -198,25 +229,48 @@ namespace vcpkg::Commands::CI { Input::check_triplet(triplet, paths); + Dependencies::PackageGraph pgraph(paths_port_file, status_db); + std::vector specs = PackageSpec::to_package_specs(all_ports, triplet); // Install the default features for every package auto all_fspecs = Util::fmap(specs, [](auto& spec) { return FeatureSpec(spec, ""); }); - auto split_specs = find_unknown_ports_for_ci(paths, exclusions_set, paths_port_file, all_fspecs); - auto fspecs = Util::fmap(split_specs.unknown, [](auto& spec) { return FeatureSpec(spec, ""); }); + auto split_specs = + find_unknown_ports_for_ci(paths, exclusions_set, paths_port_file, all_fspecs, purge_tombstones); + auto fspecs = FullPackageSpec::to_feature_specs(split_specs.unknown); - auto action_plan = Dependencies::create_feature_install_plan(paths_port_file, fspecs, status_db); + for (auto&& fspec : fspecs) + pgraph.install(fspec); - for (auto&& action : action_plan) - { - if (auto p = action.install_action.get()) + auto action_plan = [&]() { + int iterations = 0; + do { - p->build_options = install_plan_options; - if (Util::Sets::contains(exclusions_set, p->spec.name())) + bool inconsistent = false; + auto action_plan = pgraph.serialize(); + + for (auto&& action : action_plan) { - p->plan_type = InstallPlanType::EXCLUDED; + if (auto p = action.install_action.get()) + { + p->build_options = install_plan_options; + if (Util::Sets::contains(exclusions_set, p->spec.name())) + { + p->plan_type = InstallPlanType::EXCLUDED; + } + + for (auto&& feature : split_specs.features[p->spec]) + if (p->feature_list.find(feature) == p->feature_list.end()) + { + pgraph.install({p->spec, feature}); + inconsistent = true; + } + } } - } - } + + if (!inconsistent) return action_plan; + Checks::check_exit(VCPKG_LINE_INFO, ++iterations < 100); + } while (true); + }(); if (is_dry_run) { @@ -251,7 +305,7 @@ namespace vcpkg::Commands::CI for (auto&& result : known_result) { xunit_doc += - Install::InstallSummary::xunit_result(result.first, Chrono::ElapsedTime{}, result.second); + Install::InstallSummary::xunit_result(result.first, Chrono::ElapsedTime {}, result.second); } } diff --git a/toolsrc/src/vcpkg/commands.cpp b/toolsrc/src/vcpkg/commands.cpp index 8b6ffb3d79d..db265514fff 100644 --- a/toolsrc/src/vcpkg/commands.cpp +++ b/toolsrc/src/vcpkg/commands.cpp @@ -1,5 +1,7 @@ #include "pch.h" +#include + #include #include #include @@ -43,7 +45,8 @@ namespace vcpkg::Commands {"portsdiff", &PortsDiff::perform_and_exit}, {"autocomplete", &Autocomplete::perform_and_exit}, {"hash", &Hash::perform_and_exit}, - // {"fetch", &Fetch::perform_and_exit}, + {"fetch", &Fetch::perform_and_exit}, + {"x-vsinstances", &X_VSInstances::perform_and_exit}, }; return t; } @@ -57,3 +60,47 @@ namespace vcpkg::Commands return t; } } + +namespace vcpkg::Commands::Fetch +{ + const CommandStructure COMMAND_STRUCTURE = { + Strings::format("The argument should be tool name\n%s", Help::create_example_string("fetch cmake")), + 1, + 1, + {}, + nullptr, + }; + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); + + const std::string tool = args.command_arguments[0]; + const fs::path tool_path = paths.get_tool_exe(tool); + System::println(tool_path.u8string()); + Checks::exit_success(VCPKG_LINE_INFO); + } +} + +namespace vcpkg::Commands::Hash +{ + const CommandStructure COMMAND_STRUCTURE = { + Strings::format("The argument should be a file path\n%s", + Help::create_example_string("hash boost_1_62_0.tar.bz2")), + 1, + 2, + {}, + nullptr, + }; + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); + + const fs::path file_to_hash = args.command_arguments[0]; + const std::string algorithm = args.command_arguments.size() == 2 ? args.command_arguments[1] : "SHA512"; + const std::string hash = vcpkg::Hash::get_file_hash(paths.get_filesystem(), file_to_hash, algorithm); + System::println(hash); + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/commands.dependinfo.cpp b/toolsrc/src/vcpkg/commands.dependinfo.cpp index 1ca658216ec..5f72e965b41 100644 --- a/toolsrc/src/vcpkg/commands.dependinfo.cpp +++ b/toolsrc/src/vcpkg/commands.dependinfo.cpp @@ -1,61 +1,166 @@ -#include "pch.h" - -#include -#include -#include -#include -#include -#include - -namespace vcpkg::Commands::DependInfo -{ - const CommandStructure COMMAND_STRUCTURE = { - Help::create_example_string(R"###(depend-info [pat])###"), - 0, - 1, - {}, - nullptr, - }; - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); - - std::vector> source_control_files = - Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); - - if (args.command_arguments.size() == 1) - { - const std::string filter = args.command_arguments.at(0); - - Util::erase_remove_if(source_control_files, - [&](const std::unique_ptr& source_control_file) { - const SourceParagraph& source_paragraph = *source_control_file->core_paragraph; - - if (Strings::case_insensitive_ascii_contains(source_paragraph.name, filter)) - { - return false; - } - - for (const Dependency& dependency : source_paragraph.depends) - { - if (Strings::case_insensitive_ascii_contains(dependency.name(), filter)) - { - return false; - } - } - - return true; - }); - } - - for (auto&& source_control_file : source_control_files) - { - const SourceParagraph& source_paragraph = *source_control_file->core_paragraph; - const auto s = Strings::join(", ", source_paragraph.depends, [](const Dependency& d) { return d.name(); }); - System::println("%s: %s", source_paragraph.name, s); - } - - Checks::exit_success(VCPKG_LINE_INFO); - } -} +#include "pch.h" + +#include +#include +#include +#include +#include +#include + +namespace vcpkg::Commands::DependInfo +{ + constexpr StringLiteral OPTION_DOT = "--dot"; + constexpr StringLiteral OPTION_DGML = "--dgml"; + + constexpr std::array DEPEND_SWITCHES = { { + { OPTION_DOT, "Creates graph on basis of dot" }, + { OPTION_DGML, "Creates graph on basis of dgml" }, + } }; + + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string(R"###(depend-info [pat])###"), + 0, + 1, + { DEPEND_SWITCHES,{} }, + nullptr, + }; + + std::string replace_dashes_with_underscore(const std::string& input) + { + std::string output = input; + std::replace(output.begin(), output.end(), '-', '_'); + return output; + } + + std::string create_dot_as_string( + const std::vector>& source_control_files) + { + int empty_node_count = 0; + + std::string s; + s.append("digraph G{ rankdir=LR; edge [minlen=3]; overlap=false;"); + + for (const auto& source_control_file : source_control_files) + { + const SourceParagraph& source_paragraph = *source_control_file->core_paragraph; + if (source_paragraph.depends.empty()) + { + empty_node_count++; + continue; + } + + const std::string name = replace_dashes_with_underscore(source_paragraph.name); + s.append(Strings::format("%s;", name)); + for (const Dependency& d : source_paragraph.depends) + { + const std::string dependency_name = replace_dashes_with_underscore(d.name()); + s.append(Strings::format("%s -> %s;", name, dependency_name)); + } + } + + s.append(Strings::format("empty [label=\"%d singletons...\"]; }", empty_node_count)); + return s; + } + + std::string create_dgml_as_string( + const std::vector>& source_control_files) + { + std::string s; + s.append(""); + s.append(""); + + std::string nodes, links; + for (const auto& source_control_file : source_control_files) + { + const SourceParagraph& source_paragraph = *source_control_file->core_paragraph; + const std::string name = source_paragraph.name; + nodes.append(Strings::format("", name)); + + // Iterate over dependencies. + for (const Dependency& d : source_paragraph.depends) + { + links.append(Strings::format("", name, d.name())); + } + + // Iterate over feature dependencies. + const std::vector>& feature_paragraphs = source_control_file->feature_paragraphs; + for (const auto& feature_paragraph : feature_paragraphs) + { + for (const Dependency& d : feature_paragraph->depends) + { + links.append(Strings::format("", name, d.name())); + } + } + } + + s.append(Strings::format("%s", nodes)); + + s.append(Strings::format("%s", links)); + + s.append(""); + return s; + } + + std::string create_graph_as_string( + const std::unordered_set& switches, + const std::vector>& source_control_files) + { + if (Util::Sets::contains(switches, OPTION_DOT)) + { + return create_dot_as_string(source_control_files); + } + else if (Util::Sets::contains(switches, OPTION_DGML)) + { + return create_dgml_as_string(source_control_files); + } + return ""; + } + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); + + auto source_control_files = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); + + if (args.command_arguments.size() == 1) + { + const std::string filter = args.command_arguments.at(0); + + Util::erase_remove_if(source_control_files, + [&](const std::unique_ptr& source_control_file) { + const SourceParagraph& source_paragraph = *source_control_file->core_paragraph; + + if (Strings::case_insensitive_ascii_contains(source_paragraph.name, filter)) + { + return false; + } + + for (const Dependency& dependency : source_paragraph.depends) + { + if (Strings::case_insensitive_ascii_contains(dependency.name(), filter)) + { + return false; + } + } + + return true; + }); + } + + if (!options.switches.empty()) + { + const std::string graph_as_string = create_graph_as_string(options.switches, source_control_files); + System::println(graph_as_string); + Checks::exit_success(VCPKG_LINE_INFO); + } + + for (auto&& source_control_file : source_control_files) + { + const SourceParagraph& source_paragraph = *source_control_file->core_paragraph; + const auto s = Strings::join(", ", source_paragraph.depends, [](const Dependency& d) { return d.name(); }); + System::println("%s: %s", source_paragraph.name, s); + } + + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index b6324565c0e..044ae1c47ce 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -64,21 +64,37 @@ namespace vcpkg::Commands::Edit { if (Util::Sets::contains(options.switches, OPTION_ALL)) { + const auto& fs = paths.get_filesystem(); + auto packages = fs.get_files_non_recursive(paths.packages); + return Util::fmap(ports, [&](const std::string& port_name) -> std::string { const auto portpath = paths.ports / port_name; const auto portfile = portpath / "portfile.cmake"; const auto buildtrees_current_dir = paths.buildtrees / port_name; - return Strings::format(R"###("%s" "%s" "%s")###", + const auto pattern = port_name + "_"; + + std::string package_paths; + for (auto&& package : packages) + { + if (Strings::case_insensitive_ascii_starts_with(package.filename().u8string(), pattern)) + { + package_paths.append(Strings::format(" \"%s\"", package.u8string())); + } + } + + return Strings::format(R"###("%s" "%s" "%s"%s)###", portpath.u8string(), portfile.u8string(), - buildtrees_current_dir.u8string()); + buildtrees_current_dir.u8string(), + package_paths); }); } if (Util::Sets::contains(options.switches, OPTION_BUILDTREES)) { return Util::fmap(ports, [&](const std::string& port_name) -> std::string { - return (paths.buildtrees / port_name).u8string(); + const auto buildtrees_current_dir = paths.buildtrees / port_name; + return Strings::format(R"###("%s")###", buildtrees_current_dir.u8string()); }); } @@ -91,9 +107,6 @@ namespace vcpkg::Commands::Edit void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - 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(); const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); @@ -113,6 +126,10 @@ namespace vcpkg::Commands::Edit candidate_paths.emplace_back(*editor_path); } +#ifdef _WIN32 + 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"; + const auto& program_files = System::get_program_files_platform_bitness(); if (const fs::path* pf = program_files.get()) { @@ -127,8 +144,20 @@ namespace vcpkg::Commands::Edit candidate_paths.push_back(*pf / VS_CODE); } + const auto& app_data = System::get_environment_variable("APPDATA"); + if (const auto* ad = app_data.get()) + { + const fs::path default_base = fs::path{*ad}.parent_path() / "Local" / "Programs"; + candidate_paths.push_back(default_base / VS_CODE_INSIDERS); + candidate_paths.push_back(default_base / VS_CODE); + } + const std::vector from_registry = find_from_registry(); candidate_paths.insert(candidate_paths.end(), from_registry.cbegin(), from_registry.cend()); +#elif defined(__APPLE__) + candidate_paths.push_back(fs::path{"/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/bin/code"}); + candidate_paths.push_back(fs::path{"/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code"}); +#endif const auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { return fs.exists(p); }); if (it == candidate_paths.cend()) @@ -146,6 +175,16 @@ namespace vcpkg::Commands::Edit const std::vector arguments = create_editor_arguments(paths, options, ports); const auto args_as_string = Strings::join(" ", arguments); const auto cmd_line = Strings::format(R"("%s" %s -n)", env_editor.u8string(), args_as_string); + + auto editor_exe = env_editor.filename().u8string(); + +#ifdef _WIN32 + if (editor_exe == "Code.exe" || editor_exe == "Code - Insiders.exe") + { + System::cmd_execute_no_wait(cmd_line + " --triplet x64-windows"), 0, + 1, {SWITCHES, {}}, nullptr, }; @@ -64,11 +64,12 @@ namespace vcpkg::Commands::Env if (add_python) extra_env.emplace("PYTHONPATH", (paths.installed / triplet.to_string() / "python").u8string()); if (path_vars.size() > 0) extra_env.emplace("PATH", Strings::join(";", path_vars)); - if (env_cmd.empty()) - System::cmd_execute_clean("cmd", extra_env); - else - System::cmd_execute_clean(env_cmd + " && cmd", extra_env); + std::string env_cmd_prefix = env_cmd.empty() ? "" : Strings::format("%s && ", env_cmd); + std::string env_cmd_suffix = + args.command_arguments.empty() ? "cmd" : Strings::format("cmd /c %s", args.command_arguments.at(0)); + const std::string cmd = Strings::format("%s%s", env_cmd_prefix, env_cmd_suffix); + System::cmd_execute_clean(cmd, extra_env); Checks::exit_success(VCPKG_LINE_INFO); } } diff --git a/toolsrc/src/vcpkg/commands.exportifw.cpp b/toolsrc/src/vcpkg/commands.exportifw.cpp index ae106196a00..62725a90aca 100644 --- a/toolsrc/src/vcpkg/commands.exportifw.cpp +++ b/toolsrc/src/vcpkg/commands.exportifw.cpp @@ -13,7 +13,7 @@ namespace vcpkg::Export::IFW static std::string create_release_date() { - const tm date_time = System::get_current_date_time(); + const tm date_time = Chrono::get_current_date_time_local(); // Format is: YYYY-mm-dd // 10 characters + 1 null terminating character will be written for a total of 11 chars diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp deleted file mode 100644 index 1e31e6bc41e..00000000000 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ /dev/null @@ -1,714 +0,0 @@ -#include "pch.h" - -#include -#include -#include -#include -#include -#include - -namespace vcpkg::Commands::Fetch -{ - static constexpr CStringView V_120 = "v120"; - static constexpr CStringView V_140 = "v140"; - static constexpr CStringView V_141 = "v141"; - - struct ToolData - { - std::array version; - fs::path exe_path; - std::string url; - fs::path download_path; - fs::path tool_dir_path; - std::string sha512; - }; - - static Optional> parse_version_string(const std::string& version_as_string) - { - static const std::regex RE(R"###((\d+)\.(\d+)\.(\d+))###"); - - std::match_results match; - const auto found = std::regex_search(version_as_string, match, RE); - if (!found) - { - return {}; - } - - 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()); - const std::array result = {d1, d2, d3}; - return result; - } - - static Optional extract_string_between_delimiters(const std::string& input, - const std::string& left_delim, - const std::string& right_delim, - const size_t& starting_offset = 0) - { - const size_t from = input.find(left_delim, starting_offset); - if (from == std::string::npos) return nullopt; - - const size_t substring_start = from + left_delim.length(); - - const size_t to = input.find(right_delim, substring_start); - if (from == std::string::npos) return nullopt; - - return input.substr(substring_start, to - substring_start); - } - - static ToolData parse_tool_data_from_xml(const VcpkgPaths& paths, const std::string& tool) - { -#if defined(_WIN32) - static constexpr StringLiteral OS_STRING = "windows"; -#elif defined(__APPLE__) - static constexpr StringLiteral OS_STRING = "osx"; -#elif defined(__linux__) - static constexpr StringLiteral OS_STRING = "linux"; -#else - return ToolData{}; -#endif - -#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__) - static const std::string XML_VERSION = "2"; - static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml"; - - const auto get_string_inside_tags = - [](const std::string& input, const std::string& left_delim, const std::string& right_delim) -> std::string { - Optional result = extract_string_between_delimiters(input, left_delim, right_delim); - Checks::check_exit(VCPKG_LINE_INFO, - result.has_value(), - "Could not find tag <%s>.*<%s> in %s", - left_delim, - right_delim, - XML_PATH.generic_string()); - - return *result.get(); - }; - - static const std::regex XML_VERSION_REGEX{R"###()###"}; - static const std::string XML = paths.get_filesystem().read_contents(XML_PATH).value_or_exit(VCPKG_LINE_INFO); - std::smatch match_xml_version; - const bool has_xml_version = std::regex_search(XML.cbegin(), XML.cend(), match_xml_version, XML_VERSION_REGEX); - Checks::check_exit(VCPKG_LINE_INFO, - has_xml_version, - R"(Could not find in %s)", - XML_VERSION, - XML_PATH.generic_string()); - Checks::check_exit(VCPKG_LINE_INFO, - XML_VERSION == match_xml_version[1], - "Expected %s version: [%s], but was [%s]. Please re-run bootstrap-vcpkg.", - XML_PATH.generic_string(), - XML_VERSION, - match_xml_version[1]); - - const std::regex tool_regex{Strings::format(R"###()###", tool, OS_STRING)}; - std::smatch match_tool_entry; - const bool has_tool_entry = std::regex_search(XML.cbegin(), XML.cend(), match_tool_entry, tool_regex); - Checks::check_exit(VCPKG_LINE_INFO, - has_tool_entry, - "Could not find entry for tool [%s] in %s", - tool, - XML_PATH.generic_string()); - - const std::string tool_data = get_string_inside_tags(XML, match_tool_entry[0], R"()"); - - const std::string version_as_string = get_string_inside_tags(tool_data, "", R"()"); - const std::string exe_relative_path = - get_string_inside_tags(tool_data, "", R"()"); - const std::string url = get_string_inside_tags(tool_data, "", R"()"); - const std::string sha512 = get_string_inside_tags(tool_data, "", R"()"); - auto archive_name = extract_string_between_delimiters(tool_data, "", R"()"); - - const Optional> version = parse_version_string(version_as_string); - Checks::check_exit(VCPKG_LINE_INFO, - version.has_value(), - "Could not parse version for tool %s. Version string was: %s", - tool, - version_as_string); - - const std::string tool_dir_name = Strings::format("%s-%s-%s", tool, version_as_string, OS_STRING); - const fs::path tool_dir_path = paths.downloads / "tools" / tool_dir_name; - const fs::path exe_path = tool_dir_path / exe_relative_path; - - return ToolData{*version.get(), - exe_path, - url, - paths.downloads / archive_name.value_or(exe_relative_path), - tool_dir_path, - sha512}; -#endif - } - - static bool exists_and_has_equal_or_greater_version(const std::string& version_cmd, - const std::array& expected_version) - { - const auto rc = System::cmd_execute_and_capture_output(Strings::format(R"(%s)", version_cmd)); - if (rc.exit_code != 0) - { - return false; - } - - const Optional> v = parse_version_string(rc.output); - if (!v.has_value()) - { - return false; - } - - const std::array actual_version = *v.get(); - return (actual_version[0] > expected_version[0] || - (actual_version[0] == expected_version[0] && actual_version[1] > expected_version[1]) || - (actual_version[0] == expected_version[0] && actual_version[1] == expected_version[1] && - actual_version[2] >= expected_version[2])); - } - - static Optional find_if_has_equal_or_greater_version(const std::vector& candidate_paths, - const std::string& version_check_arguments, - const std::array& expected_version) - { - auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { - const std::string cmd = Strings::format(R"("%s" %s)", p.u8string(), version_check_arguments); - return exists_and_has_equal_or_greater_version(cmd, expected_version); - }); - - if (it != candidate_paths.cend()) - { - return std::move(*it); - } - - return nullopt; - } - - static std::vector keep_data_lines(const std::string& data_blob) - { - static const std::regex DATA_LINE_REGEX(R"(::(.+?)(?=::))"); - - std::vector data_lines; - - const std::sregex_iterator it(data_blob.cbegin(), data_blob.cend(), DATA_LINE_REGEX); - const std::sregex_iterator end; - for (std::sregex_iterator i = it; i != end; ++i) - { - const std::smatch match = *i; - data_lines.push_back(match[1].str()); - } - - return data_lines; - } - -#if !defined(_WIN32) - static void extract_archive(const VcpkgPaths& paths, const fs::path& archive, const fs::path& to_path) - { - Files::Filesystem& fs = paths.get_filesystem(); - const fs::path to_path_partial = to_path.u8string() + ".partial"; - - std::error_code ec; - fs.remove_all(to_path_partial, ec); - fs.create_directories(to_path_partial, ec); - - const auto ext = archive.extension(); - if (ext == ".gz" && ext.extension() != ".tar") - { - const auto code = System::cmd_execute( - Strings::format(R"(cd '%s' && tar xzf '%s')", to_path_partial.u8string(), archive.u8string())); - Checks::check_exit(VCPKG_LINE_INFO, code == 0, "tar failed while extracting %s", archive.u8string()); - } - else if (ext == ".zip") - { - const auto code = System::cmd_execute( - Strings::format(R"(cd '%s' && unzip -qqo '%s')", to_path_partial.u8string(), archive.u8string())); - Checks::check_exit(VCPKG_LINE_INFO, code == 0, "unzip failed while extracting %s", archive.u8string()); - } - else - { - Checks::exit_with_message(VCPKG_LINE_INFO, "Unexpected archive extension: %s", ext.u8string()); - } - - fs.rename(to_path_partial, to_path); - } - - static void verify_hash(const VcpkgPaths& paths, - const std::string& url, - const fs::path& path, - const std::string& sha512) - { - const std::string actual_hash = Hash::get_file_hash(paths, path, "SHA512"); - Checks::check_exit(VCPKG_LINE_INFO, - sha512 == actual_hash, - "File does not have the expected hash:\n" - " url : [ %s ]\n" - " File path : [ %s ]\n" - " Expected hash : [ %s ]\n" - " Actual hash : [ %s ]\n", - url, - path.u8string(), - sha512, - actual_hash); - } - - static void download_file(const VcpkgPaths& paths, - const std::string& url, - const fs::path& download_path, - const std::string& sha512) - { - Files::Filesystem& fs = paths.get_filesystem(); - const std::string download_path_part = download_path.u8string() + ".part"; - std::error_code ec; - fs.remove(download_path_part, ec); - const auto code = System::cmd_execute(Strings::format( - R"(curl -L '%s' --create-dirs --output '%s')", url, download_path_part)); - Checks::check_exit(VCPKG_LINE_INFO, code == 0, "Could not download %s", url); - - verify_hash(paths, url, download_path_part, sha512); - fs.rename(download_path_part, download_path); - } - -#endif - static fs::path fetch_tool(const VcpkgPaths& paths, const std::string& tool_name, const ToolData& tool_data) - { - const std::array& version = tool_data.version; - - const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); - System::println("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...", - tool_name, - version_as_string, - tool_name, - version_as_string); -#if defined(_WIN32) - const fs::path script = paths.scripts / "fetchtool.ps1"; - const std::string title = Strings::format( - "Fetching %s version %s (No sufficient installed version was found)", tool_name, version_as_string); - const System::PowershellParameter tool_param("tool", tool_name); - const std::string output = System::powershell_execute_and_capture_output(title, script, {tool_param}); - - const std::vector tool_path = keep_data_lines(output); - Checks::check_exit(VCPKG_LINE_INFO, tool_path.size() == 1, "Expected tool path, but got %s", output); - - const fs::path actual_downloaded_path = Strings::trim(std::string{tool_path.at(0)}); - const fs::path& expected_downloaded_path = tool_data.exe_path; - std::error_code ec; - const auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec); - Checks::check_exit(VCPKG_LINE_INFO, - eq && !ec, - "Expected tool downloaded path to be %s, but was %s", - expected_downloaded_path.u8string(), - actual_downloaded_path.u8string()); - return actual_downloaded_path; -#else - const auto& fs = paths.get_filesystem(); - if (!fs.exists(tool_data.download_path)) - { - System::println("Downloading %s...", tool_name); - download_file(paths, tool_data.url, tool_data.download_path, tool_data.sha512); - System::println("Downloading %s... done.", tool_name); - } - else - { - verify_hash(paths, tool_data.url, tool_data.download_path, tool_data.sha512); - } - - System::println("Extracting %s...", tool_name); - extract_archive(paths, tool_data.download_path, tool_data.tool_dir_path); - System::println("Extracting %s... done.", tool_name); - - Checks::check_exit(VCPKG_LINE_INFO, - fs.exists(tool_data.exe_path), - "Expected %s to exist after extracting", - tool_data.exe_path); - - return tool_data.exe_path; -#endif - } - - static fs::path get_cmake_path(const VcpkgPaths& paths) - { - std::vector candidate_paths; -#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__) - static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "cmake"); - candidate_paths.push_back(TOOL_DATA.exe_path); -#else - static const ToolData TOOL_DATA = ToolData{{3, 5, 1}, ""}; -#endif - static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - - const std::vector from_path = Files::find_from_PATH("cmake"); - candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - - const auto& program_files = System::get_program_files_platform_bitness(); - if (const auto pf = program_files.get()) candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); - const auto& program_files_32_bit = System::get_program_files_32_bit(); - if (const auto pf = program_files_32_bit.get()) candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); - - const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version); - if (const auto p = path.get()) - { - return *p; - } - - return fetch_tool(paths, "cmake", TOOL_DATA); - } - - static fs::path get_7za_path(const VcpkgPaths& paths) - { -#if defined(_WIN32) - static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "7zip"); - if (!paths.get_filesystem().exists(TOOL_DATA.exe_path)) - { - return fetch_tool(paths, "7zip", TOOL_DATA); - } - return TOOL_DATA.exe_path; -#else - Checks::exit_with_message(VCPKG_LINE_INFO, "Cannot download 7zip for non-Windows platforms."); -#endif - } - - static fs::path get_ninja_path(const VcpkgPaths& paths) - { - static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "ninja"); - - std::vector candidate_paths; - candidate_paths.push_back(TOOL_DATA.exe_path); - const std::vector from_path = Files::find_from_PATH("ninja"); - candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - - auto path = find_if_has_equal_or_greater_version(candidate_paths, "--version", TOOL_DATA.version); - if (const auto p = path.get()) - { - return *p; - } - - return fetch_tool(paths, "ninja", TOOL_DATA); - } - - static fs::path get_nuget_path(const VcpkgPaths& paths) - { - static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "nuget"); - - std::vector candidate_paths; - candidate_paths.push_back(TOOL_DATA.exe_path); - const std::vector from_path = Files::find_from_PATH("nuget"); - candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - - auto path = find_if_has_equal_or_greater_version(candidate_paths, "", TOOL_DATA.version); - if (const auto p = path.get()) - { - return *p; - } - - return fetch_tool(paths, "nuget", TOOL_DATA); - } - - static fs::path get_git_path(const VcpkgPaths& paths) - { -#if defined(_WIN32) - static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "git"); -#else - static const ToolData TOOL_DATA = ToolData{{2, 7, 4}, ""}; -#endif - static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - - std::vector candidate_paths; -#if defined(_WIN32) - candidate_paths.push_back(TOOL_DATA.exe_path); -#endif - const std::vector from_path = Files::find_from_PATH("git"); - candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - - const auto& program_files = System::get_program_files_platform_bitness(); - if (const auto pf = program_files.get()) candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); - const auto& program_files_32_bit = System::get_program_files_32_bit(); - if (const auto pf = program_files_32_bit.get()) candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); - - const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version); - if (const auto p = path.get()) - { - return *p; - } - - return fetch_tool(paths, "git", TOOL_DATA); - } - - static fs::path get_ifw_installerbase_path(const VcpkgPaths& paths) - { - static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "installerbase"); - - static const std::string VERSION_CHECK_ARGUMENTS = "--framework-version"; - - std::vector candidate_paths; - candidate_paths.push_back(TOOL_DATA.exe_path); - // TODO: Uncomment later - // const std::vector from_path = Files::find_from_PATH("installerbase"); - // candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / "Qt" / - // "Tools" / "QtInstallerFramework" / "3.1" / "bin" / "installerbase.exe"); - // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / "Qt" / - // "QtIFW-3.1.0" / "bin" / "installerbase.exe"); - - const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version); - if (const auto p = path.get()) - { - return *p; - } - - return fetch_tool(paths, "installerbase", TOOL_DATA); - } - - struct VisualStudioInstance - { - fs::path root_path; - std::string version; - std::string release_type; - std::string preference_weight; // Mostly unused, just for verification that order is as intended - - std::string major_version() const { return version.substr(0, 2); } - }; - - static std::vector get_visual_studio_instances(const VcpkgPaths& paths) - { - const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; - const std::string output = - System::powershell_execute_and_capture_output("Detecting Visual Studio instances", script); - - const std::vector instances_as_strings = keep_data_lines(output); - Checks::check_exit(VCPKG_LINE_INFO, - !instances_as_strings.empty(), - "Could not detect any Visual Studio instances.\n" - "Powershell script:\n" - " %s\n" - "returned:\n" - "%s", - script.generic_string(), - output); - - std::vector instances; - for (const std::string& instance_as_string : instances_as_strings) - { - const std::vector split = Strings::split(instance_as_string, "::"); - Checks::check_exit(VCPKG_LINE_INFO, - split.size() == 4, - "Invalid Visual Studio instance format.\n" - "Expected: PreferenceWeight::ReleaseType::Version::PathToVisualStudio\n" - "Actual : %s\n", - instance_as_string); - instances.push_back({split.at(3), split.at(2), split.at(1), split.at(0)}); - } - - return instances; - } - - std::vector find_toolset_instances(const VcpkgPaths& paths) - { - using CPU = System::CPUArchitecture; - - const auto& fs = paths.get_filesystem(); - - // Note: this will contain a mix of vcvarsall.bat locations and dumpbin.exe locations. - std::vector paths_examined; - - std::vector found_toolsets; - std::vector excluded_toolsets; - - const std::vector vs_instances = get_visual_studio_instances(paths); - const bool v140_is_available = Util::find_if(vs_instances, [&](const VisualStudioInstance& vs_instance) { - return vs_instance.major_version() == "14"; - }) != vs_instances.cend(); - - for (const VisualStudioInstance& vs_instance : vs_instances) - { - const std::string major_version = vs_instance.major_version(); - if (major_version == "15") - { - const fs::path vc_dir = vs_instance.root_path / "VC"; - - // Skip any instances that do not have vcvarsall. - const fs::path vcvarsall_dir = vc_dir / "Auxiliary" / "Build"; - const fs::path vcvarsall_bat = vcvarsall_dir / "vcvarsall.bat"; - paths_examined.push_back(vcvarsall_bat); - if (!fs.exists(vcvarsall_bat)) continue; - - // Get all supported architectures - std::vector supported_architectures; - if (fs.exists(vcvarsall_dir / "vcvars32.bat")) - supported_architectures.push_back({"x86", CPU::X86, CPU::X86}); - if (fs.exists(vcvarsall_dir / "vcvars64.bat")) - supported_architectures.push_back({"amd64", CPU::X64, CPU::X64}); - if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat")) - supported_architectures.push_back({"x86_amd64", CPU::X86, CPU::X64}); - if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat")) - supported_architectures.push_back({"x86_arm", CPU::X86, CPU::ARM}); - if (fs.exists(vcvarsall_dir / "vcvarsx86_arm64.bat")) - supported_architectures.push_back({"x86_arm64", CPU::X86, CPU::ARM64}); - if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat")) - supported_architectures.push_back({"amd64_x86", CPU::X64, CPU::X86}); - if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat")) - supported_architectures.push_back({"amd64_arm", CPU::X64, CPU::ARM}); - if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm64.bat")) - supported_architectures.push_back({"amd64_arm64", CPU::X64, CPU::ARM64}); - - // Locate the "best" MSVC toolchain version - const fs::path msvc_path = vc_dir / "Tools" / "MSVC"; - std::vector msvc_subdirectories = fs.get_files_non_recursive(msvc_path); - Util::unstable_keep_if(msvc_subdirectories, - [&fs](const fs::path& path) { return fs.is_directory(path); }); - - // Sort them so that latest comes first - std::sort( - msvc_subdirectories.begin(), - msvc_subdirectories.end(), - [](const fs::path& left, const fs::path& right) { return left.filename() > right.filename(); }); - - for (const fs::path& subdir : msvc_subdirectories) - { - const fs::path dumpbin_path = subdir / "bin" / "HostX86" / "x86" / "dumpbin.exe"; - paths_examined.push_back(dumpbin_path); - if (fs.exists(dumpbin_path)) - { - const Toolset v141toolset = Toolset{ - vs_instance.root_path, dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures}; - - auto english_language_pack = dumpbin_path.parent_path() / "1033"; - - if (!fs.exists(english_language_pack)) - { - excluded_toolsets.push_back(v141toolset); - break; - } - - found_toolsets.push_back(v141toolset); - - if (v140_is_available) - { - const Toolset v140toolset = Toolset{vs_instance.root_path, - dumpbin_path, - vcvarsall_bat, - {"-vcvars_ver=14.0"}, - V_140, - supported_architectures}; - found_toolsets.push_back(v140toolset); - } - - break; - } - } - - continue; - } - - if (major_version == "14" || major_version == "12") - { - const fs::path vcvarsall_bat = vs_instance.root_path / "VC" / "vcvarsall.bat"; - - paths_examined.push_back(vcvarsall_bat); - if (fs.exists(vcvarsall_bat)) - { - const fs::path vs_dumpbin_exe = vs_instance.root_path / "VC" / "bin" / "dumpbin.exe"; - paths_examined.push_back(vs_dumpbin_exe); - - const fs::path vs_bin_dir = vcvarsall_bat.parent_path() / "bin"; - std::vector supported_architectures; - if (fs.exists(vs_bin_dir / "vcvars32.bat")) - supported_architectures.push_back({"x86", CPU::X86, CPU::X86}); - if (fs.exists(vs_bin_dir / "amd64\\vcvars64.bat")) - supported_architectures.push_back({"x64", CPU::X64, CPU::X64}); - if (fs.exists(vs_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat")) - supported_architectures.push_back({"x86_amd64", CPU::X86, CPU::X64}); - if (fs.exists(vs_bin_dir / "x86_arm\\vcvarsx86_arm.bat")) - supported_architectures.push_back({"x86_arm", CPU::X86, CPU::ARM}); - if (fs.exists(vs_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat")) - supported_architectures.push_back({"amd64_x86", CPU::X64, CPU::X86}); - if (fs.exists(vs_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat")) - supported_architectures.push_back({"amd64_arm", CPU::X64, CPU::ARM}); - - if (fs.exists(vs_dumpbin_exe)) - { - const Toolset toolset = {vs_instance.root_path, - vs_dumpbin_exe, - vcvarsall_bat, - {}, - major_version == "14" ? V_140 : V_120, - supported_architectures}; - - auto english_language_pack = vs_dumpbin_exe.parent_path() / "1033"; - - if (!fs.exists(english_language_pack)) - { - excluded_toolsets.push_back(toolset); - break; - } - - found_toolsets.push_back(toolset); - } - } - } - } - - if (!excluded_toolsets.empty()) - { - System::println( - System::Color::warning, - "Warning: The following VS instances are excluded because the English language pack is unavailable."); - for (const Toolset& toolset : excluded_toolsets) - { - System::println(" %s", toolset.visual_studio_root_path.u8string()); - } - System::println(System::Color::warning, "Please install the English language pack."); - } - - if (found_toolsets.empty()) - { - System::println(System::Color::error, "Could not locate a complete toolset."); - System::println("The following paths were examined:"); - for (const fs::path& path : paths_examined) - { - System::println(" %s", path.u8string()); - } - Checks::exit_fail(VCPKG_LINE_INFO); - } - - return found_toolsets; - } - - fs::path get_tool_path(const VcpkgPaths& paths, const std::string& tool) - { - // First deal with specially handled tools. - // For these we may look in locations like Program Files, the PATH etc as well as the auto-downloaded location. - if (tool == Tools::SEVEN_ZIP) return get_7za_path(paths); - if (tool == Tools::CMAKE) return get_cmake_path(paths); - if (tool == Tools::GIT) return get_git_path(paths); - if (tool == Tools::NINJA) return get_ninja_path(paths); - if (tool == Tools::NUGET) return get_nuget_path(paths); - if (tool == Tools::IFW_INSTALLER_BASE) return get_ifw_installerbase_path(paths); - if (tool == Tools::IFW_BINARYCREATOR) - return get_ifw_installerbase_path(paths).parent_path() / "binarycreator.exe"; - if (tool == Tools::IFW_REPOGEN) return get_ifw_installerbase_path(paths).parent_path() / "repogen.exe"; - - // For other tools, we simply always auto-download them. - const ToolData tool_data = parse_tool_data_from_xml(paths, tool); - if (paths.get_filesystem().exists(tool_data.exe_path)) - { - return tool_data.exe_path; - } - return fetch_tool(paths, tool, tool_data); - } - - const CommandStructure COMMAND_STRUCTURE = { - Strings::format("The argument should be tool name\n%s", Help::create_example_string("fetch cmake")), - 1, - 1, - {}, - nullptr, - }; - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); - - const std::string tool = args.command_arguments[0]; - const fs::path tool_path = get_tool_path(paths, tool); - System::println(tool_path.u8string()); - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 8897ea1387b..82172e36364 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include namespace vcpkg::Commands::Integrate @@ -368,6 +369,43 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console } #endif +#if defined(_WIN32) + static void integrate_powershell(const VcpkgPaths& paths) + { + static constexpr StringLiteral TITLE = "PowerShell Tab-Completion"; + const fs::path script_path = paths.scripts / "addPoshVcpkgToPowershellProfile.ps1"; + + // Console font corruption workaround + SetConsoleCP(437); + SetConsoleOutputCP(437); + + const std::string cmd = Strings::format( + R"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.u8string(), ""); + const int rc = System::cmd_execute(cmd); + + SetConsoleCP(CP_UTF8); + SetConsoleOutputCP(CP_UTF8); + + if (rc) + { + System::println(System::Color::error, + "%s\n" + "Could not run:\n" + " '%s'", + TITLE, + script_path.generic_string()); + + { + auto locked_metrics = Metrics::g_metrics.lock(); + locked_metrics->track_property("error", "powershell script failed"); + locked_metrics->track_property("title", TITLE); + } + } + + Checks::exit_with_code(VCPKG_LINE_INFO, rc); + } +#endif + #if defined(_WIN32) const char* const INTEGRATE_COMMAND_HELPSTRING = " vcpkg integrate install Make installed packages available user-wide. Requires admin privileges on " @@ -423,9 +461,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console } if (args.command_arguments[0] == Subcommand::POWERSHELL) { - System::powershell_execute("PowerShell Tab-Completion", - paths.scripts / "addPoshVcpkgToPowershellProfile.ps1"); - Checks::exit_success(VCPKG_LINE_INFO); + return integrate_powershell(paths); } #endif diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index 1bfbc424784..cadc06ad334 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -76,7 +76,7 @@ namespace vcpkg::Commands::List for (const StatusParagraph* status_paragraph : installed_packages) { const std::string displayname = status_paragraph->package.displayname(); - if (Strings::case_insensitive_ascii_find(displayname, args.command_arguments[0]) == displayname.end()) + if (!Strings::case_insensitive_ascii_contains(displayname, args.command_arguments[0])) { continue; } diff --git a/toolsrc/src/vcpkg/commands.search.cpp b/toolsrc/src/vcpkg/commands.search.cpp index 33a642e4079..263c86698fa 100644 --- a/toolsrc/src/vcpkg/commands.search.cpp +++ b/toolsrc/src/vcpkg/commands.search.cpp @@ -10,46 +10,9 @@ namespace vcpkg::Commands::Search { - static constexpr StringLiteral OPTION_GRAPH = "--graph"; // TODO: This should find a better home, eventually static constexpr StringLiteral OPTION_FULLDESC = "--x-full-desc"; // TODO: This should find a better home, eventually - - static std::string replace_dashes_with_underscore(const std::string& input) - { - std::string output = input; - std::replace(output.begin(), output.end(), '-', '_'); - return output; - } - - static std::string create_graph_as_string( - const std::vector>& source_control_files) - { - int empty_node_count = 0; - - std::string s; - s.append("digraph G{ rankdir=LR; edge [minlen=3]; overlap=false;"); - - for (const auto& source_control_file : source_control_files) - { - const SourceParagraph& source_paragraph = *source_control_file->core_paragraph; - if (source_paragraph.depends.empty()) - { - empty_node_count++; - continue; - } - - const std::string name = replace_dashes_with_underscore(source_paragraph.name); - s.append(Strings::format("%s;", name)); - for (const Dependency& d : source_paragraph.depends) - { - const std::string dependency_name = replace_dashes_with_underscore(d.name()); - s.append(Strings::format("%s -> %s;", name, dependency_name)); - } - } - - s.append(Strings::format("empty [label=\"%d singletons...\"]; }", empty_node_count)); - return s; - } + static void do_print(const SourceParagraph& source_paragraph, bool full_desc) { if (full_desc) @@ -80,8 +43,7 @@ namespace vcpkg::Commands::Search } } - static constexpr std::array SEARCH_SWITCHES = {{ - {OPTION_GRAPH, "Open editor into the port-specific buildtree subfolder"}, + static constexpr std::array SEARCH_SWITCHES = {{ {OPTION_FULLDESC, "Do not truncate long text"}, }}; @@ -102,13 +64,6 @@ namespace vcpkg::Commands::Search auto source_paragraphs = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); - if (Util::Sets::contains(options.switches, OPTION_GRAPH)) - { - const std::string graph_as_string = create_graph_as_string(source_paragraphs); - System::println(graph_as_string); - Checks::exit_success(VCPKG_LINE_INFO); - } - if (args.command_arguments.empty()) { for (const auto& source_control_file : source_paragraphs) diff --git a/toolsrc/src/vcpkg/commands.upgrade.cpp b/toolsrc/src/vcpkg/commands.upgrade.cpp index a902ddeafa0..0e58b012d42 100644 --- a/toolsrc/src/vcpkg/commands.upgrade.cpp +++ b/toolsrc/src/vcpkg/commands.upgrade.cpp @@ -1,8 +1,8 @@ #include "pch.h" -#include #include #include +#include #include #include #include @@ -10,6 +10,8 @@ #include #include +#include + namespace vcpkg::Commands::Upgrade { using Install::KeepGoing; @@ -141,11 +143,15 @@ namespace vcpkg::Commands::Upgrade Checks::check_exit(VCPKG_LINE_INFO, !plan.empty()); - const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, - Build::AllowDownloads::YES, - Build::CleanBuildtrees::NO, - Build::CleanPackages::NO, - Build::DownloadTool::BUILT_IN}; + const Build::BuildPackageOptions install_plan_options = { + Build::UseHeadVersion::NO, + Build::AllowDownloads::YES, + Build::CleanBuildtrees::NO, + Build::CleanPackages::NO, + Build::DownloadTool::BUILT_IN, + GlobalState::g_binary_caching ? Build::BinaryCaching::YES : Build::BinaryCaching::NO, + Build::FailOnTombstone::NO, + }; // Set build settings for all install actions for (auto&& action : plan) diff --git a/toolsrc/src/vcpkg/commands.xvsinstances.cpp b/toolsrc/src/vcpkg/commands.xvsinstances.cpp new file mode 100644 index 00000000000..d748b6b2ffd --- /dev/null +++ b/toolsrc/src/vcpkg/commands.xvsinstances.cpp @@ -0,0 +1,33 @@ +#include "pch.h" + +#include +#include +#include + +namespace vcpkg::Commands::X_VSInstances +{ + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("x-vsinstances"), + 0, + 0, + {{}, {}}, + nullptr, + }; + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { +#if defined(_WIN32) + const ParsedArguments parsed_args = args.parse_arguments(COMMAND_STRUCTURE); + + const auto instances = vcpkg::VisualStudio::get_visual_studio_instances(paths); + for (const std::string& instance : instances) + { + System::println(instance); + } + + Checks::exit_success(VCPKG_LINE_INFO); +#else + Checks::exit_with_message(VCPKG_LINE_INFO, "This command is not supported on non-windows platforms."); +#endif + } +} diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 8fb35b0da2d..60c43e4a860 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -488,26 +488,23 @@ namespace vcpkg::Dependencies if (plus) return MarkPlusResult::SUCCESS; plus = true; + auto p_source = cluster.source.get(); + Checks::check_exit(VCPKG_LINE_INFO, + p_source != nullptr, + "Error: Cannot find definition for package `%s`.", + cluster.spec.name()); + if (feature.empty()) { // Add default features for this package. This is an exact reference, so ignore prevent_default_features. - if (auto p_source = cluster.source.get()) + for (auto&& default_feature : p_source->scf->core_paragraph.get()->default_features) { - for (auto&& default_feature : p_source->scf->core_paragraph.get()->default_features) + auto res = mark_plus(default_feature, cluster, graph, graph_plan, prevent_default_features); + if (res != MarkPlusResult::SUCCESS) { - auto res = mark_plus(default_feature, cluster, graph, graph_plan, prevent_default_features); - if (res != MarkPlusResult::SUCCESS) - { - return res; - } + return res; } } - else - { - Checks::exit_with_message(VCPKG_LINE_INFO, - "Error: Unable to install default features because can't find CONTROL for %s", - cluster.spec); - } // "core" is always required. return mark_plus("core", cluster, graph, graph_plan, prevent_default_features); @@ -515,28 +512,20 @@ namespace vcpkg::Dependencies if (feature == "*") { - if (auto p_source = cluster.source.get()) + for (auto&& fpgh : p_source->scf->feature_paragraphs) { - for (auto&& fpgh : p_source->scf->feature_paragraphs) - { - auto res = mark_plus(fpgh->name, cluster, graph, graph_plan, prevent_default_features); + auto res = mark_plus(fpgh->name, cluster, graph, graph_plan, prevent_default_features); - Checks::check_exit(VCPKG_LINE_INFO, - res == MarkPlusResult::SUCCESS, - "Error: Unable to locate feature %s in %s", - fpgh->name, - cluster.spec); - } - - auto res = mark_plus("core", cluster, graph, graph_plan, prevent_default_features); - - Checks::check_exit(VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS); - } - else - { - Checks::exit_with_message( - VCPKG_LINE_INFO, "Error: Unable to handle '*' because can't find CONTROL for %s", cluster.spec); + Checks::check_exit(VCPKG_LINE_INFO, + res == MarkPlusResult::SUCCESS, + "Error: Internal error while installing feature %s in %s", + fpgh->name, + cluster.spec); } + + auto res = mark_plus("core", cluster, graph, graph_plan, prevent_default_features); + + Checks::check_exit(VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS); return MarkPlusResult::SUCCESS; } @@ -643,7 +632,7 @@ namespace vcpkg::Dependencies } /// Figure out which actions are required to install features specifications in `specs`. - /// Map of all source files in the current environment. + /// Map of all source control files in the current environment. /// Feature specifications to resolve dependencies for. /// Status of installed packages in the current environment. std::vector create_feature_install_plan(const std::unordered_map& map, @@ -666,7 +655,11 @@ namespace vcpkg::Dependencies auto res = mark_plus(spec.feature(), spec_cluster, *m_graph, *m_graph_plan, prevent_default_features); - Checks::check_exit(VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); + Checks::check_exit(VCPKG_LINE_INFO, + res == MarkPlusResult::SUCCESS, + "Error: `%s` is not a feature of package `%s`", + spec.feature(), + spec.name()); m_graph_plan->install_graph.add_vertex(ClusterPtr{&spec_cluster}); } diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 15225201844..eec9a39f205 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -1,8 +1,5 @@ #include "pch.h" -#include -#include -#include #include #include #include @@ -13,6 +10,10 @@ #include #include +#include +#include +#include + namespace vcpkg::Export { using Dependencies::ExportPlanAction; @@ -68,11 +69,15 @@ namespace vcpkg::Export { static constexpr std::array ORDER = {ExportPlanType::ALREADY_BUILT, ExportPlanType::NOT_BUILT}; - static constexpr Build::BuildPackageOptions BUILD_OPTIONS = {Build::UseHeadVersion::NO, - Build::AllowDownloads::YES, - Build::CleanBuildtrees::NO, - Build::CleanPackages::NO, - Build::DownloadTool::BUILT_IN}; + static constexpr Build::BuildPackageOptions BUILD_OPTIONS = { + Build::UseHeadVersion::NO, + Build::AllowDownloads::YES, + Build::CleanBuildtrees::NO, + Build::CleanPackages::NO, + Build::DownloadTool::BUILT_IN, + Build::BinaryCaching::NO, + Build::FailOnTombstone::NO, + }; for (const ExportPlanType plan_type : ORDER) { @@ -103,7 +108,7 @@ namespace vcpkg::Export static std::string create_export_id() { - const tm date_time = System::get_current_date_time(); + const tm date_time = Chrono::get_current_date_time_local(); // Format is: YYYYmmdd-HHMMSS // 15 characters + 1 null terminating character will be written for a total of 16 chars @@ -150,7 +155,7 @@ namespace vcpkg::Export const int exit_code = System::cmd_execute_clean(cmd_line); Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: NuGet package creation failed"); - const fs::path output_path = output_dir / (nuget_id + ".nupkg"); + const fs::path output_path = output_dir / (nuget_id + "." + nuget_version + ".nupkg"); return output_path; } @@ -222,14 +227,10 @@ namespace vcpkg::Export { const std::vector integration_files_relative_to_root = { {".vcpkg-root"}, - {fs::path{"scripts"} / "buildsystems" / "msbuild" / "applocal.ps1"}, - {fs::path{"scripts"} / "buildsystems" / "msbuild" / "vcpkg.targets"}, - {fs::path{"scripts"} / "buildsystems" / "vcpkg.cmake"}, - {fs::path{"scripts"} / "cmake" / "vcpkg_get_windows_sdk.cmake"}, - {fs::path{"scripts"} / "getWindowsSDK.ps1"}, - {fs::path{"scripts"} / "getProgramFilesPlatformBitness.ps1"}, - {fs::path{"scripts"} / "getProgramFiles32bit.ps1"}, - {fs::path{"scripts"} / "VcpkgPowershellUtils.ps1"}, + {fs::path {"scripts"} / "buildsystems" / "msbuild" / "applocal.ps1"}, + {fs::path {"scripts"} / "buildsystems" / "msbuild" / "vcpkg.targets"}, + {fs::path {"scripts"} / "buildsystems" / "vcpkg.cmake"}, + {fs::path {"scripts"} / "cmake" / "vcpkg_get_windows_sdk.cmake"}, }; for (const fs::path& file : integration_files_relative_to_root) diff --git a/toolsrc/src/vcpkg/globalstate.cpp b/toolsrc/src/vcpkg/globalstate.cpp index a4100acf718..a54c596fb65 100644 --- a/toolsrc/src/vcpkg/globalstate.cpp +++ b/toolsrc/src/vcpkg/globalstate.cpp @@ -13,4 +13,48 @@ namespace vcpkg std::atomic GlobalState::g_init_console_cp(0); std::atomic GlobalState::g_init_console_output_cp(0); + std::atomic GlobalState::g_init_console_initialized(false); + + GlobalState::CtrlCStateMachine GlobalState::g_ctrl_c_state; + + GlobalState::CtrlCStateMachine::CtrlCStateMachine() : m_state(CtrlCState::normal) {} + + void GlobalState::CtrlCStateMachine::transition_to_spawn_process() noexcept + { + auto expected = CtrlCState::normal; + auto transitioned = m_state.compare_exchange_strong(expected, CtrlCState::blocked_on_child); + if (!transitioned) + { + // Ctrl-C was hit and is asynchronously executing on another thread + Checks::exit_fail(VCPKG_LINE_INFO); + } + } + void GlobalState::CtrlCStateMachine::transition_from_spawn_process() noexcept + { + auto expected = CtrlCState::blocked_on_child; + auto transitioned = m_state.compare_exchange_strong(expected, CtrlCState::normal); + if (!transitioned) + { + // Ctrl-C was hit while blocked on the child process + Checks::exit_fail(VCPKG_LINE_INFO); + } + } + void GlobalState::CtrlCStateMachine::transition_handle_ctrl_c() noexcept + { + auto prev_state = m_state.exchange(CtrlCState::exit_requested); + + if (prev_state == CtrlCState::normal) + { + // Not currently blocked on a child process and Ctrl-C has not been hit. + Checks::exit_fail(VCPKG_LINE_INFO); + } + else if (prev_state == CtrlCState::exit_requested) + { + // Ctrl-C was hit previously + } + else + { + // This is the case where we are currently blocked on a child process + } + } } diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index 743619937d9..5df878a918a 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -7,6 +7,13 @@ #include #include +// Write environment variable names as %VARIABLE% on Windows and $VARIABLE in *nix +#ifdef _WIN32 +#define ENVVAR(VARNAME) "%%" #VARNAME "%%" +#else +#define ENVVAR(VARNAME) "$" #VARNAME +#endif + namespace vcpkg::Help { struct Topic @@ -93,7 +100,7 @@ namespace vcpkg::Help "%s" // Integration help "\n" " vcpkg export ... [opt]... Exports a package\n" - " vcpkg edit Open up a port for editing (uses %%EDITOR%%, default 'code')\n" + " vcpkg edit Open up a port for editing (uses " ENVVAR(EDITOR) ", default 'code')\n" " vcpkg import Import a pre-built library\n" " vcpkg create \n" " [archivename] Create a new package\n" @@ -104,10 +111,12 @@ namespace vcpkg::Help "\n" "Options:\n" " --triplet Specify the target architecture triplet.\n" - " (default: %%VCPKG_DEFAULT_TRIPLET%%, see 'vcpkg help triplet')\n" + " (default: " ENVVAR(VCPKG_DEFAULT_TRIPLET) ", see 'vcpkg help triplet')\n" "\n" " --vcpkg-root Specify the vcpkg root directory\n" - " (default: %%VCPKG_ROOT%%)\n" + " (default: " ENVVAR(VCPKG_ROOT) ")\n" + "\n" + " @response_file Specify a response file to provide additional parameters\n" "\n" "For more help (including examples) see the accompanying README.md.", Commands::Integrate::INTEGRATE_COMMAND_HELPSTRING); diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index fc336d6c71d..1cfa2bf7199 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -62,7 +62,7 @@ namespace vcpkg::Install auto files = fs.get_files_recursive(source_dir); for (auto&& file : files) { - const auto status = fs.status(file, ec); + const auto status = fs.symlink_status(file, ec); if (ec) { System::println(System::Color::error, "failed: %s: %s", file.u8string(), ec.message()); @@ -111,6 +111,23 @@ namespace vcpkg::Install output.push_back(Strings::format(R"(%s/%s)", destination_subdirectory, suffix)); break; } + case fs::file_type::symlink: + { + if (fs.exists(target)) + { + System::println(System::Color::warning, + "File %s was already present and will be overwritten", + target.u8string(), + ec.message()); + } + fs.copy_symlink(file, target, ec); + if (ec) + { + System::println(System::Color::error, "failed: %s: %s", target.u8string(), ec.message()); + } + output.push_back(Strings::format(R"(%s/%s)", destination_subdirectory, suffix)); + break; + } default: System::println(System::Color::error, "failed: %s: cannot handle file type", file.u8string()); break; @@ -462,14 +479,14 @@ namespace vcpkg::Install auto files = fs.read_lines(paths.listfile_path(bpgh)); if (auto p_lines = files.get()) { + std::map config_files; std::map> library_targets; for (auto&& suffix : *p_lines) { - if (Strings::case_insensitive_ascii_find(suffix, "/share/") != suffix.end() && - suffix.substr(suffix.size() - 6) == ".cmake") + if (Strings::case_insensitive_ascii_contains(suffix, "/share/") && Strings::ends_with(suffix, ".cmake")) { - // File is inside the share folder + // CMake file is inside the share folder auto path = paths.installed / suffix; auto maybe_contents = fs.read_contents(path); auto find_package_name = path.parent_path().filename().u8string(); @@ -485,6 +502,21 @@ namespace vcpkg::Install ++next; } } + + auto filename = fs::u8path(suffix).filename().u8string(); + + if (Strings::ends_with(filename, "Config.cmake")) + { + auto root = filename.substr(0, filename.size() - 12); + if (Strings::case_insensitive_ascii_equals(root, find_package_name)) + config_files[find_package_name] = root; + } + else if (Strings::ends_with(filename, "-config.cmake")) + { + auto root = filename.substr(0, filename.size() - 13); + if (Strings::case_insensitive_ascii_equals(root, find_package_name)) + config_files[find_package_name] = root; + } } } @@ -497,11 +529,23 @@ namespace vcpkg::Install for (auto&& library_target_pair : library_targets) { + auto config_it = config_files.find(library_target_pair.first); + if (config_it != config_files.end()) + System::println(" find_package(%s CONFIG REQUIRED)", config_it->second); + else + System::println(" find_package(%s CONFIG REQUIRED)", library_target_pair.first); + + std::sort(library_target_pair.second.begin(), + library_target_pair.second.end(), + [](const std::string& l, const std::string& r) { + if (l.size() < r.size()) return true; + if (l.size() > r.size()) return false; + return l < r; + }); + if (library_target_pair.second.size() <= 4) { - System::println(" find_package(%s REQUIRED)\n" - " target_link_libraries(main PRIVATE %s)\n", - library_target_pair.first, + System::println(" target_link_libraries(main PRIVATE %s)\n", Strings::join(" ", library_target_pair.second)); } else @@ -509,10 +553,8 @@ namespace vcpkg::Install auto omitted = library_target_pair.second.size() - 4; library_target_pair.second.erase(library_target_pair.second.begin() + 4, library_target_pair.second.end()); - System::println(" find_package(%s REQUIRED)\n" - " # Note: %zd targets were omitted\n" + System::println(" # Note: %zd target(s) were omitted.\n" " target_link_libraries(main PRIVATE %s)\n", - library_target_pair.first, omitted, Strings::join(" ", library_target_pair.second)); } @@ -563,7 +605,10 @@ namespace vcpkg::Install Util::Enum::to_enum(!no_downloads), Build::CleanBuildtrees::NO, Build::CleanPackages::NO, - download_tool}; + download_tool, + GlobalState::g_binary_caching ? Build::BinaryCaching::YES : Build::BinaryCaching::NO, + Build::FailOnTombstone::NO, + }; auto all_ports = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); std::unordered_map scf_map; diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index 8890c067f3e..2a73dba899b 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -5,6 +5,7 @@ #include #include +#include #include #include @@ -261,7 +262,7 @@ namespace vcpkg::Metrics const auto match = *next; if (match[0] != "00-00-00-00-00-00") { - return vcpkg::Commands::Hash::get_string_hash(match[0], "SHA256"); + return vcpkg::Hash::get_string_hash(match[0], "SHA256"); } ++next; } @@ -437,13 +438,14 @@ namespace vcpkg::Metrics const std::string cmd_line = Strings::format("start \"vcpkgmetricsuploader.exe\" \"%s\" \"%s\"", temp_folder_path_exe.u8string(), vcpkg_metrics_txt_path.u8string()); + System::cmd_execute_no_wait(cmd_line); #else auto escaped_path = Strings::escape_string(vcpkg_metrics_txt_path.u8string(), '\'', '\\'); const std::string cmd_line = Strings::format( R"((curl "https://dc.services.visualstudio.com/v2/track" -H "Content-Type: application/json" -X POST --data '@%s' >/dev/null 2>&1; rm '%s') &)", escaped_path, escaped_path); -#endif System::cmd_execute_clean(cmd_line); +#endif } } diff --git a/toolsrc/src/vcpkg/postbuildlint.cpp b/toolsrc/src/vcpkg/postbuildlint.cpp index 6fe11951fea..650b6e3c9b3 100644 --- a/toolsrc/src/vcpkg/postbuildlint.cpp +++ b/toolsrc/src/vcpkg/postbuildlint.cpp @@ -16,9 +16,9 @@ using vcpkg::Build::PreBuildInfo; namespace vcpkg::PostBuildLint { - static auto has_extension_pred(const Files::Filesystem& fs, const std::string& ext) + static auto not_extension_pred(const Files::Filesystem& fs, const std::string& ext) { - return [&fs, ext](const fs::path& path) { return !fs.is_directory(path) && path.extension() == ext; }; + return [&fs, ext](const fs::path& path) { return fs.is_directory(path) || path.extension() != ext; }; } enum class LintStatus @@ -104,8 +104,8 @@ namespace vcpkg::PostBuildLint std::vector files_found = fs.get_files_recursive(debug_include_dir); - Util::unstable_keep_if( - files_found, [&fs](const fs::path& path) { return !fs.is_directory(path) && path.extension() != ".ifc"; }); + Util::erase_remove_if( + files_found, [&fs](const fs::path& path) { return fs.is_directory(path) || path.extension() == ".ifc"; }); if (!files_found.empty()) { @@ -206,7 +206,7 @@ namespace vcpkg::PostBuildLint static LintStatus check_for_dlls_in_lib_dir(const Files::Filesystem& fs, const fs::path& package_dir) { std::vector dlls = fs.get_files_recursive(package_dir / "lib"); - Util::unstable_keep_if(dlls, has_extension_pred(fs, ".dll")); + Util::erase_remove_if(dlls, not_extension_pred(fs, ".dll")); if (!dlls.empty()) { @@ -280,7 +280,7 @@ namespace vcpkg::PostBuildLint static LintStatus check_for_exes(const Files::Filesystem& fs, const fs::path& package_dir) { std::vector exes = fs.get_files_recursive(package_dir / "bin"); - Util::unstable_keep_if(exes, has_extension_pred(fs, ".exe")); + Util::erase_remove_if(exes, not_extension_pred(fs, ".exe")); if (!exes.empty()) { @@ -572,8 +572,8 @@ namespace vcpkg::PostBuildLint { std::vector empty_directories = fs.get_files_recursive(dir); - Util::unstable_keep_if(empty_directories, [&fs](const fs::path& current) { - return fs.is_directory(current) && fs.is_empty(current); + Util::erase_remove_if(empty_directories, [&fs](const fs::path& current) { + return !fs.is_directory(current) || !fs.is_empty(current); }); if (!empty_directories.empty()) @@ -617,7 +617,11 @@ namespace vcpkg::PostBuildLint const std::string cmd_line = Strings::format(R"("%s" /directives "%s")", dumpbin_exe.u8string(), lib.u8string()); System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line); + Checks::check_exit(VCPKG_LINE_INFO, + ec_data.exit_code == 0, + "Running command:\n %s\n failed with message:\n%s", + cmd_line, + ec_data.output); for (const BuildType& bad_build_type : bad_build_types) { @@ -703,12 +707,15 @@ namespace vcpkg::PostBuildLint static LintStatus check_no_files_in_dir(const Files::Filesystem& fs, const fs::path& dir) { std::vector misplaced_files = fs.get_files_non_recursive(dir); - Util::unstable_keep_if(misplaced_files, [&fs](const fs::path& path) { + Util::erase_remove_if(misplaced_files, [&fs](const fs::path& path) { const std::string filename = path.filename().generic_string(); if (Strings::case_insensitive_ascii_equals(filename.c_str(), "CONTROL") || Strings::case_insensitive_ascii_equals(filename.c_str(), "BUILD_INFO")) - return false; - return !fs.is_directory(path); + { + return true; + } + + return fs.is_directory(path); }); if (!misplaced_files.empty()) @@ -760,9 +767,9 @@ namespace vcpkg::PostBuildLint const fs::path release_bin_dir = package_dir / "bin"; std::vector debug_libs = fs.get_files_recursive(debug_lib_dir); - Util::unstable_keep_if(debug_libs, has_extension_pred(fs, ".lib")); + Util::erase_remove_if(debug_libs, not_extension_pred(fs, ".lib")); std::vector release_libs = fs.get_files_recursive(release_lib_dir); - Util::unstable_keep_if(release_libs, has_extension_pred(fs, ".lib")); + Util::erase_remove_if(release_libs, not_extension_pred(fs, ".lib")); if (!pre_build_info.build_type) error_count += check_matching_debug_and_release_binaries(debug_libs, release_libs); @@ -776,9 +783,9 @@ namespace vcpkg::PostBuildLint } std::vector debug_dlls = fs.get_files_recursive(debug_bin_dir); - Util::unstable_keep_if(debug_dlls, has_extension_pred(fs, ".dll")); + Util::erase_remove_if(debug_dlls, not_extension_pred(fs, ".dll")); std::vector release_dlls = fs.get_files_recursive(release_bin_dir); - Util::unstable_keep_if(release_dlls, has_extension_pred(fs, ".dll")); + Util::erase_remove_if(release_dlls, not_extension_pred(fs, ".dll")); switch (build_info.library_linkage) { diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 13cc9325ed9..921a04c2384 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -55,7 +55,7 @@ namespace vcpkg::Remove auto target = paths.installed / suffix; - const auto status = fs.status(target, ec); + const auto status = fs.symlink_status(target, ec); if (ec) { System::println(System::Color::error, "failed: status(%s): %s", target.u8string(), ec.message()); @@ -66,7 +66,7 @@ namespace vcpkg::Remove { dirs_touched.push_back(target); } - else if (fs::is_regular_file(status)) + else if (fs::is_regular_file(status) || fs::is_symlink(status)) { fs.remove(target, ec); if (ec) diff --git a/toolsrc/src/vcpkg/statusparagraph.cpp b/toolsrc/src/vcpkg/statusparagraph.cpp index 462d8d8ed20..86946a31abc 100644 --- a/toolsrc/src/vcpkg/statusparagraph.cpp +++ b/toolsrc/src/vcpkg/statusparagraph.cpp @@ -105,7 +105,7 @@ namespace vcpkg { dep.erase(std::find(dep.begin(), dep.end(), '['), dep.end()); } - Util::unstable_keep_if(deps, [&](auto&& e) { return e != l_spec.name(); }); + Util::erase_remove_if(deps, [&](auto&& e) { return e == l_spec.name(); }); // Util::sort_unique_erase(deps); diff --git a/toolsrc/src/vcpkg/tools.cpp b/toolsrc/src/vcpkg/tools.cpp new file mode 100644 index 00000000000..f4ee2d65345 --- /dev/null +++ b/toolsrc/src/vcpkg/tools.cpp @@ -0,0 +1,533 @@ +#include "pch.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace vcpkg +{ + struct ToolData + { + std::array version; + fs::path exe_path; + std::string url; + fs::path download_path; + bool is_archive; + fs::path tool_dir_path; + std::string sha512; + }; + + static Optional> parse_version_string(const std::string& version_as_string) + { + static const std::regex RE(R"###((\d+)\.(\d+)\.(\d+))###"); + + std::match_results match; + const auto found = std::regex_search(version_as_string, match, RE); + if (!found) + { + return {}; + } + + 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()); + const std::array result = {d1, d2, d3}; + return result; + } + + static ToolData parse_tool_data_from_xml(const VcpkgPaths& paths, const std::string& tool) + { +#if defined(_WIN32) + static constexpr StringLiteral OS_STRING = "windows"; +#elif defined(__APPLE__) + static constexpr StringLiteral OS_STRING = "osx"; +#elif defined(__linux__) + static constexpr StringLiteral OS_STRING = "linux"; +#else + return ToolData{}; +#endif + +#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__) + static const std::string XML_VERSION = "2"; + static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml"; + static const std::regex XML_VERSION_REGEX{R"###()###"}; + static const std::string XML = paths.get_filesystem().read_contents(XML_PATH).value_or_exit(VCPKG_LINE_INFO); + std::smatch match_xml_version; + const bool has_xml_version = std::regex_search(XML.cbegin(), XML.cend(), match_xml_version, XML_VERSION_REGEX); + Checks::check_exit(VCPKG_LINE_INFO, + has_xml_version, + R"(Could not find in %s)", + XML_VERSION, + XML_PATH.generic_string()); + Checks::check_exit(VCPKG_LINE_INFO, + XML_VERSION == match_xml_version[1], + "Expected %s version: [%s], but was [%s]. Please re-run bootstrap-vcpkg.", + XML_PATH.generic_string(), + XML_VERSION, + match_xml_version[1]); + + const std::regex tool_regex{Strings::format(R"###()###", tool, OS_STRING)}; + std::smatch match_tool_entry; + const bool has_tool_entry = std::regex_search(XML.cbegin(), XML.cend(), match_tool_entry, tool_regex); + Checks::check_exit(VCPKG_LINE_INFO, + has_tool_entry, + "Could not find entry for tool [%s] in %s", + tool, + XML_PATH.generic_string()); + + const std::string tool_data = + StringRange::find_exactly_one_enclosed(XML, match_tool_entry[0], "").to_string(); + const std::string version_as_string = + StringRange::find_exactly_one_enclosed(tool_data, "", "").to_string(); + const std::string exe_relative_path = + StringRange::find_exactly_one_enclosed(tool_data, "", "").to_string(); + const std::string url = StringRange::find_exactly_one_enclosed(tool_data, "", "").to_string(); + const std::string sha512 = + StringRange::find_exactly_one_enclosed(tool_data, "", "").to_string(); + auto archive_name = StringRange::find_at_most_one_enclosed(tool_data, "", ""); + + const Optional> version = parse_version_string(version_as_string); + Checks::check_exit(VCPKG_LINE_INFO, + version.has_value(), + "Could not parse version for tool %s. Version string was: %s", + tool, + version_as_string); + + const std::string tool_dir_name = Strings::format("%s-%s-%s", tool, version_as_string, OS_STRING); + const fs::path tool_dir_path = paths.tools / tool_dir_name; + const fs::path exe_path = tool_dir_path / exe_relative_path; + + return ToolData{*version.get(), + exe_path, + url, + paths.downloads / archive_name.value_or(exe_relative_path).to_string(), + archive_name.has_value(), + tool_dir_path, + sha512}; +#endif + } + + struct PathAndVersion + { + fs::path path; + std::string version; + }; + + static Optional find_first_with_sufficient_version(const std::vector& candidates, + const std::array& expected_version) + { + const auto it = Util::find_if(candidates, [&](const PathAndVersion& candidate) { + const auto parsed_version = parse_version_string(candidate.version); + if (!parsed_version.has_value()) + { + return false; + } + + const std::array actual_version = *parsed_version.get(); + return actual_version[0] > expected_version[0] || + (actual_version[0] == expected_version[0] && actual_version[1] > expected_version[1]) || + (actual_version[0] == expected_version[0] && actual_version[1] == expected_version[1] && + actual_version[2] >= expected_version[2]); + }); + + if (it == candidates.cend()) + { + return nullopt; + } + + return *it; + } + + struct VersionProvider + { + virtual Optional get_version(const fs::path& path_to_exe) const = 0; + + std::vector get_versions(const std::vector& candidate_paths) const + { + auto&& fs = Files::get_real_filesystem(); + + std::vector output; + for (auto&& p : candidate_paths) + { + if (!fs.exists(p)) continue; + auto maybe_version = this->get_version(p); + if (const auto version = maybe_version.get()) + { + output.emplace_back(PathAndVersion{p, *version}); + return output; + } + } + + return output; + } + }; + + static fs::path fetch_tool(const VcpkgPaths& paths, const std::string& tool_name, const ToolData& tool_data) + { + const std::array& version = tool_data.version; + const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); + Checks::check_exit(VCPKG_LINE_INFO, + !tool_data.url.empty(), + "A suitable version of %s was not found (required v%s) and unable to automatically " + "download a portable one. Please install a newer version of %s.", + tool_name, + version_as_string, + tool_name); + System::println("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...", + tool_name, + version_as_string, + tool_name, + version_as_string); + auto& fs = paths.get_filesystem(); + if (!fs.exists(tool_data.download_path)) + { + System::println("Downloading %s...", tool_name); + System::println(" %s -> %s", tool_data.url, tool_data.download_path.string()); + Downloads::download_file(fs, tool_data.url, tool_data.download_path, tool_data.sha512); + } + else + { + Downloads::verify_downloaded_file_hash(fs, tool_data.url, tool_data.download_path, tool_data.sha512); + } + + if (tool_data.is_archive) + { + System::println("Extracting %s...", tool_name); + Archives::extract_archive(paths, tool_data.download_path, tool_data.tool_dir_path); + } + else + { + std::error_code ec; + fs.create_directories(tool_data.exe_path.parent_path(), ec); + fs.rename(tool_data.download_path, tool_data.exe_path, ec); + } + + Checks::check_exit(VCPKG_LINE_INFO, + fs.exists(tool_data.exe_path), + "Expected %s to exist after fetching", + tool_data.exe_path.u8string()); + + return tool_data.exe_path; + } + + static PathAndVersion fetch_tool(const VcpkgPaths& paths, + const std::string& tool_name, + const ToolData& tool_data, + const VersionProvider& version_provider) + { + const auto downloaded_path = fetch_tool(paths, tool_name, tool_data); + const auto downloaded_version = version_provider.get_version(downloaded_path).value_or_exit(VCPKG_LINE_INFO); + return {downloaded_path, downloaded_version}; + } + + namespace CMake + { + struct CmakeVersionProvider : VersionProvider + { + Optional get_version(const fs::path& path_to_exe) const override + { + const std::string cmd = Strings::format(R"("%s" --version)", path_to_exe.u8string()); + const auto rc = System::cmd_execute_and_capture_output(cmd); + if (rc.exit_code != 0) + { + return nullopt; + } + + /* Sample output: + cmake version 3.10.2 + + CMake suite maintained and supported by Kitware (kitware.com/cmake). + */ + return StringRange::find_exactly_one_enclosed(rc.output, "cmake version ", "\n").to_string(); + } + }; + + static PathAndVersion get_path(const VcpkgPaths& paths) + { + std::vector candidate_paths; +#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__) + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "cmake"); + candidate_paths.push_back(TOOL_DATA.exe_path); +#else + static const ToolData TOOL_DATA = ToolData{{3, 5, 1}, ""}; +#endif + const std::vector from_path = paths.get_filesystem().find_from_PATH("cmake"); + candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + + const auto& program_files = System::get_program_files_platform_bitness(); + if (const auto pf = program_files.get()) candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); + const auto& program_files_32_bit = System::get_program_files_32_bit(); + if (const auto pf = program_files_32_bit.get()) + candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); + + const CmakeVersionProvider version_provider{}; + const std::vector candidates_with_versions = version_provider.get_versions(candidate_paths); + const auto maybe_path = find_first_with_sufficient_version(candidates_with_versions, TOOL_DATA.version); + if (const auto p = maybe_path.get()) + { + return *p; + } + + return fetch_tool(paths, Tools::CMAKE, TOOL_DATA, version_provider); + } + } + + static fs::path get_7za_path(const VcpkgPaths& paths) + { +#if defined(_WIN32) + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "7zip"); + if (!paths.get_filesystem().exists(TOOL_DATA.exe_path)) + { + return fetch_tool(paths, "7zip", TOOL_DATA); + } + return TOOL_DATA.exe_path; +#else + Checks::exit_with_message(VCPKG_LINE_INFO, "Cannot download 7zip for non-Windows platforms."); +#endif + } + + namespace Ninja + { + struct NinjaVersionProvider : VersionProvider + { + Optional get_version(const fs::path& path_to_exe) const override + { + const std::string cmd = Strings::format(R"("%s" --version)", path_to_exe.u8string()); + const auto rc = System::cmd_execute_and_capture_output(cmd); + if (rc.exit_code != 0) + { + return nullopt; + } + + /* Sample output: + 1.8.2 + */ + return rc.output; + } + }; + + static PathAndVersion get_path(const VcpkgPaths& paths) + { + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "ninja"); + + std::vector candidate_paths; + candidate_paths.push_back(TOOL_DATA.exe_path); + const std::vector from_path = paths.get_filesystem().find_from_PATH("ninja"); + candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + + const NinjaVersionProvider version_provider{}; + const std::vector candidates_with_versions = version_provider.get_versions(candidate_paths); + const auto maybe_path = find_first_with_sufficient_version(candidates_with_versions, TOOL_DATA.version); + if (const auto p = maybe_path.get()) + { + return *p; + } + + return fetch_tool(paths, Tools::NINJA, TOOL_DATA, version_provider); + } + } + + namespace Nuget + { + struct NugetVersionProvider : VersionProvider + { + Optional get_version(const fs::path& path_to_exe) const override + { + const std::string cmd = Strings::format(R"("%s")", path_to_exe.u8string()); + const auto rc = System::cmd_execute_and_capture_output(cmd); + if (rc.exit_code != 0) + { + return nullopt; + } + + /* Sample output: + NuGet Version: 4.6.2.5055 + usage: NuGet [args] [options] + Type 'NuGet help ' for help on a specific command. + + [[[List of available commands follows]]] + */ + return StringRange::find_exactly_one_enclosed(rc.output, "NuGet Version: ", "\n").to_string(); + } + }; + + static PathAndVersion get_path(const VcpkgPaths& paths) + { + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "nuget"); + + std::vector candidate_paths; + candidate_paths.push_back(TOOL_DATA.exe_path); + const std::vector from_path = paths.get_filesystem().find_from_PATH("nuget"); + candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + + const NugetVersionProvider version_provider{}; + const std::vector candidates_with_versions = version_provider.get_versions(candidate_paths); + const auto maybe_path = find_first_with_sufficient_version(candidates_with_versions, TOOL_DATA.version); + if (const auto p = maybe_path.get()) + { + return *p; + } + + return fetch_tool(paths, Tools::NUGET, TOOL_DATA, version_provider); + } + } + + namespace Git + { + struct GitVersionProvider : VersionProvider + { + Optional get_version(const fs::path& path_to_exe) const override + { + const std::string cmd = Strings::format(R"("%s" --version)", path_to_exe.u8string()); + const auto rc = System::cmd_execute_and_capture_output(cmd); + if (rc.exit_code != 0) + { + return nullopt; + } + + /* Sample output: + git version 2.17.1.windows.2 + */ + const auto idx = rc.output.find("git version "); + Checks::check_exit(VCPKG_LINE_INFO, + idx != std::string::npos, + "Unexpected format of git version string: %s", + rc.output); + return rc.output.substr(idx); + } + }; + + static PathAndVersion get_path(const VcpkgPaths& paths) + { + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "git"); + + std::vector candidate_paths; +#if defined(_WIN32) + candidate_paths.push_back(TOOL_DATA.exe_path); +#endif + const std::vector from_path = paths.get_filesystem().find_from_PATH("git"); + candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + + const auto& program_files = System::get_program_files_platform_bitness(); + if (const auto pf = program_files.get()) candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); + const auto& program_files_32_bit = System::get_program_files_32_bit(); + if (const auto pf = program_files_32_bit.get()) candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); + + const GitVersionProvider version_provider{}; + const std::vector candidates_with_versions = version_provider.get_versions(candidate_paths); + const auto maybe_path = find_first_with_sufficient_version(candidates_with_versions, TOOL_DATA.version); + if (const auto p = maybe_path.get()) + { + return *p; + } + + return fetch_tool(paths, Tools::GIT, TOOL_DATA, version_provider); + } + } + + namespace IfwInstallerBase + { + struct IfwInstallerBaseVersionProvider : VersionProvider + { + Optional get_version(const fs::path& path_to_exe) const override + { + const std::string cmd = Strings::format(R"("%s" --framework-version)", path_to_exe.u8string()); + const auto rc = System::cmd_execute_and_capture_output(cmd); + if (rc.exit_code != 0) + { + return nullopt; + } + + /* Sample output: + 3.1.81 + */ + return rc.output; + } + }; + + static PathAndVersion get_path(const VcpkgPaths& paths) + { + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "installerbase"); + + std::vector candidate_paths; + candidate_paths.push_back(TOOL_DATA.exe_path); + // TODO: Uncomment later + // const std::vector from_path = Files::find_from_PATH("installerbase"); + // candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / "Qt" / + // "Tools" / "QtInstallerFramework" / "3.1" / "bin" / "installerbase.exe"); + // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / "Qt" / + // "QtIFW-3.1.0" / "bin" / "installerbase.exe"); + + const IfwInstallerBaseVersionProvider version_provider{}; + const std::vector candidates_with_versions = version_provider.get_versions(candidate_paths); + const auto maybe_path = find_first_with_sufficient_version(candidates_with_versions, TOOL_DATA.version); + if (const auto p = maybe_path.get()) + { + return *p; + } + + return fetch_tool(paths, Tools::IFW_INSTALLER_BASE, TOOL_DATA, version_provider); + } + } + + struct ToolCacheImpl final : ToolCache + { + vcpkg::Cache path_only_cache; + vcpkg::Cache path_version_cache; + + virtual const fs::path& get_tool_path(const VcpkgPaths& paths, const std::string& tool) const override + { + return path_only_cache.get_lazy(tool, [&]() { + // First deal with specially handled tools. + // For these we may look in locations like Program Files, the PATH etc as well as the auto-downloaded + // location. + if (tool == Tools::SEVEN_ZIP) return get_7za_path(paths); + if (tool == Tools::CMAKE || tool == Tools::GIT || tool == Tools::NINJA || tool == Tools::NUGET || + tool == Tools::IFW_INSTALLER_BASE) + return get_tool_pathversion(paths, tool).path; + if (tool == Tools::IFW_BINARYCREATOR) + return IfwInstallerBase::get_path(paths).path.parent_path() / "binarycreator.exe"; + if (tool == Tools::IFW_REPOGEN) + return IfwInstallerBase::get_path(paths).path.parent_path() / "repogen.exe"; + + // For other tools, we simply always auto-download them. + const ToolData tool_data = parse_tool_data_from_xml(paths, tool); + if (paths.get_filesystem().exists(tool_data.exe_path)) + { + return tool_data.exe_path; + } + return fetch_tool(paths, tool, tool_data); + }); + } + + const PathAndVersion& get_tool_pathversion(const VcpkgPaths& paths, const std::string& tool) const + { + return path_version_cache.get_lazy(tool, [&]() { + if (tool == Tools::CMAKE) return CMake::get_path(paths); + if (tool == Tools::GIT) return Git::get_path(paths); + if (tool == Tools::NINJA) return Ninja::get_path(paths); + if (tool == Tools::NUGET) return Nuget::get_path(paths); + if (tool == Tools::IFW_INSTALLER_BASE) return IfwInstallerBase::get_path(paths); + + Checks::exit_with_message(VCPKG_LINE_INFO, "Finding version for %s is not implemented yet.", tool); + }); + } + + virtual const std::string& get_tool_version(const VcpkgPaths& paths, const std::string& tool) const override + { + return get_tool_pathversion(paths, tool).version; + } + }; + + std::unique_ptr get_tool_cache() { return std::make_unique(); } +} diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp index 8909e1552f7..5b3cf9ef11f 100644 --- a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp +++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp @@ -51,11 +51,29 @@ namespace vcpkg std::vector v; for (int i = 1; i < argc; ++i) { + std::string arg; #if defined(_WIN32) - v.push_back(Strings::to_utf8(argv[i])); + arg = Strings::to_utf8(argv[i]); #else - v.push_back(argv[i]); + arg = argv[i]; #endif + // Response file? + if (arg.size() > 0 && arg[0] == '@') + { + arg.erase(arg.begin()); + const auto& fs = Files::get_real_filesystem(); + auto lines = fs.read_lines(fs::u8path(arg)); + if (!lines.has_value()) + { + System::println(System::Color::error, "Error: Could not open response file %s", arg); + Checks::exit_fail(VCPKG_LINE_INFO); + } + std::copy(lines.get()->begin(), lines.get()->end(), std::back_inserter(v)); + } + else + { + v.emplace_back(std::move(arg)); + } } return VcpkgCmdArguments::create_from_arg_sequence(v.data(), v.data() + v.size()); diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 0903c2d7645..9a51818e8c1 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -9,6 +9,7 @@ #include #include #include +#include namespace vcpkg { @@ -39,6 +40,7 @@ namespace vcpkg paths.triplets = paths.root / "triplets"; paths.scripts = paths.root / "scripts"; + paths.tools = paths.downloads / "tools"; paths.buildsystems = paths.scripts / "buildsystems"; paths.buildsystems_msbuild_targets = paths.buildsystems / "msbuild" / "vcpkg.targets"; @@ -91,7 +93,13 @@ namespace vcpkg const fs::path& VcpkgPaths::get_tool_exe(const std::string& tool) const { - return this->tool_paths.get_lazy(tool, [&]() { return Commands::Fetch::get_tool_path(*this, tool); }); + if (!m_tool_cache) m_tool_cache = get_tool_cache(); + return m_tool_cache->get_tool_path(*this, tool); + } + const std::string& VcpkgPaths::get_tool_version(const std::string& tool) const + { + if (!m_tool_cache) m_tool_cache = get_tool_cache(); + return m_tool_cache->get_tool_version(*this, tool); } const Toolset& VcpkgPaths::get_toolset(const Build::PreBuildInfo& prebuildinfo) const @@ -113,9 +121,11 @@ namespace vcpkg return external_toolset; } - // Invariant: toolsets are non-empty and sorted with newest at back() +#if !defined(_WIN32) + Checks::exit_with_message(VCPKG_LINE_INFO, "Cannot build windows triplets from non-windows."); +#else const std::vector& vs_toolsets = - this->toolsets.get_lazy([this]() { return Commands::Fetch::find_toolset_instances(*this); }); + this->toolsets.get_lazy([this]() { return VisualStudio::find_toolset_instances_preferred_first(*this); }); std::vector candidates = Util::element_pointers(vs_toolsets); const auto tsv = prebuildinfo.platform_toolset.get(); @@ -127,8 +137,8 @@ namespace vcpkg if (tsv && vsp) { - Util::stable_keep_if( - candidates, [&](const Toolset* t) { return *tsv == t->version && *vsp == t->visual_studio_root_path; }); + Util::erase_remove_if( + candidates, [&](const Toolset* t) { return *tsv != t->version || *vsp != t->visual_studio_root_path; }); Checks::check_exit(VCPKG_LINE_INFO, !candidates.empty(), "Could not find Visual Studio instance at %s with %s toolset.", @@ -141,7 +151,7 @@ namespace vcpkg if (tsv) { - Util::stable_keep_if(candidates, [&](const Toolset* t) { return *tsv == t->version; }); + Util::erase_remove_if(candidates, [&](const Toolset* t) { return *tsv != t->version; }); Checks::check_exit( VCPKG_LINE_INFO, !candidates.empty(), "Could not find Visual Studio instance with %s toolset.", *tsv); } @@ -149,8 +159,8 @@ namespace vcpkg if (vsp) { const fs::path vs_root_path = *vsp; - Util::stable_keep_if(candidates, - [&](const Toolset* t) { return vs_root_path == t->visual_studio_root_path; }); + Util::erase_remove_if(candidates, + [&](const Toolset* t) { return vs_root_path != t->visual_studio_root_path; }); Checks::check_exit(VCPKG_LINE_INFO, !candidates.empty(), "Could not find Visual Studio instance at %s.", @@ -159,6 +169,8 @@ namespace vcpkg Checks::check_exit(VCPKG_LINE_INFO, !candidates.empty(), "No suitable Visual Studio instances were found"); return *candidates.front(); + +#endif } Files::Filesystem& VcpkgPaths::get_filesystem() const { return Files::get_real_filesystem(); } diff --git a/toolsrc/src/vcpkg/visualstudio.cpp b/toolsrc/src/vcpkg/visualstudio.cpp new file mode 100644 index 00000000000..83a530a100e --- /dev/null +++ b/toolsrc/src/vcpkg/visualstudio.cpp @@ -0,0 +1,326 @@ +#include "pch.h" + +#if defined(_WIN32) + +#include +#include +#include +#include + +namespace vcpkg::VisualStudio +{ + static constexpr CStringView V_120 = "v120"; + static constexpr CStringView V_140 = "v140"; + static constexpr CStringView V_141 = "v141"; + + struct VisualStudioInstance + { + enum class ReleaseType + { + STABLE, + PRERELEASE, + LEGACY + }; + + static std::string release_type_to_string(const ReleaseType& release_type) + { + switch (release_type) + { + case ReleaseType::STABLE: return "STABLE"; + case ReleaseType::PRERELEASE: return "PRERELEASE"; + case ReleaseType::LEGACY: return "LEGACY"; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + + static bool preferred_first_comparator(const VisualStudioInstance& left, const VisualStudioInstance& right) + { + const auto get_preference_weight = [](const ReleaseType& type) -> int { + switch (type) + { + case ReleaseType::STABLE: return 3; + case ReleaseType::PRERELEASE: return 2; + case ReleaseType::LEGACY: return 1; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + }; + + if (left.release_type != right.release_type) + { + return get_preference_weight(left.release_type) > get_preference_weight(right.release_type); + } + + return left.version > right.version; + } + + VisualStudioInstance(fs::path&& root_path, std::string&& version, const ReleaseType& release_type) + : root_path(std::move(root_path)), version(std::move(version)), release_type(release_type) + { + } + + fs::path root_path; + std::string version; + ReleaseType release_type; + + std::string to_string() const + { + return Strings::format("%s, %s, %s", root_path.u8string(), version, release_type_to_string(release_type)); + } + + std::string major_version() const { return version.substr(0, 2); } + }; + + static std::vector get_visual_studio_instances_internal(const VcpkgPaths& paths) + { + const auto& fs = paths.get_filesystem(); + std::vector instances; + + const auto& program_files_32_bit = System::get_program_files_32_bit().value_or_exit(VCPKG_LINE_INFO); + + // Instances from vswhere + const fs::path vswhere_exe = program_files_32_bit / "Microsoft Visual Studio" / "Installer" / "vswhere.exe"; + if (fs.exists(vswhere_exe)) + { + const auto code_and_output = System::cmd_execute_and_capture_output( + Strings::format(R"("%s" -all -prerelease -legacy -products * -format xml)", vswhere_exe.u8string())); + Checks::check_exit(VCPKG_LINE_INFO, + code_and_output.exit_code == 0, + "Running vswhere.exe failed with message:\n%s", + code_and_output.output); + + const auto instance_entries = + StringRange::find_all_enclosed(code_and_output.output, "", ""); + for (const StringRange& instance : instance_entries) + { + auto maybe_is_prerelease = + StringRange::find_at_most_one_enclosed(instance, "", ""); + + VisualStudioInstance::ReleaseType release_type = VisualStudioInstance::ReleaseType::LEGACY; + if (const auto p = maybe_is_prerelease.get()) + { + const auto s = p->to_string(); + if (s == "0") + release_type = VisualStudioInstance::ReleaseType::STABLE; + else if (s == "1") + release_type = VisualStudioInstance::ReleaseType::PRERELEASE; + else + Checks::unreachable(VCPKG_LINE_INFO); + } + + instances.emplace_back( + StringRange::find_exactly_one_enclosed(instance, "", "") + .to_string(), + StringRange::find_exactly_one_enclosed(instance, "", "") + .to_string(), + release_type); + } + } + + const auto append_if_has_cl = [&](fs::path&& path_root) { + const auto cl_exe = path_root / "VC" / "bin" / "cl.exe"; + const auto vcvarsall_bat = path_root / "VC" / "vcvarsall.bat"; + + if (fs.exists(cl_exe) && fs.exists(vcvarsall_bat)) + instances.emplace_back(std::move(path_root), "14.0", VisualStudioInstance::ReleaseType::LEGACY); + }; + + // VS2015 instance from environment variable + auto maybe_vs140_comntools = System::get_environment_variable("vs140comntools"); + if (const auto path_as_string = maybe_vs140_comntools.get()) + { + // We want lexically_normal(), but it is not available + // Correct root path might be 2 or 3 levels up, depending on if the path has trailing backslash. Try both. + auto common7_tools = fs::path{*path_as_string}; + append_if_has_cl(fs::path{*path_as_string}.parent_path().parent_path()); + append_if_has_cl(fs::path{*path_as_string}.parent_path().parent_path().parent_path()); + } + + // VS2015 instance from Program Files + append_if_has_cl(program_files_32_bit / "Microsoft Visual Studio 14.0"); + + return instances; + } + + std::vector get_visual_studio_instances(const VcpkgPaths& paths) + { + std::vector sorted{get_visual_studio_instances_internal(paths)}; + std::sort(sorted.begin(), sorted.end(), VisualStudioInstance::preferred_first_comparator); + return Util::fmap(sorted, [](const VisualStudioInstance& instance) { return instance.to_string(); }); + } + + std::vector find_toolset_instances_preferred_first(const VcpkgPaths& paths) + { + using CPU = System::CPUArchitecture; + + const auto& fs = paths.get_filesystem(); + + // Note: this will contain a mix of vcvarsall.bat locations and dumpbin.exe locations. + std::vector paths_examined; + + std::vector found_toolsets; + std::vector excluded_toolsets; + + const SortedVector sorted{get_visual_studio_instances_internal(paths), + VisualStudioInstance::preferred_first_comparator}; + + const bool v140_is_available = Util::find_if(sorted, [&](const VisualStudioInstance& vs_instance) { + return vs_instance.major_version() == "14"; + }) != sorted.end(); + + for (const VisualStudioInstance& vs_instance : sorted) + { + const std::string major_version = vs_instance.major_version(); + if (major_version >= "15") + { + const fs::path vc_dir = vs_instance.root_path / "VC"; + + // Skip any instances that do not have vcvarsall. + const fs::path vcvarsall_dir = vc_dir / "Auxiliary" / "Build"; + const fs::path vcvarsall_bat = vcvarsall_dir / "vcvarsall.bat"; + paths_examined.push_back(vcvarsall_bat); + if (!fs.exists(vcvarsall_bat)) continue; + + // Get all supported architectures + std::vector supported_architectures; + if (fs.exists(vcvarsall_dir / "vcvars32.bat")) + supported_architectures.push_back({"x86", CPU::X86, CPU::X86}); + if (fs.exists(vcvarsall_dir / "vcvars64.bat")) + supported_architectures.push_back({"amd64", CPU::X64, CPU::X64}); + if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat")) + supported_architectures.push_back({"x86_amd64", CPU::X86, CPU::X64}); + if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat")) + supported_architectures.push_back({"x86_arm", CPU::X86, CPU::ARM}); + if (fs.exists(vcvarsall_dir / "vcvarsx86_arm64.bat")) + supported_architectures.push_back({"x86_arm64", CPU::X86, CPU::ARM64}); + if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat")) + supported_architectures.push_back({"amd64_x86", CPU::X64, CPU::X86}); + if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat")) + supported_architectures.push_back({"amd64_arm", CPU::X64, CPU::ARM}); + if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm64.bat")) + supported_architectures.push_back({"amd64_arm64", CPU::X64, CPU::ARM64}); + + // Locate the "best" MSVC toolchain version + const fs::path msvc_path = vc_dir / "Tools" / "MSVC"; + std::vector msvc_subdirectories = fs.get_files_non_recursive(msvc_path); + Util::erase_remove_if(msvc_subdirectories, + [&fs](const fs::path& path) { return !fs.is_directory(path); }); + + // Sort them so that latest comes first + std::sort( + msvc_subdirectories.begin(), + msvc_subdirectories.end(), + [](const fs::path& left, const fs::path& right) { return left.filename() > right.filename(); }); + + for (const fs::path& subdir : msvc_subdirectories) + { + const fs::path dumpbin_path = subdir / "bin" / "HostX86" / "x86" / "dumpbin.exe"; + paths_examined.push_back(dumpbin_path); + if (fs.exists(dumpbin_path)) + { + const Toolset v141_toolset{ + vs_instance.root_path, dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures}; + + const auto english_language_pack = dumpbin_path.parent_path() / "1033"; + + if (!fs.exists(english_language_pack)) + { + excluded_toolsets.push_back(v141_toolset); + break; + } + + found_toolsets.push_back(v141_toolset); + + if (v140_is_available) + { + const Toolset v140_toolset{vs_instance.root_path, + dumpbin_path, + vcvarsall_bat, + {"-vcvars_ver=14.0"}, + V_140, + supported_architectures}; + found_toolsets.push_back(v140_toolset); + } + + break; + } + } + + continue; + } + + if (major_version == "14" || major_version == "12") + { + const fs::path vcvarsall_bat = vs_instance.root_path / "VC" / "vcvarsall.bat"; + + paths_examined.push_back(vcvarsall_bat); + if (fs.exists(vcvarsall_bat)) + { + const fs::path vs_dumpbin_exe = vs_instance.root_path / "VC" / "bin" / "dumpbin.exe"; + paths_examined.push_back(vs_dumpbin_exe); + + const fs::path vs_bin_dir = vcvarsall_bat.parent_path() / "bin"; + std::vector supported_architectures; + if (fs.exists(vs_bin_dir / "vcvars32.bat")) + supported_architectures.push_back({"x86", CPU::X86, CPU::X86}); + if (fs.exists(vs_bin_dir / "amd64\\vcvars64.bat")) + supported_architectures.push_back({"x64", CPU::X64, CPU::X64}); + if (fs.exists(vs_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat")) + supported_architectures.push_back({"x86_amd64", CPU::X86, CPU::X64}); + if (fs.exists(vs_bin_dir / "x86_arm\\vcvarsx86_arm.bat")) + supported_architectures.push_back({"x86_arm", CPU::X86, CPU::ARM}); + if (fs.exists(vs_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat")) + supported_architectures.push_back({"amd64_x86", CPU::X64, CPU::X86}); + if (fs.exists(vs_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat")) + supported_architectures.push_back({"amd64_arm", CPU::X64, CPU::ARM}); + + if (fs.exists(vs_dumpbin_exe)) + { + const Toolset toolset = {vs_instance.root_path, + vs_dumpbin_exe, + vcvarsall_bat, + {}, + major_version == "14" ? V_140 : V_120, + supported_architectures}; + + const auto english_language_pack = vs_dumpbin_exe.parent_path() / "1033"; + + if (!fs.exists(english_language_pack)) + { + excluded_toolsets.push_back(toolset); + break; + } + + found_toolsets.push_back(toolset); + } + } + } + } + + if (!excluded_toolsets.empty()) + { + System::println( + System::Color::warning, + "Warning: The following VS instances are excluded because the English language pack is unavailable."); + for (const Toolset& toolset : excluded_toolsets) + { + System::println(" %s", toolset.visual_studio_root_path.u8string()); + } + System::println(System::Color::warning, "Please install the English language pack."); + } + + if (found_toolsets.empty()) + { + System::println(System::Color::error, "Could not locate a complete toolset."); + System::println("The following paths were examined:"); + for (const fs::path& path : paths_examined) + { + System::println(" %s", path.u8string()); + } + Checks::exit_fail(VCPKG_LINE_INFO); + } + + return found_toolsets; + } +} + +#endif diff --git a/toolsrc/vcpkg.natvis b/toolsrc/vcpkg.natvis new file mode 100644 index 00000000000..7f9c7f61ec4 --- /dev/null +++ b/toolsrc/vcpkg.natvis @@ -0,0 +1,35 @@ + + + + {m_err} + + + + {m_err} + + + + val: {m_t} + err: {m_s} + + + val: {m_t} + err: {m_s} + + + {m_base.m_t} + empty + + + {*(std::string*)this} + + + {m_instance} + + + {m_cstr} + + + {_Mystr} + + \ No newline at end of file diff --git a/toolsrc/vcpkg.sln b/toolsrc/vcpkg.sln index eae73a76099..8d0c849c6ab 100644 --- a/toolsrc/vcpkg.sln +++ b/toolsrc/vcpkg.sln @@ -14,17 +14,10 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{F5893B21-EA71-4432-84D6-5FB0E0461A2A}" ProjectSection(SolutionItems) = preProject ..\scripts\bootstrap.ps1 = ..\scripts\bootstrap.ps1 - ..\scripts\fetchDependency.ps1 = ..\scripts\fetchDependency.ps1 - ..\scripts\findAnyMSBuildWithCppPlatformToolset.ps1 = ..\scripts\findAnyMSBuildWithCppPlatformToolset.ps1 - ..\scripts\findVisualStudioInstallationInstances.ps1 = ..\scripts\findVisualStudioInstallationInstances.ps1 ..\scripts\get_triplet_environment.cmake = ..\scripts\get_triplet_environment.cmake - ..\scripts\getProgramFiles32bit.ps1 = ..\scripts\getProgramFiles32bit.ps1 - ..\scripts\getProgramFilesPlatformBitness.ps1 = ..\scripts\getProgramFilesPlatformBitness.ps1 - ..\scripts\getWindowsSDK.ps1 = ..\scripts\getWindowsSDK.ps1 ..\scripts\internalCI.ps1 = ..\scripts\internalCI.ps1 ..\scripts\ports.cmake = ..\scripts\ports.cmake - ..\scripts\SHA256Hash.ps1 = ..\scripts\SHA256Hash.ps1 - ..\scripts\VcpkgPowershellUtils.ps1 = ..\scripts\VcpkgPowershellUtils.ps1 + ..\scripts\vcpkgTools.xml = ..\scripts\vcpkgTools.xml EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cmake", "cmake", "{A0122231-04D5-420B-81CA-7960946E5E65}" @@ -55,6 +48,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cmake", "cmake", "{A0122231 ..\scripts\cmake\vcpkg_install_meson.cmake = ..\scripts\cmake\vcpkg_install_meson.cmake EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BCE555DF-F471-4ACC-98E5-76CBE8E8F79E}" + ProjectSection(SolutionItems) = preProject + vcpkg.natvis = vcpkg.natvis + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 diff --git a/toolsrc/vcpkg/vcpkg.vcxproj b/toolsrc/vcpkg/vcpkg.vcxproj index 2ab94eb0aa0..8edea2244f2 100644 --- a/toolsrc/vcpkg/vcpkg.vcxproj +++ b/toolsrc/vcpkg/vcpkg.vcxproj @@ -52,20 +52,23 @@ - - - - - - - - - - - - - + + $(SolutionDir)msbuild.x86.debug\$(ProjectName)\ + $(SolutionDir)msbuild.x86.debug\ + + + $(SolutionDir)msbuild.x86.release\ + $(SolutionDir)msbuild.x86.release\$(ProjectName)\ + + + $(SolutionDir)msbuild.x64.debug\$(ProjectName)\ + $(SolutionDir)msbuild.x64.debug\ + + + $(SolutionDir)msbuild.x64.release\$(ProjectName)\ + $(SolutionDir)msbuild.x64.release\ + Level4 diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index 871d0c58deb..8df9b5b9d6d 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -55,20 +55,23 @@ - - - - - - - - - - - - - + + $(SolutionDir)msbuild.x86.debug\$(ProjectName)\ + $(SolutionDir)msbuild.x86.debug\ + + + $(SolutionDir)msbuild.x86.release\ + $(SolutionDir)msbuild.x86.release\$(ProjectName)\ + + + $(SolutionDir)msbuild.x64.debug\$(ProjectName)\ + $(SolutionDir)msbuild.x64.debug\ + + + $(SolutionDir)msbuild.x64.release\$(ProjectName)\ + $(SolutionDir)msbuild.x64.release\ + Level3 @@ -137,14 +140,18 @@ + + + + @@ -152,6 +159,7 @@ + @@ -177,6 +185,7 @@ + @@ -184,6 +193,7 @@ + @@ -192,13 +202,17 @@ Create Create + + + + @@ -214,8 +228,6 @@ - - @@ -224,6 +236,7 @@ + @@ -242,6 +255,7 @@ + @@ -249,6 +263,7 @@ + diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index 6a23a09b583..3e0ccd885f2 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -69,9 +69,6 @@ Source Files\vcpkg - - Source Files\vcpkg - Source Files\vcpkg @@ -198,7 +195,25 @@ Source Files\vcpkg - + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg\base + + + Source Files\vcpkg + + + Source Files\vcpkg\base + + + Source Files\vcpkg\base + + Source Files\vcpkg @@ -347,5 +362,26 @@ Header Files\vcpkg\base + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg\base + + + Header Files\vcpkg\base + + + Header Files\vcpkg + + + Header Files\vcpkg\base + + + Header Files\vcpkg\base + \ No newline at end of file diff --git a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj index a2ceef9ce8e..e533d0e15d6 100644 --- a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj +++ b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj @@ -52,20 +52,23 @@ - - - - - - - - - - - - - + + $(SolutionDir)msbuild.x86.debug\$(ProjectName)\ + $(SolutionDir)msbuild.x86.debug\ + + + $(SolutionDir)msbuild.x86.release\ + $(SolutionDir)msbuild.x86.release\$(ProjectName)\ + + + $(SolutionDir)msbuild.x64.debug\$(ProjectName)\ + $(SolutionDir)msbuild.x64.debug\ + + + $(SolutionDir)msbuild.x64.release\$(ProjectName)\ + $(SolutionDir)msbuild.x64.release\ + Level3 diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj b/toolsrc/vcpkgtest/vcpkgtest.vcxproj index a0d44918d28..4cda2946186 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj @@ -83,19 +83,23 @@ - - - - - - - - - - - - + + $(SolutionDir)msbuild.x86.debug\$(ProjectName)\ + $(SolutionDir)msbuild.x86.debug\ + + + $(SolutionDir)msbuild.x86.release\ + $(SolutionDir)msbuild.x86.release\$(ProjectName)\ + + + $(SolutionDir)msbuild.x64.debug\$(ProjectName)\ + $(SolutionDir)msbuild.x64.debug\ + + + $(SolutionDir)msbuild.x64.release\$(ProjectName)\ + $(SolutionDir)msbuild.x64.release\ + true