/[gentoo-x86]/eclass/libtool.eclass
Gentoo

Diff of /eclass/libtool.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.60 Revision 1.62
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.60 2005/10/04 15:48:05 azarah Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.62 2005/12/07 22:50:05 azarah Exp $
4# 4#
5# Author: Martin Schlemmer <azarah@gentoo.org> 5# Author: Martin Schlemmer <azarah@gentoo.org>
6# 6#
7# This eclass patches ltmain.sh distributed with libtoolized packages with the 7# This eclass patches ltmain.sh distributed with libtoolized packages with the
8# relink and portage patch among others 8# relink and portage patch among others
45 local ret=0 45 local ret=0
46 local file=$1 46 local file=$1
47 local patch=$2 47 local patch=$2
48 48
49 # We only support patchlevel of 0 - why worry if its static patches? 49 # We only support patchlevel of 0 - why worry if its static patches?
50 if patch -p0 --dry-run "${file}" < "${patch}" &> "${T}/elibtool.log" ; then 50 if patch -p0 --dry-run "${file}" "${patch}" &> "${T}/elibtool.log" ; then
51 einfo " Applying $(basename "$(dirname "${patch}")")-${patch##*/}.patch ..." 51 einfo " Applying $(basename "$(dirname "${patch}")")-${patch##*/}.patch ..."
52 patch -p0 "${file}" < "${patch}" &> "${T}/elibtool.log" 52 patch -p0 -g0 --no-backup-if-mismatch "${file}" "${patch}" \
53 &> "${T}/elibtool.log"
53 ret=$? 54 ret=$?
54 export ELT_APPLIED_PATCHES="${ELT_APPLIED_PATCHES} ${patch##*/}" 55 export ELT_APPLIED_PATCHES="${ELT_APPLIED_PATCHES} ${patch##*/}"
55 else 56 else
56 ret=1 57 ret=1
57 fi 58 fi
102 eerror "Could not get VERSION for ${file##*/}!" 103 eerror "Could not get VERSION for ${file##*/}!"
103 die "Could not get VERSION for ${file##*/}!" 104 die "Could not get VERSION for ${file##*/}!"
104 fi 105 fi
105 106
106 # Go through the patches in reverse order (large to small) 107 # Go through the patches in reverse order (large to small)
107 for x in $(ls -d "${patch_dir}"/* 2> /dev/null | sort -r) ; do 108 for x in $(ls -d "${patch_dir}"/* 2> /dev/null | grep -v 'CVS' | sort -r) ; do
108 if [[ -n ${x} && -f ${x} ]] ; then 109 if [[ -n ${x} && -f ${x} ]] ; then
109 local ltver=$(VER_to_int "${version}") 110 local ltver=$(VER_to_int "${version}")
110 local ptver=$(VER_to_int "${x##*/}") 111 local ptver=$(VER_to_int "${x##*/}")
111 112
112 # If libtool version smaller than patch version, skip patch. 113 # If libtool version smaller than patch version, skip patch.
196 197
197 if useq ppc-macos ; then 198 if useq ppc-macos ; then
198 local opts 199 local opts
199 [[ -f Makefile.am ]] && opts="--automake" 200 [[ -f Makefile.am ]] && opts="--automake"
200 glibtoolize --copy --force ${opts} 201 glibtoolize --copy --force ${opts}
201 202
202 elt_patches="${elt_patches} darwin-ltconf darwin-ltmain" 203 elt_patches="${elt_patches} darwin-ltconf darwin-ltmain"
203 fi 204 fi
204 205
205 for x in ${my_dirlist} ; do 206 for x in ${my_dirlist} ; do
206 local tmp=$(echo "${x}" | sed -e "s|${WORKDIR}||") 207 local tmp=$(echo "${x}" | sed -e "s|${WORKDIR}||")
321 [[ ${CHOST} == *"-uclibc" ]] && \ 322 [[ ${CHOST} == *"-uclibc" ]] && \
322 ewarn " uClibc patch set '${y}' failed to apply!" 323 ewarn " uClibc patch set '${y}' failed to apply!"
323 ;; 324 ;;
324 "fbsd-"*) 325 "fbsd-"*)
325 if [[ ${CHOST} == *"-freebsd"* ]] ; then 326 if [[ ${CHOST} == *"-freebsd"* ]] ; then
327 if [[ -z $(grep 'Handle Gentoo/FreeBSD as it was Linux' "${x}/configure") ]]; then
326 eerror " FreeBSD patch set '${y}' failed to apply!" 328 eerror " FreeBSD patch set '${y}' failed to apply!"
327 die "FreeBSD patch set '${y}' failed to apply!" 329 die "FreeBSD patch set '${y}' failed to apply!"
330 fi
328 fi 331 fi
329 ;; 332 ;;
330 "darwin-"*) 333 "darwin-"*)
331 useq ppc-macos && \ 334 useq ppc-macos && \
332 ewarn " Darwin patch set '${y}' failed to apply!" 335 ewarn " Darwin patch set '${y}' failed to apply!"

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.62

  ViewVC Help
Powered by ViewVC 1.1.20