1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 DESCRIPTION="FUSE bindings for Go"
10 GO_PN=github.com/hanwen/${PN}
11 HOMEPAGE="https://${GO_PN}"
12 EGIT_COMMIT="8c85ded140ac1889372a0e22d8d21e3d10a303bd"
13 SRC_URI="https://${GO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
17 DEPEND=">=dev-lang/go-1.3"
23 mkdir -p src/${GO_PN%/*} || die
24 mv ${PN}-${EGIT_COMMIT} src/${GO_PN} || die
28 sed -e "s:\(go \${target}\)\(.*\)$:\\1 -x \\2:" \
29 -e 's:^for target in "clean" "install" ; do$:for target in "install" ; do:' \
31 src/${GO_PN}/all.bash > src/${GO_PN}/all.bash.patched || die
35 # Create a filtered GOROOT tree out of symlinks,
36 # excluding go-fuse, for bug #503324.
37 cp -sR /usr/lib/go goroot || die
38 rm -rf goroot/src/${GO_PN} || die
39 rm -rf goroot/pkg/linux_${ARCH}/${GO_PN} || die
40 CGO_CFLAGS="${CFLAGS}" GOROOT="${WORKDIR}/goroot" GOPATH="${WORKDIR}" \
41 bash src/${GO_PN}/all.bash.patched || die
45 insopts -m0644 -p # preserve timestamps for bug 551486
48 insinto /usr/lib/go/src
49 rm src/${GO_PN}/all.bash.patched || die
50 find src/${GO_PN} -name .gitignore -delete