On Fri, Jan 16, 2009 at 09:48:15AM -0600, Ryan Schmidt said: > On Jan 16, 2009, at 06:13, Orville Bennett wrote: > >> A while ago ryan asked if i could make a cmake portgroup and i accepted >> the job, with some trepidation. I have some free time now and would like >> to begin working on that. I'd like some information on how to go about >> doing this portgroup. >> >> disclaimer: it would be totally based on the needs of the kde portfiles >> i'm maintaining, which by the way, are finally ready to be widely used >> now :-) >> If there is anything outside of kde and its dependencies using cmake i >> don't about it. >> Also I'm not mr. über coder guy so wordy documentation on this is a >> plus. I've seen http://trac.macports.org/browser/trunk/dports/ >> _resources/port1.0/group/haskell-1.0.tcl?rev=45388 and i'm still >> confused. :-) >> >> P.S. if you've told me any of this information before i've forgotten. >> This thread is an attempt at preventing that from happening once again. >> @ ryan: sorry for taking so long, i hadn't forgotten, was just quite >> busy. > > I don't know what documentation we have, but basically you take any > statements that you find yourself repeating over and over again in > portfiles and move them into a portgroup file. Look at the existing > portgroup files for more information.
Looking at the existing should be a good start, but start with the python ones first, they're the simplest. perl and haskell are slightly more code but should still be pretty obvious. It's when you get to ruby and xcode that you see quite a bit of code. But basically, like Ryan says, the simplest (like the python ones) just set stuff you normally see in a Portfile, since PortGroup is basically like an #include in C/C++ (or require, import, etc, depending on what languages you may know). At least perl and haskell have a .setup proc that you call from the Portfile with a few arguments and that allows them to create varying fields for the port (like name, version, distname). But the python bits just setup how to basically build a python module, leaving all the rest to the Portfile. Bryan _______________________________________________ macports-dev mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
