@@ -30,37 +30,37 @@ meeting](https://docs.google.com/document/d/1l_M0om0qUEN_NNiGgpqJ2tvsF2iioHkaARD
30
30
31
31
### Installing required dependencies
32
32
33
- The dependency [ libgit2] ( https://libgit2.org/ ) needs to be installed to be able to run
34
- Source Controller or its test-suite locally (not in a container).
33
+ The dependency [ libgit2] ( https://libgit2.org/ ) needs to be installed to be able
34
+ to run source-controller or its test-suite locally (not in a container).
35
35
36
- ** macOS **
37
- ```
38
- brew install libgit2
39
- ```
36
+ In case this dependency is not present on your system (at the expected
37
+ version), the first invocation of a ` make ` target that requires the
38
+ dependency will attempt to compile it locally to ` hack/ libgit2` . For this build
39
+ to succeed; CMake, Docker, OpenSSL 1.1 and LibSSH2 must be present on the system.
40
40
41
- ** Arch Linux **
42
- ```
43
- pacman -S libgit2
44
- ```
41
+ Triggering a manual build of the dependency is possible as well by running
42
+ ` make libgit2 ` . To enforce the build, for example if your system dependencies
43
+ match but are not linked in a compatible way, append ` LIBGIT2_FORCE=1 ` to the
44
+ ` make ` command.
45
45
46
- ** Building from source **
46
+ #### macOS
47
47
48
- 1 . Ensure [ ` cmake ` ] ( https://cmake.org ) is available on your system.
49
- 1 . Download and unarchive [ the right ` libgit2 ` version] ( https://github.com/libgit2/git2go#which-go-version-to-use )
50
- for our current ` git2go ` dependency:
48
+ ``` console
49
+ $ # Ensure libgit2 dependencies are available
50
+ $
brew install cmake [email protected] libssh2
51
+ $ LIBGIT2_FORCE=1 make libgit2
52
+ ```
53
+
54
+ #### Linux
51
55
52
- ``` console
53
- $ LIBGIT2_VER=1.1.0
54
- $ curl -L https://github.com/libgit2/libgit2/releases/download/v$LIBGIT2_VER/libgit2-$LIBGIT2_VER.tar.gz -o /tmp/libgit2.tar.gz
55
- $ tar -xvf /tmp/libgit2.tar.gz -C /tmp/libgit2-$LIBGIT2_VER
56
- ```
57
- 1 . Build and install the library on your system:
56
+ ``` console
57
+ $ # Ensure libgit2 dependencies are available
58
+ $ pacman -S cmake openssl libssh2
59
+ $ LIBGIT2_FORCE=1 make libgit2
60
+ ```
58
61
59
- ``` console
60
- $ mkdir /tmp/libgit2-$LIBGIT2_VER/build && cd /tmp/libgit2-$LIBGIT2_VER/build
61
- $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr
62
- $ sudo cmake --build . --target install
63
- ```
62
+ ** Note:** Example shown is for Arch Linux, but likewise procedure can be
63
+ followed using any other package manager, e.g. ` apt ` .
64
64
65
65
### How to run the test suite
66
66
0 commit comments