Open realnedsanders opened 2 years ago
I have the relevant changes included in #113.
I have more to do to not break the existing supported platforms, but that's effectively the meat of what needs to be changed.
@mschenk42 can you provide a high level overview of how the vendor
directory is generated?
I notice you aren't using modules. I use them fairly religiously, so I have no clue how this is supposed to work.
working on FreeBSD compatibility.
Currently testing using 13.0-RELEASE-p6.
First issue was git2go.
13.0-RELEASE-p6 uses libgit2 version 1.3.0.
This corresponds to git2go V33 per the documentation.
I updated the imports to
"github.com/libgit2/git2go/v33"
, updated the Makefile to useGIT2GO_VERSION = v33.0.7
, and addedSHELL = /usr/local/bin/bash
to the top of theMakefile
.Then, I encountered an issue with
scm/git.go
on line 301. git2go v27 -> v33 changedtype TreeWalkCallback
:func(string, *TreeEntry) int
->func(string, *TreeEntry) error
Since the anonymous func just returns 0 anyways, I just changed the return type to
error
and the return tonil
and called it a day.go vet
ran successfully :+1:Now it builds, but not with
--tags 'static'
.Looks like an issue with some libgit2 stuff so I checked out the git2go readme and it has info on static builds. I changed the Makefile, which now only needs to use
gmake install-static
aftercd
ing in thegit2go
target. It also wasn't pointing to the right directories, so I changedGIT2GO_PATH
tovendor/github.com/libgit2/git2go
.With a few more edits to the
Makefile
paths and the git commands, I was able to get it to compile statically linked.I'll have a PR submitted, probably tomorrow as it is already late for me.