Skip to content
This repository was archived by the owner on Apr 16, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ PHP versions the default one that gets run when just typing ``php``::

You need to have ``inst/current-bin`` in your ``$PATH`` to make this work.

Compiling extensions
--------------------
PECL extensions can be compiled for any installed PHP version using the ``compile-extension.sh`` script::

$ ./src/compile-extension apc 5.4.3

About phpfarm
-------------
Expand Down
16 changes: 16 additions & 0 deletions src/compile-extension.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
# @see http://cweiske.de/tagebuch/phpfarm-install-extensions.htm
# @example ./compile-extension.sh xdebug 5.4.3

EXTENSION=$1
PHPVERSION=$2

mkdir src/extensions
rm -rf src/extensions/*
pecl download $EXTENSION
tar xvzf $EXTENSION*
cd $EXTENSION*
/opt/phpfarm/inst/bin/phpize-$PHPVERSION
./configure --with-php-config=/opt/phpfarm/inst/bin/php-config-$PHPVERSION
make
make install