Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Sep 2019 13:12:42 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r511627 - head/sysutils/ipfs-go
Message-ID:  <201909091312.x89DCg5m026898@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Mon Sep  9 13:12:42 2019
New Revision: 511627
URL: https://svnweb.freebsd.org/changeset/ports/511627

Log:
  sysutils/ipfs-go: Unbreak with go1.13
  
  ===>  Building for ipfs-go-0.4.21
  go: bazil.org/fuse@v0.0.0-20180421153158-65cc252bf669: Get https://proxy.golang.org/bazil.org/fuse/@v/v0.0.0-20180421153158-65cc252bf669.mod: dial tcp: lookup proxy.golang.org on 209.222.18.218:53: write udp 127.0.0.1:14240->209.222.18.218:53: write: permission denied
  *** Error code 1
  
  - Switch to USES=go:modules
  - Remove GO_PKGNAME, not needed with modules
  
  PR:		240318
  Submitted by:	Dmitri Goutnik <dg@syrec.org>
  Pointy hat:	jlaffaye

Modified:
  head/sysutils/ipfs-go/Makefile

Modified: head/sysutils/ipfs-go/Makefile
==============================================================================
--- head/sysutils/ipfs-go/Makefile	Mon Sep  9 13:02:57 2019	(r511626)
+++ head/sysutils/ipfs-go/Makefile	Mon Sep  9 13:12:42 2019	(r511627)
@@ -16,12 +16,10 @@ LICENSE_COMB=	dual
 LICENSE_FILE_MIT=	${WRKSRC}/LICENSE-MIT
 LICENSE_FILE_APACHE=	${WRKSRC}/LICENSE-APACHE
 
-BROKEN=		fails to build
 ONLY_FOR_ARCHS=	amd64 i386
 
-USES=		go
+USES=		go:modules
 
-GO_PKGNAME=	github.com/ipfs/go-ipfs
 GO_TARGET=	./cmd/ipfs
 
 NO_WRKSUBDIR=	yes
@@ -44,6 +42,15 @@ USERS=		${IPFS_USER}
 GROUPS=		${IPFS_GROUP}
 
 FULLNAME=	${PORTNAME}${PKGNAMESUFFIX}
+
+# unbreak vendored golang.org/x/xerrors with go1.13
+# can be removed after vendor/golang.org/x/xerrors is updated to a985d3407aa7 or later
+post-patch:
+	@${RM} ${WRKSRC}/vendor/golang.org/x/xerrors/adaptor_go1_13.go
+	@${RM} ${WRKSRC}/vendor/golang.org/x/xerrors/format_go1_13.go
+	@${REINPLACE_CMD} '/build !go1.13/d' ${WRKSRC}/vendor/golang.org/x/xerrors/adaptor_go1_12.go
+	@${REINPLACE_CMD} '/build !go1.13/d' ${WRKSRC}/vendor/golang.org/x/xerrors/format_go1_12.go
+	@${REINPLACE_CMD} '/build !go1.13/d' ${WRKSRC}/vendor/golang.org/x/xerrors/frame_go1_12.go
 
 do-install:
 	@${MKDIR} ${STAGEDIR}${IPFS_HOME}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909091312.x89DCg5m026898>