diff options
Diffstat (limited to 'dev-go/go-oauth2')
-rw-r--r-- | dev-go/go-oauth2/Manifest | 9 | ||||
-rw-r--r-- | dev-go/go-oauth2/go-oauth2-0_pre20150701.ebuild | 65 | ||||
-rw-r--r-- | dev-go/go-oauth2/go-oauth2-0_pre20160222.ebuild | 111 | ||||
-rw-r--r-- | dev-go/go-oauth2/go-oauth2-9999.ebuild | 29 | ||||
-rw-r--r-- | dev-go/go-oauth2/metadata.xml | 10 |
5 files changed, 224 insertions, 0 deletions
diff --git a/dev-go/go-oauth2/Manifest b/dev-go/go-oauth2/Manifest new file mode 100644 index 000000000000..af270c8f0c3d --- /dev/null +++ b/dev-go/go-oauth2/Manifest @@ -0,0 +1,9 @@ +DIST gcloud-golang-872c736f496c2ba12786bedbb8325576bbdb33cf.tar.gz 217728 BLAKE2B a87c023b8e9a5c6d262b94efbd1e323910a06594e9a1dced9d5709dbf24cd4b487239636044e2ceb93e4bd56f3d1a45ce30b6bfbdb02f913bda2cfe08c855d71 SHA512 45f0533c842a59dfee3b6d3f1facb9535466119601644a9a2c8c8b4f573889713b1d82d0acdeef96ea246d47d79402d09592b25da3ffbf73953bd28bf5b92ed9 +DIST gcloud-golang-e34a32f9b0ecbc0784865fb2d47f3818c09521d4.tar.gz 168358 BLAKE2B d259646d2debc3ba86fe13fd4dd1854f08ff0fdf62c1db16b112e5a04778a929c284ec36802667c5f4cebdc64be76d7dd8a4fdbf8bba539fe3623bed3f9f4e7d SHA512 135124280cdbf0a9e62f811164b4b97f0ee5142736cc4a06efafd48162a89dd1a6f186264c925da27adc970c964ab0af75423025fd125b772ddb99320b816219 +DIST go-net-0_pre20160216.tar.gz 741192 BLAKE2B ed4ca3ddc71f794a92746e360157967582958e4de29a46c5e63964694986e5a8a4f95062a1d46881941e8e8dfb848bbd9c4bd3b7008d8f2da357c2cae9a441ae SHA512 75db9098b33ede5621fce36645ebe946fad911c815dae219d74242b15714d1b9a3d8544f5f8c90b58989cea3a46b5688d20f705cb24a7d31f201ec218e69e78f +DIST go-oauth2-0_pre20150701.tar.gz 32040 BLAKE2B 5d2bd7f2916b045767c16f31156edee315c2c4e592cb773380a5c284a2c619433853d1aa6ca2b6c4c953a0cd82647c645afc2a8d003b587e7030d037f93a7504 SHA512 d809e1d63c7b5a4b388616d930cb22978b1653e2314b208d12679242bdd0e9d72f275f5ade7aa468b1dcf3960aa70ff94183ae1dd04325b24cdd20ef4834880a +DIST go-oauth2-0_pre20160222.tar.gz 34556 BLAKE2B e8e64b5e7a8b43b9297c8ff38fdf6feedd9e4f80931dafcd3d86cc8804c35de973d1867b707cd7febabbeacdfecf46e1da09f3bece21bb6411c4dc9d980adf68 SHA512 23fbc7744fe35f893d385a308428d2a3b8ddbf45fa12c5b43d3dc619e6bb422f30ce80774a25b88a8f74f9343c57280546183b45364456e1c60aee96aa6d0f77 +EBUILD go-oauth2-0_pre20150701.ebuild 1895 BLAKE2B d07a50594cd4b675ca818b4d109e14ab80bce4374e2fef715ff3723ea61f5074a736aeacb78d239830622590cc77690ea2e06266b14ab43ca199f7184ce48089 SHA512 95bc823167f5891389fcdce9b376bef32618cf50b30dab5fedb5520116dc84d08836a42be09052db2322119dffacb71d2a1acc31536bd1400b3190ff3ef0ce35 +EBUILD go-oauth2-0_pre20160222.ebuild 3241 BLAKE2B 66f93389b7ff5adb3d0312a748cc31c1f8fdf48dd0a23adadd84503f2fd06099b8959f176bc8814f814e4232823ab6699f5068aab2fdffd737cd27e1fc592053 SHA512 b2a3fda165f54d42a892d9489cdd14f792578a0a2bf8c7f7165cb434daf137963bd48063fc46378062d35b592628fd7d5dfb573e1fc086915715b1cc898259a7 +EBUILD go-oauth2-9999.ebuild 648 BLAKE2B ce9fe87f68760a6941fa760a06aed3bc9be13a4fa6073c0b34b809aec579cc3fddb055976583eb970298ab1b2c305f534d9887ee42b28add8de3ff0877e3233f SHA512 6bb131c5358a04f7b1f87726e814e4f40bc1973beef849c86ded7965ebfcf5d7fa8e6c5dae73c012afbfb5ff00d3ac7e7d5e3e7f3e5f3d5b4637efe734749f7f +MISC metadata.xml 324 BLAKE2B 4cadbcdc17c27bc0960508c9b0c79217c66fc676103df8a5f03e3d41e8d5b8b803e7e5765630f94796a8a1d736849537db71dd93165c995363874ec8362d0a39 SHA512 2673cfa4c19f6aa8f75ebcffa401892234098959274958623fa9e99e75624a727fc657937bff45aa446e523ea000a04bd543cb966acee22cc5dc447c950bf8f5 diff --git a/dev-go/go-oauth2/go-oauth2-0_pre20150701.ebuild b/dev-go/go-oauth2/go-oauth2-0_pre20150701.ebuild new file mode 100644 index 000000000000..f328af92aa73 --- /dev/null +++ b/dev-go/go-oauth2/go-oauth2-0_pre20150701.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils golang-base + +MY_PN=${PN##*-} +GO_PN=golang.org/x/${MY_PN} +EGIT_COMMIT="8914e5017ca260f2a3a1575b1e6868874050d95e" + +DESCRIPTION="Go client implementation for OAuth 2.0 spec" +HOMEPAGE="https://godoc.org/golang.org/x/oauth2" +SRC_URI=" + https://github.com/golang/${MY_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz + https://github.com/GoogleCloudPlatform/gcloud-golang/archive/e34a32f9b0ecbc0784865fb2d47f3818c09521d4.tar.gz -> gcloud-golang-e34a32f9b0ecbc0784865fb2d47f3818c09521d4.tar.gz" + +SLOT="0" +LICENSE="BSD" +KEYWORDS="~amd64" +IUSE="" + +DEPEND=" + dev-go/go-net:= + dev-go/go-tools:=" +RDEPEND="" + +S="${WORKDIR}/src/${GO_PN}" + +EGIT_CHECKOUT_DIR="${S}" + +src_unpack() { + default + mkdir -p src/${GO_PN%/*} || die + mv ${MY_PN}-${EGIT_COMMIT} src/${GO_PN} || die + + # Create a writable GOROOT in order to avoid sandbox violations. + export GOROOT="${WORKDIR}/goroot" GOPATH="${WORKDIR}/:$(get_golibdir_gopath)" + cp -sR "${EPREFIX}"/usr/lib/go "${GOROOT}" || die + rm -rf "${GOROOT}/src/${GO_PN}" || die + + mkdir -p "${GOROOT}/src/google.golang.org" || die + rm -rf "${GOROOT}/src/google.golang.org"/* || die + rm -rf "${GOROOT}/pkg/${KERNEL}_${ARCH}/google.golang.org" || die + mv gcloud-golang-e34a32f9b0ecbc0784865fb2d47f3818c09521d4 "${GOROOT}/src/google.golang.org/cloud" || die +} + +src_compile() { + go install -v -x -work google.golang.org/cloud/compute/metadata || die + go install -v -x -work ${GO_PN}/... || die +} + +src_test() { + # google/example_test.go imports appengine, introducing a circular dep + mv google/example_test.go{,_} + go test -x -v ${GO_PN}/... || die $? + mv google/example_test.go{_,} +} + +src_install() { + insinto "$(get_golibdir)" + egit_clean "${WORKDIR}"/{pkg,src} + insopts -m0644 -p # preserve timestamps for bug 551486 + doins -r "${WORKDIR}"/{pkg,src} +} diff --git a/dev-go/go-oauth2/go-oauth2-0_pre20160222.ebuild b/dev-go/go-oauth2/go-oauth2-0_pre20160222.ebuild new file mode 100644 index 000000000000..cf163391a658 --- /dev/null +++ b/dev-go/go-oauth2/go-oauth2-0_pre20160222.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils golang-base + +MY_PN=${PN##*-} +EGO_PN="golang.org/x/${MY_PN}/..." +EGIT_COMMIT="2cd4472c321b6cba78e029d99f0e7fe51032fd21" + +DESCRIPTION="Go client implementation for OAuth 2.0 spec" +HOMEPAGE="https://godoc.org/golang.org/x/oauth2" +SRC_URI=" + https://github.com/golang/${MY_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz + https://github.com/golang/net/archive/b6d7b1396ec874c3b00f6c84cd4301a17c56c8ed.tar.gz -> go-net-0_pre20160216.tar.gz + https://github.com/GoogleCloudPlatform/gcloud-golang/archive/872c736f496c2ba12786bedbb8325576bbdb33cf.tar.gz -> gcloud-golang-872c736f496c2ba12786bedbb8325576bbdb33cf.tar.gz" + +SLOT="0/${PVR}" +LICENSE="BSD" +KEYWORDS="~amd64" +IUSE="" + +DEPEND="dev-go/go-tools" +RDEPEND="" + +EGIT_CHECKOUT_DIR="${S}" + +get_archive_go_package() { + local archive=${1} uri x + case ${archive} in + ${PN}-*) echo "oauth2-* golang.org/x/oauth2"; return;; + gcloud-golang-*) echo "gcloud-golang-* google.golang.org/cloud"; return;; + go-net-*) echo "net-* golang.org/x/net"; return;; + esac + for x in ${SRC_URI}; do + if [[ ${x} == http* ]]; then + uri=${x} + elif [[ ${x} == ${archive} ]]; then + break + fi + done + uri=${uri#https://} + uri=${uri%/archive/*} + echo "${uri##*/}-* ${uri}" +} + +unpack_go_packages() { + local go_package pattern x + # Unpack packages to appropriate locations for GOPATH + for x in ${A}; do + unpack ${x} + if [[ ${x} == *.tar.gz ]]; then + go_package=$(get_archive_go_package ${x}) + pattern=${go_package%% *} + go_package=${go_package##* } + if [[ ${x%.tar.gz} -ef ${S} ]]; then + mv "${S}"{,_} || die + mkdir -p "${S}/src/${go_package%/*}" || die + mv "${S}"_ "${S}/src/${go_package}" || die || die + else + mkdir -p "${S}/src/${go_package%/*}" || die + for x in ${pattern}; do + if [[ ! ${x} -ef ${S} ]]; then + mv "${x}" "${S}/src/${go_package}" || die + fi + done + fi + fi + done +} + +src_unpack() { + unpack_go_packages + + # Create a writable GOROOT in order to avoid sandbox violations. + # Omit $(get_golibdir_gopath) from GOPATH, in order to avoid + # more sandbox violations (bug 575722). + GOROOT="${WORKDIR}/goroot" GOPATH="${S}" + cp -sR "$(go env GOROOT)" "${GOROOT}" || die + rm -rf "${GOROOT}/src/${EGO_PN%/*}" || die + export GOROOT GOPATH + + mkdir -p "${GOROOT}/src/google.golang.org" || die + rm -rf "${GOROOT}/src/google.golang.org"/* || die + rm -rf "${GOROOT}/pkg/${KERNEL}_${ARCH}/google.golang.org" || die +} + +src_compile() { + GOROOT="${GOROOT}" GOPATH="${GOPATH}" \ + go install -v -work -x ${EGO_BUILD_FLAGS} "${EGO_PN}" || die +} + +src_test() { + # google/example_test.go imports appengine, introducing a circular dep + mv src/${EGO_PN%/*}/google/example_test.go{,_} || die + go test -x -v "${EGO_PN}" || die $? + mv src/${EGO_PN%/*}/google/example_test.go{_,} || die +} + +src_install() { + golang_install_pkgs +} + +golang_install_pkgs() { + insinto $(dirname "${EPREFIX}$(get_golibdir)/src/${EGO_PN%/*}") + rm -rf "${S}"/src/${EGO_PN%/*}/.git* + doins -r "${S}"/src/${EGO_PN%/*} + insinto $(dirname "${EPREFIX}$(get_golibdir)/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_PN%/*}") + doins -r "${S}"/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_PN%/*}{,.a} +} diff --git a/dev-go/go-oauth2/go-oauth2-9999.ebuild b/dev-go/go-oauth2/go-oauth2-9999.ebuild new file mode 100644 index 000000000000..ab7e777c7d00 --- /dev/null +++ b/dev-go/go-oauth2/go-oauth2-9999.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +EGO_PN=golang.org/x/oauth2 +EGO_SRC=golang.org/x/oauth2 + +if [[ ${PV} = *9999* ]]; then + inherit golang-vcs +else + KEYWORDS="~amd64" + EGIT_COMMIT="b5adcc2dcdf009d0391547edc6ecbaff889f5bb9" + SRC_URI="https://github.com/golang/oauth2/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" + inherit golang-vcs-snapshot +fi +inherit golang-build + +DESCRIPTION="Go client implementation for OAuth 2.0 spec" +HOMEPAGE="https://godoc.org/golang.org/x/oauth2" + +LICENSE="BSD" +SLOT="0/${PV}" +IUSE="" + +DEPEND=" + dev-go/go-net:= + dev-go/go-tools:=" +RDEPEND="" diff --git a/dev-go/go-oauth2/metadata.xml b/dev-go/go-oauth2/metadata.xml new file mode 100644 index 000000000000..8f2033d7ed3c --- /dev/null +++ b/dev-go/go-oauth2/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>zmedico@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">GoogleCloudPlatform/gcloud-golang</remote-id> + </upstream> +</pkgmetadata> |