Hi, I just came into the world of MacPorts. I actualy come from Gentoo Linux so for the most part the whole MacPorts process seemed wonderfully familiar to me. I stumbled upon some annoyances though, and I could not find any answers so I am hereby asking the following: o Are there references and guidelines for constructing new ports? I have gotten most of the things by looking at existing ports, but it would be nice to have some reference manual to get back to now and then. There are still things I don't know and the trial and error process I am currently using sucks. o Does MacPorts logs anything? If so, where? I miss genlop (the Gentoo log parser) and I am wondering if there is any support for an equivalent tool. o Is there any reason not to build readline-enabled applications (short of hacking ports by hand)? It is rather painful to work for instance with a readline-less Python. Wouldn't a suitable variant be appropriate? o As a relatively minor question (which I guess shows my Gentoo/ricer background), is there any way of defining defaults for C[XX]FLAGS or make options (such as -j, I have a powerful machine that could use a high -j)? If my questions already have answers somewhere, I apologize and I ask that you please direct me to the right place. I am running what believe to be the latest stable version (DarwinPorts 1.32), would any of the answers change if I move to a 1.4 version (and if so how do I build it, will just a ./configure && make && make install replace the old version correctly?). Thanks in advance, Stefan -- If it was so, it might be; and if it were so, it would be; but as it isn't, it ain't. That's logic. --Lewis Carroll, Through the Looking-Glass
On Mar 17, 2007, at 5:20 PM, Stefan Bruda wrote:
o Are there references and guidelines for constructing new ports?
I think the most complete documentation right now is the man page (man portfile). There was some other documentation in the past, but I don't think it exists anymore (and it wasn't very complete, butI could be wrong).
o Does MacPorts logs anything?
nope (at least not currently).
o Is there any reason not to build readline-enabled applications (short of hacking ports by hand)? It is rather painful to work for instance with a readline-less Python. Wouldn't a suitable variant be appropriate?
I think this is on the FAQ, but you'll want to install the py- readline port and then you'll have readline support for macports' python. As for other ports, it's really up to the maintainer which options are available by default and/or which are available as variants.
o As a relatively minor question (which I guess shows my Gentoo/ricer background), is there any way of defining defaults for C[XX]FLAGS or make options (such as -j, I have a powerful machine that could use a high -j)?
Nope (although you could probably hack it in if you wanted). The problem being that some ports won't compile correctly with certain -j or CFLAG options.
I am running what believe to be the latest stable version (DarwinPorts 1.32), would any of the answers change if I move to a 1.4 version
nope.
(and if so how do I build it, will just a ./configure && make && make install replace the old version correctly?).
That would be how to do it. Of course, once we release 1.4 (really soon now), you can just do 'port selfupdate' to get it to install. -- Daniel J. Luke +========================================================+ | *---------------- dluke@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+
Hi, At 18:39 -0400 on 2007-3-17 Daniel J. Luke wrote:
On Mar 17, 2007, at 5:20 PM, Stefan Bruda wrote:
o Are there references and guidelines for constructing new ports?
I think the most complete documentation right now is the man page (man portfile). There was some other documentation in the past, but I don't think it exists anymore (and it wasn't very complete, but I could be wrong).
Of course, who would have thought, a manual page...
o Does MacPorts logs anything?
nope (at least not currently).
It is a pitty in my opinion, as is also the lack of a "pretend" flag (always nice for me to know in advance what is gonna happen). These two are the main features I would personally like to have in the system. Anyway, maybe I will become familiar enough with MacPorts to be able to contribute to the code, till then I will keep my mouth shut.
As for other ports, it's really up to the maintainer which options are available by default and/or which are available as variants.
Fair enough.
o As a relatively minor question (which I guess shows my Gentoo/ricer background), is there any way of defining defaults for C[XX]FLAGS or make options (such as -j, I have a powerful machine that could use a high -j)?
Nope (although you could probably hack it in if you wanted). The problem being that some ports won't compile correctly with certain -j or CFLAG options.
I am not that keen on it, though a logical solution would be to provide for a global value of these flags and then a way to override the values on a per-port basis.
I am running what believe to be the latest stable version (DarwinPorts 1.32), would any of the answers change if I move to a 1.4 version
nope.
I will then wait for the official 1.4. Thank you very much for all the answers. Cheers, Stefan -- If it was so, it might be; and if it were so, it would be; but as it isn't, it ain't. That's logic. --Lewis Carroll, Through the Looking-Glass
On Mar 17, 2007, at 7:59 PM, Stefan Bruda wrote:
It is a pitty in my opinion, as is also the lack of a "pretend" flag (always nice for me to know in advance what is gonna happen). These two are the main features I would personally like to have in the system. Anyway, maybe I will become familiar enough with MacPorts to be able to contribute to the code, till then I will keep my mouth shut.
I'm sure many other people would be happy to have those contributions in MacPorts too!
Nope (although you could probably hack it in if you wanted). The problem being that some ports won't compile correctly with certain -j or CFLAG options.
I am not that keen on it, though a logical solution would be to provide for a global value of these flags and then a way to override the values on a per-port basis.
True, but we tend to take a more conservative approach to limit potential support requests. The way things are now, the end user can't buy mistake set bogus values here and mess things up in a way that the portfile author wouldn't expect. As much as possible, the goal is to make things 'just work' for the end user. -- Daniel J. Luke +========================================================+ | *---------------- dluke@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+
On Mar 17, 2007, at 7:59 PM, Stefan Bruda wrote:
o Does MacPorts logs anything?
nope (at least not currently).
It is a pitty in my opinion,
This feature is planned for a future release, its design still a bit up in the air and in the heads of some of us as still-in-need-of-implementation ideas.
as is also the lack of a "pretend" flag (always nice for me to know in advance what is gonna happen). These two are the main features I would personally like to have in the system. Anyway, maybe I will become familiar enough with MacPorts to be able to contribute to the code, till then I will keep my mouth shut.
I remember this being brought up at one time or another, but it's certainly a much more complicated feature and not many have put any implementation ideas forth. If you ever become interested enough in the project to get your hands dirty with our infrastructure, please do feel free to take a stab at it!
Nope (although you could probably hack it in if you wanted). The problem being that some ports won't compile correctly with certain -j or CFLAG options.
I am not that keen on it, though a logical solution would be to provide for a global value of these flags and then a way to override the values on a per-port basis.
The ports.conf configuration file has a knob for environment variables you may want to keep during the build process: # Extra environment variables to keep. Any variables listed here are added # to the list of variables that are not removed from the environment used # while processing ports # extra_env KEEP_THIS THIS_TOO So maybe you can use some "magic" to stick what you want the build process to pick up in there (and I say "magic" 'cause MacPorts tries to sanitize the runtime environment by removing some potentially harmful variables, including CFLAGS, CPPFLAGS & LDFLAGS --thus letting the Portfile declare what it needs and not having anything interfere with it--, iirc, so I can't say offhand what the effect of including them there might be... I guess you're going to have to do some testing ;-) That being said, you can always override parts of the Portfile when calling port(1) on the command line, like: port install <port> build.env="foo bar" If the Portfile for <port> includes its own values for the "build.env" key, what you supply on the command line will override it; therefore you should use that facility with some care, as it may break the build in unforeseen ways. But then again, if you come from Gentoo I'm sure the process of building software is nothing new to you, so I'm sure you'll easily figure your way around ;-) Hope that helps! Regards,... -jmpp
participants (3)
-
Daniel J. Luke
-
Juan Manuel Palacios
-
Stefan Bruda