parent
4d4d20b669
commit
9d9c751e0a
@ -0,0 +1,802 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.4.37.ebuild,v 1.1 2015/01/23 09:18:48 olemarkus Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
function php_get_uri ()
|
||||
{
|
||||
case "${1}" in
|
||||
"php-pre")
|
||||
echo "http://downloads.php.net/stas/${2}"
|
||||
;;
|
||||
"php")
|
||||
echo "http://www.php.net/distributions/${2}"
|
||||
;;
|
||||
"olemarkus")
|
||||
echo "http://dev.gentoo.org/~olemarkus/php/${2}"
|
||||
;;
|
||||
"gentoo")
|
||||
echo "mirror://gentoo/${2}"
|
||||
;;
|
||||
*)
|
||||
die "unhandled case in php_get_uri"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
PHP_MV="$(get_major_version)"
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# alias, so we can handle different types of releases (finals, rcs, alphas,
|
||||
# betas, ...) w/o changing the whole ebuild
|
||||
PHP_PV="${PV/_rc/RC}"
|
||||
PHP_PV="${PHP_PV/_alpha/alpha}"
|
||||
PHP_PV="${PHP_PV/_beta/beta}"
|
||||
PHP_RELEASE="php"
|
||||
[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
|
||||
PHP_P="${PN}-${PHP_PV}"
|
||||
|
||||
PHP_PATCHSET_LOC="olemarkus"
|
||||
|
||||
PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
|
||||
|
||||
PHP_PATCHSET="2"
|
||||
PHP_PATCHSET_URI="
|
||||
$(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${SLOT}-r${PHP_PATCHSET}.tar.bz2")"
|
||||
|
||||
PHP_FPM_INIT_VER="4"
|
||||
PHP_FPM_CONF_VER="1"
|
||||
|
||||
SRC_URI="
|
||||
${PHP_SRC_URI}
|
||||
${PHP_PATCHSET_URI}"
|
||||
|
||||
DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
|
||||
HOMEPAGE="http://php.net/"
|
||||
LICENSE="PHP-3"
|
||||
|
||||
S="${WORKDIR}/${PHP_P}"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
|
||||
crypt +ctype curl curlwrappers debug
|
||||
enchant exif +fileinfo +filter firebird
|
||||
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
||||
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
|
||||
mssql mysql mysqlnd mysqli nls
|
||||
oci8-instant-client odbc pcntl pdo +phar +posix postgres qdbm
|
||||
readline recode selinux +session sharedmem
|
||||
+simplexml snmp soap sockets spell sqlite ssl
|
||||
sybase-ct sysvipc systemd tidy +tokenizer truetype unicode wddx
|
||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
|
||||
|
||||
DEPEND="
|
||||
>=app-admin/eselect-php-0.7.1-r3[apache2?,fpm?]
|
||||
>=dev-libs/libpcre-8.32[unicode]
|
||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
||||
<www-servers/apache-2.4[threads=] ) )
|
||||
berkdb? ( =sys-libs/db-4* )
|
||||
bzip2? ( app-arch/bzip2 )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
cjk? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
crypt? ( >=dev-libs/libmcrypt-2.4 )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( app-text/enchant )
|
||||
exif? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
firebird? ( dev-db/firebird )
|
||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.0 )
|
||||
gmp? ( >=dev-libs/gmp-4.1.2 )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[ssl=] )
|
||||
intl? ( dev-libs/icu:= )
|
||||
iodbc? ( dev-db/libiodbc )
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( >=net-nds/openldap-1.2.11 )
|
||||
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
|
||||
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
|
||||
mssql? ( dev-db/freetds[mssql] )
|
||||
!mysqlnd? (
|
||||
mysql? ( virtual/mysql )
|
||||
mysqli? ( >=virtual/mysql-4.1 )
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
|
||||
odbc? ( >=dev-db/unixODBC-1.8.13 )
|
||||
postgres? ( dev-db/postgresql )
|
||||
qdbm? ( dev-db/qdbm )
|
||||
readline? ( sys-libs/readline )
|
||||
recode? ( app-text/recode )
|
||||
sharedmem? ( dev-libs/mm )
|
||||
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
||||
soap? ( >=dev-libs/libxml2-2.6.8 )
|
||||
spell? ( >=app-text/aspell-0.50 )
|
||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
||||
ssl? ( >=dev-libs/openssl-0.9.7 )
|
||||
sybase-ct? ( dev-db/freetds )
|
||||
tidy? ( app-text/htmltidy )
|
||||
truetype? (
|
||||
=media-libs/freetype-2*
|
||||
>=media-libs/t1lib-5.0.0
|
||||
!gd? (
|
||||
virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
)
|
||||
unicode? ( dev-libs/oniguruma )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
|
||||
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xpm? (
|
||||
x11-libs/libXpm
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0= sys-libs/zlib
|
||||
)
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( sys-libs/zlib )
|
||||
zlib? ( sys-libs/zlib )
|
||||
virtual/mta
|
||||
"
|
||||
|
||||
php="=${CATEGORY}/${PF}"
|
||||
|
||||
REQUIRED_USE="
|
||||
truetype? ( gd )
|
||||
cjk? ( gd )
|
||||
exif? ( gd )
|
||||
|
||||
xpm? ( gd )
|
||||
gd? ( zlib )
|
||||
simplexml? ( xml )
|
||||
soap? ( xml )
|
||||
wddx? ( xml )
|
||||
xmlrpc? ( || ( xml iconv ) )
|
||||
xmlreader? ( xml )
|
||||
xslt? ( xml )
|
||||
ldap-sasl? ( ldap )
|
||||
mhash? ( hash )
|
||||
phar? ( hash )
|
||||
mysqlnd? ( || (
|
||||
mysql
|
||||
mysqli
|
||||
pdo
|
||||
) )
|
||||
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
recode? ( !imap !mysql !mysqli )
|
||||
sharedmem? ( !threads )
|
||||
|
||||
!cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
DEPEND="${DEPEND}
|
||||
sys-devel/flex
|
||||
>=sys-devel/m4-1.4.3
|
||||
>=sys-devel/libtool-1.5.18"
|
||||
|
||||
# Allow users to install production version if they want to
|
||||
|
||||
case "${PHP_INI_VERSION}" in
|
||||
production|development)
|
||||
;;
|
||||
*)
|
||||
PHP_INI_VERSION="development"
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
|
||||
PHP_INI_FILE="php.ini"
|
||||
|
||||
want_apache
|
||||
|
||||
pkg_setup() {
|
||||
depend.apache_pkg_setup
|
||||
}
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
|
||||
cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
|
||||
|
||||
# default to /tmp for save_path, bug #282768
|
||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
|
||||
|
||||
# Set the extension dir
|
||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
|
||||
|
||||
# Set the include path to point to where we want to find PEAR packages
|
||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}"
|
||||
|
||||
if use_if_iuse opcache; then
|
||||
elog "Adding opcache to ${phpinisrc}"
|
||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> ${phpinisrc}
|
||||
fi
|
||||
|
||||
dodir "${PHP_INI_DIR#${EPREFIX}}"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${phpinisrc}" "${PHP_INI_FILE}"
|
||||
|
||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
||||
elog
|
||||
|
||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
||||
|
||||
# SAPI-specific handling
|
||||
|
||||
if [[ "${sapi}" == "fpm" ]] ; then
|
||||
[[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
|
||||
einfo "Installing FPM CGI config file php-fpm.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
|
||||
|
||||
# Remove bogus /etc/php-fpm.conf.default (bug 359906)
|
||||
[[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
|
||||
fi
|
||||
|
||||
# Install PHP ini files into /usr/share/php
|
||||
|
||||
dodoc php.ini-development
|
||||
dodoc php.ini-production
|
||||
|
||||
}
|
||||
|
||||
php_set_ini_dir() {
|
||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
|
||||
# ([empty session.save_path]/session_mm_[sapi][gid].sem)
|
||||
# there is no easy way to circumvent that, all php calls during
|
||||
# install use -n, so no php.ini file will be used.
|
||||
# As such, this is the easiest way to get around
|
||||
addpredict /session_mm_cli250.sem
|
||||
addpredict /session_mm_cli0.sem
|
||||
|
||||
# Change PHP branding
|
||||
# Get the alpha/beta/rc version
|
||||
sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \
|
||||
-i configure.in || die "Unable to change PHP branding"
|
||||
|
||||
# Patch PHP to show Gentoo as the server platform
|
||||
sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
|
||||
-i configure.in || die "Failed to fix server platform name"
|
||||
|
||||
# Prevent PHP from activating the Apache config,
|
||||
# as we will do that ourselves
|
||||
sed -i \
|
||||
-e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
-e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4
|
||||
|
||||
# Patch PHP to support heimdal instead of mit-krb5
|
||||
if has_version "app-crypt/heimdal" ; then
|
||||
sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal libname"
|
||||
sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal crypt library reference"
|
||||
fi
|
||||
|
||||
#Add user patches #357637
|
||||
epatch_user
|
||||
|
||||
#force rebuilding aclocal.m4
|
||||
rm aclocal.m4
|
||||
eautoreconf
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# http://bugs.php.net/bug.php?id=48795, bug #343481
|
||||
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
||||
|
||||
# This is a global variable and should be in caps. It isn't because the
|
||||
# phpconfutils eclass relies on exactly this name...
|
||||
# for --with-libdir see bug #327025
|
||||
my_conf="
|
||||
--prefix="${PHP_DESTDIR}"
|
||||
--mandir="${PHP_DESTDIR}"/man
|
||||
--infodir="${PHP_DESTDIR}"/info
|
||||
--libdir="${PHP_DESTDIR}"/lib
|
||||
--with-libdir=$(get_libdir)
|
||||
--without-pear
|
||||
$(use_enable threads maintainer-zts)"
|
||||
|
||||
# extension USE flag shared
|
||||
my_conf+="
|
||||
$(use_enable bcmath bcmath )
|
||||
$(use_with bzip2 bz2 "${EPREFIX}"/usr)
|
||||
$(use_enable calendar calendar )
|
||||
$(use_enable ctype ctype )
|
||||
$(use_with curl curl "${EPREFIX}"/usr)
|
||||
$(use_with curlwrappers curlwrappers "${EPREFIX}"/usr)
|
||||
$(use_enable xml dom )
|
||||
$(use_with enchant enchant "${EPREFIX}"/usr)
|
||||
$(use_enable exif exif )
|
||||
$(use_enable fileinfo fileinfo )
|
||||
$(use_enable filter filter )
|
||||
$(use_enable ftp ftp )
|
||||
$(use_with nls gettext "${EPREFIX}"/usr)
|
||||
$(use_with gmp gmp "${EPREFIX}"/usr)
|
||||
$(use_enable hash hash )
|
||||
$(use_with mhash mhash "${EPREFIX}"/usr)
|
||||
$(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
|
||||
$(use_enable intl intl )
|
||||
$(use_enable ipv6 ipv6 )
|
||||
$(use_enable json json )
|
||||
$(use_with kerberos kerberos "${EPREFIX}"/usr)
|
||||
$(use_enable xml libxml )
|
||||
$(use_with xml libxml-dir "${EPREFIX}"/usr)
|
||||
$(use_enable unicode mbstring )
|
||||
$(use_with crypt mcrypt "${EPREFIX}"/usr)
|
||||
$(use_with mssql mssql "${EPREFIX}"/usr)
|
||||
$(use_with unicode onig "${EPREFIX}"/usr)
|
||||
$(use_with ssl openssl "${EPREFIX}"/usr)
|
||||
$(use_with ssl openssl-dir "${EPREFIX}"/usr)
|
||||
$(use_enable pcntl pcntl )
|
||||
$(use_enable phar phar )
|
||||
$(use_enable pdo pdo )
|
||||
$(use_with postgres pgsql "${EPREFIX}"/usr)
|
||||
$(use_enable posix posix )
|
||||
$(use_with spell pspell "${EPREFIX}"/usr)
|
||||
$(use_with recode recode "${EPREFIX}"/usr)
|
||||
$(use_enable simplexml simplexml )
|
||||
$(use_enable sharedmem shmop )
|
||||
$(use_with snmp snmp "${EPREFIX}"/usr)
|
||||
$(use_enable soap soap )
|
||||
$(use_enable sockets sockets )
|
||||
$(use_with sqlite sqlite3 "${EPREFIX}"/usr)
|
||||
$(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
|
||||
$(use_enable sysvipc sysvmsg )
|
||||
$(use_enable sysvipc sysvsem )
|
||||
$(use_enable sysvipc sysvshm )
|
||||
$(use_with systemd fpm-systemd)
|
||||
$(use_with tidy tidy "${EPREFIX}"/usr)
|
||||
$(use_enable tokenizer tokenizer )
|
||||
$(use_enable wddx wddx )
|
||||
$(use_enable xml xml )
|
||||
$(use_enable xmlreader xmlreader )
|
||||
$(use_enable xmlwriter xmlwriter )
|
||||
$(use_with xmlrpc xmlrpc)
|
||||
$(use_with xslt xsl "${EPREFIX}"/usr)
|
||||
$(use_enable zip zip )
|
||||
$(use_with zlib zlib "${EPREFIX}"/usr)
|
||||
$(use_enable debug debug )"
|
||||
|
||||
# DBA support
|
||||
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
||||
|| use qdbm ; then
|
||||
my_conf="${my_conf} --enable-dba${shared}"
|
||||
fi
|
||||
|
||||
# DBA drivers support
|
||||
my_conf+="
|
||||
$(use_with cdb cdb)
|
||||
$(use_with berkdb db4 ${EPREFIX}/usr)
|
||||
$(use_enable flatfile flatfile )
|
||||
$(use_with gdbm gdbm ${EPREFIX}/usr)
|
||||
$(use_enable inifile inifile )
|
||||
$(use_with qdbm qdbm ${EPREFIX}/usr)"
|
||||
|
||||
# Support for the GD graphics library
|
||||
my_conf+="
|
||||
$(use_with truetype freetype-dir ${EPREFIX}/usr)
|
||||
$(use_with truetype t1lib ${EPREFIX}/usr)
|
||||
$(use_enable cjk gd-jis-conv )
|
||||
$(use_with gd jpeg-dir ${EPREFIX}/usr)
|
||||
$(use_with gd png-dir ${EPREFIX}/usr)
|
||||
$(use_with xpm xpm-dir ${EPREFIX}/usr)"
|
||||
# enable gd last, so configure can pick up the previous settings
|
||||
my_conf+="
|
||||
$(use_with gd gd)"
|
||||
|
||||
# IMAP support
|
||||
if use imap ; then
|
||||
my_conf+="
|
||||
$(use_with imap imap ${EPREFIX}/usr)
|
||||
$(use_with ssl imap-ssl ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# Interbase/firebird support
|
||||
|
||||
if use firebird ; then
|
||||
my_conf+="
|
||||
$(use_with firebird interbase ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# LDAP support
|
||||
if use ldap ; then
|
||||
my_conf+="
|
||||
$(use_with ldap ldap ${EPREFIX}/usr)
|
||||
$(use_with ldap-sasl ldap-sasl ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# MySQL support
|
||||
if use mysql ; then
|
||||
if use mysqlnd ; then
|
||||
my_conf+="
|
||||
$(use_with mysql mysql mysqlnd)"
|
||||
else
|
||||
my_conf+="
|
||||
$(use_with mysql mysql ${EPREFIX}/usr)"
|
||||
fi
|
||||
my_conf+="
|
||||
$(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
|
||||
fi
|
||||
|
||||
# MySQLi support
|
||||
if use mysqlnd ; then
|
||||
my_conf+="
|
||||
$(use_with mysqli mysqli mysqlnd)"
|
||||
else
|
||||
my_conf+="
|
||||
$(use_with mysqli mysqli ${EPREFIX}/usr/bin/mysql_config)"
|
||||
fi
|
||||
|
||||
# ODBC support
|
||||
if use odbc ; then
|
||||
my_conf+="
|
||||
$(use_with odbc unixODBC ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
if use iodbc ; then
|
||||
my_conf+="
|
||||
$(use_with iodbc iodbc ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# Oracle support
|
||||
if use oci8-instant-client ; then
|
||||
my_conf+="
|
||||
$(use_with oci8-instant-client oci8)"
|
||||
fi
|
||||
|
||||
# PDO support
|
||||
if use pdo ; then
|
||||
my_conf+="
|
||||
$(use_with mssql pdo-dblib )"
|
||||
if use mysqlnd ; then
|
||||
my_conf+="
|
||||
$(use_with mysqlnd pdo-mysql mysqlnd)"
|
||||
else
|
||||
my_conf+="
|
||||
$(use_with mysql pdo-mysql ${EPREFIX}/usr)"
|
||||
fi
|
||||
my_conf+="
|
||||
$(use_with postgres pdo-pgsql )
|
||||
$(use_with sqlite pdo-sqlite ${EPREFIX}/usr)
|
||||
$(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
|
||||
if use oci8-instant-client ; then
|
||||
my_conf+="
|
||||
$(use_with oci8-instant-client pdo-oci)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# readline/libedit support
|
||||
my_conf+="
|
||||
$(use_with readline readline ${EPREFIX}/usr)
|
||||
$(use_with libedit libedit ${EPREFIX}/usr)"
|
||||
|
||||
# Session support
|
||||
if use session ; then
|
||||
my_conf+="
|
||||
$(use_with sharedmem mm ${EPREFIX}/usr)"
|
||||
else
|
||||
my_conf+="
|
||||
$(use_enable session session )"
|
||||
fi
|
||||
|
||||
# Use pic for shared modules such as apache2's mod_php
|
||||
my_conf="${my_conf} --with-pic"
|
||||
|
||||
# we use the system copy of pcre
|
||||
# --with-pcre-regex affects ext/pcre
|
||||
# --with-pcre-dir affects ext/filter and ext/zip
|
||||
my_conf="${my_conf} --with-pcre-regex=${EPREFIX}/usr --with-pcre-dir=${EPREFIX}/usr"
|
||||
|
||||
# Catch CFLAGS problems
|
||||
# Fixes bug #14067.
|
||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
||||
replace-cpu-flags "k6*" "i586"
|
||||
|
||||
# Support user-passed configuration parameters
|
||||
my_conf="${my_conf} ${EXTRA_ECONF:-}"
|
||||
|
||||
# Support the Apache2 extras, they must be set globally for all
|
||||
# SAPIs to work correctly, especially for external PHP extensions
|
||||
|
||||
mkdir -p "${WORKDIR}/sapis-build"
|
||||
for one_sapi in $SAPIS ; do
|
||||
use "${one_sapi}" || continue
|
||||
php_set_ini_dir "${one_sapi}"
|
||||
|
||||
cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${one_sapi}"
|
||||
|
||||
sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}
|
||||
--with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}"
|
||||
|
||||
for sapi in $SAPIS ; do
|
||||
case "$sapi" in
|
||||
cli|cgi|embed|fpm)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf="${sapi_conf} --enable-${sapi}"
|
||||
else
|
||||
sapi_conf="${sapi_conf} --disable-${sapi}"
|
||||
fi
|
||||
;;
|
||||
|
||||
apache2)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
|
||||
else
|
||||
sapi_conf="${sapi_conf} --without-apxs2"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
econf ${sapi_conf}
|
||||
done
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# snmp seems to run during src_compile, too (bug #324739)
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
for sapi in ${SAPIS} ; do
|
||||
if use "${sapi}"; then
|
||||
cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
||||
emake || die "emake failed"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# see bug #324739 for what happens when we don't have that
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
|
||||
# grab the first SAPI that got built and install common files from there
|
||||
local first_sapi=""
|
||||
for sapi in $SAPIS ; do
|
||||
if use $sapi ; then
|
||||
first_sapi=$sapi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Makefile forgets to create this before trying to write to it...
|
||||
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
|
||||
|
||||
# Install php environment (without any sapis)
|
||||
cd "${WORKDIR}/sapis-build/$first_sapi"
|
||||
emake INSTALL_ROOT="${D}" \
|
||||
install-build install-headers install-programs \
|
||||
|| die "emake install failed"
|
||||
|
||||
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
|
||||
|
||||
# Create the directory where we'll put version-specific php scripts
|
||||
keepdir /usr/share/php${PHP_MV}
|
||||
|
||||
local sapi="", file=""
|
||||
local sapi_list=""
|
||||
|
||||
for sapi in ${SAPIS}; do
|
||||
if use "${sapi}" ; then
|
||||
einfo "Installing SAPI: ${sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${sapi}"
|
||||
|
||||
if [[ "${sapi}" == "apache2" ]] ; then
|
||||
# We're specifically not using emake install-sapi as libtool
|
||||
# may cause unnecessary relink failures (see bug #351266)
|
||||
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
|
||||
newins ".libs/libphp5$(get_libname)" "libphp${PHP_MV}$(get_libname)"
|
||||
keepdir "/usr/$(get_libdir)/apache2/modules"
|
||||
else
|
||||
# needed each time, php_install_ini would reset it
|
||||
local dest="${PHP_DESTDIR#${EPREFIX}}"
|
||||
into "${dest}"
|
||||
case "$sapi" in
|
||||
cli)
|
||||
source="sapi/cli/php"
|
||||
;;
|
||||
cgi)
|
||||
source="sapi/cgi/php-cgi"
|
||||
;;
|
||||
fpm)
|
||||
source="sapi/fpm/php-fpm"
|
||||
;;
|
||||
embed)
|
||||
source="libs/libphp${PHP_MV}$(get_libname)"
|
||||
;;
|
||||
*)
|
||||
die "unhandled sapi in src_install"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
||||
dolib.so "${source}" || die "Unable to install ${sapi} sapi"
|
||||
else
|
||||
dobin "${source}" || die "Unable to install ${sapi} sapi"
|
||||
local name="$(basename ${source})"
|
||||
dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
|
||||
fi
|
||||
fi
|
||||
|
||||
php_install_ini "${sapi}"
|
||||
|
||||
# construct correct SAPI string for php-config
|
||||
# thanks to ferringb for the bash voodoo
|
||||
if [[ "${sapi}" == "apache2" ]]; then
|
||||
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
|
||||
else
|
||||
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Installing opcache module
|
||||
if use_if_iuse opcache ; then
|
||||
dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
|
||||
fi
|
||||
|
||||
# Install env.d files
|
||||
newenvd "${FILESDIR}/20php5-envd" \
|
||||
"20php${SLOT}"
|
||||
sed -e "s|/lib/|/$(get_libdir)/|g" -i \
|
||||
"${ED}/etc/env.d/20php${SLOT}"
|
||||
sed -e "s|php5|php${SLOT}|g" -i \
|
||||
"${ED}/etc/env.d/20php${SLOT}"
|
||||
|
||||
# set php-config variable correctly (bug #278439)
|
||||
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
|
||||
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config"
|
||||
|
||||
if use fpm ; then
|
||||
if use systemd; then
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at.service" "php-fpm@${SLOT}.service"
|
||||
else
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" "php-fpm@${SLOT}.service"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
||||
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
|
||||
if [[ ! -x "${PHP_BIN}" ]] ; then
|
||||
ewarn "Test phase requires USE=cli, skipping"
|
||||
return
|
||||
else
|
||||
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then
|
||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi"
|
||||
fi
|
||||
|
||||
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d "session.save_path=${T}" \
|
||||
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d "session.save_path=${T}"
|
||||
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
mv "${name}.out" "${name}.out.orig" 2>/dev/null
|
||||
done
|
||||
|
||||
local failed="$(find -name '*.out')"
|
||||
if [[ ${failed} != "" ]] ; then
|
||||
ewarn "The following test cases failed unexpectedly:"
|
||||
for name in ${failed}; do
|
||||
ewarn " ${name/.out/}"
|
||||
done
|
||||
else
|
||||
einfo "No unexpected test failures, all fine"
|
||||
fi
|
||||
|
||||
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
|
||||
local passed=""
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
[[ -f "${name}.diff" ]] && continue
|
||||
passed="${passed} ${name}"
|
||||
done
|
||||
if [[ ${passed} != "" ]] ; then
|
||||
einfo "The following test cases passed unexpectedly:"
|
||||
for name in ${passed}; do
|
||||
ewarn " ${passed}"
|
||||
done
|
||||
else
|
||||
einfo "None of the known-to-fail tests passed, all fine"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Output some general info to the user
|
||||
if use apache2 ; then
|
||||
APACHE2_MOD_DEFINE="PHP5"
|
||||
APACHE2_MOD_CONF="70_mod_php5"
|
||||
apache-module_pkg_postinst
|
||||
fi
|
||||
|
||||
# Create the symlinks for php
|
||||
for m in ${SAPIS}; do
|
||||
[[ ${m} == 'embed' ]] && continue;
|
||||
if use $m ; then
|
||||
local ci=$(eselect php show $m)
|
||||
if [[ -z $ci ]]; then
|
||||
eselect php set $m php${SLOT}
|
||||
einfo "Switched ${m} to use php:${SLOT}"
|
||||
einfo
|
||||
elif [[ $ci != "php${SLOT}" ]] ; then
|
||||
elog "To switch $m to use php:${SLOT}, run"
|
||||
elog " eselect php set $m php${SLOT}"
|
||||
elog
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
|
||||
elog "to compile extensions for the ${SLOT} ABI"
|
||||
elog
|
||||
if ! use readline && use cli ; then
|
||||
ewarn "Note that in order to use php interactivly, you need to enable"
|
||||
ewarn "the readline USE flag or php -a will hang"
|
||||
fi
|
||||
elog
|
||||
elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
|
||||
elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
|
||||
elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
|
||||
elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
|
||||
|
||||
elog
|
||||
elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
|
||||
elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
eselect php cleanup
|
||||
}
|
@ -0,0 +1,784 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.5.21.ebuild,v 1.1 2015/01/23 09:18:48 olemarkus Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
function php_get_uri ()
|
||||
{
|
||||
case "${1}" in
|
||||
"php-pre")
|
||||
echo "http://downloads.php.net/dsp/${2}"
|
||||
;;
|
||||
"php")
|
||||
echo "http://www.php.net/distributions/${2}"
|
||||
;;
|
||||
"olemarkus")
|
||||
echo "http://dev.gentoo.org/~olemarkus/php/${2}"
|
||||
;;
|
||||
"gentoo")
|
||||
echo "mirror://gentoo/${2}"
|
||||
;;
|
||||
*)
|
||||
die "unhandled case in php_get_uri"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
PHP_MV="$(get_major_version)"
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# alias, so we can handle different types of releases (finals, rcs, alphas,
|
||||
# betas, ...) w/o changing the whole ebuild
|
||||
PHP_PV="${PV/_rc/RC}"
|
||||
PHP_PV="${PHP_PV/_alpha/alpha}"
|
||||
PHP_PV="${PHP_PV/_beta/beta}"
|
||||
PHP_RELEASE="php"
|
||||
[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
|
||||
PHP_P="${PN}-${PHP_PV}"
|
||||
|
||||
PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
|
||||
|
||||
PHP_FPM_CONF_VER="1"
|
||||
|
||||
SRC_URI="${PHP_SRC_URI}"
|
||||
|
||||
DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
|
||||
HOMEPAGE="http://php.net/"
|
||||
LICENSE="PHP-3"
|
||||
|
||||
S="${WORKDIR}/${PHP_P}"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
|
||||
crypt +ctype curl debug
|
||||
enchant exif frontbase +fileinfo +filter firebird
|
||||
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
||||
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
|
||||
mssql mysql libmysqlclient mysqli nls
|
||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
||||
readline recode selinux +session sharedmem
|
||||
+simplexml snmp soap sockets spell sqlite ssl
|
||||
sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
|
||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
|
||||
|
||||
DEPEND="
|
||||
>=app-admin/eselect-php-0.7.1-r3[apache2?,fpm?]
|
||||
>=dev-libs/libpcre-8.32[unicode]
|
||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
||||
<www-servers/apache-2.4[threads=] ) )
|
||||
berkdb? ( =sys-libs/db-4* )
|
||||
bzip2? ( app-arch/bzip2 )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
cjk? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
crypt? ( >=dev-libs/libmcrypt-2.4 )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( app-text/enchant )
|
||||
exif? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
firebird? ( dev-db/firebird )
|
||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.0 )
|
||||
gmp? ( >=dev-libs/gmp-4.1.2 )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[ssl=] )
|
||||
intl? ( dev-libs/icu:= )
|
||||
iodbc? ( dev-db/libiodbc )
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( >=net-nds/openldap-1.2.11 )
|
||||
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
|
||||
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
|
||||
mssql? ( dev-db/freetds[mssql] )
|
||||
libmysqlclient? (
|
||||
mysql? ( virtual/mysql )
|
||||
mysqli? ( >=virtual/mysql-4.1 )
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
|
||||
odbc? ( >=dev-db/unixODBC-1.8.13 )
|
||||
postgres? ( dev-db/postgresql )
|
||||
qdbm? ( dev-db/qdbm )
|
||||
readline? ( sys-libs/readline )
|
||||
recode? ( app-text/recode )
|
||||
sharedmem? ( dev-libs/mm )
|
||||
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
||||
soap? ( >=dev-libs/libxml2-2.6.8 )
|
||||
spell? ( >=app-text/aspell-0.50 )
|
||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
||||
ssl? ( >=dev-libs/openssl-0.9.7 )
|
||||
sybase-ct? ( dev-db/freetds )
|
||||
tidy? ( app-text/htmltidy )
|
||||
truetype? (
|
||||
=media-libs/freetype-2*
|
||||
>=media-libs/t1lib-5.0.0
|
||||
!gd? (
|
||||
virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
)
|
||||
unicode? ( dev-libs/oniguruma )
|
||||
vpx? ( media-libs/libvpx )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
|
||||
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xpm? (
|
||||
x11-libs/libXpm
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0= sys-libs/zlib
|
||||
)
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( sys-libs/zlib )
|
||||
zlib? ( sys-libs/zlib )
|
||||
virtual/mta
|
||||
"
|
||||
|
||||
php="=${CATEGORY}/${PF}"
|
||||
|
||||
REQUIRED_USE="
|
||||
truetype? ( gd )
|
||||
vpx? ( gd )
|
||||
cjk? ( gd )
|
||||
exif? ( gd )
|
||||
|
||||
xpm? ( gd )
|
||||
gd? ( zlib )
|
||||
simplexml? ( xml )
|
||||
soap? ( xml )
|
||||
wddx? ( xml )
|
||||
xmlrpc? ( || ( xml iconv ) )
|
||||
xmlreader? ( xml )
|
||||
xslt? ( xml )
|
||||
ldap-sasl? ( ldap )
|
||||
mhash? ( hash )
|
||||
phar? ( hash )
|
||||
libmysqlclient? ( || (
|
||||
mysql
|
||||
mysqli
|
||||
pdo
|
||||
) )
|
||||
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
recode? ( !imap !mysql !mysqli )
|
||||
sharedmem? ( !threads )
|
||||
|
||||
!cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
DEPEND="${DEPEND}
|
||||
sys-devel/flex
|
||||
>=sys-devel/m4-1.4.3
|
||||
>=sys-devel/libtool-1.5.18"
|
||||
|
||||
# Allow users to install production version if they want to
|
||||
|
||||
case "${PHP_INI_VERSION}" in
|
||||
production|development)
|
||||
;;
|
||||
*)
|
||||
PHP_INI_VERSION="development"
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
|
||||
PHP_INI_FILE="php.ini"
|
||||
|
||||
want_apache
|
||||
|
||||
pkg_setup() {
|
||||
depend.apache_pkg_setup
|
||||
}
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
|
||||
cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
|
||||
|
||||
# default to /tmp for save_path, bug #282768
|
||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
|
||||
|
||||
# Set the extension dir
|
||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
|
||||
|
||||
# Set the include path to point to where we want to find PEAR packages
|
||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}"
|
||||
|
||||
dodir "${PHP_INI_DIR#${EPREFIX}}"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${phpinisrc}" "${PHP_INI_FILE}"
|
||||
|
||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
||||
elog
|
||||
|
||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
||||
|
||||
if use_if_iuse opcache; then
|
||||
elog "Adding opcache to $PHP_EXT_INI_DIR"
|
||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
|
||||
dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
|
||||
fi
|
||||
|
||||
# SAPI-specific handling
|
||||
|
||||
if [[ "${sapi}" == "fpm" ]] ; then
|
||||
[[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
|
||||
einfo "Installing FPM CGI config file php-fpm.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
|
||||
|
||||
# Remove bogus /etc/php-fpm.conf.default (bug 359906)
|
||||
[[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
|
||||
fi
|
||||
|
||||
# Install PHP ini files into /usr/share/php
|
||||
|
||||
dodoc php.ini-development
|
||||
dodoc php.ini-production
|
||||
|
||||
}
|
||||
|
||||
php_set_ini_dir() {
|
||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
|
||||
# ([empty session.save_path]/session_mm_[sapi][gid].sem)
|
||||
# there is no easy way to circumvent that, all php calls during
|
||||
# install use -n, so no php.ini file will be used.
|
||||
# As such, this is the easiest way to get around
|
||||
addpredict /session_mm_cli250.sem
|
||||
addpredict /session_mm_cli0.sem
|
||||
|
||||
# Change PHP branding
|
||||
# Get the alpha/beta/rc version
|
||||
sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \
|
||||
-i configure.in || die "Unable to change PHP branding"
|
||||
|
||||
# Patch PHP to show Gentoo as the server platform
|
||||
sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
|
||||
-i configure.in || die "Failed to fix server platform name"
|
||||
|
||||
# Prevent PHP from activating the Apache config,
|
||||
# as we will do that ourselves
|
||||
sed -i \
|
||||
-e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
-e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4
|
||||
|
||||
# Patch PHP to support heimdal instead of mit-krb5
|
||||
if has_version "app-crypt/heimdal" ; then
|
||||
sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal libname"
|
||||
sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal crypt library reference"
|
||||
fi
|
||||
|
||||
#Add user patches #357637
|
||||
epatch_user
|
||||
|
||||
#force rebuilding aclocal.m4
|
||||
rm aclocal.m4
|
||||
eautoreconf
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# http://bugs.php.net/bug.php?id=48795, bug #343481
|
||||
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
||||
|
||||
# This is a global variable and should be in caps. It isn't because the
|
||||
# phpconfutils eclass relies on exactly this name...
|
||||
# for --with-libdir see bug #327025
|
||||
my_conf="
|
||||
--prefix="${PHP_DESTDIR}"
|
||||
--mandir="${PHP_DESTDIR}"/man
|
||||
--infodir="${PHP_DESTDIR}"/info
|
||||
--libdir="${PHP_DESTDIR}"/lib
|
||||
--with-libdir=$(get_libdir)
|
||||
--without-pear
|
||||
$(use_enable threads maintainer-zts)"
|
||||
|
||||
# extension USE flag shared
|
||||
my_conf+="
|
||||
$(use_enable bcmath bcmath )
|
||||
$(use_with bzip2 bz2 "${EPREFIX}"/usr)
|
||||
$(use_enable calendar calendar )
|
||||
$(use_enable ctype ctype )
|
||||
$(use_with curl curl "${EPREFIX}"/usr)
|
||||
$(use_enable xml dom )
|
||||
$(use_with enchant enchant "${EPREFIX}"/usr)
|
||||
$(use_enable exif exif )
|
||||
$(use_enable fileinfo fileinfo )
|
||||
$(use_enable filter filter )
|
||||
$(use_enable ftp ftp )
|
||||
$(use_with nls gettext "${EPREFIX}"/usr)
|
||||
$(use_with gmp gmp "${EPREFIX}"/usr)
|
||||
$(use_enable hash hash )
|
||||
$(use_with mhash mhash "${EPREFIX}"/usr)
|
||||
$(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
|
||||
$(use_enable intl intl )
|
||||
$(use_enable ipv6 ipv6 )
|
||||
$(use_enable json json )
|
||||
$(use_with kerberos kerberos "${EPREFIX}"/usr)
|
||||
$(use_enable xml libxml )
|
||||
$(use_with xml libxml-dir "${EPREFIX}"/usr)
|
||||
$(use_enable unicode mbstring )
|
||||
$(use_with crypt mcrypt "${EPREFIX}"/usr)
|
||||
$(use_with mssql mssql "${EPREFIX}"/usr)
|
||||
$(use_with unicode onig "${EPREFIX}"/usr)
|
||||
$(use_with ssl openssl "${EPREFIX}"/usr)
|
||||
$(use_with ssl openssl-dir "${EPREFIX}"/usr)
|
||||
$(use_enable pcntl pcntl )
|
||||
$(use_enable phar phar )
|
||||
$(use_enable pdo pdo )
|
||||
$(use_enable opcache opcache )
|
||||
$(use_with postgres pgsql "${EPREFIX}"/usr)
|
||||
$(use_enable posix posix )
|
||||
$(use_with spell pspell "${EPREFIX}"/usr)
|
||||
$(use_with recode recode "${EPREFIX}"/usr)
|
||||
$(use_enable simplexml simplexml )
|
||||
$(use_enable sharedmem shmop )
|
||||
$(use_with snmp snmp "${EPREFIX}"/usr)
|
||||
$(use_enable soap soap )
|
||||
$(use_enable sockets sockets )
|
||||
$(use_with sqlite sqlite3 "${EPREFIX}"/usr)
|
||||
$(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
|
||||
$(use_enable sysvipc sysvmsg )
|
||||
$(use_enable sysvipc sysvsem )
|
||||
$(use_enable sysvipc sysvshm )
|
||||
$(use_with systemd fpm-systemd)
|
||||
$(use_with tidy tidy "${EPREFIX}"/usr)
|
||||
$(use_enable tokenizer tokenizer )
|
||||
$(use_enable wddx wddx )
|
||||
$(use_enable xml xml )
|
||||
$(use_enable xmlreader xmlreader )
|
||||
$(use_enable xmlwriter xmlwriter )
|
||||
$(use_with xmlrpc xmlrpc)
|
||||
$(use_with xslt xsl "${EPREFIX}"/usr)
|
||||
$(use_enable zip zip )
|
||||
$(use_with zlib zlib "${EPREFIX}"/usr)
|
||||
$(use_enable debug debug )"
|
||||
|
||||
# DBA support
|
||||
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
||||
|| use qdbm ; then
|
||||
my_conf="${my_conf} --enable-dba${shared}"
|
||||
fi
|
||||
|
||||
# DBA drivers support
|
||||
my_conf+="
|
||||
$(use_with cdb cdb)
|
||||
$(use_with berkdb db4 ${EPREFIX}/usr)
|
||||
$(use_enable flatfile flatfile )
|
||||
$(use_with gdbm gdbm ${EPREFIX}/usr)
|
||||
$(use_enable inifile inifile )
|
||||
$(use_with qdbm qdbm ${EPREFIX}/usr)"
|
||||
|
||||
# Support for the GD graphics library
|
||||
my_conf+="
|
||||
$(use_with truetype freetype-dir ${EPREFIX}/usr)
|
||||
$(use_with truetype t1lib ${EPREFIX}/usr)
|
||||
$(use_enable cjk gd-jis-conv )
|
||||
$(use_with gd jpeg-dir ${EPREFIX}/usr)
|
||||
$(use_with gd png-dir ${EPREFIX}/usr)
|
||||
$(use_with xpm xpm-dir ${EPREFIX}/usr)
|
||||
$(use_with vpx vpx-dir ${EPREFIX}/usr)"
|
||||
# enable gd last, so configure can pick up the previous settings
|
||||
my_conf+="
|
||||
$(use_with gd gd)"
|
||||
|
||||
# IMAP support
|
||||
if use imap ; then
|
||||
my_conf+="
|
||||
$(use_with imap imap ${EPREFIX}/usr)
|
||||
$(use_with ssl imap-ssl ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# Interbase/firebird support
|
||||
|
||||
if use firebird ; then
|
||||
my_conf+="
|
||||
$(use_with firebird interbase ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# LDAP support
|
||||
if use ldap ; then
|
||||
my_conf+="
|
||||
$(use_with ldap ldap ${EPREFIX}/usr)
|
||||
$(use_with ldap-sasl ldap-sasl ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# MySQL support
|
||||
local mysqllib="mysqlnd"
|
||||
local mysqlilib="mysqlnd"
|
||||
use libmysqlclient && mysqllib="${EPREFIX}/usr"
|
||||
use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config"
|
||||
|
||||
my_conf+=" $(use_with mysql mysql $mysqllib)"
|
||||
my_conf+=" $(use_with mysqli mysqli $mysqlilib)"
|
||||
|
||||
local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
|
||||
if use mysql ; then
|
||||
my_conf+="${mysqlsock}"
|
||||
elif use mysqli ; then
|
||||
my_conf+="${mysqlsock}"
|
||||
fi
|
||||
|
||||
# ODBC support
|
||||
if use odbc ; then
|
||||
my_conf+="
|
||||
$(use_with odbc unixODBC ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
if use iodbc ; then
|
||||
my_conf+="
|
||||
$(use_with iodbc iodbc ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# Oracle support
|
||||
if use oci8-instant-client ; then
|
||||
my_conf+="
|
||||
$(use_with oci8-instant-client oci8)"
|
||||
fi
|
||||
|
||||
# PDO support
|
||||
if use pdo ; then
|
||||
my_conf+="
|
||||
$(use_with mssql pdo-dblib )
|
||||
$(use_with mysql pdo-mysql ${mysqllib})
|
||||
$(use_with postgres pdo-pgsql )
|
||||
$(use_with sqlite pdo-sqlite ${EPREFIX}/usr)
|
||||
$(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
|
||||
if use oci8-instant-client ; then
|
||||
my_conf+="
|
||||
$(use_with oci8-instant-client pdo-oci)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# readline/libedit support
|
||||
my_conf+="
|
||||
$(use_with readline readline ${EPREFIX}/usr)
|
||||
$(use_with libedit libedit ${EPREFIX}/usr)"
|
||||
|
||||
# Session support
|
||||
if use session ; then
|
||||
my_conf+="
|
||||
$(use_with sharedmem mm ${EPREFIX}/usr)"
|
||||
else
|
||||
my_conf+="
|
||||
$(use_enable session session )"
|
||||
fi
|
||||
|
||||
# Use pic for shared modules such as apache2's mod_php
|
||||
my_conf="${my_conf} --with-pic"
|
||||
|
||||
# we use the system copy of pcre
|
||||
# --with-pcre-regex affects ext/pcre
|
||||
# --with-pcre-dir affects ext/filter and ext/zip
|
||||
my_conf="${my_conf} --with-pcre-regex=${EPREFIX}/usr --with-pcre-dir=${EPREFIX}/usr"
|
||||
|
||||
# Catch CFLAGS problems
|
||||
# Fixes bug #14067.
|
||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
||||
replace-cpu-flags "k6*" "i586"
|
||||
|
||||
# Support user-passed configuration parameters
|
||||
my_conf="${my_conf} ${EXTRA_ECONF:-}"
|
||||
|
||||
# Support the Apache2 extras, they must be set globally for all
|
||||
# SAPIs to work correctly, especially for external PHP extensions
|
||||
|
||||
mkdir -p "${WORKDIR}/sapis-build"
|
||||
for one_sapi in $SAPIS ; do
|
||||
use "${one_sapi}" || continue
|
||||
php_set_ini_dir "${one_sapi}"
|
||||
|
||||
cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${one_sapi}"
|
||||
|
||||
sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}
|
||||
--with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}"
|
||||
|
||||
for sapi in $SAPIS ; do
|
||||
case "$sapi" in
|
||||
cli|cgi|embed|fpm)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf="${sapi_conf} --enable-${sapi}"
|
||||
else
|
||||
sapi_conf="${sapi_conf} --disable-${sapi}"
|
||||
fi
|
||||
;;
|
||||
|
||||
apache2)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
|
||||
else
|
||||
sapi_conf="${sapi_conf} --without-apxs2"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
econf ${sapi_conf}
|
||||
done
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# snmp seems to run during src_compile, too (bug #324739)
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
for sapi in ${SAPIS} ; do
|
||||
if use "${sapi}"; then
|
||||
cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
||||
emake || die "emake failed"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# see bug #324739 for what happens when we don't have that
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
|
||||
# grab the first SAPI that got built and install common files from there
|
||||
local first_sapi=""
|
||||
for sapi in $SAPIS ; do
|
||||
if use $sapi ; then
|
||||
first_sapi=$sapi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Makefile forgets to create this before trying to write to it...
|
||||
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
|
||||
|
||||
# Install php environment (without any sapis)
|
||||
cd "${WORKDIR}/sapis-build/$first_sapi"
|
||||
emake INSTALL_ROOT="${D}" \
|
||||
install-build install-headers install-programs \
|
||||
|| die "emake install failed"
|
||||
|
||||
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
|
||||
|
||||
# Create the directory where we'll put version-specific php scripts
|
||||
keepdir /usr/share/php${PHP_MV}
|
||||
|
||||
local sapi="", file=""
|
||||
local sapi_list=""
|
||||
|
||||
for sapi in ${SAPIS}; do
|
||||
if use "${sapi}" ; then
|
||||
einfo "Installing SAPI: ${sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${sapi}"
|
||||
|
||||
if [[ "${sapi}" == "apache2" ]] ; then
|
||||
# We're specifically not using emake install-sapi as libtool
|
||||
# may cause unnecessary relink failures (see bug #351266)
|
||||
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
|
||||
newins ".libs/libphp5$(get_libname)" "libphp${PHP_MV}$(get_libname)"
|
||||
keepdir "/usr/$(get_libdir)/apache2/modules"
|
||||
else
|
||||
# needed each time, php_install_ini would reset it
|
||||
local dest="${PHP_DESTDIR#${EPREFIX}}"
|
||||
into "${dest}"
|
||||
case "$sapi" in
|
||||
cli)
|
||||
source="sapi/cli/php"
|
||||
;;
|
||||
cgi)
|
||||
source="sapi/cgi/php-cgi"
|
||||
;;
|
||||
fpm)
|
||||
source="sapi/fpm/php-fpm"
|
||||
;;
|
||||
embed)
|
||||
source="libs/libphp${PHP_MV}$(get_libname)"
|
||||
;;
|
||||
*)
|
||||
die "unhandled sapi in src_install"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
||||
dolib.so "${source}" || die "Unable to install ${sapi} sapi"
|
||||
else
|
||||
dobin "${source}" || die "Unable to install ${sapi} sapi"
|
||||
local name="$(basename ${source})"
|
||||
dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
|
||||
fi
|
||||
fi
|
||||
|
||||
php_install_ini "${sapi}"
|
||||
|
||||
# construct correct SAPI string for php-config
|
||||
# thanks to ferringb for the bash voodoo
|
||||
if [[ "${sapi}" == "apache2" ]]; then
|
||||
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
|
||||
else
|
||||
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Installing opcache module
|
||||
if use_if_iuse opcache ; then
|
||||
dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
|
||||
fi
|
||||
|
||||
# Install env.d files
|
||||
newenvd "${FILESDIR}/20php5-envd" \
|
||||
"20php${SLOT}"
|
||||
sed -e "s|/lib/|/$(get_libdir)/|g" -i \
|
||||
"${ED}/etc/env.d/20php${SLOT}"
|
||||
sed -e "s|php5|php${SLOT}|g" -i \
|
||||
"${ED}/etc/env.d/20php${SLOT}"
|
||||
|
||||
# set php-config variable correctly (bug #278439)
|
||||
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
|
||||
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config"
|
||||
|
||||
if use fpm ; then
|
||||
if use systemd; then
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at.service" "php-fpm@${SLOT}.service"
|
||||
else
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" "php-fpm@${SLOT}.service"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
||||
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
|
||||
if [[ ! -x "${PHP_BIN}" ]] ; then
|
||||
ewarn "Test phase requires USE=cli, skipping"
|
||||
return
|
||||
else
|
||||
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then
|
||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi"
|
||||
fi
|
||||
|
||||
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d "session.save_path=${T}" \
|
||||
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d "session.save_path=${T}"
|
||||
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
mv "${name}.out" "${name}.out.orig" 2>/dev/null
|
||||
done
|
||||
|
||||
local failed="$(find -name '*.out')"
|
||||
if [[ ${failed} != "" ]] ; then
|
||||
ewarn "The following test cases failed unexpectedly:"
|
||||
for name in ${failed}; do
|
||||
ewarn " ${name/.out/}"
|
||||
done
|
||||
else
|
||||
einfo "No unexpected test failures, all fine"
|
||||
fi
|
||||
|
||||
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
|
||||
local passed=""
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
[[ -f "${name}.diff" ]] && continue
|
||||
passed="${passed} ${name}"
|
||||
done
|
||||
if [[ ${passed} != "" ]] ; then
|
||||
einfo "The following test cases passed unexpectedly:"
|
||||
for name in ${passed}; do
|
||||
ewarn " ${passed}"
|
||||
done
|
||||
else
|
||||
einfo "None of the known-to-fail tests passed, all fine"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Output some general info to the user
|
||||
if use apache2 ; then
|
||||
APACHE2_MOD_DEFINE="PHP5"
|
||||
APACHE2_MOD_CONF="70_mod_php5"
|
||||
apache-module_pkg_postinst
|
||||
fi
|
||||
|
||||
# Create the symlinks for php
|
||||
for m in ${SAPIS}; do
|
||||
[[ ${m} == 'embed' ]] && continue;
|
||||
if use $m ; then
|
||||
local ci=$(eselect php show $m)
|
||||
if [[ -z $ci ]]; then
|
||||
eselect php set $m php${SLOT}
|
||||
einfo "Switched ${m} to use php:${SLOT}"
|
||||
einfo
|
||||
elif [[ $ci != "php${SLOT}" ]] ; then
|
||||
elog "To switch $m to use php:${SLOT}, run"
|
||||
elog " eselect php set $m php${SLOT}"
|
||||
elog
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
|
||||
elog "to compile extensions for the ${SLOT} ABI"
|
||||
elog
|
||||
if ! use readline && use cli ; then
|
||||
ewarn "Note that in order to use php interactivly, you need to enable"
|
||||
ewarn "the readline USE flag or php -a will hang"
|
||||
fi
|
||||
elog
|
||||
elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
|
||||
elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
|
||||
elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
|
||||
elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
|
||||
|
||||
elog
|
||||
elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
|
||||
elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
eselect php cleanup
|
||||
}
|
@ -0,0 +1,784 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.6.5.ebuild,v 1.1 2015/01/23 09:18:48 olemarkus Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
function php_get_uri ()
|
||||
{
|
||||
case "${1}" in
|
||||
"php-pre")
|
||||
echo "http://downloads.php.net/dsp/${2}"
|
||||
;;
|
||||
"php")
|
||||
echo "http://www.php.net/distributions/${2}"
|
||||
;;
|
||||
"olemarkus")
|
||||
echo "http://dev.gentoo.org/~olemarkus/php/${2}"
|
||||
;;
|
||||
"gentoo")
|
||||
echo "mirror://gentoo/${2}"
|
||||
;;
|
||||
*)
|
||||
die "unhandled case in php_get_uri"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
PHP_MV="$(get_major_version)"
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# alias, so we can handle different types of releases (finals, rcs, alphas,
|
||||
# betas, ...) w/o changing the whole ebuild
|
||||
PHP_PV="${PV/_rc/RC}"
|
||||
PHP_PV="${PHP_PV/_alpha/alpha}"
|
||||
PHP_PV="${PHP_PV/_beta/beta}"
|
||||
PHP_RELEASE="php"
|
||||
[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
|
||||
PHP_P="${PN}-${PHP_PV}"
|
||||
|
||||
PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
|
||||
|
||||
PHP_FPM_CONF_VER="1"
|
||||
|
||||
SRC_URI="${PHP_SRC_URI}"
|
||||
|
||||
DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
|
||||
HOMEPAGE="http://php.net/"
|
||||
LICENSE="PHP-3"
|
||||
|
||||
S="${WORKDIR}/${PHP_P}"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
|
||||
crypt +ctype curl debug
|
||||
enchant exif frontbase +fileinfo +filter firebird
|
||||
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
||||
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
|
||||
mssql mysql libmysqlclient mysqli nls
|
||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
||||
readline recode selinux +session sharedmem
|
||||
+simplexml snmp soap sockets spell sqlite ssl
|
||||
sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
|
||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
|
||||
|
||||
DEPEND="
|
||||
>=app-admin/eselect-php-0.7.1-r3[apache2?,fpm?]
|
||||
>=dev-libs/libpcre-8.32[unicode]
|
||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
||||
<www-servers/apache-2.4[threads=] ) )
|
||||
berkdb? ( =sys-libs/db-4* )
|
||||
bzip2? ( app-arch/bzip2 )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
cjk? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
crypt? ( >=dev-libs/libmcrypt-2.4 )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( app-text/enchant )
|
||||
exif? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
firebird? ( dev-db/firebird )
|
||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.0 )
|
||||
gmp? ( >=dev-libs/gmp-4.1.2 )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[ssl=] )
|
||||
intl? ( dev-libs/icu:= )
|
||||
iodbc? ( dev-db/libiodbc )
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( >=net-nds/openldap-1.2.11 )
|
||||
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
|
||||
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
|
||||
mssql? ( dev-db/freetds[mssql] )
|
||||
libmysqlclient? (
|
||||
mysql? ( virtual/mysql )
|
||||
mysqli? ( >=virtual/mysql-4.1 )
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
|
||||
odbc? ( >=dev-db/unixODBC-1.8.13 )
|
||||
postgres? ( dev-db/postgresql )
|
||||
qdbm? ( dev-db/qdbm )
|
||||
readline? ( sys-libs/readline )
|
||||
recode? ( app-text/recode )
|
||||
sharedmem? ( dev-libs/mm )
|
||||
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
||||
soap? ( >=dev-libs/libxml2-2.6.8 )
|
||||
spell? ( >=app-text/aspell-0.50 )
|
||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
||||
ssl? ( >=dev-libs/openssl-0.9.7 )
|
||||
sybase-ct? ( dev-db/freetds )
|
||||
tidy? ( app-text/htmltidy )
|
||||
truetype? (
|
||||
=media-libs/freetype-2*
|
||||
>=media-libs/t1lib-5.0.0
|
||||
!gd? (
|
||||
virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
)
|
||||
unicode? ( dev-libs/oniguruma )
|
||||
vpx? ( media-libs/libvpx )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
|
||||
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xpm? (
|
||||
x11-libs/libXpm
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0= sys-libs/zlib
|
||||
)
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( sys-libs/zlib )
|
||||
zlib? ( sys-libs/zlib )
|
||||
virtual/mta
|
||||
"
|
||||
|
||||
php="=${CATEGORY}/${PF}"
|
||||
|
||||
REQUIRED_USE="
|
||||
truetype? ( gd )
|
||||
vpx? ( gd )
|
||||
cjk? ( gd )
|
||||
exif? ( gd )
|
||||
|
||||
xpm? ( gd )
|
||||
gd? ( zlib )
|
||||
simplexml? ( xml )
|
||||
soap? ( xml )
|
||||
wddx? ( xml )
|
||||
xmlrpc? ( || ( xml iconv ) )
|
||||
xmlreader? ( xml )
|
||||
xslt? ( xml )
|
||||
ldap-sasl? ( ldap )
|
||||
mhash? ( hash )
|
||||
phar? ( hash )
|
||||
libmysqlclient? ( || (
|
||||
mysql
|
||||
mysqli
|
||||
pdo
|
||||
) )
|
||||
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
recode? ( !imap !mysql !mysqli )
|
||||
sharedmem? ( !threads )
|
||||
|
||||
!cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
DEPEND="${DEPEND}
|
||||
sys-devel/flex
|
||||
>=sys-devel/m4-1.4.3
|
||||
>=sys-devel/libtool-1.5.18"
|
||||
|
||||
# Allow users to install production version if they want to
|
||||
|
||||
case "${PHP_INI_VERSION}" in
|
||||
production|development)
|
||||
;;
|
||||
*)
|
||||
PHP_INI_VERSION="development"
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
|
||||
PHP_INI_FILE="php.ini"
|
||||
|
||||
want_apache
|
||||
|
||||
pkg_setup() {
|
||||
depend.apache_pkg_setup
|
||||
}
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
|
||||
cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
|
||||
|
||||
# default to /tmp for save_path, bug #282768
|
||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
|
||||
|
||||
# Set the extension dir
|
||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
|
||||
|
||||
# Set the include path to point to where we want to find PEAR packages
|
||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}"
|
||||
|
||||
dodir "${PHP_INI_DIR#${EPREFIX}}"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${phpinisrc}" "${PHP_INI_FILE}"
|
||||
|
||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
||||
elog
|
||||
|
||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
||||
|
||||
if use_if_iuse opcache; then
|
||||
elog "Adding opcache to $PHP_EXT_INI_DIR"
|
||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
|
||||
dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
|
||||
fi
|
||||
|
||||
# SAPI-specific handling
|
||||
|
||||
if [[ "${sapi}" == "fpm" ]] ; then
|
||||
[[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
|
||||
einfo "Installing FPM CGI config file php-fpm.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
|
||||
|
||||
# Remove bogus /etc/php-fpm.conf.default (bug 359906)
|
||||
[[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
|
||||
fi
|
||||
|
||||
# Install PHP ini files into /usr/share/php
|
||||
|
||||
dodoc php.ini-development
|
||||
dodoc php.ini-production
|
||||
|
||||
}
|
||||
|
||||
php_set_ini_dir() {
|
||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
|
||||
# ([empty session.save_path]/session_mm_[sapi][gid].sem)
|
||||
# there is no easy way to circumvent that, all php calls during
|
||||
# install use -n, so no php.ini file will be used.
|
||||
# As such, this is the easiest way to get around
|
||||
addpredict /session_mm_cli250.sem
|
||||
addpredict /session_mm_cli0.sem
|
||||
|
||||
# Change PHP branding
|
||||
# Get the alpha/beta/rc version
|
||||
sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \
|
||||
-i configure.in || die "Unable to change PHP branding"
|
||||
|
||||
# Patch PHP to show Gentoo as the server platform
|
||||
sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
|
||||
-i configure.in || die "Failed to fix server platform name"
|
||||
|
||||
# Prevent PHP from activating the Apache config,
|
||||
# as we will do that ourselves
|
||||
sed -i \
|
||||
-e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
-e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4
|
||||
|
||||
# Patch PHP to support heimdal instead of mit-krb5
|
||||
if has_version "app-crypt/heimdal" ; then
|
||||
sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal libname"
|
||||
sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal crypt library reference"
|
||||
fi
|
||||
|
||||
#Add user patches #357637
|
||||
epatch_user
|
||||
|
||||
#force rebuilding aclocal.m4
|
||||
rm aclocal.m4
|
||||
eautoreconf
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# http://bugs.php.net/bug.php?id=48795, bug #343481
|
||||
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
||||
|
||||
# This is a global variable and should be in caps. It isn't because the
|
||||
# phpconfutils eclass relies on exactly this name...
|
||||
# for --with-libdir see bug #327025
|
||||
my_conf="
|
||||
--prefix="${PHP_DESTDIR}"
|
||||
--mandir="${PHP_DESTDIR}"/man
|
||||
--infodir="${PHP_DESTDIR}"/info
|
||||
--libdir="${PHP_DESTDIR}"/lib
|
||||
--with-libdir=$(get_libdir)
|
||||
--without-pear
|
||||
$(use_enable threads maintainer-zts)"
|
||||
|
||||
# extension USE flag shared
|
||||
my_conf+="
|
||||
$(use_enable bcmath bcmath )
|
||||
$(use_with bzip2 bz2 "${EPREFIX}"/usr)
|
||||
$(use_enable calendar calendar )
|
||||
$(use_enable ctype ctype )
|
||||
$(use_with curl curl "${EPREFIX}"/usr)
|
||||
$(use_enable xml dom )
|
||||
$(use_with enchant enchant "${EPREFIX}"/usr)
|
||||
$(use_enable exif exif )
|
||||
$(use_enable fileinfo fileinfo )
|
||||
$(use_enable filter filter )
|
||||
$(use_enable ftp ftp )
|
||||
$(use_with nls gettext "${EPREFIX}"/usr)
|
||||
$(use_with gmp gmp "${EPREFIX}"/usr)
|
||||
$(use_enable hash hash )
|
||||
$(use_with mhash mhash "${EPREFIX}"/usr)
|
||||
$(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
|
||||
$(use_enable intl intl )
|
||||
$(use_enable ipv6 ipv6 )
|
||||
$(use_enable json json )
|
||||
$(use_with kerberos kerberos "${EPREFIX}"/usr)
|
||||
$(use_enable xml libxml )
|
||||
$(use_with xml libxml-dir "${EPREFIX}"/usr)
|
||||
$(use_enable unicode mbstring )
|
||||
$(use_with crypt mcrypt "${EPREFIX}"/usr)
|
||||
$(use_with mssql mssql "${EPREFIX}"/usr)
|
||||
$(use_with unicode onig "${EPREFIX}"/usr)
|
||||
$(use_with ssl openssl "${EPREFIX}"/usr)
|
||||
$(use_with ssl openssl-dir "${EPREFIX}"/usr)
|
||||
$(use_enable pcntl pcntl )
|
||||
$(use_enable phar phar )
|
||||
$(use_enable pdo pdo )
|
||||
$(use_enable opcache opcache )
|
||||
$(use_with postgres pgsql "${EPREFIX}"/usr)
|
||||
$(use_enable posix posix )
|
||||
$(use_with spell pspell "${EPREFIX}"/usr)
|
||||
$(use_with recode recode "${EPREFIX}"/usr)
|
||||
$(use_enable simplexml simplexml )
|
||||
$(use_enable sharedmem shmop )
|
||||
$(use_with snmp snmp "${EPREFIX}"/usr)
|
||||
$(use_enable soap soap )
|
||||
$(use_enable sockets sockets )
|
||||
$(use_with sqlite sqlite3 "${EPREFIX}"/usr)
|
||||
$(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
|
||||
$(use_enable sysvipc sysvmsg )
|
||||
$(use_enable sysvipc sysvsem )
|
||||
$(use_enable sysvipc sysvshm )
|
||||
$(use_with systemd fpm-systemd)
|
||||
$(use_with tidy tidy "${EPREFIX}"/usr)
|
||||
$(use_enable tokenizer tokenizer )
|
||||
$(use_enable wddx wddx )
|
||||
$(use_enable xml xml )
|
||||
$(use_enable xmlreader xmlreader )
|
||||
$(use_enable xmlwriter xmlwriter )
|
||||
$(use_with xmlrpc xmlrpc)
|
||||
$(use_with xslt xsl "${EPREFIX}"/usr)
|
||||
$(use_enable zip zip )
|
||||
$(use_with zlib zlib "${EPREFIX}"/usr)
|
||||
$(use_enable debug debug )"
|
||||
|
||||
# DBA support
|
||||
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
||||
|| use qdbm ; then
|
||||
my_conf="${my_conf} --enable-dba${shared}"
|
||||
fi
|
||||
|
||||
# DBA drivers support
|
||||
my_conf+="
|
||||
$(use_with cdb cdb)
|
||||
$(use_with berkdb db4 ${EPREFIX}/usr)
|
||||
$(use_enable flatfile flatfile )
|
||||
$(use_with gdbm gdbm ${EPREFIX}/usr)
|
||||
$(use_enable inifile inifile )
|
||||
$(use_with qdbm qdbm ${EPREFIX}/usr)"
|
||||
|
||||
# Support for the GD graphics library
|
||||
my_conf+="
|
||||
$(use_with truetype freetype-dir ${EPREFIX}/usr)
|
||||
$(use_with truetype t1lib ${EPREFIX}/usr)
|
||||
$(use_enable cjk gd-jis-conv )
|
||||
$(use_with gd jpeg-dir ${EPREFIX}/usr)
|
||||
$(use_with gd png-dir ${EPREFIX}/usr)
|
||||
$(use_with xpm xpm-dir ${EPREFIX}/usr)
|
||||
$(use_with vpx vpx-dir ${EPREFIX}/usr)"
|
||||
# enable gd last, so configure can pick up the previous settings
|
||||
my_conf+="
|
||||
$(use_with gd gd)"
|
||||
|
||||
# IMAP support
|
||||
if use imap ; then
|
||||
my_conf+="
|
||||
$(use_with imap imap ${EPREFIX}/usr)
|
||||
$(use_with ssl imap-ssl ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# Interbase/firebird support
|
||||
|
||||
if use firebird ; then
|
||||
my_conf+="
|
||||
$(use_with firebird interbase ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# LDAP support
|
||||
if use ldap ; then
|
||||
my_conf+="
|
||||
$(use_with ldap ldap ${EPREFIX}/usr)
|
||||
$(use_with ldap-sasl ldap-sasl ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# MySQL support
|
||||
local mysqllib="mysqlnd"
|
||||
local mysqlilib="mysqlnd"
|
||||
use libmysqlclient && mysqllib="${EPREFIX}/usr"
|
||||
use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config"
|
||||
|
||||
my_conf+=" $(use_with mysql mysql $mysqllib)"
|
||||
my_conf+=" $(use_with mysqli mysqli $mysqlilib)"
|
||||
|
||||
local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
|
||||
if use mysql ; then
|
||||
my_conf+="${mysqlsock}"
|
||||
elif use mysqli ; then
|
||||
my_conf+="${mysqlsock}"
|
||||
fi
|
||||
|
||||
# ODBC support
|
||||
if use odbc ; then
|
||||
my_conf+="
|
||||
$(use_with odbc unixODBC ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
if use iodbc ; then
|
||||
my_conf+="
|
||||
$(use_with iodbc iodbc ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# Oracle support
|
||||
if use oci8-instant-client ; then
|
||||
my_conf+="
|
||||
$(use_with oci8-instant-client oci8)"
|
||||
fi
|
||||
|
||||
# PDO support
|
||||
if use pdo ; then
|
||||
my_conf+="
|
||||
$(use_with mssql pdo-dblib )
|
||||
$(use_with mysql pdo-mysql ${mysqllib})
|
||||
$(use_with postgres pdo-pgsql )
|
||||
$(use_with sqlite pdo-sqlite ${EPREFIX}/usr)
|
||||
$(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
|
||||
if use oci8-instant-client ; then
|
||||
my_conf+="
|
||||
$(use_with oci8-instant-client pdo-oci)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# readline/libedit support
|
||||
my_conf+="
|
||||
$(use_with readline readline ${EPREFIX}/usr)
|
||||
$(use_with libedit libedit ${EPREFIX}/usr)"
|
||||
|
||||
# Session support
|
||||
if use session ; then
|
||||
my_conf+="
|
||||
$(use_with sharedmem mm ${EPREFIX}/usr)"
|
||||
else
|
||||
my_conf+="
|
||||
$(use_enable session session )"
|
||||
fi
|
||||
|
||||
# Use pic for shared modules such as apache2's mod_php
|
||||
my_conf="${my_conf} --with-pic"
|
||||
|
||||
# we use the system copy of pcre
|
||||
# --with-pcre-regex affects ext/pcre
|
||||
# --with-pcre-dir affects ext/filter and ext/zip
|
||||
my_conf="${my_conf} --with-pcre-regex=${EPREFIX}/usr --with-pcre-dir=${EPREFIX}/usr"
|
||||
|
||||
# Catch CFLAGS problems
|
||||
# Fixes bug #14067.
|
||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
||||
replace-cpu-flags "k6*" "i586"
|
||||
|
||||
# Support user-passed configuration parameters
|
||||
my_conf="${my_conf} ${EXTRA_ECONF:-}"
|
||||
|
||||
# Support the Apache2 extras, they must be set globally for all
|
||||
# SAPIs to work correctly, especially for external PHP extensions
|
||||
|
||||
mkdir -p "${WORKDIR}/sapis-build"
|
||||
for one_sapi in $SAPIS ; do
|
||||
use "${one_sapi}" || continue
|
||||
php_set_ini_dir "${one_sapi}"
|
||||
|
||||
cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${one_sapi}"
|
||||
|
||||
sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}
|
||||
--with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}"
|
||||
|
||||
for sapi in $SAPIS ; do
|
||||
case "$sapi" in
|
||||
cli|cgi|embed|fpm)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf="${sapi_conf} --enable-${sapi}"
|
||||
else
|
||||
sapi_conf="${sapi_conf} --disable-${sapi}"
|
||||
fi
|
||||
;;
|
||||
|
||||
apache2)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
|
||||
else
|
||||
sapi_conf="${sapi_conf} --without-apxs2"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
econf ${sapi_conf}
|
||||
done
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# snmp seems to run during src_compile, too (bug #324739)
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
for sapi in ${SAPIS} ; do
|
||||
if use "${sapi}"; then
|
||||
cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
||||
emake || die "emake failed"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# see bug #324739 for what happens when we don't have that
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
|
||||
# grab the first SAPI that got built and install common files from there
|
||||
local first_sapi=""
|
||||
for sapi in $SAPIS ; do
|
||||
if use $sapi ; then
|
||||
first_sapi=$sapi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Makefile forgets to create this before trying to write to it...
|
||||
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
|
||||
|
||||
# Install php environment (without any sapis)
|
||||
cd "${WORKDIR}/sapis-build/$first_sapi"
|
||||
emake INSTALL_ROOT="${D}" \
|
||||
install-build install-headers install-programs \
|
||||
|| die "emake install failed"
|
||||
|
||||
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
|
||||
|
||||
# Create the directory where we'll put version-specific php scripts
|
||||
keepdir /usr/share/php${PHP_MV}
|
||||
|
||||
local sapi="", file=""
|
||||
local sapi_list=""
|
||||
|
||||
for sapi in ${SAPIS}; do
|
||||
if use "${sapi}" ; then
|
||||
einfo "Installing SAPI: ${sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${sapi}"
|
||||
|
||||
if [[ "${sapi}" == "apache2" ]] ; then
|
||||
# We're specifically not using emake install-sapi as libtool
|
||||
# may cause unnecessary relink failures (see bug #351266)
|
||||
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
|
||||
newins ".libs/libphp5$(get_libname)" "libphp${PHP_MV}$(get_libname)"
|
||||
keepdir "/usr/$(get_libdir)/apache2/modules"
|
||||
else
|
||||
# needed each time, php_install_ini would reset it
|
||||
local dest="${PHP_DESTDIR#${EPREFIX}}"
|
||||
into "${dest}"
|
||||
case "$sapi" in
|
||||
cli)
|
||||
source="sapi/cli/php"
|
||||
;;
|
||||
cgi)
|
||||
source="sapi/cgi/php-cgi"
|
||||
;;
|
||||
fpm)
|
||||
source="sapi/fpm/php-fpm"
|
||||
;;
|
||||
embed)
|
||||
source="libs/libphp${PHP_MV}$(get_libname)"
|
||||
;;
|
||||
*)
|
||||
die "unhandled sapi in src_install"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
||||
dolib.so "${source}" || die "Unable to install ${sapi} sapi"
|
||||
else
|
||||
dobin "${source}" || die "Unable to install ${sapi} sapi"
|
||||
local name="$(basename ${source})"
|
||||
dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
|
||||
fi
|
||||
fi
|
||||
|
||||
php_install_ini "${sapi}"
|
||||
|
||||
# construct correct SAPI string for php-config
|
||||
# thanks to ferringb for the bash voodoo
|
||||
if [[ "${sapi}" == "apache2" ]]; then
|
||||
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
|
||||
else
|
||||
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Installing opcache module
|
||||
if use_if_iuse opcache ; then
|
||||
dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
|
||||
fi
|
||||
|
||||
# Install env.d files
|
||||
newenvd "${FILESDIR}/20php5-envd" \
|
||||
"20php${SLOT}"
|
||||
sed -e "s|/lib/|/$(get_libdir)/|g" -i \
|
||||
"${ED}/etc/env.d/20php${SLOT}"
|
||||
sed -e "s|php5|php${SLOT}|g" -i \
|
||||
"${ED}/etc/env.d/20php${SLOT}"
|
||||
|
||||
# set php-config variable correctly (bug #278439)
|
||||
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
|
||||
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config"
|
||||
|
||||
if use fpm ; then
|
||||
if use systemd; then
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at.service" "php-fpm@${SLOT}.service"
|
||||
else
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" "php-fpm@${SLOT}.service"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
||||
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
|
||||
if [[ ! -x "${PHP_BIN}" ]] ; then
|
||||
ewarn "Test phase requires USE=cli, skipping"
|
||||
return
|
||||
else
|
||||
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then
|
||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi"
|
||||
fi
|
||||
|
||||
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d "session.save_path=${T}" \
|
||||
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d "session.save_path=${T}"
|
||||
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
mv "${name}.out" "${name}.out.orig" 2>/dev/null
|
||||
done
|
||||
|
||||
local failed="$(find -name '*.out')"
|
||||
if [[ ${failed} != "" ]] ; then
|
||||
ewarn "The following test cases failed unexpectedly:"
|
||||
for name in ${failed}; do
|
||||
ewarn " ${name/.out/}"
|
||||
done
|
||||
else
|
||||
einfo "No unexpected test failures, all fine"
|
||||
fi
|
||||
|
||||
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
|
||||
local passed=""
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
[[ -f "${name}.diff" ]] && continue
|
||||
passed="${passed} ${name}"
|
||||
done
|
||||
if [[ ${passed} != "" ]] ; then
|
||||
einfo "The following test cases passed unexpectedly:"
|
||||
for name in ${passed}; do
|
||||
ewarn " ${passed}"
|
||||
done
|
||||
else
|
||||
einfo "None of the known-to-fail tests passed, all fine"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Output some general info to the user
|
||||
if use apache2 ; then
|
||||
APACHE2_MOD_DEFINE="PHP5"
|
||||
APACHE2_MOD_CONF="70_mod_php5"
|
||||
apache-module_pkg_postinst
|
||||
fi
|
||||
|
||||
# Create the symlinks for php
|
||||
for m in ${SAPIS}; do
|
||||
[[ ${m} == 'embed' ]] && continue;
|
||||
if use $m ; then
|
||||
local ci=$(eselect php show $m)
|
||||
if [[ -z $ci ]]; then
|
||||
eselect php set $m php${SLOT}
|
||||
einfo "Switched ${m} to use php:${SLOT}"
|
||||
einfo
|
||||
elif [[ $ci != "php${SLOT}" ]] ; then
|
||||
elog "To switch $m to use php:${SLOT}, run"
|
||||
elog " eselect php set $m php${SLOT}"
|
||||
elog
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
|
||||
elog "to compile extensions for the ${SLOT} ABI"
|
||||
elog
|
||||
if ! use readline && use cli ; then
|
||||
ewarn "Note that in order to use php interactivly, you need to enable"
|
||||
ewarn "the readline USE flag or php -a will hang"
|
||||
fi
|
||||
elog
|
||||
elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
|
||||
elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
|
||||
elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
|
||||
elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
|
||||
|
||||
elog
|
||||
elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
|
||||
elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
eselect php cleanup
|
||||
}
|
@ -1,21 +1,26 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA256
|
||||
|
||||
DIST PhpDocumentor-1.4.0.tgz 2435775 SHA256 478111217321a8a769be8faf65cbb41b173d64beb5ca3d7d485a8d31782f9068 SHA512 f7c0163111f4d2a42d5d4b5fedcaa23732d1d4eb7f6d322fb12c8dc2760961f280936e581bb662c7754ab3f42e87666a74733998cebf0d604fc9a63c3ed8506b WHIRLPOOL 9193d20ff4e171f7a12952d8d71128e6002e808997605e07ec6dedd14780538bf633157facc694be52e2dbf0012d9d221cad097abbd6aa98d78eebcc96d5a12a
|
||||
DIST PhpDocumentor-1.4.1.tgz 2423563 SHA256 2cc2141299b1f31d2482316a7c80b8dab05ac51543fd05b366b271bb0188744d SHA512 e2b4e5e259d14f0ddc7b7873a4ee81e075fc8c7e8df8100c2027c9fc814dcfdc6d73f3bb3a32688bcd8e3fde6da088a34b9af391324841e81de876083e730a0d WHIRLPOOL f863a24e135f548194acffe27a5cc08d5281061a217e1c647a1e4612345a0c6573cbae944f5937ce83c4a7cf3b3161e6e9e11229fbe0e71652c0d15192c48b5d
|
||||
DIST PhpDocumentor-1.4.3.tgz 2423486 SHA256 af27a2cf944aa3c7b22e9fc5317960746676e7683f1ed50c0a3049ab26c3a6de SHA512 5096aa25339aa2ab58e989fe7e06e68b6392f0b68ec29b9877c2b86f1d8e499ccca04500df7be10c5985979fffb12b1ac8c703b4a578df397193286b22c3e3fb WHIRLPOOL 1b264428150d74530cb11c925e017789ba25dc019cd823fc7c9c3aa078c2016d6d6c8d1544db092335f738b4636fbe9750184b5efeafe84ce3a348e8a416ab73
|
||||
DIST PhpDocumentor-1.4.4.tgz 1534088 SHA256 bec596cf9ae8b7534cf4c6e1a142ae11c7004aedf2f02fa9eb2050d566e62088 SHA512 a0eb984428d80335244bbf43dcdac52f35a5c00cfcc376e15c11c33be2045aa4db7f38e4166783982408cff1b2555588581ef51836f6697afa7b8549ce7f32c0 WHIRLPOOL 549a93f1ca024979a71cff4d4277bdf0b9386dce9d87675c840e489ae0963f9085bff0e80f1d29ab29d6a3225e09df0cc75d1e0894bd56442c381600dc0f2933
|
||||
EBUILD PEAR-PhpDocumentor-1.4.0.ebuild 658 SHA256 378654d017c262209379de28fa0e8e8b91c93cd37fafa52dd6080a1988d0a6ec SHA512 3f70508b34d1cf716ddac46dd099bbba5fd28ea5441b90b035b77d4eb1c1164ee345bab84632115bde7bbfd44ab7019daac7ca8a733e4f370789c9e9ee3c88c6 WHIRLPOOL 8e471bc5e67be6bec45b3a7c5a67ede1101f5a421fae464c806e1fa3abed0dbb4aaee49d4aa1965e4be090a2262b26504ce407d88d3775703887883671fc56f2
|
||||
EBUILD PEAR-PhpDocumentor-1.4.1.ebuild 657 SHA256 b31c6aba3f7023b096118361a8297a07c51238201daf6841e1365d4f87504a9f SHA512 d6fdbe650bf2ec28f67c7cb3929187f9ecd6083aa8dbee7d751589c8bd7c1a9890ca4b60294d72bac17a9ac593fa5cc3726278729fc56ec2b00e346f97c6c925 WHIRLPOOL e5cb0c66b4a45cb5046efb4003d5a298700decaa8c0f18c528b6c16806f706f5bb87d21dc6e2e083af2c97da3956e634e2db4c8aa4599e53afb55523a98f4dfb
|
||||
EBUILD PEAR-PhpDocumentor-1.4.3-r1.ebuild 880 SHA256 68d0927e89547870c7f34a669ed6148b209efc37ee9c41ec34bf0670719ad7d6 SHA512 35f440f1a482db63f2a03cdd699f9e69eb6e7fba241ccf4556861ff2aa9216b7b866bcd74dad34bb0fc3f28896192474678f9649c275abad03d8cee0c7578c15 WHIRLPOOL 7825e2b02b4efabf07396a2cf91a4ee2f2a4c53b09029a8bd0474c0e42bfd817229325fb9ef0e4a85edc451605c596f054258f1d65b92d4602e742523dd9ffed
|
||||
EBUILD PEAR-PhpDocumentor-1.4.3.ebuild 665 SHA256 76c4e3dcaff50e516276213027bc540f12e3a68b59638fe0746fb3da2d3494c6 SHA512 6bd6e879ceb997c3070e60034854bd44c8219c9db8d76e1cd4a4368b85bfbb928a76afc802e175d3e17f0e55e1f823d1be8896c144c11cf2226866aa6f1fd3b5 WHIRLPOOL 1f0b3f55f35e60e2c7608da90c39dd86521c82f3914573efc5b25590b05a355e24b6b1af3c33a4994160dfc55e26a7a97be2cf51d2b9b591e5ee90c0ab236490
|
||||
EBUILD PEAR-PhpDocumentor-1.4.4.ebuild 906 SHA256 62f6e00c360d22ab150b253e7e8efa49828359f1e4b79b92bd6f9b8fde5017be SHA512 e44a08ce97a4cbc41ce599dfb9d3c2340a7fcefe24d9eb6eb18871e265a247bf9998f0e0dc50148343927296f1a947611aff74dd6188e8ca0949445b180589b6 WHIRLPOOL b0b868158b7134e82215a60c634717b5bc32a5b1f68931a6c1a228029b1a9b5fdd77f66d966f85c38950752666563cb69d4e65ffdd2182192b2ea69826c09330
|
||||
MISC ChangeLog 8068 SHA256 8a0523483850d5b01eba0f65f9fe1914b53e914e270380c5564349755595b075 SHA512 6909429932f15fd4054639ff704aca98e86f0346304935d68bd0876a9591a9d1a39059c4eb67f7a354abc31c4f90823a6d972264a0e8c7317e29372de2cf1a38 WHIRLPOOL be692c61983a336722b27e756872050b9ceba169d195c77e1da5ffd497de46e34775cdd56f5d39d64598e7dff7d77b96c2b3e2b42d3827669c488ae4e86063f3
|
||||
MISC ChangeLog 8237 SHA256 51c7b2320a0207ddf8f4b99189c5f6c6cf4130dc04fcfda0d18c8b1b444fefe4 SHA512 9ba8c60fbed314dad6b9d08f842a05adcfd3281326d1ebf7baba7acbc5666127947a85eeb4b28e5f0e2f1c44f34a4bb51f5f5d1cd95504701e022e313880a759 WHIRLPOOL e0303056768ce72f0c7d7828327ba9eb82c06c7bbfe84aa1b35f0af40bf0f664938be378446714f206edcd5474f1c2da549aa9656e31aff2485326a7f3d47139
|
||||
MISC metadata.xml 156 SHA256 f6d70434415ff7294f2a64e7870f32318c5fab9153fe63a58841b12d897da6ba SHA512 c15813e9ecae01488222d09140617eaf0e6e9b9b9d40412e1cda7838e64c8fb8c73c030dc90d723aea571acadddb76941c9a620fc4e554ba052ace1cc6b0ef79 WHIRLPOOL 1b1513674a388e3e95e09cfd70996bc98fc058ca0e0e7c5dc63e0b3389bedeb4dc16b55245b92a8ded7390cca0dc481e418f236a236ded9afcc2ef3845b25130
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v2
|
||||
Version: GnuPG v2.0
|
||||
|
||||
iEYEAREIAAYFAlPn3CMACgkQcaHudmEf86oYrACeJgAbek+C2BX/+U8C0ix9ja2q
|
||||
VpUAnRnULZdH9FDBPaEahJS8064y15FI
|
||||
=fUHy
|
||||
iQIcBAEBCAAGBQJUwQAPAAoJENH3ge/59KO2KQMP/1LOXGbGtuwbYKaDsRXfkZKm
|
||||
8n/AVnVDDfhpgQqBOElaWhfkUFjMo6/WyrkLsMy/+jdTulW0TypmwqwoGG3Rqy9T
|
||||
p5Q4JdLl+vSsmbsigGPNSaM9IvrX41+3PXOjWLE4uxtDmgRBRNUDTqGrbCPqYhaM
|
||||
8CdjM+V5uE2rn2av+XbpGkhnCqIYoYBvxGFrH6hxblI07DdkaG7oYpuSBPBCCEHR
|
||||
PkO9mfcibH1jcrf0A69uBZhrEV1+GC3yx9iS4Yk9lCCpqy+JUJJckPfzQtNMEmin
|
||||
iQGTz8gqdg5KeDl/noP4+pmzI05d7pGelOKWcPm/InPWB13gcigyJGCLh+v/hyYv
|
||||
AkP7/J+MdUJD0CIthrSnCDBCZhAV4amSLDwtOV5ZYij0Fqc6d3dhmELuwBJo8SLW
|
||||
eFfEAaiqIRYs1mUHdz399sM35ROr25bJNQJRNDzQnS7oR5MSjiAshfpCi/yYkvtz
|
||||
vl21+1bi2zRsw/UA/a7/DT1483gRR0db2hi6RxcVttU0qnL2M3+VZXQWhUNKaDug
|
||||
rPbApz+m3RjlwkMkHn/vEg3yu72hMM3cou6/AJ0mzaj/0/A2dpWR7QfbjKzDFuC3
|
||||
nUdJQxEFN+DIhPx0v6asbbnNV1SD3uqT750U9MuP/38ygYrj/uUSHyikAONepuN5
|
||||
YP2rvAJb354B2++2L6B/
|
||||
=CPTw
|
||||
-----END PGP SIGNATURE-----
|
||||
|
@ -1,14 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-php/PEAR-PhpDocumentor/PEAR-PhpDocumentor-1.4.0.ebuild,v 1.10 2014/08/10 20:54:58 slyfox Exp $
|
||||
|
||||
inherit php-pear-r1
|
||||
|
||||
DESCRIPTION="The phpDocumentor package provides automatic documenting of php api directly from the source"
|
||||
# see http://pear.php.net/bugs/bug.php?id=12577 for additional info on licensing mess
|
||||
LICENSE="PHP-2.02 PHP-3 LGPL-2.1 public-domain Apache-2.0 BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
|
||||
IUSE="minimal"
|
||||
|
||||
RDEPEND="!minimal? ( >=dev-php/PEAR-XML_Beautifier-1.1-r1 )"
|
@ -1,14 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-php/PEAR-PhpDocumentor/PEAR-PhpDocumentor-1.4.1.ebuild,v 1.8 2014/08/10 20:54:58 slyfox Exp $
|
||||
|
||||
inherit php-pear-r1
|
||||
|
||||
DESCRIPTION="The phpDocumentor package provides automatic documenting of php api directly from the source"
|
||||
# see http://pear.php.net/bugs/bug.php?id=12577 for additional info on licensing mess
|
||||
LICENSE="PHP-2.02 PHP-3 LGPL-2.1 public-domain Apache-2.0 BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
|
||||
IUSE="minimal"
|
||||
|
||||
RDEPEND="!minimal? ( >=dev-php/PEAR-XML_Beautifier-1.1-r1 )"
|
@ -1,14 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-php/PEAR-PhpDocumentor/PEAR-PhpDocumentor-1.4.3.ebuild,v 1.2 2014/08/10 20:54:58 slyfox Exp $
|
||||
|
||||
inherit php-pear-r1
|
||||
|
||||
DESCRIPTION="The phpDocumentor package provides automatic documenting of php api directly from the source"
|
||||
# see http://pear.php.net/bugs/bug.php?id=12577 for additional info on licensing mess
|
||||
LICENSE="PHP-2.02 PHP-3 LGPL-2.1 public-domain Apache-2.0 BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="minimal"
|
||||
|
||||
RDEPEND="!minimal? ( >=dev-php/PEAR-XML_Beautifier-1.1-r1 )"
|
@ -0,0 +1,47 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-php/ffmpeg-php/ffmpeg-php-0.6.0-r3.ebuild,v 1.5 2015/01/22 17:55:56 grknight Exp $
|
||||
|
||||
EAPI="5"
|
||||
|
||||
PHP_EXT_NAME="ffmpeg"
|
||||
PHP_EXT_INI="yes"
|
||||
PHP_EXT_ZENDEXT="no"
|
||||
|
||||
USE_PHP="php5-6 php5-5 php5-4"
|
||||
|
||||
inherit php-ext-source-r2 eutils
|
||||
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
DESCRIPTION="PHP extension that provides access to movie info"
|
||||
HOMEPAGE="http://sourceforge.net/projects/ffmpeg-php/"
|
||||
SRC_URI="mirror://sourceforge/ffmpeg-php/${P}.tbz2"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="virtual/ffmpeg
|
||||
dev-lang/php[gd]"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
# The test breaks with the test movie, but it the same code works fine with
|
||||
# other movies
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
DOCS="CREDITS ChangeLog EXPERIMENTAL TODO"
|
||||
|
||||
src_prepare() {
|
||||
for slot in $(php_get_slots) ; do
|
||||
cd "${WORKDIR}/${slot}"
|
||||
epatch "${FILESDIR}/${P}-avutil50.patch"
|
||||
epatch "${FILESDIR}/${P}-ffmpeg.patch"
|
||||
epatch "${FILESDIR}/${P}-log.patch"
|
||||
epatch "${FILESDIR}/${P}-php5-4.patch"
|
||||
epatch "${FILESDIR}/${P}-ffincludes.patch"
|
||||
epatch "${FILESDIR}/${P}-ffmpeg1.patch"
|
||||
epatch "${FILESDIR}/${P}-api.patch"
|
||||
done
|
||||
php-ext-source-r2_src_prepare
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
# ChangeLog for dev-php/ming-php
|
||||
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-php/ming-php/ChangeLog,v 1.1 2015/01/22 17:25:49 grknight Exp $
|
||||
|
||||
*ming-php-0.4.5 (22 Jan 2015)
|
||||
|
||||
22 Jan 2015; Brian Evans <grknight@gentoo.org> +files/ming-php-54.patch,
|
||||
+files/php_ext-config.m4, +metadata.xml, +ming-php-0.4.5.ebuild:
|
||||
Initial commit split from media-libs/ming
|
@ -0,0 +1,26 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA256
|
||||
|
||||
AUX ming-php-54.patch 17283 SHA256 24b013c87487c03676b7b6be7100dc0a3c7abb68ba5f558bc34c9383dfac59c9 SHA512 4661cc5ac6abf8bbaaf12669379c8db011c27233e2e5625d2d18ed5dd969685f6446d0d08b0a162fecbaea5a91a62c799238385d02db4c414dde1ed6b3a88643 WHIRLPOOL 9654e03a2a378037c729a568950fb6ab5ff3c0561da629519c4adc73b0910d5c3749cf6b33efb162c62f29fda7b96ad1133f019429117630d212b1e177a60bb3
|
||||
AUX php_ext-config.m4 3016 SHA256 38be23cd66b7aaa09e8200721ead7be7ea7f19ffcdd13b43e90469d45f6264e6 SHA512 40d00f6a2e756965972e039de47264fcb434f10d6385dc1fa2b1caf3623344b996522b686cc2c9de6ab303f11defe9ddea3467de9c1b6351681a544b9932622f WHIRLPOOL f8ce7b3f101b60e0489b8e1b75b84777694e36415b7059ba2294c28560abd2d21fca40549198ace95a213dfac1864f8fce3c42d169fb8d2db8fcf53827efc412
|
||||
DIST ming-0.4.5.tar.bz2 14234048 SHA256 82da089bdfc3a7fcb732dc11c11a35003ee270d5102d4043d61ea69834239aeb SHA512 9e5a2fb558841e72a072e2c29a0871dc7056ab57f1e6feca864b9b0961841334c4d2c6bc731bc4e043eb96b63fb946738cb1b8b54ef45679fcbf9bcf82adea31 WHIRLPOOL 2315adb1ed2b8878843ce5eef54f7c4386a69c809820aa4d2040fe4d94c0fa367cc57966a78e327f6a578c99b3ed4b1fa5d352106df9283f3b2d7f87a1178203
|
||||
EBUILD ming-php-0.4.5.ebuild 1302 SHA256 abdbea1a2631180a6a62a8b3cae7bb6a2decb999d964e4afe5de06e291bf64af SHA512 5463c04b928ccaf50bfe388de6b666d1b1691b834c92036f609cd337d68ceac2bcca14941b2dd1847a455a0a3a234796f4bb708473085cd31fa61b02089da6cb WHIRLPOOL 7f7337335b0d6076b59e4061a1fa3f32fc8f959fc5171761e40458c9a9487ec34ad1f96fc832f5ebe47a3547f5725528ca498640dbc94f4b1df58c8d008a2184
|
||||
MISC ChangeLog 424 SHA256 ad530c9f0880a0c03d1370ea26694515c3bbc6431ebcddaa25417ba3b1538d9b SHA512 7e40846727f909e37ca81dc40bb840f7d9cc036f576d2c37cd294832e48e4fdcf6b89aa3015c669e39e5ccc9738d738dbb052be5c5f0a6fe3ff64082e1946bf9 WHIRLPOOL 98b56f629a511477f6f2e8d337ce9cee098c131ab04f90f669b52247be6ae85e7353d3166a43a8f5774c2993bb42d9b9a1caf5a40ab2273799ed4fe0a21c0523
|
||||
MISC metadata.xml 250 SHA256 33ef9185374c47b813407c3e660dcbf4c995386129342679558d38468988e0d6 SHA512 da6e86c5060ebdc4160952e5c7c829fa63a17bde27639696dce67c5fbb4d739ba7c1d364679ee624185f48a6ceb56c552bad7c75c1edb581126a1a4c7343d12c WHIRLPOOL 8f2db45ad94cc8ca67c7cf15a1effb4f73fcc43a39d08f32fdc7671d56828c771b274a59677172377a09aa5070879ef805fec58c98ded8e3a822878b624cef02
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v2.0
|
||||
|
||||
iQIcBAEBCAAGBQJUwTKeAAoJENH3ge/59KO2254P/2abCT+O++lxKjz7LvuDHuT4
|
||||
wdEf3IRZaxFAhSiVxB+s419RZKo4aFwriizbPyhTAZQTDqp0mIaUPTZMfMiK/O04
|
||||
cgwT5FauKmpbXFYNZpd3GOn/cvZoA1xCLv+snh6AkBO21sSJ7+XKQeMU0XGisZdv
|
||||
HGnE/RHD1W/afKgAHcaYmUVZucvU1Cpa5h3YpD/cuc1owBF07doQINdBUbRfsI+u
|
||||
uQjeminX2+aM3AqHtLCTbOuWxqkbzWnQaxBlW/aVPrhIN/ZgMeTa8fsVfmnSaSA+
|
||||
SajXELitfuFsdtPWLqXTgKtHzekZXaSaygQn1ayX22dE+M98NF7Tox4EgRUgEur4
|
||||
bNu3+TiaYS7Lg4gu9Hvka66mB/h38le2r2CP4Q3AWd2+UTAYz9b7gVn1e8Efrypk
|
||||
3nWXs7uOfj8/kiGY0OLwZztRqYCd0tWMdG37Ho3KlqEFJt8RjePx73dlaxyERXu4
|
||||
ZLv7HBRneZOXV+R34lfQHZrv8IX45lvq6CDK8zuA7y42C4jBlENjgdBjXxh8AnLL
|
||||
2YsYM5h6n4+bTVP3i/440vMRNS3WlFmltBBOJY5trrqjZHFvFXy5YeQjxNcFGWDE
|
||||
nGK4TeGkYJoRR0YuBIq91meeqEGE2/5KvBtgxgnvHJw7+Jd6c+CODoh8LYlCrXlf
|
||||
4VI8+so4ds7nZcQtOZof
|
||||
=7r53
|
||||
-----END PGP SIGNATURE-----
|
@ -0,0 +1,479 @@
|
||||
--- ming.c.orig 2015-01-19 21:46:35.299042679 -0500
|
||||
+++ ming.c 2015-01-19 21:52:00.566380663 -0500
|
||||
@@ -370,7 +370,7 @@
|
||||
|
||||
input = newSWFInput_file(file);
|
||||
zend_list_addref(Z_LVAL_P(zfile));
|
||||
- zend_list_addref(zend_list_insert(input, le_swfinputp));
|
||||
+ zend_list_addref(zend_list_insert(input, le_swfinputp TSRMLS_CC));
|
||||
return input;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -410,7 +410,7 @@
|
||||
|
||||
input = newSWFInput_bufferCopy((unsigned char *)data, data_len);
|
||||
|
||||
- ret = zend_list_insert(input, le_swfinputp);
|
||||
+ ret = zend_list_insert(input, le_swfinputp TSRMLS_CC);
|
||||
object_init_ex(getThis(), input_class_entry_ptr);
|
||||
add_property_resource(getThis(), "input", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -449,7 +449,7 @@
|
||||
|
||||
fc = newSWFFontCollection_fromFile(filename);
|
||||
if(fc) {
|
||||
- ret = zend_list_insert(fc, le_swffontcollectionp);
|
||||
+ ret = zend_list_insert(fc, le_swffontcollectionp TSRMLS_CC);
|
||||
object_init_ex(getThis(), fontcollection_class_entry_ptr);
|
||||
add_property_resource(getThis(), "fontcollection", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -479,7 +479,7 @@
|
||||
font = SWFFontCollection_getFont(getFontCollection(getThis() TSRMLS_CC), index);
|
||||
|
||||
if(font != NULL) {
|
||||
- ret = zend_list_insert(font, le_swffontp);
|
||||
+ ret = zend_list_insert(font, le_swffontp TSRMLS_CC);
|
||||
object_init_ex(return_value, font_class_entry_ptr);
|
||||
add_property_resource(return_value, "font", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -527,7 +527,7 @@
|
||||
|
||||
font = newSWFBrowserFont(name);
|
||||
if(font) {
|
||||
- ret = zend_list_insert(font, le_swfbrowserfontp);
|
||||
+ ret = zend_list_insert(font, le_swfbrowserfontp TSRMLS_CC);
|
||||
object_init_ex(getThis(), browserfont_class_entry_ptr);
|
||||
add_property_resource(getThis(), "browserfont", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -573,7 +573,7 @@
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
- ret = zend_list_insert(cx, le_swfcxformp);
|
||||
+ ret = zend_list_insert(cx, le_swfcxformp TSRMLS_CC);
|
||||
object_init_ex(getThis(), cxform_class_entry_ptr);
|
||||
add_property_resource(getThis(), "cx", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -736,7 +736,7 @@
|
||||
init = newSWFInitAction_withId(getAction(zaction TSRMLS_CC), id);
|
||||
}
|
||||
|
||||
- ret = zend_list_insert(init, le_swfinitactionp);
|
||||
+ ret = zend_list_insert(init, le_swfinitactionp TSRMLS_CC);
|
||||
object_init_ex(getThis(), initaction_class_entry_ptr);
|
||||
add_property_resource(getThis(), "initaction", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -785,7 +785,7 @@
|
||||
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Couldn't compile actionscript");
|
||||
}
|
||||
|
||||
- ret = zend_list_insert(action, le_swfactionp);
|
||||
+ ret = zend_list_insert(action, le_swfactionp TSRMLS_CC);
|
||||
|
||||
object_init_ex(getThis(), action_class_entry_ptr);
|
||||
add_property_resource(getThis(), "action", ret);
|
||||
@@ -863,7 +863,7 @@
|
||||
input = newSWFInput_filename(Z_STRVAL_P(zfile));
|
||||
if(input == NULL)
|
||||
php_error(E_ERROR, "opening bitmap file failed");
|
||||
- zend_list_addref(zend_list_insert(input, le_swfinputp));
|
||||
+ zend_list_addref(zend_list_insert(input, le_swfinputp TSRMLS_CC));
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -884,7 +884,7 @@
|
||||
maskinput = newSWFInput_filename(Z_STRVAL_P(zmask));
|
||||
if(maskinput == NULL)
|
||||
php_error(E_ERROR, "opening mask file failed");
|
||||
- zend_list_addref(zend_list_insert(maskinput, le_swfinputp));
|
||||
+ zend_list_addref(zend_list_insert(maskinput, le_swfinputp TSRMLS_CC));
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -895,7 +895,7 @@
|
||||
/* XXX: this is very optimistic! is it really a JPEG ?!? */
|
||||
bitmap_alpha = newSWFJpegWithAlpha_fromInput(input, maskinput);
|
||||
if(bitmap_alpha) {
|
||||
- ret = zend_list_insert(bitmap_alpha, le_swfbitmapp);
|
||||
+ ret = zend_list_insert(bitmap_alpha, le_swfbitmapp TSRMLS_CC);
|
||||
object_init_ex(getThis(), bitmap_class_entry_ptr);
|
||||
add_property_resource(getThis(), "bitmap", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -903,7 +903,7 @@
|
||||
} else {
|
||||
bitmap = newSWFBitmap_fromInput(input);
|
||||
if(bitmap) {
|
||||
- ret = zend_list_insert(bitmap, le_swfbitmapp);
|
||||
+ ret = zend_list_insert(bitmap, le_swfbitmapp TSRMLS_CC);
|
||||
object_init_ex(getThis(), bitmap_class_entry_ptr);
|
||||
add_property_resource(getThis(), "bitmap", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -1164,7 +1164,7 @@
|
||||
PHP_METHOD(swfbutton, __construct)
|
||||
{
|
||||
SWFButton button = newSWFButton();
|
||||
- int ret = zend_list_insert(button, le_swfbuttonp);
|
||||
+ int ret = zend_list_insert(button, le_swfbuttonp TSRMLS_CC);
|
||||
|
||||
object_init_ex(getThis(), button_class_entry_ptr);
|
||||
add_property_resource(getThis(), "button", ret);
|
||||
@@ -1297,7 +1297,7 @@
|
||||
|
||||
if(record != NULL)
|
||||
{
|
||||
- ret = zend_list_insert(record, le_swfbuttonrecordp);
|
||||
+ ret = zend_list_insert(record, le_swfbuttonrecordp TSRMLS_CC);
|
||||
object_init_ex(return_value, buttonrecord_class_entry_ptr);
|
||||
add_property_resource(return_value, "buttonrecord", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -1384,7 +1384,7 @@
|
||||
|
||||
if(item != NULL) {
|
||||
/* try and create a soundinstance object */
|
||||
- ret = zend_list_insert(item, le_swfsoundinstancep);
|
||||
+ ret = zend_list_insert(item, le_swfsoundinstancep TSRMLS_CC);
|
||||
object_init_ex(return_value, soundinstance_class_entry_ptr);
|
||||
add_property_resource(return_value, "soundinstance", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -1971,7 +1971,7 @@
|
||||
m = SWFDisplayItem_getMatrix(getDisplayItem(getThis() TSRMLS_CC));
|
||||
if(m != NULL)
|
||||
{
|
||||
- ret = zend_list_insert(m, le_swfmatrixp);
|
||||
+ ret = zend_list_insert(m, le_swfmatrixp TSRMLS_CC);
|
||||
object_init_ex(return_value, matrix_class_entry_ptr);
|
||||
add_property_resource(return_value, "matrix", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -1992,7 +1992,7 @@
|
||||
c = SWFDisplayItem_getCharacter(getDisplayItem(getThis() TSRMLS_CC));
|
||||
if(c != NULL)
|
||||
{
|
||||
- ret = zend_list_insert(c, le_swfcharacterp);
|
||||
+ ret = zend_list_insert(c, le_swfcharacterp TSRMLS_CC);
|
||||
object_init_ex(return_value, character_class_entry_ptr);
|
||||
add_property_resource(return_value, "character", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -2366,7 +2366,7 @@
|
||||
|
||||
if(font)
|
||||
{
|
||||
- ret = zend_list_insert(font, le_swffontp);
|
||||
+ ret = zend_list_insert(font, le_swffontp TSRMLS_CC);
|
||||
object_init_ex(getThis(), font_class_entry_ptr);
|
||||
add_property_resource(getThis(), "font", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -2537,7 +2537,7 @@
|
||||
|
||||
matrix = newSWFFilterMatrix(cols, rows, values);
|
||||
free(values); /* array is copied by libming */
|
||||
- ret = zend_list_insert(matrix, le_swffiltermatrixp);
|
||||
+ ret = zend_list_insert(matrix, le_swffiltermatrixp TSRMLS_CC);
|
||||
object_init_ex(getThis(), filtermatrix_class_entry_ptr);
|
||||
add_property_resource(getThis(), "filtermatrix", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -2582,7 +2582,7 @@
|
||||
}
|
||||
|
||||
shadow = newSWFShadow(angle, distance, strength);
|
||||
- ret = zend_list_insert(shadow, le_swfshadowp);
|
||||
+ ret = zend_list_insert(shadow, le_swfshadowp TSRMLS_CC);
|
||||
object_init_ex(getThis(), shadow_class_entry_ptr);
|
||||
add_property_resource(getThis(), "shadow", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -2628,7 +2628,7 @@
|
||||
}
|
||||
|
||||
blur = newSWFBlur(blurX, blurY, passes);
|
||||
- ret = zend_list_insert(blur, le_swfblurp);
|
||||
+ ret = zend_list_insert(blur, le_swfblurp TSRMLS_CC);
|
||||
object_init_ex(getThis(), blur_class_entry_ptr);
|
||||
add_property_resource(getThis(), "blur", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -2665,7 +2665,7 @@
|
||||
PHP_METHOD(swfgradient, __construct)
|
||||
{
|
||||
SWFGradient gradient = newSWFGradient();
|
||||
- int ret = zend_list_insert(gradient, le_swfgradientp);
|
||||
+ int ret = zend_list_insert(gradient, le_swfgradientp TSRMLS_CC);
|
||||
|
||||
object_init_ex(getThis(), gradient_class_entry_ptr);
|
||||
add_property_resource(getThis(), "gradient", ret);
|
||||
@@ -3076,7 +3076,7 @@
|
||||
if(filter == NULL)
|
||||
WRONG_PARAM_COUNT;
|
||||
|
||||
- ret = zend_list_insert(filter, le_swffilterp);
|
||||
+ ret = zend_list_insert(filter, le_swffilterp TSRMLS_CC);
|
||||
object_init_ex(getThis(), filter_class_entry_ptr);
|
||||
add_property_resource(getThis(), "filter", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -3115,7 +3115,7 @@
|
||||
PHP_METHOD(swfmorph, __construct)
|
||||
{
|
||||
SWFMorph morph = newSWFMorphShape();
|
||||
- int ret = zend_list_insert(morph, le_swfmorphp);
|
||||
+ int ret = zend_list_insert(morph, le_swfmorphp TSRMLS_CC);
|
||||
|
||||
object_init_ex(getThis(), morph_class_entry_ptr);
|
||||
add_property_resource(getThis(), "morph", ret);
|
||||
@@ -3147,7 +3147,7 @@
|
||||
{
|
||||
SWFMorph morph = getMorph(getThis() TSRMLS_CC);
|
||||
SWFShape shape = SWFMorph_getShape1(morph);
|
||||
- int ret = zend_list_insert(shape, le_swfshapep);
|
||||
+ int ret = zend_list_insert(shape, le_swfshapep TSRMLS_CC);
|
||||
|
||||
object_init_ex(return_value, shape_class_entry_ptr);
|
||||
add_property_resource(return_value, "shape", ret);
|
||||
@@ -3161,7 +3161,7 @@
|
||||
{
|
||||
SWFMorph morph = getMorph(getThis() TSRMLS_CC);
|
||||
SWFShape shape = SWFMorph_getShape2(morph);
|
||||
- int ret = zend_list_insert(shape, le_swfshapep);
|
||||
+ int ret = zend_list_insert(shape, le_swfshapep TSRMLS_CC);
|
||||
|
||||
object_init_ex(return_value, shape_class_entry_ptr);
|
||||
add_property_resource(return_value, "shape", ret);
|
||||
@@ -3205,7 +3205,7 @@
|
||||
input = newSWFInput_filename(Z_STRVAL_P(zfile));
|
||||
if(input == NULL)
|
||||
php_error(E_ERROR, "opening sound file failed");
|
||||
- zend_list_addref(zend_list_insert(input, le_swfinputp));
|
||||
+ zend_list_addref(zend_list_insert(input, le_swfinputp TSRMLS_CC));
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -3216,7 +3216,7 @@
|
||||
sound = newSWFSoundStream_fromInput(input);
|
||||
|
||||
if(sound) {
|
||||
- ret = zend_list_insert(sound, le_swfsoundstreamp);
|
||||
+ ret = zend_list_insert(sound, le_swfsoundstreamp TSRMLS_CC);
|
||||
object_init_ex(getThis(), soundstream_class_entry_ptr);
|
||||
add_property_resource(getThis(), "soundstream", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -3331,7 +3331,7 @@
|
||||
input = newSWFInput_filename(Z_STRVAL_P(zfile));
|
||||
if(input == NULL)
|
||||
php_error(E_ERROR, "opening sound file failed");
|
||||
- zend_list_addref(zend_list_insert(input, le_swfinputp));
|
||||
+ zend_list_addref(zend_list_insert(input, le_swfinputp TSRMLS_CC));
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -3343,7 +3343,7 @@
|
||||
|
||||
if(sound != NULL)
|
||||
{
|
||||
- ret = zend_list_insert(sound, le_swfsoundp);
|
||||
+ ret = zend_list_insert(sound, le_swfsoundp TSRMLS_CC);
|
||||
object_init_ex(getThis(), sound_class_entry_ptr);
|
||||
add_property_resource(getThis(), "sound", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -3479,7 +3479,7 @@
|
||||
input = newSWFInput_filename(Z_STRVAL_P(zfile));
|
||||
if(input == NULL)
|
||||
php_error(E_ERROR, "opening sound video failed");
|
||||
- zend_list_addref(zend_list_insert(input, le_swfinputp));
|
||||
+ zend_list_addref(zend_list_insert(input, le_swfinputp TSRMLS_CC));
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -3496,7 +3496,7 @@
|
||||
}
|
||||
|
||||
if(stream) {
|
||||
- ret = zend_list_insert(stream, le_swfvideostreamp);
|
||||
+ ret = zend_list_insert(stream, le_swfvideostreamp TSRMLS_CC);
|
||||
object_init_ex(getThis(), videostream_class_entry_ptr);
|
||||
add_property_resource(getThis(), "videostream", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -3646,7 +3646,7 @@
|
||||
bd = newSWFBinaryData((unsigned char *)data, data_len);
|
||||
|
||||
if(bd) {
|
||||
- ret = zend_list_insert(bd, le_swfbinarydatap);
|
||||
+ ret = zend_list_insert(bd, le_swfbinarydatap TSRMLS_CC);
|
||||
object_init_ex(getThis(), binarydata_class_entry_ptr);
|
||||
add_property_resource(getThis(), "binarydata", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -3704,7 +3704,7 @@
|
||||
input = newSWFInput_filename(Z_STRVAL_P(zfile));
|
||||
if(input == NULL)
|
||||
php_error(E_ERROR, "opening prebuilt clip file failed");
|
||||
- zend_list_addref(zend_list_insert(input, le_swfinputp));
|
||||
+ zend_list_addref(zend_list_insert(input, le_swfinputp TSRMLS_CC));
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -3715,7 +3715,7 @@
|
||||
clip = newSWFPrebuiltClip_fromInput(input);
|
||||
|
||||
if(clip) {
|
||||
- ret = zend_list_insert(clip, le_swfprebuiltclipp);
|
||||
+ ret = zend_list_insert(clip, le_swfprebuiltclipp TSRMLS_CC);
|
||||
object_init_ex(getThis(), prebuiltclip_class_entry_ptr);
|
||||
add_property_resource(getThis(), "prebuiltclip", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -3768,7 +3768,7 @@
|
||||
movie = newSWFMovie(); /* default version 4 */
|
||||
}
|
||||
|
||||
- ret = zend_list_insert(movie, le_swfmoviep);
|
||||
+ ret = zend_list_insert(movie, le_swfmoviep TSRMLS_CC);
|
||||
|
||||
object_init_ex(getThis(), movie_class_entry_ptr);
|
||||
add_property_resource(getThis(), "movie", ret);
|
||||
@@ -3880,7 +3880,7 @@
|
||||
item = SWFMovie_add_internal(movie, ublock);
|
||||
if (item != NULL) {
|
||||
/* try and create a displayitem object */
|
||||
- ret = zend_list_insert(item, le_swfdisplayitemp);
|
||||
+ ret = zend_list_insert(item, le_swfdisplayitemp TSRMLS_CC);
|
||||
object_init_ex(return_value, displayitem_class_entry_ptr);
|
||||
add_property_resource(return_value, "displayitem", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -4242,7 +4242,7 @@
|
||||
php_error(E_ERROR, "opening mp3 file failed");
|
||||
}
|
||||
|
||||
- zend_list_addref(zend_list_insert(input, le_swfinputp));
|
||||
+ zend_list_addref(zend_list_insert(input, le_swfinputp TSRMLS_CC));
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -4327,7 +4327,7 @@
|
||||
if(item != NULL)
|
||||
{
|
||||
/* try and create a soundinstance object */
|
||||
- ret = zend_list_insert(item, le_swfsoundinstancep);
|
||||
+ ret = zend_list_insert(item, le_swfsoundinstancep TSRMLS_CC);
|
||||
object_init_ex(return_value, soundinstance_class_entry_ptr);
|
||||
add_property_resource(return_value, "soundinstance", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -4369,7 +4369,7 @@
|
||||
character = SWFMovie_importCharacter(movie, libswf, name);
|
||||
if(character != NULL)
|
||||
{
|
||||
- ret = zend_list_insert(character, le_swfcharacterp);
|
||||
+ ret = zend_list_insert(character, le_swfcharacterp TSRMLS_CC);
|
||||
object_init_ex(return_value, character_class_entry_ptr);
|
||||
add_property_resource(return_value, "character", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -4397,7 +4397,7 @@
|
||||
if(res != NULL)
|
||||
{
|
||||
/* try and create a fontchar object */
|
||||
- ret = zend_list_insert(res, le_swffontcharp);
|
||||
+ ret = zend_list_insert(res, le_swffontcharp TSRMLS_CC);
|
||||
object_init_ex(return_value, fontchar_class_entry_ptr);
|
||||
add_property_resource(return_value, "fontcharacter", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -4424,7 +4424,7 @@
|
||||
if(res != NULL)
|
||||
{
|
||||
/* try and create a fontchar object */
|
||||
- ret = zend_list_insert(res, le_swffontcharp);
|
||||
+ ret = zend_list_insert(res, le_swffontcharp TSRMLS_CC);
|
||||
object_init_ex(return_value, fontchar_class_entry_ptr);
|
||||
add_property_resource(return_value, "fontcharacter", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -4509,7 +4509,7 @@
|
||||
PHP_METHOD(swfshape, __construct)
|
||||
{
|
||||
SWFShape shape = newSWFShape();
|
||||
- int ret = zend_list_insert(shape, le_swfshapep);
|
||||
+ int ret = zend_list_insert(shape, le_swfshapep TSRMLS_CC);
|
||||
|
||||
object_init_ex(getThis(), shape_class_entry_ptr);
|
||||
add_property_resource(getThis(), "shape", ret);
|
||||
@@ -4575,7 +4575,7 @@
|
||||
}
|
||||
|
||||
/* return an SWFFill object */
|
||||
- ret = zend_list_insert(fill, le_swffillp);
|
||||
+ ret = zend_list_insert(fill, le_swffillp TSRMLS_CC);
|
||||
object_init_ex(return_value, fill_class_entry_ptr);
|
||||
add_property_resource(return_value, "fill", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -4618,7 +4618,7 @@
|
||||
}
|
||||
|
||||
/* return an SWFFill object */
|
||||
- ret = zend_list_insert(fill, le_swffillp);
|
||||
+ ret = zend_list_insert(fill, le_swffillp TSRMLS_CC);
|
||||
object_init_ex(return_value, fill_class_entry_ptr);
|
||||
add_property_resource(return_value, "fill", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -4664,7 +4664,7 @@
|
||||
}
|
||||
|
||||
/* return an SWFFill object */
|
||||
- ret = zend_list_insert(fill, le_swffillp);
|
||||
+ ret = zend_list_insert(fill, le_swffillp TSRMLS_CC);
|
||||
object_init_ex(return_value, fill_class_entry_ptr);
|
||||
add_property_resource(return_value, "fill", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -4719,7 +4719,7 @@
|
||||
}
|
||||
|
||||
/* return an SWFFill object */
|
||||
- ret = zend_list_insert(fill, le_swffillp);
|
||||
+ ret = zend_list_insert(fill, le_swffillp TSRMLS_CC);
|
||||
object_init_ex(return_value, fill_class_entry_ptr);
|
||||
add_property_resource(return_value, "fill", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -5209,7 +5209,7 @@
|
||||
PHP_METHOD(swfsprite, __construct)
|
||||
{
|
||||
SWFMovieClip sprite = newSWFMovieClip();
|
||||
- int ret = zend_list_insert(sprite, le_swfspritep);
|
||||
+ int ret = zend_list_insert(sprite, le_swfspritep TSRMLS_CC);
|
||||
|
||||
object_init_ex(getThis(), sprite_class_entry_ptr);
|
||||
add_property_resource(getThis(), "sprite", ret);
|
||||
@@ -5259,7 +5259,7 @@
|
||||
|
||||
if (item != NULL) {
|
||||
/* try and create a displayitem object */
|
||||
- ret = zend_list_insert(item, le_swfdisplayitemp);
|
||||
+ ret = zend_list_insert(item, le_swfdisplayitemp TSRMLS_CC);
|
||||
object_init_ex(return_value, displayitem_class_entry_ptr);
|
||||
add_property_resource(return_value, "displayitem", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -5342,7 +5342,7 @@
|
||||
|
||||
if(item != NULL) {
|
||||
/* try and create a displayitem object */
|
||||
- ret = zend_list_insert(item, le_swfsoundinstancep);
|
||||
+ ret = zend_list_insert(item, le_swfsoundinstancep TSRMLS_CC);
|
||||
object_init_ex(return_value, soundinstance_class_entry_ptr);
|
||||
add_property_resource(return_value, "soundinstance", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -5400,7 +5400,7 @@
|
||||
input = newSWFInput_filename(Z_STRVAL_P(zfile));
|
||||
if(input == NULL)
|
||||
php_error(E_ERROR, "opening sound file failed");
|
||||
- zend_list_addref(zend_list_insert(input, le_swfinputp));
|
||||
+ zend_list_addref(zend_list_insert(input, le_swfinputp TSRMLS_CC));
|
||||
break;
|
||||
|
||||
}
|
||||
@@ -5521,7 +5521,7 @@
|
||||
text = newSWFText2();
|
||||
}
|
||||
|
||||
- int ret = zend_list_insert(text, le_swftextp);
|
||||
+ int ret = zend_list_insert(text, le_swftextp TSRMLS_CC);
|
||||
object_init_ex(getThis(), text_class_entry_ptr);
|
||||
add_property_resource(getThis(), "text", ret);
|
||||
zend_list_addref(ret);
|
||||
@@ -5794,7 +5794,7 @@
|
||||
{
|
||||
long flags = 0;
|
||||
SWFTextField field = newSWFTextField();
|
||||
- int ret = zend_list_insert(field, le_swftextfieldp);
|
||||
+ int ret = zend_list_insert(field, le_swftextfieldp TSRMLS_CC);
|
||||
|
||||
object_init_ex(getThis(), textfield_class_entry_ptr);
|
||||
add_property_resource(getThis(), "textfield", ret);
|
@ -0,0 +1,116 @@
|
||||
dnl
|
||||
dnl $Id: php_ext-config.m4,v 1.1 2015/01/22 17:25:49 grknight Exp $
|
||||
dnl
|
||||
|
||||
PHP_LIBDIR=lib
|
||||
|
||||
PHP_ARG_WITH(ming, for MING support,
|
||||
[ --with-ming[=DIR] Include MING support])
|
||||
|
||||
if test "$PHP_MING" != "no"; then
|
||||
AC_CHECK_LIB(m, sin)
|
||||
|
||||
for i in $PHP_MING ../../src /usr/local /usr; do
|
||||
if test -f $i/$PHP_LIBDIR/libming.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libming.a; then
|
||||
MING_DIR=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test -z "$MING_DIR"; then
|
||||
AC_MSG_ERROR(Please reinstall ming distribution. libming.(a|so) not found.)
|
||||
fi
|
||||
|
||||
for i in ../../src $MING_DIR/include $MING_DIR/include/ming $MING_DIR/ming/include; do
|
||||
if test -f $i/ming.h; then
|
||||
MING_INC_DIR=$i
|
||||
fi
|
||||
done
|
||||
|
||||
if test -z "$MING_INC_DIR"; then
|
||||
AC_MSG_ERROR(Please reinstall ming distribution. ming.h not found.)
|
||||
fi
|
||||
|
||||
PHP_CHECK_LIBRARY(ming, Ming_useSWFVersion, [
|
||||
AC_DEFINE(HAVE_MING,1,[ ])
|
||||
],[
|
||||
AC_MSG_ERROR([Ming library 0.2a or greater required.])
|
||||
],[
|
||||
-L$MING_DIR/$PHP_LIBDIR
|
||||
])
|
||||
|
||||
PHP_ADD_INCLUDE($MING_INC_DIR)
|
||||
PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_DIR/$PHP_LIBDIR, MING_SHARED_LIBADD)
|
||||
|
||||
old_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS=-I$MING_INC_DIR
|
||||
AC_MSG_CHECKING([for destroySWFBlock])
|
||||
AC_TRY_RUN([
|
||||
#include "ming.h"
|
||||
int destroySWFBlock(int a, int b) {
|
||||
return a+b;
|
||||
}
|
||||
int main() {
|
||||
return destroySWFBlock(-1,1); /* returns 0 only if function is not yet defined */
|
||||
}
|
||||
],[
|
||||
AC_MSG_RESULT([missing])
|
||||
],[
|
||||
AC_DEFINE(HAVE_DESTROY_SWF_BLOCK,1,[ ])
|
||||
AC_MSG_RESULT([ok])
|
||||
],[
|
||||
AC_MSG_RESULT([unknown])
|
||||
])
|
||||
|
||||
dnl Check Ming version (FIXME: if/when ming has some better way to detect the version..)
|
||||
AC_EGREP_CPP(yes, [
|
||||
#include <ming.h>
|
||||
#ifdef SWF_SOUND_COMPRESSION
|
||||
yes
|
||||
#endif
|
||||
], [
|
||||
AC_DEFINE(HAVE_NEW_MING, 1, [ ])
|
||||
dnl FIXME: This is now unconditional..better check coming later.
|
||||
])
|
||||
|
||||
dnl Check if SWFVideoStream_setFrameMode() is available
|
||||
AC_TRY_COMPILE([
|
||||
#include <ming.h>
|
||||
], [
|
||||
int main(void) { SWFVideoStream_setFrameMode(0, 0); return 0; }
|
||||
], [
|
||||
AC_DEFINE(HAVE_SWFVIDEOSTREAM_SETFRAMEMODE, 1, [Have SWFVideoStream_setFrameMode(SWFVideoStream, int)])
|
||||
], [])
|
||||
|
||||
dnl Check if SWFVideoStream_nextFrame() is available
|
||||
AC_TRY_COMPILE([
|
||||
#include <ming.h>
|
||||
], [
|
||||
int main(void) { SWFVideoStream_nextFrame(0); return 0; }
|
||||
], [
|
||||
AC_DEFINE(HAVE_SWFVIDEOSTREAM_NEXTFRAME, 1, [Have SWFVideoStream_nextFrame(SWFVideoStream)])
|
||||
], [])
|
||||
|
||||
dnl Check if SWFVideoStream_seek() is available
|
||||
AC_TRY_COMPILE([
|
||||
#include <ming.h>
|
||||
], [
|
||||
int main(void) { SWFVideoStream_seek(0, 0, 0); return 0; }
|
||||
], [
|
||||
AC_DEFINE(HAVE_SWFVIDEOSTREAM_SEEK, 1, [Have SWFVideoStream_seek(SWFVideoStream, int frame, int whence)])
|
||||
], [])
|
||||
|
||||
|
||||
dnl Check if SWFMovie_output() accepts the 4th parameter
|
||||
AC_TRY_COMPILE([
|
||||
#include <ming.h>
|
||||
], [
|
||||
int main(void) { SWFMovie_output(NULL, NULL, NULL, 0); return 0; }
|
||||
], [
|
||||
AC_DEFINE(HAVE_MING_MOVIE_LEVEL, 1, [ ])
|
||||
], [])
|
||||
CPPFLAGS=$old_CPPFLAGS
|
||||
|
||||
PHP_NEW_EXTENSION(ming, ming.c, $ext_shared)
|
||||
PHP_SUBST(MING_SHARED_LIBADD)
|
||||
fi
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer>
|
||||
<email>grknight@gentoo.org</email>
|
||||
<name>Brian Evans</name>
|
||||
</maintainer>
|
||||
<herd>php</herd>
|
||||
</pkgmetadata>
|
@ -0,0 +1,45 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-php/ming-php/ming-php-0.4.5.ebuild,v 1.1 2015/01/22 17:25:49 grknight Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
PHP_EXT_NAME=ming
|
||||
MY_P="${PHP_EXT_NAME}-${PV}"
|
||||
USE_PHP="php5-4 php5-5 php5-6"
|
||||
PHP_EXT_S="${MY_P}/php_ext"
|
||||
inherit flag-o-matic php-ext-source-r2
|
||||
|
||||
DESCRIPTION="PHP extension for the ming Flash movie generation library"
|
||||
HOMEPAGE="http://ming.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/ming/${MY_P}.tar.bz2"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="media-libs/ming"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_prepare() {
|
||||
local slot orig_s="${PHP_EXT_S}"
|
||||
for slot in $(php_get_slots); do
|
||||
cp "${FILESDIR}/php_ext-config.m4" "${WORKDIR}/${slot}/config.m4" || \
|
||||
die "Failed to copy config.m4 to target"
|
||||
rm "${WORKDIR}/${slot}/Makefile.am" || die "Failed to remove Makefile.am for ${slot}"
|
||||
php_init_slot_env ${slot}
|
||||
epatch "${FILESDIR}/ming-php-54.patch"
|
||||
php-ext-source-r2_phpize
|
||||
done
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# build is sensitive to -O3 (bug #297437)
|
||||
replace-flags -O3 -O2
|
||||
|
||||
local my_conf="--with-ming=${S}"
|
||||
php-ext-source-r2_src_configure
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/adns-python/adns-python-1.2.1.ebuild,v 1.13 2012/02/21 08:06:21 patrick Exp $
|
||||
|
||||
EAPI="3"
|
||||
PYTHON_DEPEND="2"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="3.* *-jython"
|
||||
|
||||
inherit distutils
|
||||
|
||||
DESCRIPTION="Python bindings for ADNS"
|
||||
HOMEPAGE="http://code.google.com/p/adns-python/ http://pypi.python.org/pypi/adns-python"
|
||||
SRC_URI="http://adns-python.googlecode.com/files/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=">=net-libs/adns-1.3"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
PYTHON_MODNAME="ADNS.py DNSBL.py"
|
@ -1,39 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/apse/apse-0.2-r1.ebuild,v 1.4 2014/08/10 21:06:55 slyfox Exp $
|
||||
|
||||
EAPI="3"
|
||||
PYTHON_DEPEND="2"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="3.* *-jython"
|
||||
|
||||
inherit distutils
|
||||
|
||||
MY_PN="Apse"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
DESCRIPTION="Approximate String Matching in Python"
|
||||
HOMEPAGE="http://www.personal.psu.edu/staff/i/u/iua1/python/apse/"
|
||||
SRC_URI="http://www.personal.psu.edu/staff/i/u/iua1/python/${PN}/dist/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="dev-lang/swig"
|
||||
RDEPEND=""
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
|
||||
|
||||
DOCS="README* *agrep"
|
||||
PYTHON_MODNAME="Apse.py"
|
||||
|
||||
src_test() {
|
||||
testing() {
|
||||
PYTHONPATH="$(ls -d build-${PYTHON_ABI}/lib.*)" "$(PYTHON)" test/test_Apse.py
|
||||
}
|
||||
python_execute_function testing
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/apse/apse-0.2-r2.ebuild,v 1.4 2014/08/10 21:06:55 slyfox Exp $
|
||||
|
||||
EAPI=5
|
||||
PYTHON_COMPAT=( python{2_6,2_7} pypy pypy2_0 )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
MY_P="Apse-${PV}"
|
||||
|
||||
DESCRIPTION="Approximate String Matching in Python"
|
||||
HOMEPAGE="http://www.personal.psu.edu/staff/i/u/iua1/python/apse/"
|
||||
SRC_URI="http://www.personal.psu.edu/staff/i/u/iua1/python/${PN}/dist/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=""
|
||||
DEPEND="<dev-lang/swig-2"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
python_prepare_all() {
|
||||
# Prevent the build system from calling swig over and over again.
|
||||
sed -i -e 's:Apse.i:Apse_wrap.c:' setup.py || die
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_configure_all() {
|
||||
set -- swig -python -o Apse_wrap.c Apse.i
|
||||
echo "${@}" >&2
|
||||
"${@}" || die
|
||||
}
|
||||
|
||||
python_test() {
|
||||
"${PYTHON}" test/test_Apse.py || die "Tests fail with ${EPYTHON}"
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/arrayterator/arrayterator-1.0.1.ebuild,v 1.5 2014/08/10 21:07:02 slyfox Exp $
|
||||
|
||||
EAPI="2"
|
||||
PYTHON_DEPEND="2"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="3.*"
|
||||
|
||||
inherit distutils
|
||||
|
||||
DESCRIPTION="This class creates a buffered iterator for reading big arrays in small contiguous blocks"
|
||||
HOMEPAGE="http://pypi.python.org/pypi/arrayterator"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=">=dev-python/numpy-1.0_rc1"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-python/setuptools"
|
||||
|
||||
PYTHON_MODNAME="arrayterator.py"
|
||||
|
||||
src_test() {
|
||||
cd tests
|
||||
|
||||
testing() {
|
||||
PYTHONPATH="../build-${PYTHON_ABI}/lib" "$(PYTHON)" -c "import test_stochastic; test_stochastic.test()"
|
||||
}
|
||||
python_execute_function testing
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/async/async-0.6.1-r1.ebuild,v 1.1 2013/05/07 13:53:20 idella4 Exp $
|
||||
|
||||
EAPI="5"
|
||||
PYTHON_COMPAT=( python{2_6,2_7} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Async Framework"
|
||||
HOMEPAGE="http://gitorious.org/git-python/async
|
||||
http://pypi.python.org/pypi/async"
|
||||
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="sys-libs/zlib"
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
${RDEPEND}"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${P}_libz_link.patch )
|
||||
|
||||
python_test() {
|
||||
nosetests || die
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/async/async-0.6.1.ebuild,v 1.2 2011/08/27 20:55:38 neurogeek Exp $
|
||||
# Ebuild generated by g-pypi 0.1
|
||||
|
||||
EAPI="3"
|
||||
PYTHON_DEPEND="2"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
#Tests fail randomly for Python2.7
|
||||
#DISTUTILS_SRC_TEST="nosetests"
|
||||
|
||||
inherit eutils distutils
|
||||
|
||||
DESCRIPTION="Async Framework"
|
||||
HOMEPAGE="http://gitorious.org/git-python/async
|
||||
http://pypi.python.org/pypi/async"
|
||||
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="sys-libs/zlib"
|
||||
DEPEND="dev-python/setuptools
|
||||
${RDEPEND}"
|
||||
RESTRICT_PYTHON_ABIS="3*"
|
||||
|
||||
src_prepare() {
|
||||
distutils_src_prepare
|
||||
epatch "${FILESDIR}/${P}_libz_link.patch"
|
||||
}
|
@ -1,12 +1,6 @@
|
||||
DIST basemap-1.0.3.tar.gz 120428063 SHA256 7a54897054973bc544a1704c7b629f1c183a96e8d131172183930c09704f3ac9 SHA512 ef30dffa6cdc7ba2e004c014c2fc8140cede67bd18074f7f5fa1d10293932b6616c986ccf10e9fde322d0b0cdcef6924cc780d6ef4733bca3f54d80d87678ab3 WHIRLPOOL a62581fddb9c136e792c559b03334a1d25b509b865b661f81c7457545f650b642590181dc7284e31bd62a15efad358424d418c465be3ff45251b9e8d285b2fba
|
||||
DIST basemap-1.0.4.tar.gz 120436532 SHA256 db88649547d050be9e733382992997a42be2d91fde267296a488756ffe542187 SHA512 fff9fe95ab7b28862011696580dbc3d2e5946938b8fab73d43ede5dacde99f4bf0e39cd0b84686f8ce17ad75cf0f10bd6206cd032d726813d61c50548f475b99 WHIRLPOOL ba287a4e8eb4eb37a237928edd48a880fb20d10b7bfbb17d859d8d30b25e4cbe34c8ed0ca83ed6a89b00122974f4634da35fa4116fb88909900cdca86aae43f5
|
||||
DIST basemap-1.0.5.tar.gz 120430743 SHA256 a270203fa36e9fe69cd3bf3c53412f1f2d6a49748cc43a54c12d8d589777b7c1 SHA512 8072d89d9e3c3d758e216e5e97f388d02ab2da2a3e527631ce280d2d30201f2272832a2e12ab98a362f054cc54ad5a357c0d66b2e12d6076fb574cd11015b86f WHIRLPOOL 83b2cd2fe4e9b76a1b50f65add3be0000ebb546de42516c9e1b169e36b4154fb16ae71d169f1e93138c0db0afa6aa8f7ad95a77b77be6bc2f12e55c4ad5de64f
|
||||
DIST basemap-1.0.6.tar.gz 129422995 SHA256 203cac08434b9bbe63b0d2821e599fda534a8ba1f8f291728718efbb414145c9 SHA512 37c08d9d8e11783aedd684d4a5253d2f2827aeec8e54fc73310df05ca9ede167a4d4cb6578a42f824eb5a880abd70b10cedabe238eda9c44fa39fcfdb9cb08eb WHIRLPOOL b030f021a5a85f883f53702f8637cac6855d2863b3900605a840c9ea619eadff98c13c5f1c7190c4282e5d93cd586a10f02767b56c5966d1dbf5b1e1f7e52e10
|
||||
DIST basemap-1.0.7.tar.gz 129694711 SHA256 e07ec2e0d63b24c9aed25a09fe8aff2598f82a85da8db74190bac81cbf104531 SHA512 dc8ef8f02127813c9460c6a9c22c593616bbe8ff39f6507abb786d344c710b296bf4f21759b5c1e6fc8ccf3f478d8fb6f546429528575d13f732c4233aaf9c20 WHIRLPOOL 7da55c32cdcea897e71367ec7d2b916a66973a7a761b001c0be5a9a5d97347a51c51e57828fb46f8c70b3a6576c562377657d129dc6fb54333e76897aaf76f6e
|
||||
EBUILD basemap-1.0.3.ebuild 1915 SHA256 74bedd3c1b34f1e4e6ba53e370fbd0d6251f2755ee3e06c958ffdb80b4ec90dc SHA512 9ed1fb6b91cb5dee4b62a89a3fd63e6b53e760b48caa02ef4ed7f2c39afc8a5eaccc4e8bc8738ec0fd1122f003de1d06e2e2ff565cb9ce66ac5467cc18a521bb WHIRLPOOL 965e91d23f18bc5de1e0b97a5b3879a55e7c2785cc473656ece626cd7a50d0ebf731adf431b556c3e5b565eb6c778fd9def2f1dc47a966588d2f5760fea40b22
|
||||
EBUILD basemap-1.0.4.ebuild 1915 SHA256 eead479e130edd53559db4ef2d86fb34f500f08a02362a482392ec60a1433023 SHA512 efd257f76b2798a057dae8f197c6c1be48165838e2e2111fa1a04bb78f55507035e1a4f1272b1f0e0b1921e8af0496afd1963a069460ef40665b158e72ef0694 WHIRLPOOL 14cba73f8e3fb23dc9dd181e72c284acefdef78e9d1b0165ce911bfe988a8f472a9231e98bf163ae17aade20804d806ff1d79914f2315b09fd01f518bfc2cb8f
|
||||
EBUILD basemap-1.0.5.ebuild 1999 SHA256 bfe67dfdf841317029066ad983dab2eb8d966880ecbef5bd6c8b2ab3fcb08d01 SHA512 fade3d27f9a5598b0ebc3ea43428e574a1573ec91cff68db6fcffea5aacafb4b97b4802938c029272b82fbabf751fbc827a78ed4814010d260e239d5b10961d2 WHIRLPOOL bcff6c00e66ea03f339f6251efce3df3553dcd3d33dd4f3d933245ce14edbf0dae4155170ff0bd897b60e9ecee124c0fe87b4a6f7d2b3103dd4aa508fa9c3ac8
|
||||
EBUILD basemap-1.0.6.ebuild 1998 SHA256 e72bc2fcdf6f3d5d9ac7d20ce2f11cde67aaf7e81fb8a4701eed33d55ff2332e SHA512 eef90a81174041b99a8f85d210c94e7c3aa2b4f52a00eef5b0fcf38ec548e3889c71cf00ef368e840928a667daef1548b38f7bf64e2f3231ab239715b99ef940 WHIRLPOOL be30e05183ce674f381eba43bd2795950e9b6d8d94317e5ece5649d1419596ace619cd9cb613579bbcd93b0d25338d5473ba08c253a7f3814797338a5a400f31
|
||||
EBUILD basemap-1.0.7.ebuild 1998 SHA256 383e27d4a7cb5d31867e266899a79b1fdaa2a65d95dcdbb44a3825720f4f36d1 SHA512 c202014371e4b163d66536d4ef125861cabc848fbd3fa3f4c01858b2919f64e7b83d87bfce98c2f4e40907c8da83ee660575fd48198cc51a7a4a737212ad5257 WHIRLPOOL 8f740555a955956b476931259ca8b866be0a7a735893c2a8b64ed856c491737b58f4f34e7b796ff42f197bd56e41ab626e688573f276b241b4375eff79fe2232
|
||||
MISC ChangeLog 5680 SHA256 5f5941ea59c74c2d6fd71e14fd748b734d3ad3d0c0f7cd8f0d34807269a782cb SHA512 73fbcd64082730f927fac4266ea80476d5c6d6c2d83ffdc384e56c56137fb6b1b1f7fba4711aa48d246d73018f57a2e1b28015be75e92c6af99f3ae5728768cd WHIRLPOOL 5d0bb7161d6519abdd7be2d3e5a74078be397e52c97391363d5fda2824ca3f5114782f890c760474fa46e0c43159128064df0278a9b0e8056ba5fd47f57309f7
|
||||
MISC ChangeLog 5812 SHA256 654301c2fc237b046af86791d1338701201af3380c85bb43e3598856a598f614 SHA512 0e619a4e8c3328d8279d8492c85c5a665a46f8f31e58586c4a40942ad0ac833a0fcc2604020457419a54e41b5f46e6165bbf05b777b87261c60ad68aeafd96fe WHIRLPOOL ecb6e4889add05133bdfcc32b7d13e1a05dc7aa14aafb7e915afc850683fd50e7c088850ae4827650706e6b24d0c30adc440ae2e05d6ebdaa825d64cecf2b7ea
|
||||
MISC metadata.xml 349 SHA256 6d623559310d5abca79dc753b17a3ca5f5691fd0ff82a9fa074bad50c75db97d SHA512 e65e55b85105352a5ae5d124183c69347cfde61ae71251c7788f95093cd90dd719a69aa9771b642a7cc40844bc83c4253b14d55f731ec1b8bfadf2577271f8ce WHIRLPOOL ec19e8be56e03d9c3e99892a1dd36540d5367ed050fbb4a09a10159c21cc19a5e2114180a09ab9e7689280e06dd47438b5b9e3391f2d4810bd7ea4ff333dd582
|
||||
|
@ -1,73 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/basemap/basemap-1.0.3.ebuild,v 1.4 2012/11/09 12:41:25 jlec Exp $
|
||||
|
||||
EAPI=4
|
||||
PYTHON_DEPEND="2"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
|
||||
|
||||
inherit eutils distutils virtualx
|
||||
|
||||
DESCRIPTION="matplotlib toolkit to plot map projections"
|
||||
HOMEPAGE="http://matplotlib.sourceforge.net/basemap/doc/html/ http://pypi.python.org/pypi/basemap"
|
||||
SRC_URI="mirror://sourceforge/matplotlib/${P}.tar.gz"
|
||||
|
||||
IUSE="examples test"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
LICENSE="MIT GPL-2"
|
||||
|
||||
CDEPEND="sci-libs/shapelib
|
||||
>=dev-python/matplotlib-0.98
|
||||
>=sci-libs/geos-3.3.1[python]"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
dev-python/setuptools"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
>=dev-python/pupynere-1.0.8
|
||||
dev-python/httplib2
|
||||
dev-python/dap"
|
||||
|
||||
DOCS="FAQ API_CHANGES"
|
||||
|
||||
REQUIRED_USE="test? ( examples )"
|
||||
|
||||
src_prepare() {
|
||||
# use /usr/share/data
|
||||
sed -i \
|
||||
-e "/_datadir.*=.*join/s|\(.*datadir.*=\).*|\1'${EROOT}usr/share/${PN}'|g" \
|
||||
"${S}"/lib/mpl_toolkits/basemap/*.py || die
|
||||
distutils_src_prepare
|
||||
}
|
||||
|
||||
# This one works. examples appear to be need be installed to run.
|
||||
src_test() {
|
||||
testing() {
|
||||
pushd "$(find build-${PYTHON_ABI}/ -namelib.linux-*)/mpl_toolkits/basemap/"
|
||||
PYTHONPATH=.:../../ "$(PYTHON)" test.py
|
||||
popd
|
||||
}
|
||||
VIRTUALX_COMMAND=python_execute_function virtualmake testing
|
||||
}
|
||||
|
||||
src_install() {
|
||||
distutils_src_install --install-data="${EPREFIX}/usr/share/${PN}"
|
||||
|
||||
if use examples; then
|
||||
insinto /usr/share/doc/${PF}
|
||||
doins -r examples || die
|
||||
fi
|
||||
|
||||
# respect FHS
|
||||
mv "${ED}$(python_get_sitedir -f)/mpl_toolkits/basemap/data" "${ED}usr/share/basemap"
|
||||
|
||||
cleaning() {
|
||||
# clean up collision with matplotlib
|
||||
rm -f "${ED}$(python_get_sitedir)/mpl_toolkits/__init__.py"
|
||||
# respect FHS
|
||||
rm -fr "${ED}$(python_get_sitedir)/mpl_toolkits/basemap/data"
|
||||
}
|
||||
python_execute_function -q cleaning
|
||||
}
|
@ -1,73 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/basemap/basemap-1.0.4.ebuild,v 1.2 2012/11/09 12:41:25 jlec Exp $
|
||||
|
||||
EAPI=4
|
||||
PYTHON_DEPEND="2"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
|
||||
|
||||
inherit eutils distutils virtualx
|
||||
|
||||
DESCRIPTION="matplotlib toolkit to plot map projections"
|
||||
HOMEPAGE="http://matplotlib.sourceforge.net/basemap/doc/html/ http://pypi.python.org/pypi/basemap"
|
||||
SRC_URI="mirror://sourceforge/matplotlib/${P}.tar.gz"
|
||||
|
||||
IUSE="examples test"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
LICENSE="MIT GPL-2"
|
||||
|
||||
CDEPEND="sci-libs/shapelib
|
||||
>=dev-python/matplotlib-0.98
|
||||
>=sci-libs/geos-3.3.1[python]"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
dev-python/setuptools"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
>=dev-python/pupynere-1.0.8
|
||||
dev-python/httplib2
|
||||
dev-python/dap"
|
||||
|
||||
DOCS="FAQ API_CHANGES"
|
||||
|
||||
REQUIRED_USE="test? ( examples )"
|
||||
|
||||
src_prepare() {
|
||||
# use /usr/share/data
|
||||
sed -i \
|
||||
-e "/_datadir.*=.*join/s|\(.*datadir.*=\).*|\1'${EROOT}usr/share/${PN}'|g" \
|
||||
"${S}"/lib/mpl_toolkits/basemap/*.py || die
|
||||
distutils_src_prepare
|
||||
}
|
||||
|
||||
# This one works. examples appear to be need be installed to run.
|
||||
src_test() {
|
||||
testing() {
|
||||
pushd "$(find build-${PYTHON_ABI}/ -namelib.linux-*)/mpl_toolkits/basemap/"
|
||||
PYTHONPATH=.:../../ "$(PYTHON)" test.py
|
||||
popd
|
||||
}
|
||||
VIRTUALX_COMMAND=python_execute_function virtualmake testing
|
||||
}
|
||||
|
||||
src_install() {
|
||||
distutils_src_install --install-data="${EPREFIX}/usr/share/${PN}"
|
||||
|
||||
if use examples; then
|
||||
insinto /usr/share/doc/${PF}
|
||||
doins -r examples || die
|
||||
fi
|
||||
|
||||
# respect FHS
|
||||
mv "${ED}$(python_get_sitedir -f)/mpl_toolkits/basemap/data" "${ED}usr/share/basemap"
|
||||
|
||||
cleaning() {
|
||||
# clean up collision with matplotlib
|
||||
rm -f "${ED}$(python_get_sitedir)/mpl_toolkits/__init__.py"
|
||||
# respect FHS
|
||||
rm -fr "${ED}$(python_get_sitedir)/mpl_toolkits/basemap/data"
|
||||
}
|
||||
python_execute_function -q cleaning
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue