Merge pull request #5232 from kzys/freebsd-graph

Fix graph and pkg/graphdb on FreeBSD
This commit is contained in:
Guillaume J. Charmes 2014-04-21 10:39:50 -07:00
commit 3c50cb44d1
4 changed files with 11 additions and 3 deletions

View File

@ -68,7 +68,7 @@ func ApplyLayer(dest string, layer ArchiveReader) error {
parent := filepath.Dir(hdr.Name) parent := filepath.Dir(hdr.Name)
parentPath := filepath.Join(dest, parent) parentPath := filepath.Join(dest, parent)
if _, err := os.Lstat(parentPath); err != nil && os.IsNotExist(err) { if _, err := os.Lstat(parentPath); err != nil && os.IsNotExist(err) {
err = os.MkdirAll(parentPath, 600) err = os.MkdirAll(parentPath, 0600)
if err != nil { if err != nil {
return err return err
} }

View File

@ -117,6 +117,14 @@ if [ "$(uname -s)" = 'FreeBSD' ]; then
LDFLAGS="$LDFLAGS -extld clang" LDFLAGS="$LDFLAGS -extld clang"
fi 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= HAVE_GO_TEST_COVER=
if \ if \
go help testflag | grep -- -cover > /dev/null \ go help testflag | grep -- -cover > /dev/null \

View File

@ -1,4 +1,4 @@
// +build amd64 // +build linux,amd64 freebsd,cgo
package graphdb package graphdb

View File

@ -1,4 +1,4 @@
// +build !linux !amd64 // +build !linux,!freebsd linux,!amd64 freebsd,!cgo
package graphdb package graphdb