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

Diff of /eclass/libtool.eclass

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

Revision 1.102 Revision 1.104
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 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.102 2012/09/15 16:16:53 zmedico Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.104 2013/05/04 05:24:05 vapier Exp $
4 4
5# @ECLASS: libtool.eclass 5# @ECLASS: libtool.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: quickly update bundled libtool code 8# @BLURB: quickly update bundled libtool code
47 __ELT_NOTED_TMP=true 47 __ELT_NOTED_TMP=true
48 printf 'temp patch: %s\n' "${patch}" > "${log}" 48 printf 'temp patch: %s\n' "${patch}" > "${log}"
49 fi 49 fi
50 printf '\nTrying %s\n' "${disp}" >> "${log}" 50 printf '\nTrying %s\n' "${disp}" >> "${log}"
51 51
52 # Save file for permission restoration. `patch` sometimes resets things.
53 cp -p "${file}" "${file}.gentoo.elt"
52 # We only support patchlevel of 0 - why worry if its static patches? 54 # We only support patchlevel of 0 - why worry if its static patches?
53 if patch -p0 --dry-run "${file}" "${patch}" >> "${log}" 2>&1 ; then 55 if patch -p0 --dry-run "${file}" "${patch}" >> "${log}" 2>&1 ; then
54 einfo " Applying ${disp} ..." 56 einfo " Applying ${disp} ..."
55 patch -p0 -g0 --no-backup-if-mismatch "${file}" "${patch}" >> "${log}" 2>&1 57 patch -p0 -g0 --no-backup-if-mismatch "${file}" "${patch}" >> "${log}" 2>&1
56 ret=$? 58 ret=$?
57 export ELT_APPLIED_PATCHES="${ELT_APPLIED_PATCHES} ${src}" 59 export ELT_APPLIED_PATCHES="${ELT_APPLIED_PATCHES} ${src}"
58 else 60 else
59 ret=1 61 ret=1
60 fi 62 fi
63 chmod --reference="${file}.gentoo.elt" "${file}"
64 rm -f "${file}.gentoo.elt"
61 65
62 return "${ret}" 66 return "${ret}"
63} 67}
64 68
65# 69#
130 local do_only_patches="no" 134 local do_only_patches="no"
131 local do_uclibc="yes" 135 local do_uclibc="yes"
132 local deptoremove= 136 local deptoremove=
133 local do_shallow="no" 137 local do_shallow="no"
134 local force="false" 138 local force="false"
135 local elt_patches="install-sh ltmain portage relink max_cmd_len sed test tmp cross as-needed" 139 local elt_patches="install-sh ltmain portage relink max_cmd_len sed test tmp cross as-needed target-nm"
136 140
137 for x in "$@" ; do 141 for x in "$@" ; do
138 case ${x} in 142 case ${x} in
139 --portage) 143 --portage)
140 # Only apply portage patch, and don't 144 # Only apply portage patch, and don't
347 fi 351 fi
348 if [[ $subret -eq 0 ]]; then 352 if [[ $subret -eq 0 ]]; then
349 # have at least one patch succeeded. 353 # have at least one patch succeeded.
350 ret=0 354 ret=0
351 fi 355 fi
356 ;;
357 target-nm)
358 ELT_walk_patches "${d}/configure" "${p}"
359 ret=$?
352 ;; 360 ;;
353 install-sh) 361 install-sh)
354 ELT_walk_patches "${d}/install-sh" "${p}" 362 ELT_walk_patches "${d}/install-sh" "${p}"
355 ret=$? 363 ret=$?
356 ;; 364 ;;

Legend:
Removed from v.1.102  
changed lines
  Added in v.1.104

  ViewVC Help
Powered by ViewVC 1.1.20