Skip to content

Commit

Permalink
dev-go/go-tools: use static favicon SRC_URI (bug 670178)
Browse files Browse the repository at this point in the history
Suggested-by: Anton Bolshakov <[email protected]>
Closes: https://bugs.gentoo.org/670178
Signed-off-by: Zac Medico <[email protected]>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
  • Loading branch information
zmedico committed Nov 4, 2018
1 parent dec08cc commit 29fb970
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dev-go/go-tools/Manifest
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
DIST github.com-golang-net-aaf60122140d3fcf75376d319f0554393160eb50.tar.gz 965206 BLAKE2B 018ab877bfa7208bb0ca9b4ede85077ed37c8ee3c7065569646e6c9704715d6810b0286276ea0fa9a271f12ffbe964b41f55ec762711c8a43ccea564607f3265 SHA512 d56f5608e64e8d883a782f0c460f08da20e7d01a97330fad35c8757420ac82fb84b657c3f64e3c4d90a08cc4d8905ab37225d6fab8472e8f1fd3d7be212df8b9
DIST go-favicon.ico 5686 BLAKE2B 331d7684a569fc40fcd147eb812661f42b0ee3ca4c017515c33523b588b012763ce29f24bfce5bc7274e7560ff7dd8e872af43d2b51dc0722ac416b43c11f841 SHA512 0a6fe8bddbce99ed7fd035a3dc998dc9e893060854eee9d1c70bcc8de77b71fd3bd203b2de0f1c9a146f7d47555ab856389e16a372ee41f4ab57be611877fc16
DIST go-favicon-20181103162401.ico 5686 BLAKE2B 331d7684a569fc40fcd147eb812661f42b0ee3ca4c017515c33523b588b012763ce29f24bfce5bc7274e7560ff7dd8e872af43d2b51dc0722ac416b43c11f841 SHA512 0a6fe8bddbce99ed7fd035a3dc998dc9e893060854eee9d1c70bcc8de77b71fd3bd203b2de0f1c9a146f7d47555ab856389e16a372ee41f4ab57be611877fc16
DIST go-tools-0_pre20180817.tar.gz 2321169 BLAKE2B d1ba93b36b62bfbf53770cab6c96019d1a96db0ff6521f591577d866f74a1f65ec24e41a06f81d0040be7122f2e0da734e68d0a72591040265b5f95b324645fe SHA512 1af6c4a58f4d1985dc55e4342d9a4f26ada646ffe87fafdb5bdf876ad972a9f826da257ff9a10956c24dbc90ed9d6935bb78b4f7d30f9e50493c60f7ce92edb1
6 changes: 4 additions & 2 deletions dev-go/go-tools/go-tools-0_pre20180817.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@ inherit golang-build golang-vcs-snapshot

DESCRIPTION="Go Tools"
HOMEPAGE="https://godoc.org/golang.org/x/tools"
GO_FAVICON="go-favicon-20181103162401.ico"
SRC_URI="${ARCHIVE_URI}
${EGO_VENDOR_URI}
http://golang.org/favicon.ico -> go-favicon.ico"
mirror://gentoo/${GO_FAVICON}
https://dev.gentoo.org/~zmedico/distfiles/${GO_FAVICON}"
LICENSE="BSD"
SLOT="0/${PVR}"

src_prepare() {
default
# Add favicon to the godoc web interface (bug 551030)
cp "${DISTDIR}"/go-favicon.ico "src/${EGO_PN}/godoc/static/favicon.ico" ||
cp "${DISTDIR}"/${GO_FAVICON} "src/${EGO_PN}/godoc/static/favicon.ico" ||
die
sed -e 's:"example.html",:\0\n\t"favicon.ico",:' \
-i src/${EGO_PN}/godoc/static/gen.go || die
Expand Down
6 changes: 4 additions & 2 deletions dev-go/go-tools/go-tools-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ inherit golang-build

DESCRIPTION="Go Tools"
HOMEPAGE="https://godoc.org/golang.org/x/tools"
GO_FAVICON="go-favicon-20181103162401.ico"
SRC_URI="${ARCHIVE_URI}
https://github.com/golang/net/archive/${GO_NET_COMMIT}.tar.gz -> github.com-golang-net-${GO_NET_COMMIT}.tar.gz
http://golang.org/favicon.ico -> go-favicon.ico"
mirror://gentoo/${GO_FAVICON}
https://dev.gentoo.org/~zmedico/distfiles/${GO_FAVICON}"
LICENSE="BSD"
SLOT="0/${PVR}"

Expand All @@ -38,7 +40,7 @@ src_unpack() {
src_prepare() {
default
# Add favicon to the godoc web interface (bug 551030)
cp "${DISTDIR}"/go-favicon.ico "src/${EGO_SRC}/godoc/static/favicon.ico" ||
cp "${DISTDIR}"/${GO_FAVICON} "src/${EGO_SRC}/godoc/static/favicon.ico" ||
die
sed -e 's:"example.html",:\0\n\t"favicon.ico",:' \
-i src/${EGO_SRC}/godoc/static/gen.go || die
Expand Down

0 comments on commit 29fb970

Please sign in to comment.