diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2018-11-06 15:47:02 -0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-11-06 15:47:02 -0800 |
| commit | d2ffdca39b4cbc250d4ae753b6017f9fa631b5bb (patch) | |
| tree | 3e8a2bae21a1eafba6b21c041ba542330f30518a | |
| parent | 2c72e57bf453c7d22744cb210e28a6c967f4ed25 (diff) | |
| download | vcpkg-d2ffdca39b4cbc250d4ae753b6017f9fa631b5bb.tar.gz vcpkg-d2ffdca39b4cbc250d4ae753b6017f9fa631b5bb.zip | |
[docs] Regenerate docs for vcpkg_from_git
| -rw-r--r-- | docs/maintainers/portfile-functions.md | 1 | ||||
| -rw-r--r-- | docs/maintainers/vcpkg_from_git.md | 48 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_from_git.cmake | 14 |
3 files changed, 60 insertions, 3 deletions
diff --git a/docs/maintainers/portfile-functions.md b/docs/maintainers/portfile-functions.md index 3180609ad..1aad301eb 100644 --- a/docs/maintainers/portfile-functions.md +++ b/docs/maintainers/portfile-functions.md @@ -16,6 +16,7 @@ - [vcpkg\_extract\_source\_archive](vcpkg_extract_source_archive.md)
- [vcpkg\_find\_acquire\_program](vcpkg_find_acquire_program.md)
- [vcpkg\_from\_bitbucket](vcpkg_from_bitbucket.md)
+- [vcpkg\_from\_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)
diff --git a/docs/maintainers/vcpkg_from_git.md b/docs/maintainers/vcpkg_from_git.md new file mode 100644 index 000000000..6b24a558d --- /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 <SOURCE_PATH> + URL <https://android.googlesource.com/platform/external/fdlibm> + REF <59f7335e4d...> + SHA512 <abcdef123...> + [PATCHES <patch1.patch> <patch2.patch>...] +) +``` + +## 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/scripts/cmake/vcpkg_from_git.cmake b/scripts/cmake/vcpkg_from_git.cmake index c2965292d..5f6930412 100644 --- a/scripts/cmake/vcpkg_from_git.cmake +++ b/scripts/cmake/vcpkg_from_git.cmake @@ -7,7 +7,8 @@ ## vcpkg_from_git( ## OUT_SOURCE_PATH <SOURCE_PATH> ## URL <https://android.googlesource.com/platform/external/fdlibm> -## [REF <59f7335e4d...>] +## REF <59f7335e4d...> +## SHA512 <abcdef123...> ## [PATCHES <patch1.patch> <patch2.patch>...] ## ) ## ``` @@ -21,8 +22,15 @@ ## ### 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 -## The full commit id of the current latest master. +## 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. @@ -30,7 +38,7 @@ ## Relative paths are based on the port directory. ## ## ## Notes: -## `REF` and `URL` must be specified. +## `OUT_SOURCE_PATH`, `REF`, `SHA512`, and `URL` must be specified. ## ## ## Examples: ## |
