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
<cyber...@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-unsubscr...@freebsd.org"


-j
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to