From owner-svn-ports-head@freebsd.org Fri Jul 26 07:15:09 2019 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 15ECAB87D8; Fri, 26 Jul 2019 07:15:09 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ECA2582DA7; Fri, 26 Jul 2019 07:15:08 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C76DCB87D; Fri, 26 Jul 2019 07:15:08 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6Q7F8YO075301; Fri, 26 Jul 2019 07:15:08 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6Q7F8dw075300; Fri, 26 Jul 2019 07:15:08 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <201907260715.x6Q7F8dw075300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tobik set sender to tobik@FreeBSD.org using -f From: Tobias Kortkamp Date: Fri, 26 Jul 2019 07:15:08 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r507340 - head/Mk/Uses X-SVN-Group: ports-head X-SVN-Commit-Author: tobik X-SVN-Commit-Paths: head/Mk/Uses X-SVN-Commit-Revision: 507340 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ECA2582DA7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.93)[-0.926,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jul 2019 07:15:09 -0000 Author: tobik Date: Fri Jul 26 07:15:08 2019 New Revision: 507340 URL: https://svnweb.freebsd.org/changeset/ports/507340 Log: Mk/Uses/go.mk: Default to "." instead of PORTNAME If neither GO_PKGNAME or GO_TARGET are set explicitly, go install tries to install a package named ${PORTNAME} which is almost always wrong. This forces Go ports to set GO_PKGNAME or GO_TARGET although their value is often redundant. Update do-build to default to the "." package instead ("the package in the current directory") and teach do-install to install the "." package. In many cases, this removes the need to explicitly set GO_PKGNAME and GO_TARGET making USES=go:modules alone sufficient for simpler ports. This is a backward compatible change. - Assign maintainership to Dmitri Submitted by: Dmitri Goutnik Approved by: jlaffaye (maintainer timeout, ~3 weeks) Differential Revision: https://reviews.freebsd.org/D20813 Modified: head/Mk/Uses/go.mk Modified: head/Mk/Uses/go.mk ============================================================================== --- head/Mk/Uses/go.mk Fri Jul 26 04:49:02 2019 (r507339) +++ head/Mk/Uses/go.mk Fri Jul 26 07:15:08 2019 (r507340) @@ -48,7 +48,7 @@ # # This variable must not be set by individual ports! # -# MAINTAINER: jlaffaye@FreeBSD.org +# MAINTAINER: dg@syrec.org .if !defined(_INCLUDE_USES_GO_MK) _INCLUDE_USES_GO_MK= yes @@ -117,13 +117,13 @@ post-extract: .if !target(do-build) && empty(go_ARGS:Mno_targets) do-build: (cd ${GO_WRKSRC}; \ - ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} install ${GO_BUILDFLAGS} ${GO_TARGET}) + ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} install ${GO_BUILDFLAGS} ${GO_TARGET:S/^${PORTNAME}$/./}) .endif .if !target(do-install) && empty(go_ARGS:Mno_targets) do-install: .for _TARGET in ${GO_TARGET} - ${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/${_TARGET:T} ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/${_TARGET:T:S/^.$/${PORTNAME}/} ${STAGEDIR}${PREFIX}/bin .endfor .endif