title: Macports on OSX 10.11 - compile "older" ports with -stdlib=libstdc++
body: <p>Macports uses the default <code>-stdlib</code> option which is <code>libc++</code> on OSX 10.11. However, I need to use <code>libstdc++</code> because I use other libraries rely on that. Up to this point, this question is the same with the following two questions: <a href="https://stackoverflow.com/questions/24600350/macports-on-osx-10-9-compile-opencv-with-libstdc" title="Macports on OSX 10.9 - compile opencv with libstdc++">1</a> and <a href="https://stackoverflow.com/questions/21546810/macports-on-osx-10-9-compile-with-stdlib-libstdc" title="Macports on OSX 10.9 - compile with -stdlib=libstdc++">2</a>, and I know the answer is <code>sudo port install PORTNAME configure.cxx_stdlib="libstdc++"</code>. </p>
  
  <p>However, I need to install an older port (specifically Boost 1.52) and the way to do it is to check out the port's directory at the desired revision using the <code>svn</code> command (which creates a directory called PORTNAME in the current location, and populates that with everything the port needs to build) and then we install the port as follows: </p>
  
  <pre><code>$ cd PORTNAME
  $ sudo port install
  </code></pre>
  
  <p>If I add <code>configure.cxx_stdlib="libstdc++"</code> to the end of the install command, macports does not honor the request. I edit the <code>Portfile</code> of the downloaded older port manually and add the instruction there but that didn't workout. I edit the <code>macports.conf</code> file but this didn't workout either...</p>
  
  <p>TL;DR, how do we compile an "older" port with <code>libstdc++</code> on OSX 10.11?</p>