mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-30 18:12:08 +02:00
feat(dev-lang/go): import from portage
Change-Id: I8030fef6bb5ad961e9b27841aec82f6180b3eaef
This commit is contained in:
parent
a7608cab18
commit
52aa24c14c
43
sdk_container/src/third_party/portage-stable/dev-lang/go/ChangeLog
vendored
Normal file
43
sdk_container/src/third_party/portage-stable/dev-lang/go/ChangeLog
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
# ChangeLog for dev-lang/go
|
||||
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/go/ChangeLog,v 1.7 2012/10/29 15:57:40 williamh Exp $
|
||||
|
||||
*go-1.0.3 (29 Oct 2012)
|
||||
|
||||
29 Oct 2012; William Hubbs <williamh@gentoo.org> +go-1.0.3.ebuild,
|
||||
+files/go-1.0.3-hardened.patch, go-9999.ebuild:
|
||||
version bump and sync live ebuild
|
||||
|
||||
14 Sep 2012; Markus Meier <maekke@gentoo.org> go-1.0.2.ebuild:
|
||||
add ~arm, bug #416133
|
||||
|
||||
01 Sep 2012; William Hubbs <williamh@gentoo.org> go-1.0.2.ebuild,
|
||||
go-9999.ebuild:
|
||||
Fix arm5 detection thanks to Markus Meier.
|
||||
|
||||
*go-1.0.2 (30 Jul 2012)
|
||||
|
||||
30 Jul 2012; William Hubbs <williamh@gentoo.org> +go-1.0.2.ebuild,
|
||||
+files/go-1.0.2-hardened.patch, go-9999.ebuild:
|
||||
Version bump and sync live ebuild.
|
||||
This also includes a patch from upstream to add the pax flags header to
|
||||
binaries.
|
||||
|
||||
12 Jun 2012; William Hubbs <williamh@gentoo.org> go-1.0.1.ebuild,
|
||||
go-9999.ebuild:
|
||||
Add optional depend on gvim for bug #419957 thanks to
|
||||
michel.boaventura@gmail.com.
|
||||
|
||||
16 May 2012; William Hubbs <williamh@gentoo.org> go-9999.ebuild:
|
||||
sync live ebuild and test repoman commit
|
||||
|
||||
*go-9999 (15 May 2012)
|
||||
*go-1.0.1 (15 May 2012)
|
||||
|
||||
15 May 2012; William Hubbs <williamh@gentoo.org> +go-1.0.1.ebuild,
|
||||
+files/go-1.0.1-hardened.patch, +go-9999.ebuild, +metadata.xml:
|
||||
Initial commit for bug #342505.
|
||||
I would like to thank johnny@9souldier.org for the initial report and
|
||||
ebuild. Also, I would like to thank powerman-asdf@yandex.ru for the
|
||||
original hardened patch and everyone else who worked with me on the bug
|
||||
so we could get this into the tree.
|
19
sdk_container/src/third_party/portage-stable/dev-lang/go/Manifest
vendored
Normal file
19
sdk_container/src/third_party/portage-stable/dev-lang/go/Manifest
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA256
|
||||
|
||||
AUX go-1.0.2-hardened.patch 1306 SHA256 793f3b25c8fdcaa39415388ee534aabeceb48c2c08ce1f59d7fa16abaf1034d2 SHA512 d31a11157884e6ea03d21c8bfab03087264f458ef120250e4e919a7eb595f30fbde913bb970918b0cb3af86ea6aefa59ab254af84a9295ab933f045a60e31085 WHIRLPOOL dcafb608fc2e1a2e4d72dfca7d0a58543f8a05a6f99502f74e4558764be33536392bbc63ef1c7c7fe21b7cf8e26b3cea46feee3d2d376bf4458f3ce6d16691ee
|
||||
AUX go-1.0.3-hardened.patch 1306 SHA256 793f3b25c8fdcaa39415388ee534aabeceb48c2c08ce1f59d7fa16abaf1034d2 SHA512 d31a11157884e6ea03d21c8bfab03087264f458ef120250e4e919a7eb595f30fbde913bb970918b0cb3af86ea6aefa59ab254af84a9295ab933f045a60e31085 WHIRLPOOL dcafb608fc2e1a2e4d72dfca7d0a58543f8a05a6f99502f74e4558764be33536392bbc63ef1c7c7fe21b7cf8e26b3cea46feee3d2d376bf4458f3ce6d16691ee
|
||||
DIST go1.0.2.src.tar.gz 9676404 SHA256 70fcfb455087c14cc59b7a65c78003fcd1323d73f9b991c1e52db535d6bc95a8 SHA512 ca91a5985236f78c90bda9a1ec652b2b34c2cde3048c0b0c8c0a466ee85b1174d399184a25267959262b8388f51e3eaf2dd39909ec3474765b2c14006c970a23 WHIRLPOOL a6a2ea7971b2283b0aa52877b8d85357d59912e35b3968bb4ecd3a0470bb57638174a28b993e74b0fa6238a49360dcab53807ec84855f4f50122f2feebcc6c33
|
||||
DIST go1.0.3.src.tar.gz 7404849 SHA256 7fba3533d172f13629d3d8a79e57c620632b0bd075abe11d7698b338be0ae3df SHA512 8006b1c38b7d49f3ae040e405d1897218cbc941a81349f270e6f5fdfeb84ed9267cfcbadb414da4cef1135bb0e2377b295ade3f3d6411c6ae15149f7e1b717b1 WHIRLPOOL 15d8576a7210dcac0da45e3e43686e2b3135c01cc047f8881338fb437a54fd56c69b8eacbc1a395ebc0813e6940bbdfcde37518b214ba162851bc669a268b0f4
|
||||
EBUILD go-1.0.2.ebuild 3191 SHA256 7dede5ef3aff941a9d11154ccfb7db7c7091d98b3df6c900da80c5687c2926d6 SHA512 97c889c9b43302ca7fe2fd10999086e2248930ae0104e9dfbc77b36d1fcafb62076a517fb49df0ab65fc7dcd288e166ee220e2b694a67f688dcfe04131b4682d WHIRLPOOL 98d190be371d00a3514372efda7bc25335746681b66b751098b5c9232c412f4523ecdd17fd164e22abe3e3e7ff5069bf029eec4aa16e2beadd8766aec16e5af5
|
||||
EBUILD go-1.0.3.ebuild 3134 SHA256 0d58b3bde7380cb117dfeb02875f315b6e88444aeb5ced939ca4a95ba2e10e7e SHA512 5175b4f57225504c71557870c9a96c6310346560ad3b04516ce21160e75d5dd540f5733130e5faefc1f1158e6d46ee49f56c140aa6c6a8413939951357f7004e WHIRLPOOL a1ffa4e955d54b06b27d69b725aee0a1341149c6f7c5a4fc905e73b32bdb5a78b789d23a5e953b1921e95b8af351340273b48023b11c14219405b29e2182a310
|
||||
EBUILD go-9999.ebuild 3133 SHA256 a6e7b528addaec0bae01c9cbf3185dc9b85ed68803d954b3135f07d820121996 SHA512 8fa7235018eafd5c2c242886bd0aff02731be12facb6eb69540584186418b65946e545ff7f45b15287c2218289624e7ae469938f9358bdb7ce8dd32432e8d94a WHIRLPOOL 7453ff1117c67e294869d9b9556e2aea0b9747ee2485449d86e26916dc768a5f4bd4d714c8e4048937478785a9dc122f03a06cfa8a099ca8bb9192671711447f
|
||||
MISC ChangeLog 1624 SHA256 2860328f9b9afd262a022457ae15e70043fd383ebfa0c50a695c7b3a39c440f1 SHA512 eae3e87add389c06e3a1c5b6eed1d50589de1f697f7b758cbeae8936d571792b60ac25db16fa4a801c8bf5d79d12148b013e9aac8eb527fc71161374e4d48407 WHIRLPOOL 0985904aec869647257e50ba198f765d62713b4e52789fe20b139868af4bc92d5981e3cd3107f11648d0b84ab97f7ee4b7af89fbd94b7a5ba7d83188f990fd1d
|
||||
MISC metadata.xml 448 SHA256 d53ad6b454d72353e0308a91a989a1a3345ae97c0199748dee1862576ad4476a SHA512 0c5fb551437353e87f87c91e576ef224b770f686700150c19e7f34e6903ba26910293bb74db9732a220006b873113662464646dd96e61503e4aa90cc84e14f75 WHIRLPOOL b3846a0fad8844ad7ec961b512cb12a9d588bfac28b2dc53798399ac8628ccbf6c06c5666b03eabef05b0acb0cea04d563252eaaa893341c5b3fe59475ffdab5
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v2.0.19 (GNU/Linux)
|
||||
|
||||
iEYEAREIAAYFAlCOp4sACgkQblQW9DDEZThPxQCghfX0I3Z0KGw19jBXPWfPyClI
|
||||
r3QAnRr7zeRs+j9jk5G/kfRS0c4VoypJ
|
||||
=epUm
|
||||
-----END PGP SIGNATURE-----
|
44
sdk_container/src/third_party/portage-stable/dev-lang/go/files/go-1.0.2-hardened.patch
vendored
Normal file
44
sdk_container/src/third_party/portage-stable/dev-lang/go/files/go-1.0.2-hardened.patch
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
Index: src/cmd/6l/asm.c
|
||||
===================================================================
|
||||
--- a/src/cmd/6l/asm.c
|
||||
+++ b/src/cmd/6l/asm.c
|
||||
@@ -1082,6 +1082,11 @@
|
||||
ph->type = PT_GNU_STACK;
|
||||
ph->flags = PF_W+PF_R;
|
||||
ph->align = 8;
|
||||
+
|
||||
+ ph = newElfPhdr();
|
||||
+ ph->type = PT_PAX_FLAGS;
|
||||
+ ph->flags = 0x2a00; // mprotect, randexec, emutramp disabled
|
||||
+ ph->align = 8;
|
||||
|
||||
sh = newElfShstrtab(elfstr[ElfStrShstrtab]);
|
||||
sh->type = SHT_STRTAB;
|
||||
Index: src/cmd/8l/asm.c
|
||||
===================================================================
|
||||
--- a/src/cmd/8l/asm.c
|
||||
+++ b/src/cmd/8l/asm.c
|
||||
@@ -1127,6 +1127,11 @@
|
||||
ph->flags = PF_W+PF_R;
|
||||
ph->align = 4;
|
||||
|
||||
+ ph = newElfPhdr();
|
||||
+ ph->type = PT_PAX_FLAGS;
|
||||
+ ph->flags = 0x2a00; // mprotect, randexec, emutramp disabled
|
||||
+ ph->align = 8;
|
||||
+
|
||||
sh = newElfShstrtab(elfstr[ElfStrShstrtab]);
|
||||
sh->type = SHT_STRTAB;
|
||||
sh->addralign = 1;
|
||||
Index: src/cmd/ld/elf.h
|
||||
===================================================================
|
||||
--- a/src/cmd/ld/elf.h
|
||||
+++ b/src/cmd/ld/elf.h
|
||||
@@ -251,6 +251,7 @@
|
||||
#define PT_LOPROC 0x70000000 /* First processor-specific type. */
|
||||
#define PT_HIPROC 0x7fffffff /* Last processor-specific type. */
|
||||
#define PT_GNU_STACK 0x6474e551
|
||||
+#define PT_PAX_FLAGS 0x65041580
|
||||
|
||||
/* Values for p_flags. */
|
||||
#define PF_X 0x1 /* Executable. */
|
44
sdk_container/src/third_party/portage-stable/dev-lang/go/files/go-1.0.3-hardened.patch
vendored
Normal file
44
sdk_container/src/third_party/portage-stable/dev-lang/go/files/go-1.0.3-hardened.patch
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
Index: src/cmd/6l/asm.c
|
||||
===================================================================
|
||||
--- a/src/cmd/6l/asm.c
|
||||
+++ b/src/cmd/6l/asm.c
|
||||
@@ -1082,6 +1082,11 @@
|
||||
ph->type = PT_GNU_STACK;
|
||||
ph->flags = PF_W+PF_R;
|
||||
ph->align = 8;
|
||||
+
|
||||
+ ph = newElfPhdr();
|
||||
+ ph->type = PT_PAX_FLAGS;
|
||||
+ ph->flags = 0x2a00; // mprotect, randexec, emutramp disabled
|
||||
+ ph->align = 8;
|
||||
|
||||
sh = newElfShstrtab(elfstr[ElfStrShstrtab]);
|
||||
sh->type = SHT_STRTAB;
|
||||
Index: src/cmd/8l/asm.c
|
||||
===================================================================
|
||||
--- a/src/cmd/8l/asm.c
|
||||
+++ b/src/cmd/8l/asm.c
|
||||
@@ -1127,6 +1127,11 @@
|
||||
ph->flags = PF_W+PF_R;
|
||||
ph->align = 4;
|
||||
|
||||
+ ph = newElfPhdr();
|
||||
+ ph->type = PT_PAX_FLAGS;
|
||||
+ ph->flags = 0x2a00; // mprotect, randexec, emutramp disabled
|
||||
+ ph->align = 8;
|
||||
+
|
||||
sh = newElfShstrtab(elfstr[ElfStrShstrtab]);
|
||||
sh->type = SHT_STRTAB;
|
||||
sh->addralign = 1;
|
||||
Index: src/cmd/ld/elf.h
|
||||
===================================================================
|
||||
--- a/src/cmd/ld/elf.h
|
||||
+++ b/src/cmd/ld/elf.h
|
||||
@@ -251,6 +251,7 @@
|
||||
#define PT_LOPROC 0x70000000 /* First processor-specific type. */
|
||||
#define PT_HIPROC 0x7fffffff /* Last processor-specific type. */
|
||||
#define PT_GNU_STACK 0x6474e551
|
||||
+#define PT_PAX_FLAGS 0x65041580
|
||||
|
||||
/* Values for p_flags. */
|
||||
#define PF_X 0x1 /* Executable. */
|
139
sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.0.2.ebuild
vendored
Normal file
139
sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.0.2.ebuild
vendored
Normal file
@ -0,0 +1,139 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/go/go-1.0.2.ebuild,v 1.4 2012/09/14 18:29:06 maekke Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
export CTARGET=${CTARGET:-${CHOST}}
|
||||
|
||||
if [[ ${PV} = 9999 ]]; then
|
||||
EHG_REPO_URI="https://go.googlecode.com/hg"
|
||||
inherit mercurial
|
||||
fi
|
||||
inherit bash-completion-r1 elisp-common eutils
|
||||
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
SRC_URI="http://go.googlecode.com/files/go${PV}.src.tar.gz"
|
||||
# Upstream only supports go on amd64, arm and x86 architectures.
|
||||
KEYWORDS="-* ~amd64 ~arm ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="A concurrent garbage collected and typesafe programming language"
|
||||
HOMEPAGE="http://www.golang.org"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
IUSE="bash-completion emacs vim-syntax zsh-completion"
|
||||
|
||||
DEPEND="sys-apps/ed
|
||||
${COMMON_DEPEND}"
|
||||
RDEPEND="bash-completion? ( app-shells/bash-completion )
|
||||
emacs? ( virtual/emacs )
|
||||
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
|
||||
zsh-completion? ( app-shells/zsh-completion )
|
||||
${COMMON_DEPEND}"
|
||||
|
||||
# The go language stores binary data for packages in *.a files.
|
||||
# These are _NOT_ libraries, and should not be stripped.
|
||||
STRIP_MASK="/usr/lib/go/pkg/linux*/*.a"
|
||||
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
S="${WORKDIR}"/go
|
||||
fi
|
||||
|
||||
src_prepare()
|
||||
{
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
epatch "${FILESDIR}"/${P}-hardened.patch
|
||||
fi
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_compile()
|
||||
{
|
||||
export GOROOT_FINAL=/usr/lib/go
|
||||
export GOROOT="$(pwd)"
|
||||
export GOBIN="${GOROOT}/bin"
|
||||
if [[ $CTARGET = armv5* ]]
|
||||
then
|
||||
export GOARM=5
|
||||
fi
|
||||
|
||||
cd src
|
||||
./make.bash || die "build failed"
|
||||
cd ..
|
||||
|
||||
if use emacs; then
|
||||
elisp-compile misc/emacs/*.el
|
||||
fi
|
||||
}
|
||||
|
||||
src_test()
|
||||
{
|
||||
cd src
|
||||
PATH="${GOBIN}:${PATH}" \
|
||||
./run.bash --no-rebuild --banner || die "tests failed"
|
||||
}
|
||||
|
||||
src_install()
|
||||
{
|
||||
dobin bin/*
|
||||
dodoc AUTHORS CONTRIBUTORS PATENTS README
|
||||
|
||||
dodir /usr/lib/go
|
||||
insinto /usr/lib/go
|
||||
|
||||
# There is a known issue which requires the source tree to be installed [1].
|
||||
# Once this is fixed, we can consider using the doc use flag to control
|
||||
# installing the doc and src directories.
|
||||
# [1] http://code.google.com/p/go/issues/detail?id=2775
|
||||
doins -r doc lib pkg src
|
||||
|
||||
if use bash-completion; then
|
||||
dobashcomp misc/bash/go
|
||||
fi
|
||||
|
||||
if use emacs; then
|
||||
elisp-install ${PN} misc/emacs/*.el misc/emacs/*.elc
|
||||
fi
|
||||
|
||||
if use vim-syntax; then
|
||||
insinto /usr/share/vim/vimfiles
|
||||
doins -r misc/vim/ftdetect
|
||||
doins -r misc/vim/ftplugin
|
||||
doins -r misc/vim/syntax
|
||||
doins -r misc/vim/plugin
|
||||
doins -r misc/vim/indent
|
||||
fi
|
||||
|
||||
if use zsh-completion; then
|
||||
insinto /usr/share/zsh/site-functions
|
||||
doins misc/zsh/go
|
||||
fi
|
||||
|
||||
fperms -R +x /usr/lib/go/pkg/tool
|
||||
}
|
||||
|
||||
pkg_postinst()
|
||||
{
|
||||
if use emacs; then
|
||||
elisp-site-regen
|
||||
fi
|
||||
|
||||
# If the go tool sees a package file timestamped older than a dependancy it
|
||||
# will rebuild that file. So, in order to stop go from rebuilding lots of
|
||||
# packages for every build we need to fix the timestamps. The compiler and
|
||||
# linker are also checked - so we need to fix them too.
|
||||
ebegin "fixing timestamps to avoid unnecessary rebuilds"
|
||||
tref="usr/lib/go/pkg/*/runtime.a"
|
||||
find "${ROOT}"usr/lib/go/pkg -type f \
|
||||
-exec touch -r "${ROOT}"${tref} {} \;
|
||||
eend $?
|
||||
}
|
||||
|
||||
pkg_postrm()
|
||||
{
|
||||
if use emacs; then
|
||||
elisp-site-regen
|
||||
fi
|
||||
}
|
136
sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.0.3.ebuild
vendored
Normal file
136
sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.0.3.ebuild
vendored
Normal file
@ -0,0 +1,136 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/go/go-1.0.3.ebuild,v 1.1 2012/10/29 15:57:40 williamh Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
export CTARGET=${CTARGET:-${CHOST}}
|
||||
|
||||
inherit bash-completion-r1 elisp-common eutils
|
||||
|
||||
if [[ ${PV} = 9999 ]]; then
|
||||
EHG_REPO_URI="https://go.googlecode.com/hg"
|
||||
inherit mercurial
|
||||
else
|
||||
SRC_URI="http://go.googlecode.com/files/go${PV}.src.tar.gz"
|
||||
# Upstream only supports go on amd64, arm and x86 architectures.
|
||||
KEYWORDS="-* ~amd64 ~arm ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="A concurrent garbage collected and typesafe programming language"
|
||||
HOMEPAGE="http://www.golang.org"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
IUSE="bash-completion emacs vim-syntax zsh-completion"
|
||||
|
||||
DEPEND="sys-apps/ed"
|
||||
RDEPEND="bash-completion? ( app-shells/bash-completion )
|
||||
emacs? ( virtual/emacs )
|
||||
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
|
||||
zsh-completion? ( app-shells/zsh-completion )"
|
||||
|
||||
# The go language stores binary data for packages in *.a files.
|
||||
# These are _NOT_ libraries, and should not be stripped.
|
||||
STRIP_MASK="/usr/lib/go/pkg/linux*/*.a"
|
||||
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
S="${WORKDIR}"/go
|
||||
fi
|
||||
|
||||
src_prepare()
|
||||
{
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
epatch "${FILESDIR}"/${P}-hardened.patch
|
||||
fi
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_compile()
|
||||
{
|
||||
export GOROOT_FINAL=/usr/lib/go
|
||||
export GOROOT="$(pwd)"
|
||||
export GOBIN="${GOROOT}/bin"
|
||||
if [[ $CTARGET = armv5* ]]
|
||||
then
|
||||
export GOARM=5
|
||||
fi
|
||||
|
||||
cd src
|
||||
./make.bash || die "build failed"
|
||||
cd ..
|
||||
|
||||
if use emacs; then
|
||||
elisp-compile misc/emacs/*.el
|
||||
fi
|
||||
}
|
||||
|
||||
src_test()
|
||||
{
|
||||
cd src
|
||||
PATH="${GOBIN}:${PATH}" \
|
||||
./run.bash --no-rebuild --banner || die "tests failed"
|
||||
}
|
||||
|
||||
src_install()
|
||||
{
|
||||
dobin bin/*
|
||||
dodoc AUTHORS CONTRIBUTORS PATENTS README
|
||||
|
||||
dodir /usr/lib/go
|
||||
insinto /usr/lib/go
|
||||
|
||||
# There is a known issue which requires the source tree to be installed [1].
|
||||
# Once this is fixed, we can consider using the doc use flag to control
|
||||
# installing the doc and src directories.
|
||||
# [1] http://code.google.com/p/go/issues/detail?id=2775
|
||||
doins -r doc include lib pkg src
|
||||
|
||||
if use bash-completion; then
|
||||
dobashcomp misc/bash/go
|
||||
fi
|
||||
|
||||
if use emacs; then
|
||||
elisp-install ${PN} misc/emacs/*.el misc/emacs/*.elc
|
||||
fi
|
||||
|
||||
if use vim-syntax; then
|
||||
insinto /usr/share/vim/vimfiles
|
||||
doins -r misc/vim/ftdetect
|
||||
doins -r misc/vim/ftplugin
|
||||
doins -r misc/vim/syntax
|
||||
doins -r misc/vim/plugin
|
||||
doins -r misc/vim/indent
|
||||
fi
|
||||
|
||||
if use zsh-completion; then
|
||||
insinto /usr/share/zsh/site-functions
|
||||
doins misc/zsh/go
|
||||
fi
|
||||
|
||||
fperms -R +x /usr/lib/go/pkg/tool
|
||||
}
|
||||
|
||||
pkg_postinst()
|
||||
{
|
||||
if use emacs; then
|
||||
elisp-site-regen
|
||||
fi
|
||||
|
||||
# If the go tool sees a package file timestamped older than a dependancy it
|
||||
# will rebuild that file. So, in order to stop go from rebuilding lots of
|
||||
# packages for every build we need to fix the timestamps. The compiler and
|
||||
# linker are also checked - so we need to fix them too.
|
||||
ebegin "fixing timestamps to avoid unnecessary rebuilds"
|
||||
tref="usr/lib/go/pkg/*/runtime.a"
|
||||
find "${ROOT}"usr/lib/go -type f \
|
||||
-exec touch -r "${ROOT}"${tref} {} \;
|
||||
eend $?
|
||||
}
|
||||
|
||||
pkg_postrm()
|
||||
{
|
||||
if use emacs; then
|
||||
elisp-site-regen
|
||||
fi
|
||||
}
|
136
sdk_container/src/third_party/portage-stable/dev-lang/go/go-9999.ebuild
vendored
Normal file
136
sdk_container/src/third_party/portage-stable/dev-lang/go/go-9999.ebuild
vendored
Normal file
@ -0,0 +1,136 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/go/go-9999.ebuild,v 1.8 2012/10/29 15:57:40 williamh Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
export CTARGET=${CTARGET:-${CHOST}}
|
||||
|
||||
inherit bash-completion-r1 elisp-common eutils
|
||||
|
||||
if [[ ${PV} = 9999 ]]; then
|
||||
EHG_REPO_URI="https://go.googlecode.com/hg"
|
||||
inherit mercurial
|
||||
else
|
||||
SRC_URI="http://go.googlecode.com/files/go${PV}.src.tar.gz"
|
||||
# Upstream only supports go on amd64, arm and x86 architectures.
|
||||
KEYWORDS="-* ~amd64 ~arm ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="A concurrent garbage collected and typesafe programming language"
|
||||
HOMEPAGE="http://www.golang.org"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
IUSE="bash-completion emacs vim-syntax zsh-completion"
|
||||
|
||||
DEPEND="sys-apps/ed"
|
||||
RDEPEND="bash-completion? ( app-shells/bash-completion )
|
||||
emacs? ( virtual/emacs )
|
||||
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
|
||||
zsh-completion? ( app-shells/zsh-completion )"
|
||||
|
||||
# The go language stores binary data for packages in *.a files.
|
||||
# These are _NOT_ libraries, and should not be stripped.
|
||||
STRIP_MASK="/usr/lib/go/pkg/linux*/*.a"
|
||||
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
S="${WORKDIR}"/go
|
||||
fi
|
||||
|
||||
src_prepare()
|
||||
{
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
epatch "${FILESDIR}"/${P}-hardened.patch
|
||||
fi
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_compile()
|
||||
{
|
||||
export GOROOT_FINAL=/usr/lib/go
|
||||
export GOROOT="$(pwd)"
|
||||
export GOBIN="${GOROOT}/bin"
|
||||
if [[ $CTARGET = armv5* ]]
|
||||
then
|
||||
export GOARM=5
|
||||
fi
|
||||
|
||||
cd src
|
||||
./make.bash || die "build failed"
|
||||
cd ..
|
||||
|
||||
if use emacs; then
|
||||
elisp-compile misc/emacs/*.el
|
||||
fi
|
||||
}
|
||||
|
||||
src_test()
|
||||
{
|
||||
cd src
|
||||
PATH="${GOBIN}:${PATH}" \
|
||||
./run.bash --no-rebuild --banner || die "tests failed"
|
||||
}
|
||||
|
||||
src_install()
|
||||
{
|
||||
dobin bin/*
|
||||
dodoc AUTHORS CONTRIBUTORS PATENTS README
|
||||
|
||||
dodir /usr/lib/go
|
||||
insinto /usr/lib/go
|
||||
|
||||
# There is a known issue which requires the source tree to be installed [1].
|
||||
# Once this is fixed, we can consider using the doc use flag to control
|
||||
# installing the doc and src directories.
|
||||
# [1] http://code.google.com/p/go/issues/detail?id=2775
|
||||
doins -r doc include lib pkg src
|
||||
|
||||
if use bash-completion; then
|
||||
dobashcomp misc/bash/go
|
||||
fi
|
||||
|
||||
if use emacs; then
|
||||
elisp-install ${PN} misc/emacs/*.el misc/emacs/*.elc
|
||||
fi
|
||||
|
||||
if use vim-syntax; then
|
||||
insinto /usr/share/vim/vimfiles
|
||||
doins -r misc/vim/ftdetect
|
||||
doins -r misc/vim/ftplugin
|
||||
doins -r misc/vim/syntax
|
||||
doins -r misc/vim/plugin
|
||||
doins -r misc/vim/indent
|
||||
fi
|
||||
|
||||
if use zsh-completion; then
|
||||
insinto /usr/share/zsh/site-functions
|
||||
doins misc/zsh/go
|
||||
fi
|
||||
|
||||
fperms -R +x /usr/lib/go/pkg/tool
|
||||
}
|
||||
|
||||
pkg_postinst()
|
||||
{
|
||||
if use emacs; then
|
||||
elisp-site-regen
|
||||
fi
|
||||
|
||||
# If the go tool sees a package file timestamped older than a dependancy it
|
||||
# will rebuild that file. So, in order to stop go from rebuilding lots of
|
||||
# packages for every build we need to fix the timestamps. The compiler and
|
||||
# linker are also checked - so we need to fix them too.
|
||||
ebegin "fixing timestamps to avoid unnecessary rebuilds"
|
||||
tref="usr/lib/go/pkg/*/runtime.a"
|
||||
find "${ROOT}"usr/lib/go -type f \
|
||||
-exec touch -r "${ROOT}"${tref} {} \;
|
||||
eend $?
|
||||
}
|
||||
|
||||
pkg_postrm()
|
||||
{
|
||||
if use emacs; then
|
||||
elisp-site-regen
|
||||
fi
|
||||
}
|
13
sdk_container/src/third_party/portage-stable/dev-lang/go/metadata.xml
vendored
Normal file
13
sdk_container/src/third_party/portage-stable/dev-lang/go/metadata.xml
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer>
|
||||
<email>williamh@gentoo.org</email>
|
||||
<name>William Hubbs</name>
|
||||
</maintainer>
|
||||
<longdescription lang="en">
|
||||
Go is a new systems programming language developped at google by
|
||||
Rob Pike. It has garbage collection, coroutines, communication
|
||||
channels and a clean syntax.
|
||||
</longdescription>
|
||||
</pkgmetadata>
|
Loading…
x
Reference in New Issue
Block a user