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

Diff of /eclass/eutils.eclass

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

Revision 1.377 Revision 1.407
1# Copyright 1999-2011 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/eutils.eclass,v 1.377 2012/01/03 08:45:36 jlec Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.407 2012/10/11 16:50:53 mgorny Exp $
4 4
5# @ECLASS: eutils.eclass 5# @ECLASS: eutils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: many extra (but common) functions that are used in ebuilds 8# @BLURB: many extra (but common) functions that are used in ebuilds
16# different from the overall eclass! 16# different from the overall eclass!
17 17
18if [[ ${___ECLASS_ONCE_EUTILS} != "recur -_+^+_- spank" ]] ; then 18if [[ ${___ECLASS_ONCE_EUTILS} != "recur -_+^+_- spank" ]] ; then
19___ECLASS_ONCE_EUTILS="recur -_+^+_- spank" 19___ECLASS_ONCE_EUTILS="recur -_+^+_- spank"
20 20
21inherit multilib portability user 21inherit multilib toolchain-funcs user
22
23DESCRIPTION="Based on the ${ECLASS} eclass"
24 22
25if has "${EAPI:-0}" 0 1 2; then 23if has "${EAPI:-0}" 0 1 2; then
26 24
27# @FUNCTION: epause 25# @FUNCTION: epause
28# @USAGE: [seconds] 26# @USAGE: [seconds]
212# @FUNCTION: eumask_pop 210# @FUNCTION: eumask_pop
213# @USAGE: 211# @USAGE:
214# @DESCRIPTION: 212# @DESCRIPTION:
215# Restore the previous umask state. 213# Restore the previous umask state.
216eumask_pop() { 214eumask_pop() {
215 [[ $# -eq 0 ]] || die "${FUNCNAME}: we take no options"
217 local s 216 local s
218 estack_pop eumask s || die "${FUNCNAME}: unbalanced push" 217 estack_pop eumask s || die "${FUNCNAME}: unbalanced push"
219 umask ${s} || die "${FUNCNAME}: sanity: could not restore umask: ${s}" 218 umask ${s} || die "${FUNCNAME}: sanity: could not restore umask: ${s}"
220} 219}
221 220
227# @DESCRIPTION: 226# @DESCRIPTION:
228# Default extension for patches (do not prefix the period yourself). 227# Default extension for patches (do not prefix the period yourself).
229EPATCH_SUFFIX="patch.bz2" 228EPATCH_SUFFIX="patch.bz2"
230# @VARIABLE: EPATCH_OPTS 229# @VARIABLE: EPATCH_OPTS
231# @DESCRIPTION: 230# @DESCRIPTION:
232# Default options for patch: 231# Options to pass to patch. Meant for ebuild/package-specific tweaking
232# such as forcing the patch level (-p#) or fuzz (-F#) factor. Note that
233# for single patch tweaking, you can also pass flags directly to epatch.
234EPATCH_OPTS=""
235# @VARIABLE: EPATCH_COMMON_OPTS
236# @DESCRIPTION:
237# Common options to pass to `patch`. You probably should never need to
238# change these. If you do, please discuss it with base-system first to
239# be sure.
233# @CODE 240# @CODE
234# -g0 - keep RCS, ClearCase, Perforce and SCCS happy #24571 241# -g0 - keep RCS, ClearCase, Perforce and SCCS happy #24571
235# --no-backup-if-mismatch - do not leave .orig files behind 242# --no-backup-if-mismatch - do not leave .orig files behind
236# -E - automatically remove empty files 243# -E - automatically remove empty files
237# @CODE 244# @CODE
238EPATCH_OPTS="-g0 -E --no-backup-if-mismatch" 245EPATCH_COMMON_OPTS="-g0 -E --no-backup-if-mismatch"
239# @VARIABLE: EPATCH_EXCLUDE 246# @VARIABLE: EPATCH_EXCLUDE
240# @DESCRIPTION: 247# @DESCRIPTION:
241# List of patches not to apply. Note this is only file names, 248# List of patches not to apply. Note this is only file names,
242# and not the full path. Globs accepted. 249# and not the full path. Globs accepted.
243EPATCH_EXCLUDE="" 250EPATCH_EXCLUDE=""
254# Only require patches to match EPATCH_SUFFIX rather than the extended 261# Only require patches to match EPATCH_SUFFIX rather than the extended
255# arch naming style. 262# arch naming style.
256EPATCH_FORCE="no" 263EPATCH_FORCE="no"
257 264
258# @FUNCTION: epatch 265# @FUNCTION: epatch
259# @USAGE: [patches] [dirs of patches] 266# @USAGE: [options] [patches] [dirs of patches]
260# @DESCRIPTION: 267# @DESCRIPTION:
261# epatch is designed to greatly simplify the application of patches. It can 268# epatch is designed to greatly simplify the application of patches. It can
262# process patch files directly, or directories of patches. The patches may be 269# process patch files directly, or directories of patches. The patches may be
263# compressed (bzip/gzip/etc...) or plain text. You generally need not specify 270# compressed (bzip/gzip/etc...) or plain text. You generally need not specify
264# the -p option as epatch will automatically attempt -p0 to -p5 until things 271# the -p option as epatch will automatically attempt -p0 to -p5 until things
265# apply successfully. 272# apply successfully.
266# 273#
267# If you do not specify any options, then epatch will default to the directory 274# If you do not specify any patches/dirs, then epatch will default to the
268# specified by EPATCH_SOURCE. 275# directory specified by EPATCH_SOURCE.
276#
277# Any options specified that start with a dash will be passed down to patch
278# for this specific invocation. As soon as an arg w/out a dash is found, then
279# arg processing stops.
269# 280#
270# When processing directories, epatch will apply all patches that match: 281# When processing directories, epatch will apply all patches that match:
271# @CODE 282# @CODE
272# if ${EPATCH_FORCE} != "yes" 283# if ${EPATCH_FORCE} != "yes"
273# ??_${ARCH}_foo.${EPATCH_SUFFIX} 284# ??_${ARCH}_foo.${EPATCH_SUFFIX}
291 echo "${1//?/=}" 302 echo "${1//?/=}"
292 } 303 }
293 304
294 unset P4CONFIG P4PORT P4USER # keep perforce at bay #56402 305 unset P4CONFIG P4PORT P4USER # keep perforce at bay #56402
295 306
307 # First process options. We localize the EPATCH_OPTS setting
308 # from above so that we can pass it on in the loop below with
309 # any additional values the user has specified.
310 local EPATCH_OPTS=( ${EPATCH_OPTS[*]} )
311 while [[ $# -gt 0 ]] ; do
312 case $1 in
313 -*) EPATCH_OPTS+=( "$1" ) ;;
314 *) break ;;
315 esac
316 shift
317 done
318
296 # Let the rest of the code process one user arg at a time -- 319 # Let the rest of the code process one user arg at a time --
297 # each arg may expand into multiple patches, and each arg may 320 # each arg may expand into multiple patches, and each arg may
298 # need to start off with the default global EPATCH_xxx values 321 # need to start off with the default global EPATCH_xxx values
299 if [[ $# -gt 1 ]] ; then 322 if [[ $# -gt 1 ]] ; then
300 local m 323 local m
333 eerror " ${EPATCH_SOURCE}" 356 eerror " ${EPATCH_SOURCE}"
334 eerror " ( ${EPATCH_SOURCE##*/} )" 357 eerror " ( ${EPATCH_SOURCE##*/} )"
335 echo 358 echo
336 die "Cannot find \$EPATCH_SOURCE!" 359 die "Cannot find \$EPATCH_SOURCE!"
337 fi 360 fi
361
362 # Now that we know we're actually going to apply something, merge
363 # all of the patch options back in to a single variable for below.
364 EPATCH_OPTS="${EPATCH_COMMON_OPTS} ${EPATCH_OPTS[*]}"
338 365
339 local PIPE_CMD 366 local PIPE_CMD
340 case ${EPATCH_SUFFIX##*\.} in 367 case ${EPATCH_SUFFIX##*\.} in
341 xz) PIPE_CMD="xz -dc" ;; 368 xz) PIPE_CMD="xz -dc" ;;
342 lzma) PIPE_CMD="lzma -dc" ;; 369 lzma) PIPE_CMD="lzma -dc" ;;
439 eqawarn " In the future this will cause a failure." 466 eqawarn " In the future this will cause a failure."
440 eqawarn "${rel_paths}" 467 eqawarn "${rel_paths}"
441 fi 468 fi
442 469
443 # Dynamically detect the correct -p# ... i'm lazy, so shoot me :/ 470 # Dynamically detect the correct -p# ... i'm lazy, so shoot me :/
471 local patch_cmd
444 while [[ ${count} -lt 5 ]] ; do 472 while [[ ${count} -lt 5 ]] ; do
473 patch_cmd="${BASH_ALIASES[patch]:-patch} -p${count} ${EPATCH_OPTS}"
474
445 # Generate some useful debug info ... 475 # Generate some useful debug info ...
446 ( 476 (
447 _epatch_draw_line "***** ${patchname} *****" 477 _epatch_draw_line "***** ${patchname} *****"
448 echo 478 echo
449 echo "PATCH COMMAND: patch -p${count} ${EPATCH_OPTS} < '${PATCH_TARGET}'" 479 echo "PATCH COMMAND: ${patch_cmd} < '${PATCH_TARGET}'"
450 echo 480 echo
451 _epatch_draw_line "***** ${patchname} *****" 481 _epatch_draw_line "***** ${patchname} *****"
452 patch -p${count} ${EPATCH_OPTS} --dry-run -f < "${PATCH_TARGET}" 2>&1 482 ${patch_cmd} --dry-run -f < "${PATCH_TARGET}" 2>&1
453 ret=$? 483 ret=$?
454 echo 484 echo
455 echo "patch program exited with status ${ret}" 485 echo "patch program exited with status ${ret}"
456 exit ${ret} 486 exit ${ret}
457 ) >> "${STDERR_TARGET}" 487 ) >> "${STDERR_TARGET}"
461 _epatch_draw_line "***** ${patchname} *****" 491 _epatch_draw_line "***** ${patchname} *****"
462 echo 492 echo
463 echo "ACTUALLY APPLYING ${patchname} ..." 493 echo "ACTUALLY APPLYING ${patchname} ..."
464 echo 494 echo
465 _epatch_draw_line "***** ${patchname} *****" 495 _epatch_draw_line "***** ${patchname} *****"
466 patch -p${count} ${EPATCH_OPTS} < "${PATCH_TARGET}" 2>&1 496 ${patch_cmd} < "${PATCH_TARGET}" 2>&1
467 ret=$? 497 ret=$?
468 echo 498 echo
469 echo "patch program exited with status ${ret}" 499 echo "patch program exited with status ${ret}"
470 exit ${ret} 500 exit ${ret}
471 ) >> "${STDERR_TARGET}" 501 ) >> "${STDERR_TARGET}"
498 eerror " ${STDERR_TARGET}" 528 eerror " ${STDERR_TARGET}"
499 echo 529 echo
500 die "Failed Patch: ${patchname}!" 530 die "Failed Patch: ${patchname}!"
501 fi 531 fi
502 532
503 # if everything worked, delete the patch log 533 # if everything worked, delete the full debug patch log
504 rm -f "${STDERR_TARGET}" 534 rm -f "${STDERR_TARGET}"
535
536 # then log away the exact stuff for people to review later
537 cat <<-EOF >> "${T}/epatch.log"
538 PATCH: ${x}
539 CMD: ${patch_cmd}
540 PWD: ${PWD}
541
542 EOF
505 eend 0 543 eend 0
506 done 544 done
507 545
508 [[ ${SINGLE_PATCH} == "no" ]] && einfo "Done with patching" 546 [[ ${SINGLE_PATCH} == "no" ]] && einfo "Done with patching"
509 : # everything worked 547 : # everything worked
511 549
512# @FUNCTION: epatch_user 550# @FUNCTION: epatch_user
513# @USAGE: 551# @USAGE:
514# @DESCRIPTION: 552# @DESCRIPTION:
515# Applies user-provided patches to the source tree. The patches are 553# Applies user-provided patches to the source tree. The patches are
516# taken from /etc/portage/patches/<CATEGORY>/<PF|P|PN>/, where the first 554# taken from /etc/portage/patches/<CATEGORY>/<PF|P|PN>[:SLOT]/, where the first
517# of these three directories to exist will be the one to use, ignoring 555# of these three directories to exist will be the one to use, ignoring
518# any more general directories which might exist as well. 556# any more general directories which might exist as well. They must end
557# in ".patch" to be applied.
519# 558#
520# User patches are intended for quick testing of patches without ebuild 559# User patches are intended for quick testing of patches without ebuild
521# modifications, as well as for permanent customizations a user might 560# modifications, as well as for permanent customizations a user might
522# desire. Obviously, there can be no official support for arbitrarily 561# desire. Obviously, there can be no official support for arbitrarily
523# patched ebuilds. So whenever a build log in a bug report mentions that 562# patched ebuilds. So whenever a build log in a bug report mentions that
537# autotool input files as well. 576# autotool input files as well.
538epatch_user() { 577epatch_user() {
539 [[ $# -ne 0 ]] && die "epatch_user takes no options" 578 [[ $# -ne 0 ]] && die "epatch_user takes no options"
540 579
541 # Allow multiple calls to this function; ignore all but the first 580 # Allow multiple calls to this function; ignore all but the first
542 local applied="${T}/epatch_user.applied" 581 local applied="${T}/epatch_user.log"
543 [[ -e ${applied} ]] && return 2 582 [[ -e ${applied} ]] && return 2
544 583
545 # don't clobber any EPATCH vars that the parent might want 584 # don't clobber any EPATCH vars that the parent might want
546 local EPATCH_SOURCE check base=${PORTAGE_CONFIGROOT%/}/etc/portage/patches 585 local EPATCH_SOURCE check base=${PORTAGE_CONFIGROOT%/}/etc/portage/patches
547 for check in {${CATEGORY}/${PF},${CATEGORY}/${P},${CATEGORY}/${PN}}; do 586 for check in ${CATEGORY}/{${P}-${PR},${P},${PN}}{,:${SLOT}}; do
548 EPATCH_SOURCE=${base}/${CTARGET}/${check} 587 EPATCH_SOURCE=${base}/${CTARGET}/${check}
549 [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${base}/${CHOST}/${check} 588 [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${base}/${CHOST}/${check}
550 [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${base}/${check} 589 [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${base}/${check}
551 if [[ -d ${EPATCH_SOURCE} ]] ; then 590 if [[ -d ${EPATCH_SOURCE} ]] ; then
552 EPATCH_SOURCE=${EPATCH_SOURCE} \ 591 EPATCH_SOURCE=${EPATCH_SOURCE} \
615# Make a .desktop file. 654# Make a .desktop file.
616# 655#
617# @CODE 656# @CODE
618# binary: what command does the app run with ? 657# binary: what command does the app run with ?
619# name: the name that will show up in the menu 658# name: the name that will show up in the menu
620# icon: give your little like a pretty little icon ... 659# icon: the icon to use in the menu entry
621# this can be relative (to /usr/share/pixmaps) or 660# this can be relative (to /usr/share/pixmaps) or
622# a full path to an icon 661# a full path to an icon
623# type: what kind of application is this? 662# type: what kind of application is this?
624# for categories: 663# for categories:
625# http://standards.freedesktop.org/menu-spec/latest/apa.html 664# http://standards.freedesktop.org/menu-spec/latest/apa.html
639 local catmaj=${CATEGORY%%-*} 678 local catmaj=${CATEGORY%%-*}
640 local catmin=${CATEGORY##*-} 679 local catmin=${CATEGORY##*-}
641 case ${catmaj} in 680 case ${catmaj} in
642 app) 681 app)
643 case ${catmin} in 682 case ${catmin} in
644 accessibility) type=Accessibility;; 683 accessibility) type="Utility;Accessibility";;
645 admin) type=System;; 684 admin) type=System;;
646 antivirus) type=System;; 685 antivirus) type=System;;
647 arch) type=Archiving;; 686 arch) type="Utility;Archiving";;
648 backup) type=Archiving;; 687 backup) type="Utility;Archiving";;
649 cdr) type=DiscBurning;; 688 cdr) type="AudioVideo;DiscBurning";;
650 dicts) type=Dictionary;; 689 dicts) type="Office;Dictionary";;
651 doc) type=Documentation;; 690 doc) type=Documentation;;
652 editors) type=TextEditor;; 691 editors) type="Utility;TextEditor";;
653 emacs) type=TextEditor;; 692 emacs) type="Development;TextEditor";;
654 emulation) type=Emulator;; 693 emulation) type="System;Emulator";;
655 laptop) type=HardwareSettings;; 694 laptop) type="Settings;HardwareSettings";;
656 office) type=Office;; 695 office) type=Office;;
657 pda) type=PDA;; 696 pda) type="Office;PDA";;
658 vim) type=TextEditor;; 697 vim) type="Development;TextEditor";;
659 xemacs) type=TextEditor;; 698 xemacs) type="Development;TextEditor";;
660 esac 699 esac
661 ;; 700 ;;
662 701
663 dev) 702 dev)
664 type="Development" 703 type="Development"
901 insinto /usr/share/applications 940 insinto /usr/share/applications
902 newins "$@" 941 newins "$@"
903 ) 942 )
904} 943}
905 944
906# @FUNCTION: doicon 945# @FUNCTION: _iconins
907# @USAGE: <list of icons> 946# @INTERNAL
908# @DESCRIPTION: 947# @DESCRIPTION:
909# Install the list of icons into the icon directory (/usr/share/pixmaps). 948# function for use in doicon and newicon
910# This is useful in conjunction with creating desktop/menu files. 949_iconins() {
911doicon() {
912 ( 950 (
913 # wrap the env here so that the 'insinto' call 951 # wrap the env here so that the 'insinto' call
914 # doesn't corrupt the env of the caller 952 # doesn't corrupt the env of the caller
915 local i j ret 953 local funcname=$1; shift
916 insinto /usr/share/pixmaps 954 local size dir
917 for i in "$@" ; do 955 local context=apps
918 if [[ -f ${i} ]] ; then 956 local theme=hicolor
919 doins "${i}" 957
920 ((ret+=$?)) 958 while [[ $# -gt 0 ]] ; do
921 elif [[ -d ${i} ]] ; then 959 case $1 in
922 for j in "${i}"/*.png ; do 960 -s|--size)
923 doins "${j}" 961 if [[ ${2%%x*}x${2%%x*} == "$2" ]] ; then
924 ((ret+=$?)) 962 size=${2%%x*}
925 done
926 else 963 else
927 ((++ret)) 964 size=${2}
928 fi 965 fi
929 done
930 exit ${ret}
931 )
932}
933
934# @FUNCTION: newicon
935# @USAGE: <icon> <newname>
936# @DESCRIPTION:
937# Like all other new* functions, install the specified icon as newname.
938newicon() {
939 (
940 # wrap the env here so that the 'insinto' call
941 # doesn't corrupt the env of the caller
942 insinto /usr/share/pixmaps
943 newins "$@"
944 )
945}
946
947# for internal use only (unpack_pdv and unpack_makeself)
948find_unpackable_file() {
949 local src=$1
950 if [[ -z ${src} ]] ; then
951 src=${DISTDIR}/${A}
952 else
953 if [[ -e ${DISTDIR}/${src} ]] ; then
954 src=${DISTDIR}/${src}
955 elif [[ -e ${PWD}/${src} ]] ; then
956 src=${PWD}/${src}
957 elif [[ -e ${src} ]] ; then
958 src=${src}
959 fi
960 fi
961 [[ ! -e ${src} ]] && return 1
962 echo "${src}"
963}
964
965# @FUNCTION: unpack_pdv
966# @USAGE: <file to unpack> <size of off_t>
967# @DESCRIPTION:
968# Unpack those pesky pdv generated files ...
969# They're self-unpacking programs with the binary package stuffed in
970# the middle of the archive. Valve seems to use it a lot ... too bad
971# it seems to like to segfault a lot :(. So lets take it apart ourselves.
972#
973# You have to specify the off_t size ... I have no idea how to extract that
974# information out of the binary executable myself. Basically you pass in
975# the size of the off_t type (in bytes) on the machine that built the pdv
976# archive.
977#
978# One way to determine this is by running the following commands:
979#
980# @CODE
981# strings <pdv archive> | grep lseek
982# strace -elseek <pdv archive>
983# @CODE
984#
985# Basically look for the first lseek command (we do the strings/grep because
986# sometimes the function call is _llseek or something) and steal the 2nd
987# parameter. Here is an example:
988#
989# @CODE
990# vapier@vapier 0 pdv_unpack # strings hldsupdatetool.bin | grep lseek
991# lseek
992# vapier@vapier 0 pdv_unpack # strace -elseek ./hldsupdatetool.bin
993# lseek(3, -4, SEEK_END) = 2981250
994# @CODE
995#
996# Thus we would pass in the value of '4' as the second parameter.
997unpack_pdv() {
998 local src=$(find_unpackable_file "$1")
999 local sizeoff_t=$2
1000
1001 [[ -z ${src} ]] && die "Could not locate source for '$1'"
1002 [[ -z ${sizeoff_t} ]] && die "No idea what off_t size was used for this pdv :("
1003
1004 local shrtsrc=$(basename "${src}")
1005 echo ">>> Unpacking ${shrtsrc} to ${PWD}"
1006 local metaskip=$(tail -c ${sizeoff_t} "${src}" | hexdump -e \"%i\")
1007 local tailskip=$(tail -c $((${sizeoff_t}*2)) "${src}" | head -c ${sizeoff_t} | hexdump -e \"%i\")
1008
1009 # grab metadata for debug reasons
1010 local metafile=$(emktemp)
1011 tail -c +$((${metaskip}+1)) "${src}" > "${metafile}"
1012
1013 # rip out the final file name from the metadata
1014 local datafile=$(tail -c +$((${metaskip}+1)) "${src}" | strings | head -n 1)
1015 datafile=$(basename "${datafile}")
1016
1017 # now lets uncompress/untar the file if need be
1018 local tmpfile=$(emktemp)
1019 tail -c +$((${tailskip}+1)) ${src} 2>/dev/null | head -c 512 > ${tmpfile}
1020
1021 local iscompressed=$(file -b "${tmpfile}")
1022 if [[ ${iscompressed:0:8} == "compress" ]] ; then
1023 iscompressed=1
1024 mv ${tmpfile}{,.Z}
1025 gunzip ${tmpfile}
1026 else
1027 iscompressed=0
1028 fi
1029 local istar=$(file -b "${tmpfile}")
1030 if [[ ${istar:0:9} == "POSIX tar" ]] ; then
1031 istar=1
1032 else
1033 istar=0
1034 fi
1035
1036 #for some reason gzip dies with this ... dd cant provide buffer fast enough ?
1037 #dd if=${src} ibs=${metaskip} count=1 \
1038 # | dd ibs=${tailskip} skip=1 \
1039 # | gzip -dc \
1040 # > ${datafile}
1041 if [ ${iscompressed} -eq 1 ] ; then
1042 if [ ${istar} -eq 1 ] ; then
1043 tail -c +$((${tailskip}+1)) ${src} 2>/dev/null \
1044 | head -c $((${metaskip}-${tailskip})) \
1045 | tar -xzf -
1046 else
1047 tail -c +$((${tailskip}+1)) ${src} 2>/dev/null \
1048 | head -c $((${metaskip}-${tailskip})) \
1049 | gzip -dc \
1050 > ${datafile}
1051 fi
1052 else
1053 if [ ${istar} -eq 1 ] ; then
1054 tail -c +$((${tailskip}+1)) ${src} 2>/dev/null \
1055 | head -c $((${metaskip}-${tailskip})) \
1056 | tar --no-same-owner -xf -
1057 else
1058 tail -c +$((${tailskip}+1)) ${src} 2>/dev/null \
1059 | head -c $((${metaskip}-${tailskip})) \
1060 > ${datafile}
1061 fi
1062 fi
1063 true
1064 #[ -s "${datafile}" ] || die "failure unpacking pdv ('${metaskip}' '${tailskip}' '${datafile}')"
1065 #assert "failure unpacking pdv ('${metaskip}' '${tailskip}' '${datafile}')"
1066}
1067
1068# @FUNCTION: unpack_makeself
1069# @USAGE: [file to unpack] [offset] [tail|dd]
1070# @DESCRIPTION:
1071# Unpack those pesky makeself generated files ...
1072# They're shell scripts with the binary package tagged onto
1073# the end of the archive. Loki utilized the format as does
1074# many other game companies.
1075#
1076# If the file is not specified, then ${A} is used. If the
1077# offset is not specified then we will attempt to extract
1078# the proper offset from the script itself.
1079unpack_makeself() {
1080 local src_input=${1:-${A}}
1081 local src=$(find_unpackable_file "${src_input}")
1082 local skip=$2
1083 local exe=$3
1084
1085 [[ -z ${src} ]] && die "Could not locate source for '${src_input}'"
1086
1087 local shrtsrc=$(basename "${src}")
1088 echo ">>> Unpacking ${shrtsrc} to ${PWD}"
1089 if [[ -z ${skip} ]] ; then
1090 local ver=$(grep -m1 -a '#.*Makeself' "${src}" | awk '{print $NF}')
1091 local skip=0
1092 exe=tail
1093 case ${ver} in 966 case ${size} in
1094 1.5.*|1.6.0-nv) # tested 1.5.{3,4,5} ... guessing 1.5.x series is same 967 16|22|24|32|36|48|64|72|96|128|192|256)
1095 skip=$(grep -a ^skip= "${src}" | cut -d= -f2) 968 size=${size}x${size};;
1096 ;; 969 scalable)
1097 2.0|2.0.1)
1098 skip=$(grep -a ^$'\t'tail "${src}" | awk '{print $2}' | cut -b2-)
1099 ;;
1100 2.1.1)
1101 skip=$(grep -a ^offset= "${src}" | awk '{print $2}' | cut -b2-)
1102 (( skip++ ))
1103 ;;
1104 2.1.2)
1105 skip=$(grep -a ^offset= "${src}" | awk '{print $3}' | head -n 1)
1106 (( skip++ ))
1107 ;;
1108 2.1.3)
1109 skip=`grep -a ^offset= "${src}" | awk '{print $3}'`
1110 (( skip++ ))
1111 ;;
1112 2.1.4|2.1.5)
1113 skip=$(grep -a offset=.*head.*wc "${src}" | awk '{print $3}' | head -n 1)
1114 skip=$(head -n ${skip} "${src}" | wc -c)
1115 exe="dd"
1116 ;; 970 ;;
1117 *) 971 *)
1118 eerror "I'm sorry, but I was unable to support the Makeself file." 972 eerror "${size} is an unsupported icon size!"
1119 eerror "The version I detected was '${ver}'." 973 exit 1;;
1120 eerror "Please file a bug about the file ${shrtsrc} at"
1121 eerror "http://bugs.gentoo.org/ so that support can be added."
1122 die "makeself version '${ver}' not supported"
1123 ;;
1124 esac 974 esac
1125 debug-print "Detected Makeself version ${ver} ... using ${skip} as offset" 975 shift 2;;
1126 fi 976 -t|--theme)
1127 case ${exe} in 977 theme=${2}
1128 tail) exe="tail -n +${skip} '${src}'";; 978 shift 2;;
1129 dd) exe="dd ibs=${skip} skip=1 if='${src}'";; 979 -c|--context)
1130 *) die "makeself cant handle exe '${exe}'" 980 context=${2}
1131 esac 981 shift 2;;
1132
1133 # lets grab the first few bytes of the file to figure out what kind of archive it is
1134 local filetype tmpfile=$(emktemp)
1135 eval ${exe} 2>/dev/null | head -c 512 > "${tmpfile}"
1136 filetype=$(file -b "${tmpfile}") || die
1137 case ${filetype} in
1138 *tar\ archive*)
1139 eval ${exe} | tar --no-same-owner -xf -
1140 ;;
1141 bzip2*)
1142 eval ${exe} | bzip2 -dc | tar --no-same-owner -xf -
1143 ;;
1144 gzip*)
1145 eval ${exe} | tar --no-same-owner -xzf -
1146 ;;
1147 compress*)
1148 eval ${exe} | gunzip | tar --no-same-owner -xf -
1149 ;;
1150 *) 982 *)
1151 eerror "Unknown filetype \"${filetype}\" ?"
1152 false
1153 ;;
1154 esac
1155 assert "failure unpacking (${filetype}) makeself ${shrtsrc} ('${ver}' +${skip})"
1156}
1157
1158# @FUNCTION: cdrom_get_cds
1159# @USAGE: <file on cd1> [file on cd2] [file on cd3] [...]
1160# @DESCRIPTION:
1161# Aquire cd(s) for those lovely cd-based emerges. Yes, this violates
1162# the whole 'non-interactive' policy, but damnit I want CD support !
1163#
1164# With these cdrom functions we handle all the user interaction and
1165# standardize everything. All you have to do is call cdrom_get_cds()
1166# and when the function returns, you can assume that the cd has been
1167# found at CDROM_ROOT.
1168#
1169# The function will attempt to locate a cd based upon a file that is on
1170# the cd. The more files you give this function, the more cds
1171# the cdrom functions will handle.
1172#
1173# Normally the cdrom functions will refer to the cds as 'cd #1', 'cd #2',
1174# etc... If you want to give the cds better names, then just export
1175# the appropriate CDROM_NAME variable before calling cdrom_get_cds().
1176# Use CDROM_NAME for one cd, or CDROM_NAME_# for multiple cds. You can
1177# also use the CDROM_NAME_SET bash array.
1178#
1179# For those multi cd ebuilds, see the cdrom_load_next_cd() function.
1180cdrom_get_cds() {
1181 # first we figure out how many cds we're dealing with by
1182 # the # of files they gave us
1183 local cdcnt=0
1184 local f=
1185 for f in "$@" ; do
1186 ((++cdcnt))
1187 export CDROM_CHECK_${cdcnt}="$f"
1188 done
1189 export CDROM_TOTAL_CDS=${cdcnt}
1190 export CDROM_CURRENT_CD=1
1191
1192 # now we see if the user gave use CD_ROOT ...
1193 # if they did, let's just believe them that it's correct
1194 if [[ -n ${CD_ROOT}${CD_ROOT_1} ]] ; then
1195 local var=
1196 cdcnt=0
1197 while [[ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]] ; do
1198 ((++cdcnt))
1199 var="CD_ROOT_${cdcnt}"
1200 [[ -z ${!var} ]] && var="CD_ROOT"
1201 if [[ -z ${!var} ]] ; then 983 if [[ -z ${size} ]] ; then
1202 eerror "You must either use just the CD_ROOT" 984 insinto /usr/share/pixmaps
1203 eerror "or specify ALL the CD_ROOT_X variables." 985 else
1204 eerror "In this case, you will need ${CDROM_TOTAL_CDS} CD_ROOT_X variables." 986 insinto /usr/share/icons/${theme}/${size}/${context}
1205 die "could not locate CD_ROOT_${cdcnt}"
1206 fi 987 fi
1207 done
1208 export CDROM_ROOT=${CD_ROOT_1:-${CD_ROOT}}
1209 einfo "Found CD #${CDROM_CURRENT_CD} root at ${CDROM_ROOT}"
1210 export CDROM_SET=-1
1211 for f in ${CDROM_CHECK_1//:/ } ; do
1212 ((++CDROM_SET))
1213 [[ -e ${CDROM_ROOT}/${f} ]] && break
1214 done
1215 export CDROM_MATCH=${f}
1216 return
1217 fi
1218 988
1219 # User didn't help us out so lets make sure they know they can 989 if [[ ${funcname} == doicon ]] ; then
1220 # simplify the whole process ...
1221 if [[ ${CDROM_TOTAL_CDS} -eq 1 ]] ; then
1222 einfo "This ebuild will need the ${CDROM_NAME:-cdrom for ${PN}}"
1223 echo
1224 einfo "If you do not have the CD, but have the data files"
1225 einfo "mounted somewhere on your filesystem, just export"
1226 einfo "the variable CD_ROOT so that it points to the"
1227 einfo "directory containing the files."
1228 echo
1229 einfo "For example:"
1230 einfo "export CD_ROOT=/mnt/cdrom"
1231 echo
1232 else
1233 if [[ -n ${CDROM_NAME_SET} ]] ; then
1234 # Translate the CDROM_NAME_SET array into CDROM_NAME_#
1235 cdcnt=0
1236 while [[ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]] ; do
1237 ((++cdcnt))
1238 export CDROM_NAME_${cdcnt}="${CDROM_NAME_SET[$((${cdcnt}-1))]}"
1239 done
1240 fi
1241
1242 einfo "This package will need access to ${CDROM_TOTAL_CDS} cds."
1243 cdcnt=0
1244 while [[ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]] ; do
1245 ((++cdcnt))
1246 var="CDROM_NAME_${cdcnt}"
1247 [[ ! -z ${!var} ]] && einfo " CD ${cdcnt}: ${!var}"
1248 done
1249 echo
1250 einfo "If you do not have the CDs, but have the data files"
1251 einfo "mounted somewhere on your filesystem, just export"
1252 einfo "the following variables so they point to the right place:"
1253 einfon ""
1254 cdcnt=0
1255 while [[ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]] ; do
1256 ((++cdcnt))
1257 echo -n " CD_ROOT_${cdcnt}"
1258 done
1259 echo
1260 einfo "Or, if you have all the files in the same place, or"
1261 einfo "you only have one cdrom, you can export CD_ROOT"
1262 einfo "and that place will be used as the same data source"
1263 einfo "for all the CDs."
1264 echo
1265 einfo "For example:"
1266 einfo "export CD_ROOT_1=/mnt/cdrom"
1267 echo
1268 fi
1269
1270 export CDROM_SET=""
1271 export CDROM_CURRENT_CD=0
1272 cdrom_load_next_cd
1273}
1274
1275# @FUNCTION: cdrom_load_next_cd
1276# @DESCRIPTION:
1277# Some packages are so big they come on multiple CDs. When you're done reading
1278# files off a CD and want access to the next one, just call this function.
1279# Again, all the messy details of user interaction are taken care of for you.
1280# Once this returns, just read the variable CDROM_ROOT for the location of the
1281# mounted CD. Note that you can only go forward in the CD list, so make sure
1282# you only call this function when you're done using the current CD.
1283cdrom_load_next_cd() {
1284 local var
1285 ((++CDROM_CURRENT_CD))
1286
1287 unset CDROM_ROOT
1288 var=CD_ROOT_${CDROM_CURRENT_CD}
1289 [[ -z ${!var} ]] && var="CD_ROOT"
1290 if [[ -z ${!var} ]] ; then 990 if [[ -f $1 ]] ; then
1291 var="CDROM_CHECK_${CDROM_CURRENT_CD}" 991 doins "${1}"
1292 _cdrom_locate_file_on_cd ${!var} 992 elif [[ -d $1 ]] ; then
1293 else 993 shopt -s nullglob
1294 export CDROM_ROOT=${!var} 994 doins "${1}"/*.{png,svg}
1295 fi 995 shopt -u nullglob
1296
1297 einfo "Found CD #${CDROM_CURRENT_CD} root at ${CDROM_ROOT}"
1298}
1299
1300# this is used internally by the cdrom_get_cds() and cdrom_load_next_cd()
1301# functions. this should *never* be called from an ebuild.
1302# all it does is try to locate a give file on a cd ... if the cd isn't
1303# found, then a message asking for the user to insert the cdrom will be
1304# displayed and we'll hang out here until:
1305# (1) the file is found on a mounted cdrom
1306# (2) the user hits CTRL+C
1307_cdrom_locate_file_on_cd() {
1308 local mline=""
1309 local showedmsg=0 showjolietmsg=0
1310
1311 while [[ -z ${CDROM_ROOT} ]] ; do
1312 local i=0
1313 local -a cdset=(${*//:/ })
1314 if [[ -n ${CDROM_SET} ]] ; then
1315 cdset=(${cdset[${CDROM_SET}]})
1316 fi
1317
1318 while [[ -n ${cdset[${i}]} ]] ; do
1319 local dir=$(dirname ${cdset[${i}]})
1320 local file=$(basename ${cdset[${i}]})
1321
1322 local point= node= fs= foo=
1323 while read point node fs foo ; do
1324 [[ " cd9660 iso9660 udf " != *" ${fs} "* ]] && \
1325 ! [[ ${fs} == "subfs" && ",${opts}," == *",fs=cdfss,"* ]] \
1326 && continue
1327 point=${point//\040/ }
1328 [[ ! -d ${point}/${dir} ]] && continue
1329 [[ -z $(find "${point}/${dir}" -maxdepth 1 -iname "${file}") ]] && continue
1330 export CDROM_ROOT=${point}
1331 export CDROM_SET=${i}
1332 export CDROM_MATCH=${cdset[${i}]}
1333 return
1334 done <<< "$(get_mounts)"
1335
1336 ((++i))
1337 done
1338
1339 echo
1340 if [[ ${showedmsg} -eq 0 ]] ; then
1341 if [[ ${CDROM_TOTAL_CDS} -eq 1 ]] ; then
1342 if [[ -z ${CDROM_NAME} ]] ; then
1343 einfo "Please insert+mount the cdrom for ${PN} now !"
1344 else 996 else
1345 einfo "Please insert+mount the ${CDROM_NAME} cdrom now !" 997 eerror "${1} is not a valid file/directory!"
998 exit 1
1346 fi 999 fi
1347 else 1000 else
1348 if [[ -z ${CDROM_NAME_1} ]] ; then 1001 break
1349 einfo "Please insert+mount cd #${CDROM_CURRENT_CD} for ${PN} now !"
1350 else
1351 local var="CDROM_NAME_${CDROM_CURRENT_CD}"
1352 einfo "Please insert+mount the ${!var} cdrom now !"
1353 fi
1354 fi 1002 fi
1355 showedmsg=1 1003 shift 1;;
1356 fi 1004 esac
1357 einfo "Press return to scan for the cd again"
1358 einfo "or hit CTRL+C to abort the emerge."
1359 echo
1360 if [[ ${showjolietmsg} -eq 0 ]] ; then
1361 showjolietmsg=1
1362 else
1363 ewarn "If you are having trouble with the detection"
1364 ewarn "of your CD, it is possible that you do not have"
1365 ewarn "Joliet support enabled in your kernel. Please"
1366 ewarn "check that CONFIG_JOLIET is enabled in your kernel."
1367 ebeep 5
1368 fi
1369 read || die "something is screwed with your system"
1370 done 1005 done
1006 if [[ ${funcname} == newicon ]] ; then
1007 newins "$@"
1008 fi
1009 ) || die
1010}
1011
1012# @FUNCTION: doicon
1013# @USAGE: [options] <icons>
1014# @DESCRIPTION:
1015# Install icon into the icon directory /usr/share/icons or into
1016# /usr/share/pixmaps if "--size" is not set.
1017# This is useful in conjunction with creating desktop/menu files.
1018#
1019# @CODE
1020# options:
1021# -s, --size
1022# !!! must specify to install into /usr/share/icons/... !!!
1023# size of the icon, like 48 or 48x48
1024# supported icon sizes are:
1025# 16 22 24 32 36 48 64 72 96 128 192 256 scalable
1026# -c, --context
1027# defaults to "apps"
1028# -t, --theme
1029# defaults to "hicolor"
1030#
1031# icons: list of icons
1032#
1033# example 1: doicon foobar.png fuqbar.svg suckbar.png
1034# results in: insinto /usr/share/pixmaps
1035# doins foobar.png fuqbar.svg suckbar.png
1036#
1037# example 2: doicon -s 48 foobar.png fuqbar.png blobbar.png
1038# results in: insinto /usr/share/icons/hicolor/48x48/apps
1039# doins foobar.png fuqbar.png blobbar.png
1040# @CODE
1041doicon() {
1042 _iconins ${FUNCNAME} "$@"
1043}
1044
1045# @FUNCTION: newicon
1046# @USAGE: [options] <icon> <newname>
1047# @DESCRIPTION:
1048# Like doicon, install the specified icon as newname.
1049#
1050# @CODE
1051# example 1: newicon foobar.png NEWNAME.png
1052# results in: insinto /usr/share/pixmaps
1053# newins foobar.png NEWNAME.png
1054#
1055# example 2: newicon -s 48 foobar.png NEWNAME.png
1056# results in: insinto /usr/share/icons/hicolor/48x48/apps
1057# newins foobar.png NEWNAME.png
1058# @CODE
1059newicon() {
1060 _iconins ${FUNCNAME} "$@"
1371} 1061}
1372 1062
1373# @FUNCTION: strip-linguas 1063# @FUNCTION: strip-linguas
1374# @USAGE: [<allow LINGUAS>|<-i|-u> <directories of .po files>] 1064# @USAGE: [<allow LINGUAS>|<-i|-u> <directories of .po files>]
1375# @DESCRIPTION: 1065# @DESCRIPTION:
1413 else 1103 else
1414 nols="${nols} ${f}" 1104 nols="${nols} ${f}"
1415 fi 1105 fi
1416 done 1106 done
1417 [[ -n ${nols} ]] \ 1107 [[ -n ${nols} ]] \
1418 && ewarn "Sorry, but ${PN} does not support the LINGUAS:" ${nols} 1108 && einfo "Sorry, but ${PN} does not support the LINGUAS:" ${nols}
1419 export LINGUAS=${newls:1} 1109 export LINGUAS=${newls:1}
1420} 1110}
1421 1111
1422# @FUNCTION: preserve_old_lib 1112# @FUNCTION: preserve_old_lib
1423# @USAGE: <libs to preserve> [more libs] 1113# @USAGE: <libs to preserve> [more libs]
1471 ewarn "the libraries are not being removed. You need to run revdep-rebuild" 1161 ewarn "the libraries are not being removed. You need to run revdep-rebuild"
1472 ewarn "in order to remove these old dependencies. If you do not have this" 1162 ewarn "in order to remove these old dependencies. If you do not have this"
1473 ewarn "helper program, simply emerge the 'gentoolkit' package." 1163 ewarn "helper program, simply emerge the 'gentoolkit' package."
1474 ewarn 1164 ewarn
1475 fi 1165 fi
1476 # temp hack for #348634 #357225
1477 [[ ${PN} == "mpfr" ]] && lib=${lib##*/}
1478 ewarn " # revdep-rebuild --library '${lib}'" 1166 ewarn " # revdep-rebuild --library '${lib}' && rm '${lib}'"
1479 done 1167 done
1480 if [[ ${notice} -eq 1 ]] ; then
1481 ewarn
1482 ewarn "Once you've finished running revdep-rebuild, it should be safe to"
1483 ewarn "delete the old libraries. Here is a copy & paste for the lazy:"
1484 for lib in "$@" ; do
1485 ewarn " # rm '${lib}'"
1486 done
1487 fi
1488} 1168}
1489 1169
1490# @FUNCTION: built_with_use 1170# @FUNCTION: built_with_use
1491# @USAGE: [--hidden] [--missing <action>] [-a|-o] <DEPEND ATOM> <List of USE flags> 1171# @USAGE: [--hidden] [--missing <action>] [-a|-o] <DEPEND ATOM> <List of USE flags>
1492# @DESCRIPTION: 1172# @DESCRIPTION:
1689} 1369}
1690 1370
1691# @FUNCTION: usex 1371# @FUNCTION: usex
1692# @USAGE: <USE flag> [true output] [false output] [true suffix] [false suffix] 1372# @USAGE: <USE flag> [true output] [false output] [true suffix] [false suffix]
1693# @DESCRIPTION: 1373# @DESCRIPTION:
1374# Proxy to declare usex for package managers or EAPIs that do not provide it
1375# and use the package manager implementation when available (i.e. EAPI >= 5).
1694# If USE flag is set, echo [true output][true suffix] (defaults to "yes"), 1376# If USE flag is set, echo [true output][true suffix] (defaults to "yes"),
1695# otherwise echo [false output][false suffix] (defaults to "no"). 1377# otherwise echo [false output][false suffix] (defaults to "no").
1378if has "${EAPI:-0}" 0 1 2 3 4; then
1696usex() { use "$1" && echo "${2-yes}$4" || echo "${3-no}$5" ; } #382963 1379 usex() { use "$1" && echo "${2-yes}$4" || echo "${3-no}$5" ; } #382963
1380fi
1381
1382# @FUNCTION: prune_libtool_files
1383# @USAGE: [--all]
1384# @DESCRIPTION:
1385# Locate unnecessary libtool files (.la) and libtool static archives
1386# (.a) and remove them from installation image.
1387#
1388# By default, .la files are removed whenever the static linkage can
1389# either be performed using pkg-config or doesn't introduce additional
1390# flags.
1391#
1392# If '--all' argument is passed, all .la files are removed. This is
1393# usually useful when the package installs plugins and does not use .la
1394# files for loading them.
1395#
1396# The .a files are only removed whenever corresponding .la files state
1397# that they should not be linked to, i.e. whenever these files
1398# correspond to plugins.
1399#
1400# Note: if your package installs both static libraries and .pc files,
1401# you need to add pkg-config to your DEPEND.
1402prune_libtool_files() {
1403 debug-print-function ${FUNCNAME} "$@"
1404
1405 local removing_all opt
1406 for opt; do
1407 case "${opt}" in
1408 --all)
1409 removing_all=1
1410 ;;
1411 *)
1412 die "Invalid argument to ${FUNCNAME}(): ${opt}"
1413 esac
1414 done
1415
1416 local f
1417 local queue=()
1418 while IFS= read -r -d '' f; do # for all .la files
1419 local archivefile=${f/%.la/.a}
1420
1421 [[ ${f} != ${archivefile} ]] || die 'regex sanity check failed'
1422
1423 # Remove static libs we're not supposed to link against.
1424 if grep -q '^shouldnotlink=yes$' "${f}"; then
1425 if [[ -f ${archivefile} ]]; then
1426 einfo "Removing unnecessary ${archivefile#${D%/}} (static plugin)"
1427 queue+=( "${archivefile}" )
1428 fi
1429
1430 # The .la file may be used by a module loader, so avoid removing it
1431 # unless explicitly requested.
1432 [[ ${removing_all} ]] || continue
1433 fi
1434
1435 # Remove .la files when:
1436 # - user explicitly wants us to remove all .la files,
1437 # - respective static archive doesn't exist,
1438 # - they are covered by a .pc file already,
1439 # - they don't provide any new information (no libs & no flags).
1440 local reason pkgconfig_scanned
1441 if [[ ${removing_all} ]]; then
1442 reason='requested'
1443 elif [[ ! -f ${archivefile} ]]; then
1444 reason='no static archive'
1445 elif [[ ! $(sed -nre \
1446 "s/^(dependency_libs|inherited_linker_flags)='(.*)'$/\2/p" \
1447 "${f}") ]]; then
1448 reason='no libs & flags'
1449 else
1450 if [[ ! ${pkgconfig_scanned} ]]; then
1451 # Create a list of all .pc-covered libs.
1452 local pc_libs=()
1453 if [[ ! ${removing_all} ]]; then
1454 local f
1455 local tf=${T}/prune-lt-files.pc
1456 local pkgconf=$(tc-getPKG_CONFIG)
1457
1458 while IFS= read -r -d '' f; do # for all .pc files
1459 local arg
1460
1461 sed -e '/^Requires:/d' "${f}" > "${tf}"
1462 for arg in $("${pkgconf}" --libs "${tf}"); do
1463 [[ ${arg} == -l* ]] && pc_libs+=( lib${arg#-l}.la )
1464 done
1465 done < <(find "${D}" -type f -name '*.pc' -print0)
1466
1467 rm -f "${tf}"
1468 fi
1469
1470 pkgconfig_scanned=1
1471 fi
1472
1473 has "${f##*/}" "${pc_libs[@]}" && reason='covered by .pc'
1474 fi
1475
1476 if [[ ${reason} ]]; then
1477 einfo "Removing unnecessary ${f#${D%/}} (${reason})"
1478 queue+=( "${f}" )
1479 fi
1480 done < <(find "${D}" -xtype f -name '*.la' -print0)
1481
1482 if [[ ${queue[@]} ]]; then
1483 rm -f "${queue[@]}"
1484 fi
1485}
1697 1486
1698check_license() { die "you no longer need this as portage supports ACCEPT_LICENSE itself"; } 1487check_license() { die "you no longer need this as portage supports ACCEPT_LICENSE itself"; }
1699 1488
1700fi 1489fi

Legend:
Removed from v.1.377  
changed lines
  Added in v.1.407

  ViewVC Help
Powered by ViewVC 1.1.20