mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-21 08:42:23 +00:00
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
This commit is contained in:
parent
3c3c86864a
commit
cac8d642b6
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=395629
@ -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:
|
||||
|
11
net/syncthing-cli/files/patch-utils.go
Normal file
11
net/syncthing-cli/files/patch-utils.go
Normal file
@ -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>")
|
Loading…
Reference in New Issue
Block a user