diff options
author | Tomas Chvatal <scarabeus@gentoo.org> | 2011-03-19 14:31:43 +0000 |
---|---|---|
committer | Tomas Chvatal <scarabeus@gentoo.org> | 2011-03-19 14:31:43 +0000 |
commit | eb97523c0f466d12f8253555dbb00c85008226a7 (patch) | |
tree | aaf5ead8e7e13dcb95bdad344ef1cb5f268de5cb /eclass | |
parent | Marking polarssl-0.14.2 ppc for bug 358783 (diff) | |
download | historical-eb97523c0f466d12f8253555dbb00c85008226a7.tar.gz historical-eb97523c0f466d12f8253555dbb00c85008226a7.tar.bz2 historical-eb97523c0f466d12f8253555dbb00c85008226a7.zip |
Mark unused eclasses as dead. To be removed completely on 2011-04-30.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/eclipse-ext.eclass | 243 | ||||
-rw-r--r-- | eclass/fortran.eclass | 225 | ||||
-rw-r--r-- | eclass/games-q3mod.eclass | 145 | ||||
-rw-r--r-- | eclass/mozconfig-2.eclass | 68 | ||||
-rw-r--r-- | eclass/mozcoreconf.eclass | 273 | ||||
-rw-r--r-- | eclass/php-pear.eclass | 26 | ||||
-rw-r--r-- | eclass/php5_2-sapi.eclass | 735 | ||||
-rw-r--r-- | eclass/poppler.eclass | 198 | ||||
-rw-r--r-- | eclass/ruby-gnome2.eclass | 85 |
9 files changed, 36 insertions, 1962 deletions
diff --git a/eclass/eclipse-ext.eclass b/eclass/eclipse-ext.eclass index 6c33a21bee12..58f410402925 100644 --- a/eclass/eclipse-ext.eclass +++ b/eclass/eclipse-ext.eclass @@ -1,242 +1,7 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eclipse-ext.eclass,v 1.13 2006/04/17 03:47:44 nichoj Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eclipse-ext.eclass,v 1.14 2011/03/19 14:31:43 scarabeus Exp $ -# Original Author: Karl Trygve Kalleberg <karltk@gentoo.org> -# Maintainers: -# Development Tools Team <dev-tools@gentoo.org> -# Java Team <java@gentoo.org> - -inherit eutils multilib - - -# Must be listed in oldest->newest order! -known_eclipse_slots="2 3 3.1" - -# These should not be reinitialized if previously set -# (check allows require-slot in pkg_setup) - -[ -z "${eclipse_ext_type}" ] && \ - eclipse_ext_type="source" - -[ -z "${eclipse_ext_slot}" ] && \ - eclipse_ext_slot="0" - -[ -z "${eclipse_ext_basedir}" ] && \ - eclipse_ext_basedir="/usr/$(get_libdir)/eclipse-extensions-${eclipse_ext_slot}/eclipse" - -[ -z "${eclipse_ext_platformdir}" ] && \ - eclipse_ext_platformdir="/usr/$(get_libdir)/eclipse-${eclipse_ext_slot}" - -# --------------------------------------------------------------------------- -# @private _find-optimum-slot -# -# Look for a given SLOT. If not found return the least highest SLOT -# available. -# -# @param $1 - SLOT of Eclipse SDK that is most desired -# @return 0 - all is well, non-zero otherwise -# --------------------------------------------------------------------------- -function _find-optimum-slot { - local found=false - - for x in ${known_eclipse_slots} ; do - if [ "$1" == "$x" ] ; then - found=true - fi - if [ "${found}" == "true" ] && [ -d /usr/$(get_libdir)/eclipse-${x} ] ; then - echo $x - return 0 - fi - done - echo "" - return 1 -} - -# --------------------------------------------------------------------------- -# @public require-slot -# -# Ensure that an Eclipse SDK is actually available for the given slot; -# sets internal state to install for selected slot. -# -# @param $1 - SLOT of Eclipse SDK that required for this ebuild -# alternatively -# @return 0 - all is well, non-zero otherwise -# --------------------------------------------------------------------------- -function eclipse-ext_require-slot { - - local slot=$(_find-optimum-slot $1) - - if [ -z "${slot}" ] ; then - eerror "Cannot find any Eclipse SDK supporting slot $1" - return 1 - fi - - if [ "${slot}" != "$1" ] ; then - ewarn "Slot $1 could not be satisfied, installing for ${slot} instead" - fi - - eclipse_ext_slot=${slot} - eclipse_ext_basedir="/usr/$(get_libdir)/eclipse-extensions-${eclipse_ext_slot}/eclipse" - eclipse_ext_platformdir="/usr/$(get_libdir)/eclipse-${eclipse_ext_slot}" - - return 0 -} - -# --------------------------------------------------------------------------- -# @public create-plugin-layout -# -# Create directory infrastructure for binary-only plugins so that the installed -# Eclipse SDK will see them. Sets internal state for installing as source or -# binary. -# -# @param $1 - type of ebuild, "source" or "binary" -# @return - nothing -# --------------------------------------------------------------------------- -function eclipse-ext_create-ext-layout { - local type=$1 - if [ "${type}" == "binary" ] ; then - eclipse_ext_basedir="/opt/eclipse-extensions-${eclipse_ext_slot}/eclipse" - dodir ${eclipse_ext_basedir}/{features,plugins} - touch ${D}/${eclipse_ext_basedir}/.eclipseextension - else - eclipse_ext_basedir="/usr/$(get_libdir)/eclipse-extensions-${eclipse_ext_slot}/eclipse" - dodir ${eclipse_ext_basedir}/{features,plugins} - touch ${D}/${eclipse_ext_basedir}/.eclipseextension - fi -} - -# --------------------------------------------------------------------------- -# @public install-features -# -# Installs one or multiple features into the plugin directory for the required -# Eclipse SDK. -# -# Note: You must call require-slot prior to calling install-features. If your -# ebuild is for a binary-only plugin, you must also call create-plugin-layout -# prior to calling install-features. -# -# @param $* - feature directories -# @return 0 - if all is well -# 1 - if require-slot was not called -# --------------------------------------------------------------------------- -function eclipse-ext_install-features { - if [ ${eclipse_ext_slot} == 0 ] ; then - eerror "You must call require-slot prior to calling ${FUNCNAME}!" - return 1 - fi - - for x in $* ; do - if [ -d "$x" ] && [ -f $x/feature.xml ] ; then - cp -a $x ${D}/${eclipse_ext_basedir}/features - else - eerror "$x not a feature directory!" - fi - done -} - -# --------------------------------------------------------------------------- -# @public install-plugins -# -# Installs one or multiple plugins into the plugin directory for the required -# Eclipse SDK. -# -# Note: You must call require-slot prior to calling install-features. If your -# ebuild is for a binary-only plugin, you must also call create-plugin-layout -# prior to calling install-features. -# -# @param $* - plugin directories -# @return - nothing -# --------------------------------------------------------------------------- - -function eclipse-ext_install-plugins { - if [ ${eclipse_ext_slot} == 0 ] ; then - eerror "You must call require-slot prior to calling ${FUNCNAME}!" - return 1 - fi - - for x in $* ; do - if [ -d "$x" ] && ( [ -f "$x/plugin.xml" ] || [ -f "$x/fragment.xml" ] ) ; then - cp -a $x ${D}/${eclipse_ext_basedir}/plugins - else - eerror "$x not a plugin directory!" - fi - done -} - -# TODO really should have a page hosted on gentoo's infra -function eclipse-ext_pkg_postinst() { - einfo "For tips, tricks and general info on running Eclipse on Gentoo, go to:" - einfo "http://gentoo-wiki.com/Eclipse" -} - -# --------------------------------------------------------------------------- -# @public get-classpath -# -# Tries to parse out a classpath string from a build.properties file. Is very -# stupid: Assumes it's a one-liner on the form classpath = comma:separated: -# -# @param $1 - name of the file (typically build.properties) -# @param $2 - name of the one-liner env var (default 'classpath') -# @return - echo of space-separated classpath entries. -# --------------------------------------------------------------------------- - -eclipse-ext_get-classpath() { - local file=$1 - local envvar="classpath" - - if [ "$1" == "build.properties" ] ; then - if [ ! -z "$2" ] ; then - envvar="$2" - fi - fi - - echo "$(cat ${FILESDIR}/build.properties-${PV} | sed "s/.*=//" | tr ';' ' ')" -} - -_path-dissecter() { - echo $1 | sed -r "s/.*\/([^/]+)_([0-9.]+)\/(.*)/\\${2}/" -} - -_get-plugin-name() { - _path-dissecter $1 1 -} - -_get-plugin-version() { - _path-dissecter $1 2 -} - -_get-plugin-content() { - _path-dissecter $1 3 -} - -# --------------------------------------------------------------------------- -# @public resolve-jars -# -# Takes a space-separated list of plugin_version/subdirs/file.jar entries and -# tries to resolve the version for the plugin against the chosen eclipse version -# (set by require-slot). -# -# Note: You must call require-slot prior to calling resolve-jars. -# -# @param $1 - string with space-separated plugin/jarfile -# @return - echo of :-separated resolved files -# --------------------------------------------------------------------------- -eclipse-ext_resolve-jars() { - local resolved="" - - for x in $1 ; do - local jarfile=$(_get-plugin-content $x) - local name="$(_get-plugin-name $x)" - local x=$(echo ${eclipse_ext_platformdir}/plugins/${name}_*/${jarfile}) - if [ -f ${x} ] ; then - resolved="${resolved}:$x" - else - : - #echo "Warning: did not find ${name}" - fi - done - echo ${resolved} -} - -EXPORT_FUNCTIONS pkg_postinst +# @DEAD +# To be removed on 2011/04/30. +ewarn "Please fix your package ( ${CATEGORY}/${PF} ) to not use ${ECLASS}.eclass" diff --git a/eclass/fortran.eclass b/eclass/fortran.eclass index f4fa38bdf419..8632d8e5acb8 100644 --- a/eclass/fortran.eclass +++ b/eclass/fortran.eclass @@ -1,224 +1,7 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/fortran.eclass,v 1.22 2011/03/14 17:16:30 jlec Exp $ -# -# Author: Danny van Dyk <kugelfang@gentoo.org> -# +# $Header: /var/cvsroot/gentoo-x86/eclass/fortran.eclass,v 1.23 2011/03/19 14:31:43 scarabeus Exp $ -# @DEPRECATED -# This eclass has been superseded by functions in toolchain-funcs.eclass: -# Please use tc-getFC to set the fortran compiler! -# https://bugs.gentoo.org/348851 - -ewarn "The fortran.eclass is deprecated! Please use the toolchains-funcs.eclass" -ewarn "https://bugs.gentoo.org/348851" - -inherit eutils autotools - -DESCRIPTION="Based on the ${ECLASS} eclass" - -IUSE="debug" - -#DEPEND="virtual/fortran" # Let's aim for this... - -# Which Fortran Compiler has been selected ? -export FORTRANC - -# These are the options to ./configure / econf that enable the usage -# of a specific Fortran Compiler. If your package uses a different -# option that the one listed here, overwrite it in your ebuild. -g77_CONF="--with-f77" -f2c_CONF="--with-f2c" - -# This function prints the necessary options for the currently selected -# Fortran Compiler. -fortran_conf() { - echo $(eval echo \${$(echo -n ${FORTRANC})_CONF}) -} - -# need_fortran(<profiles>): -# profiles = <profile> ... <profile> -# -# profile: -# * gfortran - GCC Fortran 95 -# * g77 - GCC Fortran 77 -# * f2c - Fortran 2 C Translator -# * ifc - Intel Fortran Compiler -# * f95 - Sun Studio Fortran Compiler -# -# Checks if at least one of <profiles> is installed. -# Checks also if F77 (the fortran compiler to use) is available -# on the System. -need_fortran() { - if [ -z "$*" ]; then - eerror "Call need_fortran with at least one argument !" - fi - local AVAILABLE - local PROFILE - for PROFILE in $@; do - case ${PROFILE} in - gfortran) - if [ -x "$(type -P gfortran 2> /dev/null)" ]; then - AVAILABLE="${AVAILABLE} gfortran" - fi - ;; - g77) - if [ -x "$(type -P g77 2> /dev/null)" ]; then - AVAILABLE="${AVAILABLE} g77" - fi - ;; - f2c) - if [ -x "$(type -P f2c 2> /dev/null)" ]; then - AVAILABLE="${AVAILABLE} f2c" - fi - ;; - ifc) - case ${ARCH} in - x86|ia64|amd64) - if [ -x "$(type -P ifort 2> /dev/null)" ]; then - AVAILABLE="${AVAILABLE} ifort" - elif [ -x "$(type -P ifc 2> /dev/null)" ]; then - AVAILABLE="${AVAILABLE} ifc" - fi - ;; - *) - ;; - esac - ;; - f95) - case ${ARCH} in - x86|amd64) - if [ -x "$(type -P f95 2> /dev/null)" ]; then - AVAILABLE="${AVAILABLE} f95" - fi - ;; - *) - ;; - esac - ;; - esac - done - AVAILABLE="${AVAILABLE/^[[:space:]]}" - use debug && echo ${AVAILABLE} - if [ -z "${AVAILABLE}" ]; then - eerror "None of the needed Fortran Compilers ($@) is installed." - eerror "To install one of these, choose one of the following steps:" - i=1 - for PROFILE in $@; do - case ${PROFILE} in - gfortran) - eerror "[${i}] USE=\"fortran\" emerge =sys-devel/gcc-4*" - ;; - g77) - eerror "[${i}] USE=\"fortran\" emerge =sys-devel/gcc-3*" - ;; - f2c) - eerror "[${i}] emerge dev-lang/f2c" - ;; - ifc) - case ${ARCH} in - x86|ia64) - eerror "[${i}] emerge dev-lang/ifc" - ;; - *) - ;; - esac - ;; - f95) - case ${ARCH} in - x86|amd64) - eerror "[${i}] emerge dev-lang/sunstudio" - ;; - *) - ;; - esac - ;; - esac - i=$((i + 1)) - done - die "Install a Fortran Compiler !" - else - einfo "You need one of these Fortran Compilers: $@" - einfo "Installed are: ${AVAILABLE}" - if [ -n "${F77}" -o -n "${FC}" -o -n "${F2C}" ]; then - if [ -n "${F77}" ]; then - FC="${F77}" # F77 overwrites FC - fi - if [ -n "${FC}" -a -n "${F2C}" ]; then - ewarn "Using ${FC} and f2c is impossible. Disabling F2C !" - F2C="" # Disabling f2c - MY_FORTRAN="$(basename ${FC})" # set MY_FORTRAN to filename of - # the Fortran Compiler - else - if [ -n "${F2C}" ]; then - MY_FORTRAN="$(basename ${F2C})" - elif [ -n "${FC}" ]; then - MY_FORTRAN="$(basename ${FC})" - else - MY_FORTRAN="$(basename ${F77})" - fi - fi - fi - - # default to gfortran if available, g77 if not - use debug && echo "MY_FORTRAN: \"${MY_FORTRAN}\"" - if hasq gfortran ${AVAILABLE}; then - MY_FORTRAN=${MY_FORTRAN:=gfortran} - elif hasq g77 ${AVAILABLE}; then - MY_FORTRAN=${MY_FORTRAN:=g77} - else - # Default to the first valid Fortran compiler - for i in ${AVAILABLE}; do - MY_FORTRAN=$i - break - done - fi - use debug && echo "MY_FORTRAN: \"${MY_FORTRAN}\"" - - if ! hasq ${MY_FORTRAN} ${AVAILABLE}; then - eerror "Current Fortran Compiler is set to ${MY_FORTRAN}, which is not usable with this package !" - die "Wrong Fortran Compiler !" - fi - - case ${MY_FORTRAN} in - gfortran|g77|ifc|ifort|f2c|f95) - FORTRANC="${MY_FORTRAN}" - esac - fi - use debug && echo "FORTRANC: \"${FORTRANC}\"" -} - -# patch_fortran(): -# Apply necessary patches for ${FORTRANC} -patch_fortran() { - if [[ -z "${FORTRANC}" || ! -d "${FILESDIR}" ]]; then - return - fi - local PATCHES=$(find ${FILESDIR} -name "${P}-${FORTRANC}-*") - einfo "Applying patches for selected FORTRAN compiler: ${FORTRANC}" - local PATCH - if [ -n "${PATCHES}" ]; then - for PATCH in ${PATCHES}; do - epatch ${PATCH} - done - eautoreconf - fi -} - -# fortran_pkg_setup(): -# Set FORTRAN to indicate the list of Fortran Compiler that -# can be used for the ebuild. -# If not set in ebuild, FORTRAN will default to f77 -fortran_pkg_setup() { - need_fortran ${FORTRAN:="gfortran g77"} -} - -# fortran_src_unpack(): -# Run patch_fortran if no new src_unpack() is defined. -fortran_src_unpack() { - unpack ${A} - cd "${S}" - patch_fortran -} - -EXPORT_FUNCTIONS pkg_setup src_unpack +# @DEAD +# To be removed on 2011/04/30. +ewarn "Please fix your package ( ${CATEGORY}/${PF} ) to not use ${ECLASS}.eclass"
\ No newline at end of file diff --git a/eclass/games-q3mod.eclass b/eclass/games-q3mod.eclass index 3440889a3f19..88e5be5af620 100644 --- a/eclass/games-q3mod.eclass +++ b/eclass/games-q3mod.eclass @@ -1,144 +1,7 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/games-q3mod.eclass,v 1.36 2007/03/07 15:23:39 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/games-q3mod.eclass,v 1.37 2011/03/19 14:31:43 scarabeus Exp $ -inherit games - -EXPORT_FUNCTIONS src_install pkg_postinst - -DESCRIPTION="Quake III - ${MOD_DESC}" - -SLOT="0" -KEYWORDS="-* amd64 ~ppc x86" -IUSE="dedicated" - -DEPEND="app-arch/unzip" -RDEPEND="|| ( games-fps/quake3 games-fps/quake3-bin ) - amd64? ( app-emulation/emul-linux-x86-baselibs ) - dedicated? ( app-misc/screen )" - -S=${WORKDIR} - -games-q3mod_src_install() { - [[ -z ${MOD_NAME} ]] && die "what is the name of this q3mod ?" - - local bdir=${GAMES_PREFIX_OPT}/quake3 - local mdir=${bdir}/${MOD_NAME} - MOD_BINS=${MOD_BINS:-${MOD_NAME}} - - if [[ -d ${MOD_NAME} ]] ; then - dodir "${bdir}" - mv ${MOD_NAME} "${D}/${bdir}/" - fi - if [[ -d baseq3 ]] ; then - dodir "${bdir}" - mv baseq3 "${D}/${bdir}/" - fi - if [[ ! -z $(ls "${S}"/* 2> /dev/null) ]] ; then - dodir "${mdir}" - mv "${S}"/* "${D}/${mdir}/" - fi - - if use dedicated; then - games-q3mod_make_q3ded_exec - newgamesbin "${T}"/q3${MOD_NAME}-ded.bin q3${MOD_BINS}-ded - fi - games-q3mod_make_quake3_exec - newgamesbin "${T}"/quake3-${MOD_NAME}.bin quake3-${MOD_BINS} - - if use dedicated; then - games-q3mod_make_init.d - newinitd "${T}"/q3${MOD_NAME}-ded.init.d q3${MOD_BINS}-ded - games-q3mod_make_conf.d - newconfd "${T}"/q3${MOD_NAME}-ded.conf.d q3${MOD_BINS}-ded - fi - - dodir "${GAMES_SYSCONFDIR}"/quake3 - - dodir "${bdir}"/q3a-homedir - dosym "${bdir}"/q3a-homedir "${GAMES_PREFIX}"/.q3a - keepdir "${bdir}"/q3a-homedir - prepgamesdirs - chmod g+rw "${D}/${mdir}" "${D}/${bdir}"/q3a-homedir - chmod -R g+rw "${D}/${GAMES_SYSCONFDIR}"/quake3 -} - -games-q3mod_pkg_postinst() { - local samplecfg=${FILESDIR}/server.cfg - local realcfg=${GAMES_PREFIX_OPT}/quake3/${MOD_NAME}/server.cfg - if [[ -e ${samplecfg} ]] && [[ ! -e ${realcfg} ]] ; then - cp "${samplecfg}" "${realcfg}" - fi - - einfo "To play this mod: quake3-${MOD_BINS}" - use dedicated && \ - einfo "To launch a dedicated server: q3${MOD_BINS}-ded" && \ - einfo "To launch server at startup: /etc/init.d/q3${MOD_NAME}-ded" - - games_pkg_postinst -} - -games-q3mod_make_q3ded_exec() { -cat << EOF > "${T}"/q3${MOD_NAME}-ded.bin -#!/bin/sh -exec "${GAMES_BINDIR}"/q3ded-bin +set fs_game ${MOD_NAME} +set dedicated 1 +exec server.cfg \${@} -EOF -} - -games-q3mod_make_quake3_exec() { -cat << EOF > "${T}"/quake3-${MOD_NAME}.bin -#!/bin/sh -exec "${GAMES_BINDIR}"/quake3-bin +set fs_game ${MOD_NAME} \${@} -EOF -} - -games-q3mod_make_init.d() { -cat << EOF > "${T}"/q3${MOD_NAME}-ded.init.d -#!/sbin/runscript -$(<"${PORTDIR}"/header.txt) - -depend() { - need net -} - -start() { - ebegin "Starting ${MOD_NAME} dedicated" - screen -A -m -d -S q3${MOD_BINS}-ded su - ${GAMES_USER_DED} -c "${GAMES_BINDIR}/q3${MOD_BINS}-ded \${${MOD_NAME}_OPTS}" - eend \$? -} - -stop() { - ebegin "Stopping ${MOD_NAME} dedicated" - local pid=\`screen -list | grep q3${MOD_BINS}-ded | awk -F . '{print \$1}' | sed -e s/.//\` - if [[ -z "\${pid}" ]] ; then - eend 1 "Lost screen session" - else - pid=\`pstree -p \${pid} | sed -e 's:^.*q3ded::'\` - pid=\${pid:1:\${#pid}-2} - if [[ -z "\${pid}" ]] ; then - eend 1 "Lost q3ded session" - else - kill \${pid} - eend \$? "Could not kill q3ded" - fi - fi -} - -status() { - screen -list | grep q3${MOD_BINS}-ded -} -EOF -} - -games-q3mod_make_conf.d() { - if [[ -e ${FILESDIR}/${MOD_NAME}.conf.d ]] ; then - cp "${FILESDIR}"/${MOD_NAME}.conf.d "${T}"/q3${MOD_NAME}-ded.conf.d - return 0 - fi -cat << EOF > "${T}"/q3${MOD_NAME}-ded.conf.d -$(<"${PORTDIR}"/header.txt) - -# Any extra options you want to pass to the dedicated server -${MOD_NAME}_OPTS="+set vm_game 0 +set sv_pure 1 +set bot_enable 0 +set com_hunkmegs 64 +set net_port 27960" -EOF -} +# @DEAD +# To be removed on 2011/04/30. +ewarn "Please fix your package ( ${CATEGORY}/${PF} ) to not use ${ECLASS}.eclass"
\ No newline at end of file diff --git a/eclass/mozconfig-2.eclass b/eclass/mozconfig-2.eclass index fd37727de396..8a24fa2a90fb 100644 --- a/eclass/mozconfig-2.eclass +++ b/eclass/mozconfig-2.eclass @@ -1,67 +1,7 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/mozconfig-2.eclass,v 1.22 2010/07/23 19:53:30 ssuominen Exp $ -# -# mozconfig.eclass: the new mozilla.eclass +# $Header: /var/cvsroot/gentoo-x86/eclass/mozconfig-2.eclass,v 1.23 2011/03/19 14:31:43 scarabeus Exp $ -inherit multilib flag-o-matic mozcoreconf - -IUSE="debug gnome ipv6 xinerama" - -RDEPEND="x11-libs/libXrender - x11-libs/libXt - x11-libs/libXmu - virtual/jpeg - >=media-libs/libpng-1.2.1 - dev-libs/expat - app-arch/zip - app-arch/unzip - >=x11-libs/gtk+-2.8.6 - >=dev-libs/glib-2.8.2 - >=x11-libs/pango-1.10.1 - >=dev-libs/libIDL-0.8.0 - gnome? ( >=gnome-base/gnome-vfs-2.3.5 - >=gnome-base/libgnomeui-2.2.0 ) - !<x11-base/xorg-x11-6.7.0-r2 - >=x11-libs/cairo-1.0.0" - #According to bugs #18573, #204520, and couple of others in Mozilla's - #bugzilla. libmng and mng support has been removed in 2003. - - -DEPEND="${RDEPEND} - xinerama? ( x11-proto/xineramaproto )" - -mozconfig_config() { - mozconfig_use_enable ipv6 - mozconfig_use_enable xinerama - - # We use --enable-pango to do truetype fonts, and currently pango - # is required for it to build - mozconfig_annotate gentoo --disable-freetype2 - - if use debug; then - mozconfig_annotate +debug \ - --enable-debug \ - --enable-tests \ - --disable-reorder \ - --enable-debugger-info-modules=ALL_MODULES - else - mozconfig_annotate -debug \ - --disable-debug \ - --disable-tests \ - --enable-reorder \ - - # Currently --enable-elf-dynstr-gc only works for x86 and ppc, - # thanks to Jason Wever <weeve@gentoo.org> for the fix. - # -- This breaks now on ppc, no idea why -# if use x86 || use ppc && [[ ${enable_optimize} != -O0 ]]; then - if use x86 && [[ ${enable_optimize} != -O0 ]]; then - mozconfig_annotate "${ARCH} optimized build" --enable-elf-dynstr-gc - fi - fi - - if ! use gnome; then - mozconfig_annotate -gnome --disable-gnomevfs - mozconfig_annotate -gnome --disable-gnomeui - fi -} +# @DEAD +# To be removed on 2011/04/30. +ewarn "Please fix your package ( ${CATEGORY}/${PF} ) to not use ${ECLASS}.eclass"
\ No newline at end of file diff --git a/eclass/mozcoreconf.eclass b/eclass/mozcoreconf.eclass index b74539cc0f8b..0c3c1b477330 100644 --- a/eclass/mozcoreconf.eclass +++ b/eclass/mozcoreconf.eclass @@ -1,272 +1,7 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/mozcoreconf.eclass,v 1.14 2008/01/05 16:15:09 armin76 Exp $ -# -# mozcoreconf.eclass : core options for mozilla -# inherit mozconfig-2 if you need USE flags +# $Header: /var/cvsroot/gentoo-x86/eclass/mozcoreconf.eclass,v 1.15 2011/03/19 14:31:43 scarabeus Exp $ -inherit multilib flag-o-matic - -RDEPEND="x11-libs/libXrender - x11-libs/libXt - x11-libs/libXmu - >=sys-libs/zlib-1.1.4" - -DEPEND="${RDEPEND} - dev-util/pkgconfig" - -# Set by configure (plus USE_AUTOCONF=1), but useful for NSPR -export MOZILLA_CLIENT=1 -export BUILD_OPT=1 -export NO_STATIC_LIB=1 -export USE_PTHREADS=1 - -mozconfig_init() { - declare enable_optimize pango_version myext x - declare MOZ=$([[ ${PN} == mozilla || ${PN} == gecko-sdk ]] && echo true || echo false) - declare FF=$([[ ${PN} == *firefox ]] && echo true || echo false) - declare TB=$([[ ${PN} == *thunderbird ]] && echo true || echo false) - declare SB=$([[ ${PN} == *sunbird ]] && echo true || echo false) - declare EM=$([[ ${PN} == enigmail ]] && echo true || echo false) - declare XUL=$([[ ${PN} == *xulrunner ]] && echo true || echo false) - declare SM=$([[ ${PN} == seamonkey ]] && echo true || echo false) - - #################################### - # - # Setup the initial .mozconfig - # See http://www.mozilla.org/build/configure-build.html - # - #################################### - - case ${PN} in - mozilla|gecko-sdk) - # The other builds have an initial --enable-extensions in their - # .mozconfig. The "default" set in configure applies to mozilla - # specifically. - : >.mozconfig || die "initial mozconfig creation failed" - mozconfig_annotate "" --enable-extensions=default ;; - *firefox) - cp browser/config/mozconfig .mozconfig \ - || die "cp browser/config/mozconfig failed" ;; - enigmail) - cp mail/config/mozconfig .mozconfig \ - || die "cp mail/config/mozconfig failed" ;; - *xulrunner) - cp xulrunner/config/mozconfig .mozconfig \ - || die "cp xulrunner/config/mozconfig failed" ;; - *sunbird) - cp calendar/sunbird/config/mozconfig .mozconfig \ - || die "cp calendar/sunbird/config/mozconfig failed" ;; - *thunderbird) - cp mail/config/mozconfig .mozconfig \ - || die "cp mail/config/mozconfig failed" ;; - seamonkey) - # The other builds have an initial --enable-extensions in their - # .mozconfig. The "default" set in configure applies to mozilla - # specifically. - : >.mozconfig || die "initial mozconfig creation failed" - mozconfig_annotate "" --enable-application=suite - mozconfig_annotate "" --enable-extensions=default ;; - esac - - #################################### - # - # CFLAGS setup and ARCH support - # - #################################### - - # Set optimization level based on CFLAGS - if is-flag -O0; then - mozconfig_annotate "from CFLAGS" --enable-optimize=-O0 - elif [[ ${ARCH} == hppa ]]; then - mozconfig_annotate "more than -O0 causes segfaults on hppa" --enable-optimize=-O0 - elif is-flag -O1; then - mozconfig_annotate "from CFLAGS" --enable-optimize=-O1 - elif is-flag -Os; then - mozconfig_annotate "from CFLAGS" --enable-optimize=-Os - else - mozconfig_annotate "mozilla fallback" --enable-optimize=-O2 - fi - - # Now strip optimization from CFLAGS so it doesn't end up in the - # compile string - filter-flags '-O*' - - # Strip over-aggressive CFLAGS - Mozilla supplies its own - # fine-tuned CFLAGS and shouldn't be interfered with.. Do this - # AFTER setting optimization above since strip-flags only allows - # -O -O1 and -O2 - strip-flags - - # Additional ARCH support - case "${ARCH}" in - alpha) - # Historically we have needed to add -fPIC manually for 64-bit. - # Additionally, alpha should *always* build with -mieee for correct math - # operation - append-flags -fPIC -mieee - ;; - - amd64|ia64) - # Historically we have needed to add this manually for 64-bit - append-flags -fPIC - ;; - - ppc64) - append-flags -fPIC -mminimal-toc - ;; - - ppc) - # Fix to avoid gcc-3.3.x micompilation issues. - if [[ $(gcc-major-version).$(gcc-minor-version) == 3.3 ]]; then - append-flags -fno-strict-aliasing - fi - ;; - - sparc) - # Sparc support ... - replace-sparc64-flags - ;; - - x86) - if [[ $(gcc-major-version) -eq 3 ]]; then - # gcc-3 prior to 3.2.3 doesn't work well for pentium4 - # see bug 25332 - if [[ $(gcc-minor-version) -lt 2 || - ( $(gcc-minor-version) -eq 2 && $(gcc-micro-version) -lt 3 ) ]] - then - replace-flags -march=pentium4 -march=pentium3 - filter-flags -msse2 - fi - fi - ;; - esac - - if [[ $(gcc-major-version) -eq 3 ]]; then - # Enable us to use flash, etc plugins compiled with gcc-2.95.3 - mozconfig_annotate "building with >=gcc-3" --enable-old-abi-compat-wrappers - - # Needed to build without warnings on gcc-3 - CXXFLAGS="${CXXFLAGS} -Wno-deprecated" - fi - - # Go a little faster; use less RAM - append-flags "$MAKEEDIT_FLAGS" - - #################################### - # - # mozconfig setup - # - #################################### - - mozconfig_annotate gentoo \ - --disable-installer \ - --disable-pedantic \ - --enable-crypto \ - --with-system-jpeg \ - --with-system-png \ - --with-system-zlib \ - --disable-updater \ - --enable-default-toolkit=gtk2 \ - --enable-pango \ - --enable-svg \ - --enable-svg-renderer=cairo \ - --enable-system-cairo \ - --disable-strip \ - --disable-strip-libs - - if [[ ${PN} != seamonkey ]]; then - mozconfig_annotate gentoo \ - --enable-single-profile \ - --disable-profilesharing \ - --disable-profilelocking - fi - - # Here is a strange one... - if is-flag '-mcpu=ultrasparc*' || is-flag '-mtune=ultrasparc*'; then - mozconfig_annotate "building on ultrasparc" --enable-js-ultrasparc - fi -} - -# Simulate the silly csh makemake script -makemake() { - typeset m topdir - for m in $(find . -name Makefile.in); do - topdir=$(echo "$m" | sed -r 's:[^/]+:..:g') - sed -e "s:@srcdir@:.:g" -e "s:@top_srcdir@:${topdir}:g" \ - < ${m} > ${m%.in} || die "sed ${m} failed" - done -} - -makemake2() { - for m in $(find ../ -name Makefile.in); do - topdir=$(echo "$m" | sed -r 's:[^/]+:..:g') - sed -e "s:@srcdir@:.:g" -e "s:@top_srcdir@:${topdir}:g" \ - < ${m} > ${m%.in} || die "sed ${m} failed" - done -} - -# mozconfig_annotate: add an annotated line to .mozconfig -# -# Example: -# mozconfig_annotate "building on ultrasparc" --enable-js-ultrasparc -# => ac_add_options --enable-js-ultrasparc # building on ultrasparc -mozconfig_annotate() { - declare reason=$1 x ; shift - [[ $# -gt 0 ]] || die "mozconfig_annotate missing flags for ${reason}\!" - for x in ${*}; do - echo "ac_add_options ${x} # ${reason}" >>.mozconfig - done -} - -# mozconfig_use_enable: add a line to .mozconfig based on a USE-flag -# -# Example: -# mozconfig_use_enable truetype freetype2 -# => ac_add_options --enable-freetype2 # +truetype -mozconfig_use_enable() { - declare flag=$(use_enable "$@") - mozconfig_annotate "$(useq $1 && echo +$1 || echo -$1)" "${flag}" -} - -# mozconfig_use_with: add a line to .mozconfig based on a USE-flag -# -# Example: -# mozconfig_use_with kerberos gss-api /usr/$(get_libdir) -# => ac_add_options --with-gss-api=/usr/lib # +kerberos -mozconfig_use_with() { - declare flag=$(use_with "$@") - mozconfig_annotate "$(useq $1 && echo +$1 || echo -$1)" "${flag}" -} - -# mozconfig_use_extension: enable or disable an extension based on a USE-flag -# -# Example: -# mozconfig_use_extension gnome gnomevfs -# => ac_add_options --enable-extensions=gnomevfs -mozconfig_use_extension() { - declare minus=$(useq $1 || echo -) - mozconfig_annotate "${minus:-+}$1" --enable-extensions=${minus}${2} -} - -# mozconfig_final: display a table describing all configuration options paired -# with reasons, then clean up extensions list -mozconfig_final() { - declare ac opt hash reason - echo - echo "==========================================================" - echo "Building ${PF} with the following configuration" - grep ^ac_add_options .mozconfig | while read ac opt hash reason; do - [[ -z ${hash} || ${hash} == \# ]] \ - || die "error reading mozconfig: ${ac} ${opt} ${hash} ${reason}" - printf " %-30s %s\n" "${opt}" "${reason:-mozilla.org default}" - done - echo "==========================================================" - echo - - # Resolve multiple --enable-extensions down to one - declare exts=$(sed -n 's/^ac_add_options --enable-extensions=\([^ ]*\).*/\1/p' \ - .mozconfig | xargs) - sed -i '/^ac_add_options --enable-extensions/d' .mozconfig - echo "ac_add_options --enable-extensions=${exts// /,}" >> .mozconfig -} +# @DEAD +# To be removed on 2011/04/30. +ewarn "Please fix your package ( ${CATEGORY}/${PF} ) to not use ${ECLASS}.eclass"
\ No newline at end of file diff --git a/eclass/php-pear.eclass b/eclass/php-pear.eclass index 2f719e888fc5..f7f4b8e1fe0c 100644 --- a/eclass/php-pear.eclass +++ b/eclass/php-pear.eclass @@ -1,25 +1,7 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/php-pear.eclass,v 1.15 2008/01/06 19:30:24 swegener Exp $ -# -# Author: Tal Peer <coredumb@gentoo.org> -# -# The php-pear eclass provides means for easy installation of PEAR -# packages, see http://pear.php.net +# $Header: /var/cvsroot/gentoo-x86/eclass/php-pear.eclass,v 1.16 2011/03/19 14:31:43 scarabeus Exp $ -# Note that this eclass doesn't handle PEAR packages' dependencies on -# purpose, please use (R)DEPEND to define them. - -# DEPRECATED!!! -# STOP USING THIS ECLASS, use php-pear-r1.eclass instead! - -inherit php-pear-r1 - -deprecation_warning() { - eerror "Please upgrade ${PF} to use php-pear-r1.eclass!" -} - -php-pear_src_install () { - deprecation_warning - php-pear-r1_src_install -} +# @DEAD +# To be removed on 2011/04/30. +ewarn "Please fix your package ( ${CATEGORY}/${PF} ) to not use ${ECLASS}.eclass"
\ No newline at end of file diff --git a/eclass/php5_2-sapi.eclass b/eclass/php5_2-sapi.eclass index 688225c52bf3..e0f21c1b1fce 100644 --- a/eclass/php5_2-sapi.eclass +++ b/eclass/php5_2-sapi.eclass @@ -1,734 +1,7 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/php5_2-sapi.eclass,v 1.34 2010/07/23 19:53:30 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/php5_2-sapi.eclass,v 1.35 2011/03/19 14:31:43 scarabeus Exp $ -# ======================================================================== -# Based on robbat2's work on the php4 sapi eclass -# -# Author: Stuart Herbert <stuart@gentoo.org> -# Author: Luca Longinotti <chtekk@gentoo.org> -# -# ======================================================================== - -# @ECLASS: php5_2-sapi.eclass -# @MAINTAINER: -# Gentoo PHP team <php-bugs@gentoo.org> -# @BLURB: Eclass for building different php-5.2 SAPI instances. -# @DESCRIPTION: -# Eclass for building different php-5.2 SAPI instances. Use it for the -# new-style =dev-lang/php-5.2* ebuilds. - - -PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob frontbase interbase msql oci8 sapdb solid sybase sybase-ct" - -WANT_AUTOCONF="latest" -WANT_AUTOMAKE="latest" - -inherit db-use flag-o-matic autotools toolchain-funcs libtool eutils phpconfutils php-common-r1 - -# @ECLASS-VARIABLE: MY_PHP_P -# @DESCRIPTION: -# Set MY_PHP_P in the ebuild as needed to match tarball version. - -# @ECLASS-VARIABLE: PHP_PACKAGE -# @DESCRIPTION: -# We only set this variable if we are building a copy of php which can be -# installed as a package in its own. -# Copies of php which are compiled into other packages (e.g. php support -# for the thttpd web server) don't need this variable. -if [[ "${PHP_PACKAGE}" == 1 ]] ; then - HOMEPAGE="http://www.php.net/" - LICENSE="PHP-3" - SRC_URI="http://www.php.net/distributions/${MY_PHP_P}.tar.bz2" - S="${WORKDIR}/${MY_PHP_P}" -fi - -IUSE="adabas bcmath berkdb birdstep bzip2 calendar cdb cjk crypt ctype curl curlwrappers db2 dbase dbmaker debug doc empress empress-bcs esoob exif frontbase fdftk filter firebird flatfile ftp gd gd-external gdbm gmp hash iconv imap inifile interbase iodbc ipv6 java-external json kerberos ldap ldap-sasl libedit mcve mhash msql mssql mysql mysqli ncurses nls oci8 oci8-instant-client odbc pcntl pcre pdo pic posix postgres qdbm readline reflection recode sapdb session sharedext sharedmem simplexml snmp soap sockets solid spell spl sqlite ssl suhosin sybase sybase-ct sysvipc tidy tokenizer truetype unicode wddx xml xmlreader xmlwriter xmlrpc xpm xsl yaz zip zlib" - -# these USE flags should have the correct dependencies -DEPEND="adabas? ( >=dev-db/unixODBC-1.8.13 ) - berkdb? ( =sys-libs/db-4* ) - birdstep? ( >=dev-db/unixODBC-1.8.13 ) - bzip2? ( app-arch/bzip2 ) - cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) - cjk? ( !gd? ( !gd-external? ( virtual/jpeg media-libs/libpng sys-libs/zlib ) ) ) - crypt? ( >=dev-libs/libmcrypt-2.4 ) - curl? ( >=net-misc/curl-7.10.5 ) - db2? ( >=dev-db/unixODBC-1.8.13 ) - dbmaker? ( >=dev-db/unixODBC-1.8.13 ) - empress? ( >=dev-db/unixODBC-1.8.13 ) - empress-bcs? ( >=dev-db/unixODBC-1.8.13 ) - esoob? ( >=dev-db/unixODBC-1.8.13 ) - exif? ( !gd? ( !gd-external? ( virtual/jpeg media-libs/libpng sys-libs/zlib ) ) ) - fdftk? ( app-text/fdftk ) - firebird? ( dev-db/firebird ) - gd? ( virtual/jpeg media-libs/libpng sys-libs/zlib ) - gd-external? ( media-libs/gd ) - gdbm? ( >=sys-libs/gdbm-1.8.0 ) - gmp? ( >=dev-libs/gmp-4.1.2 ) - iconv? ( virtual/libiconv ) - imap? ( virtual/imap-c-client ) - iodbc? ( dev-db/libiodbc >=dev-db/unixODBC-1.8.13 ) - kerberos? ( virtual/krb5 ) - ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) ) - ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) ) - libedit? ( dev-libs/libedit ) - mcve? ( >=dev-libs/openssl-0.9.7 ) - mhash? ( app-crypt/mhash ) - mssql? ( dev-db/freetds ) - mysql? ( virtual/mysql ) - mysqli? ( >=virtual/mysql-4.1 ) - ncurses? ( sys-libs/ncurses ) - nls? ( sys-devel/gettext ) - oci8-instant-client? ( dev-db/oracle-instantclient-basic ) - odbc? ( >=dev-db/unixODBC-1.8.13 ) - postgres? ( || ( >=dev-db/libpq-7.1 ( app-admin/eselect-postgresql - >=dev-db/postgresql-base-7.1 ) ) ) - qdbm? ( dev-db/qdbm ) - readline? ( sys-libs/readline ) - recode? ( app-text/recode ) - sapdb? ( >=dev-db/unixODBC-1.8.13 ) - 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 ) - solid? ( >=dev-db/unixODBC-1.8.13 ) - spell? ( >=app-text/aspell-0.50 ) - sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) ) - ssl? ( >=dev-libs/openssl-0.9.7 ) - sybase? ( dev-db/freetds ) - tidy? ( app-text/htmltidy ) - truetype? ( =media-libs/freetype-2* >=media-libs/t1lib-5.0.0 !gd? ( !gd-external? ( virtual/jpeg media-libs/libpng sys-libs/zlib ) ) ) - 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 media-libs/libpng sys-libs/zlib ) - xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) - zip? ( sys-libs/zlib ) - zlib? ( sys-libs/zlib ) - virtual/mta" - -# libswf conflicts with ming and should not -# be installed with the new PHP ebuilds -DEPEND="${DEPEND} - !media-libs/libswf" - -# simplistic for now -RDEPEND="${DEPEND}" - -# those are only needed at compile-time -DEPEND="${DEPEND} - >=sys-devel/m4-1.4.3 - >=sys-devel/libtool-1.5.18" - -# Additional features -# -# They are in PDEPEND because we need PHP installed first! -PDEPEND="doc? ( app-doc/php-docs ) - filter? ( !dev-php5/pecl-filter ) - java-external? ( dev-php5/php-java-bridge ) - json? ( !dev-php5/pecl-json ) - mcve? ( dev-php5/pecl-mcve ) - pdo? ( !dev-php5/pecl-pdo ) - suhosin? ( dev-php5/suhosin ) - yaz? ( dev-php5/pecl-yaz )" - -# ======================================================================== -# php.ini Support -# ======================================================================== - -PHP_INI_FILE="php.ini" -PHP_INI_UPSTREAM="php.ini-dist" - -# ======================================================================== - -# @ECLASS-VARIABLE: PHP_PATCHSET_REV -# @DESCRIPTION: -# Provides PHP patchsets support. -# This condition will help non php maintainers in fixing bugs and let them to -# upload patchset tarballs somewhere else. -if [[ ! -n ${PHP_PATCHSET_URI} ]]; then - SRC_URI="${SRC_URI} http://gentoo.longitekk.com/php-patchset-${MY_PHP_PV}-r${PHP_PATCHSET_REV}.tar.bz2" -else - SRC_URI="${SRC_URI} ${PHP_PATCHSET_URI}" -fi - -# @ECLASS-VARIABLE: SUHOSIN_PATCH -# @DESCRIPTION: -# Tarball name for Suhosin patch (see http://www.suhosin.org/). -# This feature will not be available in php if unset. -[[ -n "${SUHOSIN_PATCH}" ]] && SRC_URI="${SRC_URI} suhosin? ( http://gentoo.longitekk.com/${SUHOSIN_PATCH} )" - - -# ======================================================================== - -EXPORT_FUNCTIONS pkg_setup src_compile src_install src_unpack pkg_postinst - -# ======================================================================== -# INTERNAL FUNCTIONS -# ======================================================================== - -php5_2-sapi_check_use_flags() { - # Multiple USE dependencies - phpconfutils_use_depend_any "truetype" "gd" "gd" "gd-external" - phpconfutils_use_depend_any "cjk" "gd" "gd" "gd-external" - phpconfutils_use_depend_any "exif" "gd" "gd" "gd-external" - - # Simple USE dependencies - phpconfutils_use_depend_all "xpm" "gd" - phpconfutils_use_depend_all "gd" "zlib" - phpconfutils_use_depend_all "simplexml" "xml" - phpconfutils_use_depend_all "soap" "xml" - phpconfutils_use_depend_all "wddx" "xml" - phpconfutils_use_depend_all "xmlrpc" "xml" - phpconfutils_use_depend_all "xmlreader" "xml" - phpconfutils_use_depend_all "xmlwriter" "xml" - phpconfutils_use_depend_all "xsl" "xml" - phpconfutils_use_depend_all "filter" "pcre" - phpconfutils_use_depend_all "xmlrpc" "iconv" - phpconfutils_use_depend_all "java-external" "session" - phpconfutils_use_depend_all "ldap-sasl" "ldap" - phpconfutils_use_depend_all "mcve" "ssl" - phpconfutils_use_depend_all "suhosin" "unicode" - phpconfutils_use_depend_all "adabas" "odbc" - phpconfutils_use_depend_all "birdstep" "odbc" - phpconfutils_use_depend_all "dbmaker" "odbc" - phpconfutils_use_depend_all "empress-bcs" "odbc" "empress" - phpconfutils_use_depend_all "empress" "odbc" - phpconfutils_use_depend_all "esoob" "odbc" - phpconfutils_use_depend_all "db2" "odbc" - phpconfutils_use_depend_all "iodbc" "odbc" - phpconfutils_use_depend_all "sapdb" "odbc" - phpconfutils_use_depend_all "solid" "odbc" - phpconfutils_use_depend_all "kolab" "imap" - - # Direct USE conflicts - phpconfutils_use_conflict "gd" "gd-external" - phpconfutils_use_conflict "oci8" "oci8-instant-client" - phpconfutils_use_conflict "oci8" "ldap-sasl" - phpconfutils_use_conflict "qdbm" "gdbm" - phpconfutils_use_conflict "readline" "libedit" - phpconfutils_use_conflict "recode" "mysql" "imap" "yaz" "kolab" - phpconfutils_use_conflict "sharedmem" "threads" - phpconfutils_use_conflict "firebird" "interbase" - - # IMAP support - php_check_imap - - # Mail support - php_check_mta - - # PostgreSQL support - php_check_pgsql - - # Oracle support - php_check_oracle_8 - - phpconfutils_warn_about_external_deps - - export PHPCONFUTILS_AUTO_USE="${PHPCONFUTILS_AUTO_USE}" -} - -php5_2-sapi_set_php_ini_dir() { - PHP_INI_DIR="/etc/php/${PHPSAPI}-php5" - PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext" - PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active" -} - -php5_2-sapi_install_ini() { - destdir=/usr/$(get_libdir)/php5 - - # get the extension dir, if not already defined - [[ -z "${PHPEXTDIR}" ]] && PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`" - - # work out where we are installing the ini file - php5_2-sapi_set_php_ini_dir - - cp "${PHP_INI_UPSTREAM}" "${PHP_INI_UPSTREAM}-${PHPSAPI}" - local phpinisrc="${PHP_INI_UPSTREAM}-${PHPSAPI}" - - # Set the extension dir - einfo "Setting extension_dir in php.ini" - sed -e "s|^extension_dir .*$|extension_dir = ${PHPEXTDIR}|g" -i ${phpinisrc} - - # A patch for PHP for security - einfo "Securing fopen wrappers" - sed -e 's|^allow_url_fopen .*|allow_url_fopen = Off|g' -i ${phpinisrc} - - # Set the include path to point to where we want to find PEAR packages - einfo "Setting correct include_path" - sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:/usr/share/php5:/usr/share/php"|' -i ${phpinisrc} - - # Add needed MySQL extensions charset configuration - local phpmycnfcharset="" - - if [[ "${PHPSAPI}" == "cli" ]] ; then - phpmycnfcharset="`php_get_mycnf_charset cli`" - einfo "MySQL extensions charset for 'cli' SAPI is: ${phpmycnfcharset}" - elif [[ "${PHPSAPI}" == "cgi" ]] ; then - phpmycnfcharset="`php_get_mycnf_charset cgi-fcgi`" - einfo "MySQL extensions charset for 'cgi' SAPI is: ${phpmycnfcharset}" - elif [[ "${PHPSAPI}" == "apache2" ]] ; then - phpmycnfcharset="`php_get_mycnf_charset apache2handler`" - einfo "MySQL extensions charset for 'apache2' SAPI is: ${phpmycnfcharset}" - else - einfo "No supported SAPI found for which to get the MySQL charset." - fi - - if [[ -n "${phpmycnfcharset}" ]] && [[ "${phpmycnfcharset}" != "empty" ]] ; then - einfo "Setting MySQL extensions charset to ${phpmycnfcharset}" - echo "" >> ${phpinisrc} - echo "; MySQL extensions default connection charset settings" >> ${phpinisrc} - echo "mysql.connect_charset = ${phpmycnfcharset}" >> ${phpinisrc} - echo "mysqli.connect_charset = ${phpmycnfcharset}" >> ${phpinisrc} - echo "pdo_mysql.connect_charset = ${phpmycnfcharset}" >> ${phpinisrc} - else - echo "" >> ${phpinisrc} - echo "; MySQL extensions default connection charset settings" >> ${phpinisrc} - echo ";mysql.connect_charset = utf8" >> ${phpinisrc} - echo ";mysqli.connect_charset = utf8" >> ${phpinisrc} - echo ";pdo_mysql.connect_charset = utf8" >> ${phpinisrc} - fi - - dodir ${PHP_INI_DIR} - insinto ${PHP_INI_DIR} - newins ${phpinisrc} ${PHP_INI_FILE} - - dodir ${PHP_EXT_INI_DIR} - dodir ${PHP_EXT_INI_DIR_ACTIVE} - - # Install any extensions built as shared objects - if use sharedext ; then - for x in `ls "${D}/${PHPEXTDIR}/"*.so | sort` ; do - inifilename=${x/.so/.ini} - inifilename=`basename ${inifilename}` - echo "extension=`basename ${x}`" >> "${D}/${PHP_EXT_INI_DIR}/${inifilename}" - dosym "${PHP_EXT_INI_DIR}/${inifilename}" "${PHP_EXT_INI_DIR_ACTIVE}/${inifilename}" - done - fi -} - -# ======================================================================== -# EXPORTED FUNCTIONS -# ======================================================================== - -# @FUNCTION: php5_2-sapi_pkg_setup -# @DESCRIPTION: -# Performs all the USE flag testing and magic before we do anything else. -# This way saves a lot of time. -php5_2-sapi_pkg_setup() { - php5_2-sapi_check_use_flags -} - -# @FUNCTION: php5_2-sapi_src_unpack -# @DESCRIPTION: -# Takes care of unpacking, patching and autotools magic and disables -# interactive tests. - -# @VARIABLE: PHP_EXTRA_BRANDING -# @DESCRIPTION: -# This variable allows an ebuild to add additional information like -# snapshot dates to the version line. -php5_2-sapi_src_unpack() { - cd "${S}" - - [[ -z "${PHP_EXTRA_BRANDING}" ]] && PHP_EXTRA_BRANDING="" - - # Change PHP branding - PHPPR=${PR/r/} - # >=php-5.2.4 has PHP_EXTRA_VERSION, previous had EXTRA_VERSION - sed -re "s|^(PHP_)?EXTRA_VERSION=\".*\"|\1EXTRA_VERSION=\"${PHP_EXTRA_BRANDING}-pl${PHPPR}-gentoo\"|g" -i configure.in \ - || die "Unable to change PHP branding to ${PHP_EXTRA_BRANDING}-pl${PHPPR}-gentoo" - - # multilib-strict support - if [[ -n "${MULTILIB_PATCH}" ]] && [[ -f "${WORKDIR}/${MULTILIB_PATCH}" ]] ; then - epatch "${WORKDIR}/${MULTILIB_PATCH}" - else - ewarn "There is no multilib-strict patch available for this PHP release yet!" - fi - - # Apply general PHP5 patches - if [[ -d "${WORKDIR}/${MY_PHP_PV}/php5" ]] ; then - EPATCH_SOURCE="${WORKDIR}/${MY_PHP_PV}/php5" EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch - fi - - # Apply version-specific PHP patches - if [[ -d "${WORKDIR}/${MY_PHP_PV}/${MY_PHP_PV}" ]] ; then - EPATCH_SOURCE="${WORKDIR}/${MY_PHP_PV}/${MY_PHP_PV}" EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch - fi - - # 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" - - # Disable interactive make test - sed -e 's/'`echo "\!getenv('NO_INTERACTION')"`'/false/g' -i run-tests.php - - # Stop PHP from activating the Apache config, as we will do that ourselves - for i in configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 ; do - sed -i.orig -e 's,-i -a -n php5,-i -n php5,g' ${i} - sed -i.orig -e 's,-i -A -n php5,-i -n php5,g' ${i} - done - - # 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 - - # Patch for PostgreSQL support - if use postgres ; then - sed -e 's|include/postgresql|include/postgresql include/postgresql/pgsql|g' -i ext/pgsql/config.m4 || die "Failed to fix PostgreSQL include paths" - fi - - # Suhosin support - if use suhosin ; then - if [[ -n "${SUHOSIN_PATCH}" ]] && [[ -f "${DISTDIR}/${SUHOSIN_PATCH}" ]] ; then - epatch "${DISTDIR}/${SUHOSIN_PATCH}" - else - ewarn "There is no Suhosin patch available for this PHP release yet!" - fi - fi - - # We are heavily patching autotools base files (configure.in) because - # of suhosin etc., so let's regenerate the whole stuff now - - # work around divert() issues with newer autoconf #281697 - if has_version '>=sys-devel/autoconf-2.64' ; then - sed -i -r \ - -e 's:^((m4_)?divert)[(]([0-9]*)[)]:\1(600\3):' \ - $(grep -l divert $(find . -name '*.m4') configure.in) || die - fi - - # eaclocal doesn't accept --force, so we try to force re-generation - # this way - rm aclocal.m4 - eautoreconf --force -W no-cross - -} - -# @FUNCTION: php5_2-sapi_src_compile -# @DESCRIPTION: -# Takes care of compiling php according to USE flags set by user (and those automagically -# enabled via phpconfutils eclass if unavoidable). -php5_2-sapi_src_compile() { - destdir=/usr/$(get_libdir)/php5 - - php5_2-sapi_set_php_ini_dir - - cd "${S}" - - phpconfutils_init - - my_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR} --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE} --without-pear" - - # extension USE flag shared support? - phpconfutils_extension_enable "bcmath" "bcmath" 1 - phpconfutils_extension_with "bz2" "bzip2" 1 - phpconfutils_extension_enable "calendar" "calendar" 1 - phpconfutils_extension_disable "ctype" "ctype" 0 - phpconfutils_extension_with "curl" "curl" 1 - phpconfutils_extension_with "curlwrappers" "curlwrappers" 0 - phpconfutils_extension_enable "dbase" "dbase" 1 - phpconfutils_extension_disable "dom" "xml" 0 - phpconfutils_extension_enable "exif" "exif" 1 - phpconfutils_extension_with "fbsql" "frontbase" 1 - phpconfutils_extension_with "fdftk" "fdftk" 1 "/opt/fdftk-6.0" - phpconfutils_extension_disable "filter" "filter" 0 - phpconfutils_extension_enable "ftp" "ftp" 1 - phpconfutils_extension_with "gettext" "nls" 1 - phpconfutils_extension_with "gmp" "gmp" 1 - phpconfutils_extension_disable "hash" "hash" 0 - phpconfutils_extension_without "iconv" "iconv" 0 - phpconfutils_extension_disable "ipv6" "ipv6" 0 - phpconfutils_extension_disable "json" "json" 0 - phpconfutils_extension_with "kerberos" "kerberos" 0 "/usr" - phpconfutils_extension_disable "libxml" "xml" 0 - phpconfutils_extension_enable "mbstring" "unicode" 1 - phpconfutils_extension_with "mcrypt" "crypt" 1 - phpconfutils_extension_with "mhash" "mhash" 1 - phpconfutils_extension_with "msql" "msql" 1 - phpconfutils_extension_with "mssql" "mssql" 1 - phpconfutils_extension_with "ncurses" "ncurses" 1 - phpconfutils_extension_with "openssl" "ssl" 0 - phpconfutils_extension_with "openssl-dir" "ssl" 0 "/usr" - phpconfutils_extension_enable "pcntl" "pcntl" 1 - phpconfutils_extension_without "pcre-regex" "pcre" 0 - phpconfutils_extension_disable "pdo" "pdo" 0 - phpconfutils_extension_with "pgsql" "postgres" 1 - phpconfutils_extension_disable "posix" "posix" 0 - phpconfutils_extension_with "pspell" "spell" 1 - phpconfutils_extension_with "recode" "recode" 1 - phpconfutils_extension_disable "reflection" "reflection" 0 - phpconfutils_extension_disable "simplexml" "simplexml" 0 - phpconfutils_extension_enable "shmop" "sharedmem" 0 - phpconfutils_extension_with "snmp" "snmp" 1 - phpconfutils_extension_enable "soap" "soap" 1 - phpconfutils_extension_enable "sockets" "sockets" 1 - phpconfutils_extension_disable "spl" "spl" 0 - phpconfutils_extension_with "sybase" "sybase" 1 - phpconfutils_extension_with "sybase-ct" "sybase-ct" 1 - phpconfutils_extension_enable "sysvmsg" "sysvipc" 1 - phpconfutils_extension_enable "sysvsem" "sysvipc" 1 - phpconfutils_extension_enable "sysvshm" "sysvipc" 1 - phpconfutils_extension_with "tidy" "tidy" 1 - phpconfutils_extension_disable "tokenizer" "tokenizer" 0 - phpconfutils_extension_enable "wddx" "wddx" 1 - phpconfutils_extension_disable "xml" "xml" 0 - phpconfutils_extension_disable "xmlreader" "xmlreader" 0 - phpconfutils_extension_disable "xmlwriter" "xmlwriter" 0 - phpconfutils_extension_with "xmlrpc" "xmlrpc" 1 - phpconfutils_extension_with "xsl" "xsl" 1 - phpconfutils_extension_enable "zip" "zip" 1 - phpconfutils_extension_with "zlib" "zlib" 1 - phpconfutils_extension_enable "debug" "debug" 0 - - # DBA support - if use cdb || use berkdb || use flatfile || use gdbm || use inifile || use qdbm ; then - my_conf="${my_conf} --enable-dba${shared}" - fi - - # Tell PHP where the db.h is on FreeBSD -# if use berkdb ; then -# append-cppflags "-I$(db_includedir)" -# fi - - # DBA drivers support - phpconfutils_extension_with "cdb" "cdb" 0 - phpconfutils_extension_with "db4" "berkdb" 0 - phpconfutils_extension_disable "flatfile" "flatfile" 0 - phpconfutils_extension_with "gdbm" "gdbm" 0 - phpconfutils_extension_disable "inifile" "inifile" 0 - phpconfutils_extension_with "qdbm" "qdbm" 0 - - # Support for the GD graphics library - if use gd-external || phpconfutils_usecheck gd-external ; then - phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr" - phpconfutils_extension_with "t1lib" "truetype" 0 "/usr" - phpconfutils_extension_enable "gd-jis-conv" "cjk" 0 - phpconfutils_extension_with "gd" "gd-external" 1 "/usr" - else - phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr" - phpconfutils_extension_with "t1lib" "truetype" 0 "/usr" - phpconfutils_extension_enable "gd-jis-conv" "cjk" 0 - phpconfutils_extension_with "jpeg-dir" "gd" 0 "/usr" - phpconfutils_extension_with "png-dir" "gd" 0 "/usr" - phpconfutils_extension_with "xpm-dir" "xpm" 0 "/usr" - # enable gd last, so configure can pick up the previous settings - phpconfutils_extension_with "gd" "gd" 0 - fi - - # IMAP support - if use imap || phpconfutils_usecheck imap ; then - phpconfutils_extension_with "imap" "imap" 1 - phpconfutils_extension_with "imap-ssl" "ssl" 0 - fi - - # Interbase support - if use interbase ; then - my_conf="${my_conf} --with-interbase=/opt" - fi - - # Firebird support - see Bug 186791 - if use firebird ; then - my_conf="${my_conf} --with-interbase=/usr" - fi - - # LDAP support - if use ldap || phpconfutils_usecheck ldap ; then - if use oci8 ; then - phpconfutils_extension_with "ldap" "ldap" 1 "${ORACLE_HOME}" - else - phpconfutils_extension_with "ldap" "ldap" 1 - phpconfutils_extension_with "ldap-sasl" "ldap-sasl" 0 - fi - fi - - # MySQL support - if use mysql ; then - phpconfutils_extension_with "mysql" "mysql" 1 "/usr" - phpconfutils_extension_with "mysql-sock" "mysql" 0 "/var/run/mysqld/mysqld.sock" - fi - - # MySQLi support - phpconfutils_extension_with "mysqli" "mysqli" 1 "/usr/bin/mysql_config" - - # ODBC support - if use odbc || phpconfutils_usecheck odbc ; then - phpconfutils_extension_with "unixODBC" "odbc" 1 "/usr" - - phpconfutils_extension_with "adabas" "adabas" 1 - phpconfutils_extension_with "birdstep" "birdstep" 1 - phpconfutils_extension_with "dbmaker" "dbmaker" 1 - phpconfutils_extension_with "empress" "empress" 1 - if use empress || phpconfutils_usecheck empress ; then - phpconfutils_extension_with "empress-bcs" "empress-bcs" 0 - fi - phpconfutils_extension_with "esoob" "esoob" 1 - phpconfutils_extension_with "ibm-db2" "db2" 1 - phpconfutils_extension_with "iodbc" "iodbc" 1 "/usr" - phpconfutils_extension_with "sapdb" "sapdb" 1 - phpconfutils_extension_with "solid" "solid" 1 - fi - - # Oracle support - if use oci8 ; then - phpconfutils_extension_with "oci8" "oci8" 1 - fi - if use oci8-instant-client ; then - OCI8IC_PKG="`best_version dev-db/oracle-instantclient-basic`" - OCI8IC_PKG="`printf ${OCI8IC_PKG} | sed -e 's|dev-db/oracle-instantclient-basic-||g' | sed -e 's|-r.*||g'`" - phpconfutils_extension_with "oci8" "oci8-instant-client" 1 "instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib" - fi - - # PDO support - if use pdo || phpconfutils_usecheck pdo ; then - phpconfutils_extension_with "pdo-dblib" "mssql" 1 - # The PDO-Firebird driver is broken and unmaintained upstream - # phpconfutils_extension_with "pdo-firebird" "firebird" 1 - phpconfutils_extension_with "pdo-mysql" "mysql" 1 "/usr" - if use oci8 ; then - phpconfutils_extension_with "pdo-oci" "oci8" 1 - fi - if use oci8-instant-client ; then - OCI8IC_PKG="`best_version dev-db/oracle-instantclient-basic`" - OCI8IC_PKG="`printf ${OCI8IC_PKG} | sed -e 's|dev-db/oracle-instantclient-basic-||g' | sed -e 's|-r.*||g'`" - phpconfutils_extension_with "pdo-oci" "oci8-instant-client" 1 "instantclient,/usr,${OCI8IC_PKG}" - fi - phpconfutils_extension_with "pdo-odbc" "odbc" 1 "unixODBC,/usr" - phpconfutils_extension_with "pdo-pgsql" "postgres" 1 - phpconfutils_extension_with "pdo-sqlite" "sqlite" 1 "/usr" - fi - - # readline/libedit support - # You can use readline or libedit, but you can't use both - phpconfutils_extension_with "readline" "readline" 0 - phpconfutils_extension_with "libedit" "libedit" 0 - - # Session support - if ! use session && ! phpconfutils_usecheck session ; then - phpconfutils_extension_disable "session" "session" 0 - else - phpconfutils_extension_with "mm" "sharedmem" 0 - fi - - # SQLite support - if ! use sqlite && ! phpconfutils_usecheck sqlite ; then - phpconfutils_extension_without "sqlite" "sqlite" 0 - else - phpconfutils_extension_with "sqlite" "sqlite" 0 "/usr" - phpconfutils_extension_enable "sqlite-utf8" "unicode" 0 - fi - - # Fix ELF-related problems - if use pic || phpconfutils_usecheck pic ; then - einfo "Enabling PIC support" - my_conf="${my_conf} --with-pic" - fi - - # Catch CFLAGS problems - php_check_cflags - - # multilib support - if [[ $(get_libdir) != lib ]] ; then - my_conf="--with-libdir=$(get_libdir) ${my_conf}" - fi - - # Support user-passed configuration parameters - [[ -z "${EXTRA_ECONF}" ]] && EXTRA_ECONF="" - - # Set the correct compiler for cross-compilation - tc-export CC - - # We don't use econf, because we need to override all of its settings - ./configure --prefix=${destdir} --host=${CHOST} --mandir=${destdir}/man --infodir=${destdir}/info --sysconfdir=/etc --cache-file=./config.cache ${my_conf} ${EXTRA_ECONF} || die "configure failed" - emake || die "make failed" -} - -# @FUNCTION: php5_2-sapi_src_install -# @DESCRIPTION: -# Takes care of installing php (and its shared extensions if enabled). -php5_2-sapi_src_install() { - destdir=/usr/$(get_libdir)/php5 - - cd "${S}" - - addpredict /usr/share/snmp/mibs/.index - - # Install PHP - emake -j1 INSTALL_ROOT="${D}" install-build install-headers install-programs || die "make install failed" - - # Install missing header files - if use unicode || phpconfutils_usecheck unicode ; then - dodir ${destdir}/include/php/ext/mbstring - insinto ${destdir}/include/php/ext/mbstring - for x in `ls "${S}/ext/mbstring/"*.h` ; do - file=`basename ${x}` - doins ext/mbstring/${file} - done - dodir ${destdir}/include/php/ext/mbstring/oniguruma - insinto ${destdir}/include/php/ext/mbstring/oniguruma - for x in `ls "${S}/ext/mbstring/oniguruma/"*.h` ; do - file=`basename ${x}` - doins ext/mbstring/oniguruma/${file} - done - dodir ${destdir}/include/php/ext/mbstring/libmbfl/mbfl - insinto ${destdir}/include/php/ext/mbstring/libmbfl/mbfl - for x in `ls "${S}/ext/mbstring/libmbfl/mbfl/"*.h` ; do - file=`basename ${x}` - doins ext/mbstring/libmbfl/mbfl/${file} - done - fi - - # Get the extension dir, if not already defined - [[ -z "${PHPEXTDIR}" ]] && PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`" - - # And install the modules to it - if use sharedext ; then - for x in `ls "${S}/modules/"*.so | sort` ; do - module=`basename ${x}` - modulename=${module/.so/} - insinto "${PHPEXTDIR}" - einfo "Installing PHP ${modulename} extension" - doins "modules/${module}" - done - fi - - # Generate the USE file for PHP - phpconfutils_generate_usefile - - # Create the directory where we'll put php5-only php scripts - keepdir /usr/share/php5 -} - -# @FUNCTION: php5_2-sapi_pkg_postinst -# @DESCRIPTION: -# Provides important information to users after install is finished. -php5_2-sapi_pkg_postinst() { - ewarn "If you have additional third party PHP extensions (such as" - ewarn "dev-php5/phpdbg) you may need to recompile them now." - ewarn - - if use sharedext ; then - ewarn "Make sure to use etc-update or dispatch-conf so that extension-specific" - ewarn "ini files get merged properly" - ewarn - fi - - if has kolab ${IUSE} && use kolab ; then - ewarn "Please note that kolab support is still experimental!" - ewarn "Issues specific to USE=kolab must be reported to Gentoo bugzilla only!" - ewarn - ewarn "Kolab groupware server requires annotations support for IMAP, which is enabled" - ewarn "by a third-party patch. Please do NOT report issues with the imap extension" - ewarn "to bugs.php.net until you have recompiled both PHP and net-libs/c-client" - ewarn "with USE=\"-kolab\" and confirmed that those issues still exist!" - ewarn - fi - - ewarn "USE=\"pic\" slows down PHP but has to be enabled on setups where TEXTRELs" - ewarn "are disabled (e.g. when using PaX in the kernel). On hardened profiles this" - ewarn "USE flag is enabled automatically" - ewarn -} +# @DEAD +# To be removed on 2011/04/30. +ewarn "Please fix your package ( ${CATEGORY}/${PF} ) to not use ${ECLASS}.eclass"
\ No newline at end of file diff --git a/eclass/poppler.eclass b/eclass/poppler.eclass index 722ef7d3d64a..5de91d70ece0 100644 --- a/eclass/poppler.eclass +++ b/eclass/poppler.eclass @@ -1,197 +1,7 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/poppler.eclass,v 1.6 2010/01/03 19:10:49 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/poppler.eclass,v 1.7 2011/03/19 14:31:43 scarabeus Exp $ -# @ECLASS: poppler.eclass -# @MAINTAINER: -# Peter Alfredsen <loki_val@gentoo.org> -# @BLURB: Reduces code duplication in the modularized poppler ebuilds. -# @DESCRIPTION: -# Provides an easy template for making modularized poppler-based ebuilds. - -inherit base multilib libtool - -has 2 ${EAPI} || DEPEND="EAPI-TOO-OLD" - -EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install - -RDEPEND=" - !app-text/poppler - !app-text/poppler-bindings - " -DEPEND=" - dev-util/pkgconfig - userland_GNU? ( >=sys-apps/findutils-4.4.0 ) - " - - -# @ECLASS-VARIABLE: HOMEPAGE -# @DESCRIPTION: -# Default HOMEPAGE -HOMEPAGE="http://poppler.freedesktop.org/" - -# @ECLASS-VARIABLE: SRC_URI -# @DESCRIPTION: -# Default SRC_URI -SRC_URI="http://poppler.freedesktop.org/poppler-${PV}.tar.gz" - -# @ECLASS-VARIABLE: S -# @DESCRIPTION: -# Default working directory -S=${WORKDIR}/poppler-${PV} - -# @ECLASS-VARIABLE: POPPLER_MODULE -# @DESCRIPTION: -# The name of the poppler module. Must be set by the ebuild before inheriting -# the poppler eclass. -POPPLER_MODULE=${POPPLER_MODULE} - -# @ECLASS-VARIABLE: POPPLER_MODULE_S -# @DESCRIPTION: -# The working directory of the poppler module. -POPPLER_MODULE_S=${S}/${POPPLER_MODULE} - -# @FUNCTION: pkg_check_modules_override -# @USAGE: <GROUP> [package1] [package2] -# @DESCRIPTION: -# Will export the appropriate variables to override PKG_CHECK_MODULES autoconf -# macros, with the string " " by default. If packages are specified, they will -# be looked up with pkg-config and the appropriate LIBS and CFLAGS substituted. -# LIBS and CFLAGS can also be specified per-package with the following syntax: -# @CODE -# package=LIBS%CFLAGS -# @CODE -# = and % have no effect unless both are specified. -# Here is an example: -# @CODE -# pkg_check_modules_override GASH "gtk+-2.0=-jule%" gobject-2.0 -# @CODE -# The above example will do: -# @CODE -# export GASH_CFLAGS+=" -jule" -# export GASH_LIBS+=" " -# export GASH_CFLAGS+=" $(pkg-config --cflags gobject-2.0)" -# export GASH_LIBS+=" $(pkg-config --libs gobject-2.0)" -# @CODE -# -# NOTE: If a package is not found, the string " " will be inserted in place of -# <GROUP>_CFLAGS and <GROUP>_LIBS -pkg_check_modules_override() { - local package - local group="${1}" - local packages="${*:2}" - export ${group}_CFLAGS=" " - export ${group}_LIBS=" " - - if [[ ${#@} -lt 1 ]] - then - eerror "${FUNCNAME[0]} requires at least one parameter: GROUP" - eerror "PKG_CHECK_MODULES(GROUP, package1 package2 etc)" - die "${FUNCNAME[0]} requires at least one parameter: GROUP" - fi - - for package in $packages - do - if [[ ${package/=} != ${package} && ${package/\%} != ${package} ]] - then - package_cflag_libs=${package##*=} - export ${group}_CFLAGS+=" ${package_cflag_libs%%\%*}" - export ${group}_LIBS+=" ${package_cflag_libs##*\%}" - else - if pkg-config --exists $package - then - export ${group}_CFLAGS+=" $(pkg-config --cflags $package)" - export ${group}_LIBS+=" $(pkg-config --libs $package)" - else - export ${group}_CFLAGS+=" " - export ${group}_LIBS+=" " - fi - fi - done -} -# @FUNCTION: poppler_src_unpack -# @USAGE: -# @DESCRIPTION: -# Runs unpack ${A} -poppler_src_unpack() { - unpack ${A} -} - -# @FUNCTION: poppler_src_prepare -# @USAGE: -# @DESCRIPTION: -# Runs autopatch from base.eclass. -# Uses sed to replace libpoppler.la references with -lpoppler -poppler_src_prepare() { - base_src_prepare - sed -i \ - -e 's#$(top_builddir)/poppler/libpoppler.la#-lpoppler#' \ - $(find . -type f -name 'Makefile.in') || die "Failed to sed proper lib into Makefile.am" - elibtoolize -} - -# @FUNCTION: poppler_src_configure -# @USAGE: -# @DESCRIPTION: -# Makes sure we get a uniform Makefile environment by using pkg_check_modules_override to -# fill out some blanks that configure wants filled. Probably not really needed, but -# insures against future breakage. -# Calls econf with some defaults. -poppler_src_configure() { - pkg_check_modules_override CAIRO cairo - pkg_check_modules_override POPPLER_GLIB glib-2.0 - pkg_check_modules_override POPPLER_QT4 QtCore QtGui QtXml - pkg_check_modules_override POPPLER_QT4_TEST QtTest - pkg_check_modules_override ABIWORD libxml-2.0 - pkg_check_modules_override GTK_TEST gtk+-2.0 gdk-pixbuf-2.0 libglade-2.0 gthread-2.0 - pkg_check_modules_override POPPLER_GLIB glib-2.0 gobject-2.0 - - econf --disable-static \ - --enable-poppler-qt4 \ - --enable-poppler-glib \ - --enable-xpdf-headers \ - --enable-libjpeg \ - --enable-libopenjpeg \ - --enable-zlib \ - --enable-splash-output \ - ${POPPLER_CONF} -} - -# @FUNCTION: poppler_src_compile -# @USAGE: -# @DESCRIPTION: -# Removes top_srcdir Makefile to ensure that no accidental recursion happens. The build -# will just die if it tries to go through top_srcdir. -# Runs emake "$@" in POPPLER_MODULE_S -poppler_src_compile() { - rm -f "${S}"/Makefile* &> /dev/null - cd "${POPPLER_MODULE_S}" || die "POPPLER_MODULE_S=${POPPLER_MODULE_S} - cd failed" - einfo "Now in $POPPLER_MODULE_S" - emake "$@" || die "emake failed" -} - -# @FUNCTION: poppler_src_install -# @USAGE: -# @DESCRIPTION: -# Runs emake DESTDIR="${D}" ${@:-install} in POPPLER_MODULE_S -# Removes .la files. -poppler_src_install() { - cd "${POPPLER_MODULE_S}" - emake DESTDIR="${D}" ${@:-install} || die "make install failed" - for pfile in "${POPPLER_PKGCONFIG[@]}" - do - insinto /usr/$(get_libdir)/pkgconfig - if [[ ${pfile/=} != ${pfile} ]] - then - if use ${pfile%=*} - then - pfile=${pfile#*=} - else - pfile=false - fi - fi - [[ ${pfile} != "false" ]] && doins "${S}/${pfile}" - done - - find "${D}" -type f -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed" -} +# @DEAD +# To be removed on 2011/04/30. +ewarn "Please fix your package ( ${CATEGORY}/${PF} ) to not use ${ECLASS}.eclass"
\ No newline at end of file diff --git a/eclass/ruby-gnome2.eclass b/eclass/ruby-gnome2.eclass index ebeaeb7aa5ac..e05abccb2195 100644 --- a/eclass/ruby-gnome2.eclass +++ b/eclass/ruby-gnome2.eclass @@ -1,84 +1,7 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-gnome2.eclass,v 1.17 2010/04/03 11:53:34 graaff Exp $ -# -# DEPRECATION NOTICE -# This eclass is deprecated because it does not properly handle -# multiple ruby targets. Please use ruby-ng-gnome2.eclass instead. -# -# This eclass simplifies installation of the various pieces of -# ruby-gnome2 since they share a very common installation procedure. -# It's possible that this could provide a foundation for a generalized -# ruby-module.eclass, but at the moment it contains some things -# specific to ruby-gnome2 +# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-gnome2.eclass,v 1.18 2011/03/19 14:31:43 scarabeus Exp $ -# Variables: -# PATCHES Space delimited list of patch files. - -inherit multilib - -EXPORT_FUNCTIONS src_compile src_install src_unpack - -IUSE="" - -subbinding=${PN#ruby-} ; subbinding=${subbinding%2} -S=${WORKDIR}/ruby-gnome2-all-${PV}/${subbinding} -SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz" -HOMEPAGE="http://ruby-gnome2.sourceforge.jp/" -LICENSE="Ruby" -SLOT="0" - -# This eclass can currently only deal with a single ruby version, see -# bug 278012. Since the code is know to work with Ruby 1.8 we -# hard-code it to that version for now. - -DEPEND="=dev-lang/ruby-1.8*" -RDEPEND="${DEPEND}" -USE_RUBY="ruby18" -RUBY=/usr/bin/ruby18 - -ruby-gnome2_src_unpack() { - if [ ! -x /bin/install -a -x /usr/bin/install ]; then - cat <<END >"${T}"/mkmf.rb -require 'mkmf' - -STDERR.puts 'patching mkmf' -CONFIG['INSTALL'] = '/usr/bin/install' -END - # save it because rubygems needs it (for unsetting RUBYOPT) - export GENTOO_RUBYOPT="-r${T}/mkmf.rb" - export RUBYOPT="${RUBYOPT} ${GENTOO_RUBYOPT}" - fi - - unpack ${A} - cd "${S}" - # apply bulk patches - if [[ ${#PATCHES[@]} -gt 1 ]]; then - for x in "${PATCHES[@]}"; do - epatch "${x}" - done - else - for x in ${PATCHES}; do - epatch "${x}" - done - fi -} - -ruby-gnome2_src_compile() { - ${RUBY} extconf.rb || die "extconf.rb failed" - emake CC=${CC:-gcc} CXX=${CXX:-g++} || die "emake failed" -} - -ruby-gnome2_src_install() { - # Create the directories, or the package will create them as files. - dodir $(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitearchdir"]') /usr/$(get_libdir)/pkgconfig - - make DESTDIR="${D}" install || die "make install failed" - for doc in ../AUTHORS ../NEWS ChangeLog README; do - [ -s "$doc" ] && dodoc $doc - done - if [[ -d sample ]]; then - dodir /usr/share/doc/${PF} - cp -a sample "${D}"/usr/share/doc/${PF} || die "cp failed" - fi -} +# @DEAD +# To be removed on 2011/04/30. +ewarn "Please fix your package ( ${CATEGORY}/${PF} ) to not use ${ECLASS}.eclass"
\ No newline at end of file |