Posts Tagged macports
trafshow : Display current network traffic
Posted by mailletf in Technology on February 26, 2009
trafshow is a simple little program that displays the current traffic on a network interface.

It listens on a given interface in promiscuous mode and displays information on each connection, its remote address and the amount of traffic going back and forth.
It can easily be installed on a Mac via Macport.
SQLite3, php5 and MAMP
Posted by mailletf in Apple, Programming on December 1, 2008
To make this short, php5 doesn’t come with sqlite3 support out of the box. My setup is as follows :
- SQLite3 installed through MacPorts
- php5 used through MAMP
I used the php-sqlite3 extension. When you run phpize, make sure you are actually using the one from MAMP by calling it with its full path /Applications/MAMP/bin/php5/bin/phpize.
I then complied the extension with the following flags (both paths are the defaults for macports and MAMP) :
./configure --with-sqlite3=/opt/local/ --with-php-config=/Applications/MAMP/bin/php5/bin/php-config
The make install didn’t copy the librarie to the right php folder :
>make install Installing shared extensions: /Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20060613/
Make sure that folder is the right one. You can find your dynamic extensions folder in your php.ini file
Compile against libraries installed with MacPorts
Posted by mailletf in Apple, Programming on January 22, 2008
MacPorts installs packages in a non unix-standard location. This can cause problems when trying to compile other software against these packages because they aren’t found by the configure script.
I experienced that problem when trying to compile SDL_image, which depends on libraries such as libpng. I had to configure with the following flags :
./configure CPPFLAGS="-I/opt/local/include" LDFLAGS="-L/opt/local/lib"
which indicates in which folders the libraries installed with MacPorts were installed.