From owner-svn-ports-head@freebsd.org Sun Sep 8 12:18:48 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 00EA1F1AFE; Sun, 8 Sep 2019 12:18:48 +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 46R9Lv5lCfz3Lbb; Sun, 8 Sep 2019 12:18:47 +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 A86001DC9A; Sun, 8 Sep 2019 12:18:47 +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 x88CIlZa037643; Sun, 8 Sep 2019 12:18:47 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x88CIliP037642; Sun, 8 Sep 2019 12:18:47 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <201909081218.x88CIliP037642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tobik set sender to tobik@FreeBSD.org using -f From: Tobias Kortkamp Date: Sun, 8 Sep 2019 12:18:47 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r511569 - head/sysutils/consul X-SVN-Group: ports-head X-SVN-Commit-Author: tobik X-SVN-Commit-Paths: head/sysutils/consul X-SVN-Commit-Revision: 511569 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Sun, 08 Sep 2019 12:18:48 -0000 Author: tobik Date: Sun Sep 8 12:18:47 2019 New Revision: 511569 URL: https://svnweb.freebsd.org/changeset/ports/511569 Log: sysutils/consul: Switch to USES=go:modules, fix build with go1.13 ===> Building for consul-1.5.1 $GOPATH/go.mod exists but should not *** Error code 1 - Remove custom build and install targets PR: 240313 Submitted by: Dmitri Goutnik Pointy hat: jlaffaye Modified: head/sysutils/consul/Makefile Modified: head/sysutils/consul/Makefile ============================================================================== --- head/sysutils/consul/Makefile Sun Sep 8 12:13:40 2019 (r511568) +++ head/sysutils/consul/Makefile Sun Sep 8 12:18:47 2019 (r511569) @@ -11,14 +11,17 @@ COMMENT= Service discovery and configuration made easy LICENSE= MPL20 LICENSE_FILE= ${WRKSRC}/LICENSE -BROKEN= fails to build +USES= go:modules -USES= compiler go - USE_GITHUB= yes GH_ACCOUNT= hashicorp -GH_SUBDIR= src/github.com/${GH_ACCOUNT}/${PORTNAME} +GO_BUILDFLAGS= -ldflags="\ + -X github.com/hashicorp/consul/version.Version=${PORTVERSION} \ + -X github.com/hashicorp/consul/version.VersionPrerelease= \ + -X github.com/hashicorp/consul/version.GitDescribe=v${PORTVERSION} \ + " + USE_RC_SUBR= consul PLIST_FILES= bin/consul @@ -27,26 +30,8 @@ USERS= consul GROUPS= consul post-extract: - @${MV} ${WRKSRC}/vendor/ ${WRKSRC}/src/ + ${MKDIR} ${WRKSRC}/vendor/github.com/${GH_ACCOUNT}/${PORTNAME} + ${LN} -s ${WRKSRC}/api ${WRKSRC}/vendor/github.com/${GH_ACCOUNT}/${PORTNAME}/api + ${LN} -s ${WRKSRC}/sdk ${WRKSRC}/vendor/github.com/${GH_ACCOUNT}/${PORTNAME}/sdk -do-build: - @cd ${WRKSRC}/src/github.com/hashicorp/consul; ${SETENV} ${MAKE_ENV} CGO_ENABLED=0 ${BUILD_ENV} GOPATH=${WRKSRC} go build \ - -ldflags "\ - -X github.com/hashicorp/consul/version.Version=${PORTVERSION} \ - -X github.com/hashicorp/consul/version.VersionPrerelease= \ - -X github.com/hashicorp/consul/version.GitDescribe=v${PORTVERSION} \ - " \ - -o bin/consul - -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/hashicorp/consul/bin/consul ${STAGEDIR}${PREFIX}/bin/consul - -.include - -# golang assumes that if clang is in use, it is called "clang" and not "cc". If -# it's called "cc", go fails. -.if ${COMPILER_TYPE} == clang -BUILD_ENV= CC=clang -.endif - -.include +.include