Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

11
lang/php/MESSAGE.module Normal file
View File

@@ -0,0 +1,11 @@
===========================================================================
$NetBSD: MESSAGE.module,v 1.2 2004/11/05 21:50:11 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 ${PKG_PHP}-enabled HTTP server to load this module.
===========================================================================

2
lang/php/PLIST.module Normal file
View File

@@ -0,0 +1,2 @@
@comment $NetBSD: PLIST.module,v 1.1 2004/11/05 21:40:25 jdolecek Exp $
${PHP_EXTENSION_DIR}/${MODNAME}.so

24
lang/php/common.mk Normal file
View File

@@ -0,0 +1,24 @@
# $NetBSD: common.mk,v 1.1.2.2 2013/08/25 16:56:44 tron Exp $
# used by lang/php53/Makefile.common
# used by lang/php54/Makefile.common
#
.if !defined(PHPCOMMON_MK)
PHPCOMMON_MK= defined
DISTNAME?= php-${PHP_BASE_VERS}
.if !defined(PECL_VERSION)
MASTER_SITES?= http://www.php.net/distributions/ \
http://uk.php.net/distributions/ \
http://de.php.net/distributions/ \
http://us.php.net/distributions/
EXTRACT_SUFX?= .tar.bz2
.endif
HOMEPAGE?= http://www.php.net/
PLIST_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}
PKG_SYSCONFVAR?= php
.include "../../lang/php/phpversion.mk"
.endif # PHPCOMMON_MK

121
lang/php/ext.mk Normal file
View File

@@ -0,0 +1,121 @@
# $NetBSD: ext.mk,v 1.29.8.1 2013/08/25 16:56:44 tron Exp $
#
# PHP extension package framework, for both PECL and bundled PHP extensions.
#
# Just include this file, define MODNAME, define PKGREVISION if necessary,
# add dependencies, and add the appropriate --with-configure-arg, then include
# bsd.pkg.mk.
.if !defined(PHPEXT_MK)
PHPEXT_MK= defined
_VARGROUPS+= phpext
_USER_VARS.phpext= # none
_PKG_VARS.phpext= MODNAME PECL_VERSION PKGMODNAME MODULESDIR \
USE_PHP_EXT_PATCHES
_SYS_VARS.phpext= DISTINFO_FILE PATCHDIR
.if defined(PECL_VERSION)
HOMEPAGE?= http://pecl.php.net/package/${MODNAME}
.endif
.include "../../lang/php/phpversion.mk"
.if defined(PHPPKGSRCDIR)
.include "${PHPPKGSRCDIR}/Makefile.common"
.endif
PKGMODNAME?= ${MODNAME:S/-/_/}
PHPSETUPSUBDIR?= #empty
MODULESDIR?= ${WRKSRC}/modules
PLIST_SUBST+= MODNAME=${PKGMODNAME}
.if !defined(PECL_VERSION)
# bundled extension
PKGNAME?= ${PHP_PKG_PREFIX}-${MODNAME}-${PHP_BASE_VERS}
EXTRACT_ELEMENTS?= ${DISTNAME}/ext/${PKGMODNAME}
WRKSRC?= ${WRKDIR}/${EXTRACT_ELEMENTS}
DISTINFO_FILE= ${.CURDIR}/${PHPPKGSRCDIR}/distinfo
.else
# PECL extension
# WARINING: following fixed version number for PHP 5.3.x must not be bumped!
.if defined(PECL_LEGACY_VERSION_SCHEME) && ${PKG_PHP_VERSION} == "53"
PKGNAME?= ${PHP_PKG_PREFIX}-${MODNAME}-5.3.9.${PECL_VERSION}
.else
PKGNAME?= ${PHP_PKG_PREFIX}-${MODNAME}-${PECL_VERSION}
.endif
MASTER_SITES?= http://pecl.php.net/get/
PECL_DISTNAME?= ${MODNAME}-${PECL_VERSION}
DISTNAME= ${PECL_DISTNAME}
DIST_SUBDIR?= php-${MODNAME}
EXTRACT_SUFX?= .tgz
.endif
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
LIBTOOL_OVERRIDE= YES
USE_TOOLS+= automake
# Ensure we export symbols in the linked shared object.
LDFLAGS+= ${EXPORT_SYMBOLS_LDFLAGS}
MAKE_ENV+= EXPORT_SYMBOLS_LDFLAGS="${EXPORT_SYMBOLS_LDFLAGS}"
PLIST_SRC+= ${.CURDIR}/../../lang/php/PLIST.module
MESSAGE_SRC= ${.CURDIR}/../../lang/php/MESSAGE.module
MESSAGE_SUBST+= MODNAME=${PKGMODNAME}
MESSAGE_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}
# Also include extension-specific message
.if exists(${.CURDIR}/MESSAGE)
MESSAGE_SRC+= ${.CURDIR}/MESSAGE
.endif
.if ${OBJECT_FMT} == "SOM"
SHLIB_SUFFIX= sl
.else
SHLIB_SUFFIX= so
.endif
pre-configure: phpize-module
phpize-module:
@cookie=${WRKDIR}/.phpize_module_done; \
if [ ! -f $${cookie} ]; then \
cd ${WRKSRC}/${PHPSETUPSUBDIR} && \
${SETENV} \
AUTOCONF=${TOOLS_DIR:Q}/bin/autoconf \
AUTOHEADER=${TOOLS_DIR:Q}/bin/autoheader \
ACLOCAL=${TOOLS_DIR:Q}/bin/aclocal \
LIBTOOLIZE=${LOCALBASE:Q}/bin/libtoolize \
${PHPIZE} && \
${TOUCH} ${TOUCH_FLAGS} $${cookie}; \
fi
do-install: do-module-install
do-module-install:
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/${PHP_EXTENSION_DIR}
${INSTALL_LIB} ${MODULESDIR}/${PKGMODNAME}.${SHLIB_SUFFIX} \
${DESTDIR}${PREFIX}/${PHP_EXTENSION_DIR}
.if defined(USE_PHP_EXT_PATCHES)
PATCHDIR= ${.CURDIR}/${PHPPKGSRCDIR}/patches
do-patch:
${_PKG_SILENT}${_PKG_DEBUG} \
cd ${WRKSRC}; \
for p in `${EGREP} -l '^\+\+\+ ext/${MODNAME}/' ${PATCHDIR}/patch-*`;do\
${SED} -e 's,^+++ ext/${MODNAME}/,+++ ,' $$p | ${PATCH} ${PATCH_ARGS}; \
done || ${TRUE}
.endif
.if defined(PHPPKGSRCDIR)
.include "${PHPPKGSRCDIR}/buildlink3.mk"
.endif
.endif # PHPEXT_MK

72
lang/php/pear.mk Normal file
View File

@@ -0,0 +1,72 @@
# $NetBSD: pear.mk,v 1.23 2013/01/07 14:26:14 taca 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
.include "../../mk/bsd.prefs.mk"
EXTRACT_SUFX= .tgz
PKGNAME= ${PHP_PKG_PREFIX}-pear-${DISTNAME}
CATEGORIES+= www
MASTER_SITE_PEAR_PACKAGE+= \
http://download.pear.php.net/package/ \
http://pear.php.net/get/
MASTER_SITES+= ${MASTER_SITE_PEAR_PACKAGE}
DIST_SUBDIR= pear
HOMEPAGE?= http://pear.php.net/package/${DISTNAME:C/-.*//}
DEPENDS+= ${PHP_PKG_PREFIX}-pear-[0-9]*:../../lang/pear
PEAR_CMD= ${PREFIX}/bin/pear
PEAR_LIB= lib/php
.if ${_USE_DESTDIR} != "no"
PEAR_DESTDIR= -P ${DESTDIR} -f
.endif
# Dynamic PLIST, generated via a helper PHP script, which use registry.
PEAR_GENERATE_PLIST= \
${ECHO} "@comment The following lines are automatically generated"; \
${SETENV} PEAR_LIB=${PEAR_LIB:Q} WRKSRC=${WRKSRC:Q} TZ=UTC \
${INSTALL_ENV} PREFIX=${PREFIX:Q} \
${PREFIX}/bin/php -d include_path=".:${PREFIX}/lib/php" \
-d log_errors=On -d display_errors=Off \
-C -n ${PKGDIR}/../../lang/php/pear_plist.php;
GENERATE_PLIST+= ${PEAR_GENERATE_PLIST}
NO_BUILD= yes
post-extract:
@cd ${WRKSRC} && ${LN} -s ${WRKDIR}/package.xml package.xml
do-install:
cd ${WRKSRC} && ${SETENV} TZ=UTC \
${PEAR_CMD} "install" ${PEAR_DESTDIR} -n -O package.xml || exit 1
.if ${_USE_DESTDIR} != "no"
CHECK_FILES_SKIP+= ${PREFIX}/lib/php/\.channels/\.alias/.*\.txt
CHECK_FILES_SKIP+= ${PREFIX}/lib/php/\.channels/.*\.reg
CHECK_FILES_SKIP+= ${PREFIX}/lib/php/\.depdb
CHECK_FILES_SKIP+= ${PREFIX}/lib/php/\.depdblock
CHECK_FILES_SKIP+= ${PREFIX}/lib/php/\.filemap
CHECK_FILES_SKIP+= ${PREFIX}/lib/php/\.lock
.endif
.include "../../lang/php/phpversion.mk"
.include "${PHPPKGSRCDIR}/buildlink3.mk"
.endif # _PEAR_PACKAGE_MK

32
lang/php/pear_plist.php Normal file
View File

@@ -0,0 +1,32 @@
<?php
# $NetBSD: pear_plist.php,v 1.8 2010/08/29 06:08:07 obache Exp $
# Parses package XML file and outputs appropriate PLIST
include_once "PEAR/Registry.php";
include_once "PEAR/PackageFile.php";
$PREFIX = getenv('PREFIX');
$PEAR_LIB = getenv('PEAR_LIB');
$WRKSRC = getenv('WRKSRC');
if(! $DESTDIR = getenv('DESTDIR')) $DESTDIR='';
$config = &PEAR_Config::singleton();
$package = &new PEAR_PackageFile($config);
$info = $package->fromAnyFile("$WRKSRC/package.xml", PEAR_VALIDATE_INSTALLING);
$pkg = $info->getName();
$channel = $info->getChannel();
$registry = &new PEAR_Registry($DESTDIR.$PREFIX."/".$PEAR_LIB);
$flist = $registry->packageInfo($pkg, 'filelist', $channel);
$regfile = $PEAR_LIB.'/.registry/.channel.'.$channel.'/'.strtolower($pkg).'.reg';
if (!file_exists($DESTDIR.$PREFIX.'/'.$regfile)) {
$regfile = $PEAR_LIB.'/.registry/'.strtolower($pkg).'.reg';
}
echo "$regfile\n";
# output list of package files, in same order as specified in package
foreach($flist as $f) {
echo str_replace($PREFIX.'/','', $f['installed_as'])."\n";
}
?>

206
lang/php/phpversion.mk Normal file
View File

@@ -0,0 +1,206 @@
# $NetBSD: phpversion.mk,v 1.34.2.3 2013/08/25 17:26:38 tron Exp $
#
# This file selects a PHP version, based on the user's preferences and
# the installed packages. It does not add a dependency on the PHP
# package.
#
# === User-settable variables ===
#
# PHP_VERSION_DEFAULT
# The PHP version to choose when more than one is acceptable to
# the package.
#
# Possible: 53 54
# Default: 54
#
# === Infrastructure variables ===
#
# PHP_VERSION_REQD
# PHP version to use. This variable should not be set in
# packages. Normally it is used by bulk build tools.
#
# Possible: ${PHP_VERSIONS_ACCEPTED}
# Default: ${PHP_VERSION_DEFAULT}
#
# === Package-settable variables ===
#
# PHP_VERSIONS_ACCEPTED
# The PHP versions that are accepted by the package.
#
# Possible: 53 54
# Default: 54 53
#
# PHP_CHECK_INSTALLED
# Check installed version of PHP. Should be used lang/php53,
# and lang/php54 only.
#
# Possible: Yes No
# Default: Yes
#
# === Variables defined by this file ===
#
# PKG_PHP_VERSION
# The selected PHP version.
#
# Possible: 53 54
# Default: ${PHP_VERSION_DEFAULT}
#
# PHP_BASE_VERS
# The selected PHP's full version depends on PKG_PHP_VERSION
#
# PKG_PHP_MAJOR_VERS
# The selected PHP's major version.
#
# Possible: 5
# Default: 5
#
# PKG_PHP
# The same as ${PKG_PHP_VERSION}, prefixed with "php-".
#
# PHPPKGSRCDIR
# The directory of the PHP implementation, relative to the
# package directory.
#
# Example: ../../lang/php54
#
# PHP_PKG_PREFIX
# The prefix that is prepended to the package name.
#
# Example: php53, php54
#
# PHP_EXTENSION_DIR
# Relative path to ${PREFIX} for PHP's extensions. It is derived from
# initial release of major version.
#
# Example: lib/php/20090630
#
# Keywords: php
#
.if !defined(PHPVERSION_MK)
PHPVERSION_MK= defined
# Define each PHP's version.
PHP53_VERSION= 5.3.27
PHP54_VERSION= 5.4.19
# Define initial release of major version.
PHP53_RELDATE= 20090630
PHP54_RELDATE= 20120301
_VARGROUPS+= php
_USER_VARS.php= PHP_VERSION_DEFAULT
_PKG_VARS.php= PHP_VERSIONS_ACCEPTED PHP_VERSION_REQD
_SYS_VARS.php= PKG_PHP_VERSION PKG_PHP PHPPKGSRCDIR PHP_PKG_PREFIX \
PKG_PHP_MAJOR_VERS
.include "../../mk/bsd.prefs.mk"
PHP_VERSION_DEFAULT?= 54
PHP_VERSIONS_ACCEPTED?= 54 53
# transform the list into individual variables
.for pv in ${PHP_VERSIONS_ACCEPTED}
_PHP_VERSION_${pv}_OK= yes
.endfor
# check what is installed
.if exists(${LOCALBASE}/lib/php/20120301)
_PHP_VERSION_54_INSTALLED= yes
_PHP_INSTALLED= yes
.elif exists(${LOCALBASE}/lib/php/20090626) || exists(${LOCALBASE}/include/php/Zend/zend_gc.h)
_PHP_VERSION_53_INSTALLED= yes
_PHP_INSTALLED= yes
.endif
# if a version is explicitely required, take it
.if defined(PHP_VERSION_REQD)
_PHP_VERSION= ${PHP_VERSION_REQD}
.endif
# if the default is already installed, it is first choice
.if !defined(_PHP_VERSION)
.if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_OK)
.if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_INSTALLED)
_PHP_VERSION= ${PHP_VERSION_DEFAULT}
.endif
.endif
.endif
# prefer an already installed version, in order of "accepted"
.if !defined(_PHP_VERSION)
.for pv in ${PHP_VERSIONS_ACCEPTED}
.if defined(_PHP_VERSION_${pv}_INSTALLED)
_PHP_VERSION?= ${pv}
.else
# keep information as last resort - see below
_PHP_VERSION_FIRSTACCEPTED?= ${pv}
.endif
.endfor
.endif
# if the default is OK for the addon pkg, take this
.if !defined(_PHP_VERSION)
.if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_OK)
_PHP_VERSION= ${PHP_VERSION_DEFAULT}
.endif
.endif
# take the first one accepted by the package
.if !defined(_PHP_VERSION)
_PHP_VERSION= ${_PHP_VERSION_FIRSTACCEPTED}
.endif
#
# Variable assignment for multi-PHP packages
MULTI+= PHP_VERSION_REQD=${_PHP_VERSION}
# export some of internal variables
PKG_PHP_VERSION:= ${_PHP_VERSION:C/\.[0-9]//}
PKG_PHP:= php-${_PHP_VERSION:C/([0-9])([0-9])/\1.\2/}
# currently we have only PHP 5.x packages.
PKG_PHP_MAJOR_VERS:= 5
PHP_CHECK_INSTALLED?= Yes
# if installed PHP isn't compatible with required PHP, bail out
.if !empty(PHP_CHECK_INSTALLED:M[nN][oO])
.if defined(_PHP_INSTALLED) && !defined(_PHP_VERSION_${_PHP_VERSION}_INSTALLED)
PKG_SKIP_REASON+= "Package accepts ${PKG_PHP}, but different version is installed"
.endif
.endif
MESSAGE_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \
PKG_PHP=${PKG_PHP}
PLIST_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \
PKG_PHP_MAJOR_VERS=${PKG_PHP_MAJOR_VERS} \
PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}
# force the selected PHP version for recursive builds
PHP_VERSION_REQD:= ${PKG_PHP_VERSION}
#
# set variables for the version we decided to use:
#
.if ${_PHP_VERSION} == "53"
PHPPKGSRCDIR= ../../lang/php53
PHP_BASE_VERS= ${PHP53_VERSION}
PHP_PKG_PREFIX= php53
PHP_EXTENSION_DIR= lib/php/${PHP53_RELDATE}
.elif ${_PHP_VERSION} == "54"
PHPPKGSRCDIR= ../../lang/php54
PHP_BASE_VERS= ${PHP54_VERSION}
PHP_PKG_PREFIX= php54
PHP_EXTENSION_DIR= lib/php/${PHP54_RELDATE}
.else
# force an error
PKG_SKIP_REASON+= "${PKG_PHP} is not a valid package"
.endif
#
# check installed version aginst required:
#
.if !empty(PHP_CHECK_INSTALLED:M[nN][oO])
.if defined(_PHP_VERSION_INSTALLED) && ${_PHP_VERSION} != ${_PHP_VERSION_INSTALLED}
PKG_SKIP_REASON+= "${PKGBASE} requires ${PKG_PHP}, but php-${_PHP_VERSION_INSTALLED} is already installed."
.endif
.endif
.endif # PHPVERSION_MK