Merge branch 'v22'
This commit is contained in:
commit
a2878cf7b2
|
@ -1,3 +0,0 @@
|
||||||
[submodule "vendor/libgit2"]
|
|
||||||
path = vendor/libgit2
|
|
||||||
url = https://github.com/libgit2/libgit2
|
|
|
@ -1,5 +1,14 @@
|
||||||
language: go
|
language: go
|
||||||
|
|
||||||
|
install:
|
||||||
|
- cd "${HOME}"
|
||||||
|
- wget -O libgit2-0.22.1.tar.gz https://github.com/libgit2/libgit2/archive/v0.22.1.tar.gz
|
||||||
|
- tar -xzvf libgit2-0.22.1.tar.gz
|
||||||
|
- cd libgit2-0.22.1 && mkdir build && cd build
|
||||||
|
- cmake -DTHREADSAFE=ON -DBUILD_CLAR=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DCMAKE_INSTALL_PREFIX=/usr/local .. && make && sudo make install
|
||||||
|
- sudo ldconfig
|
||||||
|
- cd "${TRAVIS_BUILD_DIR}"
|
||||||
|
|
||||||
go:
|
go:
|
||||||
- 1.1
|
- 1.1
|
||||||
- 1.2
|
- 1.2
|
||||||
|
|
11
Makefile
11
Makefile
|
@ -1,11 +1,8 @@
|
||||||
default: test
|
default: test
|
||||||
|
|
||||||
build-libgit2:
|
test:
|
||||||
./script/build-libgit2-static.sh
|
|
||||||
|
|
||||||
test: build-libgit2
|
|
||||||
go run script/check-MakeGitError-thread-lock.go
|
go run script/check-MakeGitError-thread-lock.go
|
||||||
./script/with-static.sh go test ./...
|
go test ./...
|
||||||
|
|
||||||
install: build-libgit2
|
install:
|
||||||
./script/with-static.sh go install ./...
|
go install ./...
|
||||||
|
|
1
git.go
1
git.go
|
@ -3,6 +3,7 @@ package git
|
||||||
/*
|
/*
|
||||||
#include <git2.h>
|
#include <git2.h>
|
||||||
#include <git2/sys/openssl.h>
|
#include <git2/sys/openssl.h>
|
||||||
|
#cgo pkg-config: libgit2
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
VENDORED_PATH=vendor/libgit2
|
|
||||||
|
|
||||||
cd $VENDORED_PATH &&
|
|
||||||
mkdir -p install/lib &&
|
|
||||||
mkdir -p build &&
|
|
||||||
cd build &&
|
|
||||||
cmake -DTHREADSAFE=ON \
|
|
||||||
-DBUILD_CLAR=OFF \
|
|
||||||
-DBUILD_SHARED_LIBS=OFF \
|
|
||||||
-DCMAKE_C_FLAGS=-fPIC \
|
|
||||||
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
|
|
||||||
-DCMAKE_INSTALL_PREFIX=../install \
|
|
||||||
.. &&
|
|
||||||
|
|
||||||
cmake --build .
|
|
|
@ -1,12 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
export BUILD="$PWD/vendor/libgit2/build"
|
|
||||||
export PCFILE="$BUILD/libgit2.pc"
|
|
||||||
|
|
||||||
FLAGS=$(pkg-config --static --libs $PCFILE) || exit 1
|
|
||||||
export CGO_LDFLAGS="$BUILD/libgit2.a -L$BUILD ${FLAGS}"
|
|
||||||
export CGO_CFLAGS="-I$PWD/vendor/libgit2/include"
|
|
||||||
|
|
||||||
$@
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 04bdd97f2b63793a8720fd19007911e946ba3c55
|
|
Loading…
Reference in New Issue