summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authortaca <taca>2010-03-16 15:31:58 +0000
committertaca <taca>2010-03-16 15:31:58 +0000
commit38be9da889c0c63cac6bb0b9185299920025e9c8 (patch)
tree28f742c6d54850b24e5a6a523798796e41f48889 /lang
parentc443890557a01ea4441863f1154d1b1ebf586334 (diff)
downloadpkgsrc-38be9da889c0c63cac6bb0b9185299920025e9c8.tar.gz
Importing PHP 5.3.2 as lang/php53.
This package and lang/php5 aren't installed at the same time. Setting PHP_VERSION_DEFAULT as "5" or "53" to select PHP 5.2.x or 5.3.x. PHP is an HTML-embedded scripting language. It is modular, with some object-oriented features. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The language is designed to allow web developers to write dynamically generated pages quickly.
Diffstat (limited to 'lang')
-rw-r--r--lang/php53/DESCR5
-rw-r--r--lang/php53/MESSAGE11
-rw-r--r--lang/php53/MESSAGE.suhosin7
-rw-r--r--lang/php53/Makefile57
-rw-r--r--lang/php53/Makefile.common50
-rw-r--r--lang/php53/Makefile.php96
-rw-r--r--lang/php53/PLIST237
-rw-r--r--lang/php53/buildlink3.mk15
-rw-r--r--lang/php53/distinfo18
-rw-r--r--lang/php53/patches/patch-aa13
-rw-r--r--lang/php53/patches/patch-ab63
-rw-r--r--lang/php53/patches/patch-ac32
-rw-r--r--lang/php53/patches/patch-ad28
-rw-r--r--lang/php53/patches/patch-ae25
-rw-r--r--lang/php53/patches/patch-af10
-rw-r--r--lang/php53/patches/patch-ag10
-rw-r--r--lang/php53/patches/patch-ah33
-rw-r--r--lang/php53/patches/patch-ai33
-rw-r--r--lang/php53/patches/patch-aj10
19 files changed, 753 insertions, 0 deletions
diff --git a/lang/php53/DESCR b/lang/php53/DESCR
new file mode 100644
index 00000000000..2b28e8cc5cc
--- /dev/null
+++ b/lang/php53/DESCR
@@ -0,0 +1,5 @@
+PHP is an HTML-embedded scripting language. It is modular, with
+some object-oriented features. Much of its syntax is borrowed from
+C, Java and Perl with a couple of unique PHP-specific features
+thrown in. The language is designed to allow web developers to
+write dynamically generated pages quickly.
diff --git a/lang/php53/MESSAGE b/lang/php53/MESSAGE
new file mode 100644
index 00000000000..c15db1e713f
--- /dev/null
+++ b/lang/php53/MESSAGE
@@ -0,0 +1,11 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2010/03/16 15:31:58 taca Exp $
+
+To process PHP scripts, you will need a PHP-enabled HTTP server. You may
+either configure the HTTP server to use the PHP CGI binary located in
+
+ ${CGIDIR}/php
+
+or you may install a PHP module for your HTTP server, e.g. www/ap-php.
+
+===========================================================================
diff --git a/lang/php53/MESSAGE.suhosin b/lang/php53/MESSAGE.suhosin
new file mode 100644
index 00000000000..e43acae2d24
--- /dev/null
+++ b/lang/php53/MESSAGE.suhosin
@@ -0,0 +1,7 @@
+===========================================================================
+$NetBSD: MESSAGE.suhosin,v 1.1.1.1 2010/03/16 15:31:58 taca Exp $
+
+As you have chosen to install the Suhosin patch you may also want to
+install the Suhosin extension which can be found in security/php-suhosin.
+
+===========================================================================
diff --git a/lang/php53/Makefile b/lang/php53/Makefile
new file mode 100644
index 00000000000..448331b1ffd
--- /dev/null
+++ b/lang/php53/Makefile
@@ -0,0 +1,57 @@
+# $NetBSD: Makefile,v 1.1.1.1 2010/03/16 15:31:58 taca Exp $
+
+CATEGORIES= lang
+HOMEPAGE= http://www.php.net/
+COMMENT= PHP Hypertext Preprocessor version 5
+
+TEST_TARGET= test
+PKG_DESTDIR_SUPPORT= user-destdir
+
+USE_TOOLS+= gmake lex pkg-config
+LIBTOOL_OVERRIDE= # empty
+
+.include "Makefile.php"
+
+CGIDIR= ${PREFIX}/libexec/cgi-bin
+EGDIR= ${PREFIX}/share/examples/php
+MESSAGE_SUBST+= CGIDIR=${CGIDIR:Q}
+
+CONFIGURE_ENV+= lt_cv_path_SED=${SED:Q}
+MAKE_ENV+= INSTALL_ROOT=${DESTDIR:Q}
+
+CONF_FILES= ${EGDIR}/php.ini-production ${PKG_SYSCONFDIR}/php.ini
+OWN_DIRS= ${PREFIX}/${PHP_EXTENSION_DIR}
+
+SUBST_CLASSES+= path
+SUBST_MESSAGE.path= Fixing common paths.
+SUBST_STAGE.path= pre-configure
+SUBST_FILES.path= configure ext/phar/phar/phar.php
+SUBST_FILES.path+= php.ini-development php.ini-production run-tests.php
+SUBST_SED.path= -e 's,@CGIDIR@,${CGIDIR},g'
+SUBST_SED.path+= -e 's,@PREFIX@,${PREFIX},g'
+
+INSTALLATION_DIRS+= ${CGIDIR}
+
+# Make sure modules can link correctly
+.if ${OPSYS} == "Darwin"
+INSTALL_UNSTRIPPED= yes
+.endif
+
+post-extract:
+ cd ${WRKSRC} && \
+ ${FIND} . -xdev -type f -name '*.orig' -exec ${RM} -f {} \;
+
+post-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/sapi/cli/php \
+ ${DESTDIR:Q}${PREFIX:Q}/bin/php
+ ${INSTALL_DATA} ${WRKSRC}/sapi/cli/php.1 \
+ ${DESTDIR:Q}${PREFIX:Q}/${PKGMANDIR}/man1/php.1
+ ${INSTALL_PROGRAM} ${WRKSRC}/sapi/cgi/php-cgi \
+ ${DESTDIR:Q}${CGIDIR:Q}/php
+ ${INSTALL_DATA_DIR} ${DESTDIR:Q}${EGDIR:Q}
+ cd ${WRKSRC}; ${INSTALL_DATA} php.ini-development php.ini-production \
+ ${DESTDIR:Q}${EGDIR:Q}
+ ${INSTALL_DATA_DIR} ${DESTDIR:Q}${PREFIX:Q}/share/php
+ ${INSTALL_DATA} ${WRKSRC}/php.gif ${DESTDIR:Q}${PREFIX:Q}/share/php
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/lang/php53/Makefile.common b/lang/php53/Makefile.common
new file mode 100644
index 00000000000..90a8fb32238
--- /dev/null
+++ b/lang/php53/Makefile.common
@@ -0,0 +1,50 @@
+# $NetBSD: Makefile.common,v 1.1.1.1 2010/03/16 15:31:58 taca Exp $
+# used by lang/php53/Makefile.php
+# used by lang/php/ext.mk
+# used by meta-pkgs/php53-extensions/Makefile
+
+#
+# NOTE:
+# The suhosin option includes a patch from http://www.hardened-php.net/
+# Which tracks with the exact version number of PHP. There may be a delay
+# in the patch which can leave the option broken until an updated patch
+# is released. When updating PHP please don't forget to update the
+# distnfo with the details of the suhosin patch as well.
+#
+# Check these packages when update to new release of PHP and consider to
+# reset PKG_REVISION:
+#
+# databases/php-mysqlnd (not yet packaged)
+# misc/php-intl
+# textproc/php-enchant
+#
+# Since other PHP extensions are shared between www/php5, we can't reset
+# PKGREVSION.
+#
+
+.if !defined(DISTNAME)
+DISTNAME= php-${PHP_BASE_VERS}
+DIST_SUBDIR= ${DISTNAME}
+.endif
+CATEGORIES+= www
+
+.if !defined(PECL_VERSION)
+MASTER_SITES?= http://www.php.net/distributions/ \
+ http://php3.de/distributions/
+EXTRACT_SUFX?= .tar.bz2
+.endif
+
+MAINTAINER?= pkgsrc-users@NetBSD.org
+HOMEPAGE?= http://www.php.net/
+
+PHP_BASE_VERS= 5.3.2
+
+PHP_EXTENSION_DIR= lib/php/20090630
+PLIST_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR:Q}
+
+PKG_SYSCONFVAR?= php
+
+# needed due to (broken?) configure checks in php-xmlrpc and php5-dom
+CONFIGURE_ENV+= PHP_LIBXML_SHARED="1"
+
+.include "../../mk/bsd.prefs.mk"
diff --git a/lang/php53/Makefile.php b/lang/php53/Makefile.php
new file mode 100644
index 00000000000..a334616f002
--- /dev/null
+++ b/lang/php53/Makefile.php
@@ -0,0 +1,96 @@
+# $NetBSD: Makefile.php,v 1.1.1.1 2010/03/16 15:31:58 taca Exp $
+# used by lang/php53/Makefile
+# used by www/ap-php/Makefile
+
+.include "../../lang/php53/Makefile.common"
+
+DISTINFO_FILE= ${.CURDIR}/../../lang/php53/distinfo
+PATCHDIR= ${.CURDIR}/../../lang/php53/patches
+
+USE_LIBTOOL= YES
+USE_LANGUAGES= c c++
+GNU_CONFIGURE= YES
+BUILD_DEFS+= VARBASE
+PLIST_VARS+= suhosin
+
+CONFIGURE_ENV+= EXTENSION_DIR="${PREFIX}/${PHP_EXTENSION_DIR}"
+
+PHP_EXTENSION_DIR= lib/php/20090630
+PLIST_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR:Q}
+
+.include "../../mk/bsd.prefs.mk"
+
+CONFIGURE_ARGS+= --with-config-file-path=${PKG_SYSCONFDIR:Q}
+CONFIGURE_ARGS+= --with-config-file-scan-dir=${PKG_SYSCONFDIR:Q}/php.d
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
+CONFIGURE_ARGS+= --localstatedir=${VARBASE}
+
+CONFIGURE_ARGS+= --with-regex=system
+
+CONFIGURE_ARGS+= --without-mysql
+CONFIGURE_ARGS+= --without-sqlite
+CONFIGURE_ARGS+= --without-iconv
+CONFIGURE_ARGS+= --without-pear
+
+CONFIGURE_ARGS+= --disable-posix
+CONFIGURE_ARGS+= --disable-dom
+CONFIGURE_ARGS+= --disable-pdo
+CONFIGURE_ARGS+= --disable-json
+
+CONFIGURE_ARGS+= --enable-xml
+CONFIGURE_ARGS+= --with-libxml-dir=${PREFIX:Q}
+.include "../../textproc/libxml2/buildlink3.mk"
+
+# Note: This expression is the same as ${PKGBASE}, but the latter is
+# not defined yet, so we cannot use it here.
+PKG_OPTIONS_VAR= PKG_OPTIONS.${PKGNAME:C/-[0-9].*//}
+PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts suhosin
+PKG_SUGGESTED_OPTIONS+= ssl
+
+#SUBST_CLASSES+= ini
+#SUBST_STAGE.ini= post-patch
+#SUBST_FILES.ini= php.ini-development
+#SUBST_FILES.ini+= php.ini-production
+#SUBST_SED.ini= -e "s|\\;include_path = \".:/php/includes\"|include_path = \".:${PREFIX}/lib/php\"|g"
+#SUBST_MESSAGE.ini= Fixing default ini files.
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Msuhosin)
+SUHOSIN_PHPVER= 5.3.2
+. if ${SUHOSIN_PHPVER} != ${PHP_BASE_VERS}
+PKG_FAIL_REASON+= "The suhosin patch is currently not available for"
+PKG_FAIL_REASON+= "this version of PHP. You may have to wait until"
+PKG_FAIL_REASON+= "an updated patch is released or temporarily"
+PKG_FAIL_REASON+= "build this package without the suhosin option."
+. else
+PATCH_SITES= http://download.suhosin.org/
+PATCHFILES+= suhosin-patch-${SUHOSIN_PHPVER}-0.9.9.1.patch.gz
+PATCH_DIST_STRIP= -p1
+PLIST.suhosin= yes
+MESSAGE_SRC= ${.CURDIR}/../../lang/php5/MESSAGE
+MESSAGE_SRC+= ${.CURDIR}/../../lang/php5/MESSAGE.suhosin
+. endif
+.endif
+
+.if !empty(PKG_OPTIONS:Minet6)
+CONFIGURE_ARGS+= --enable-ipv6
+.else
+CONFIGURE_ARGS+= --disable-ipv6
+.endif
+
+.if !empty(PKG_OPTIONS:Mssl)
+. include "../../security/openssl/buildlink3.mk"
+. if ${OPSYS} == "SunOS"
+CONFIGURE_ARGS+= --with-openssl=yes
+LIBS.SunOS+= -lcrypto
+. else
+CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_PREFIX.openssl}
+. endif
+.else
+CONFIGURE_ARGS+= --without-openssl
+.endif
+
+.if !empty(PKG_OPTIONS:Mmaintainer-zts)
+CONFIGURE_ARGS+= --enable-maintainer-zts
+.endif
diff --git a/lang/php53/PLIST b/lang/php53/PLIST
new file mode 100644
index 00000000000..bfc6e2eab7f
--- /dev/null
+++ b/lang/php53/PLIST
@@ -0,0 +1,237 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2010/03/16 15:31:58 taca Exp $
+bin/phar
+bin/phar.phar
+bin/php
+bin/php-config
+bin/phpize
+include/php/TSRM/TSRM.h
+include/php/TSRM/acconfig.h
+include/php/TSRM/readdir.h
+include/php/TSRM/tsrm_config.h
+include/php/TSRM/tsrm_config.w32.h
+include/php/TSRM/tsrm_config_common.h
+include/php/TSRM/tsrm_nw.h
+include/php/TSRM/tsrm_strtok_r.h
+include/php/TSRM/tsrm_virtual_cwd.h
+include/php/TSRM/tsrm_win32.h
+include/php/Zend/acconfig.h
+include/php/Zend/zend.h
+include/php/Zend/zend_API.h
+include/php/Zend/zend_alloc.h
+include/php/Zend/zend_build.h
+include/php/Zend/zend_builtin_functions.h
+include/php/Zend/zend_closures.h
+include/php/Zend/zend_compile.h
+include/php/Zend/zend_config.h
+include/php/Zend/zend_config.nw.h
+include/php/Zend/zend_config.w32.h
+include/php/Zend/zend_constants.h
+include/php/Zend/zend_dynamic_array.h
+include/php/Zend/zend_errors.h
+include/php/Zend/zend_exceptions.h
+include/php/Zend/zend_execute.h
+include/php/Zend/zend_extensions.h
+include/php/Zend/zend_fast_cache.h
+include/php/Zend/zend_float.h
+include/php/Zend/zend_gc.h
+include/php/Zend/zend_globals.h
+include/php/Zend/zend_globals_macros.h
+include/php/Zend/zend_hash.h
+include/php/Zend/zend_highlight.h
+include/php/Zend/zend_indent.h
+include/php/Zend/zend_ini.h
+include/php/Zend/zend_ini_parser.h
+include/php/Zend/zend_ini_scanner.h
+include/php/Zend/zend_ini_scanner_defs.h
+include/php/Zend/zend_interfaces.h
+include/php/Zend/zend_istdiostream.h
+include/php/Zend/zend_iterators.h
+include/php/Zend/zend_language_parser.h
+include/php/Zend/zend_language_scanner.h
+include/php/Zend/zend_language_scanner_defs.h
+include/php/Zend/zend_list.h
+include/php/Zend/zend_llist.h
+include/php/Zend/zend_modules.h
+include/php/Zend/zend_multibyte.h
+include/php/Zend/zend_multiply.h
+include/php/Zend/zend_object_handlers.h
+include/php/Zend/zend_objects.h
+include/php/Zend/zend_objects_API.h
+include/php/Zend/zend_operators.h
+include/php/Zend/zend_ptr_stack.h
+include/php/Zend/zend_qsort.h
+include/php/Zend/zend_stack.h
+include/php/Zend/zend_static_allocator.h
+include/php/Zend/zend_stream.h
+include/php/Zend/zend_strtod.h
+include/php/Zend/zend_ts_hash.h
+include/php/Zend/zend_types.h
+include/php/Zend/zend_variables.h
+include/php/Zend/zend_vm.h
+include/php/Zend/zend_vm_def.h
+include/php/Zend/zend_vm_execute.h
+include/php/Zend/zend_vm_opcodes.h
+include/php/ext/date/lib/timelib.h
+include/php/ext/date/lib/timelib_config.h
+include/php/ext/date/lib/timelib_structs.h
+include/php/ext/date/php_date.h
+include/php/ext/ereg/php_ereg.h
+include/php/ext/ereg/php_regex.h
+include/php/ext/filter/php_filter.h
+include/php/ext/hash/php_hash.h
+include/php/ext/hash/php_hash_adler32.h
+include/php/ext/hash/php_hash_crc32.h
+include/php/ext/hash/php_hash_gost.h
+include/php/ext/hash/php_hash_haval.h
+include/php/ext/hash/php_hash_md.h
+include/php/ext/hash/php_hash_ripemd.h
+include/php/ext/hash/php_hash_salsa.h
+include/php/ext/hash/php_hash_sha.h
+include/php/ext/hash/php_hash_snefru.h
+include/php/ext/hash/php_hash_tiger.h
+include/php/ext/hash/php_hash_types.h
+include/php/ext/hash/php_hash_whirlpool.h
+include/php/ext/libxml/php_libxml.h
+include/php/ext/pcre/pcrelib/config.h
+include/php/ext/pcre/pcrelib/pcre.h
+include/php/ext/pcre/pcrelib/pcre_internal.h
+include/php/ext/pcre/pcrelib/pcreposix.h
+include/php/ext/pcre/pcrelib/ucp.h
+include/php/ext/pcre/php_pcre.h
+include/php/ext/session/mod_files.h
+include/php/ext/session/mod_user.h
+include/php/ext/session/php_session.h
+include/php/ext/spl/php_spl.h
+include/php/ext/spl/spl_array.h
+include/php/ext/spl/spl_directory.h
+include/php/ext/spl/spl_dllist.h
+include/php/ext/spl/spl_engine.h
+include/php/ext/spl/spl_exceptions.h
+include/php/ext/spl/spl_fixedarray.h
+include/php/ext/spl/spl_functions.h
+include/php/ext/spl/spl_heap.h
+include/php/ext/spl/spl_iterators.h
+include/php/ext/spl/spl_observer.h
+include/php/ext/standard/base64.h
+include/php/ext/standard/basic_functions.h
+include/php/ext/standard/crc32.h
+include/php/ext/standard/credits.h
+include/php/ext/standard/credits_ext.h
+include/php/ext/standard/credits_sapi.h
+include/php/ext/standard/crypt_freesec.h
+include/php/ext/standard/css.h
+include/php/ext/standard/cyr_convert.h
+include/php/ext/standard/datetime.h
+include/php/ext/standard/dl.h
+include/php/ext/standard/exec.h
+include/php/ext/standard/file.h
+include/php/ext/standard/flock_compat.h
+include/php/ext/standard/fsock.h
+include/php/ext/standard/head.h
+include/php/ext/standard/html.h
+include/php/ext/standard/info.h
+include/php/ext/standard/md5.h
+include/php/ext/standard/microtime.h
+include/php/ext/standard/pack.h
+include/php/ext/standard/pageinfo.h
+include/php/ext/standard/php_array.h
+include/php/ext/standard/php_assert.h
+include/php/ext/standard/php_browscap.h
+include/php/ext/standard/php_crypt.h
+include/php/ext/standard/php_crypt_r.h
+include/php/ext/standard/php_dir.h
+include/php/ext/standard/php_dns.h
+include/php/ext/standard/php_ext_syslog.h
+include/php/ext/standard/php_filestat.h
+include/php/ext/standard/php_fopen_wrappers.h
+include/php/ext/standard/php_ftok.h
+include/php/ext/standard/php_http.h
+include/php/ext/standard/php_image.h
+include/php/ext/standard/php_incomplete_class.h
+include/php/ext/standard/php_iptc.h
+include/php/ext/standard/php_lcg.h
+include/php/ext/standard/php_link.h
+include/php/ext/standard/php_mail.h
+include/php/ext/standard/php_math.h
+include/php/ext/standard/php_metaphone.h
+include/php/ext/standard/php_rand.h
+include/php/ext/standard/php_smart_str.h
+include/php/ext/standard/php_smart_str_public.h
+include/php/ext/standard/php_standard.h
+include/php/ext/standard/php_string.h
+include/php/ext/standard/php_type.h
+include/php/ext/standard/php_uuencode.h
+include/php/ext/standard/php_var.h
+include/php/ext/standard/php_versioning.h
+include/php/ext/standard/proc_open.h
+include/php/ext/standard/quot_print.h
+include/php/ext/standard/scanf.h
+include/php/ext/standard/sha1.h
+include/php/ext/standard/streamsfuncs.h
+include/php/ext/standard/uniqid.h
+include/php/ext/standard/url.h
+include/php/ext/standard/url_scanner_ex.h
+include/php/ext/standard/winver.h
+include/php/ext/xml/expat_compat.h
+include/php/ext/xml/php_xml.h
+include/php/main/SAPI.h
+include/php/main/build-defs.h
+include/php/main/fopen_wrappers.h
+include/php/main/logos.h
+include/php/main/php.h
+include/php/main/php3_compat.h
+include/php/main/php_compat.h
+include/php/main/php_config.h
+include/php/main/php_content_types.h
+include/php/main/php_getopt.h
+include/php/main/php_globals.h
+include/php/main/php_ini.h
+include/php/main/php_logos.h
+include/php/main/php_main.h
+include/php/main/php_memory_streams.h
+include/php/main/php_network.h
+include/php/main/php_open_temporary_file.h
+include/php/main/php_output.h
+include/php/main/php_reentrancy.h
+include/php/main/php_scandir.h
+include/php/main/php_streams.h
+include/php/main/php_syslog.h
+include/php/main/php_ticks.h
+include/php/main/php_variables.h
+include/php/main/php_version.h
+include/php/main/rfc1867.h
+include/php/main/safe_mode.h
+include/php/main/snprintf.h
+include/php/main/spprintf.h
+include/php/main/streams/php_stream_context.h
+include/php/main/streams/php_stream_filter_api.h
+include/php/main/streams/php_stream_glob_wrapper.h
+include/php/main/streams/php_stream_mmap.h
+include/php/main/streams/php_stream_plain_wrapper.h
+include/php/main/streams/php_stream_transport.h
+include/php/main/streams/php_stream_userspace.h
+include/php/main/streams/php_streams_int.h
+${PLIST.suhosin}include/php/main/suhosin_globals.h
+${PLIST.suhosin}include/php/main/suhosin_logo.h
+${PLIST.suhosin}include/php/main/suhosin_patch.h
+include/php/main/win32_internal_function_disabled.h
+include/php/main/win95nt.h
+lib/php/build/Makefile.global
+lib/php/build/acinclude.m4
+lib/php/build/config.guess
+lib/php/build/config.sub
+lib/php/build/libtool.m4
+lib/php/build/ltmain.sh
+lib/php/build/mkdep.awk
+lib/php/build/phpize.m4
+lib/php/build/run-tests.php
+lib/php/build/scan_makefile_in.awk
+lib/php/build/shtool
+libexec/cgi-bin/php
+man/man1/php-config.1
+man/man1/php.1
+man/man1/phpize.1
+share/examples/php/php.ini-development
+share/examples/php/php.ini-production
+share/php/php.gif
+@pkgdir include/php/include
diff --git a/lang/php53/buildlink3.mk b/lang/php53/buildlink3.mk
new file mode 100644
index 00000000000..b4d19d3c5b0
--- /dev/null
+++ b/lang/php53/buildlink3.mk
@@ -0,0 +1,15 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2010/03/16 15:31:58 taca Exp $
+
+BUILDLINK_TREE+= php
+
+.if !defined(PHP_BUILDLINK3_MK)
+PHP_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.php+= php>=5.3.2
+BUILDLINK_ABI_DEPENDS.php+= php>=5.3.2
+BUILDLINK_PKGSRCDIR.php?= ../../lang/php53
+
+.include "../../textproc/libxml2/buildlink3.mk"
+.endif # PHP_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -php
diff --git a/lang/php53/distinfo b/lang/php53/distinfo
new file mode 100644
index 00000000000..55512678ed3
--- /dev/null
+++ b/lang/php53/distinfo
@@ -0,0 +1,18 @@
+$NetBSD: distinfo,v 1.1.1.1 2010/03/16 15:31:58 taca Exp $
+
+SHA1 (php-5.3.2/php-5.3.2.tar.bz2) = 79ea4ee3da3a7542d1e348ac963a5b38bcbb4b6b
+RMD160 (php-5.3.2/php-5.3.2.tar.bz2) = 60a8aac0d51511ecaf8dcad9d31bdf072c0c99cf
+Size (php-5.3.2/php-5.3.2.tar.bz2) = 10477662 bytes
+SHA1 (php-5.3.2/suhosin-patch-5.3.2-0.9.9.1.patch.gz) = c48d3f24341d3b0214ca3e980320b23864aa93ba
+RMD160 (php-5.3.2/suhosin-patch-5.3.2-0.9.9.1.patch.gz) = 64d8b7ec2ec91fd7a43b0cd95c0aa0df5b666768
+Size (php-5.3.2/suhosin-patch-5.3.2-0.9.9.1.patch.gz) = 40847 bytes
+SHA1 (patch-aa) = f51491af7c577f36979fc07d52b5857368392e09
+SHA1 (patch-ab) = 07c1a5463a302ea155aba10da0d6b0ee0aee43a8
+SHA1 (patch-ac) = f1a0c3ebe65bc3c486c44411b384bc882288b55d
+SHA1 (patch-ad) = 1608c58860a43b4e31df8646b5ded253ec9aa881
+SHA1 (patch-ae) = e590db60a60f4e5ef2da4e5edb786335a67a3d56
+SHA1 (patch-af) = 6e903ea7ff501226601fa73ce74c272d44d7346b
+SHA1 (patch-ag) = c49cdff097d1e54ebe93b5afb550e89b0cc2468e
+SHA1 (patch-ah) = b20c29c64b3099f77855a5ec28960dc1c4f65c83
+SHA1 (patch-ai) = d4766893a2c47a4e4a744248dda265b0a9a66a1f
+SHA1 (patch-aj) = d611d13fcc28c5d2b9e9586832ce4b8ae5707b48
diff --git a/lang/php53/patches/patch-aa b/lang/php53/patches/patch-aa
new file mode 100644
index 00000000000..937a2c6de37
--- /dev/null
+++ b/lang/php53/patches/patch-aa
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1.1.1 2010/03/16 15:31:58 taca Exp $
+
+--- acinclude.m4.orig 2009-11-29 06:13:22.000000000 +0000
++++ acinclude.m4
+@@ -2335,7 +2335,7 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
+ if test "$found_openssl" = "no"; then
+
+ if test "$PHP_OPENSSL_DIR" = "yes"; then
+- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
++ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /"
+ fi
+
+ for i in $PHP_OPENSSL_DIR; do
diff --git a/lang/php53/patches/patch-ab b/lang/php53/patches/patch-ab
new file mode 100644
index 00000000000..8a040ed4fea
--- /dev/null
+++ b/lang/php53/patches/patch-ab
@@ -0,0 +1,63 @@
+$NetBSD: patch-ab,v 1.1.1.1 2010/03/16 15:31:58 taca Exp $
+
+--- configure.orig 2010-03-13 06:01:16.000000000 +0000
++++ configure
+@@ -12194,7 +12194,7 @@ EOF
+ PHP_VAR_SUBST="$PHP_VAR_SUBST SAPI_CGI_PATH"
+
+
+- INSTALL_IT="@echo \"Installing PHP CGI binary: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php-cgi\$(program_suffix)\$(EXEEXT)"
++ INSTALL_IT="@echo \"Installing PHP CGI binary: \$(INSTALL_ROOT)@CGIDIR@\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)@CGIDIR@/php"
+
+ PHP_SAPI=cgi
+
+@@ -21515,7 +21515,7 @@ fi
+ if test "$found_openssl" = "no"; then
+
+ if test "$PHP_OPENSSL_DIR" = "yes"; then
+- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
++ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /"
+ fi
+
+ for i in $PHP_OPENSSL_DIR; do
+@@ -34398,7 +34398,7 @@ fi
+ if test "$found_openssl" = "no"; then
+
+ if test "$PHP_OPENSSL_DIR" = "yes"; then
+- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
++ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /"
+ fi
+
+ for i in $PHP_OPENSSL_DIR; do
+@@ -48467,7 +48467,7 @@ fi
+ if test "$found_openssl" = "no"; then
+
+ if test "$PHP_OPENSSL_DIR" = "yes"; then
+- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
++ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /"
+ fi
+
+ for i in $PHP_OPENSSL_DIR; do
+@@ -82684,7 +82684,7 @@ fi
+ if test "$found_openssl" = "no"; then
+
+ if test "$PHP_OPENSSL_DIR" = "yes"; then
+- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
++ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /"
+ fi
+
+ for i in $PHP_OPENSSL_DIR; do
+@@ -104623,12 +104623,7 @@ old_CC=$CC
+ if test "$PHP_THREAD_SAFETY" = "yes" && test -n "$ac_cv_pthreads_cflags"; then
+ CXXFLAGS="$CXXFLAGS $ac_cv_pthreads_cflags"
+ INLINE_CFLAGS="$INLINE_CFLAGS $ac_cv_pthreads_cflags"
+- cat >meta_ccld<<EOF
+-#! /bin/sh
+-exec $CC $ac_cv_pthreads_cflags \$@
+-EOF
+- CC="$abs_builddir/meta_ccld"
+- chmod +x meta_ccld
++ CPPFLAGS="$CPPFLAGS $ac_cv_pthreads_cflags"
+ fi
+
+ if test "$PHP_THREAD_SAFETY" = "yes" && test "$PHP_MYSQL" = "yes"; then
diff --git a/lang/php53/patches/patch-ac b/lang/php53/patches/patch-ac
new file mode 100644
index 00000000000..a76a602da46
--- /dev/null
+++ b/lang/php53/patches/patch-ac
@@ -0,0 +1,32 @@
+$NetBSD: patch-ac,v 1.1.1.1 2010/03/16 15:31:58 taca Exp $
+
+--- ext/gd/config.m4.orig 2009-05-27 08:18:24.000000000 +0000
++++ ext/gd/config.m4
+@@ -45,18 +45,7 @@ dnl Checks for the configure options
+ dnl
+
+ AC_DEFUN([PHP_GD_ZLIB],[
+- if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then
+- if test -f "$PHP_ZLIB_DIR/include/zlib/zlib.h"; then
+- PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
+- PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include/zlib"
+- elif test -f "$PHP_ZLIB_DIR/include/zlib.h"; then
+- PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
+- PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include"
+- else
+- AC_MSG_ERROR([Can't find zlib headers under "$PHP_ZLIB_DIR"])
+- fi
+- else
+- for i in /usr/local /usr; do
++ for i in "$PHP_ZLIB_DIR" /usr/local /usr; do
+ if test -f "$i/include/zlib/zlib.h"; then
+ PHP_ZLIB_DIR="$i"
+ PHP_ZLIB_INCDIR="$i/include/zlib"
+@@ -65,7 +54,6 @@ AC_DEFUN([PHP_GD_ZLIB],[
+ PHP_ZLIB_INCDIR="$i/include"
+ fi
+ done
+- fi
+ ])
+
+ AC_DEFUN([PHP_GD_JPEG],[
diff --git a/lang/php53/patches/patch-ad b/lang/php53/patches/patch-ad
new file mode 100644
index 00000000000..dbfacb5c872
--- /dev/null
+++ b/lang/php53/patches/patch-ad
@@ -0,0 +1,28 @@
+$NetBSD: patch-ad,v 1.1.1.1 2010/03/16 15:31:58 taca Exp $
+
+--- ext/imap/config.m4.orig 2010-02-07 13:06:54.000000000 +0000
++++ ext/imap/config.m4
+@@ -48,6 +48,14 @@ AC_DEFUN([PHP_IMAP_TEST_BUILD], [
+ ])
+ ])
+
++dsl Must be before --with-kerberos, affects the check
++PHP_ARG_WITH(imap-linkage,use IMAP c-client linkage,
++[ --with-imap-linkage Use IMAP c-client linkage to determine supported items.])
++
++if test "$PHP_IMAP_LINKAGE" != "no"; then
++ AC_DEFINE(HAVE_IMAP_LINKAGE, 1, [ ])
++fi
++
+ AC_DEFUN([PHP_IMAP_KRB_CHK], [
+ if test "$PHP_KERBEROS" != "no"; then
+ PHP_SETUP_KERBEROS(IMAP_SHARED_LIBADD,
+@@ -59,7 +67,7 @@ AC_DEFUN([PHP_IMAP_KRB_CHK], [
+ Check the path given to --with-kerberos (if no path is given, searches in /usr/kerberos, /usr/local and /usr )
+ ])
+ ])
+- else
++ elif test "$PHP_IMAP_LINKAGE" != "yes"; then
+ AC_EGREP_HEADER(auth_gss, $IMAP_INC_DIR/linkage.h, [
+ AC_MSG_ERROR([This c-client library is built with Kerberos support.
+
diff --git a/lang/php53/patches/patch-ae b/lang/php53/patches/patch-ae
new file mode 100644
index 00000000000..214dad63013
--- /dev/null
+++ b/lang/php53/patches/patch-ae
@@ -0,0 +1,25 @@
+$NetBSD: patch-ae,v 1.1.1.1 2010/03/16 15:31:58 taca Exp $
+
+--- ext/pdo/config.m4.orig 2008-07-25 13:46:24.000000000 +0000
++++ ext/pdo/config.m4
+@@ -37,20 +37,6 @@ if test "$PHP_PDO" != "no"; then
+
+ PHP_PDO_PEAR_CHECK
+
+- if test "$ext_shared" = "yes" ; then
+- case $host_alias in
+- *darwin*)
+- AC_MSG_ERROR([
+-Due to the way that loadable modules work on OSX/Darwin, you need to
+-compile the PDO package statically into the PHP core.
+-
+-Please follow the instructions at: http://netevil.org/node.php?nid=202
+-for more detail on this issue.
+- ])
+- ext_shared=no
+- ;;
+- esac
+- fi
+ PHP_NEW_EXTENSION(pdo, pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c, $ext_shared)
+ ifdef([PHP_ADD_EXTENSION_DEP],
+ [
diff --git a/lang/php53/patches/patch-af b/lang/php53/patches/patch-af
new file mode 100644
index 00000000000..71c6710c9c0
--- /dev/null
+++ b/lang/php53/patches/patch-af
@@ -0,0 +1,10 @@
+$NetBSD: patch-af,v 1.1.1.1 2010/03/16 15:31:58 taca Exp $
+
+--- ext/phar/Makefile.frag.orig 2009-07-23 15:48:04.000000000 +0000
++++ ext/phar/Makefile.frag
+@@ -44,4 +44,4 @@ install-pharcmd: pharcmd
+ -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
+ $(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir)
+ -@rm -f $(INSTALL_ROOT)$(bindir)/phar
+- $(LN_S) -f $(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar
++ $(LN_S) -f phar.phar $(INSTALL_ROOT)$(bindir)/phar
diff --git a/lang/php53/patches/patch-ag b/lang/php53/patches/patch-ag
new file mode 100644
index 00000000000..e75fc6b6b35
--- /dev/null
+++ b/lang/php53/patches/patch-ag
@@ -0,0 +1,10 @@
+$NetBSD: patch-ag,v 1.1.1.1 2010/03/16 15:31:58 taca Exp $
+
+--- ext/phar/phar/phar.php.orig 2008-08-01 13:42:56.000000000 +0000
++++ ext/phar/phar/phar.php
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/php
++#!@PREFIX@/bin/php
+ <?php
+
+ /** @file phar.php
diff --git a/lang/php53/patches/patch-ah b/lang/php53/patches/patch-ah
new file mode 100644
index 00000000000..a9d8d147324
--- /dev/null
+++ b/lang/php53/patches/patch-ah
@@ -0,0 +1,33 @@
+$NetBSD: patch-ah,v 1.1.1.1 2010/03/16 15:31:58 taca Exp $
+
+--- php.ini-development.orig 2009-11-05 13:29:34.000000000 +0000
++++ php.ini-development
+@@ -781,7 +781,7 @@ default_mimetype = "text/html"
+ ;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ ; UNIX: "/path1:/path2"
+-;include_path = ".:/php/includes"
++include_path = ".:@PREFIX@/lib/php"
+ ;
+ ; Windows: "\path1;\path2"
+ ;include_path = ".;c:\php\includes"
+@@ -802,8 +802,8 @@ doc_root =
+ ; http://php.net/user-dir
+ user_dir =
+
+-; Directory in which the loadable extensions (modules) reside.
+-; http://php.net/extension-dir
++; Directory in which the loadable extensions (modules) reside. If not
++; defined, then use the extension directory specified at compile-time.
+ ; extension_dir = "./"
+ ; On windows:
+ ; extension_dir = "ext"
+@@ -872,7 +872,7 @@ file_uploads = On
+ ; Temporary directory for HTTP uploaded files (will use system default if not
+ ; specified).
+ ; http://php.net/upload-tmp-dir
+-;upload_tmp_dir =
++upload_tmp_dir = /tmp
+
+ ; Maximum allowed size for uploaded files.
+ ; http://php.net/upload-max-filesize
diff --git a/lang/php53/patches/patch-ai b/lang/php53/patches/patch-ai
new file mode 100644
index 00000000000..5a9ad425d40
--- /dev/null
+++ b/lang/php53/patches/patch-ai
@@ -0,0 +1,33 @@
+$NetBSD: patch-ai,v 1.1.1.1 2010/03/16 15:31:58 taca Exp $
+
+--- php.ini-production.orig 2009-11-05 13:29:34.000000000 +0000
++++ php.ini-production
+@@ -781,7 +781,7 @@ default_mimetype = "text/html"
+ ;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ ; UNIX: "/path1:/path2"
+-;include_path = ".:/php/includes"
++include_path = ".:@PREFIX@/lib/php"
+ ;
+ ; Windows: "\path1;\path2"
+ ;include_path = ".;c:\php\includes"
+@@ -802,8 +802,8 @@ doc_root =
+ ; http://php.net/user-dir
+ user_dir =
+
+-; Directory in which the loadable extensions (modules) reside.
+-; http://php.net/extension-dir
++; Directory in which the loadable extensions (modules) reside. If not
++; defined, then use the extension directory specified at compile-time.
+ ; extension_dir = "./"
+ ; On windows:
+ ; extension_dir = "ext"
+@@ -872,7 +872,7 @@ file_uploads = On
+ ; Temporary directory for HTTP uploaded files (will use system default if not
+ ; specified).
+ ; http://php.net/upload-tmp-dir
+-;upload_tmp_dir =
++upload_tmp_dir = /tmp
+
+ ; Maximum allowed size for uploaded files.
+ ; http://php.net/upload-max-filesize
diff --git a/lang/php53/patches/patch-aj b/lang/php53/patches/patch-aj
new file mode 100644
index 00000000000..78e0e9d815f
--- /dev/null
+++ b/lang/php53/patches/patch-aj
@@ -0,0 +1,10 @@
+$NetBSD: patch-aj,v 1.1.1.1 2010/03/16 15:31:58 taca Exp $
+
+--- run-tests.php.orig 2010-01-03 09:23:27.000000000 +0000
++++ run-tests.php
+@@ -1,4 +1,4 @@
+-#!/usr/bin/php
++#!@PREFIX@/bin/php
+ <?php
+ /*
+ +----------------------------------------------------------------------+