summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2005-02-27 20:29:04 +0000
committerMartin Schlemmer <azarah@gentoo.org>2005-02-27 20:29:04 +0000
commit14b62cce34f7e2feedfc04d4cb79b6d2e20e8681 (patch)
tree1643ca5915a96fa09c4ced4ee17543609fc163ba /eclass/libtool.eclass
parentFix incorrect dep: dcoppython doesn't have an rc1 ebuild (diff)
downloadgentoo-2-14b62cce34f7e2feedfc04d4cb79b6d2e20e8681.tar.gz
gentoo-2-14b62cce34f7e2feedfc04d4cb79b6d2e20e8681.tar.bz2
gentoo-2-14b62cce34f7e2feedfc04d4cb79b6d2e20e8681.zip
Try to match patches more according to libtool version, bug #83486
Diffstat (limited to 'eclass/libtool.eclass')
-rw-r--r--eclass/libtool.eclass57
1 files changed, 42 insertions, 15 deletions
diff --git a/eclass/libtool.eclass b/eclass/libtool.eclass
index aaaa6375fe2a..81488d72ec2c 100644
--- a/eclass/libtool.eclass
+++ b/eclass/libtool.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/libtool.eclass,v 1.42 2005/01/31 03:02:13 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.43 2005/02/27 20:29:04 azarah Exp $
#
# Author: Martin Schlemmer <azarah@gentoo.org>
#
@@ -68,6 +68,7 @@ ELT_walk_patches() {
local y=
local ret=1
local patch_dir=
+ local version=$(eval $(grep -e '^[[:space:]]*VERSION=' $1); echo "${VERSION}")
if [[ -n $2 ]] ; then
if [[ -d ${ELT_PATCH_DIR}/$2 ]] ; then
@@ -76,24 +77,50 @@ ELT_walk_patches() {
return ${ret}
fi
- for x in $(ls -d "${patch_dir}"/* 2> /dev/null) ; do
- if [[ -n ${x} && -f ${x} ]] ; then
- # For --remove-internal-dep ...
- if [[ -n $3 ]] ; then
- # For replace @REM_INT_DEP@ with what was passed
- # to --remove-internal-dep
- sed -e "s|@REM_INT_DEP@|$3|g" ${x} > \
- ${T}/$$.rem_int_deps.patch
+ # First check a version specific patch, if not check major.minor*
+ for y in ${version} $(echo "${version}" | cut -d. -f1,2) ; do
+ [[ -z ${y} ]] && continue
+ for x in $(ls -d "${patch_dir}/${y}"* 2> /dev/null) ; do
+ if [[ -n ${x} && -f ${x} ]] ; then
+ # For --remove-internal-dep ...
+ if [[ -n $3 ]] ; then
+ # For replace @REM_INT_DEP@ with what was passed
+ # to --remove-internal-dep
+ sed -e "s|@REM_INT_DEP@|$3|g" ${x} > \
+ ${T}/$$.rem_int_deps.patch
+
+ x="${T}/$$.rem_int_deps.patch"
+ fi
- x="${T}/$$.rem_int_deps.patch"
+ if ELT_try_and_apply_patch "$1" "${x}" ; then
+ ret=0
+ break
+ fi
fi
+ done
+ done
- if ELT_try_and_apply_patch "$1" "${x}" ; then
- ret=0
- break
+ # If still nothing, try the rest.
+ if [[ ${ret} -eq 1 ]]; then
+ for x in $(ls -d "${patch_dir}"/* 2> /dev/null) ; do
+ if [[ -n ${x} && -f ${x} ]] ; then
+ # For --remove-internal-dep ...
+ if [[ -n $3 ]] ; then
+ # For replace @REM_INT_DEP@ with what was passed
+ # to --remove-internal-dep
+ sed -e "s|@REM_INT_DEP@|$3|g" ${x} > \
+ ${T}/$$.rem_int_deps.patch
+
+ x="${T}/$$.rem_int_deps.patch"
+ fi
+
+ if ELT_try_and_apply_patch "$1" "${x}" ; then
+ ret=0
+ break
+ fi
fi
- fi
- done
+ done
+ fi
fi
return ${ret}