From owner-freebsd-ports@FreeBSD.ORG Fri Jul 11 08:58:29 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from straylight.ringlet.net (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with SMTP id C4805106566C for ; Fri, 11 Jul 2008 08:58:28 +0000 (UTC) (envelope-from roam@ringlet.net) Received: (qmail 2708 invoked by uid 1000); 11 Jul 2008 08:58:26 -0000 Date: Fri, 11 Jul 2008 11:58:26 +0300 From: Peter Pentchev To: Anders Trob??ck Message-ID: <20080711085826.GA1093@straylight.m.ringlet.net> References: <20080710110457.4b160eb1@itpc02.gelita.swe> <200807100154.17094.beech@freebsd.org> <20080710145415.59244492@itpc02.gelita.swe> <20080710193955.1acc2184@baal.troback.com> <7d6fde3d0807101334v1362886di7fe1057093ca29bf@mail.gmail.com> <20080710225313.48fe6423@baal.troback.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qDbXVdCdHGoSgWSk" Content-Disposition: inline In-Reply-To: <20080710225313.48fe6423@baal.troback.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Garrett Cooper , freebsd-ports@freebsd.org Subject: Re: Tgz in tgz...! X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jul 2008 08:58:29 -0000 --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 10, 2008 at 10:53:13PM +0200, Anders Trob??ck wrote: > On Thu, 10 Jul 2008 13:34:39 -0700 > "Garrett Cooper" wrote: >=20 > > On Thu, Jul 10, 2008 at 10:39 AM, Anders Trob??ck > > wrote: > > > On Thu, 10 Jul 2008 14:54:15 +0200 > > > Anders Troback wrote: > > > > > >> On Thu, 10 Jul 2008 01:54:10 -0800 > > >> Beech Rintoul wrote: > > >> > > >> > On Thursday 10 July 2008, Anders Troback said: > > >> > > Hi, > > >> > > > > >> > > I need some tips about a port that I'm working on! > > >> > > > > >> > > The problem that I have are that the source of the code are in > > >> > > a tgz that are in a sub folder in an other tgz! So first I > > >> > > need the port to download and extract the first tgz and then > > >> > > extract, configure and make the second tgz! > > >> > > > > >> > > How do I cope with that? > > >> > > > > >> > > Thanks! > > >> > > > >> > You can probably extract the second time in post-extract, but > > >> > you're going to have to get creative defining the right > > >> > ${WRKSRC}. After that it should patch and build normally. > > >> > > > >> > Beech > > >> > > > >> > > >> OK! Next problem:-] > > >> > > >> The program that I want to build are under a sub folder of > > >> ${WRKSRC}/src so first I need to make the "main" program and then I > > >> have to run make in that sub folder! Are there any macros that do > > >> things like this or is there some other way? > > >> > > >> Thanks again! > > >> > > > > > > Is this a "legal" way of solving this issue? > > > > > > post-build: > > > cd ${WRKSRC}/src/extras && make > >=20 > > Wouldn't `gmake -C ${WRKSRC}/src/extras' be better? > > -Garrett >=20 > Yes, much nice and cleaner! I don't need gmake but make was the same! Actually, this might miss a lot of settings in the environment and stuff. It would be much better to do it the way bsd.port.mk does it: ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${A= LL_TARGET} Yes, this is a command line consisting entirely of variables :) Well, okay, to do it in a different directory you would need to use: ${SETENV} ${MAKE_ENV} ${GMAKE} -C ${WRKSRC}/src/extras ${MAKE_FLAGS} ${MA= KEFILE} ${MAKE_ARGS} ${ALL_TARGET} The ${SETENV} ${MAKE_ENV} part is really important. The rest - well, ${MAKE_FLAGS} and ${MAKE_ARGS} are most probably not needed in this particular case, but they still are a good idea in the general case - although in very few cases, on very weird "make" invocations, there might be problems because of flag differences between BSD make and GNU make. The ${MAKEFILE} is very, very rarely *not* "Makefile" - and if you decide to remove ${MAKE_FLAGS}, be sure to check if you still want to pass ${MAKEFILE}, too :) Well, okay, so basically, this could *most probably* be shortened to: ${SETENV} ${MAKE_ENV} ${GMAKE} -C ${WRKSRC}/src/extras =2E..maybe :) G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@cnsys.bg roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 What would this sentence be like if pi were 3? --qDbXVdCdHGoSgWSk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkh3ILEACgkQ7Ri2jRYZRVMm3gCeMDvxPK3KtRDhsYhdvIVQAa4G 8m0An0M2XhvXGKZSwe2DXnFOC3PCBgHa =s/Ug -----END PGP SIGNATURE----- --qDbXVdCdHGoSgWSk--