Maintaining source code for selected ports.

Ryan Schmidt ryandesign at macports.org
Wed Feb 2 14:20:42 PST 2011


Ben, let's keep the discussion on the mailing list; use Reply All when you reply.

On Feb 2, 2011, at 15:30, Ben Tompkins wrote:

> On Feb 2, 2011, at 12:07 PM, Ryan Schmidt wrote:
> 
>> If you want to keep the work directory (containing the source and build products, and the destroot) only for particular port runs, supply the -k ("keep") flag, as in:
>> 
>> sudo port -k install portname
>> 
>> See "man port" for more options that you might like to use in other circumstances.
>> 
>> Since MacPorts keeps the distfiles elsewhere, you can extract the source code from them yourself, to any location you like, if you just want to take a look at the original source. The distfiles are in /opt/local/var/macports/distfiles/portname.
> 
> Thanks Ryan! That helped a lot. I had no idea that the sources were still on my system. I assume that as long as I don't compile as root, my working installation is safe. Of course, I will need to divert the output of the build to a user-level directory. Is this always going to be as simple as changing the prefix in a 'configure' script? Also, how hard would it be to create a self-contained build
> that compiles the transitive closure of all dependencies from source, and how much harder would it be to do this efficiently, without excessive duplication of source-level dependencies across multiple unrelated ports. It is also possible that achieving space-efficiency just isn't worth the effort because storage is cheap and/or there isn't much duplication to begin with. 

Ah, I didn't realize you wanted to compile things by hand; I thought you just wanted to look at the source for informational purposes.

Why do you want to compile things manually that are available in MacPorts? Is there something insufficient about the way MacPorts has compiled things for you?

The --prefix parameter to standard configure scripts tells it where you want things to get installed to when you run "make install". Where things get built before they're installed, however, is generally still the source directory itself. Some projects offer or even recommend out-of-source builds (building in a different directory than the source), and will usually provide instructions on how to do so.




More information about the macports-users mailing list