Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So MacPorts is the most painless way of installing stuff on my machine. But I want some custom options on my php5 install. How do I do this?

With a downloaded version of php, I would do this: ./php_folder/configure --with-config-file-scan-dir=/etc/php.d

With MacPorts I install it with this: sudo port install php5 +apache2 +mysql5 +pear

But I want to do something like this... sudo port install php5 +apache2 +mysql5 +pear --with-config-file-scan-dir=/etc/php.d

I just have no idea how to do it. Documentation says I can create a portfile but that looks a bit overkill for what I want to do.

share|improve this question

migrated from Jul 5 '11 at 14:52

This question came from our site for professional and enthusiast programmers.

You can try go to /opt/local/var/macports/sources/ subfolder and open in pico or vim editor Portfile located in each product folder you want to install.

For example - /opt/local/var/macports/sources/

In this file you should go to line with text configure.args and add configure options you need.

Hope it helps.

share|improve this answer

Customizing the Portfile is the right way to go, as suggested by Dmitry. But instead of messing with the official portfile synced from, it might be a better idea to create a local portfile repository and put the customized version of the portfile there.

share|improve this answer

You must log in to answer this question.