Date: Mon, 8 Mar 2010 19:27:49 -0800 From: Jason <jhelfman@e-e.com> To: CyberLeo Kitsana <cyberleo@cyberleo.net> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: Ports overlay Message-ID: <20100309032749.GB576@Jason-Helfmans-MacBook-Pro.local> In-Reply-To: <4B955792.6090204@cyberleo.net> References: <4B9367B5.4000704@cyberleo.net> <4B937622.2030704@infracaninophile.co.uk> <4B955792.6090204@cyberleo.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 08, 2010 at 02:01:22PM -0600, CyberLeo Kitsana thus spake: >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 It works with "local," but you still need the VALID_CATEGORIES bit. >> >> 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 use local Mk files, you wouldn't have to worry about putting it in every port. > >> <snip> >> 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 ><CyberLeo@CyberLeo.Net> > >Furry Peace! - http://wwww.fur.com/peace/ >_______________________________________________ >freebsd-questions@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-questions >To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > -j
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100309032749.GB576>