From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1120834-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 7F694138334
	for <garchives@archives.gentoo.org>; Thu,  7 Nov 2019 10:52:28 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id B55F4E09C4;
	Thu,  7 Nov 2019 10:52:27 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 8C78CE09C4
	for <gentoo-commits@lists.gentoo.org>; Thu,  7 Nov 2019 10:52:27 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id B3A9234CA08
	for <gentoo-commits@lists.gentoo.org>; Thu,  7 Nov 2019 10:52:25 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 45FCB824
	for <gentoo-commits@lists.gentoo.org>; Thu,  7 Nov 2019 10:52:23 +0000 (UTC)
From: "Marek Szuba" <marecki@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Marek Szuba" <marecki@gentoo.org>
Message-ID: <1573123920.1a9dcd920eaa88e57204e966c2779c9eac98495d.marecki@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/syncthing/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-p2p/syncthing/syncthing-1.3.1.ebuild
X-VCS-Directories: net-p2p/syncthing/
X-VCS-Committer: marecki
X-VCS-Committer-Name: Marek Szuba
X-VCS-Revision: 1a9dcd920eaa88e57204e966c2779c9eac98495d
X-VCS-Branch: master
Date: Thu,  7 Nov 2019 10:52:23 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 5054f393-0336-4b72-98f7-2e52aaa0b4ce
X-Archives-Hash: 88258201cd0adec31c218569eb7a2809

commit:     1a9dcd920eaa88e57204e966c2779c9eac98495d
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Thu Nov  7 10:49:31 2019 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Thu Nov  7 10:52:00 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a9dcd92

net-p2p/syncthing-1.3.1: switch to go-module.eclass

Should hopefully resolve problems with go-1.13 in the network sandbox
observed by some users.

Bug: https://bugs.gentoo.org/693922
Package-Manager: Portage-2.3.76, Repoman-2.3.16
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 net-p2p/syncthing/syncthing-1.3.1.ebuild | 23 ++++++++---------------
 1 file changed, 8 insertions(+), 15 deletions(-)

diff --git a/net-p2p/syncthing/syncthing-1.3.1.ebuild b/net-p2p/syncthing/syncthing-1.3.1.ebuild
index 25a84914f7b..8f0e558ef16 100644
--- a/net-p2p/syncthing/syncthing-1.3.1.ebuild
+++ b/net-p2p/syncthing/syncthing-1.3.1.ebuild
@@ -3,8 +3,6 @@
 
 EAPI=7
 
-EGO_PN="github.com/${PN}/${PN}"
-
 EGO_VENDOR=(
 	"github.com/AudriusButkevicius/go-nat-pmp 452c97607362b2ab5a7839b8d1704f0396b640ca"
 	"github.com/AudriusButkevicius/pfilter 0.0.5"
@@ -67,12 +65,12 @@ EGO_VENDOR=(
 	"github.com/prometheus/procfs v0.0.4"
 )
 
-inherit golang-vcs-snapshot systemd xdg-utils
+inherit go-module systemd xdg-utils
 
 DESCRIPTION="Open Source Continuous File Synchronization"
 HOMEPAGE="https://syncthing.net"
-SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
-	${EGO_VENDOR_URI}"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+	$(go-module_vendor_uris)"
 
 LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0 Unlicense"
 SLOT="0"
@@ -96,30 +94,26 @@ src_prepare() {
 	default
 	sed -i \
 		's|^ExecStart=.*|ExecStart=/usr/libexec/syncthing/strelaysrv|' \
-		src/${EGO_PN}/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service \
+		cmd/strelaysrv/etc/linux-systemd/strelaysrv.service \
 		|| die
 
 	# As of 1.3.1, stupgrades fails to compile. This command was not present
 	# in releases older than 1.3.0, is not compiled in by default (USE=tools
 	# must be set) an in any case we do not really need this, therefore just
 	# get rid of the offending code until upstream has fixed it.
-	rm -rf src/${EGO_PN}/cmd/stupgrades
+	rm -rf cmd/stupgrades
 }
 
 src_compile() {
-	export GOPATH="${S}:$(get_golibdir_gopath)"
-	cd src/${EGO_PN} || die
 	go run build.go -version "v${PV}" -no-upgrade install \
 		$(usex tools "all" "") || die "build failed"
 }
 
 src_test() {
-	cd src/${EGO_PN} || die
 	go run build.go test || die "test failed"
 }
 
 src_install() {
-	pushd src/${EGO_PN} >& /dev/null || die
 	doman man/*.[157]
 	einstalldocs
 
@@ -131,11 +125,10 @@ src_install() {
 			[[ "${exe}" == "bin/syncthing" ]] || doexe "${exe}"
 		done
 	fi
-	popd >& /dev/null || die
 
 	# openrc and systemd service files
-	systemd_dounit src/${EGO_PN}/etc/linux-systemd/system/${PN}{@,-resume}.service
-	systemd_douserunit src/${EGO_PN}/etc/linux-systemd/user/${PN}.service
+	systemd_dounit etc/linux-systemd/system/${PN}{@,-resume}.service
+	systemd_douserunit etc/linux-systemd/user/${PN}.service
 	newconfd "${FILESDIR}/${PN}.confd" ${PN}
 	newinitd "${FILESDIR}/${PN}.initd" ${PN}
 
@@ -151,7 +144,7 @@ src_install() {
 		newconfd "${FILESDIR}/stdiscosrv.confd" stdiscosrv
 		newinitd "${FILESDIR}/stdiscosrv.initd" stdiscosrv
 
-		systemd_dounit src/${EGO_PN}/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service
+		systemd_dounit cmd/strelaysrv/etc/linux-systemd/strelaysrv.service
 		newconfd "${FILESDIR}/strelaysrv.confd" strelaysrv
 		newinitd "${FILESDIR}/strelaysrv.initd" strelaysrv