Re: lang/go-bootstrap: Makefile improvements

2018-05-05 Thread Klemens Nanni
On Fri, May 04, 2018 at 04:14:20AM +1000, Joel Sing wrote:
> On Saturday 07 April 2018 01:04:59 Klemens Nanni wrote:
> > Same thing as with lang/go: Simplify do-install, combine finds,
> > fix space/tab mixtures.
> > 
> > Feedback? OK?
Updated diff after feedback from jsing@.

OK?

> > +GOBIN =pkg/tool/${GOCFG}
> 
> GOTOOLS
Done.

> >  do-test:
> > @cd ${WRKSRC} && \
> > ulimit -n 256 -d 2097152 && \
> > -   PATH=${WRKDIST}/bin:${PATH} GOROOT=${WRKDIST} ./run.bash
> > +   PATH=${WRKDIST}/bin:${PATH} \
> > +   GOROOT=${WRKDIST} \
> > +   ./run.bash
> 
> Same comment re readability - either revert, or indent such that it is 
> obvious 
> what the env is for.
Indented as done in the lang/go diff as well.

> > -.  for dir in doc include lib misc src pkg
> > -   @cd ${WRKDIST} && \
> > -   find ${dir} -type d \
> > -   -exec ${INSTALL_DATA_DIR} \
> > -   ${GOROOT}/{} \;
> > -   @cd ${WRKDIST} && \
> > -   find ${dir} ! -name \*.orig -type f \
> > -   -exec ${INSTALL_DATA} -p {} \
> > -   ${GOROOT}/{} \;
> > -.  endfor
> > +   @find ${WRKDIST} -maxdepth 1 -type f ! -name .git\* ! -name .hg\* \
> > +   -exec ${INSTALL_DATA} -p {} ${GOROOT} \;
> > +
> > +.for dir in doc include lib misc src pkg
> > +   cd ${WRKDIST} && \
> > +   find ${dir} -type d \
> > +   -exec ${INSTALL_DATA_DIR} ${GOROOT}/{} \; \
> > +   -o -type f ! -name \*.orig \
> > +   -exec ${INSTALL_DATA} -p {} ${GOROOT}/{} \;
> > +.endfor
> 
> Indentation appears messed up here - it should be for.
Done.

Index: Makefile
===
RCS file: /cvs/ports/lang/go-bootstrap/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- Makefile5 Apr 2018 17:47:30 -   1.9
+++ Makefile5 May 2018 13:45:34 -
@@ -6,19 +6,19 @@ COMMENT = Go programming language
 
 VERSION =  1.4
 RELEASE =  20171003
-DISTNAME = go${VERSION}-bootstrap-${RELEASE}
-PKGNAME =  go-bootstrap-${VERSION}.${RELEASE}
+DISTNAME = go${VERSION}-bootstrap-${RELEASE}
+PKGNAME =  go-bootstrap-${VERSION}.${RELEASE}
 CATEGORIES =   lang
 REVISION = 0
 
 HOMEPAGE = https://golang.org/
 
-MAINTAINER =   Joel Sing 
+MAINTAINER =   Joel Sing 
 
 # software: BSD, documentation: CC-BY-3.0
 PERMIT_PACKAGE_CDROM = bootstrap only
 PERMIT_PACKAGE_FTP =   bootstrap only
-PERMIT_DISTFILES_FTP =  bootstrap only
+PERMIT_DISTFILES_FTP = bootstrap only
 
 WANTLIB =  c m pthread
 
@@ -35,9 +35,9 @@ WRKSRC =  ${WRKDIST}/src
 
 INSTALL_STRIP =
 
-GOOS = openbsd
+GOOS = openbsd
 GOARCH =   unknown
-GOROOT =   ${PREFIX}/go/bootstrap
+GOROOT =   ${PREFIX}/go/bootstrap
 
 .if ${MACHINE_ARCH} == "amd64"
 GOARCH =   amd64
@@ -50,11 +50,13 @@ EXEPREFIX = 8
 PKG_ARGS +=-Damd64=0
 PKG_ARGS +=-Di386=1
 .else
-PKG_ARGS +=-Damd64=0 -Di386=0
+PKG_ARGS +=-Damd64=0
+PKG_ARGS +=-Di386=0
 .endif
 
 GOCFG =/${GOOS}_${GOARCH}
 GOEXE =${GOCFG}/${EXEPREFIX}
+GOTOOLS =  pkg/tool/${GOCFG}
 
 do-configure:
 .  if ${GOARCH} == "unknown"
@@ -62,7 +64,6 @@ do-configure:
@exit 1
 .  endif
 
-
 do-build:
@cd ${WRKSRC} && \
CC="${CC}" \
@@ -75,7 +76,9 @@ do-build:
 do-test:
@cd ${WRKSRC} && \
ulimit -n 256 -d 2097152 && \
-   PATH=${WRKDIST}/bin:${PATH} GOROOT=${WRKDIST} ./run.bash
+   PATH=${WRKDIST}/bin:${PATH} \
+   GOROOT=${WRKDIST} \
+   ./run.bash
 
 do-install:
${INSTALL_PROGRAM_DIR} ${GOROOT}
@@ -83,25 +86,19 @@ do-install:
${INSTALL_PROGRAM_DIR} ${GOROOT}/bin
${INSTALL_PROGRAM} -p ${WRKDIST}/bin/go{,fmt} ${GOROOT}/bin
 
-   @cd ${WRKDIST} && \
-   find . ! -name .git\* ! -name .hg\* -type f -maxdepth 1 \
-   -exec ${INSTALL_DATA} -p {} \
-   ${GOROOT} \;
+   @find ${WRKDIST} -maxdepth 1 -type f ! -name .git\* ! -name .hg\* \
+   -exec ${INSTALL_DATA} -p {} ${GOROOT} \;
 
 .  for dir in doc include lib misc src pkg
-   @cd ${WRKDIST} && \
+   cd ${WRKDIST} && \
find ${dir} -type d \
-   -exec ${INSTALL_DATA_DIR} \
-   ${GOROOT}/{} \;
-   @cd ${WRKDIST} && \
-   find ${dir} ! -name \*.orig -type f \
-   -exec 

Re: lang/go-bootstrap: Makefile improvements

2018-04-18 Thread Klemens Nanni
On Sat, Apr 07, 2018 at 01:04:59AM +0200, Klemens Nanni wrote:
> Same thing as with lang/go: Simplify do-install, combine finds,
> fix space/tab mixtures.
> 
> Feedback? OK?
Bump.

Index: Makefile
===
RCS file: /cvs/ports/lang/go-bootstrap/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- Makefile5 Apr 2018 17:47:30 -   1.9
+++ Makefile18 Apr 2018 18:57:39 -
@@ -6,19 +6,19 @@ COMMENT = Go programming language
 
 VERSION =  1.4
 RELEASE =  20171003
-DISTNAME = go${VERSION}-bootstrap-${RELEASE}
-PKGNAME =  go-bootstrap-${VERSION}.${RELEASE}
+DISTNAME = go${VERSION}-bootstrap-${RELEASE}
+PKGNAME =  go-bootstrap-${VERSION}.${RELEASE}
 CATEGORIES =   lang
 REVISION = 0
 
 HOMEPAGE = https://golang.org/
 
-MAINTAINER =   Joel Sing 
+MAINTAINER =   Joel Sing 
 
 # software: BSD, documentation: CC-BY-3.0
 PERMIT_PACKAGE_CDROM = bootstrap only
 PERMIT_PACKAGE_FTP =   bootstrap only
-PERMIT_DISTFILES_FTP =  bootstrap only
+PERMIT_DISTFILES_FTP = bootstrap only
 
 WANTLIB =  c m pthread
 
@@ -35,26 +35,25 @@ WRKSRC =${WRKDIST}/src
 
 INSTALL_STRIP =
 
-GOOS = openbsd
+GOOS = openbsd
 GOARCH =   unknown
-GOROOT =   ${PREFIX}/go/bootstrap
+GOROOT =   ${PREFIX}/go/bootstrap
 
 .if ${MACHINE_ARCH} == "amd64"
 GOARCH =   amd64
 EXEPREFIX =6
-PKG_ARGS +=-Damd64=1
-PKG_ARGS +=-Di386=0
+PKG_ARGS +=-Damd64=1 -Di386=0
 .elif ${MACHINE_ARCH} == "i386"
 GOARCH =   386
 EXEPREFIX =8
-PKG_ARGS +=-Damd64=0
-PKG_ARGS +=-Di386=1
+PKG_ARGS +=-Damd64=0 -Di386=1
 .else
 PKG_ARGS +=-Damd64=0 -Di386=0
 .endif
 
 GOCFG =/${GOOS}_${GOARCH}
 GOEXE =${GOCFG}/${EXEPREFIX}
+GOBIN =pkg/tool/${GOCFG}
 
 do-configure:
 .  if ${GOARCH} == "unknown"
@@ -62,7 +61,6 @@ do-configure:
@exit 1
 .  endif
 
-
 do-build:
@cd ${WRKSRC} && \
CC="${CC}" \
@@ -75,7 +73,9 @@ do-build:
 do-test:
@cd ${WRKSRC} && \
ulimit -n 256 -d 2097152 && \
-   PATH=${WRKDIST}/bin:${PATH} GOROOT=${WRKDIST} ./run.bash
+   PATH=${WRKDIST}/bin:${PATH} \
+   GOROOT=${WRKDIST} \
+   ./run.bash
 
 do-install:
${INSTALL_PROGRAM_DIR} ${GOROOT}
@@ -83,25 +83,19 @@ do-install:
${INSTALL_PROGRAM_DIR} ${GOROOT}/bin
${INSTALL_PROGRAM} -p ${WRKDIST}/bin/go{,fmt} ${GOROOT}/bin
 
-   @cd ${WRKDIST} && \
-   find . ! -name .git\* ! -name .hg\* -type f -maxdepth 1 \
-   -exec ${INSTALL_DATA} -p {} \
-   ${GOROOT} \;
-
-.  for dir in doc include lib misc src pkg
-   @cd ${WRKDIST} && \
-   find ${dir} -type d \
-   -exec ${INSTALL_DATA_DIR} \
-   ${GOROOT}/{} \;
-   @cd ${WRKDIST} && \
-   find ${dir} ! -name \*.orig -type f \
-   -exec ${INSTALL_DATA} -p {} \
-   ${GOROOT}/{} \;
-.  endfor
+   @find ${WRKDIST} -maxdepth 1 -type f ! -name .git\* ! -name .hg\* \
+   -exec ${INSTALL_DATA} -p {} ${GOROOT} \;
+
+.for dir in doc include lib misc src pkg
+   cd ${WRKDIST} && \
+   find ${dir} -type d \
+   -exec ${INSTALL_DATA_DIR} ${GOROOT}/{} \; \
+   -o -type f ! -name \*.orig \
+   -exec ${INSTALL_DATA} -p {} ${GOROOT}/{} \;
+.endfor
 
# These get installed via `find' however we need them to be executable
-   ${INSTALL_PROGRAM_DIR} ${GOROOT}/pkg/tool/${GOOS}_${GOARCH}
-   ${INSTALL_PROGRAM} -p ${WRKDIST}/pkg/tool/${GOOS}_${GOARCH}/* \
-   ${GOROOT}/pkg/tool/${GOOS}_${GOARCH}
+   ${INSTALL_PROGRAM_DIR} ${GOROOT}/${GOBIN}
+   ${INSTALL_PROGRAM} -p ${WRKDIST}/${GOBIN}/* ${GOROOT}/${GOBIN}
 
 .include 
===
Stats: --- 30 lines 943 chars
Stats: +++ 24 lines 825 chars
Stats: -6 lines
Stats: -118 chars



Re: [lang/go-bootstrap] Switch to go1.4 release tarball

2017-10-10 Thread Joel Sing
On Tuesday 10 October 2017 09:53:43 Stuart Henderson wrote:
> On 2017/10/09 03:34, Joel Sing wrote:
> > Upstream is providing a tarball of the release-branch.go1.4 git branch,
> > which contains minor fixes to keep Go 1.4 building on current platforms.
> > Most of the patches that we currently have for lang/go-bootstrap have
> > been committed upstream - one of these is already in the go1.4
> > release tarball that is available, while some have been committed and
> > 
> > will appear in the next tarball that's created:
> >   https://github.com/golang/go/issues/20672
> > 
> > Switch to the go1.4 release tarball so that we can drop a patch now and
> > in the future, drop most of the remaining patches.
> > 
> > ok?
> 
> before,   $ make show=PKGNAMES
> go-bootstrap-1.4.3p4
> 
> after,$ make show=PKGNAMES
> go-bootstrap-20170531
> 
> ok either way but I wonder if it would be better to keep 1.4 in the
> package name (e.g. something like 1.4.20170531)?

I had actually pondered the same thing - I'll change it to what you suggest 
since I agree that it is more intuitive/useful. Thanks.
 
> > Index: Makefile
> > ===
> > RCS file: /cvs/ports/lang/go-bootstrap/Makefile,v
> > retrieving revision 1.6
> > diff -u -p -u -p -r1.6 Makefile
> > --- Makefile8 Oct 2017 15:40:56 -   1.6
> > +++ Makefile8 Oct 2017 16:28:57 -
> > @@ -4,11 +4,9 @@ ONLY_FOR_ARCHS =   ${GO_ARCHS}
> > 
> >  COMMENT =  Go programming language
> > 
> > -VERSION =  1.4.3
> > -EXTRACT_SUFX = .src.tar.gz
> > -DISTNAME = go${VERSION}
> > +VERSION =  20170531
> > +DISTNAME = go1.4-bootstrap-${VERSION}
> > 
> >  PKGNAME =  go-bootstrap-${VERSION}
> > 
> > -REVISION = 4
> > 
> >  CATEGORIES =   lang
> >  
> >  HOMEPAGE = https://golang.org/
> > 
> > @@ -22,7 +20,7 @@ PERMIT_DISTFILES_FTP =  bootstrap only
> > 
> >  WANTLIB =  c m pthread
> > 
> > -MASTER_SITES = https://golang.org/dl/
> > +MASTER_SITES = https://storage.googleapis.com/golang/
> > 
> >  BUILD_DEPENDS =shells/bash
> > 
> > @@ -84,7 +82,7 @@ do-install:
> > ${INSTALL_PROGRAM} -p ${WRKDIST}/bin/go{,fmt} ${GOROOT}/bin
> > 
> > @cd ${WRKDIST} && \
> > 
> > -   find . ! -name .hg\* -type f -maxdepth 1 \
> > +   find . ! -name .git\* ! -name .hg\* -type f -maxdepth 1 \
> > 
> > -exec ${INSTALL_DATA} -p {} \
> > ${GOROOT} \;
> > 
> > Index: distinfo
> > ===
> > RCS file: /cvs/ports/lang/go-bootstrap/distinfo,v
> > retrieving revision 1.1.1.1
> > diff -u -p -u -p -r1.1.1.1 distinfo
> > --- distinfo4 Dec 2015 17:19:18 -   1.1.1.1
> > +++ distinfo8 Oct 2017 16:28:57 -
> > @@ -1,2 +1,2 @@
> > -SHA256 (go1.4.3.src.tar.gz) =
> > mUf8cFsLhBtZOMSLItwz6WR+wHUrrmblAnjfTyP2SVk=
> > -SIZE (go1.4.3.src.tar.gz) = 10875170
> > +SHA256 (go1.4-bootstrap-20170531.tar.gz) =
> > SfgG9mdiB3hht95wgfWGmVlAdy0p1MRQaME0RBp0P6I= +SIZE
> > (go1.4-bootstrap-20170531.tar.gz) = 11315348
> > Index: patches/patch-src_time_time_test_go
> > ===
> > RCS file: patches/patch-src_time_time_test_go
> > diff -N patches/patch-src_time_time_test_go
> > --- patches/patch-src_time_time_test_go 8 Oct 2017 15:40:56 -   
> > 1.1
> > +++ /dev/null   1 Jan 1970 00:00:00 -
> > @@ -1,14 +0,0 @@
> > -$OpenBSD: patch-src_time_time_test_go,v 1.1 2017/10/08 15:40:56 jsing Exp
> > $ -
> > -Index: src/time/time_test.go
> >  src/time/time_test.go.orig
> > -+++ src/time/time_test.go
> > -@@ -915,6 +915,8 @@ func TestCountMallocs(t *testing.T) {
> > - }
> > -
> > - func TestLoadFixed(t *testing.T) {
> > -+  t.Skip("skipping test for Go 1.4; Issue 17545")
> > -+
> > -   // Issue 4064: handle locations without any zone transitions.
> > -   loc, err := LoadLocation("Etc/GMT+1")
> > -   if err != nil {
> > Index: pkg/PLIST
> > ===
> > RCS file: /cvs/ports/lang/go-bootstrap/pkg/PLIST,v
> > retrieving revision 1.2
> > diff -u -p -u -p -r1.2 PLIST
> > --- pkg/PLIST   4 Jun 2017 17:50:16 -   1.2
> > +++ pkg/PLIST   8 Oct 2017 16:28:58 -
> > @@ -375,11 +375,47 @@ go/bootstrap/misc/chrome/gophertool/goph
> > 
> >  go/bootstrap/misc/chrome/gophertool/manifest.json
> >  go/bootstrap/misc/chrome/gophertool/popup.html
> >  go/bootstrap/misc/chrome/gophertool/popup.js
> > 
> > +go/bootstrap/misc/dashboard/
> > +go/bootstrap/misc/dashboard/codereview/
> > +go/bootstrap/misc/dashboard/codereview/app.yaml
> > +go/bootstrap/misc/dashboard/codereview/cron.yaml
> > +go/bootstrap/misc/dashboard/codereview/dashboard/
> > +go/bootstrap/misc/dashboard/codereview/dashboard/cl.go
> > 

Re: [lang/go-bootstrap] Switch to go1.4 release tarball

2017-10-10 Thread Stuart Henderson
On 2017/10/09 03:34, Joel Sing wrote:
> Upstream is providing a tarball of the release-branch.go1.4 git branch,
> which contains minor fixes to keep Go 1.4 building on current platforms.
> Most of the patches that we currently have for lang/go-bootstrap have
> been committed upstream - one of these is already in the go1.4
> release tarball that is available, while some have been committed and
> will appear in the next tarball that's created:
> 
>   https://github.com/golang/go/issues/20672
> 
> Switch to the go1.4 release tarball so that we can drop a patch now and
> in the future, drop most of the remaining patches.
> 
> ok?

before,   $ make show=PKGNAMES
go-bootstrap-1.4.3p4

after,$ make show=PKGNAMES 
go-bootstrap-20170531

ok either way but I wonder if it would be better to keep 1.4 in the
package name (e.g. something like 1.4.20170531)?




> Index: Makefile
> ===
> RCS file: /cvs/ports/lang/go-bootstrap/Makefile,v
> retrieving revision 1.6
> diff -u -p -u -p -r1.6 Makefile
> --- Makefile  8 Oct 2017 15:40:56 -   1.6
> +++ Makefile  8 Oct 2017 16:28:57 -
> @@ -4,11 +4,9 @@ ONLY_FOR_ARCHS = ${GO_ARCHS}
>  
>  COMMENT =Go programming language
>  
> -VERSION =1.4.3
> -EXTRACT_SUFX =   .src.tar.gz
> -DISTNAME =   go${VERSION}
> +VERSION =20170531
> +DISTNAME =   go1.4-bootstrap-${VERSION}
>  PKGNAME =go-bootstrap-${VERSION}
> -REVISION =   4
>  CATEGORIES = lang
>  
>  HOMEPAGE =   https://golang.org/
> @@ -22,7 +20,7 @@ PERMIT_DISTFILES_FTP =  bootstrap only
>  
>  WANTLIB =c m pthread
>  
> -MASTER_SITES =   https://golang.org/dl/
> +MASTER_SITES =   https://storage.googleapis.com/golang/
>  
>  BUILD_DEPENDS =  shells/bash
>  
> @@ -84,7 +82,7 @@ do-install:
>   ${INSTALL_PROGRAM} -p ${WRKDIST}/bin/go{,fmt} ${GOROOT}/bin
>  
>   @cd ${WRKDIST} && \
> - find . ! -name .hg\* -type f -maxdepth 1 \
> + find . ! -name .git\* ! -name .hg\* -type f -maxdepth 1 \
>   -exec ${INSTALL_DATA} -p {} \
>   ${GOROOT} \;
>  
> Index: distinfo
> ===
> RCS file: /cvs/ports/lang/go-bootstrap/distinfo,v
> retrieving revision 1.1.1.1
> diff -u -p -u -p -r1.1.1.1 distinfo
> --- distinfo  4 Dec 2015 17:19:18 -   1.1.1.1
> +++ distinfo  8 Oct 2017 16:28:57 -
> @@ -1,2 +1,2 @@
> -SHA256 (go1.4.3.src.tar.gz) = mUf8cFsLhBtZOMSLItwz6WR+wHUrrmblAnjfTyP2SVk=
> -SIZE (go1.4.3.src.tar.gz) = 10875170
> +SHA256 (go1.4-bootstrap-20170531.tar.gz) = 
> SfgG9mdiB3hht95wgfWGmVlAdy0p1MRQaME0RBp0P6I=
> +SIZE (go1.4-bootstrap-20170531.tar.gz) = 11315348
> Index: patches/patch-src_time_time_test_go
> ===
> RCS file: patches/patch-src_time_time_test_go
> diff -N patches/patch-src_time_time_test_go
> --- patches/patch-src_time_time_test_go   8 Oct 2017 15:40:56 -   
> 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -
> @@ -1,14 +0,0 @@
> -$OpenBSD: patch-src_time_time_test_go,v 1.1 2017/10/08 15:40:56 jsing Exp $
> -
> -Index: src/time/time_test.go
>  src/time/time_test.go.orig
> -+++ src/time/time_test.go
> -@@ -915,6 +915,8 @@ func TestCountMallocs(t *testing.T) {
> - }
> - 
> - func TestLoadFixed(t *testing.T) {
> -+t.Skip("skipping test for Go 1.4; Issue 17545")
> -+
> - // Issue 4064: handle locations without any zone transitions.
> - loc, err := LoadLocation("Etc/GMT+1")
> - if err != nil {
> Index: pkg/PLIST
> ===
> RCS file: /cvs/ports/lang/go-bootstrap/pkg/PLIST,v
> retrieving revision 1.2
> diff -u -p -u -p -r1.2 PLIST
> --- pkg/PLIST 4 Jun 2017 17:50:16 -   1.2
> +++ pkg/PLIST 8 Oct 2017 16:28:58 -
> @@ -375,11 +375,47 @@ go/bootstrap/misc/chrome/gophertool/goph
>  go/bootstrap/misc/chrome/gophertool/manifest.json
>  go/bootstrap/misc/chrome/gophertool/popup.html
>  go/bootstrap/misc/chrome/gophertool/popup.js
> +go/bootstrap/misc/dashboard/
> +go/bootstrap/misc/dashboard/codereview/
> +go/bootstrap/misc/dashboard/codereview/app.yaml
> +go/bootstrap/misc/dashboard/codereview/cron.yaml
> +go/bootstrap/misc/dashboard/codereview/dashboard/
> +go/bootstrap/misc/dashboard/codereview/dashboard/cl.go
> +go/bootstrap/misc/dashboard/codereview/dashboard/front.go
> +go/bootstrap/misc/dashboard/codereview/dashboard/gc.go
> +go/bootstrap/misc/dashboard/codereview/dashboard/mail.go
> +go/bootstrap/misc/dashboard/codereview/dashboard/people.go
> +go/bootstrap/misc/dashboard/codereview/index.yaml
> +go/bootstrap/misc/dashboard/codereview/queue.yaml
> +go/bootstrap/misc/dashboard/codereview/static/
> +go/bootstrap/misc/dashboard/codereview/static/gopherstamp.jpg
> 

Re: lang/go-bootstrap

2015-12-25 Thread Joel Sing
On Wednesday 23 December 2015 03:02:25 Joel Sing wrote:
> On Wednesday 09 December 2015 00:40:28 Joel Sing wrote:
> > I'll rework go.port.mk and the relevant packages using /usr/local/go-pkg.
> 
> This reworks go.port.mk to install packages in /usr/local/go-pkg and builds
> without -a, -work and without running things through sed and piping to
> shell. The net/websocketd and textproc/go-xlsx should now be fixed (along
> with their dependencies) - I still need to take a closer look at the other
> two...
> 
> Comments or oks?

Here's a revised version that also fixes devel/go-tools - update to a more
recent version for starters, cmd/vet and cmd/cover are now part of the
Go base distribution, so we should not be building/installing these and
godoc requires special handling do to a 'go install' mapping that exists
for legacy reasons.

ok?

Index: devel/go-check-v1/Makefile
===
RCS file: /cvs/ports/devel/go-check-v1/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- devel/go-check-v1/Makefile  19 Jun 2015 08:42:54 -  1.1.1.1
+++ devel/go-check-v1/Makefile  26 Dec 2015 07:00:42 -
@@ -7,6 +7,8 @@ HOMEPAGE =  http://labix.org/gocheck
 
 MAINTAINER =   Dmitrij D. Czarkoff 
 
+REVISION = 0
+
 # 2-clause BSD
 PERMIT_PACKAGE_CDROM = Yes
 
Index: devel/go-check-v1/pkg/PLIST
===
RCS file: /cvs/ports/devel/go-check-v1/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST
--- devel/go-check-v1/pkg/PLIST 19 Jun 2015 08:42:54 -  1.1.1.1
+++ devel/go-check-v1/pkg/PLIST 26 Dec 2015 07:00:42 -
@@ -1,4 +1,6 @@
 @comment $OpenBSD: PLIST,v 1.1.1.1 2015/06/19 08:42:54 czarkoff Exp $
+go-pkg/
+go-pkg/pkg/
 ${MODGO_PACKAGES}/
 ${MODGO_PACKAGES}/gopkg.in/
 ${MODGO_PACKAGES}/gopkg.in/check.v1.a
Index: devel/go-tools/Makefile
===
RCS file: /cvs/ports/devel/go-tools/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- devel/go-tools/Makefile 11 Aug 2015 20:15:41 -  1.3
+++ devel/go-tools/Makefile 26 Dec 2015 07:00:42 -
@@ -3,9 +3,8 @@
 COMMENT =  various tools for the Go programming language
 GH_ACCOUNT =   golang
 GH_PROJECT =   tools
-GH_COMMIT =27e692e6ec36d8f48be794f32553e1400c70dbf2
-DISTNAME = go-tools-1.4.20150206
-REVISION = 1
+GH_COMMIT =99c318c742339e824d89d23ba3b3bff4f4ab27a8
+DISTNAME = go-tools-1.5.20151226
 CATEGORIES =   devel
 HOMEPAGE = http://golang.org/
 
@@ -14,19 +13,19 @@ MAINTAINER =Dmitrij D. Czarkoff 
Index: devel/go-tools/distinfo
===
RCS file: /cvs/ports/devel/go-tools/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- devel/go-tools/distinfo 8 Jun 2015 09:41:03 -   1.1.1.1
+++ devel/go-tools/distinfo 26 Dec 2015 07:00:42 -
@@ -1,2 +1,2 @@
-SHA256 (go-tools-1.4.20150206.tar.gz) = 
TeD9TrQh23FPay1LlAvHUTuTmEb7ZxsWx/okCb3vf+g=
-SIZE (go-tools-1.4.20150206.tar.gz) = 1625310
+SHA256 (go-tools-1.5.20151226.tar.gz) = 
JDNfXzok6DwT7pexMzVL4DCxVSOXoYOJqcCkC8mLWd4=
+SIZE (go-tools-1.5.20151226.tar.gz) = 1661993
Index: devel/go-tools/pkg/DESCR
===
RCS file: /cvs/ports/devel/go-tools/pkg/DESCR,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 DESCR
--- devel/go-tools/pkg/DESCR8 Jun 2015 09:41:03 -   1.1.1.1
+++ devel/go-tools/pkg/DESCR26 Dec 2015 07:00:42 -
@@ -18,5 +18,3 @@ programming language:
  * ssadump displays and interprets the SSA form of Go programs
  * stress  runs a given process in parallel in a loop and collects failures
  * stringercreats of methods that satisfy the fmt.Stringer interface
- * cover   analyzes the coverage profiles
- * vet examines Go source code and reports suspicious constructs
Index: devel/go-tools/pkg/PLIST
===
RCS file: /cvs/ports/devel/go-tools/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- devel/go-tools/pkg/PLIST11 Aug 2015 20:15:41 -  1.3
+++ devel/go-tools/pkg/PLIST26 Dec 2015 07:00:42 -
@@ -1,7 +1,6 @@
 @comment $OpenBSD: PLIST,v 1.3 2015/08/11 20:15:41 jasper Exp $
-@pkgpath devel/gocover
-@pkgpath textproc/godoc
 @conflict stress-*
+@pkgpath textproc/godoc
 @bin bin/benchcmp
 @bin bin/callgraph
 @bin bin/digraph
@@ -17,6 +16,4 @@
 @bin bin/ssadump
 @bin bin/stress
 @bin bin/stringer
-@bin ${MODGO_TOOLS}/cover
-@bin ${MODGO_TOOLS}/vet
 @rcscript ${RCDIR}/godoc
Index: lang/go/go.port.mk
===
RCS file: /cvs/ports/lang/go/go.port.mk,v
retrieving revision 1.4

Re: lang/go-bootstrap

2015-12-22 Thread Dmitrij D. Czarkoff
Joel Sing said:
> I don't want to patch /usr/local/go-pkg into the default $GOPATH - that would 
> likely create a bunch of "oh, why is it behaving like that" problems. We 
> could 
> tell people to add it to their Go path if they want to use it, but I'm 
> tempted 
> to only use it for port build dependencies and let non-ports builds stick 
> with 
> 'go get'...

I second that.  There are multiple reasons to want clean GOPATH on
system with go packages.

-- 
Dmitrij D. Czarkoff



Re: lang/go-bootstrap

2015-12-22 Thread Joel Sing
On Wednesday 09 December 2015 00:40:28 Joel Sing wrote:
> I'll rework go.port.mk and the relevant packages using /usr/local/go-pkg.

This reworks go.port.mk to install packages in /usr/local/go-pkg and builds
without -a, -work and without running things through sed and piping to shell.
The net/websocketd and textproc/go-xlsx should now be fixed (along with
their dependencies) - I still need to take a closer look at the other two...

Comments or oks?

Index: lang/go/go.port.mk
===
RCS file: /cvs/ports/lang/go/go.port.mk,v
retrieving revision 1.4
diff -u -p -r1.4 go.port.mk
--- lang/go/go.port.mk  11 Aug 2015 20:16:21 -  1.4
+++ lang/go/go.port.mk  22 Dec 2015 15:56:03 -
@@ -11,16 +11,17 @@ MODGO_BUILD_DEPENDS =   lang/go
 BUILD_DEPENDS +=   ${MODGO_BUILD_DEPENDS}
 .endif
 
-MODGO_PACKAGES =   go/pkg/openbsd_${MACHINE_ARCH:S/i386/386/}
-MODGO_SOURCES =go/src
-MODGO_TOOLS =  go/pkg/tool/openbsd_${MACHINE_ARCH:S/i386/386/}
+MODGO_PACKAGE_PATH =   ${PREFIX}/go-pkg
+MODGO_PACKAGES =   go-pkg/pkg/openbsd_${MACHINE_ARCH:S/i386/386/}
+MODGO_SOURCES =go-pkg/src
+MODGO_TOOLS =  go-pkg/tool/openbsd_${MACHINE_ARCH:S/i386/386/}
 
 SUBST_VARS +=  MODGO_TOOLS MODGO_PACKAGES MODGO_SOURCES
 
 MODGO_SUBDIR ?=${WRKDIST}
 MODGO_TYPE ?=  bin
 MODGO_WORKSPACE ?= ${WRKDIR}/go
-MODGO_CMD ?=   unset GOPATH; export GOPATH="${MODGO_WORKSPACE}"; go
+MODGO_CMD ?=   unset GOPATH; export 
GOPATH="${MODGO_WORKSPACE}:${MODGO_PACKAGE_PATH}"; go
 MODGO_BUILD_CMD =  ${MODGO_CMD} install ${MODGO_FLAGS}
 MODGO_TEST_CMD =   ${MODGO_CMD} test ${MODGO_FLAGS}
 
@@ -36,29 +37,20 @@ MODGO_SETUP_WORKSPACE = mkdir -p ${WRKSR
 
 CATEGORIES +=  lang/go
 
-# Go tends to ignore environment and place some files to system-wide
-# directories.  To prevent such behavior, this modules fixes paths in
-# auto-generated build instructions, and then feeds fixed script to shell
-# The "operation not permitted" filter is needed because Go outputs permission
-# error if USE_SYSTRACE=Yes option is set.
-MODGO_BUILD_TARGET =   ${MODGO_BUILD_CMD} ${ALL_TARGET} 2>&1 | sed -E \
-   -e 's, ${LOCALBASE}/go, ${MODGO_WORKSPACE},' \
-   -e '/operation not permitted/d' \
-   -e 's,\$$WORK,${WRKBUILD},g' | sh -v
+MODGO_BUILD_TARGET =   ${MODGO_BUILD_CMD} ${ALL_TARGET}
+MODGO_FLAGS ?= -x
 
 .if ${MODGO_TYPE:L:Mbin}
-MODGO_FLAGS ?= -x -work
-MODGO_INSTALL_TARGET += cp ${MODGO_WORKSPACE}/bin/* ${PREFIX}/bin
+MODGO_INSTALL_TARGET = cp ${MODGO_WORKSPACE}/bin/* ${PREFIX}/bin
 .endif
 
 # Go source files serve the purpose of libraries, so sources should be included
 # with library ports.
 .if ${MODGO_TYPE:L:Mlib}
-MODGO_FLAGS ?= -a -x -work
-MODGO_INSTALL_TARGET = ${INSTALL_DATA_DIR} ${PREFIX}/go; \
+MODGO_INSTALL_TARGET = ${INSTALL_DATA_DIR} ${MODGO_PACKAGE_PATH}; \
cp -R ${MODGO_WORKSPACE}/pkg \
- ${MODGO_WORKSPACE}/src \
-   ${PREFIX}/go;
+   ${MODGO_WORKSPACE}/src \
+   ${MODGO_PACKAGE_PATH};
 .endif
 
 MODGO_TEST_TARGET =${MODGO_TEST_CMD} ${TEST_TARGET}
Index: net/go-websocket/Makefile
===
RCS file: /cvs/ports/net/go-websocket/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- net/go-websocket/Makefile   27 Jul 2015 21:06:22 -  1.5
+++ net/go-websocket/Makefile   22 Dec 2015 15:56:03 -
@@ -3,6 +3,7 @@
 COMMENT =  golang websocket package
 
 VERSION =  0.1
+REVISION = 0
 DISTNAME = go-websocket-${VERSION}
 GH_COMMIT =446d52dd4018303a13b36097e26d0888aca5d6ef
 GH_ACCOUNT =   golang
Index: net/go-websocket/pkg/PLIST
===
RCS file: /cvs/ports/net/go-websocket/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- net/go-websocket/pkg/PLIST  8 Jun 2015 09:17:04 -   1.2
+++ net/go-websocket/pkg/PLIST  22 Dec 2015 15:56:03 -
@@ -1,8 +1,12 @@
 @comment $OpenBSD: PLIST,v 1.2 2015/06/08 09:17:04 czarkoff Exp $
+go-pkg/
+go-pkg/pkg/
+${MODGO_PACKAGES}/
 ${MODGO_PACKAGES}/golang.org/
 ${MODGO_PACKAGES}/golang.org/x/
 ${MODGO_PACKAGES}/golang.org/x/net/
 ${MODGO_PACKAGES}/golang.org/x/net/websocket.a
+${MODGO_SOURCES}/
 ${MODGO_SOURCES}/golang.org/
 ${MODGO_SOURCES}/golang.org/x/
 ${MODGO_SOURCES}/golang.org/x/net/
Index: textproc/go-xlsx/Makefile
===
RCS file: /cvs/ports/textproc/go-xlsx/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- textproc/go-xlsx/Makefile   18 Oct 2015 14:58:55 -  1.3
+++ textproc/go-xlsx/Makefile 

Re: lang/go-bootstrap

2015-12-22 Thread Joel Sing
On Thursday 10 December 2015 17:50:20 Michael McConville wrote:
> Joel Sing wrote:
> > Thanks for clarlifying - we could still implement 'go get -d' as a way
> > of getting sources, but it would be more work than it is likely worth
> > (and there are also some issues surrounding which versions of the
> > dependencies get fetched).
> > 
> > I'll rework go.port.mk and the relevant packages using
> > /usr/local/go-pkg.
> 
> Just to clarify, is /usr/local/go-pkg (or whatever else we end up
> calling the dir) going to be added to the default $GOPATH as a patch?
> Will it be suggested to the user in a post-install message? Or is this
> only for the port system, and users won't have access to the port
> dependencies?

I don't want to patch /usr/local/go-pkg into the default $GOPATH - that would 
likely create a bunch of "oh, why is it behaving like that" problems. We could 
tell people to add it to their Go path if they want to use it, but I'm tempted 
to only use it for port build dependencies and let non-ports builds stick with 
'go get'...



Re: lang/go-bootstrap

2015-12-22 Thread Dmitrij D. Czarkoff
Joel Sing said:
> This reworks go.port.mk to install packages in /usr/local/go-pkg and builds
> without -a, -work and without running things through sed and piping to shell.
> The net/websocketd and textproc/go-xlsx should now be fixed (along with
> their dependencies) - I still need to take a closer look at the other two...
> 
> Comments or oks?

I'd suggest that

> Index: net/go-websocket/pkg/PLIST
[...]
> +go-pkg/
> +go-pkg/pkg/

> Index: textproc/go-xlsx/pkg/PLIST
[...]
> +go-pkg/
> +go-pkg/pkg/

Should go into lang/go instead.  Otherwise OK czarkoff@.

-- 
Dmitrij D. Czarkoff



Re: lang/go-bootstrap

2015-12-10 Thread Michael McConville
Joel Sing wrote:
> Thanks for clarlifying - we could still implement 'go get -d' as a way
> of getting sources, but it would be more work than it is likely worth
> (and there are also some issues surrounding which versions of the
> dependencies get fetched).
> 
> I'll rework go.port.mk and the relevant packages using
> /usr/local/go-pkg.

Just to clarify, is /usr/local/go-pkg (or whatever else we end up
calling the dir) going to be added to the default $GOPATH as a patch?
Will it be suggested to the user in a post-install message? Or is this
only for the port system, and users won't have access to the port
dependencies?



Re: lang/go-bootstrap

2015-12-08 Thread Joel Sing
On Monday 07 December 2015 23:31:34 Stuart Henderson wrote:
> On 2015/12/08 10:05, Joel Sing wrote:
> > On Monday 07 December 2015 14:18:52 Kent R. Spillner wrote:
> > > On Tue, Dec 08, 2015 at 02:29:03AM +1100, Joel Sing wrote:
> > > > This brings me to the next issue/topic - installing additional
> > > > packages
> > > > under /usr/local/go is probably a bad idea.
> > > 
> > > My recollection is that the other issues you mentioned were necessary in
> > > order to make this work.  So if everyone agrees to a fix for this then I
> > > believe the others just go away.
> > > 
> > > > There are likely two options - we could install packages in a separate
> > > > location (e.g. /usr/local/go-pkg) and then when code is built it is
> > > > added
> > > > to GOPATH. Alternatively, the code is fetched and built when the
> > > > binary
> > > > is built
> > > 
> > > I think option #1 (install packages in a separate location and then add
> > > it
> > > to GOPATH) is our only choice because ports shouldn't fetch anything
> > > during
> > > builds.
> > 
> > I was moreso thinking along the lines of using 'go get -d' to fetch the
> > sources,
> 
> This is the main problem that go.port.mk was trying to solve - file fetching
> is done by ports infrastructure, not by the port itself. In the bulk build
> case, this is totally under control of DPB which calls out to ftp(1) to
> fetch as a separate uid, and DPB checks the hash itself - the port Makefile
> is only used to fetch the filename/url.
> 
> The uid running the actual port build doesn't have network privileges.

Thanks for clarlifying - we could still implement 'go get -d' as a way of 
getting sources, but it would be more work than it is likely worth (and there 
are also some issues surrounding which versions of the dependencies get 
fetched).

I'll rework go.port.mk and the relevant packages using /usr/local/go-pkg.



Re: lang/go-bootstrap

2015-12-07 Thread Joel Sing
On Sunday 06 December 2015 16:44:33 Stuart Henderson wrote:
> Slight problem with the go update, it breaks build of some ports using
> the go module:
> 
> textproc/go-xlsx
> net/go-websocket
> devel/go-check-v1
> devel/go-tools

I obviously did not get to look carefully at r1.2 of go.port.mk - there are a 
number of issues that should be resolved:

- Running 'go install -x' and piping the results through sed and sh -v is 
crazy. Firstly, 'go install -x' will *run* those commands, then they're being 
run a second time around via sh. Not to mention that there are cases where 
replacing GOROOT is wrong. If Go is writing outside of GOPATH then it is 
either being called/used incorrectly, or there is a bug that should be fixed.

- Using -work is going to cause mess since it prints the work directory and 
leaves the work directory behind. I cannot see anything that is cleaning this 
up, so we're left with /tmp/go-build*.

- Using 'go build -a' should be unnecessary - furthermore, the semantics of -a 
have changed between go1.4 and go1.5. In go1.4 the standard library was 
excluded from the -a flag whereas for go1.5 it does mean all dependencies 
including the standard library (this was the same for go1.3). However, there 
is a blanket 'do not rebuild standard library packages' in place when the -a 
flag is not specified.

This brings me to the next issue/topic - installing additional packages under 
/usr/local/go is probably a bad idea. The biggest issue is that Go treats 
packages under that path as being 'standard library' and as such, they do not 
get rebuilt unless the -a flag is used. The Go development model is that you 
fetch additional packages into your workspace - obviously this does not work 
that well for prepackaged/compiled code. There are likely two options - we 
could install packages in a separate location (e.g. /usr/local/go-pkg) and 
then when code is built it is added to GOPATH. Alternatively, the code is 
fetched and built when the binary is built (for example, when building 
net/websocketd, net/go-websocket is pulled in and compiled at the same time.
I don't have a strong preference, however polluting /usr/local/go is not going 
to work well unless we use -a, which will now attempt to rebuild all standard 
library code and fail.



Re: lang/go-bootstrap

2015-12-07 Thread Kent R. Spillner
On Tue, Dec 08, 2015 at 02:29:03AM +1100, Joel Sing wrote:
> This brings me to the next issue/topic - installing additional packages under 
> /usr/local/go is probably a bad idea.

My recollection is that the other issues you mentioned were necessary in order
to make this work.  So if everyone agrees to a fix for this then I believe
the others just go away.

> There are likely two options - we could install packages in a separate
> location (e.g. /usr/local/go-pkg) and then when code is built it is added to
> GOPATH. Alternatively, the code is fetched and built when the binary is built

I think option #1 (install packages in a separate location and then add it to
GOPATH) is our only choice because ports shouldn't fetch anything during
builds.  Is it possible to just add /usr/local/go-pkg to GOPATH and then have
Go automatically pick up anything installed correctly under that directory?
Or would we add each dependency installed under /usr/local/go-pkg to GOPATH
separately?  Alternatively, we could just roll & host our own distfiles that
include all of the dependencies.  I thought about doing that for
net/websocketd, but ultimately decided it would be ok to install a library
from the golang.org/x/net package in /usr/local/go.  Sorry!  :)



Re: lang/go-bootstrap

2015-12-07 Thread Dmitrij D. Czarkoff
Joel Sing said:
> I obviously did not get to look carefully at r1.2 of go.port.mk - there are a 
> number of issues that should be resolved:
> 
> - Running 'go install -x' and piping the results through sed and sh -v is 
> crazy. Firstly, 'go install -x' will *run* those commands, then they're being 
> run a second time around via sh. Not to mention that there are cases where 
> replacing GOROOT is wrong. If Go is writing outside of GOPATH then it is 
> either being called/used incorrectly, or there is a bug that should be fixed.
> 
> - Using -work is going to cause mess since it prints the work directory and 
> leaves the work directory behind. I cannot see anything that is cleaning this 
> up, so we're left with /tmp/go-build*.
> 
> - Using 'go build -a' should be unnecessary - furthermore, the semantics of 
> -a 
> have changed between go1.4 and go1.5. In go1.4 the standard library was 
> excluded from the -a flag whereas for go1.5 it does mean all dependencies 
> including the standard library (this was the same for go1.3). However, there 
> is a blanket 'do not rebuild standard library packages' in place when the -a 
> flag is not specified.

The module was built for go 1.4, and most of it needs rewrite for 1.5.
There are also other issues with it.  I'd rather decouple update of
golang port from update of go ports and this module.

> This brings me to the next issue/topic - installing additional packages under 
> /usr/local/go is probably a bad idea. The biggest issue is that Go treats 
> packages under that path as being 'standard library' and as such, they do not 
> get rebuilt unless the -a flag is used. The Go development model is that you 
> fetch additional packages into your workspace - obviously this does not work 
> that well for prepackaged/compiled code. There are likely two options - we 
> could install packages in a separate location (e.g. /usr/local/go-pkg) and 
> then when code is built it is added to GOPATH.

I had some issues with this approach with go 1.4.  If it works with 1.5,
I am all for it, albeit I'd rather use location under /usr/local/go
root, eg. /usr/local/go/3rdparty.

> Alternatively, the code is fetched and built when the binary is built
> (for example, when building net/websocketd, net/go-websocket is pulled
> in and compiled at the same time.

This happens during build stage, which should never happen in ports.

-- 
Dmitrij D. Czarkoff



Re: lang/go-bootstrap

2015-12-07 Thread Stuart Henderson
On 2015/12/08 10:05, Joel Sing wrote:
> On Monday 07 December 2015 14:18:52 Kent R. Spillner wrote:
> > On Tue, Dec 08, 2015 at 02:29:03AM +1100, Joel Sing wrote:
> > > This brings me to the next issue/topic - installing additional packages
> > > under /usr/local/go is probably a bad idea.
> > 
> > My recollection is that the other issues you mentioned were necessary in
> > order to make this work.  So if everyone agrees to a fix for this then I
> > believe the others just go away.
> > 
> > > There are likely two options - we could install packages in a separate
> > > location (e.g. /usr/local/go-pkg) and then when code is built it is added
> > > to GOPATH. Alternatively, the code is fetched and built when the binary
> > > is built
> >
> > I think option #1 (install packages in a separate location and then add it
> > to GOPATH) is our only choice because ports shouldn't fetch anything during
> > builds.
> 
> I was moreso thinking along the lines of using 'go get -d' to fetch the 
> sources,

This is the main problem that go.port.mk was trying to solve - file fetching
is done by ports infrastructure, not by the port itself. In the bulk build
case, this is totally under control of DPB which calls out to ftp(1) to
fetch as a separate uid, and DPB checks the hash itself - the port Makefile
is only used to fetch the filename/url.

The uid running the actual port build doesn't have network privileges.



Re: lang/go-bootstrap

2015-12-06 Thread Stuart Henderson
Slight problem with the go update, it breaks build of some ports using
the go module:

textproc/go-xlsx
net/go-websocket
devel/go-check-v1
devel/go-tools



Re: lang/go-bootstrap

2015-12-06 Thread Michael McConville
Michael McConville wrote:
> Michael McConville wrote:
> > Stuart Henderson wrote:
> > > Slight problem with the go update, it breaks build of some ports using
> > > the go module:
> > > 
> > > textproc/go-xlsx
> > > net/go-websocket
> > > devel/go-check-v1
> > > devel/go-tools
> > 
> > I'm working on an update for go-tools.

I'll save the rest of my layman's analysis, but basically the root of
the failure is this import:

> ./api.go:13: import 
> /home/build/go-tools/go/pkg/openbsd_amd64/golang.org/x/tools/container/intsets.a:
>  not a package file

This causes golang.org/x/tools/go/pointer to fail, which propagates up.

I'm not yet sure how OpenBSD-specific this is. Maybe someone more
actively involved with Go can point me in the right direction.



Re: lang/go-bootstrap

2015-12-06 Thread Stuart Henderson
On 2015/12/06 13:50, Michael McConville wrote:
> Also, make update-plist isn't recognizing the rc script for me. It says:
> 
> > make-plist: Bogus element outside of every prefix: /etc/rc.d/godoc

You need to re-add this manually, update-plist doesn't handle rc scripts.

> -@comment $OpenBSD: PLIST,v 1.3 2015/08/11 20:15:41 jasper Exp $
> -@pkgpath devel/gocover
> -@pkgpath textproc/godoc
> -@conflict stress-*

the pkgpath/conflict lines should stay.



Re: lang/go-bootstrap

2015-12-06 Thread Michael McConville
Stuart Henderson wrote:
> Slight problem with the go update, it breaks build of some ports using
> the go module:
> 
> textproc/go-xlsx
> net/go-websocket
> devel/go-check-v1
> devel/go-tools

I'm working on an update for go-tools.

We have a manual install command for cover and vet, but the binaries
moved from $MODGO_TOOLS to the main binary dir. Not sure if we still
need them to be be under $MODGO_TOOLS anymore. The below diff leaves a
copy in both dirs.

Also, make update-plist isn't recognizing the rc script for me. It says:

> make-plist: Bogus element outside of every prefix: /etc/rc.d/godoc


Index: Makefile
===
RCS file: /cvs/ports/devel/go-tools/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- Makefile11 Aug 2015 20:15:41 -  1.3
+++ Makefile6 Dec 2015 18:46:56 -
@@ -3,9 +3,8 @@
 COMMENT =  various tools for the Go programming language
 GH_ACCOUNT =   golang
 GH_PROJECT =   tools
-GH_COMMIT =27e692e6ec36d8f48be794f32553e1400c70dbf2
-DISTNAME = go-tools-1.4.20150206
-REVISION = 1
+GH_TAGNAME =   release-branch.go1.5
+DISTNAME = go-tools-1.5
 CATEGORIES =   devel
 HOMEPAGE = http://golang.org/
 
@@ -50,7 +49,7 @@ post-patch:
 post-install:
${INSTALL_DATA_DIR} ${PREFIX}/${MODGO_TOOLS}
 .for tool in vet cover
-   ${INSTALL_PROGRAM} ${WRKDIR}/${MODGO_TOOLS}/${tool} \
+   ${INSTALL_PROGRAM} ${WRKDIR}/go/bin/${tool} \
${PREFIX}/${MODGO_TOOLS}/${tool}
 .endfor
 
Index: distinfo
===
RCS file: /cvs/ports/devel/go-tools/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo8 Jun 2015 09:41:03 -   1.1.1.1
+++ distinfo6 Dec 2015 18:46:56 -
@@ -1,2 +1,2 @@
-SHA256 (go-tools-1.4.20150206.tar.gz) = 
TeD9TrQh23FPay1LlAvHUTuTmEb7ZxsWx/okCb3vf+g=
-SIZE (go-tools-1.4.20150206.tar.gz) = 1625310
+SHA256 (go-tools-1.5.tar.gz) = DYZjGq7I0MLKcFbgLIov39ocwqbqPXPI8YU++CyM3ic=
+SIZE (go-tools-1.5.tar.gz) = 1634851
Index: pkg/PLIST
===
RCS file: /cvs/ports/devel/go-tools/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST   11 Aug 2015 20:15:41 -  1.3
+++ pkg/PLIST   6 Dec 2015 18:46:56 -
@@ -1,9 +1,7 @@
-@comment $OpenBSD: PLIST,v 1.3 2015/08/11 20:15:41 jasper Exp $
-@pkgpath devel/gocover
-@pkgpath textproc/godoc
-@conflict stress-*
+@comment $OpenBSD$
 @bin bin/benchcmp
 @bin bin/callgraph
+@bin bin/cover
 @bin bin/digraph
 @bin bin/eg
 @bin bin/fiximports
@@ -17,6 +15,6 @@
 @bin bin/ssadump
 @bin bin/stress
 @bin bin/stringer
+@bin bin/vet
 @bin ${MODGO_TOOLS}/cover
 @bin ${MODGO_TOOLS}/vet
-@rcscript ${RCDIR}/godoc



Re: lang/go-bootstrap

2015-12-06 Thread Michael McConville
Michael McConville wrote:
> Stuart Henderson wrote:
> > Slight problem with the go update, it breaks build of some ports using
> > the go module:
> > 
> > textproc/go-xlsx
> > net/go-websocket
> > devel/go-check-v1
> > devel/go-tools
> 
> I'm working on an update for go-tools.
> 
> We have a manual install command for cover and vet, but the binaries
> moved from $MODGO_TOOLS to the main binary dir. Not sure if we still
> need them to be be under $MODGO_TOOLS anymore. The below diff leaves a
> copy in both dirs.
> 
> Also, make update-plist isn't recognizing the rc script for me. It says:
> 
> > make-plist: Bogus element outside of every prefix: /etc/rc.d/godoc

I just realized that that tag doesn't make sense to use here. It's a
shame that they don't use releases. We'll have to pick a daily tag to
use, as was the case before.

> Index: Makefile
> ===
> RCS file: /cvs/ports/devel/go-tools/Makefile,v
> retrieving revision 1.3
> diff -u -p -r1.3 Makefile
> --- Makefile  11 Aug 2015 20:15:41 -  1.3
> +++ Makefile  6 Dec 2015 18:46:56 -
> @@ -3,9 +3,8 @@
>  COMMENT =various tools for the Go programming language
>  GH_ACCOUNT = golang
>  GH_PROJECT = tools
> -GH_COMMIT =  27e692e6ec36d8f48be794f32553e1400c70dbf2
> -DISTNAME =   go-tools-1.4.20150206
> -REVISION =   1
> +GH_TAGNAME = release-branch.go1.5
> +DISTNAME =   go-tools-1.5
>  CATEGORIES = devel
>  HOMEPAGE =   http://golang.org/
>  
> @@ -50,7 +49,7 @@ post-patch:
>  post-install:
>   ${INSTALL_DATA_DIR} ${PREFIX}/${MODGO_TOOLS}
>  .for tool in vet cover
> - ${INSTALL_PROGRAM} ${WRKDIR}/${MODGO_TOOLS}/${tool} \
> + ${INSTALL_PROGRAM} ${WRKDIR}/go/bin/${tool} \
>   ${PREFIX}/${MODGO_TOOLS}/${tool}
>  .endfor
>  
> Index: distinfo
> ===
> RCS file: /cvs/ports/devel/go-tools/distinfo,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 distinfo
> --- distinfo  8 Jun 2015 09:41:03 -   1.1.1.1
> +++ distinfo  6 Dec 2015 18:46:56 -
> @@ -1,2 +1,2 @@
> -SHA256 (go-tools-1.4.20150206.tar.gz) = 
> TeD9TrQh23FPay1LlAvHUTuTmEb7ZxsWx/okCb3vf+g=
> -SIZE (go-tools-1.4.20150206.tar.gz) = 1625310
> +SHA256 (go-tools-1.5.tar.gz) = DYZjGq7I0MLKcFbgLIov39ocwqbqPXPI8YU++CyM3ic=
> +SIZE (go-tools-1.5.tar.gz) = 1634851
> Index: pkg/PLIST
> ===
> RCS file: /cvs/ports/devel/go-tools/pkg/PLIST,v
> retrieving revision 1.3
> diff -u -p -r1.3 PLIST
> --- pkg/PLIST 11 Aug 2015 20:15:41 -  1.3
> +++ pkg/PLIST 6 Dec 2015 18:46:56 -
> @@ -1,9 +1,7 @@
> -@comment $OpenBSD: PLIST,v 1.3 2015/08/11 20:15:41 jasper Exp $
> -@pkgpath devel/gocover
> -@pkgpath textproc/godoc
> -@conflict stress-*
> +@comment $OpenBSD$
>  @bin bin/benchcmp
>  @bin bin/callgraph
> +@bin bin/cover
>  @bin bin/digraph
>  @bin bin/eg
>  @bin bin/fiximports
> @@ -17,6 +15,6 @@
>  @bin bin/ssadump
>  @bin bin/stress
>  @bin bin/stringer
> +@bin bin/vet
>  @bin ${MODGO_TOOLS}/cover
>  @bin ${MODGO_TOOLS}/vet
> -@rcscript ${RCDIR}/godoc
> 



Re: lang/go-bootstrap

2015-12-04 Thread Adam Wolk
On Thu, 3 Dec 2015 19:41:35 +0100
Jasper Lievisse Adriaanse  wrote:

> On Fri, Dec 04, 2015 at 03:07:01AM +1100, Joel Sing wrote:
> > From Go 1.5 onwards, an existing go compiler is needed to bootstrap
> > the build (the runtime is now written in Go, rather than C) - the
> > current "promise" is that the bootstrap will only use functionality
> > from the Go 1.4 API.
> > 
> > So that we can continue to build natively, the attached is a
> > lang/go-bootstrap that is effectively the Go 1.4.3 release - this
> > is intended purely for building Go 1.5+ and is not meant for
> > installing/distributing otherwise (and it is marked as such in the
> > Makefile).  
> Perhaps it would be worth adjusting the DESCR accordingly? I.e.
> mention that this is the bootstrapper?
>  
> > In the not too distant future (time permitting) I'll likely patch
> > this so that we can also build/release Go for openbsd/arm.
> > 
> > Passes tests on i386 and amd64.
> > 
> > ok?  
> go-bootstrap doesn't package for me:
> Error: 
> /usr/obj/ports/go-bootstrap-1.4.3/fake-amd64/usr/local/go/bootstrap/pkg/tool/openbsd_amd64/api
> does not exist
> 
> Commenting that file allowed to build go-bootstrap and Go 1.5, as
> well as some projects that require Go 1.5.
> 
> Would it make sense to go for a directory layout such as:
> lang/go/{bootstrap,go} ? Most of the Makefile's can be factored into a
> Makefile.inc. If not, then please sync
> go-bootstrap/Make5Bfile:MASTER_SITES with the MASTER_SITES from the
> 1.5 update (switch to https).

Same issue as reported by jasper@

===>  Building package for go-bootstrap-1.4.3
Create /usr/ports/packages/amd64/all/go-bootstrap-1.4.3.tgz
checksumming|***
 | 17%
Error: 
/usr/ports/pobj/go-bootstrap-1.4.3/fake-amd64/usr/local/go/bootstrap/pkg/tool/openbsd_amd64/api
 does not exist
Fatal error: can't continue
 at /usr/libdata/perl5/OpenBSD/PkgCreate.pm line 1543.
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:1959 
'/usr/ports/packages/amd64/all/go-bootstrap-1.4.3.tgz')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2511 
'_internal-package')
*** Error 1 in /usr/ports/mystuff/lang/go-bootstrap 
(/usr/ports/infrastructure/mk/bsd.port.mk:2491 'package')
$ 

Commenting out that single entry from PLIST makes it pass packaging.
Including building the 1.5.2 go compiler which requires this bootstrap
package.

Tested on amd64 -current snapshot from 28th November.

Regards,
Adam Wolk



Re: lang/go-bootstrap

2015-12-03 Thread Jasper Lievisse Adriaanse
On Fri, Dec 04, 2015 at 03:07:01AM +1100, Joel Sing wrote:
> From Go 1.5 onwards, an existing go compiler is needed to bootstrap the build 
> (the runtime is now written in Go, rather than C) - the current "promise" is 
> that the bootstrap will only use functionality from the Go 1.4 API.
> 
> So that we can continue to build natively, the attached is a 
> lang/go-bootstrap 
> that is effectively the Go 1.4.3 release - this is intended purely for 
> building 
> Go 1.5+ and is not meant for installing/distributing otherwise (and it is 
> marked as such in the Makefile).
Perhaps it would be worth adjusting the DESCR accordingly? I.e. mention that
this is the bootstrapper?
 
> In the not too distant future (time permitting) I'll likely patch this so 
> that 
> we can also build/release Go for openbsd/arm.
> 
> Passes tests on i386 and amd64.
> 
> ok?
go-bootstrap doesn't package for me:
Error: 
/usr/obj/ports/go-bootstrap-1.4.3/fake-amd64/usr/local/go/bootstrap/pkg/tool/openbsd_amd64/api
 does not exist

Commenting that file allowed to build go-bootstrap and Go 1.5, as well as some
projects that require Go 1.5.

Would it make sense to go for a directory layout such as:
lang/go/{bootstrap,go} ? Most of the Makefile's can be factored into a
Makefile.inc. If not, then please sync go-bootstrap/Make5Bfile:MASTER_SITES with
the MASTER_SITES from the 1.5 update (switch to https).
-- 
jasper