/[gentoo-alt]/trunk/prefix/eclass/db4-fix.eclass
Gentoo

Contents of /trunk/prefix/eclass/db4-fix.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 982 - (show annotations) (download)
Thu Feb 2 04:20:17 2006 UTC (13 years, 5 months ago) by kito
File size: 1288 byte(s)
Initial eclass import from gentoo-x86
1 # Copyright 1999-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/db4-fix.eclass,v 1.6 2005/07/06 20:23:20 agriffis Exp $
4 #
5 # Author: Paul de Vrieze <pauldv@gentoo.org>
6 #
7 # This eclass is meant to fix configure scripts to work with our versioned db4
8 #
9 # the dodb4-fix script should be run from the directory where autoconf needs to
10 # be run from
11
12
13 DEPEND="sys-apps/sed"
14
15 DESCRIPTION="Based on the ${ECLASS} eclass"
16
17 EDB4_FIX_VERSION=0.1
18
19 dodb4-fix () {
20 postfix=`grep "#define.db_create" /usr/include/db4/db.h \
21 |cut -d " " -f 2|sed -e "s,db_create,,"`
22
23 if [ $# -ne 1 ];then
24 die "This function needs as argument the name of the file to fix"
25 fi
26 if has_version =sys-libs/db-4*; then
27 if [ "`basename $1`" == "configure" ]; then
28 die "sorry configure fixing is not supported yet"
29 else
30 einfo "fixing $1 to work with db-4 by appending ${postfix}"
31 cp $1 ${1}.cpy
32 cat ${1}.cpy \
33 |sed -e "s;\( *AC_CHECK_LIB( *db-?4? *, db_[^ ,]*\);\1${postfix};" \
34 -e "s/\(-l\|[ \t]\)\(db3\)\([ \t]\)/\1db-3\3/g" \
35 >${1} || die "sed failed"
36 # -e "s/\( *AC_CHECK_LIB([^,]*, db_create\)\( *,\)/\1${postfix}\2/" \
37
38 autoconf
39 fi
40 else
41 einfo "db4 not found, so not applying db4 fixes"
42 fi
43
44 }

  ViewVC Help
Powered by ViewVC 1.1.20