diff options
author | swills <swills@FreeBSD.org> | 2015-08-31 01:17:28 +0800 |
---|---|---|
committer | swills <swills@FreeBSD.org> | 2015-08-31 01:17:28 +0800 |
commit | 567a74e39c1499564dd31ce26f7404c68bdabaa7 (patch) | |
tree | 2c7eaab33bf46ce2465bec7e91111f7ee91658dc /net | |
parent | 6a8d3e5f39d2efa99acd15c8991e7c8a98fa2225 (diff) | |
download | freebsd-ports-gnome-567a74e39c1499564dd31ce26f7404c68bdabaa7.tar.gz freebsd-ports-gnome-567a74e39c1499564dd31ce26f7404c68bdabaa7.tar.zst freebsd-ports-gnome-567a74e39c1499564dd31ce26f7404c68bdabaa7.zip |
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
Diffstat (limited to 'net')
-rw-r--r-- | net/syncthing-cli/Makefile | 7 | ||||
-rw-r--r-- | net/syncthing-cli/files/patch-utils.go | 11 |
2 files changed, 15 insertions, 3 deletions
diff --git a/net/syncthing-cli/Makefile b/net/syncthing-cli/Makefile index 7115c7d8996c..1451b24bbde9 100644 --- a/net/syncthing-cli/Makefile +++ b/net/syncthing-cli/Makefile @@ -3,13 +3,13 @@ PORTNAME= syncthing-cli PORTVERSION= 0.1.0.2015070301 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net MAINTAINER= swills@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: diff --git a/net/syncthing-cli/files/patch-utils.go b/net/syncthing-cli/files/patch-utils.go new file mode 100644 index 000000000000..fda2d14cc71a --- /dev/null +++ b/net/syncthing-cli/files/patch-utils.go @@ -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>") |