using port's configure step autonomously, outside of MacPorts

René J.V. Bertin rjvbertin at
Fri Oct 10 04:05:11 PDT 2014


It happens rather regularly that I want do a project's configure (or cmake) step without using `port configure`, for various reasons, including not wanting to have to rebuild a large port entirely.
The ideal thing would be to have a command (along the lines of port-whatsnew) that prints a shell script that sets the environment and the calls to configure/cmake, so it can be saved (and tweaked where necessary). But just the actual configure/cmake command would already be a big help. I know it's stored in the log, but that file gets reused so if you're breaking up a port's build like I often do *), that information gets lost. It could be useful to store the command in a separate dot file alongside the .CC_OPTIONS, .macportsXX, etc files (or even, store all the key phase command lines in individual files).

*) typical workflow, as /myself, for instance while working on KDE ports:
- port configure X
- make link to MacPorts work directory in my own workdirectory, say ./mp-work
- move ./mp-work/X . ; link ./X ./mp-work/X # make sure the source directory and my potential changes don't get lost because of an unforeseen port clean
- import ./X into an IDE, point it to ./mp-work/build as the build directory
- port build X or port destroot X # sudo port destroot if that's really necessary
- make any desired changes in ./mp-work/destroot
- sudo port -k install X # if all went well

More information about the macports-users mailing list