From owner-freebsd-ports@freebsd.org Fri Apr 22 07:20:32 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 C4979B184D6 for ; Fri, 22 Apr 2016 07:20:32 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id AF9FA14AE for ; Fri, 22 Apr 2016 07:20:32 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id AB3F2B184D5; Fri, 22 Apr 2016 07:20:32 +0000 (UTC) Delivered-To: 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 AADFFB184D4 for ; Fri, 22 Apr 2016 07:20:32 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from prod2.absolight.net (mx3.absolight.net [IPv6:2a01:678:2:100::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "plouf.absolight.net", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4897914AD; Fri, 22 Apr 2016 07:20:32 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from prod2.absolight.net (localhost [127.0.0.1]) by prod2.absolight.net (Postfix) with ESMTP id F31A7BDC68; Fri, 22 Apr 2016 09:20:29 +0200 (CEST) Received: from atuin.in.mat.cc (atuin.in.mat.cc [79.143.241.205]) by prod2.absolight.net (Postfix) with ESMTPA id BB76ABDC3E; Fri, 22 Apr 2016 09:20:29 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by atuin.in.mat.cc (Postfix) with ESMTP id 709585A0B43B; Fri, 22 Apr 2016 09:20:29 +0200 (CEST) Date: Fri, 22 Apr 2016 09:20:29 +0200 From: Mathieu Arnold To: Julian Elischer , olli hauer , ports@freebsd.org Subject: Re: compiling ports with --sysroot= and -isystem Message-ID: <74A87D9160FCA7315CE3B2A8@atuin.in.mat.cc> In-Reply-To: <5719A06D.4050805@freebsd.org> References: <571986C4.5050303@freebsd.org> <571997EB.9090901@gmx.de> <5719A06D.4050805@freebsd.org> X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="==========098D95753172A7FE2CD1==========" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2016 07:20:32 -0000 --==========098D95753172A7FE2CD1========== Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline +--On 22 avril 2016 11:54:21 +0800 Julian Elischer wrote: | On 22/04/2016 11:18 AM, olli hauer wrote: |> On 2016-04-22 04:04, Julian Elischer wrote: |>> How can I add entries (like the above) to a port compile? |>> I want to ADD things to CFLAGS. |>> If I add 'CFLAGS=...' to the build (for example, of lsof) it actually |>> replaces all the CFLAGS already there. lsof (as the example) uses |>> configure, so I would need to feed the added stuff into configure. Is |>> there a standard way to do this? In the environment I'm using, I'm |>> building for a machine that is not the build machine, but an appliance. |>> It has a small number of differences in the include file contents, so I |>> want it to compile using a different set of includes than those in |>> /usr/include. |>> |>> On the other hand I'm building a bunch of tools that do have t orun on |>> the build machine and they need to use the regular /usr/include so I |>> don't really want to replace them.. |>> |>> |>> Julian |>> |>> p.s. usual "please reply directly" comment applies.. I'm on this list |>> but get it in digest form.. |>> |> Use the '+=' notation, e.g. |> |> # Makefile |> ... |> CFLAGS+= "--sysroot=...." |> ... | | sorry I wasn't clear.. | | I want to add something to the make command, not edit Makefiles. | | I could add something to bsd.autotools.mk or some similar Makefile | include. but really I want to do it on a case by case basis. | there is an averall Makefile (using gmake) that effectively does: | cd /usr/ports/$(PORT_DIR); $(BMAKE) $(ARGS) install clean | | (except it does a lot of them) | | I want to know what to add to $(ARGS) to make it use the correct include | files. my current "work-around" is to do: | | mv /usr/include /usr/include.hold; ln -s $(STAGING_DIR)/usr/include | /usr/include | cd /usr/ports/$(PORT_DIR); $(BMAKE) $(ARGS) install clean | rm /usr/include; mv /usr/include.hold /usr/include | | this is *NOT* a clean solution :-) If you want to change things on a port by port basis, you can: 1) use poudriere to build you a jail with a patch you provide, and build ports with poudriere testport or poudriere bulk. 2) on each port's directory, you create a Makefile.local and put your things in it. 3) in /etc/make.conf you use some kind of construct like: .if ${.CURDIR:M*editors/vim} FOO=bar .endif -- Mathieu Arnold --==========098D95753172A7FE2CD1========== Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQJ8BAEBCgBmBQJXGdC9XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzQUI2OTc4OUQyRUQxMjEwNjQ0MEJBNUIz QTQ1MTZGMzUxODNDRTQ4AAoJEDpFFvNRg85IEY4P/2lUUxdKnUybA6ipRndDsC/E d5YsulCExHPkAJuMSEk4NbdCUyVlNZI5zjFPIgn9nqKYPFzbMBEhFa8M+bkcl/Ax QuySi5k971MdLYeV7VCBDrrCAzvxkHKP+CpL6fa2OHeBSXkmB3NORdGHVFLoyGv8 E0bUBa9nzrGzfimORXSmieBUEPbrEU8nLOsKi4i8Nj2Ox36kwFaumIZQQQxcmRw1 mArvpliEY7Tb09lApBDdCvmA9BSrK5Qv0cVmHsIzePhhlIwZMRmvWOkaVqoHupbz wsj5fWwjBSRwmCiKAKlK+6r6kCuaiEj/0GASOg7pk7qhObleI5NeKdQ0uPyiIsmE WckE1fPiPW4F6dijPi+3kn2lZio0jPTf0WdsRksxUBrDgzS5k3U64zWoJFAQc7du QV2uS4vAUlXFhkO3uyE/0T+f2qoBJqySxrcD5CdShmwkbxwadHRf5GMfN7DpEUk1 TDGJu2m2tsEP27qMLiYteGqwfzu1G07nEE6WpiJ4ogrilr4gzFgz6joWlKoDpgV/ wII1lyAqWiQcoX8s15utWRHpxB4wNP37ca88adauwEmjrzEBgwGG/+MZBzKqcq0I AfvQljEIZ4Jq8SACBPd80P3R+yODloCDalnIDZJEx05QvRsJE6Moa3+3WOBKeohE CAOZ3diIkoD0wv4GsXuH =vDXW -----END PGP SIGNATURE----- --==========098D95753172A7FE2CD1==========--