Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Mar 2010 14:01:22 -0600
From:      CyberLeo Kitsana <cyberleo@cyberleo.net>
To:        Matthew Seaman <m.seaman@infracaninophile.co.uk>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Ports overlay
Message-ID:  <4B955792.6090204@cyberleo.net>
In-Reply-To: <4B937622.2030704@infracaninophile.co.uk>
References:  <4B9367B5.4000704@cyberleo.net> <4B937622.2030704@infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

> <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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B955792.6090204>