Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Nov 2016 11:59:35 -0500
From:      Steve Wills <swills@FreeBSD.org>
To:        Stefan Bethke <stb@lassitu.de>, FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: Porting a Go implementation: dealing with dependencies
Message-ID:  <c762e785-60e6-792d-d5fd-59fcfa3fe944@FreeBSD.org>
In-Reply-To: <18B8321A-1617-4C64-806E-A968333017DB@lassitu.de>
References:  <18B8321A-1617-4C64-806E-A968333017DB@lassitu.de>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--hrXSeN0hdo0enwDSGOi8TN3no2SFqbwDm
Content-Type: multipart/mixed; boundary="bpgwiI9TQiXjRIGxDvRTaMM6P3Dxm52FM";
 protected-headers="v1"
From: Steve Wills <swills@FreeBSD.org>
To: Stefan Bethke <stb@lassitu.de>, FreeBSD Ports <freebsd-ports@freebsd.org>
Message-ID: <c762e785-60e6-792d-d5fd-59fcfa3fe944@FreeBSD.org>
Subject: Re: Porting a Go implementation: dealing with dependencies
References: <18B8321A-1617-4C64-806E-A968333017DB@lassitu.de>
In-Reply-To: <18B8321A-1617-4C64-806E-A968333017DB@lassitu.de>

--bpgwiI9TQiXjRIGxDvRTaMM6P3Dxm52FM
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi,

On 11/18/2016 10:35, Stefan Bethke wrote:
> I=E2=80=99m trying to create a port for Gitea
> (https://github.com/go-gitea/gitea). The basics seem easy enough, but
> I=E2=80=99m not sure how to deal with it=E2=80=99s dependencies.

Use the GH_* macros to fetch them. See:

https://www.freebsd.org/doc/en/books/porters-handbook/makefile-distfiles.=
html#makefile-master_sites-github-description

Or if the upstream vendors their deps like many do these days you can
use the GH_SUBDIR macro to put them in the proper place.

There are examples to look at if that helps, see sysutils/consul as one
that has vendored deps or sysutils/serf for one that doesn't.

>=20
> After downloading tag 0.97, I start building with
>=20
> do-build:
> 	(cd ${GO_WRKSRC} ; ${SETENV} ${GO_ENV} go build)
>=20
> The result is a long list of unfulfilled dependencies:
> $ sudo make
> =3D=3D=3D>  License APACHE20 accepted by the user
> =3D=3D=3D>   gitea-0.9.97 depends on file: /usr/local/sbin/pkg - found
> =3D=3D=3D> Fetching all distfiles required by gitea-0.9.97 for building=

> =3D=3D=3D>  Extracting for gitea-0.9.97
> =3D> SHA256 Checksum OK for go-gitea-gitea-v0.9.97_GH0.tar.gz.
> =3D=3D=3D>  Patching for gitea-0.9.97
> =3D=3D=3D>   gitea-0.9.97 depends on executable: git - found
> =3D=3D=3D>   gitea-0.9.97 depends on file: /usr/local/bin/go - found
> =3D=3D=3D>   gitea-0.9.97 depends on executable: gmake - found
> =3D=3D=3D>  Configuring for gitea-0.9.97
> =3D=3D=3D>  Building for gitea-0.9.97
> (cd /var/ports/work/home/vagrant/gitea/work/src/github.com/go-gitea/git=
ea ; /usr/bin/env GOPATH=3D"/var/ports/work/home/vagrant/gitea/work:/usr/=
local/share/go"  CGO_CFLAGS=3D"-I/usr/local/include"  CGO_LDFLAGS=3D"-L/u=
sr/local/lib"  GOBIN=3D"" go build)
> cmd/dump.go:16:2: cannot find package "github.com/Unknwon/cae/zip" in a=
ny of:
> 	/usr/local/go/src/github.com/Unknwon/cae/zip (from $GOROOT)
> 	/var/ports/work/home/vagrant/gitea/work/src/github.com/Unknwon/cae/zip=
 (from $GOPATH)
> 	/usr/local/share/go/src/github.com/Unknwon/cae/zip
> cmd/serve.go:16:2: cannot find package "github.com/Unknwon/com" in any =
of:
> 	/usr/local/go/src/github.com/Unknwon/com (from $GOROOT)
> 	/var/ports/work/home/vagrant/gitea/work/src/github.com/Unknwon/com (fr=
om $GOPATH)
> 	/usr/local/share/go/src/github.com/Unknwon/com
> =E2=80=A6
>=20
> Very few, if any, are available as ports.  I could use go get to downlo=
ad these, but I think that=E2=80=99s not how it=E2=80=99s supposed to wor=
k with a port.
>=20

Yep, see above. And it's best not to add the deps as separate ports.

Steve


--bpgwiI9TQiXjRIGxDvRTaMM6P3Dxm52FM--

--hrXSeN0hdo0enwDSGOi8TN3no2SFqbwDm
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQGQBAEBCgB6BQJYLzN3XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ5OEZBNDE0QTVDMkEwRUY5Q0ZEMEFEMERG
NUNGNjJCMzIwN0IxQkExExxzd2lsbHNAZnJlZWJzZC5vcmcACgkQ9c9isyB7G6GU
pwf/YnejTg84BfU0SD/qIRpP+uAFugZk1WqX/8Nh0bEYP5zMJHb1XQVt0ZYWKCwj
pgou/mXVlbGKkr6Obv6vUeYkpIvkPMYrDx+AYsaXNzHuLfNlyCPaTPJzwsEu7p5E
5X7nMFbXbBdLGM/jbV3ULsYB+3vskPLu2o/ttFgpr4jgR2bm6ZlYZT52aCA+AsgI
uVENcuon/1mJ+gN4PV42slszINDa6y1c1KSUqkqzET59bPF5UVG2BRyW6wpCy77b
BZiiXB+2RNCLsT64E+wgE73bhoodcMlJt08EB1xy5N+Tp1cc+mW8ZofQ/j8Nhy3C
81N8JgZzHG6fE6m61e/Fij1PWQ==
=MQGg
-----END PGP SIGNATURE-----

--hrXSeN0hdo0enwDSGOi8TN3no2SFqbwDm--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c762e785-60e6-792d-d5fd-59fcfa3fe944>