| 109 | |
| 110 | |
| 111 | = How to test = #testing |
| 112 | |
| 113 | Unless you look closely at the build output in debug mode, |
| 114 | it can be hard to know whether a port is using ${configure.cc} as it should. |
| 115 | Here is one strategy that can be used: |
| 116 | |
| 117 | 1. Create a directory /opt/local/bin/no_default_gcc |
| 118 | 2. Create a script in that directory called "`cc`" that always prints an error message |
| 119 | 3. Create symlinks "`c++`", "`cpp`", "`g++`", and "`gcc`", all pointing to the "`cc`" script |
| 120 | 4. Edit the value of "binpath" in /opt/local/etc/macports/macports.conf so that it begins with "/opt/local/bin/no_default_gcc:" |
| 121 | |
| 122 | Now anytime a port tries to use one of these unversioned programs, the compile will stop with an error. |
| 123 | |
| 124 | Steps 1 through 3 can be done |
| 125 | by checking out [browser:users/ryandesign/no_default_gcc this directory] |
| 126 | from the MacPorts Subversion repository: |
| 127 | |
| 128 | {{{ |
| 129 | svn checkout \ |
| 130 | http://svn.macosforge.org/repository/macports/users/ryandesign/no_default_gcc \ |
| 131 | /opt/local/bin/no_default_gcc |
| 132 | }}} |
| 133 | |
| 134 | If you encounter a port which triggers this error |
| 135 | but you don't want to fix it immediately, |
| 136 | you can bypass it by editing macports.conf |
| 137 | and removing "/opt/local/bin/no_default_gcc:" from the "binpath" again. |