summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2005-08-28 17:23:48 +0000
committerMartin Schlemmer <azarah@gentoo.org>2005-08-28 17:23:48 +0000
commit54f9870f270cfd7757157605681d4c480501a9ea (patch)
tree9b6194ab7b12a90183f6cba3e3e459c94fcb1245 /eclass
parentnew version (diff)
downloadgentoo-2-54f9870f270cfd7757157605681d4c480501a9ea.tar.gz
gentoo-2-54f9870f270cfd7757157605681d4c480501a9ea.tar.bz2
gentoo-2-54f9870f270cfd7757157605681d4c480501a9ea.zip
Initial commit; eclass done by Diego Flameeyes Pettenò <flameeyes@gentoo.org>.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/autotools.eclass81
-rw-r--r--eclass/php5-sapi-r2.eclass4
2 files changed, 83 insertions, 2 deletions
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
new file mode 100644
index 000000000000..e8aadccf49a3
--- /dev/null
+++ b/eclass/autotools.eclass
@@ -0,0 +1,81 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.11 2005/08/28 17:23:48 azarah Exp $
+#
+# Author: Diego Pettenò <flameeyes@gentoo.org>
+#
+# This eclass is for handling autotooled software packages that
+# needs to regenerate their build scripts.
+#
+# NB: If you add anything, please comment it!
+
+inherit eutils gnuconfig
+
+DELEND="sys-devel/automake
+ sys-devel/autoconf
+ sys-devel/libtool"
+
+# Internal function to run an autotools' tool
+autotools_run_tool() {
+ local STDERR_TARGET="${T}/$$.out"
+ local PATCH_TARGET="${T}/$$.patch"
+ local ris
+
+ echo "***** $1 *****" > ${STDERR_TARGET%/*}/$1-${STDERR_TARGET##*/}
+ echo >> ${STDERR_TARGET%/*}/$1-${STDERR_TARGET##*/}
+
+ ebegin "Running $1"
+ $@ >> ${STDERR_TARGET%/*}/$1-${STDERR_TARGET##*/} 2>&1
+ ris=$?
+ eend $ris
+
+ if [[ $ris != 0 ]]; then
+ echo
+ eerror "Failed Running $1 !"
+ eerror
+ eerror "Include in your bugreport the contents of:"
+ eerror
+ eerror " ${STDERR_TARGET%/*}/$1-${STDERR_TARGET##*/}"
+ echo
+ die "Failed Running $1 !"
+ fi
+}
+
+# These functions runs the autotools using autotools_run_tool with the
+# specified parametes. The name of the tool run is the same of the function
+# without e prefix.
+# They also force installing the support files for safety.
+eaclocal() {
+ autotools_run_tool aclocal "$@"
+}
+
+eautoheader() {
+ autotools_run_tool autoheader "$@"
+}
+
+eautoconf() {
+ autotools_run_tool autoconf "$@"
+}
+
+eautomake() {
+ autotools_run_tool automake --add-missing --force-missing --copy "$@"
+}
+
+# This function mimes the behavior of autoreconf, but uses the different
+# eauto* functions to run the tools. It doesn't accept parameters, but
+# the directory with include files can be specified with M4DIR variable.
+#
+# Note: doesn't run autopoint right now, but runs gnuconfig_update.
+eautoreconf() {
+ local aclocal_opts
+
+ [[ -n ${M4DIR} ]] && aclocal_opts="-I ${M4DIR}"
+
+ eaclocal $aclocal_opts
+ eautoconf
+ eautoheader
+ eautomake
+ gnuconfig_update
+
+ autotools_run_tool libtoolize --copy --force
+}
diff --git a/eclass/php5-sapi-r2.eclass b/eclass/php5-sapi-r2.eclass
index 05fdf3791be8..938b51af1447 100644
--- a/eclass/php5-sapi-r2.eclass
+++ b/eclass/php5-sapi-r2.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/php5-sapi-r2.eclass,v 1.36 2005/08/23 14:55:11 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php5-sapi-r2.eclass,v 1.37 2005/08/28 17:23:48 azarah Exp $
#
# eclass/php5-sapi-r2.eclass
# Eclass for building different php5 SAPI instances
@@ -558,7 +558,7 @@ php5-sapi-r2_src_install() {
rm -rf ${D}/usr/lib/php/build
dodir /usr/share/php
- for x in ${D}/usr/lib/php ; do
+ for x in ${D}/usr/lib/php/* ; do
if [ "`basename $x`" != 'extensions' ]; then
mv $x ${D}/usr/share/php
fi