diff options
author | jdolecek <jdolecek@pkgsrc.org> | 2004-10-29 20:31:54 +0000 |
---|---|---|
committer | jdolecek <jdolecek@pkgsrc.org> | 2004-10-29 20:31:54 +0000 |
commit | 8b8cc033c124455d5bf9a9be10ab4d6d9a0b04dc (patch) | |
tree | a946341931337b7323c7796308a96b48ac383b85 /lang/php5 | |
parent | 174ce3bae0b37f4f61015770161f710229c9f81f (diff) | |
download | pkgsrc-8b8cc033c124455d5bf9a9be10ab4d6d9a0b04dc.tar.gz |
Import PHP 5.0.2, based on the pkgsrc-wip PHP5 package.
Some of the key features of PHP 5 include:
* The Zend Engine II with a new object model and dozens of new features.
* XML support has been completely redone in PHP 5, all extensions
are now focused around the excellent libxml2 library
(http://www.xmlsoft.org/).
* A new SimpleXML extension for easily accessing and manipulating
XML as PHP objects. It can also interface with the DOM extension
and vice-versa.
* A brand new built-in SOAP extension for interoperability with Web Services.
* A new MySQL extension named MySQLi for developers using MySQL
4.1 and later. This new extension includes an object-oriented
interface in addition to a traditional interface; as well as support
for many of MySQL's new features, such as prepared statements.
* SQLite has been bundled with PHP. For more information on SQLite,
please visit their website.
* Streams have been greatly improved, including the ability to access
low-level socket operations on streams.
Diffstat (limited to 'lang/php5')
-rw-r--r-- | lang/php5/DESCR | 5 | ||||
-rw-r--r-- | lang/php5/MESSAGE | 10 | ||||
-rw-r--r-- | lang/php5/MESSAGE.module | 11 | ||||
-rw-r--r-- | lang/php5/Makefile | 27 | ||||
-rw-r--r-- | lang/php5/Makefile.common | 58 | ||||
-rw-r--r-- | lang/php5/Makefile.module | 56 | ||||
-rw-r--r-- | lang/php5/PLIST | 269 | ||||
-rw-r--r-- | lang/php5/PLIST.module | 2 | ||||
-rw-r--r-- | lang/php5/buildlink3.mk | 20 | ||||
-rw-r--r-- | lang/php5/distinfo | 4 | ||||
-rw-r--r-- | lang/php5/pear.mk | 55 |
11 files changed, 517 insertions, 0 deletions
diff --git a/lang/php5/DESCR b/lang/php5/DESCR new file mode 100644 index 00000000000..2b28e8cc5cc --- /dev/null +++ b/lang/php5/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/php5/MESSAGE b/lang/php5/MESSAGE new file mode 100644 index 00000000000..2bef2523d55 --- /dev/null +++ b/lang/php5/MESSAGE @@ -0,0 +1,10 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1.1.1 2004/10/29 20:31:54 jdolecek Exp $ + +You must edit your "${PKG_SYSCONFDIR}/etc/php.ini" if you want +to use PEAR packages: + + register_argc_argv = On + register_globals = On + +=========================================================================== diff --git a/lang/php5/MESSAGE.module b/lang/php5/MESSAGE.module new file mode 100644 index 00000000000..a6cf472ebe2 --- /dev/null +++ b/lang/php5/MESSAGE.module @@ -0,0 +1,11 @@ +=========================================================================== +$NetBSD: MESSAGE.module,v 1.1.1.1 2004/10/29 20:31:54 jdolecek Exp $ + +To enable this module, add the following to ${PKG_SYSCONFDIR}/php.ini: + + extension=${MODNAME}.so + +and make sure extension_dir points to the dir where ${MODNAME}.so is. + +Then restart your PHP5-enabled HTTP server to load this module. +=========================================================================== diff --git a/lang/php5/Makefile b/lang/php5/Makefile new file mode 100644 index 00000000000..de4d26f3bfc --- /dev/null +++ b/lang/php5/Makefile @@ -0,0 +1,27 @@ +# $NetBSD: Makefile,v 1.1.1.1 2004/10/29 20:31:54 jdolecek Exp $ +# + +PKGNAME= php-${PHP5_VERSION} +CATEGORIES= lang + +MAINTAINER= pancake@phreaker.net +HOMEPAGE= http://www.php.net/ +COMMENT= PHP Hypertext Preprocessor version 5 + +USE_PKGINSTALL= YES +USE_BUILDLINK3= YES +USE_GNU_TOOLS+= make +LIBTOOL_OVERRIDE= # empty + +.include "Makefile.common" + +EGDIR= ${PREFIX}/share/examples/php + +CONF_FILES= ${EGDIR}/php.ini-recommended ${PKG_SYSCONFDIR}/php.ini +OWN_DIRS= ${PREFIX}/${PHP_EXTENSION_DIR} + +post-install: + @${INSTALL_DATA_DIR} ${EGDIR} + cd ${WRKSRC} && ${INSTALL_DATA} php.ini-dist php.ini-recommended ${EGDIR} + +.include "../../mk/bsd.pkg.mk" diff --git a/lang/php5/Makefile.common b/lang/php5/Makefile.common new file mode 100644 index 00000000000..a035f20b958 --- /dev/null +++ b/lang/php5/Makefile.common @@ -0,0 +1,58 @@ +# $NetBSD: Makefile.common,v 1.1.1.1 2004/10/29 20:31:54 jdolecek Exp $ +# + +DISTNAME?= php-${PHP5_VERSION} +CATEGORIES+= www +MASTER_SITES?= http://www.php.net/distributions/ \ + http://php3.de/distributions/ \ + ftp://ftp.php.net/pub/distributions/ +EXTRACT_SUFX?= .tar.bz2 +DISTINFO_FILE= ${.CURDIR}/../../wip/php5/distinfo + +MAINTAINER?= tech-pkg@NetBSD.org +HOMEPAGE?= http://www.php.net/ + +PHP5_VERSION= 5.0.2 + +BUILD_DEFS= USE_INET6 + +USE_LIBTOOL= YES +GNU_CONFIGURE= YES + +CONFIGURE_ENV+= EXTENSION_DIR="${PREFIX}/${PHP_EXTENSION_DIR}" + +PHP_EXTENSION_DIR= lib/php/20040412 +PLIST_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR} + +.include "../../mk/bsd.prefs.mk" + +CONFIGURE_ARGS+= --with-config-file-path=${PREFIX}/etc/ +CONFIGURE_ARGS+= --with-regex=system + +CONFIGURE_ARGS+= --without-mysql +CONFIGURE_ARGS+= --without-sqlite +CONFIGURE_ARGS+= --without-iconv + +CONFIGURE_ARGS+= --enable-discard-path +CONFIGURE_ARGS+= --enable-force-cgi-redirect +CONFIGURE_ARGS+= --enable-memory-limit +CONFIGURE_ARGS+= --enable-track-vars + +CONFIGURE_ARGS+= --disable-posix +CONFIGURE_ARGS+= --disable-dom + +.if defined(USE_INET6) && ${USE_INET6} == "NO" +CONFIGURE_ARGS+= --disable-ipv6 +.else +CONFIGURE_ARGS+= --enable-ipv6 +.endif + +CONFIGURE_ARGS+= --enable-xml +CONFIGURE_ARGS+= --with-libxml-dir=${PREFIX} +.include "../../textproc/libxml2/buildlink3.mk" + +BUILD_DEFS+= USE_SSL +.if defined(USE_SSL) && !empty(USE_SSL:M[Yy][Ee][Ss]) +CONFIGURE_ARGS+= --with-openssl +.include "../../security/openssl/buildlink3.mk" +.endif diff --git a/lang/php5/Makefile.module b/lang/php5/Makefile.module new file mode 100644 index 00000000000..0eb6da6d6da --- /dev/null +++ b/lang/php5/Makefile.module @@ -0,0 +1,56 @@ +# $NetBSD: Makefile.module,v 1.1.1.1 2004/10/29 20:31:54 jdolecek Exp $ + +.include "../../wip/php5/Makefile.common" + +PKGNAME?= php-${MODNAME}-${PHP5_VERSION} +PKGREVISION?= # empty + +.include "../../mk/automake.mk" + +PKGMODNAME?= ${MODNAME:S/-/_/} +MODULESDIR?= ${WRKSRC}/modules +PLIST_SUBST+= MODNAME=${PKGMODNAME} + +EXTRACT_ELEMENTS?= ${DISTNAME}/ext/${PKGMODNAME} +WRKSRC?= ${WRKDIR}/${EXTRACT_ELEMENTS} +DISTINFO_FILE?= ${PKGDIR}/../../wip/php5/distinfo + +PHPIZE?= ${BUILDLINK_PREFIX.php}/bin/phpize +PHP_CONFIG?= ${BUILDLINK_PREFIX.php}/bin/php-config + +GNU_CONFIGURE= YES +CONFIGURE_ARGS+= --with-php-config=${PHP_CONFIG} + +USE_CONFIG_WRAPPER= YES +USE_LIBTOOL= YES + +# Ensure we export symbols in the linked shared object. +LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS} +MAKE_ENV+= EXPORT_SYMBOLS_LDFLAGS="${EXPORT_SYMBOLS_LDFLAGS}" + +PLIST_SRC= ${.CURDIR}/../../wip/php5/PLIST.module +MESSAGE_SRC= ${.CURDIR}/../../wip/php5/MESSAGE.module +MESSAGE_SUBST+= MODNAME=${PKGMODNAME} +MESSAGE_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR} + +pre-configure: phpize-module + +phpize-module: + @cookie=${WRKDIR}/.phpize_module_done; \ + if [ ! -f $${cookie} ]; then \ + cd ${WRKSRC} && \ + ${SETENV} AUTOCONF=${AUTOCONF} AUTOHEADER=${AUTOHEADER} \ + ACLOCAL=${ACLOCAL} \ + LIBTOOLIZE=${LOCALBASE}/bin/libtoolize \ + ${PHPIZE} && \ + ${TOUCH} ${TOUCH_FLAGS} $${cookie}; \ + fi + +do-install: do-module-install + +do-module-install: + ${INSTALL_DATA_DIR} ${PREFIX}/${PHP_EXTENSION_DIR} + ${INSTALL_DATA} ${MODULESDIR}/${PKGMODNAME}.so \ + ${PREFIX}/${PHP_EXTENSION_DIR} + +.include "../../wip/php5/buildlink3.mk" diff --git a/lang/php5/PLIST b/lang/php5/PLIST new file mode 100644 index 00000000000..6c46ce32ab6 --- /dev/null +++ b/lang/php5/PLIST @@ -0,0 +1,269 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2004/10/29 20:31:54 jdolecek Exp $ +bin/pear +bin/php +bin/php-config +bin/phpextdist +bin/phpize +etc/pear.conf +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.nw.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/FlexLexer.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_builtin_functions.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_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_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_list.h +include/php/Zend/zend_llist.h +include/php/Zend/zend_mm.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_reflection_api.h +include/php/Zend/zend_stack.h +include/php/Zend/zend_static_allocator.h +include/php/Zend/zend_stream.h +include/php/Zend/zend_ts_hash.h +include/php/Zend/zend_types.h +include/php/Zend/zend_variables.h +include/php/acconfig.h +include/php/ext/libxml/php_libxml.h +include/php/ext/mbstring/mb_gpc.h +include/php/ext/mbstring/mbstring.h +include/php/ext/mbstring/php_mbregex.h +include/php/ext/mbstring/php_unicode.h +include/php/ext/mbstring/unicode_data.h +include/php/ext/session/mod_files.h +include/php/ext/session/mod_mm.h +include/php/ext/session/mod_user.h +include/php/ext/session/php_session.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/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/dns.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/parsedate.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_dir.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_parsedate.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_sunfuncs.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/reg.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.h +include/php/ext/standard/url_scanner_ex.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/config.nw.h +include/php/main/config.w32.h +include/php/main/fopen_wrappers.h +include/php/main/internal_functions_registry.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_embed.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_regex.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_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 +include/php/main/win95nt.h +include/php/regex/cclass.h +include/php/regex/cname.h +include/php/regex/regex.h +include/php/regex/regex2.h +include/php/regex/regex_extra.h +include/php/regex/utils.h +lib/php/.filemap +lib/php/.lock +lib/php/.registry/archive_tar.reg +lib/php/.registry/console_getopt.reg +lib/php/.registry/pear.reg +lib/php/.registry/xml_rpc.reg +lib/php/Archive/Tar.php +lib/php/Console/Getopt.php +lib/php/OS/Guess.php +lib/php/PEAR.php +lib/php/PEAR/Autoloader.php +lib/php/PEAR/Builder.php +lib/php/PEAR/Command.php +lib/php/PEAR/Command/Auth.php +lib/php/PEAR/Command/Build.php +lib/php/PEAR/Command/Common.php +lib/php/PEAR/Command/Config.php +lib/php/PEAR/Command/Install.php +lib/php/PEAR/Command/Mirror.php +lib/php/PEAR/Command/Package.php +lib/php/PEAR/Command/Registry.php +lib/php/PEAR/Command/Remote.php +lib/php/PEAR/Common.php +lib/php/PEAR/Config.php +lib/php/PEAR/Dependency.php +lib/php/PEAR/Downloader.php +lib/php/PEAR/ErrorStack.php +lib/php/PEAR/Frontend/CLI.php +lib/php/PEAR/Installer.php +lib/php/PEAR/Packager.php +lib/php/PEAR/Registry.php +lib/php/PEAR/Remote.php +lib/php/System.php +lib/php/XML/RPC.php +lib/php/XML/RPC/Server.php +lib/php/build/Makefile.global +lib/php/build/acinclude.m4 +lib/php/build/mkdep.awk +lib/php/build/phpize.m4 +lib/php/build/scan_makefile_in.awk +lib/php/build/shtool +lib/php/data/PEAR/package.dtd +lib/php/data/PEAR/template.spec +lib/php/doc/Archive_Tar/docs/Archive_Tar.txt +lib/php/pearcmd.php +share/examples/php/php.ini-dist +share/examples/php/php.ini-recommended +@dirrm share/examples/php +@dirrm lib/php/doc/Archive_Tar/docs +@dirrm lib/php/doc/Archive_Tar +@dirrm lib/php/doc +@dirrm lib/php/data/PEAR +@dirrm lib/php/data +@dirrm lib/php/build +@dirrm lib/php/XML/RPC +@dirrm lib/php/XML +@dirrm lib/php/PEAR/Frontend +@dirrm lib/php/PEAR/Command +@dirrm lib/php/PEAR +@dirrm lib/php/OS +@dirrm lib/php/Console +@dirrm lib/php/Archive +@dirrm lib/php/.registry +@dirrm include/php/regex +@dirrm include/php/main/streams +@dirrm include/php/main +@exec ${MKDIR} %D/include/php/ext/xml/expat +@dirrm include/php/ext/xml/expat +@dirrm include/php/ext/xml +@dirrm include/php/ext/standard +@dirrm include/php/ext/session +@dirrm include/php/ext/sqlite/libsqlite/src +@dirrm include/php/ext/sqlite/libsqlite +@dirrm include/php/ext/sqlite +@dirrm include/php/ext/mbstring +@dirrm include/php/ext/libxml +@dirrm include/php/ext +@dirrm include/php/Zend +@dirrm include/php/TSRM +@dirrm include/php diff --git a/lang/php5/PLIST.module b/lang/php5/PLIST.module new file mode 100644 index 00000000000..a2dfad3c02f --- /dev/null +++ b/lang/php5/PLIST.module @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST.module,v 1.1.1.1 2004/10/29 20:31:54 jdolecek Exp $ +${PHP_EXTENSION_DIR}/${MODNAME}.so diff --git a/lang/php5/buildlink3.mk b/lang/php5/buildlink3.mk new file mode 100644 index 00000000000..e971b2972ad --- /dev/null +++ b/lang/php5/buildlink3.mk @@ -0,0 +1,20 @@ +# $NetBSD: buildlink3.mk,v 1.1.1.1 2004/10/29 20:31:54 jdolecek Exp $ + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ +PHP_BUILDLINK3_MK:= ${PHP_BUILDLINK3_MK}+ + +.if !empty(BUILDLINK_DEPTH:M+) +BUILDLINK_DEPENDS+= php +.endif + +BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nphp} +BUILDLINK_PACKAGES+= php + +.if !empty(PHP_BUILDLINK3_MK:M+) +BUILDLINK_DEPENDS.php+= php-5.0.* +BUILDLINK_PKGSRCDIR.php?= ../../wip/php5 +.endif # PHP_BUILDLINK3_MK + +.include "../../textproc/libxml2/buildlink3.mk" + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} diff --git a/lang/php5/distinfo b/lang/php5/distinfo new file mode 100644 index 00000000000..fa9ad7884a4 --- /dev/null +++ b/lang/php5/distinfo @@ -0,0 +1,4 @@ +$NetBSD: distinfo,v 1.1.1.1 2004/10/29 20:31:54 jdolecek Exp $ + +SHA1 (php-5.0.2.tar.bz2) = 85e4635ce764199d60329a578421159f338be082 +Size (php-5.0.2.tar.bz2) = 4577974 bytes diff --git a/lang/php5/pear.mk b/lang/php5/pear.mk new file mode 100644 index 00000000000..4c26927d5f8 --- /dev/null +++ b/lang/php5/pear.mk @@ -0,0 +1,55 @@ +# $NetBSD: pear.mk,v 1.1.1.1 2004/10/29 20:31:54 jdolecek Exp $ +# +# This Makefile fragment is intended to be included by packages that build +# and install pear packages. +# +# If you don't know what pear is, you can visit: http://pear.php.net/ +# +# PEAR_CMD this is the actual script to execute to install the +# package. +# +# PEAR_LIB directory under ${PREFIX} where Pear modules are installed +# + +.if !defined(_PEAR_PACKAGE_MK) +_PEAR_PACKAGE_MK= # defined + +USE_BUILDLINK3= YES +BUILDLINK_DEPMETHOD.php5= full + +.include "../../wip/php5/buildlink3.mk" + +EXTRACT_SUFX= .tgz + +PKGNAME= pear-${DISTNAME} +CATEGORIES+= www + +MASTER_SITE_PEAR_PACKAGE+= \ + http://pear.php.net/get/ +MASTER_SITES+= ${MASTER_SITE_PEAR_PACKAGE} + +PEAR_CMD= ${PREFIX}/bin/pear +PEAR_LIB= lib/php + +_PEAR_PKG= ${DISTNAME:C/-.*//:tl} + +# Dynamic PLIST +# The package.xml 'parsing' is a bit crude, but enough for now. Eventually +# should write a small PHP script for this, using real XML parser. +PEAR_GENERATE_PLIST= \ + ${ECHO} "@comment The following lines are automatically generated"; \ + ${ECHO} "${PEAR_LIB}/.registry/${_PEAR_PKG}.reg"; \ + ${FGREP} '<file role="php"' ${WRKDIR}/package.xml | ${SED} -e 's,.*<file role="php",<,' -e 's,<.*baseinstalldir="\([^"]*\)",\1/<,' -e 's,<.* name=",,' -e 's,".*,,' -e "s,^/*,${PEAR_LIB}/,"; \ + ${FGREP} '<file role="php"' ${WRKDIR}/package.xml | ${SED} -e 's,.*<file role="php",<,' -e 's,<.*baseinstalldir="\([^"]*\)",\1/<,' -e 's,<.* name=",,' -e 's,".*,,' -e 's,//*,/,g' -e 's,/[^/]*$$,,' | ${FGREP} '/' | ${SORT} -ru | ${SED} -e "s,^,@dirrm ${PEAR_LIB}/,"; +GENERATE_PLIST+= ${PEAR_GENERATE_PLIST} + +NO_BUILD= # defined + +post-extract: + @cd ${WRKSRC} && ${LN} -s ${WRKDIR}/package.xml + cd ${WRKSRC} && ${PEAR_CMD} package-validate package.xml + +do-install: + cd ${WRKSRC} && ${PEAR_CMD} install package.xml + +.endif # _PEAR_PACKAGE_MK |