Merge pull request #5232 from kzys/freebsd-graph
Fix graph and pkg/graphdb on FreeBSD
This commit is contained in:
commit
3c50cb44d1
4 changed files with 11 additions and 3 deletions
|
@ -68,7 +68,7 @@ func ApplyLayer(dest string, layer ArchiveReader) error {
|
|||
parent := filepath.Dir(hdr.Name)
|
||||
parentPath := filepath.Join(dest, parent)
|
||||
if _, err := os.Lstat(parentPath); err != nil && os.IsNotExist(err) {
|
||||
err = os.MkdirAll(parentPath, 600)
|
||||
err = os.MkdirAll(parentPath, 0600)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -117,6 +117,14 @@ if [ "$(uname -s)" = 'FreeBSD' ]; then
|
|||
LDFLAGS="$LDFLAGS -extld clang"
|
||||
fi
|
||||
|
||||
# If sqlite3.h doesn't exist under /usr/include,
|
||||
# check /usr/local/include also just in case
|
||||
# (e.g. FreeBSD Ports installs it under the directory)
|
||||
if [ ! -e /usr/include/sqlite3.h ] && [ -e /usr/local/include/sqlite3.h ]; then
|
||||
export CGO_CFLAGS='-I/usr/local/include'
|
||||
export CGO_LDFLAGS='-L/usr/local/lib'
|
||||
fi
|
||||
|
||||
HAVE_GO_TEST_COVER=
|
||||
if \
|
||||
go help testflag | grep -- -cover > /dev/null \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// +build amd64
|
||||
// +build linux,amd64 freebsd,cgo
|
||||
|
||||
package graphdb
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// +build !linux !amd64
|
||||
// +build !linux,!freebsd linux,!amd64 freebsd,!cgo
|
||||
|
||||
package graphdb
|
||||
|
||||
|
|
Loading…
Reference in a new issue