From 0dfb3d4b770c60800d5ae75832bf32970f95e964 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 9 Jun 2018 17:13:54 +0200 Subject: Initial take on vcpkg packaging --- .gitignore | 21 +++++++++++++++++++++ build/.gitignore | 3 +++ build/bootstrap.build | 7 +++++++ build/root.build | 10 ++++++++++ buildfile | 39 +++++++++++++++++++++++++++++++++++++++ manifest | 12 ++++++++++++ 6 files changed, 92 insertions(+) create mode 100644 .gitignore create mode 100644 build/.gitignore create mode 100644 build/bootstrap.build create mode 100644 build/root.build create mode 100644 buildfile create mode 100644 manifest diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c3de2e7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +.bdep/ + +# Compiler/linker output. +# +*.d +*.t +*.i +*.ii +*.o +*.obj +*.so +*.dll +*.a +*.lib +*.exp +*.pdb +*.ilk +*.exe +*.exe.dlls/ +*.exe.manifest +*.pc diff --git a/build/.gitignore b/build/.gitignore new file mode 100644 index 0000000..4a730a3 --- /dev/null +++ b/build/.gitignore @@ -0,0 +1,3 @@ +config.build +root/ +bootstrap/ diff --git a/build/bootstrap.build b/build/bootstrap.build new file mode 100644 index 0000000..0b3bb6f --- /dev/null +++ b/build/bootstrap.build @@ -0,0 +1,7 @@ +project = vcpkg + +using version +using config +using test +using dist +using install diff --git a/build/root.build b/build/root.build new file mode 100644 index 0000000..481ab0e --- /dev/null +++ b/build/root.build @@ -0,0 +1,10 @@ +cxx.std = latest + +using cxx + +hxx{*}: extension = h +cxx{*}: extension = cpp + +# The test target for cross-testing (running tests under Wine, etc). +# +test.target = $cxx.target diff --git a/buildfile b/buildfile new file mode 100644 index 0000000..9dde155 --- /dev/null +++ b/buildfile @@ -0,0 +1,39 @@ +./: vcpkg/ manifest + +vcpkg/ +{ + ./: toolsrc/ + + toolsrc/ + { + ./: vcpkg/exe{vcpkg} file{VERSION.txt} + + # @@ Specify extensions explicitly because of source file names like + # commands.edit.cpp. Failed that, we will end up treating, in this case + # .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/} + + cxx.poptions =+ -DDISABLE_METRICS=1 "-I$src_base/include" + + # Currently upstream is full of warnings, so disable for now. + # + if ($cxx.class == 'gcc') + cxx.coptions += -Wno-all -Wno-extra + + # For some standard libraries std::filesystem is in a separate library. + # + if ($cxx.stdlib == 'libstdc++') + cxx.libs += -lstdc++fs + elif ($cxx.stdlib == 'libc++') + cxx.libs += -lc++experimental + + if ($cxx.target.class == 'windows') + cxx.libs += bcrypt.lib + } +} diff --git a/manifest b/manifest new file mode 100644 index 0000000..51bd742 --- /dev/null +++ b/manifest @@ -0,0 +1,12 @@ +: 1 +name: vcpkg +version: 0.0.113+1 +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 +package-url: https://git.build2.org/cgit/packaging/vcpkg/ +build-email: builds@build2.org +depends: * build2 >= 0.8.0- +depends: * bpkg >= 0.8.0- -- cgit v1.1