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

Diff of /eclass/libtool.eclass

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

Revision 1.100 Revision 1.105
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.100 2012/05/06 11:42:07 grobian Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.105 2013/05/07 14:23:33 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
28 d="${ECLASSDIR_LOCAL}/ELT-patches" 28 d="${ECLASSDIR_LOCAL}/ELT-patches"
29 fi 29 fi
30 echo "${d}" 30 echo "${d}"
31} 31}
32 32
33DESCRIPTION="Based on the ${ECLASS} eclass"
34
35inherit multilib toolchain-funcs 33inherit multilib toolchain-funcs
36 34
37# 35#
38# See if we can apply $2 on $1, and if so, do it 36# See if we can apply $2 on $1, and if so, do it
39# 37#
49 __ELT_NOTED_TMP=true 47 __ELT_NOTED_TMP=true
50 printf 'temp patch: %s\n' "${patch}" > "${log}" 48 printf 'temp patch: %s\n' "${patch}" > "${log}"
51 fi 49 fi
52 printf '\nTrying %s\n' "${disp}" >> "${log}" 50 printf '\nTrying %s\n' "${disp}" >> "${log}"
53 51
52 if [[ ! -e ${file} ]] ; then
53 echo "File not found: ${file}" >> "${log}"
54 return 1
55 fi
56
57 # Save file for permission restoration. `patch` sometimes resets things.
58 cp -p "${file}" "${file}.gentoo.elt"
54 # We only support patchlevel of 0 - why worry if its static patches? 59 # We only support patchlevel of 0 - why worry if its static patches?
55 if patch -p0 --dry-run "${file}" "${patch}" >> "${log}" 2>&1 ; then 60 if patch -p0 --dry-run "${file}" "${patch}" >> "${log}" 2>&1 ; then
56 einfo " Applying ${disp} ..." 61 einfo " Applying ${disp} ..."
57 patch -p0 -g0 --no-backup-if-mismatch "${file}" "${patch}" >> "${log}" 2>&1 62 patch -p0 -g0 --no-backup-if-mismatch "${file}" "${patch}" >> "${log}" 2>&1
58 ret=$? 63 ret=$?
59 export ELT_APPLIED_PATCHES="${ELT_APPLIED_PATCHES} ${src}" 64 export ELT_APPLIED_PATCHES="${ELT_APPLIED_PATCHES} ${src}"
60 else 65 else
61 ret=1 66 ret=1
62 fi 67 fi
68 chmod --reference="${file}.gentoo.elt" "${file}"
69 rm -f "${file}.gentoo.elt"
63 70
64 return "${ret}" 71 return "${ret}"
65} 72}
66 73
67# 74#
132 local do_only_patches="no" 139 local do_only_patches="no"
133 local do_uclibc="yes" 140 local do_uclibc="yes"
134 local deptoremove= 141 local deptoremove=
135 local do_shallow="no" 142 local do_shallow="no"
136 local force="false" 143 local force="false"
137 local elt_patches="install-sh ltmain portage relink max_cmd_len sed test tmp cross as-needed" 144 local elt_patches="install-sh ltmain portage relink max_cmd_len sed test tmp cross as-needed target-nm"
138 145
139 for x in "$@" ; do 146 for x in "$@" ; do
140 case ${x} in 147 case ${x} in
141 --portage) 148 --portage)
142 # Only apply portage patch, and don't 149 # Only apply portage patch, and don't
180 [[ ${do_uclibc} == "yes" ]] && elt_patches+=" uclibc-conf uclibc-ltconf" 187 [[ ${do_uclibc} == "yes" ]] && elt_patches+=" uclibc-conf uclibc-ltconf"
181 188
182 case ${CHOST} in 189 case ${CHOST} in
183 *-aix*) elt_patches+=" hardcode aixrtl aix-noundef" ;; #213277 190 *-aix*) elt_patches+=" hardcode aixrtl aix-noundef" ;; #213277
184 *-darwin*) elt_patches+=" darwin-ltconf darwin-ltmain darwin-conf" ;; 191 *-darwin*) elt_patches+=" darwin-ltconf darwin-ltmain darwin-conf" ;;
185 *-solaris*) elt_patches+=" sol2-conf" ;; 192 *-solaris*) elt_patches+=" sol2-conf sol2-ltmain" ;;
186 *-freebsd*) elt_patches+=" fbsd-conf fbsd-ltconf" ;; 193 *-freebsd*) elt_patches+=" fbsd-conf fbsd-ltconf" ;;
187 *-hpux*) elt_patches+=" hpux-conf deplibs hc-flag-ld hardcode hardcode-relink relink-prog no-lc" ;; 194 *-hpux*) elt_patches+=" hpux-conf deplibs hc-flag-ld hardcode hardcode-relink relink-prog no-lc" ;;
188 *-irix*) elt_patches+=" irix-ltmain" ;; 195 *-irix*) elt_patches+=" irix-ltmain" ;;
189 *-mint*) elt_patches+=" mint-conf" ;; 196 *-mint*) elt_patches+=" mint-conf" ;;
190 esac 197 esac
349 fi 356 fi
350 if [[ $subret -eq 0 ]]; then 357 if [[ $subret -eq 0 ]]; then
351 # have at least one patch succeeded. 358 # have at least one patch succeeded.
352 ret=0 359 ret=0
353 fi 360 fi
361 ;;
362 target-nm)
363 ELT_walk_patches "${d}/configure" "${p}"
364 ret=$?
354 ;; 365 ;;
355 install-sh) 366 install-sh)
356 ELT_walk_patches "${d}/install-sh" "${p}" 367 ELT_walk_patches "${d}/install-sh" "${p}"
357 ret=$? 368 ret=$?
358 ;; 369 ;;

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

  ViewVC Help
Powered by ViewVC 1.1.20