aboutsummaryrefslogtreecommitdiffstats
path: root/lang/php5
diff options
context:
space:
mode:
authorale <ale@FreeBSD.org>2010-08-25 20:42:20 +0800
committerale <ale@FreeBSD.org>2010-08-25 20:42:20 +0800
commitca378d39eafacde5814a72d76f91a67fde58c021 (patch)
tree3d9e9dd39df67b3c0b0e32b12b84737304725bed /lang/php5
parent3c0c0752115b552ee2822abb7a35ba47ef7868eb (diff)
downloadfreebsd-ports-gnome-ca378d39eafacde5814a72d76f91a67fde58c021.tar.gz
freebsd-ports-gnome-ca378d39eafacde5814a72d76f91a67fde58c021.tar.zst
freebsd-ports-gnome-ca378d39eafacde5814a72d76f91a67fde58c021.zip
Add the ability to use MySQL Native Driver (instead of MySQL Client Library)
with mysql/mysqli/pdo_mysql extensions.
Diffstat (limited to 'lang/php5')
-rw-r--r--lang/php5/Makefile9
-rw-r--r--lang/php5/Makefile.ext50
-rw-r--r--lang/php5/distinfo6
-rw-r--r--lang/php5/pkg-plist18
4 files changed, 64 insertions, 19 deletions
diff --git a/lang/php5/Makefile b/lang/php5/Makefile
index 84a9d96511ca..03aa163deecd 100644
--- a/lang/php5/Makefile
+++ b/lang/php5/Makefile
@@ -7,7 +7,7 @@
PORTNAME= php5
PORTVERSION= 5.3.3
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES?= lang devel www
MASTER_SITES= ${MASTER_SITE_PHP}
MASTER_SITE_SUBDIR= distributions
@@ -33,6 +33,7 @@ CONFIGURE_ARGS= \
--enable-libxml \
--with-libxml-dir=${LOCALBASE} \
--with-pcre-regex=${LOCALBASE} \
+ --with-zlib-dir=/usr \
--program-prefix=""
USE_GNOME= libxml2
@@ -66,8 +67,7 @@ PLIST_SUB+= SUHOSIN="@comment "
.endif
.if defined(WITH_MAILHEAD)
-#PATCHFILES+= php-${PORTVERSION}-mail-header.patch:mail
-PATCHFILES+= php-5.3.2-mail-header.patch:mail
+PATCHFILES+= php-${PORTVERSION}-mail-header.patch:mail
PATCH_SITES+= http://choon.net/opensource/php/:mail
.endif
@@ -140,7 +140,8 @@ CONFIGURE_ARGS+=--with-zend-vm=GOTO
CONFIGURE_ENV+= ac_cv_pthreads_lib="" \
ac_cv_pthreads_cflags="" \
pthreads_working="yes" \
- lt_cv_path_SED="sed"
+ lt_cv_path_SED="sed" \
+ PHP_MYSQLND_ENABLED="yes"
.if defined(WITH_LINKTHR)
CONFIGURE_ENV+= LIBS="${LIBS} ${PTHREAD_LIBS}"
diff --git a/lang/php5/Makefile.ext b/lang/php5/Makefile.ext
index d30bcf102e2a..f969b6883ae1 100644
--- a/lang/php5/Makefile.ext
+++ b/lang/php5/Makefile.ext
@@ -179,17 +179,11 @@ CONFIGURE_ARGS+=--with-mssql=${LOCALBASE}
.endif
.if ${PHP_MODNAME} == "mysql"
-CONFIGURE_ARGS+=--with-mysql=${LOCALBASE} \
- --with-zlib-dir=/usr
-
-USE_MYSQL= yes
+OPTIONS= MYSQLND "Use MySQL Native Driver" off
.endif
.if ${PHP_MODNAME} == "mysqli"
-CONFIGURE_ARGS+=--with-mysqli=${LOCALBASE}/bin/mysql_config
-
-USE_MYSQL= yes
-BROKEN_WITH_MYSQL= 323 40
+OPTIONS= MYSQLND "Use MySQL Native Driver" off
.endif
.if ${PHP_MODNAME} == "odbc"
@@ -232,10 +226,7 @@ USE_FIREBIRD= yes
.endif
.if ${PHP_MODNAME} == "pdo_mysql"
-CONFIGURE_ARGS+=--with-pdo-mysql=${LOCALBASE} \
- --with-zlib-dir=/usr
-
-USE_MYSQL= yes
+OPTIONS= MYSQLND "Use MySQL Native Driver" off
USE_PHP= pdo
USE_PHP_BUILD= yes
@@ -493,6 +484,28 @@ CONFIGURE_ARGS+=--with-onig=${LOCALBASE}
. endif
.endif
+.if ${PHP_MODNAME} == "mysql"
+. if defined(WITH_MYSQLND)
+CONFIGURE_ARGS+=--with-mysql=mysqlnd
+. else
+CONFIGURE_ARGS+=--with-mysql=${LOCALBASE} \
+ --with-zlib-dir=/usr
+
+USE_MYSQL= yes
+. endif
+.endif
+
+.if ${PHP_MODNAME} == "mysqli"
+. if defined(WITH_MYSQLND)
+CONFIGURE_ARGS+=--with-mysqli=mysqlnd
+. else
+CONFIGURE_ARGS+=--with-mysqli=${LOCALBASE}/bin/mysql_config
+
+USE_MYSQL= yes
+BROKEN_WITH_MYSQL= 323 40
+. endif
+.endif
+
.if ${PHP_MODNAME} == "openssl"
post-extract:
@${MV} ${WRKSRC}/config0.m4 ${WRKSRC}/config.m4
@@ -506,6 +519,19 @@ LIB_DEPENDS+= ct.4:${PORTSDIR}/databases/freetds
.endif
.endif
+.if ${PHP_MODNAME} == "pdo_mysql"
+. if defined(WITH_MYSQLND)
+CONFIGURE_ARGS+=--with-pdo-mysql=mysqlnd
+
+USE_PHP+= mysql
+. else
+CONFIGURE_ARGS+=--with-pdo-mysql=${LOCALBASE} \
+ --with-zlib-dir=/usr
+
+USE_MYSQL= yes
+. endif
+.endif
+
.if ${PHP_MODNAME} == "sqlite"
. if defined(WITH_UTF8)
CONFIGURE_ARGS+=--enable-sqlite-utf8
diff --git a/lang/php5/distinfo b/lang/php5/distinfo
index f8f7094648af..05694f045b2a 100644
--- a/lang/php5/distinfo
+++ b/lang/php5/distinfo
@@ -4,6 +4,6 @@ SIZE (php-5.3.3.tar.bz2) = 10662227
MD5 (suhosin-patch-5.3.3-0.9.10.patch.gz) = b66b27c43b1332400ef8982944c3b95b
SHA256 (suhosin-patch-5.3.3-0.9.10.patch.gz) = f48489ff7d3fd3fc30429f7349f181c84caf2e03e672eb2d2b55b46adf6f602c
SIZE (suhosin-patch-5.3.3-0.9.10.patch.gz) = 41298
-MD5 (php-5.3.2-mail-header.patch) = 012d8c4637422e724d5559513fcaaacb
-SHA256 (php-5.3.2-mail-header.patch) = 3c9faeef9080330a23286f787efec8489587c619d8910d70926359f1a9306d6c
-SIZE (php-5.3.2-mail-header.patch) = 3350
+MD5 (php-5.3.3-mail-header.patch) = 6d33b0c9d1ab3b07fcd2ebeeb97495a9
+SHA256 (php-5.3.3-mail-header.patch) = 4057b0246246763ca41fd04c6f2cd8396c2aaa396d08ea3c95027df43045c2e8
+SIZE (php-5.3.3-mail-header.patch) = 3350
diff --git a/lang/php5/pkg-plist b/lang/php5/pkg-plist
index 966415cee3ab..bc6aa47e196e 100644
--- a/lang/php5/pkg-plist
+++ b/lang/php5/pkg-plist
@@ -88,6 +88,23 @@ include/php/ext/ereg/regex/regex.h
include/php/ext/ereg/regex/regex2.h
include/php/ext/ereg/regex/utils.h
include/php/ext/libxml/php_libxml.h
+include/php/ext/mysqlnd/config-win.h
+include/php/ext/mysqlnd/mysqlnd.h
+include/php/ext/mysqlnd/mysqlnd_block_alloc.h
+include/php/ext/mysqlnd/mysqlnd_charset.h
+include/php/ext/mysqlnd/mysqlnd_debug.h
+include/php/ext/mysqlnd/mysqlnd_enum_n_def.h
+include/php/ext/mysqlnd/mysqlnd_libmysql_compat.h
+include/php/ext/mysqlnd/mysqlnd_net.h
+include/php/ext/mysqlnd/mysqlnd_portability.h
+include/php/ext/mysqlnd/mysqlnd_priv.h
+include/php/ext/mysqlnd/mysqlnd_result.h
+include/php/ext/mysqlnd/mysqlnd_result_meta.h
+include/php/ext/mysqlnd/mysqlnd_statistics.h
+include/php/ext/mysqlnd/mysqlnd_structs.h
+include/php/ext/mysqlnd/mysqlnd_wireprotocol.h
+include/php/ext/mysqlnd/php_mysqlnd.h
+include/php/ext/mysqlnd/php_mysqlnd_config.h
include/php/ext/pcre/php_pcre.h
include/php/ext/spl/php_spl.h
include/php/ext/spl/spl_array.h
@@ -225,6 +242,7 @@ lib/php/build/shtool
@dirrm include/php/ext/ereg/regex
@dirrm include/php/ext/ereg
@dirrm include/php/ext/libxml
+@dirrm include/php/ext/mysqlnd
@dirrm include/php/ext/pcre
@dirrm include/php/ext/spl
@dirrm include/php/ext/standard