From owner-freebsd-questions@FreeBSD.ORG Mon Mar 8 20:01:25 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43DD1106564A for ; Mon, 8 Mar 2010 20:01:25 +0000 (UTC) (envelope-from cyberleo@cyberleo.net) Received: from paka.cyberleo.net (paka.cyberleo.net [66.219.31.21]) by mx1.freebsd.org (Postfix) with ESMTP id 1F6048FC18 for ; Mon, 8 Mar 2010 20:01:24 +0000 (UTC) Received: from [172.16.44.14] (h-74-2-96-2.chcgilgm.static.covad.net [74.2.96.2]) by paka.cyberleo.net (Postfix) with ESMTPSA id 1E03028418; Mon, 8 Mar 2010 15:01:24 -0500 (EST) Message-ID: <4B955792.6090204@cyberleo.net> Date: Mon, 08 Mar 2010 14:01:22 -0600 From: CyberLeo Kitsana User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100307 Thunderbird/3.0.3 MIME-Version: 1.0 To: Matthew Seaman References: <4B9367B5.4000704@cyberleo.net> <4B937622.2030704@infracaninophile.co.uk> In-Reply-To: <4B937622.2030704@infracaninophile.co.uk> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions Subject: Re: Ports overlay X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 20:01:25 -0000 On 03/07/2010 03:47 AM, Matthew Seaman wrote: > On 07/03/2010 08:45:41, CyberLeo Kitsana wrote: > >> By necessity and convenience, I have developed a series of additions and >> changes to the ports tree. These changes are probably not worthy of >> inclusion into the official tree, so I'm looking to maintain an overlay, >> of sorts, in the spirit of Gentoo's overlay capability. > >> Is there an official method of hooking changes into a ports tree, while >> maintaining the ability to csup or portsnap the unmodified version? How >> do others tackle this particular problem? > > Yes, you can add your own local ports or even whole categories of local > ports without too much difficulty. You can even add some tweaks to an > existing port -- you don't have complete freedom to do anything there, > but you can do quite a lot. > > If you create a Makefile.local at any level in the ports tree it will be > included alongside the usual Makefile. This means you can override a > lot of the available settings at will. > > So, if you create /usr/ports/Makefile.local > > with the contents: > > SUBDIR+=myports > > then you can create a directory /usr/ports/myports and put your own > ports inside it -- you'll need a /usr/ports/myports/Makefile just like > the other category directories. This is an excellent idea, and one I ultimately ended up using. However, I've found that the ports infrastructure really doesn't tolerate creating arbitrary categories, so I had to put a VALID_CATEGORIES+= bit at the top of each of my ports' makefiles to get it to work without patching any tracked files. > > If you want to modify an existing port, probably the best approach is to > create your own slave port -- see the docco on MASTERDIR in the Porter's > Handbook and look at eg. games/freeciv-nox11 for about the simplest > possible example. It's not fool proof -- some modifications will always > need support in the master port's Makefile, but there's a lot you can do > without that. Another good suggestion. I find annoyance in that devel/glib20 (among others) requires all of Perl and Python at runtime just to service two script files that appear to be used only for certain compilation options. It tends to bloat the embedded images that I build. -- Fuzzy love, -CyberLeo Technical Administrator CyberLeo.Net Webhosting http://www.CyberLeo.Net Furry Peace! - http://wwww.fur.com/peace/