From owner-freebsd-ports@freebsd.org Sun Sep 24 16:04:39 2017 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 C509BE2AB20 for ; Sun, 24 Sep 2017 16:04:39 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id AEDBD7DBB4 for ; Sun, 24 Sep 2017 16:04:39 +0000 (UTC) (envelope-from julian@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id AAC5EE2AB1F; Sun, 24 Sep 2017 16:04:39 +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 AA2C0E2AB1E for ; Sun, 24 Sep 2017 16:04:39 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 872017DBB3 for ; Sun, 24 Sep 2017 16:04:39 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (106-68-219-68.dyn.iinet.net.au [106.68.219.68]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v8OG4Mnd089684 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 24 Sep 2017 09:04:25 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: EXTRA_PATCHES considered harmful? To: Adam Weinberger Cc: "ports@FreeBSD.org" References: From: Julian Elischer Message-ID: Date: Mon, 25 Sep 2017 00:04:16 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US 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: Sun, 24 Sep 2017 16:04:39 -0000 On 24/9/17 6:37 am, Adam Weinberger wrote: >> On 23 Sep, 2017, at 15:39, Julian Elischer wrote: >> >> currently if you set EXTRA_PATCHES and the port you are making decides to build a second port as a dependency, EXTRA_PATCHES is passed to the second port which them obiously fails to patch it. >> >> e.g. cd /usr/ports/emulators/open-vm-tools-nox11; Make EXTRA_PATCHES=/foo/bar/patch1 >> >> will fail when it tries to apply the patch files to each dependency. >> >> AM I doing something wrong here? > Hi Julian, > > I think EXTRA_PATCH_TREE is a better option for what you're looking for. You put patches in there in a tree that gets essentially overlaid on the ports tree. > > EXTRA_PATCH_TREE=/usr/patches > Then put your patch1 in /usr/patches/emulators/open-vm-tools-nox11 > > # Adam > > You are correct and I am moving to that.. In fact I submitted the idea of EXTRA_PATCH_TREE, though it was reimplemented during a rewrite. (but the comments saying what it is are still mine).