From 22431f146c06a64e18b40e38ec341a8d406fbdff Mon Sep 17 00:00:00 2001 From: John Ellson Date: Thu, 21 Nov 2013 13:01:42 -0500 Subject: [PATCH] more go bits --- graphviz.spec.in | 2 +- tclpkg/gv/go/README | 9 +++++---- tclpkg/gv/go/setup_ellson | 2 ++ tclpkg/gv/go/setup_usr | 2 ++ tclpkg/gv/go/{setup => setup_usr_local_go} | 0 tclpkg/gv/go/src/makefile | 2 +- tclpkg/gv/go/src/test.go | 9 +-------- 7 files changed, 12 insertions(+), 14 deletions(-) create mode 100755 tclpkg/gv/go/setup_ellson create mode 100755 tclpkg/gv/go/setup_usr rename tclpkg/gv/go/{setup => setup_usr_local_go} (100%) diff --git a/graphviz.spec.in b/graphviz.spec.in index 1d749adf6..b1e8582f2 100644 --- a/graphviz.spec.in +++ b/graphviz.spec.in @@ -163,7 +163,7 @@ BuildRequires: libwebp-devel %endif %if %fedora >= 19 %define _GO 0 -BuildRequires: golang +BuildRequires: golang >= 1.2 gcc-go %endif %endif diff --git a/tclpkg/gv/go/README b/tclpkg/gv/go/README index 6a0a62058..4c563fbb9 100644 --- a/tclpkg/gv/go/README +++ b/tclpkg/gv/go/README @@ -1,5 +1,6 @@ -This directory is hopefully temporary, containing various experimantal code towards a GO language extension. +This directory is hopefully temporary, containing various experimental +code towards a GO language extension. -Currently requires a very recent GO installed in /usr/local/go - -(Later than the 1.1.2 available in fc20 or rawhide at this time.) +Currently requires a very recent GO. i.e. Later than the 1.1.2 +available in fc20 or rawhide at this time. Use appropriate setup_xxx, e.g. + . ./setup_usr_local diff --git a/tclpkg/gv/go/setup_ellson b/tclpkg/gv/go/setup_ellson new file mode 100755 index 000000000..ab63006af --- /dev/null +++ b/tclpkg/gv/go/setup_ellson @@ -0,0 +1,2 @@ +export GOROOT=/home/ellson/FIX/Linux.x86_64/build/go +export GOPATH=`pwd` diff --git a/tclpkg/gv/go/setup_usr b/tclpkg/gv/go/setup_usr new file mode 100755 index 000000000..48bc48159 --- /dev/null +++ b/tclpkg/gv/go/setup_usr @@ -0,0 +1,2 @@ +export GOROOT=/usr/lib64/golang/ +export GOPATH=`pwd` diff --git a/tclpkg/gv/go/setup b/tclpkg/gv/go/setup_usr_local_go similarity index 100% rename from tclpkg/gv/go/setup rename to tclpkg/gv/go/setup_usr_local_go diff --git a/tclpkg/gv/go/src/makefile b/tclpkg/gv/go/src/makefile index 444d5745c..483dd67db 100644 --- a/tclpkg/gv/go/src/makefile +++ b/tclpkg/gv/go/src/makefile @@ -1,7 +1,7 @@ GO=$(GOROOT)/bin/go test: test.go prep - $(GO) build -work -gccgoflags '-lgvc' -compiler gccgo test.go + $(GO) build -x -work -gccgoflags '-lgvc' -compiler gccgo test.go .PHONY: prep prep: diff --git a/tclpkg/gv/go/src/test.go b/tclpkg/gv/go/src/test.go index d162d3788..26859031e 100644 --- a/tclpkg/gv/go/src/test.go +++ b/tclpkg/gv/go/src/test.go @@ -1,12 +1,5 @@ package main import ( "gv" ) func main() { - var g gv.Agraph_t - var n, m gv.Agnode_t -// var e gv.Agedge_t - g = gv.Digraph("G") - n = gv.Node(g, "hello") - m = gv.Node(g, "world") - gv.Edge(n, m) - gv.Write(g, "hello.out") + gv.Digraph("G") } -- 2.40.0