From cf17f2bc98b51f8ef8eb600de125659056d36983 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 12 Jun 2018 14:08:15 +0200 Subject: Add support for install, other minor tweaks --- buildfile | 46 +++++++++++++++++++++++++++++++++++++++++----- manifest | 5 +++-- 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/buildfile b/buildfile index 9dde155..b21fc4e 100644 --- a/buildfile +++ b/buildfile @@ -13,13 +13,11 @@ vcpkg/ # .edit, as a specified extension (because the pattern machinery will # remove .cpp from matches that it has added to the pattern). # - # @@ Not clear what's the right place for the excutable. - # vcpkg/exe{vcpkg}: cxx{src/vcpkg/**.cpp +src/vcpkg} \ - hxx{include/vcpkg/**.h +include/pch} \ - fsdir{vcpkg/} + hxx{include/vcpkg/**.h +include/pch} - cxx.poptions =+ -DDISABLE_METRICS=1 "-I$src_base/include" + cxx.poptions =+ "-I$src_base/include" -DDISABLE_METRICS=1 \ +-DVCPKG_VERSION="+$version.revision-build2" # Currently upstream is full of warnings, so disable for now. # @@ -36,4 +34,42 @@ vcpkg/ if ($cxx.target.class == 'windows') cxx.libs += bcrypt.lib } + + # The goal here is to distribute pretty much the entire vcpkg repository so + # that the resulting package can be used in the same way as a repository + # clone (which is the "standard" way of using vcpkg). + # + ./: docs/file{**} \ + ports/file{**} \ + scripts/file{** -bootstrap.*} \ + triplets/file{**} \ + file{.vcpkg-root} \ + doc{LICENSE.txt CHANGELOG.md README.md} +} + +# Standard install doesn't make much sense with the way vcpkg works so we are +# going to repurpose it to create a "vcpkg build root" (which should contain +# all the ports, script, etc). In other words, you should be able to do: +# +# b install config.install.root=/tmp/vcpkg +# vcpkg install --vcpkg-root /tmp/vcpkg libfoo +# +manifest@./: install = root/ + +vcpkg/ +{ + # Only install what we explicitly list. + # + file{*}: install = false + + file{.vcpkg-root}@./: install = root/ + + ports/file{*}: install = root/ports/ + ports/file{*}: install.subdirs = true + + scripts/file{*}: install = root/scripts/ + scripts/file{*}: install.subdirs = true + + triplets/file{*}: install = root/triplets/ + triplets/file{*}: install.subdirs = true } diff --git a/manifest b/manifest index 51bd742..df389bd 100644 --- a/manifest +++ b/manifest @@ -1,12 +1,13 @@ : 1 name: vcpkg -version: 0.0.113+1 +version: 0.0.113+2 summary: C++ Library Manager for Windows, Linux, and MacOS license: MIT tags: library, package, manager url: https://github.com/Microsoft/vcpkg -email: packaging@build2.org +email: vcpkg@microsoft.com package-url: https://git.build2.org/cgit/packaging/vcpkg/ +package-email: packaging@build2.org build-email: builds@build2.org depends: * build2 >= 0.8.0- depends: * bpkg >= 0.8.0- -- cgit v1.1