parent
4f7205f224
commit
628a50c90f
@ -1,3 +1,4 @@
|
|||||||
DIST mksh-R50d.tgz 374014 SHA256 a2268826a1463959ff7b7979fbf9176f1298400ecc24ae13d6337eee5c63f982 SHA512 1bb545d00e3ce5783541c88e1fea47cbd01e2103c60be7d6f5b8bf02d30576d543c4e9f6786b8d14785554c11ca1123364297a2cce0c5c3a5901b6e717594bd8 WHIRLPOOL 899b3feed7610328971b17195701dedf732507c52cd35c69bc2f3778243b344f7c8546871b7b728d122c99aa38c9b525aedeb8f5be8cd90ee2c74b32cb2ce64b
|
DIST mksh-R50d.tgz 374014 SHA256 a2268826a1463959ff7b7979fbf9176f1298400ecc24ae13d6337eee5c63f982 SHA512 1bb545d00e3ce5783541c88e1fea47cbd01e2103c60be7d6f5b8bf02d30576d543c4e9f6786b8d14785554c11ca1123364297a2cce0c5c3a5901b6e717594bd8 WHIRLPOOL 899b3feed7610328971b17195701dedf732507c52cd35c69bc2f3778243b344f7c8546871b7b728d122c99aa38c9b525aedeb8f5be8cd90ee2c74b32cb2ce64b
|
||||||
DIST mksh-R50e.tgz 376013 SHA256 ad3c148769d08cf934a96be2837599ba9db355f38a8f49c7bc8876b80d2e08da SHA512 70d904eb4dfdaf28ee5858d1abec296d69e428e3a81e5802640bc4b95a4c77e08ad8f301b29063f329081428e4b9583f0203e9b509263e8e7b9a705ac63acde5 WHIRLPOOL 1b6d6e0c4413eac44f033945fc2fbe2891623821c1f1a5ceea0084dc834d8754f2582ffac72567138f337e7fdf069f19a79644fc3987fd6cb971c74bde5c209f
|
DIST mksh-R50e.tgz 376013 SHA256 ad3c148769d08cf934a96be2837599ba9db355f38a8f49c7bc8876b80d2e08da SHA512 70d904eb4dfdaf28ee5858d1abec296d69e428e3a81e5802640bc4b95a4c77e08ad8f301b29063f329081428e4b9583f0203e9b509263e8e7b9a705ac63acde5 WHIRLPOOL 1b6d6e0c4413eac44f033945fc2fbe2891623821c1f1a5ceea0084dc834d8754f2582ffac72567138f337e7fdf069f19a79644fc3987fd6cb971c74bde5c209f
|
||||||
DIST mksh-R50f.tgz 377797 SHA256 74e051ce92ece9555d91505b956572f64668fc88c5ccabee742099e7f29a2bcb SHA512 ca0b5d986727afc8b295b4a81c84e0048f1650c4ea3c45dcc05cabcc474bca4ab4719a063b708f3ddee08d65f35651652c0938b4279f6d706182d46ea5566cc1 WHIRLPOOL a5845cf4fa89b91f076e6eb7af5a176e98dd766a9dc3840acb832f3305c1b7b4f5e01871684a33b0491e34f841a5f6d75f34fba78f99be4852634f337b2054b4
|
DIST mksh-R50f.tgz 377797 SHA256 74e051ce92ece9555d91505b956572f64668fc88c5ccabee742099e7f29a2bcb SHA512 ca0b5d986727afc8b295b4a81c84e0048f1650c4ea3c45dcc05cabcc474bca4ab4719a063b708f3ddee08d65f35651652c0938b4279f6d706182d46ea5566cc1 WHIRLPOOL a5845cf4fa89b91f076e6eb7af5a176e98dd766a9dc3840acb832f3305c1b7b4f5e01871684a33b0491e34f841a5f6d75f34fba78f99be4852634f337b2054b4
|
||||||
|
DIST mksh-R51.tgz 382169 SHA256 9feeaa5ff33d8199c0123675dec29785943ffc67152d58d431802bc20765dadf SHA512 dea2dea283959c0564cb6e9dbb9eecf004365cd01d83f1a8bbaff319c8ebefc4eb5e85898e207c7ce0577af525be0563e7c6b5f4b3449a2439e93f3f8bfd43ea WHIRLPOOL e626b4ffe5f637486a75a4008e51ddd3dd4c9c739dcb6b1502ee0b04f9ade20e55856497dacb5e7228d5b16af015e55fd33753b1d092c8aa7adcd5dd5e30681a
|
||||||
|
@ -0,0 +1,49 @@
|
|||||||
|
# Copyright 1999-2015 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: /var/cvsroot/gentoo-x86/app-shells/mksh/mksh-51.ebuild,v 1.1 2015/07/11 08:33:20 patrick Exp $
|
||||||
|
|
||||||
|
EAPI=5
|
||||||
|
|
||||||
|
inherit eutils toolchain-funcs
|
||||||
|
|
||||||
|
DESCRIPTION="MirBSD KSH Shell"
|
||||||
|
HOMEPAGE="http://mirbsd.de/mksh"
|
||||||
|
SRC_URI="http://www.mirbsd.org/MirOS/dist/mir/mksh/${PN}-R${PV}.tgz"
|
||||||
|
LICENSE="BSD"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
|
||||||
|
IUSE="static"
|
||||||
|
DEPEND="static? ( dev-libs/klibc )"
|
||||||
|
RDEPEND=""
|
||||||
|
S="${WORKDIR}/${PN}"
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
tc-export CC
|
||||||
|
# we want to build static with klibc
|
||||||
|
if use static ; then
|
||||||
|
unset CC
|
||||||
|
export CC="/usr/bin/klcc"
|
||||||
|
export LDSTATIC="-static"
|
||||||
|
fi
|
||||||
|
export CPPFLAGS="${CPPFLAGS} -DMKSH_DEFAULT_PROFILEDIR=\\\"${EPREFIX}/etc\\\""
|
||||||
|
# we can't assume lto existing/enabled, so we add a fallback
|
||||||
|
sh Build.sh -r -c lto || sh Rebuild.sh || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
exeinto /bin
|
||||||
|
doexe mksh
|
||||||
|
doman mksh.1
|
||||||
|
dodoc dot.mkshrc
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
./test.sh || die
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
ebegin "Updating /etc/shells"
|
||||||
|
( grep -v "^/bin/mksh$" "${ROOT}"etc/shells; echo "/bin/mksh" ) > "${T}"/shells
|
||||||
|
mv -f "${T}"/shells "${ROOT}"etc/shells
|
||||||
|
eend $?
|
||||||
|
}
|
@ -1,168 +0,0 @@
|
|||||||
# Copyright 1999-2014 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/hsqldb/hsqldb-1.8.1.3.ebuild,v 1.8 2014/08/10 19:59:56 slyfox Exp $
|
|
||||||
|
|
||||||
EAPI=4
|
|
||||||
JAVA_PKG_IUSE="doc source test"
|
|
||||||
inherit eutils user versionator java-pkg-2 java-ant-2
|
|
||||||
|
|
||||||
MY_PV=$(replace_all_version_separators _ )
|
|
||||||
MY_P="${PN}_${MY_PV}"
|
|
||||||
|
|
||||||
DESCRIPTION="The leading SQL relational database engine written in Java"
|
|
||||||
HOMEPAGE="http://hsqldb.org"
|
|
||||||
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip"
|
|
||||||
|
|
||||||
LICENSE="BSD GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~x64-macos ~x64-solaris ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
|
|
||||||
IUSE=""
|
|
||||||
|
|
||||||
CDEPEND="java-virtuals/servlet-api:2.3"
|
|
||||||
RDEPEND=">=virtual/jre-1.6
|
|
||||||
${CDEPEND}"
|
|
||||||
DEPEND="virtual/jdk:1.6
|
|
||||||
test? ( dev-java/junit:0 )
|
|
||||||
app-arch/unzip
|
|
||||||
${CDEPEND}"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${PN}"
|
|
||||||
|
|
||||||
HSQLDB_JAR=/usr/share/hsqldb/lib/hsqldb.jar
|
|
||||||
HSQLDB_HOME=/var/lib/hsqldb
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
enewgroup hsqldb
|
|
||||||
enewuser hsqldb -1 /bin/sh /dev/null hsqldb
|
|
||||||
|
|
||||||
java-pkg-2_pkg_setup
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
rm -v lib/*.jar || die
|
|
||||||
java-pkg_jar-from --virtual --into lib servlet-api-2.3
|
|
||||||
|
|
||||||
sed -i -r \
|
|
||||||
-e "s#/etc/sysconfig#${EPREFIX}/etc/conf.d#g" \
|
|
||||||
bin/hsqldb || die
|
|
||||||
|
|
||||||
java-pkg_filter-compiler jikes
|
|
||||||
|
|
||||||
eant -q -f "${EANT_BUILD_XML}" cleanall > /dev/null
|
|
||||||
|
|
||||||
epatch "${FILESDIR}/resolve-config-softlinks.patch"
|
|
||||||
|
|
||||||
mkdir conf
|
|
||||||
sed -e "s/^HSQLDB_JAR_PATH=.*$/HSQLDB_JAR_PATH=${EPREFIX//\//\\/}${HSQLDB_JAR//\//\\/}/g" \
|
|
||||||
-e "s/^SERVER_HOME=.*$/SERVER_HOME=${EPREFIX//\//\\/}\/var\/lib\/hsqldb/g" \
|
|
||||||
-e "s/^HSQLDB_OWNER=.*$/HSQLDB_OWNER=hsqldb/g" \
|
|
||||||
-e 's/^#AUTH_FILE=.*$/AUTH_FILE=${SERVER_HOME}\/sqltool.rc/g' \
|
|
||||||
src/org/hsqldb/sample/sample-hsqldb.cfg > conf/hsqldb || die
|
|
||||||
cp "${FILESDIR}/server.properties" conf/ || die
|
|
||||||
cp "${FILESDIR}/sqltool.rc" conf/ || die
|
|
||||||
|
|
||||||
# Missing source file - needed for tests
|
|
||||||
# http://hsqldb.cvs.sourceforge.net/*checkout*/hsqldb/hsqldb-dev/src/org/hsqldb/lib/StringComparator.java?revision=1.1&pathrev=hsqldb_1_8_0_10
|
|
||||||
# http://sourceforge.net/tracker/index.php?func=detail&aid=2008754&group_id=23316&atid=378131
|
|
||||||
cp "${FILESDIR}/StringComparator.java" src/org/hsqldb/lib || die
|
|
||||||
cp "${FILESDIR}/TestBug1191815.java" src/org/hsqldb/test/ || die
|
|
||||||
}
|
|
||||||
|
|
||||||
# EANT_BUILD_XML used also in src_unpack
|
|
||||||
EANT_BUILD_XML="build/build.xml"
|
|
||||||
EANT_BUILD_TARGET="jar jarclient jarsqltool jarutil"
|
|
||||||
EANT_DOC_TARGET="javadocdev"
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
java-pkg_jar-from --into lib junit
|
|
||||||
eant -f ${EANT_BUILD_XML} jartest
|
|
||||||
cd testrun/hsqldb || die
|
|
||||||
./runTest.sh TestSelf || die "TestSelf hsqldb tests failed"
|
|
||||||
# TODO. These fail. Investigate why.
|
|
||||||
#cd "${S}/testrun/sqltool" || die
|
|
||||||
#CLASSPATH="${S}/lib/hsqldb.jar" ./runtests.bash || die "sqltool test failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
java-pkg_dojar lib/hsql*.jar
|
|
||||||
|
|
||||||
if use doc; then
|
|
||||||
dodoc doc/*.txt
|
|
||||||
dohtml -r doc/zaurus
|
|
||||||
dohtml -r doc/src
|
|
||||||
fi
|
|
||||||
use source && java-pkg_dosrc src/*
|
|
||||||
|
|
||||||
echo "CONFIG_PROTECT=\"${HSQLDB_HOME}\"" > "${T}"/35hsqldb || die
|
|
||||||
doenvd "${T}"/35hsqldb
|
|
||||||
|
|
||||||
# Put init, configuration and authorization files in /etc
|
|
||||||
doinitd "${FILESDIR}/hsqldb"
|
|
||||||
doconfd conf/hsqldb
|
|
||||||
dodir /etc/hsqldb
|
|
||||||
insinto /etc/hsqldb
|
|
||||||
# Change the ownership of server.properties and sqltool.rc
|
|
||||||
# files to hsqldb:hsqldb. (resolves Bug #111963)
|
|
||||||
use prefix || insopts -m0600 -o hsqldb -g hsqldb
|
|
||||||
doins conf/server.properties
|
|
||||||
use prefix || insopts -m0600 -o hsqldb -g hsqldb
|
|
||||||
doins conf/sqltool.rc
|
|
||||||
|
|
||||||
# Install init script
|
|
||||||
dodir "${HSQLDB_HOME}/bin"
|
|
||||||
keepdir "${HSQLDB_HOME}"
|
|
||||||
exeinto "${HSQLDB_HOME}/bin"
|
|
||||||
doexe bin/hsqldb
|
|
||||||
|
|
||||||
# Make sure that files have correct permissions
|
|
||||||
use prefix || chown -R hsqldb:hsqldb "${ED}${HSQLDB_HOME}"
|
|
||||||
chmod o-rwx "${ED}${HSQLDB_HOME}"
|
|
||||||
|
|
||||||
# Create symlinks to authorization files in the server home dir
|
|
||||||
# (required by the hqldb init script)
|
|
||||||
insinto "${HSQLDB_HOME}"
|
|
||||||
dosym /etc/hsqldb/server.properties "${HSQLDB_HOME}/server.properties"
|
|
||||||
dosym /etc/hsqldb/sqltool.rc "${HSQLDB_HOME}/sqltool.rc"
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
ewarn "If you intend to run Hsqldb in Server mode and you want to create"
|
|
||||||
ewarn "additional databases, remember to put correct information in both"
|
|
||||||
ewarn "'server.properties' and 'sqltool.rc' files."
|
|
||||||
ewarn "(read the 'Init script Setup Procedure' section of the 'Chapter 3."
|
|
||||||
ewarn "UNIX Quick Start' in the Hsqldb docs for more information)"
|
|
||||||
echo
|
|
||||||
elog "Example:"
|
|
||||||
echo
|
|
||||||
elog "${EPREFIX}/etc/hsqldb/server.properties"
|
|
||||||
elog "============================="
|
|
||||||
elog "server.database.1=file:xdb/xdb"
|
|
||||||
elog "server.dbname.1=xdb"
|
|
||||||
elog "server.urlid.1=xdb"
|
|
||||||
elog
|
|
||||||
elog "${EPREFIX}/etc/hsqldb/sqltool.rc"
|
|
||||||
elog "======================"
|
|
||||||
elog "urlid xdb"
|
|
||||||
elog "url jdbc:hsqldb:hsql://localhost/xdb"
|
|
||||||
elog "username sa"
|
|
||||||
elog "password "
|
|
||||||
echo
|
|
||||||
elog "Also note that each hsqldb server can serve only up to 10"
|
|
||||||
elog "different databases simultaneously (with consecutive {0-9}"
|
|
||||||
elog "suffixes in the 'server.properties' file)."
|
|
||||||
echo
|
|
||||||
ewarn "For data manipulation use:"
|
|
||||||
ewarn
|
|
||||||
ewarn "# java -classpath ${EPREFIX}${HSQLDB_JAR} org.hsqldb.util.DatabaseManager"
|
|
||||||
ewarn "# java -classpath ${EPREFIX}${HSQLDB_JAR} org.hsqldb.util.DatabaseManagerSwing"
|
|
||||||
ewarn "# java -classpath ${EPREFIX}${HSQLDB_JAR} org.hsqldb.util.SqlTool \\"
|
|
||||||
ewarn " --rcFile ${EPREFIX}/var/lib/hsqldb/sqltool.rc <dbname>"
|
|
||||||
echo
|
|
||||||
elog "The Hsqldb can be run in multiple modes - read 'Chapter 1. Running'"
|
|
||||||
elog "and Using Hsqldb' in the Hsqldb docs at:"
|
|
||||||
elog " http://hsqldb.org/web/hsqlDocsFrame.html"
|
|
||||||
elog "If you intend to run it in the Server mode, it is suggested to add the"
|
|
||||||
elog "init script to your start-up scripts, this should be done like this:"
|
|
||||||
elog " \`rc-update add hsqldb default\`"
|
|
||||||
echo
|
|
||||||
}
|
|
@ -1,146 +0,0 @@
|
|||||||
# Copyright 1999-2015 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-java/antlr/antlr-2.7.7-r2.ebuild,v 1.10 2015/03/21 15:08:20 jlec Exp $
|
|
||||||
|
|
||||||
EAPI="3"
|
|
||||||
PYTHON_DEPEND="python? 2"
|
|
||||||
|
|
||||||
inherit base java-pkg-2 mono distutils multilib toolchain-funcs versionator
|
|
||||||
|
|
||||||
DESCRIPTION="A parser generator for C++, C#, Java, and Python"
|
|
||||||
HOMEPAGE="http://www.antlr2.org/"
|
|
||||||
SRC_URI="http://www.antlr2.org/download/${P}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="public-domain"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="amd64 ~arm ppc ppc64 x86 ~x86-fbsd"
|
|
||||||
IUSE="doc debug examples mono +cxx +java python script source static-libs"
|
|
||||||
|
|
||||||
# TODO do we actually need jdk at runtime?
|
|
||||||
RDEPEND=">=virtual/jdk-1.3
|
|
||||||
mono? ( dev-lang/mono )"
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
script? ( !dev-util/pccts )
|
|
||||||
source? ( app-arch/zip )"
|
|
||||||
|
|
||||||
PATCHES=( "${FILESDIR}/2.7.7-gcc-4.3.patch" "${FILESDIR}/2.7.7-gcc-4.4.patch" "${FILESDIR}/2.7.7-makefixes.patch" )
|
|
||||||
|
|
||||||
make_shared_lib() {
|
|
||||||
local soname=$(basename "${1%.a}").so.$(get_major_version)
|
|
||||||
einfo "Making ${soname}"
|
|
||||||
${2:-$(tc-getCC)} ${LDFLAGS} \
|
|
||||||
-shared -Wl,-soname="${soname}" \
|
|
||||||
-Wl,--whole-archive "${1}" -Wl,--no-whole-archive \
|
|
||||||
-o $(dirname "${1}")/"${soname}" || return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
java-pkg-2_pkg_setup
|
|
||||||
|
|
||||||
if use python; then
|
|
||||||
python_set_active_version 2
|
|
||||||
python_pkg_setup
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
base_src_prepare
|
|
||||||
sed -i \
|
|
||||||
-e 's/install:.*this-install/install:/' \
|
|
||||||
lib/cpp/src/Makefile.in || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
# don't ask why, but this is needed for stuff to get built properly
|
|
||||||
# across the various JDKs
|
|
||||||
JAVACFLAGS="+ ${JAVACFLAGS}"
|
|
||||||
|
|
||||||
# mcs for https://bugs.gentoo.org/show_bug.cgi?id=172104
|
|
||||||
CSHARPC="mcs" econf $(use_enable java) \
|
|
||||||
$(use_enable python) \
|
|
||||||
$(use_enable mono csharp) \
|
|
||||||
$(use_enable debug) \
|
|
||||||
$(use_enable examples) \
|
|
||||||
$(use_enable cxx) \
|
|
||||||
--enable-verbose
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
emake CXXFLAGS="${CXXFLAGS} -fPIC" || die "compile failed"
|
|
||||||
if use cxx; then
|
|
||||||
pushd lib/cpp/src > /dev/null
|
|
||||||
make_shared_lib libantlr.a || die
|
|
||||||
if use static-libs; then
|
|
||||||
make clean
|
|
||||||
emake || die "compile static failed"
|
|
||||||
fi
|
|
||||||
popd > /dev/null
|
|
||||||
fi
|
|
||||||
sed -e "s|@prefix@|/usr/|" \
|
|
||||||
-e 's|@exec_prefix@|${prefix}|' \
|
|
||||||
-e "s|@libdir@|\$\{exec_prefix\}/$(get_libdir)/antlr|" \
|
|
||||||
-e 's|@libs@|-r:\$\{libdir\}/antlr.astframe.dll -r:\$\{libdir\}/antlr.runtime.dll|' \
|
|
||||||
-e "s|@VERSION@|${PV}|" \
|
|
||||||
"${FILESDIR}"/antlr.pc.in > "${S}"/antlr.pc
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
dobin "${S}"/scripts/antlr-config
|
|
||||||
|
|
||||||
if use cxx ; then
|
|
||||||
cd "${S}"/lib/cpp
|
|
||||||
einstall || die "failed to install C++ files"
|
|
||||||
dolib.so src/libantlr.so* || die
|
|
||||||
dosym libantlr.so.$(get_major_version) /usr/$(get_libdir)/libantlr.so
|
|
||||||
use static-libs && dolib.a src/libantlr.a
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use java ; then
|
|
||||||
java-pkg_dojar "${S}"/antlr/antlr.jar
|
|
||||||
|
|
||||||
use script && java-pkg_dolauncher antlr --main antlr.Tool
|
|
||||||
|
|
||||||
use source && java-pkg_dosrc "${S}"/antlr
|
|
||||||
use doc && java-pkg_dohtml -r "${S}"/doc/*
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use mono ; then
|
|
||||||
cd "${S}"/lib
|
|
||||||
|
|
||||||
dodir /usr/$(get_libdir)/antlr/
|
|
||||||
insinto /usr/$(get_libdir)/antlr/
|
|
||||||
|
|
||||||
doins antlr.astframe.dll
|
|
||||||
doins antlr.runtime.dll
|
|
||||||
|
|
||||||
insinto /usr/$(get_libdir)/pkgconfig
|
|
||||||
doins "${S}"/antlr.pc
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use python ; then
|
|
||||||
cd "${S}"/lib/python
|
|
||||||
distutils_src_install
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use examples ; then
|
|
||||||
find "${S}"/examples -iname Makefile\* -exec rm \{\} \;
|
|
||||||
|
|
||||||
dodir /usr/share/doc/${PF}/examples
|
|
||||||
insinto /usr/share/doc/${PF}/examples
|
|
||||||
|
|
||||||
use cxx && doins -r "${S}"/examples/cpp
|
|
||||||
use java && doins -r "${S}"/examples/java
|
|
||||||
use mono && doins -r "${S}"/examples/csharp
|
|
||||||
use python && doins -r "${S}"/examples/python
|
|
||||||
fi
|
|
||||||
|
|
||||||
newdoc "${S}"/README.txt README || die
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
use python && distutils_pkg_postinst
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
use python && distutils_pkg_postrm
|
|
||||||
}
|
|
@ -1,83 +0,0 @@
|
|||||||
# Copyright 1999-2015 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-java/dom4j/dom4j-1.6.1-r5.ebuild,v 1.1 2015/06/17 02:36:39 patrick Exp $
|
|
||||||
|
|
||||||
EAPI=5
|
|
||||||
JAVA_PKG_IUSE="doc source test"
|
|
||||||
|
|
||||||
inherit java-pkg-2 java-ant-2
|
|
||||||
|
|
||||||
DESCRIPTION="Java library for working with XML"
|
|
||||||
HOMEPAGE="http://dom4j.sourceforge.net/"
|
|
||||||
SRC_URI="mirror://sourceforge/dom4j/${P}.tar.gz
|
|
||||||
mirror://gentoo/${P}-java5.patch.bz2"
|
|
||||||
LICENSE="dom4j"
|
|
||||||
SLOT="1"
|
|
||||||
KEYWORDS="~ia64"
|
|
||||||
IUSE=""
|
|
||||||
RDEPEND=">=virtual/jre-1.4
|
|
||||||
dev-java/jaxme:0
|
|
||||||
dev-java/jsr173:0
|
|
||||||
>=dev-java/msv-20050627-r2:0
|
|
||||||
dev-java/xpp2:0
|
|
||||||
dev-java/xpp3:0
|
|
||||||
dev-java/relaxng-datatype:0
|
|
||||||
dev-java/xerces:2
|
|
||||||
>=dev-java/xsdlib-20050627-r2:0
|
|
||||||
dev-java/xml-commons-external:1.3"
|
|
||||||
DEPEND="
|
|
||||||
>=virtual/jdk-1.4
|
|
||||||
test? (
|
|
||||||
dev-java/ant-junit:0
|
|
||||||
dev-java/xalan:0
|
|
||||||
dev-java/junitperf:0
|
|
||||||
)
|
|
||||||
${RDEPEND}"
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
java-pkg-2_src_test
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
# Add missing methods to compile on Java 5
|
|
||||||
# see bug #137970
|
|
||||||
epatch "${WORKDIR}/${P}-java5.patch"
|
|
||||||
|
|
||||||
# Needs X11
|
|
||||||
rm -v ./src/test/org/dom4j/bean/BeansTest.java || die
|
|
||||||
# fails with a 1.6 JDK for some reason
|
|
||||||
rm -v src/test/org/dom4j/io/StaxTest.java || die
|
|
||||||
rm -v *.jar || die
|
|
||||||
cd "${S}/lib"
|
|
||||||
#circular deps with jaxen
|
|
||||||
rm -f $(echo *.jar | sed 's/jaxen[^ ]\+//')
|
|
||||||
java-pkg_jar-from jaxme
|
|
||||||
java-pkg_jar-from jsr173
|
|
||||||
java-pkg_jar-from msv
|
|
||||||
java-pkg_jar-from xpp2
|
|
||||||
java-pkg_jar-from xpp3
|
|
||||||
java-pkg_jar-from relaxng-datatype
|
|
||||||
java-pkg_jar-from xsdlib
|
|
||||||
java-pkg_jar-from xml-commons-external-1.3
|
|
||||||
|
|
||||||
cd "${S}/lib/endorsed"
|
|
||||||
rm -v *.jar || die
|
|
||||||
java-pkg_jar-from xerces-2 || die
|
|
||||||
|
|
||||||
rm -vr "${S}"/lib/test/* || die
|
|
||||||
if use test; then
|
|
||||||
java-pkg_jar-from --build-only xalan,junitperf,junit
|
|
||||||
fi
|
|
||||||
rm -vr "${S}"/lib/tools/* || die
|
|
||||||
|
|
||||||
java-pkg-2_src_prepare
|
|
||||||
}
|
|
||||||
|
|
||||||
EANT_BUILD_TARGET="clean package"
|
|
||||||
EANT_EXTRA_ARGS="-Dbuild.javadocs=build/doc/api"
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
java-pkg_dojar build/${PN}.jar
|
|
||||||
use doc && java-pkg_dojavadoc build/doc/api
|
|
||||||
use source && java-pkg_dosrc src/java/*
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
--- build.xml.orig 2015-07-05 20:34:00.099000000 +0000
|
|
||||||
+++ build.xml 2015-07-05 20:34:38.194000000 +0000
|
|
||||||
@@ -355,18 +355,6 @@
|
|
||||||
<include name="**/*.xsl"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
- <taskdef name="eventResourceGenerator" classname="org.apache.fop.tools.EventProducerCollectorTask">
|
|
||||||
- <classpath>
|
|
||||||
- <path refid="libs-tools-build-classpath"/>
|
|
||||||
- <pathelement location="${build.classes.dir}"/>
|
|
||||||
- <pathelement location="${build.codegen-classes.dir}"/>
|
|
||||||
- </classpath>
|
|
||||||
- </taskdef>
|
|
||||||
- <eventResourceGenerator destdir="${build.gensrc.dir}">
|
|
||||||
- <fileset dir="${src.java.dir}">
|
|
||||||
- <include name="**/*.java"/>
|
|
||||||
- </fileset>
|
|
||||||
- </eventResourceGenerator>
|
|
||||||
</target>
|
|
||||||
<target name="compile-copy-resources" depends="resourcegen">
|
|
||||||
<copy todir="${build.classes.dir}">
|
|
@ -1,110 +0,0 @@
|
|||||||
# Copyright 1999-2014 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-java/gcj-jdk/gcj-jdk-4.7.3-r1.ebuild,v 1.1 2014/07/14 18:45:53 sera Exp $
|
|
||||||
|
|
||||||
EAPI="5"
|
|
||||||
|
|
||||||
inherit java-vm-2 multilib
|
|
||||||
|
|
||||||
DESCRIPTION="Java wrappers around GCJ"
|
|
||||||
HOMEPAGE="http://www.gentoo.org/"
|
|
||||||
SRC_URI=""
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86 ~x86-linux"
|
|
||||||
SLOT="0"
|
|
||||||
IUSE="X"
|
|
||||||
|
|
||||||
ECJ_GCJ_SLOT="3.6"
|
|
||||||
API_DIFF_PV="4.8.2"
|
|
||||||
|
|
||||||
# perl is needed for javac wrapper
|
|
||||||
RDEPEND="
|
|
||||||
dev-java/ecj-gcj:${ECJ_GCJ_SLOT}
|
|
||||||
dev-lang/perl
|
|
||||||
~sys-devel/gcc-${PV}[gcj]
|
|
||||||
X? ( ~sys-devel/gcc-${PV}[awt] )"
|
|
||||||
DEPEND="${RDEPEND}"
|
|
||||||
|
|
||||||
S="${WORKDIR}"
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
# jre lib paths ...
|
|
||||||
local libarch="$(get_system_arch)"
|
|
||||||
local gcc_version=${PV}
|
|
||||||
local gccbin=$(gcc-config -B ${gcc_version})
|
|
||||||
gccbin=${gccbin#"${EPREFIX}"}
|
|
||||||
local gcclib=$(gcc-config -L ${gcc_version} | cut -d':' -f1)
|
|
||||||
gcclib=${gcclib#"${EPREFIX}"}
|
|
||||||
local gcjhome="/usr/$(get_libdir)/${P}"
|
|
||||||
local gccchost="${CHOST}"
|
|
||||||
local gcjlibdir=$(echo "${EPREFIX}"/usr/$(get_libdir)/gcj-${gcc_version}-*)
|
|
||||||
gcjlibdir=${gcjlibdir#"${EPREFIX}"}
|
|
||||||
|
|
||||||
# links
|
|
||||||
dodir ${gcjhome}/bin
|
|
||||||
dodir ${gcjhome}/jre/bin
|
|
||||||
dosym ${gccbin}/gij ${gcjhome}/bin/java
|
|
||||||
dosym ${gccbin}/gij ${gcjhome}/jre/bin/java
|
|
||||||
dosym ${gccbin}/gjar ${gcjhome}/bin/jar
|
|
||||||
dosym ${gccbin}/gjdoc ${gcjhome}/bin/javadoc
|
|
||||||
dosym ${gccbin}/grmic ${gcjhome}/bin/rmic
|
|
||||||
dosym ${gccbin}/gjavah ${gcjhome}/bin/javah
|
|
||||||
dosym ${gccbin}/jcf-dump ${gcjhome}/bin/javap
|
|
||||||
dosym ${gccbin}/gappletviewer ${gcjhome}/bin/appletviewer
|
|
||||||
dosym ${gccbin}/gjarsigner ${gcjhome}/bin/jarsigner
|
|
||||||
dosym ${gccbin}/grmiregistry ${gcjhome}/bin/rmiregistry
|
|
||||||
dosym ${gccbin}/grmiregistry ${gcjhome}/jre/bin/rmiregistry
|
|
||||||
dosym ${gccbin}/gkeytool ${gcjhome}/bin/keytool
|
|
||||||
dosym ${gccbin}/gkeytool ${gcjhome}/jre/bin/keytool
|
|
||||||
dosym ${gccbin}/gnative2ascii ${gcjhome}/bin/native2ascii
|
|
||||||
dosym ${gccbin}/gorbd ${gcjhome}/bin/orbd
|
|
||||||
dosym ${gccbin}/gorbd ${gcjhome}/jre/bin/orbd
|
|
||||||
dosym ${gccbin}/grmid ${gcjhome}/bin/rmid
|
|
||||||
dosym ${gccbin}/grmid ${gcjhome}/jre/bin/rmid
|
|
||||||
dosym ${gccbin}/gserialver ${gcjhome}/bin/serialver
|
|
||||||
dosym ${gccbin}/gtnameserv ${gcjhome}/bin/tnameserv
|
|
||||||
dosym ${gccbin}/gtnameserv ${gcjhome}/jre/bin/tnameserv
|
|
||||||
|
|
||||||
dodir ${gcjhome}/jre/lib/${libarch}/client
|
|
||||||
dodir ${gcjhome}/jre/lib/${libarch}/server
|
|
||||||
dosym ${gcjlibdir}/libjvm.so ${gcjhome}/jre/lib/${libarch}/client/libjvm.so
|
|
||||||
dosym ${gcjlibdir}/libjvm.so ${gcjhome}/jre/lib/${libarch}/server/libjvm.so
|
|
||||||
use X && dosym ${gcjlibdir}/libjawt.so ${gcjhome}/jre/lib/${libarch}/libjawt.so
|
|
||||||
|
|
||||||
dosym /usr/share/gcc-data/${gccchost}/${gcc_version}/java/libgcj-${gcc_version/_/-}.jar \
|
|
||||||
${gcjhome}/jre/lib/rt.jar
|
|
||||||
dodir ${gcjhome}/lib
|
|
||||||
dosym /usr/share/gcc-data/${gccchost}/${gcc_version}/java/libgcj-tools-${gcc_version/_/-}.jar \
|
|
||||||
${gcjhome}/lib/tools.jar
|
|
||||||
dosym ${gcclib}/include ${gcjhome}/include
|
|
||||||
|
|
||||||
local ecj_jar="$(readlink "${EPREFIX}"/usr/share/eclipse-ecj/ecj.jar)"
|
|
||||||
exeinto ${gcjhome}/bin
|
|
||||||
sed -e "s#@JAVA@#${gcjhome}/bin/java#" \
|
|
||||||
-e "s#@ECJ_JAR@#${ecj_jar}#" \
|
|
||||||
-e "s#@RT_JAR@#${gcjhome}/jre/lib/rt.jar#" \
|
|
||||||
-e "s#@TOOLS_JAR@#${gcjhome}/lib/tools.jar#" \
|
|
||||||
"${FILESDIR}"/javac.in \
|
|
||||||
| newexe - javac
|
|
||||||
assert
|
|
||||||
|
|
||||||
set_java_env
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
# Do not set as system VM (see below)
|
|
||||||
# java-vm-2_pkg_postinst
|
|
||||||
|
|
||||||
ewarn "gcj does not currently provide all the 1.5 or 1.6 APIs."
|
|
||||||
ewarn "See http://fuseyism.com/japi/ibmjdk15-libgcj-${API_DIFF_PV}.html"
|
|
||||||
ewarn "and http://fuseyism.com/japi/icedtea6-libgcj-${API_DIFF_PV}.html"
|
|
||||||
ewarn "Check for existing bugs relating to missing APIs and file"
|
|
||||||
ewarn "new ones at http://gcc.gnu.org/bugzilla/"
|
|
||||||
ewarn
|
|
||||||
ewarn "Due to this and limited manpower, we currently cannot support"
|
|
||||||
ewarn "using gcj-jdk as a system VM. Its main purpose is to bootstrap"
|
|
||||||
ewarn "IcedTea without prior binary VM installation. To do that, execute:"
|
|
||||||
ewarn
|
|
||||||
ewarn "emerge -o icedtea && emerge icedtea"
|
|
||||||
}
|
|
@ -1,2 +1,2 @@
|
|||||||
DIST jdk6_16005_ia.depot 138004480 RMD160 bec50792609af4dfe7b186cea1425dfab1fb7943 SHA1 caae778144c346801a0705a087018faaa17161fe SHA256 2ce897f22aa9db11ff1cdda14475f36b5b761e0c024cbbd9313e5f2da44e067f
|
DIST jdk6_16005_ia.depot 138004480 SHA256 2ce897f22aa9db11ff1cdda14475f36b5b761e0c024cbbd9313e5f2da44e067f
|
||||||
DIST jdk6_16005_pa.depot 99102720 RMD160 9047d0845915189af57f3f4a2f207c8a6659952b SHA1 70d7a5c9a59b95d4d5d67f28be565dce8b0aaa26 SHA256 4ed271f34d28194f83ca7271d91ca1731502c93811c9fb052aa102539c3da7f5
|
DIST jdk6_16005_pa.depot 99102720 SHA256 4ed271f34d28194f83ca7271d91ca1731502c93811c9fb052aa102539c3da7f5
|
||||||
|
@ -1,389 +0,0 @@
|
|||||||
# Copyright 1999-2015 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea/icedtea-7.2.4.8.ebuild,v 1.4 2015/05/07 12:17:28 chewi Exp $
|
|
||||||
# Build written by Andrew John Hughes (gnu_andrew@member.fsf.org)
|
|
||||||
|
|
||||||
# *********************************************************
|
|
||||||
# * IF YOU CHANGE THIS EBUILD, CHANGE ICEDTEA-6.* AS WELL *
|
|
||||||
# *********************************************************
|
|
||||||
|
|
||||||
EAPI="5"
|
|
||||||
|
|
||||||
inherit check-reqs java-pkg-2 java-vm-2 multiprocessing pax-utils prefix versionator virtualx
|
|
||||||
|
|
||||||
ICEDTEA_VER=$(get_version_component_range 2-)
|
|
||||||
ICEDTEA_BRANCH=$(get_version_component_range 2-3)
|
|
||||||
ICEDTEA_PKG=icedtea-${ICEDTEA_VER}
|
|
||||||
CORBA_TARBALL="58b31c5bf14e.tar.gz"
|
|
||||||
JAXP_TARBALL="95d394340fda.tar.gz"
|
|
||||||
JAXWS_TARBALL="bce4362b2996.tar.gz"
|
|
||||||
JDK_TARBALL="22d79652f370.tar.gz"
|
|
||||||
LANGTOOLS_TARBALL="43cdaf529543.tar.gz"
|
|
||||||
OPENJDK_TARBALL="2b38d8f0e43f.tar.gz"
|
|
||||||
HOTSPOT_TARBALL="6f93cec20d27.tar.gz"
|
|
||||||
CACAO_TARBALL="e215e36be9fc.tar.gz"
|
|
||||||
JAMVM_TARBALL="jamvm-ac22c9948434e528ece451642b4ebde40953ee7e.tar.gz"
|
|
||||||
|
|
||||||
CORBA_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-corba-${CORBA_TARBALL}"
|
|
||||||
JAXP_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-jaxp-${JAXP_TARBALL}"
|
|
||||||
JAXWS_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-jaxws-${JAXWS_TARBALL}"
|
|
||||||
JDK_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-jdk-${JDK_TARBALL}"
|
|
||||||
LANGTOOLS_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-langtools-${LANGTOOLS_TARBALL}"
|
|
||||||
OPENJDK_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-openjdk-${OPENJDK_TARBALL}"
|
|
||||||
HOTSPOT_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-hotspot-${HOTSPOT_TARBALL}"
|
|
||||||
CACAO_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-cacao-${CACAO_TARBALL}"
|
|
||||||
JAMVM_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-${JAMVM_TARBALL}"
|
|
||||||
|
|
||||||
DESCRIPTION="A harness to build OpenJDK using Free Software build tools and dependencies"
|
|
||||||
HOMEPAGE="http://icedtea.classpath.org"
|
|
||||||
SRC_PKG="${ICEDTEA_PKG}.tar.xz"
|
|
||||||
SRC_URI="
|
|
||||||
http://icedtea.classpath.org/download/source/${SRC_PKG}
|
|
||||||
http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/archive/${OPENJDK_TARBALL}
|
|
||||||
-> ${OPENJDK_GENTOO_TARBALL}
|
|
||||||
http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/corba/archive/${CORBA_TARBALL}
|
|
||||||
-> ${CORBA_GENTOO_TARBALL}
|
|
||||||
http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/jaxp/archive/${JAXP_TARBALL}
|
|
||||||
-> ${JAXP_GENTOO_TARBALL}
|
|
||||||
http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/jaxws/archive/${JAXWS_TARBALL}
|
|
||||||
-> ${JAXWS_GENTOO_TARBALL}
|
|
||||||
http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/jdk/archive/${JDK_TARBALL}
|
|
||||||
-> ${JDK_GENTOO_TARBALL}
|
|
||||||
http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/hotspot/archive/${HOTSPOT_TARBALL}
|
|
||||||
-> ${HOTSPOT_GENTOO_TARBALL}
|
|
||||||
http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/langtools/archive/${LANGTOOLS_TARBALL}
|
|
||||||
-> ${LANGTOOLS_GENTOO_TARBALL}
|
|
||||||
http://icedtea.classpath.org/download/drops/cacao/${CACAO_TARBALL} -> ${CACAO_GENTOO_TARBALL}
|
|
||||||
http://icedtea.classpath.org/download/drops/jamvm/${JAMVM_TARBALL} -> ${JAMVM_GENTOO_TARBALL}"
|
|
||||||
|
|
||||||
LICENSE="Apache-1.1 Apache-2.0 GPL-1 GPL-2 GPL-2-with-linking-exception LGPL-2 MPL-1.0 MPL-1.1 public-domain W3C"
|
|
||||||
SLOT="7"
|
|
||||||
KEYWORDS="~amd64 ~ia64 ~x86"
|
|
||||||
|
|
||||||
IUSE="+X +alsa cacao cjk +cups debug doc examples jamvm javascript +jbootstrap kerberos +nsplugin
|
|
||||||
+nss pax_kernel pulseaudio selinux +source test zero +webstart"
|
|
||||||
|
|
||||||
# Ideally the following were optional at build time.
|
|
||||||
ALSA_COMMON_DEP="
|
|
||||||
>=media-libs/alsa-lib-1.0"
|
|
||||||
CUPS_COMMON_DEP="
|
|
||||||
>=net-print/cups-1.2.12"
|
|
||||||
X_COMMON_DEP="
|
|
||||||
>=dev-libs/atk-1.30.0
|
|
||||||
>=dev-libs/glib-2.26
|
|
||||||
media-libs/fontconfig
|
|
||||||
>=media-libs/freetype-2.3.5:2=
|
|
||||||
>=x11-libs/cairo-1.8.8:=
|
|
||||||
x11-libs/gdk-pixbuf:2
|
|
||||||
>=x11-libs/gtk+-2.8:2=
|
|
||||||
>=x11-libs/libX11-1.1.3
|
|
||||||
>=x11-libs/libXext-1.1.1
|
|
||||||
>=x11-libs/libXi-1.1.3
|
|
||||||
>=x11-libs/libXrender-0.9.4
|
|
||||||
>=x11-libs/libXtst-1.0.3
|
|
||||||
x11-libs/libXt
|
|
||||||
>=x11-libs/pango-1.24.5"
|
|
||||||
X_DEPEND="
|
|
||||||
>=x11-libs/libXau-1.0.3
|
|
||||||
>=x11-libs/libXdmcp-1.0.2
|
|
||||||
>=x11-libs/libXinerama-1.0.2
|
|
||||||
x11-proto/inputproto
|
|
||||||
>=x11-proto/xextproto-7.1.1
|
|
||||||
x11-proto/xineramaproto
|
|
||||||
x11-proto/xproto"
|
|
||||||
|
|
||||||
COMMON_DEP="
|
|
||||||
>=media-libs/giflib-4.1.6:=
|
|
||||||
>=media-libs/lcms-2.5
|
|
||||||
>=media-libs/libpng-1.2:0=
|
|
||||||
>=sys-libs/zlib-1.2.3:=
|
|
||||||
virtual/jpeg:0=
|
|
||||||
javascript? ( dev-java/rhino:1.6 )
|
|
||||||
nss? ( >=dev-libs/nss-3.12.5-r1 )
|
|
||||||
pulseaudio? ( >=media-sound/pulseaudio-0.9.11:= )
|
|
||||||
kerberos? ( virtual/krb5 )
|
|
||||||
>=dev-util/systemtap-1"
|
|
||||||
|
|
||||||
# cups is needed for X. #390945 #390975
|
|
||||||
RDEPEND="${COMMON_DEP}
|
|
||||||
!dev-java/icedtea:0
|
|
||||||
X? (
|
|
||||||
${CUPS_COMMON_DEP}
|
|
||||||
${X_COMMON_DEP}
|
|
||||||
media-fonts/dejavu
|
|
||||||
cjk? (
|
|
||||||
media-fonts/arphicfonts
|
|
||||||
media-fonts/baekmuk-fonts
|
|
||||||
media-fonts/lklug
|
|
||||||
media-fonts/lohit-fonts
|
|
||||||
media-fonts/sazanami
|
|
||||||
)
|
|
||||||
)
|
|
||||||
alsa? ( ${ALSA_COMMON_DEP} )
|
|
||||||
cups? ( ${CUPS_COMMON_DEP} )
|
|
||||||
selinux? ( sec-policy/selinux-java )"
|
|
||||||
|
|
||||||
# Only ant-core-1.8.1 has fixed ant -diagnostics when xerces+xalan are not present.
|
|
||||||
# ca-certificates, perl and openssl are used for the cacerts keystore generation
|
|
||||||
# xext headers have two variants depending on version - bug #288855
|
|
||||||
# autoconf - as long as we use eautoreconf, version restrictions for bug #294918
|
|
||||||
DEPEND="${COMMON_DEP} ${ALSA_COMMON_DEP} ${CUPS_COMMON_DEP} ${X_COMMON_DEP}
|
|
||||||
|| (
|
|
||||||
>=dev-java/gcj-jdk-4.3
|
|
||||||
dev-java/icedtea-bin:7
|
|
||||||
dev-java/icedtea-bin:6
|
|
||||||
dev-java/icedtea:7
|
|
||||||
dev-java/icedtea:6
|
|
||||||
)
|
|
||||||
app-arch/cpio
|
|
||||||
app-arch/unzip
|
|
||||||
app-arch/zip
|
|
||||||
app-misc/ca-certificates
|
|
||||||
>=dev-java/ant-core-1.8.2
|
|
||||||
dev-lang/perl
|
|
||||||
>=dev-libs/libxslt-1.1.26
|
|
||||||
dev-libs/openssl
|
|
||||||
virtual/pkgconfig
|
|
||||||
sys-apps/attr
|
|
||||||
sys-apps/lsb-release
|
|
||||||
${X_DEPEND}
|
|
||||||
pax_kernel? ( sys-apps/elfix )"
|
|
||||||
|
|
||||||
PDEPEND="webstart? ( || (
|
|
||||||
dev-java/icedtea-web:0[icedtea7]
|
|
||||||
>=dev-java/icedtea-web-1.3.2:7
|
|
||||||
) )
|
|
||||||
nsplugin? ( || (
|
|
||||||
dev-java/icedtea-web:0[icedtea7,nsplugin]
|
|
||||||
>=dev-java/icedtea-web-1.3.2:7[nsplugin]
|
|
||||||
) )"
|
|
||||||
|
|
||||||
S="${WORKDIR}"/${ICEDTEA_PKG}
|
|
||||||
|
|
||||||
icedtea_check_requirements() {
|
|
||||||
local CHECKREQS_DISK_BUILD
|
|
||||||
|
|
||||||
if use doc; then
|
|
||||||
CHECKREQS_DISK_BUILD="9000M"
|
|
||||||
else
|
|
||||||
CHECKREQS_DISK_BUILD="8500M"
|
|
||||||
fi
|
|
||||||
|
|
||||||
check-reqs_pkg_${EBUILD_PHASE}
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_pretend() {
|
|
||||||
icedtea_check_requirements
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
icedtea_check_requirements
|
|
||||||
|
|
||||||
JAVA_PKG_WANT_BUILD_VM="
|
|
||||||
icedtea-7 icedtea-bin-7 icedtea7
|
|
||||||
icedtea-6 icedtea-bin-6 icedtea6 icedtea6-bin
|
|
||||||
gcj-jdk"
|
|
||||||
JAVA_PKG_WANT_SOURCE="1.5"
|
|
||||||
JAVA_PKG_WANT_TARGET="1.5"
|
|
||||||
|
|
||||||
java-vm-2_pkg_setup
|
|
||||||
java-pkg-2_pkg_setup
|
|
||||||
}
|
|
||||||
|
|
||||||
src_unpack() {
|
|
||||||
unpack ${SRC_PKG}
|
|
||||||
}
|
|
||||||
|
|
||||||
java_prepare() {
|
|
||||||
# For bootstrap builds as the sandbox control file might not yet exist.
|
|
||||||
addpredict /proc/self/coredump_filter
|
|
||||||
|
|
||||||
# icedtea doesn't like some locales. #330433 #389717
|
|
||||||
export LANG="C" LC_ALL="C"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
local bootstrap cacao_config config use_cacao use_zero zero_config
|
|
||||||
local vm=$(java-pkg_get-current-vm)
|
|
||||||
|
|
||||||
# Whether to bootstrap
|
|
||||||
bootstrap="disable"
|
|
||||||
if use jbootstrap; then
|
|
||||||
bootstrap="enable"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if has "${vm}" gcj-jdk; then
|
|
||||||
# gcj-jdk ensures ecj is present.
|
|
||||||
use jbootstrap || einfo "bootstrap is necessary when building with ${vm}, ignoring USE=\"-jbootstrap\""
|
|
||||||
bootstrap="enable"
|
|
||||||
local ecj_jar="$(readlink "${EPREFIX}"/usr/share/eclipse-ecj/ecj.jar)"
|
|
||||||
config+=" --with-ecj-jar=${ecj_jar}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
config+=" --${bootstrap}-bootstrap"
|
|
||||||
|
|
||||||
# Use Zero if requested
|
|
||||||
if use zero; then
|
|
||||||
use_zero="yes"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use CACAO if requested
|
|
||||||
if use cacao; then
|
|
||||||
use_cacao="yes"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Always use HotSpot as the primary VM if available. #389521 #368669 #357633 ...
|
|
||||||
# Otherwise use CACAO
|
|
||||||
if ! has "${ARCH}" amd64 sparc x86 ; then
|
|
||||||
if has "${ARCH}" ppc ppc64 arm ; then
|
|
||||||
use_cacao="yes"
|
|
||||||
else
|
|
||||||
use_zero="yes"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Turn on CACAO if needed (non-HS archs) or requested
|
|
||||||
if test "x${use_cacao}" = "xyes"; then
|
|
||||||
cacao_config="--enable-cacao"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Turn on Zero if needed (non-HS/CACAO archs) or requested
|
|
||||||
if test "x${use_zero}" = "xyes"; then
|
|
||||||
zero_config="--enable-zero"
|
|
||||||
fi
|
|
||||||
|
|
||||||
config+=" --with-parallel-jobs=$(makeopts_jobs)"
|
|
||||||
|
|
||||||
if use javascript ; then
|
|
||||||
config+=" --with-rhino=$(java-pkg_getjar rhino-1.6 js.jar)"
|
|
||||||
else
|
|
||||||
config+=" --without-rhino"
|
|
||||||
fi
|
|
||||||
|
|
||||||
unset JAVA_HOME JDK_HOME CLASSPATH JAVAC JAVACFLAGS
|
|
||||||
|
|
||||||
econf ${config} \
|
|
||||||
--with-openjdk-src-zip="${DISTDIR}/${OPENJDK_GENTOO_TARBALL}" \
|
|
||||||
--with-corba-src-zip="${DISTDIR}/${CORBA_GENTOO_TARBALL}" \
|
|
||||||
--with-jaxp-src-zip="${DISTDIR}/${JAXP_GENTOO_TARBALL}" \
|
|
||||||
--with-jaxws-src-zip="${DISTDIR}/${JAXWS_GENTOO_TARBALL}" \
|
|
||||||
--with-jdk-src-zip="${DISTDIR}/${JDK_GENTOO_TARBALL}" \
|
|
||||||
--with-hotspot-src-zip="${DISTDIR}/${HOTSPOT_GENTOO_TARBALL}" \
|
|
||||||
--with-langtools-src-zip="${DISTDIR}/${LANGTOOLS_GENTOO_TARBALL}" \
|
|
||||||
--with-cacao-src-zip="${DISTDIR}/${CACAO_GENTOO_TARBALL}" \
|
|
||||||
--with-jamvm-src-zip="${DISTDIR}/${JAMVM_GENTOO_TARBALL}" \
|
|
||||||
--with-jdk-home="$(java-config -O)" \
|
|
||||||
--with-abs-install-dir="${EPREFIX}/usr/$(get_libdir)/icedtea${SLOT}" \
|
|
||||||
--disable-downloading --disable-Werror \
|
|
||||||
--enable-system-lcms \
|
|
||||||
$(use_enable !debug optimizations) \
|
|
||||||
$(use_enable doc docs) \
|
|
||||||
$(use_enable nss) \
|
|
||||||
$(use_enable pulseaudio pulse-java) \
|
|
||||||
$(use_enable jamvm) \
|
|
||||||
$(use_enable kerberos system-kerberos) \
|
|
||||||
$(use_with pax_kernel pax "${EPREFIX}/usr/sbin/paxmark.sh") \
|
|
||||||
${zero_config} ${cacao_config}
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
# Would use GENTOO_VM otherwise.
|
|
||||||
export ANT_RESPECT_JAVA_HOME=TRUE
|
|
||||||
|
|
||||||
# With ant >=1.8.2 all required tasks are part of ant-core
|
|
||||||
export ANT_TASKS="none"
|
|
||||||
|
|
||||||
emake
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
# Use Xvfb for tests
|
|
||||||
unset DISPLAY
|
|
||||||
|
|
||||||
Xemake check
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
local dest="/usr/$(get_libdir)/icedtea${SLOT}"
|
|
||||||
local ddest="${ED}/${dest}"
|
|
||||||
dodir "${dest}"
|
|
||||||
|
|
||||||
dodoc README NEWS AUTHORS
|
|
||||||
dosym /usr/share/doc/${PF} /usr/share/doc/${PN}${SLOT}
|
|
||||||
|
|
||||||
cd openjdk.build/j2sdk-image || die
|
|
||||||
|
|
||||||
# Ensures HeadlessGraphicsEnvironment is used.
|
|
||||||
if ! use X; then
|
|
||||||
rm -r jre/lib/$(get_system_arch)/xawt || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Don't hide classes
|
|
||||||
rm lib/ct.sym || die
|
|
||||||
|
|
||||||
#402507
|
|
||||||
mkdir jre/.systemPrefs || die
|
|
||||||
touch jre/.systemPrefs/.system.lock || die
|
|
||||||
touch jre/.systemPrefs/.systemRootModFile || die
|
|
||||||
|
|
||||||
# doins can't handle symlinks.
|
|
||||||
cp -vRP bin include jre lib man "${ddest}" || die
|
|
||||||
|
|
||||||
dodoc ASSEMBLY_EXCEPTION THIRD_PARTY_README
|
|
||||||
|
|
||||||
if use doc; then
|
|
||||||
# java-pkg_dohtml needed for package-list #302654
|
|
||||||
java-pkg_dohtml -A dtd -r ../docs/* || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use examples; then
|
|
||||||
dodir "${dest}/share"
|
|
||||||
cp -vRP demo sample "${ddest}/share/" || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use source; then
|
|
||||||
cp src.zip "${ddest}" || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Fix the permissions.
|
|
||||||
find "${ddest}" \! -type l \( -perm /111 -exec chmod 755 {} \; -o -exec chmod 644 {} \; \) || die
|
|
||||||
|
|
||||||
# Needs to be done before generating cacerts
|
|
||||||
java-vm_set-pax-markings "${ddest}"
|
|
||||||
|
|
||||||
# We need to generate keystore - bug #273306
|
|
||||||
einfo "Generating cacerts file from certificates in ${EPREFIX}/usr/share/ca-certificates/"
|
|
||||||
mkdir "${T}/certgen" && cd "${T}/certgen" || die
|
|
||||||
cp "${FILESDIR}/generate-cacerts.pl" . && chmod +x generate-cacerts.pl || die
|
|
||||||
for c in "${EPREFIX}"/usr/share/ca-certificates/*/*.crt; do
|
|
||||||
openssl x509 -text -in "${c}" >> all.crt || die
|
|
||||||
done
|
|
||||||
./generate-cacerts.pl "${ddest}/bin/keytool" all.crt || die
|
|
||||||
cp -vRP cacerts "${ddest}/jre/lib/security/" || die
|
|
||||||
chmod 644 "${ddest}/jre/lib/security/cacerts" || die
|
|
||||||
|
|
||||||
# OpenJDK7 should be able to use fontconfig instead, but wont hurt to
|
|
||||||
# install it anyway. Bug 390663
|
|
||||||
cp "${FILESDIR}"/fontconfig.Gentoo.properties.src "${T}"/fontconfig.Gentoo.properties || die
|
|
||||||
eprefixify "${T}"/fontconfig.Gentoo.properties
|
|
||||||
insinto "${dest}"/jre/lib
|
|
||||||
doins "${T}"/fontconfig.Gentoo.properties
|
|
||||||
|
|
||||||
set_java_env "${FILESDIR}/icedtea.env"
|
|
||||||
if ! use X || ! use alsa || ! use cups; then
|
|
||||||
java-vm_revdep-mask "${dest}"
|
|
||||||
fi
|
|
||||||
java-vm_sandbox-predict /proc/self/coredump_filter
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_preinst() {
|
|
||||||
if has_version "<=dev-java/icedtea-7.2.0:7"; then
|
|
||||||
# portage would preserve the symlink otherwise, related to bug #384397
|
|
||||||
rm -f "${EROOT}/usr/lib/jvm/icedtea7"
|
|
||||||
elog "To unify the layout and simplify scripts, the identifier of Icedtea-7*"
|
|
||||||
elog "has changed from 'icedtea7' to 'icedtea-7' starting from version 7.2.0-r1"
|
|
||||||
elog "If you had icedtea7 as system VM, the change should be automatic, however"
|
|
||||||
elog "build VM settings in /etc/java-config-2/build/jdk.conf are not changed"
|
|
||||||
elog "and the same holds for any user VM settings. Sorry for the inconvenience."
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,2 +1 @@
|
|||||||
DIST java-getopt-1.0.13.tar.gz 45759 SHA256 106edfea5056112bc88bd3691b6b145d6f50aa3e8ad0bf0b4f23fffcf2c45975 SHA512 2de5cd32b199e92e6d44ff4d1b23dfab15976a569b836950adfdd1fb64b48b8d95b68926f7c083b84194f41f772c0e45ad6de6d54ceb7d7e611c533f21ea8471 WHIRLPOOL 11b144858c2f10b7cae5210306a6d0177bd1efa74cd793bc98752b5d1d4b3fa26d109c23b7fbe9eed70dde8638674bea5a7fed138f0a1b6a9b4e6c5e1ebabd7c
|
|
||||||
DIST java-getopt-1.0.14.tar.gz 45561 SHA256 ad0d5cd146d676a3ac0ef4bf6a292eb7f79d32d0cb4f202fa7e3d43dcb52d98e SHA512 611a08b60ed787eaa1bf6bf6ce45075ed2bd75d7eead941879e019ef12cb4fcd7a196d0e64e9a75adaf35240c872f14590d7afa4e2dda03016fa970bd2e2dc25 WHIRLPOOL 294783537a7dc35478a2ba6d3951ee5351435676b0bd9bf9c3315a697aeb32e55cb5e8b42b249f04f2a0c3c4a8052ef381c11dc16e0bfd5eafe41393f7ead11e
|
DIST java-getopt-1.0.14.tar.gz 45561 SHA256 ad0d5cd146d676a3ac0ef4bf6a292eb7f79d32d0cb4f202fa7e3d43dcb52d98e SHA512 611a08b60ed787eaa1bf6bf6ce45075ed2bd75d7eead941879e019ef12cb4fcd7a196d0e64e9a75adaf35240c872f14590d7afa4e2dda03016fa970bd2e2dc25 WHIRLPOOL 294783537a7dc35478a2ba6d3951ee5351435676b0bd9bf9c3315a697aeb32e55cb5e8b42b249f04f2a0c3c4a8052ef381c11dc16e0bfd5eafe41393f7ead11e
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-java/java-getopt/java-getopt-1.0.13.ebuild,v 1.14 2013/07/28 10:37:11 grobian Exp $
|
|
||||||
|
|
||||||
JAVA_PKG_IUSE="doc source"
|
|
||||||
|
|
||||||
inherit java-pkg-2 java-ant-2
|
|
||||||
|
|
||||||
DESCRIPTION="Java command line option parser"
|
|
||||||
HOMEPAGE="http://www.urbanophile.com/arenn/hacking/download.html"
|
|
||||||
SRC_URI="ftp://ftp.urbanophile.com/pub/arenn/software/sources/${P}.tar.gz"
|
|
||||||
LICENSE="LGPL-2.1"
|
|
||||||
SLOT="1"
|
|
||||||
DEPEND=">=virtual/jdk-1.4
|
|
||||||
dev-java/ant-core"
|
|
||||||
RDEPEND=">=virtual/jre-1.4"
|
|
||||||
KEYWORDS="amd64 ~arm ~ia64 ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
|
|
||||||
IUSE="doc source"
|
|
||||||
|
|
||||||
S=${WORKDIR}
|
|
||||||
|
|
||||||
src_unpack() {
|
|
||||||
unpack ${A}
|
|
||||||
cd "${S}"
|
|
||||||
mv gnu/getopt/buildx.xml build.xml || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
java-pkg_dojar build/lib/gnu.getopt.jar
|
|
||||||
dodoc gnu/getopt/COPYING.LIB gnu/getopt/ChangeLog gnu/getopt/README || die
|
|
||||||
use doc && java-pkg_dojavadoc build/api
|
|
||||||
use source && java-pkg_dosrc gnu
|
|
||||||
}
|
|
@ -1,2 +1 @@
|
|||||||
DIST java_cup_v10k.tar.gz 190843 SHA256 7e6dc5be74ae56c7e86e69ad0ad88dae3b2847afa9e73a76635918a6b1eb75cd SHA512 8c60db01b2b05832bb5fc5c27774f5037415e87587b5a3e61d64c337a5d663f86511cdee3a54e5d0016a935aa088a47a1c01a5509b09288bff135973dc1440e4 WHIRLPOOL ad26020144b3ccc3f9aaf393eccd17c89b0e99d81a4d7964204df11c1d6cd3bda0ca66cea66af779c7f3fe0b498cae40cc735fd012f1a47ce6b7ca91e8023719
|
|
||||||
DIST javacup-0.11a_beta20060608.tar.bz2 285727 SHA256 cb3ad4951d734bd1e5a6ff835018dea26a47564f820ae0a925f9c30f2fb7e1ff SHA512 383172f7d9cb127ad5d1d6de561eaf53b057bf7511f6f8c353fc03860daabb023e11330e0518b9c390e255a643c9c1e609b5fbdfd3c2e92dd68dc2d2354a931f WHIRLPOOL 6480219de3a997eb9a942ce816f9868dc13d06b8c0553521e9cf37fe568265cf752efcd36d9b64ea424d225d4823fce0652c9b0d7e1c853e38cd9f00fb12ce30
|
DIST javacup-0.11a_beta20060608.tar.bz2 285727 SHA256 cb3ad4951d734bd1e5a6ff835018dea26a47564f820ae0a925f9c30f2fb7e1ff SHA512 383172f7d9cb127ad5d1d6de561eaf53b057bf7511f6f8c353fc03860daabb023e11330e0518b9c390e255a643c9c1e609b5fbdfd3c2e92dd68dc2d2354a931f WHIRLPOOL 6480219de3a997eb9a942ce816f9868dc13d06b8c0553521e9cf37fe568265cf752efcd36d9b64ea424d225d4823fce0652c9b0d7e1c853e38cd9f00fb12ce30
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-java/javacup/javacup-0.10k-r1.ebuild,v 1.11 2012/01/02 07:47:03 sera Exp $
|
|
||||||
|
|
||||||
inherit java-pkg-2
|
|
||||||
|
|
||||||
DESCRIPTION="CUP Parser Generator for Java"
|
|
||||||
|
|
||||||
HOMEPAGE="http://www2.cs.tum.edu/projects/cup/"
|
|
||||||
SRC_URI="http://www.cs.princeton.edu/~appel/modern/java/CUP/java_cup_v10k.tar.gz"
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="amd64 ppc ppc64 x86 ~x86-fbsd"
|
|
||||||
IUSE="source"
|
|
||||||
DEPEND=">=virtual/jdk-1.3
|
|
||||||
source? ( app-arch/zip )"
|
|
||||||
RDEPEND=">=virtual/jre-1.3"
|
|
||||||
|
|
||||||
S=${WORKDIR}
|
|
||||||
|
|
||||||
src_unpack() {
|
|
||||||
unpack ${A}
|
|
||||||
cd "${S}"
|
|
||||||
find . -name "*.class" -exec rm -f {} \;
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
ejavac java_cup/*.java java_cup/runtime/*.java
|
|
||||||
find java_cup -name "*.class" | xargs jar -cvf ${PN}.jar
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
java-pkg_dojar ${PN}.jar
|
|
||||||
dodoc CHANGELOG README || die
|
|
||||||
dohtml manual.html || die
|
|
||||||
use source && java-pkg_dosrc java_cup
|
|
||||||
}
|
|
@ -1,87 +0,0 @@
|
|||||||
# Copyright 1999-2013 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-java/junit/junit-4.8.2-r1.ebuild,v 1.12 2013/02/05 06:48:08 zerochaos Exp $
|
|
||||||
|
|
||||||
# WARNING: JUNIT.JAR IS _NOT_ SYMLINKED TO ANT-CORE LIB FOLDER AS JUNIT3 IS
|
|
||||||
|
|
||||||
EAPI="3"
|
|
||||||
JAVA_PKG_IUSE="doc examples source test"
|
|
||||||
|
|
||||||
inherit java-pkg-2 java-ant-2
|
|
||||||
|
|
||||||
DESCRIPTION="Simple framework to write repeatable tests"
|
|
||||||
SRC_URI="mirror://github/KentBeck/${PN}/${PN}${PV}.zip"
|
|
||||||
HOMEPAGE="http://www.junit.org/"
|
|
||||||
LICENSE="CPL-1.0"
|
|
||||||
SLOT="4"
|
|
||||||
KEYWORDS="amd64 ~arm ~ia64 ppc ppc64 x86 ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
|
|
||||||
IUSE=""
|
|
||||||
|
|
||||||
CDEPEND="dev-java/hamcrest-core:0"
|
|
||||||
RDEPEND=">=virtual/jre-1.5
|
|
||||||
${CDEPEND}"
|
|
||||||
DEPEND=">=virtual/jdk-1.5
|
|
||||||
userland_GNU? ( >=sys-apps/findutils-4.3 )
|
|
||||||
${CDEPEND}"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${PN}${PV}"
|
|
||||||
|
|
||||||
EANT_BUILD_TARGET="jars"
|
|
||||||
|
|
||||||
src_unpack() {
|
|
||||||
default
|
|
||||||
|
|
||||||
# Unpack source JAR
|
|
||||||
mkdir -p "${S}/src/main/java" "${S}/src/test/java" \
|
|
||||||
|| die "Unable to create source directories"
|
|
||||||
pushd "${S}/src/main/java" >/dev/null
|
|
||||||
jar xf "${S}/${P}-src.jar" || die "Unable to unpack sources."
|
|
||||||
popd >/dev/null
|
|
||||||
|
|
||||||
# copy Gentoo manifest to working directory
|
|
||||||
cp "${FILESDIR}/gentoo-manifest.mf" "${S}" || die
|
|
||||||
}
|
|
||||||
|
|
||||||
java_prepare() {
|
|
||||||
# fix javadoc compilation
|
|
||||||
if use doc ; then
|
|
||||||
cp "${S}"/javadoc/stylesheet.css "${S}" \
|
|
||||||
|| die "Unable to copy Javdoc stylesheet"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# remove binary and other generated files
|
|
||||||
rm -rf javadoc temp.hamcrest.source *.jar \
|
|
||||||
|| die "Unable to clean generated files."
|
|
||||||
find . -name "*.class" -delete \
|
|
||||||
|| die "Unable to remove distributed class files"
|
|
||||||
|
|
||||||
# Let Ant know where its hamcrest went
|
|
||||||
EANT_EXTRA_ARGS="-Dhamcrestlib=$(java-pkg_getjars hamcrest-core)"
|
|
||||||
|
|
||||||
# Add Gentoo manifest information to generated JAR files
|
|
||||||
java-ant_xml-rewrite -f build.xml -c \
|
|
||||||
-e jar -a manifest -v "gentoo-manifest.mf"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
mkdir classes || die "Unable to create build directory for tests"
|
|
||||||
|
|
||||||
local cp=$(java-pkg_getjars hamcrest-core):${S}/${PN}${PV}/${PN}-dep-${PV}.jar
|
|
||||||
ejavac -classpath ${cp} -d classes $(find junit/tests -name "*.java")
|
|
||||||
|
|
||||||
java -classpath ${cp}:classes org.junit.runner.JUnitCore junit.tests.AllTests \
|
|
||||||
|| die "Tests failed."
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
java-pkg_newjar ${PN}${PV}/${PN}-dep-${PV}.jar
|
|
||||||
dodoc README.html doc/ReleaseNotes${PV}.txt || die
|
|
||||||
|
|
||||||
use examples && java-pkg_doexamples org/junit/samples
|
|
||||||
use source && java-pkg_dosrc src/main/java/org src/main/java/junit
|
|
||||||
|
|
||||||
if use doc; then
|
|
||||||
dohtml -r doc/*
|
|
||||||
java-pkg_dojavadoc ${PN}${PV}/javadoc
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
# Copyright 1999-2015 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-java/tomcat-servlet-api/tomcat-servlet-api-8.0.22.ebuild,v 1.1 2015/05/07 16:58:04 fordfrog Exp $
|
|
||||||
|
|
||||||
EAPI="5"
|
|
||||||
JAVA_PKG_IUSE="source"
|
|
||||||
|
|
||||||
inherit eutils java-pkg-2 java-ant-2
|
|
||||||
|
|
||||||
MY_A="apache-${P}-src"
|
|
||||||
MY_P="${MY_A/-servlet-api/}"
|
|
||||||
DESCRIPTION="Tomcat's Servlet API 3.1/JSP API 2.3 implementation"
|
|
||||||
HOMEPAGE="http://tomcat.apache.org/"
|
|
||||||
SRC_URI="mirror://apache/tomcat/tomcat-8/v${PV}/src/${MY_P}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="Apache-2.0"
|
|
||||||
SLOT="3.1"
|
|
||||||
KEYWORDS="~amd64 ~ia64 ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
|
|
||||||
IUSE=""
|
|
||||||
|
|
||||||
DEPEND=">=virtual/jdk-1.7"
|
|
||||||
RDEPEND=">=virtual/jre-1.7"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${MY_P}/"
|
|
||||||
|
|
||||||
java_prepare() {
|
|
||||||
cp "${FILESDIR}/${SLOT}-build.xml" build.xml || die "Could not replace build.xml"
|
|
||||||
rm -fR */*/build.xml
|
|
||||||
einfo "Removing bundled jars and classes"
|
|
||||||
find "${S}" '(' -name '*.class' -o -name '*.jar' ')' -exec rm -frv {} +
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
java-pkg_dojar "${S}"/output/build/lib/*.jar
|
|
||||||
use source && java-pkg_dosrc java/javax/servlet/
|
|
||||||
}
|
|
@ -1,16 +1,11 @@
|
|||||||
DIST php-5.4.39.tar.bz2 12271717 SHA256 7ceb76538e709c74533210ae41148d5c01c330ac8a73220954bbc4fcae69d77e SHA512 b944517b754fbdfc0b50dd18d2644edc9abe3a66ac9806c748b7b98f5c5c07eeaabdf7990799bb39ebf716b90b4e8b34e5fedb3379c1b05bce5530d3cdf4e42d WHIRLPOOL 28fdea55684c99b53545c83fffa686a76714846d2a0af0fa514f450fdf86faa3541f752113a51189a0ec7786a5d55171eaa7be3a8d0418b60fe920be552fcf22
|
|
||||||
DIST php-5.4.40.tar.bz2 12272787 SHA256 4898ffe8ac3ccb2d8cc94f7d76a9ea0414d954f5d4479895ddfccdc2e158a51a SHA512 23fc43a310d8f05078c5a0fdc574a49d7037385f6c6fb154c1cb900d87b9f356d2fe8a708d7f20cb1304c4715f1c5bdd64063049f4d7fe157621e36e83cf7535 WHIRLPOOL b74c868e5991562ff0a019f438bc52d228fb17de95e252a7f1e2c323c0cf21da0be8a72f7f44f18051d7bb295974fc1ee605415658e2d5657eddb1e3726a233d
|
|
||||||
DIST php-5.4.41.tar.bz2 12487089 SHA256 5bc4b45a1280ff80a3cf5b8563716f325cfd0121d7fd25aa54d56ff38b3b8272 SHA512 3034adab5e47bd4dedb207d305fcbbdc9ca5bc0869fa1c55c43841101c54e8fd73d36b9ac80a84f74c71f2a23ad390cda7bf60e2347570e542b1db8c3aefa2f7 WHIRLPOOL 68af528ef069c7b6cb3bdc07e25b9bdd2af31dc248ad023a3f7948bfc49886bc7a803e9656fa12e860dd6338da1817fd3d8ca91b066e4e329e255626434e2016
|
DIST php-5.4.41.tar.bz2 12487089 SHA256 5bc4b45a1280ff80a3cf5b8563716f325cfd0121d7fd25aa54d56ff38b3b8272 SHA512 3034adab5e47bd4dedb207d305fcbbdc9ca5bc0869fa1c55c43841101c54e8fd73d36b9ac80a84f74c71f2a23ad390cda7bf60e2347570e542b1db8c3aefa2f7 WHIRLPOOL 68af528ef069c7b6cb3bdc07e25b9bdd2af31dc248ad023a3f7948bfc49886bc7a803e9656fa12e860dd6338da1817fd3d8ca91b066e4e329e255626434e2016
|
||||||
DIST php-5.4.42.tar.bz2 12708394 SHA256 6285b2e64bfaa69e5d983d7d981b4f254f5259ad3fd591ca832722a4cc1ae0f9 SHA512 74ff03081321418f9afa1e2275198c86a5a6bf2fa923eb414e02256b8228f0b26b67bb818ccfac46a0658d2bd0f5f4113549c8e515e97992b9b646ec215b4744 WHIRLPOOL 21e925aedea63f234cf4269bff44469345a3f34c5d99b95a2c6f2d7ff86f7746ab5321f7b4306294b33952cfe5b2959221874eede09b83dadaea69ed46a1d49b
|
DIST php-5.4.42.tar.bz2 12708394 SHA256 6285b2e64bfaa69e5d983d7d981b4f254f5259ad3fd591ca832722a4cc1ae0f9 SHA512 74ff03081321418f9afa1e2275198c86a5a6bf2fa923eb414e02256b8228f0b26b67bb818ccfac46a0658d2bd0f5f4113549c8e515e97992b9b646ec215b4744 WHIRLPOOL 21e925aedea63f234cf4269bff44469345a3f34c5d99b95a2c6f2d7ff86f7746ab5321f7b4306294b33952cfe5b2959221874eede09b83dadaea69ed46a1d49b
|
||||||
DIST php-5.5.22.tar.bz2 13305486 SHA256 c218c184bef2905bc79fcdda6040f3d1738261395fb706396935d1c6f6e162bb SHA512 3eabd6fa2cd10e83fc3c00fb43313feefbb8c2772778dc6f176612fcb449761e22b55053e5b0b7f6954c0c141ab6c799f08bdca1851078511b7ef9376dadefac WHIRLPOOL 7c36ba90ed40d315475d721a3827065ee0e8748315f100383d4481b8ff1fb9af2b2a25f4dec5f3c5d8f378ff2213ce80fdc4c624c8a51cc312d51d505118b514
|
DIST php-5.4.43.tar.bz2 12708452 SHA256 25d7724fb00ad1b520f5bad2173717031153d0a8e3de2c75e7a084c76f8ecd6b SHA512 8fcf8a5b8a1f51fcbce19498b693eba0d772fc33fed07934f75f1b28de0c9ef25ab74d989f455c67b8d36f301b1808dbab324f9c5931ea9cd9d88560373d75b1 WHIRLPOOL 844f44aaa955cedff71940a76ee28d3efaf4e530bdc2e66697471afc85f4ec8e257be50a79efba7be87e2be4c45dad19fbff29bcdf100327290ac77b6d82e13e
|
||||||
DIST php-5.5.23.tar.bz2 13308115 SHA256 a99ab264dcd40181baa9defeaa4b21eb2c20d4e9316b904cc05f628762e6ada7 SHA512 b72f74d91afa9d9cc2d7b24468a37382cce47d337c63cd6a4abeea0a1c1d4d4df4245fe085a685a16cc0197fb342211653d41007ff1a4439a664ee33a1525896 WHIRLPOOL b6668a847d4d8b984c2fae8187d81206af010d8334df46f99978a4ad59854f3909dbd8d462d2ad4d52b290abdeb77562cec691aa21432aefbd88474d9b4584a9
|
|
||||||
DIST php-5.5.24.tar.bz2 13337043 SHA256 801b5cf2e0c01b07314d4ac3c8a7c28d524bdd8263ebdd0e33a99008251316a2 SHA512 c43f03a93d0199cc174f1b00b4a34717a82500d5f2cd408d8e39f31cff171f8a2019f31beed044524a795e54fab344e55c41f5d1f3b9e9fea98e2cd04aba6152 WHIRLPOOL 8179016a5d6ebf4993137433bd92a01f162880b373b165be7b1702c5a3ddedd11c308e0e4c0c0b64f84a3cc9083e7e0647d2488997c59ebb126c4bff59d216de
|
|
||||||
DIST php-5.5.25.tar.bz2 13422002 SHA256 68df37e725ddd05675c0df906041038127938ecc52113a54d10e1e4029262c63 SHA512 961e1c48c591bf3c4c6068b2dca9f3cab41925b0845e4886128e75272622ee6e24ca94e2f4cd18874e27d61de7ad7aa238c6040d57c6696f62b77ffa33fec26a WHIRLPOOL efddc221988eb9e46adf2301cc1f1a39740efb27f7a5ba9673b9021d6fd6ee2b894cfe38c3d3af2098afa3f0c92fb9ab31f7cd8abebbacfb3180406f11b48e9a
|
DIST php-5.5.25.tar.bz2 13422002 SHA256 68df37e725ddd05675c0df906041038127938ecc52113a54d10e1e4029262c63 SHA512 961e1c48c591bf3c4c6068b2dca9f3cab41925b0845e4886128e75272622ee6e24ca94e2f4cd18874e27d61de7ad7aa238c6040d57c6696f62b77ffa33fec26a WHIRLPOOL efddc221988eb9e46adf2301cc1f1a39740efb27f7a5ba9673b9021d6fd6ee2b894cfe38c3d3af2098afa3f0c92fb9ab31f7cd8abebbacfb3180406f11b48e9a
|
||||||
DIST php-5.5.26.tar.bz2 13671379 SHA256 816afffdb03ff4c542bc172a2f77f9c69b817df82d60cce05c1b4f578c2c926e SHA512 eaea4160cbf6970d4fcd8b4dd897fc1c8d32397ecd613a39b3a8657e339b9e60dca25afcdf76598a5f763520aa7cdacb1f8338dc3fee5400b28ca27d19205132 WHIRLPOOL e0f63d93bda0d0cefb7309f7f6afe2ee0b8e46ec2005684628803f2c5ed460e577281b6e10f26b999711c061eb40160ef628cd80cb9545b7715c385ee37ae4d0
|
DIST php-5.5.26.tar.bz2 13671379 SHA256 816afffdb03ff4c542bc172a2f77f9c69b817df82d60cce05c1b4f578c2c926e SHA512 eaea4160cbf6970d4fcd8b4dd897fc1c8d32397ecd613a39b3a8657e339b9e60dca25afcdf76598a5f763520aa7cdacb1f8338dc3fee5400b28ca27d19205132 WHIRLPOOL e0f63d93bda0d0cefb7309f7f6afe2ee0b8e46ec2005684628803f2c5ed460e577281b6e10f26b999711c061eb40160ef628cd80cb9545b7715c385ee37ae4d0
|
||||||
|
DIST php-5.5.27.tar.bz2 13692811 SHA256 c4b4c6a534c0ca67a9ae39bec4f51e52d13e820135dd016eae230e15337e1f70 SHA512 b73eb13000048cb94da186ca505a51bca9d10694b1d4a07a282b9c3d9833138d1e45dd47e9d6acb628b8150e4aeab18f56f6e698251db8ee66a7f88df3816255 WHIRLPOOL 57e11bd9e63d6174f2c19cc283ed52c06487af0ea61827fc345482262e57defc64ec4942c46b3d71c18f53f1b93a22dd3c2d80f00547d9578582f6a6ab50bd00
|
||||||
DIST php-5.6.10.tar.bz2 14080915 SHA256 0a579c81c724ea41815eee0caa8ea7d8eeb302458519d8cc4fc5b055577c8c45 SHA512 c2a0d4d7a2d20224591e7e7f3617ed4e6c49d6284797b092a0352c86d3cd88b8c5ec5092e4b97134c06a504a0df31963b191e1ca66b4fc395987bfb0d5ca4643 WHIRLPOOL 7f17e7da5ae70d817e25cdbd87e3cfff83d91a421ac9a0bfbf6f10f3796bd3d34de209da8b9bcc59c80f8573d2685cf9266a2fb3af89870cac90d13324e82e74
|
DIST php-5.6.10.tar.bz2 14080915 SHA256 0a579c81c724ea41815eee0caa8ea7d8eeb302458519d8cc4fc5b055577c8c45 SHA512 c2a0d4d7a2d20224591e7e7f3617ed4e6c49d6284797b092a0352c86d3cd88b8c5ec5092e4b97134c06a504a0df31963b191e1ca66b4fc395987bfb0d5ca4643 WHIRLPOOL 7f17e7da5ae70d817e25cdbd87e3cfff83d91a421ac9a0bfbf6f10f3796bd3d34de209da8b9bcc59c80f8573d2685cf9266a2fb3af89870cac90d13324e82e74
|
||||||
DIST php-5.6.7.tar.bz2 13697400 SHA256 02954fb74c61a7879d48ebdcd4ecb78aa0056f4215ca9b096232de28eb8f17bc SHA512 594b306cd2bb1dd2034a39b13d3642d957869b305c5e169e6020472b659feb6d1a7a1d1a75bf71965335450caf4762d9a0db2585d68e95606e34e9d03580830f WHIRLPOOL a6155be31975d9e0af039e3974ede650c920dcfef9bd4224f1f997c190762838541bf9f3747ce52516aee40860833babf31f1fdadf86f81531ce6877cbbd0d9b
|
DIST php-5.6.11.tar.bz2 14081292 SHA256 bd6b260816764c267244749ead07482120dbf8d1920ebbbb0dcb2aa411033866 SHA512 c6319939882a7e736cc4311470ff4802439452e45785f57c18f57e7ffaa2bce1df90221e5f44a9f0b778f56ed5fe3d86248bfd44df7537fd9f2151c09a2442e3 WHIRLPOOL 10e7973b8124b1dd3c7ef1d83a74f210b61de2d4979bf0b2f1b1eb3823be9e20bef976c9e028b27d625590db489849475a418747c0e26d3ce5560c390ad938d4
|
||||||
DIST php-5.6.8.tar.bz2 13724681 SHA256 0af0045745d61eeb74a3ea744529a2481b27cb689da720e6c0250675043724e4 SHA512 1d2466411b3704db8af5db5ed6b0a073510fbeda3c01036fda2b0f9cf6c8ccfb2039ea9ea2ff51769d228c06f9c43ad83c080d164c6981df46d48904e767e939 WHIRLPOOL 27600e85ece76e923b405c8402ebd54bcb738e23e0d646b13c1c656f24d724bc51e062fba0d307e88b0160ff357d0b29c8d4384695e11492b1cb04589d2c1fee
|
|
||||||
DIST php-5.6.9.tar.bz2 14037070 SHA256 19d3b87b7b8bba3be24cf6d757d16b723a98881c3af8d15469fd25501e9abcb9 SHA512 c00e0fdfc60a84e0a9ebe4702907b86b86a65efc72c26fa86abc1ed79afa21fb1eb10052c1fc2326f5cb9858878f62e1a39c1cd02ea2a96fb8f14c515b26389e WHIRLPOOL e561f0c183314e05ffb34f633eac0f638d1f81d6d0a1445390ffde7baad9ce8798605bdd9a51b1227177e6b0849f752cb342d7168cc94a465406149bfad45947
|
DIST php-5.6.9.tar.bz2 14037070 SHA256 19d3b87b7b8bba3be24cf6d757d16b723a98881c3af8d15469fd25501e9abcb9 SHA512 c00e0fdfc60a84e0a9ebe4702907b86b86a65efc72c26fa86abc1ed79afa21fb1eb10052c1fc2326f5cb9858878f62e1a39c1cd02ea2a96fb8f14c515b26389e WHIRLPOOL e561f0c183314e05ffb34f633eac0f638d1f81d6d0a1445390ffde7baad9ce8798605bdd9a51b1227177e6b0849f752cb342d7168cc94a465406149bfad45947
|
||||||
DIST php-7.0.0alpha1.tar.bz2 14446845 SHA256 18b415652b5bb15512142de3887a366d43611cb08da149bd7a3132d3ff1ee7d0 SHA512 a922d58863aff0240902278fcf30e5c1545acc770f069b2d0256e98bfb26583ca3911bf401058cb9fba860c2468041696a21c14536ee79284fd076dd3f211ffb WHIRLPOOL c14037264c4e76700e6596a17adb4c41add20825875ea5863cc1806e00bd91c270070a8a8acc648d662e91d38259b3ae472ffccf0fb6ffbb4d82536edcd12528
|
DIST php-7.0.0beta1.tar.bz2 14642405 SHA256 04a556a1d9108119c661f6f50ab71f94ad9fb61be3ee08cec8e2710d9df643de SHA512 496388128d5cff5c86bebb253f08e55c6b5957ed33abf96060818c31c3f8b81dd989fc437556b8071b6ba0ebb30e6b251f2b2c3326b204891467ae73c4967d9f WHIRLPOOL 0b33f5bc8df641d04f11c0e8e8a9c6f511521f9bd092392ea2bf25983539f84d1bf636cb90719672032ebdec5c64dc0b9cefe1dbdbb5e28d2c68aab72e950370
|
||||||
DIST php-7.0.0alpha2.tar.bz2 14435433 SHA256 779aa6ab9ef23aa3bdb5e9a17ea015afed402566cb4c973daa504d2f03a2561c SHA512 c377639e3ed304f056ea15b857cf367ee702c5fcdc7a639e55e7023e407c93506a14f1d55d54332f1733237bbcc66d3aee0c0c13bf9c93104f06c53fcbe5f40c WHIRLPOOL b4a92feb7ca768d5b5da3afefa50844a32bbabdb6d7ed93db59e0e3ebbc4b37e40d48c2430de36bcad4b83a927d55e5f3cc872ad7e8f8b8418aca1a898379ff6
|
|
||||||
DIST php-patchset-5.4-r2.tar.bz2 5824 SHA256 4a47f4d31f50a244f85349486cdb3474cf315562e097ed4c116c2b9b5730ecef SHA512 3c2523458a627373da7acb93fb2cd621f50b19fe2ba1d30beb62eeaaa39045262b917cfd0b631046fec9c8027cfa99bd0426a079ab45eb172b21d25d6e085dde WHIRLPOOL fe4f015e2f0dc66cc23ef16fb5bb33117952593ae0770d4bcd37ecc1c431cbcc7874189d265696305c60b4e395e7ce902667e38203db46867304868271affdea
|
DIST php-patchset-5.4-r2.tar.bz2 5824 SHA256 4a47f4d31f50a244f85349486cdb3474cf315562e097ed4c116c2b9b5730ecef SHA512 3c2523458a627373da7acb93fb2cd621f50b19fe2ba1d30beb62eeaaa39045262b917cfd0b631046fec9c8027cfa99bd0426a079ab45eb172b21d25d6e085dde WHIRLPOOL fe4f015e2f0dc66cc23ef16fb5bb33117952593ae0770d4bcd37ecc1c431cbcc7874189d265696305c60b4e395e7ce902667e38203db46867304868271affdea
|
||||||
|
@ -1,802 +0,0 @@
|
|||||||
# 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.40.ebuild,v 1.9 2015/05/27 13:05:46 ago 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-eselect/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" # actually provided by app-eselect/eselect-php
|
|
||||||
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,12 +1,12 @@
|
|||||||
# Copyright 1999-2015 Gentoo Foundation
|
# Copyright 1999-2015 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.4.39.ebuild,v 1.12 2015/04/17 09:46:51 ago Exp $
|
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.4.43.ebuild,v 1.1 2015/07/11 10:59:01 olemarkus Exp $
|
||||||
|
|
||||||
EAPI=5
|
EAPI=5
|
||||||
|
|
||||||
inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
|
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"
|
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 ()
|
function php_get_uri ()
|
||||||
{
|
{
|
@ -1,784 +0,0 @@
|
|||||||
# 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.22.ebuild,v 1.10 2015/04/05 22:15:41 sping 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-eselect/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" # actually provided by app-eselect/eselect-php
|
|
||||||
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,784 +0,0 @@
|
|||||||
# 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.23.ebuild,v 1.12 2015/04/17 09:46:51 ago 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-eselect/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" # actually provided by app-eselect/eselect-php
|
|
||||||
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,784 +0,0 @@
|
|||||||
# 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.24.ebuild,v 1.9 2015/05/27 13:05:46 ago 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-eselect/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" # actually provided by app-eselect/eselect-php
|
|
||||||
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,784 +0,0 @@
|
|||||||
# 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.25.ebuild,v 1.5 2015/05/27 13:06:06 ago 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-eselect/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" # actually provided by app-eselect/eselect-php
|
|
||||||
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
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue