php4: Added support for psql and mysql if installed.
This commit is contained in:
parent
e14ceb1612
commit
5d5b1b9cdd
23
php4/Pkgfile
23
php4/Pkgfile
@ -6,10 +6,23 @@
|
|||||||
|
|
||||||
name=php4
|
name=php4
|
||||||
version=4.4.7
|
version=4.4.7
|
||||||
release=2
|
release=3
|
||||||
source=(http://php.net/distributions/php-${version}.tar.bz2)
|
source=(http://php.net/distributions/php-${version}.tar.bz2)
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
local SQL
|
||||||
|
local CFLAGS
|
||||||
|
if [ "`pkginfo -i | grep postgresql`" ];then
|
||||||
|
SQL="${SQL} --with-pgsql=/usr"
|
||||||
|
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib/postgresql"
|
||||||
|
CFLAGS="${CFLAGS} -I/usr/include/postgresql"
|
||||||
|
fi
|
||||||
|
if [ "`pkginfo -i | grep mysql`" ];then
|
||||||
|
SQL="${SQL} --with-mysql=/usr"
|
||||||
|
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib/mysql"
|
||||||
|
CFLAGS="${CFLAGS} -I/usr/include/mysql"
|
||||||
|
fi
|
||||||
|
export LD_LIBRARY_PATH
|
||||||
cd php-${version}
|
cd php-${version}
|
||||||
./configure --prefix=/usr \
|
./configure --prefix=/usr \
|
||||||
--with-bz2 \
|
--with-bz2 \
|
||||||
@ -28,9 +41,11 @@ build() {
|
|||||||
--enable-regex=pcre \
|
--enable-regex=pcre \
|
||||||
--enable-sigchild \
|
--enable-sigchild \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
--disable-pdo
|
--disable-pdo \
|
||||||
make
|
${SQL}
|
||||||
|
make ${CFLAGS}
|
||||||
make INSTALL_ROOT=${PKG} install
|
make INSTALL_ROOT=${PKG} install
|
||||||
install -D -m 0644 php.ini-dist ${PKG}/etc/php.ini
|
|
||||||
rm -rf ${PKG}/usr/lib/php/{test,doc}
|
rm -rf ${PKG}/usr/lib/php/{test,doc}
|
||||||
|
sed -i "/^extension_dir/s|\./|/usr/lib/php/extensions|" php.ini-dist
|
||||||
|
install -D -m 0644 php.ini-dist ${PKG}/etc/php.ini
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user