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

Diff of /eclass/libtool.eclass

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

Revision 1.105 Revision 1.106
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2013 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.105 2013/05/07 14:23:33 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.106 2013/05/11 11:17:58 aballier 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
53 echo "File not found: ${file}" >> "${log}" 53 echo "File not found: ${file}" >> "${log}"
54 return 1 54 return 1
55 fi 55 fi
56 56
57 # Save file for permission restoration. `patch` sometimes resets things. 57 # Save file for permission restoration. `patch` sometimes resets things.
58 cp -p "${file}" "${file}.gentoo.elt" 58 # Ideally we'd want 'stat -c %a', but stat is highly non portable and we are
59 # guaranted to have GNU find, so use that instead.
60 local perms="$(find ${file} -maxdepth 0 -printf '%m')"
59 # We only support patchlevel of 0 - why worry if its static patches? 61 # We only support patchlevel of 0 - why worry if its static patches?
60 if patch -p0 --dry-run "${file}" "${patch}" >> "${log}" 2>&1 ; then 62 if patch -p0 --dry-run "${file}" "${patch}" >> "${log}" 2>&1 ; then
61 einfo " Applying ${disp} ..." 63 einfo " Applying ${disp} ..."
62 patch -p0 -g0 --no-backup-if-mismatch "${file}" "${patch}" >> "${log}" 2>&1 64 patch -p0 -g0 --no-backup-if-mismatch "${file}" "${patch}" >> "${log}" 2>&1
63 ret=$? 65 ret=$?
64 export ELT_APPLIED_PATCHES="${ELT_APPLIED_PATCHES} ${src}" 66 export ELT_APPLIED_PATCHES="${ELT_APPLIED_PATCHES} ${src}"
65 else 67 else
66 ret=1 68 ret=1
67 fi 69 fi
68 chmod --reference="${file}.gentoo.elt" "${file}" 70 chmod "${perms}" "${file}"
69 rm -f "${file}.gentoo.elt"
70 71
71 return "${ret}" 72 return "${ret}"
72} 73}
73 74
74# 75#

Legend:
Removed from v.1.105  
changed lines
  Added in v.1.106

  ViewVC Help
Powered by ViewVC 1.1.20