1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 GO_PN=github.com/hanwen/${PN}
10 EGIT_COMMIT="8c85ded140ac1889372a0e22d8d21e3d10a303bd"
12 HOMEPAGE="https://${GO_PN}"
13 DESCRIPTION="FUSE bindings for Go"
14 SRC_URI="https://${GO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
21 DEPEND=">=dev-lang/go-1.3"
30 mkdir -p src/${GO_PN%/*} || die
31 mv ${PN}-${EGIT_COMMIT} src/${GO_PN} || die
35 sed -e "s:\(go \${target}\)\(.*\)$:\\1 -x \\2:" \
36 -e 's:^for target in "clean" "install" ; do$:for target in "install" ; do:' \
38 src/${GO_PN}/all.bash > src/${GO_PN}/all.bash.patched || die
42 # Create a filtered GOROOT tree out of symlinks,
43 # excluding go-fuse, for bug #503324.
44 cp -sR /usr/lib/go goroot || die
45 rm -rf goroot/src/${GO_PN} || die
46 rm -rf goroot/pkg/linux_${ARCH}/${GO_PN} || die
47 CGO_CFLAGS="${CFLAGS}" GOROOT="${WORKDIR}/goroot" GOPATH="${WORKDIR}" \
48 bash src/${GO_PN}/all.bash.patched || die
52 insopts -m0644 -p # preserve timestamps for bug 551486
55 insinto /usr/lib/go/src
56 rm src/${GO_PN}/all.bash.patched || die
57 egit_clean src/${GO_PN}