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

Diff of /eclass/eutils.eclass

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

Revision 1.120 Revision 1.121
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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/eutils.eclass,v 1.120 2004/10/15 19:48:26 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.121 2004/10/19 19:51:12 vapier Exp $
4# 4#
5# Author: Martin Schlemmer <azarah@gentoo.org> 5# Author: Martin Schlemmer <azarah@gentoo.org>
6# 6#
7# This eclass is for general purpose functions that most ebuilds 7# This eclass is for general purpose functions that most ebuilds
8# have to implement themselves. 8# have to implement themselves.
221 local x="" 221 local x=""
222 222
223 if [ "$#" -gt 1 ] 223 if [ "$#" -gt 1 ]
224 then 224 then
225 local m="" 225 local m=""
226 einfo "${#} patches to apply..." 226 einfo "${#} patches to apply ..."
227 for m in "$@" ; do 227 for m in "$@" ; do
228 epatch "${m}" 228 epatch "${m}"
229 done 229 done
230 return 0 230 return 0
231 fi 231 fi
284 ;; 284 ;;
285 esac 285 esac
286 286
287 if [ "${SINGLE_PATCH}" = "no" ] 287 if [ "${SINGLE_PATCH}" = "no" ]
288 then 288 then
289 einfo "Applying various patches (bugfixes/updates)..." 289 einfo "Applying various patches (bugfixes/updates) ..."
290 fi 290 fi
291 for x in ${EPATCH_SOURCE} 291 for x in ${EPATCH_SOURCE}
292 do 292 do
293 # New ARCH dependant patch naming scheme... 293 # New ARCH dependant patch naming scheme ...
294 # 294 #
295 # ???_arch_foo.patch 295 # ???_arch_foo.patch
296 # 296 #
297 if [ -f ${x} ] && \ 297 if [ -f ${x} ] && \
298 ([ "${SINGLE_PATCH}" = "yes" -o "${x/_all_}" != "${x}" -o "`eval echo \$\{x/_${ARCH}_\}`" != "${x}" ] || \ 298 ([ "${SINGLE_PATCH}" = "yes" -o "${x/_all_}" != "${x}" -o "`eval echo \$\{x/_${ARCH}_\}`" != "${x}" ] || \
313 then 313 then
314 if [ -n "${EPATCH_SINGLE_MSG}" ] 314 if [ -n "${EPATCH_SINGLE_MSG}" ]
315 then 315 then
316 einfo "${EPATCH_SINGLE_MSG}" 316 einfo "${EPATCH_SINGLE_MSG}"
317 else 317 else
318 einfo "Applying ${x##*/}..." 318 einfo "Applying ${x##*/} ..."
319 fi 319 fi
320 else 320 else
321 einfo " ${x##*/}..." 321 einfo " ${x##*/} ..."
322 fi 322 fi
323 323
324 echo "***** ${x##*/} *****" > ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/} 324 echo "***** ${x##*/} *****" > ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}
325 echo >> ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/} 325 echo >> ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}
326 326
359 359
360 if (cat ${PATCH_TARGET} | patch -p${count} ${popts} --dry-run -f) >> ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/} 2>&1 360 if (cat ${PATCH_TARGET} | patch -p${count} ${popts} --dry-run -f) >> ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/} 2>&1
361 then 361 then
362 draw_line "***** ${x##*/} *****" > ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real 362 draw_line "***** ${x##*/} *****" > ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real
363 echo >> ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real 363 echo >> ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real
364 echo "ACTUALLY APPLYING ${x##*/}..." >> ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real 364 echo "ACTUALLY APPLYING ${x##*/} ..." >> ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real
365 echo >> ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real 365 echo >> ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real
366 draw_line "***** ${x##*/} *****" >> ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real 366 draw_line "***** ${x##*/} *****" >> ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real
367 367
368 cat ${PATCH_TARGET} | patch -p${count} ${popts} >> ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real 2>&1 368 cat ${PATCH_TARGET} | patch -p${count} ${popts} >> ${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/}.real 2>&1
369 369
438 438
439 return 1; 439 return 1;
440 } 440 }
441 END 441 END
442 442
443 einfon "Checking for _CS_GNU_LIBPTHREAD_VERSION support in glibc ... " 443 einfon "Checking for _CS_GNU_LIBPTHREAD_VERSION support in glibc ..."
444 if gcc -o ${T}/nptl ${T}/test-nptl.c &> /dev/null 444 if gcc -o ${T}/nptl ${T}/test-nptl.c &> /dev/null
445 then 445 then
446 echo "yes" 446 echo "yes"
447 einfon "Checking what PTHREADS implementation we have ... " 447 einfon "Checking what PTHREADS implementation we have ..."
448 if ${T}/nptl 448 if ${T}/nptl
449 then 449 then
450 return 0 450 return 0
451 else 451 else
452 return 1 452 return 1
528 528
529 if [ -n "${ADMINPARAM}" ] 529 if [ -n "${ADMINPARAM}" ]
530 then 530 then
531 if [ "${jobs}" -gt "${ADMINPARAM}" ] 531 if [ "${jobs}" -gt "${ADMINPARAM}" ]
532 then 532 then
533 einfo "Setting make jobs to \"-j${ADMINPARAM}\" to ensure successful merge..." 533 einfo "Setting make jobs to \"-j${ADMINPARAM}\" to ensure successful merge ..."
534 export MAKEOPTS="${MAKEOPTS} -j${ADMINPARAM}" 534 export MAKEOPTS="${MAKEOPTS} -j${ADMINPARAM}"
535 else 535 else
536 einfo "Setting make jobs to \"-j${jobs}\" to ensure successful merge..." 536 einfo "Setting make jobs to \"-j${jobs}\" to ensure successful merge ..."
537 export MAKEOPTS="${MAKEOPTS} -j${jobs}" 537 export MAKEOPTS="${MAKEOPTS} -j${jobs}"
538 fi 538 fi
539 fi 539 fi
540} 540}
541 541
887} 887}
888 888
889# Simple script to replace 'dos2unix' binaries 889# Simple script to replace 'dos2unix' binaries
890# vapier@gentoo.org 890# vapier@gentoo.org
891# 891#
892# edos2unix(file, <more files>...) 892# edos2unix(file, <more files> ...)
893edos2unix() { 893edos2unix() {
894 for f in "$@" 894 for f in "$@"
895 do 895 do
896 cp "${f}" ${T}/edos2unix 896 cp "${f}" ${T}/edos2unix
897 sed 's/\r$//' ${T}/edos2unix > "${f}" 897 sed 's/\r$//' ${T}/edos2unix > "${f}"

Legend:
Removed from v.1.120  
changed lines
  Added in v.1.121

  ViewVC Help
Powered by ViewVC 1.1.20