File tree Expand file tree Collapse file tree 4 files changed +44
-9
lines changed Expand file tree Collapse file tree 4 files changed +44
-9
lines changed Original file line number Diff line number Diff line change @@ -9,3 +9,16 @@ test: build-libgit2
9
9
10
10
install : build-libgit2
11
11
go install ./...
12
+
13
+ build-libgit2 :
14
+ ./script/build-libgit2-static.sh
15
+
16
+ static : build-libgit2
17
+ go run script/check-MakeGitError-thread-lock.go
18
+ go test --tags " static" ./...
19
+
20
+ install-static : build-libgit2
21
+ go install --tags " static" ./...
22
+
23
+ test-static : build-libgit2
24
+ go test --tags " static" ./...
Original file line number Diff line number Diff line change 1
1
package git
2
2
3
3
/*
4
- #cgo CFLAGS: -I${SRCDIR}/vendor/libgit2/include
5
- #cgo LDFLAGS: -L${SRCDIR}/vendor/libgit2/build/ -lgit2
6
- #cgo windows LDFLAGS: -lwinhttp
7
- #cgo !windows pkg-config: --static ${SRCDIR}/vendor/libgit2/build/libgit2.pc
8
4
#include <git2.h>
9
5
#include <git2/sys/openssl.h>
10
-
11
- #if LIBGIT2_VER_MAJOR != 0 || LIBGIT2_VER_MINOR != 25
12
- # error "Invalid libgit2 version; this git2go supports libgit2 v0.25"
13
- #endif
14
-
15
6
*/
16
7
import "C"
17
8
import (
Original file line number Diff line number Diff line change
1
+ // +build !static
2
+
3
+ package git
4
+
5
+ /*
6
+ #include <git2.h>
7
+ #cgo pkg-config: libgit2
8
+
9
+ #if LIBGIT2_VER_MAJOR != 0 || LIBGIT2_VER_MINOR != 25
10
+ # error "Invalid libgit2 version; this git2go supports libgit2 v0.25"
11
+ #endif
12
+
13
+ */
14
+ import "C"
Original file line number Diff line number Diff line change
1
+ // +build static
2
+
3
+ package git
4
+
5
+ /*
6
+ #cgo CFLAGS: -I${SRCDIR}/vendor/libgit2/include
7
+ #cgo LDFLAGS: -L${SRCDIR}/vendor/libgit2/build/ -lgit2
8
+ #cgo windows LDFLAGS: -lwinhttp
9
+ #cgo !windows pkg-config: --static ${SRCDIR}/vendor/libgit2/build/libgit2.pc
10
+ #include <git2.h>
11
+
12
+ #if LIBGIT2_VER_MAJOR != 0 || LIBGIT2_VER_MINOR != 25
13
+ # error "Invalid libgit2 version; this git2go supports libgit2 v0.25"
14
+ #endif
15
+
16
+ */
17
+ import "C"
You can’t perform that action at this time.
0 commit comments