Subject: [alpine-devel] Problems with 1.9.0 packages/testing/php apks

From: Nathan Angelacos <[email-masked]>
Date: Fri, 06 Mar 2009 20:43:12 -0500

I'm trying to get mantisbt working, and am now at the following showstopper.

mantis needs the php session module, but the current session.so dies 
with the following message:

# php-cgi
Can't modify /usr/lib/php/20060613/session.so's text section. Use GCC 
option -fPIC for shared objects, please.

I don't have a compile environment set up, so if someone would like to 
compile a new session.so for me, I'd be grateful!

As a side point, I'd prefer to use postgresql (from packages/extra), but 
the testing/php apk does not have a postges driver - just the mysql driver.

I'll go ahead using mysql, but would really prefer to have a postgres 
driver at some point. :-)

Thanks!

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Cameron Banta <[email-masked]>
Date: Fri, 6 Mar 2009 20:24:15 -0600

> the testing/php apk does not have a postges driver - just the mysql driver.

This patch adds postgresql support to php. Please review.

Thanks,
Cameron

---

From: Cameron Banta <[email-masked]>
Date: Sat, 7 Mar 2009 08:49:51 -0600

On Fri, Mar 6, 2009 at 8:24 PM, Cameron Banta <[email-masked]> wrote:

> On Fri, Mar 6, 2009 at 7:43 PM, Nathan Angelacos <[email-masked]>wrote:
>
>>

I forgot to change the pkgrev - this new patch replaces the earlier one, and
compiles to pic.

Please review.

-Cameron
From 071e92a7e9658595bac32fe46cad52ed1b459eaf Mon Sep 17 00:00:00 2001
From: Cameron Banta <[email-masked]>
Date: Sat, 7 Mar 2009 14:44:57 +0000
Subject: [PATCH] Added postgresql support - compile to pic

---
 testing/php/APKBUILD |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/testing/php/APKBUILD b/testing/php/APKBUILD
index 521787c..4741a44 100644
--- a/testing/php/APKBUILD
+++ b/testing/php/APKBUILD
@@ -2,14 +2,14 @@
 # Maintainer: Carlo Landmeter <clandmeter at gmail>
 pkgname=php
 pkgver=5.2.8
-pkgrel=0
+pkgrel=1
 pkgdesc="The PHP language runtime engine"
 url="http://www.php.net/"
 license="PHP-3"
 depends="uclibc pcre"
 makedepends="pcre-dev libxml2-dev libiconv-dev openssl-dev zlib-dev bzip2-dev
 curl-dev libpng-dev libjpeg-dev freetype-dev libmcrypt-dev mysql-dev sqlite-dev
-libtool libltdl"
+libtool libltdl postgresql-dev"
 subpackages="$pkgname-doc $pkgname-dev $pkgname-bcmath $pkgname-bz2
 $pkgname-calendar $pkgname-curl $pkgname-exif
 $pkgname-ftp $pkgname-gd $pkgname-iconv $pkgname-json $pkgname-mcrypt 
@@ -17,7 +17,7 @@ $pkgname-mime_magic $pkgname-mysql $pkgname-mysqli
 $pkgname-openssl $pkgname-pdo $pkgname-pdo_mysql $pkgname-pdo_sqlite
 $pkgname-posix $pkgname-session $pkgname-shmop 
 $pkgname-soap $pkgname-sockets $pkgname-sqlite $pkgname-sysvmsg $pkgname-sysvsem
-$pkgname-sysvshm $pkgname-xmlrpc $pkgname-zip $pkgname-zlib"
+$pkgname-sysvshm $pkgname-xmlrpc $pkgname-zip $pkgname-zlib $pkgname-postgresql"
 source="http://www.php.net/distributions/${pkgname}-${pkgver}.tar.bz2"
 
 build() {
@@ -46,7 +46,8 @@ build() {
         --enable-mbstring=all --enable-mbregex --enable-json=shared \
         --with-iconv=shared --with-xmlrpc=shared --enable-cgi \
 	--with-freetype-dir=shared,/usr --with-mime-magic=shared \
-        --enable-discard-path --enable-force-cgi-redirect --disable-cli
+        --enable-discard-path --enable-force-cgi-redirect --disable-cli \
+	--with-pgsql=shared --with-pdo-pgsql=shared --with-pic
 
         make || return 1
         make -j1 INSTALL_ROOT="$pkgdir" install || return 1
@@ -209,6 +210,11 @@ zlib() {
 	_mv_mod zlib
 }
 
+postgresql() {
+	depends="uclibc $pkgname postgresql"
+	_mv_mod pgsql
+}
+
 # devleoper package
 dev() {
 	default_dev
-- 
1.6.1.3

---

From: Natanael Copa <[email-masked]>
Date: Tue, 10 Mar 2009 09:47:43 +0100

On Sat, 2009-03-07 at 08:49 -0600, Cameron Banta wrote:
>                 As a side point, I'd prefer to use postgresql (from
>                 packages/extra), but the testing/php apk does not have
>                 a postges driver - just the mysql driver.
>         
>         
> I forgot to change the pkgrev - this new patch replaces the earlier
> one, and compiles to pic.
> 
> Please review.

committed.
thanks!

-nc

---