On Wed, Apr 25, 2018 at 06:45:57AM -0400, Daniel Jakots wrote:
> On Tue, 24 Apr 2018 17:49:12 +0200, Landry Breuil <[email protected]>
> wrote:
>
> > Hi,
> >
> > seems to just work, but lightly tested. Will probably commit it in
> > some days unless i hear screams of horror.
>
> It doesn't build here:
> ===> Building for influxdb-1.5.2
> cd /usr/ports/pobj/influxdb-1.5.2/go/src/github.com/influxdata/influxdb &&
> /usr/bin/env -i GOCACHE=off
> GOPATH="/usr/ports/pobj/influxdb-1.5.2/go:/usr/local/go-pkg"
> PATH="/usr/ports/pobj/influxdb-1.5.2/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11R6/bin"
> go install -x ./...
> ../../../golang.org/x/sync/errgroup/errgroup.go:12:2: cannot find package
> "golang.org/x/net/context" in any of:
> /usr/local/go/src/golang.org/x/net/context (from $GOROOT)
> /usr/ports/pobj/influxdb-1.5.2/go/src/golang.org/x/net/context (from
> $GOPATH)
> /usr/local/go-pkg/src/golang.org/x/net/context
> *** Error 1 in . (Makefile:40 'do-build')
> *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2736
> '/usr/ports/pobj/influxdb-1.5.2/build-amd64/.build_done')
> *** Error 1 in /usr/ports/databases/influxdb
> (/usr/ports/infrastructure/mk/bsd.port.mk:2417 'fake')
>
> After pkg_add'ing go-net, it builds, can you add a BDEP accordingly?
>
> I think it also needs a WANTLIB:
> influxdb-1.5.2(databases/influxdb):
> Missing: c.92 (/usr/local/bin/test_client) (system lib)
> Missing: pthread.25 (/usr/local/bin/test_client) (system lib)
> WANTLIB += c pthread
good catches, new diff taking this into account, and also removing the
now useless pre-patch target, seems influxdb builds fine like this and
finds the right files for the packaged go src/libs.
Landry
Index: Makefile
===================================================================
RCS file: /cvs/ports/databases/influxdb/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile 14 Apr 2018 22:53:54 -0000 1.4
+++ Makefile 25 Apr 2018 11:04:29 -0000
@@ -2,9 +2,8 @@
COMMENT = time-series datastore for metrics, events, and analytics
-V = 1.4.2
+V = 1.5.2
DISTNAME = influxdb-${V}
-REVISION = 1
HOMEPAGE = https://influxdata.com
# selfhosted because we bundle go deps
@@ -20,9 +19,12 @@
BUILD_DEPENDS = security/go-crypto \
textproc/go-text \
devel/go-sys \
+ net/go-net \
textproc/xmlto \
textproc/asciidoc
+WANTLIB += c pthread
+
# our handrolled distfile has the "right" layout already
# disables MODGO_SETUP_WORKSPACE
CONFIGURE_STYLE = No
@@ -32,10 +34,6 @@
# for man/Makefile
USE_GMAKE = Yes
SUBST_VARS = VARBASE
-
-pre-patch:
- cp -r ${LOCALBASE}/${MODGO_SOURCES}/golang.org/x/{crypto,text,sys} \
- ${MODGO_WORKSPACE}/src/golang.org/x/
do-build:
cd ${WRKSRC} && ${MODGO_BUILD_CMD} ./...
Index: distinfo
===================================================================
RCS file: /cvs/ports/databases/influxdb/distinfo,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 distinfo
--- distinfo 3 Jan 2018 17:43:24 -0000 1.1.1.1
+++ distinfo 25 Apr 2018 11:04:29 -0000
@@ -1,2 +1,2 @@
-SHA256 (influxdb-1.4.2.tar.gz) = +nG0x9sV1ujMAN010abqGVPpVEQhx41jRurQLXCht+g=
-SIZE (influxdb-1.4.2.tar.gz) = 6758600
+SHA256 (influxdb-1.5.2.tar.gz) = qaDlenMvjJeJuYw9/fXm5mLF0pRlykIbW+eQzXs2rV0=
+SIZE (influxdb-1.5.2.tar.gz) = 7711974