From owner-freebsd-ports@freebsd.org Fri Nov 18 16:59:47 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62DC4C4854E for ; Fri, 18 Nov 2016 16:59:47 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mouf.net (mouf.net [IPv6:2607:fc50:0:4400:216:3eff:fe69:33b3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mouf.net", Issuer "mouf.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 233F9DB8 for ; Fri, 18 Nov 2016 16:59:47 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from [10.0.1.70] (cpe-071-065-239-148.nc.res.rr.com [71.65.239.148] (may be forged)) (authenticated bits=0) by mouf.net (8.14.9/8.14.9) with ESMTP id uAIGxbne009766 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 18 Nov 2016 16:59:43 GMT (envelope-from swills@FreeBSD.org) Subject: Re: Porting a Go implementation: dealing with dependencies To: Stefan Bethke , FreeBSD Ports References: <18B8321A-1617-4C64-806E-A968333017DB@lassitu.de> From: Steve Wills Message-ID: Date: Fri, 18 Nov 2016 11:59:35 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <18B8321A-1617-4C64-806E-A968333017DB@lassitu.de> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hrXSeN0hdo0enwDSGOi8TN3no2SFqbwDm" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mouf.net [199.48.129.64]); Fri, 18 Nov 2016 16:59:44 +0000 (UTC) X-Spam-Status: No, score=-1.0 required=4.5 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mouf.net X-Virus-Scanned: clamav-milter 0.99.2 at mouf.net X-Virus-Status: Clean X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Nov 2016 16:59:47 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hrXSeN0hdo0enwDSGOi8TN3no2SFqbwDm Content-Type: multipart/mixed; boundary="bpgwiI9TQiXjRIGxDvRTaMM6P3Dxm52FM"; protected-headers="v1" From: Steve Wills To: Stefan Bethke , FreeBSD Ports Message-ID: 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--