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 -0000 1.1.1.1 +++ devel/go-check-v1/Makefile 26 Dec 2015 07:00:42 -0000 @@ -7,6 +7,8 @@ HOMEPAGE = http://labix.org/gocheck MAINTAINER = Dmitrij D. Czarkoff <czark...@gmail.com> +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 -0000 1.1.1.1 +++ devel/go-check-v1/pkg/PLIST 26 Dec 2015 07:00:42 -0000 @@ -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 -0000 1.3 +++ devel/go-tools/Makefile 26 Dec 2015 07:00:42 -0000 @@ -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 <czark # 3-clause BSD PERMIT_PACKAGE_CDROM = Yes -WANTLIB += c pthread +WANTLIB += c pthread MODULES = lang/go RUN_DEPENDS = ${MODGO_RUN_DEPENDS} +GODOC_TARGET = golang.org/x/tools/cmd/godoc + ALL_TARGET = golang.org/x/tools/cmd/benchcmp \ golang.org/x/tools/cmd/callgraph \ - golang.org/x/tools/cmd/cover \ golang.org/x/tools/cmd/digraph \ golang.org/x/tools/cmd/eg \ golang.org/x/tools/cmd/fiximports \ - golang.org/x/tools/cmd/godoc \ golang.org/x/tools/cmd/godex \ golang.org/x/tools/cmd/goimports \ golang.org/x/tools/cmd/gomvpkg \ @@ -36,22 +35,21 @@ ALL_TARGET = golang.org/x/tools/cmd/ben golang.org/x/tools/cmd/ssadump \ golang.org/x/tools/cmd/stress \ golang.org/x/tools/cmd/stringer \ - golang.org/x/tools/cmd/vet # golang.org/x/tools/cmd/html2article \ # golang.org/x/tools/cmd/present \ -MODGO_TYPE = bin tool -MODGO_FLAGS = -n +MODGO_TYPE = bin post-patch: mkdir -p ${MODGO_WORKSPACE}/src/golang.org/x mv ${WRKDIST} ${MODGO_WORKSPACE}/src/golang.org/x/tools -post-install: - ${INSTALL_DATA_DIR} ${PREFIX}/${MODGO_TOOLS} -.for tool in vet cover - ${INSTALL_PROGRAM} ${WRKDIR}/${MODGO_TOOLS}/${tool} \ - ${PREFIX}/${MODGO_TOOLS}/${tool} -.endfor +# godoc needs special handling - prior to Go 1.2, godoc was part of the base +# distribution and there is a remaining mapping that causes 'go install' to +# install godoc in $GOROOT/bin instead of $GOPATH/bin (golang.org/issue/6654). +do-build: + mkdir -p ${MODGO_WORKSPACE}/bin + ${MODGO_CMD} build ${MODGO_FLAGS} -o ${MODGO_WORKSPACE}/bin/godoc ${GODOC_TARGET} + ${MODGO_BUILD_TARGET} .include <bsd.port.mk> 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 -0000 1.1.1.1 +++ devel/go-tools/distinfo 26 Dec 2015 07:00:42 -0000 @@ -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/DESCR 8 Jun 2015 09:41:03 -0000 1.1.1.1 +++ devel/go-tools/pkg/DESCR 26 Dec 2015 07:00:42 -0000 @@ -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 * stringer creats 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/PLIST 11 Aug 2015 20:15:41 -0000 1.3 +++ devel/go-tools/pkg/PLIST 26 Dec 2015 07:00:42 -0000 @@ -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 diff -u -p -r1.4 go.port.mk --- lang/go/go.port.mk 11 Aug 2015 20:16:21 -0000 1.4 +++ lang/go/go.port.mk 26 Dec 2015 07:00:42 -0000 @@ -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 -0000 1.5 +++ net/go-websocket/Makefile 26 Dec 2015 07:00:42 -0000 @@ -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 -0000 1.2 +++ net/go-websocket/pkg/PLIST 26 Dec 2015 07:00:42 -0000 @@ -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 -0000 1.3 +++ textproc/go-xlsx/Makefile 26 Dec 2015 07:00:42 -0000 @@ -2,6 +2,7 @@ PORTROACH = ignore +REVISION = 0 COMMENT = library for reading and writing XLSX files DISTNAME = go-xlsx-20151010 CATEGORIES = textproc converters Index: textproc/go-xlsx/pkg/PLIST =================================================================== RCS file: /cvs/ports/textproc/go-xlsx/pkg/PLIST,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 PLIST --- textproc/go-xlsx/pkg/PLIST 19 Jun 2015 08:48:00 -0000 1.1.1.1 +++ textproc/go-xlsx/pkg/PLIST 26 Dec 2015 07:00:42 -0000 @@ -1,4 +1,6 @@ @comment $OpenBSD: PLIST,v 1.1.1.1 2015/06/19 08:48:00 czarkoff Exp $ +go-pkg/ +go-pkg/pkg/ ${MODGO_PACKAGES}/ ${MODGO_PACKAGES}/github.com/ ${MODGO_PACKAGES}/github.com/tealeg/ @@ -21,6 +23,7 @@ ${MODGO_SOURCES}/github.com/tealeg/xlsx/ ${MODGO_SOURCES}/github.com/tealeg/xlsx/doc.go ${MODGO_SOURCES}/github.com/tealeg/xlsx/file.go ${MODGO_SOURCES}/github.com/tealeg/xlsx/file_test.go +${MODGO_SOURCES}/github.com/tealeg/xlsx/fuzzy_test.go ${MODGO_SOURCES}/github.com/tealeg/xlsx/hsl.go ${MODGO_SOURCES}/github.com/tealeg/xlsx/lib.go ${MODGO_SOURCES}/github.com/tealeg/xlsx/lib_test.go @@ -34,11 +37,14 @@ ${MODGO_SOURCES}/github.com/tealeg/xlsx/ ${MODGO_SOURCES}/github.com/tealeg/xlsx/style_test.go ${MODGO_SOURCES}/github.com/tealeg/xlsx/templates.go ${MODGO_SOURCES}/github.com/tealeg/xlsx/testdocs/ +${MODGO_SOURCES}/github.com/tealeg/xlsx/testdocs/badfile_noWorkbookRels.xlsx +${MODGO_SOURCES}/github.com/tealeg/xlsx/testdocs/badfile_noWorksheets.xlsx ${MODGO_SOURCES}/github.com/tealeg/xlsx/testdocs/empty_rows.xlsx ${MODGO_SOURCES}/github.com/tealeg/xlsx/testdocs/googleDocsTest.xlsx ${MODGO_SOURCES}/github.com/tealeg/xlsx/testdocs/macExcelTest.xlsx ${MODGO_SOURCES}/github.com/tealeg/xlsx/testdocs/macNumbersTest.xlsx ${MODGO_SOURCES}/github.com/tealeg/xlsx/testdocs/noStylesAndSharedStringsTest.xlsx +${MODGO_SOURCES}/github.com/tealeg/xlsx/testdocs/original.xlsx ${MODGO_SOURCES}/github.com/tealeg/xlsx/testdocs/testcelltypes.xlsx ${MODGO_SOURCES}/github.com/tealeg/xlsx/testdocs/testchartsheet.xlsx ${MODGO_SOURCES}/github.com/tealeg/xlsx/testdocs/testfile.xlsx