svn commit: r395629 - in head/net/syncthing-cli: . files

Steve Wills swills at FreeBSD.org
Sun Aug 30 17:17:30 UTC 2015


Author: swills
Date: Sun Aug 30 17:17:28 2015
New Revision: 395629
URL: https://svnweb.freebsd.org/changeset/ports/395629

Log:
  net/syncthing-cli: patch for hostname parser
  
  While here, fix build by using Go 1.4 until upstream supports Go 1.5
  
  PR:		202425
  Submitted by:	peter

Added:
  head/net/syncthing-cli/files/
  head/net/syncthing-cli/files/patch-utils.go   (contents, props changed)
Modified:
  head/net/syncthing-cli/Makefile

Modified: head/net/syncthing-cli/Makefile
==============================================================================
--- head/net/syncthing-cli/Makefile	Sun Aug 30 16:55:14 2015	(r395628)
+++ head/net/syncthing-cli/Makefile	Sun Aug 30 17:17:28 2015	(r395629)
@@ -3,13 +3,13 @@
 
 PORTNAME=	syncthing-cli
 PORTVERSION=	0.1.0.2015070301
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	net
 
 MAINTAINER=	swills at FreeBSD.org
 COMMENT=	Syncthing CLI
 
-BUILD_DEPENDS=	${LOCALBASE}/bin/go:${PORTSDIR}/lang/go
+BUILD_DEPENDS=	go14>=1.4:${PORTSDIR}/lang/go14
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	syncthing AudriusButkevicius:audrius
@@ -44,7 +44,8 @@ post-patch:
 		${WRKSRC}/src/github.com/syncthing/protocol
 
 do-build:
-	@cd ${WRKSRC} ; ${SETENV} GOPATH=${WRKSRC} go build
+	@cd ${WRKSRC} ; ${SETENV} PATH=${PATH}:${LOCALBASE}/go14/bin \
+		GOPATH=${WRKSRC} go build
 	@${MV} ${WRKSRC}/syncthing-cli-${GH_TAGNAME} ${WRKSRC}/syncthing-cli
 
 do-install:

Added: head/net/syncthing-cli/files/patch-utils.go
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/syncthing-cli/files/patch-utils.go	Sun Aug 30 17:17:28 2015	(r395629)
@@ -0,0 +1,11 @@
+--- utils.go
++++ utils.go
+@@ -146,7 +146,7 @@ func validAddress(input string) {
+ 	if len(tokens) != 2 {
+ 		die(input + " is not a valid value for an address\nExpected format <ip or hostname>:<port>")
+ 	}
+-	matched, err := regexp.MatchString("^[a-zA-Z0-9]+([a-zA-Z0-9.]+[a-zA-Z0-9]+)?$", tokens[0])
++	matched, err := regexp.MatchString("^[a-zA-Z0-9]+([-a-zA-Z0-9.]+[-a-zA-Z0-9]+)?$", tokens[0])
+ 	die(err)
+ 	if !matched {
+ 		die(input + " is not a valid value for an address\nExpected format <ip or hostname>:<port>")


More information about the svn-ports-all mailing list