Remove trailing whitespace

This commit is contained in:
Tom G. Christensen 2012-05-26 10:54:42 +02:00
parent 0c7484d227
commit 09c04aeabb
4 changed files with 43 additions and 43 deletions

View File

@ -26,7 +26,7 @@ reg() {
all()
{
for METHOD in $METHODS
for METHOD in $METHODS
do
case $METHOD in
all*|*clean|check) ;;
@ -45,7 +45,7 @@ usage() {
build_sh() {
# Register internal functions last
# The empty reg is trickery to get exactly 1 space at each end of the METHODS string
reg all
reg all
reg
#
local OK=0

View File

@ -193,7 +193,7 @@ error_txt[$E_SVR4_PKG_OVERFLOW]="PKG field exceeds 9 char limit"
error_txt[$E_SVR4_NAME_OVERFLOW]="NAME field exceeds 256 char limit"
error_txt[$E_MISSING_EXE]="Executable is missing"
#####################################################
#####################################################
# Helper functions
#####################################################
@ -424,7 +424,7 @@ unpack()
fi
}
# clean(): Scrub build environment
# clean(): Scrub build environment
# params: $1=stage|source|distclean
clean()
{
@ -450,7 +450,7 @@ clean()
# during install
${__rm} -f $metadir/compver.*
;;
'meta')
'meta')
if [ "$(${__uname} -s)" == "SunOS" ]; then
for secname in $(list_pkgs)
do
@ -569,7 +569,7 @@ symlink_man()
fi
done
}
# fix_man(): create compressed pre-formatted manpages from raw ones
# params: none
# Run from 'cwd' where 'cwd' contains manX subdirs
@ -731,7 +731,7 @@ compute_octal()
d4=$v; v=0
echo $d1$d2$d3$d4
}
#####################################################
# Define generic functions for different build stages
#####################################################
@ -746,7 +746,7 @@ generic_prep()
# needed
get_files
unpack 0
unpack 0
# Verify that ${patch[$pnum]} is defined
local pver=${patch[0]-'x'}
@ -864,7 +864,7 @@ generic_install()
local arg1=${1-'x'}
if [ "$arg1" != "x" ]; then
destvar=$arg1 # $1 was defined
fi
fi
if [ "$custom_install" -eq 0 ]; then
clean stage
if [ "$shortroot" -eq 1 ]; then
@ -898,7 +898,7 @@ generic_install_perl()
# remove special files
${__find} ${stagedir} -name "perllocal.pod" \
-o -name ".packlist" \
-o -name ".packlist" \
-o -name "*.bs" \
| ${__xargs} -i rm -f {}

View File

@ -144,7 +144,7 @@ META_CLEAN="$topdir.spec $topdir.idb files.tmp ${depends##*/}_auto ${depends##*/
distfile='$topdir-$version-$pkgver.tgc-$os-$cpu-$pkgdirdesig.tardist'
#####################################################
#####################################################
# Internal helper functions
#####################################################
indent4=" "
@ -261,7 +261,7 @@ spec_subsys_updates()
{
echo "$indent12 updates $1"
}
# spec_subsys_footer()
# param: none
spec_subsys_footer()
@ -296,12 +296,12 @@ fix_fname()
{
local name="$1"
local return
# Replace ' ' with '_'
return=$(echo $name|${__sed} -e 's/ /_/g')
echo $return
}
# add_files()
# Create IDB entries for all files in a specfic product category
# Takes the following parameters
@ -337,7 +337,7 @@ add_files()
IFS=$OIFS
if [ "$defperm" == "-" ]; then
permlist=`${__ls} -l "$i" | ${__cut} -d " " -f 1`
perm=$(compute_octal $permlist)
perm=$(compute_octal $permlist)
else
perm=$defperm
fi
@ -398,7 +398,7 @@ add_dir()
# This is a workaround
# Sometimes $topinstalldir:1 returns garbage when topinstalldir=/
[ "$topinstd" = "/" ] && topinstd=""
# Note that dir blablah is *not* added to $metadir/files.tmp
#local FILES=$(${__find} $fspec -type d -print)
local FILES=$fspec
@ -419,7 +419,7 @@ add_dir()
done
IFS=$OIFS
}
# fetch_imageconf(): Fetch a list of toplevel image entries with descriptions
# params: none
@ -434,7 +434,7 @@ fetch_imageconf()
do
for ((i=0; i < $numloops; i++))
do
temp="${pc[$i]%%.*}"
temp="${pc[$i]%%.*}"
if [ "$image" == "$temp" ]; then
pctop[$pctopidx]=$image
pdtop[$pctopidx]=$desc
@ -450,7 +450,7 @@ fetch_imageconf()
fetch_subsysdesc()
{
local i=0
local numloops=${#pc[@]}
local numloops=${#pc[@]}
local ss
local sp
local desc
@ -466,7 +466,7 @@ fetch_subsysdesc()
else
ps[$i]=$sp
fi
break # Found it, skip to the next line
break # Found it, skip to the next line
fi
done
done < $subsysconf
@ -519,9 +519,9 @@ fetch_depends()
# from adding deps on the already installed parts.
# Internal deps must be handled in depends with the auto keyword
# or chaos will ensue.
# We will try to check if the package name in the autodep matches the
# We will try to check if the package name in the autodep matches the
# package we're building
if [ ! "${reqpkg%%.*}" == "$pkgname" ]; then
if [ ! "${reqpkg%%.*}" == "$pkgname" ]; then
req="$reqpkg $reqvers"
havedep=1
else
@ -595,7 +595,7 @@ fetch_ops()
;;
esac
opfiles[$opsidx]=$optype
opscript[$opsidx]=$op
opscript[$opsidx]=$op
let "opsidx = $opsidx + 1"
done < $opsfile
fi
@ -612,7 +612,7 @@ do_strip_bin()
echo "strip_bin: $f"
${__strip} $strip_elf_args $f || :
done
}
}
# do_strip_shared(): Strip shared libraries
# params: none
@ -671,7 +671,7 @@ create_idb()
# We unconditionally assume that relnotes are installed now that we
# always use the global template as a fallback in auto_rel
local relmetadir=${stagedir}${metainstalldir}relnotes/$topdir-$version-$pkgver
${__mkdir} -p $relmetadir
${__mkdir} -p $relmetadir
echo "" > ${relmetadir}/${topdir}.txt
add_files "${metaprefix}relnotes" opt.relnotes - root sys ""
pc[$pcpos]="opt.relnotes"
@ -766,7 +766,7 @@ create_spec()
reqidlidx=0
for ((j=0; j < $reqsize; j++))
do
if [ "${reqs[$j]}" == "${pc[$pcidx]}" ]; then
if [ "${reqs[$j]}" == "${pc[$pcidx]}" ]; then
reqidlist[$reqidlidx]=$j
let "reqidlidx=$reqidlidx + 1"
fi
@ -864,7 +864,7 @@ parse_def()
'name')
name="$(_upls ${line:$equalindex:${#line}})"
;;
'pkgver')
'pkgver')
pkgver="$(_upls ${line:$equalindex:${#line}})"
;;
'subsys') subsys="$(_upls ${line:$equalindex:${#line}})"
@ -996,7 +996,7 @@ auto_src()
# rel_conf_sub(): Put configure_args into the relnotes template
# params: none
# The set_configure_args command will call this function to
# The set_configure_args command will call this function to
# substitute %%CONFIGURE%% in the relnotes template at the
# time of expansion.
rel_conf_sub()
@ -1004,9 +1004,9 @@ rel_conf_sub()
local rn
local i
for i in relnotes relnotes.${_os}
do
do
[ -r ${metadir}/${i} ] && rn=$i
done
done
# Duplicated code from auto_rel :(
# compute configure info for relnotes
local cf="$(_upls $configure_args)"
@ -1061,7 +1061,7 @@ auto_rel()
local fullcf="${temp_fullcf%\\*}"
# end
if [ $mipspro -eq 0 ]; then
local compiler_temp="$(gcc --version 2>&1 | ${__sed} -n '1,1p')"
local compiler_temp="$(gcc --version 2>&1 | ${__sed} -n '1,1p')"
local compiler="gcc ${compiler_temp##* }"
else # not gcc
if [ "$_os" = "irix53" ]; then
@ -1071,7 +1071,7 @@ auto_rel()
fi
if [ "$CXX" = "g++" ]; then
# SGI cc with gnu g++
local compiler_temp="$(g++ --version 2>&1 | ${__sed} -n '1,1p')"
local compiler_temp="$(g++ --version 2>&1 | ${__sed} -n '1,1p')"
local compiler="$((echo $compiler; echo g++ ${compiler_temp##* }) | ${__awk} '{ printf "%s\\n",$0 }')"
local compiler="${compiler%\\*}"
fi
@ -1191,7 +1191,7 @@ auto_dir()
# auto_dist(): Add idb & spec files to stagedir
# params: none
# This will copy the newly created idb & spec files to
# This will copy the newly created idb & spec files to
# the stagedir under ${metainstalldir}dist/$topdir-$version-$pkgver
auto_dist()
{
@ -1319,7 +1319,7 @@ run_configure()
if [ $check_ac -gt 0 ]; then
local out="$(check_ac warn $configlog)"
if [ -n "$out" ]; then
echo $out
echo $out
error $E_BAD_LIBS run_configure
fi
fi
@ -1331,7 +1331,7 @@ run_configure()
# in that all paths below will be complete (ie. /usr/local/bin and not
# just bin).
generic_pack()
{
{
if [ "$1" == "shortroot" ]; then
error $E_ARG_OBSO generic_pack
fi
@ -1366,7 +1366,7 @@ generic_pack()
# If we have a path then we'll need a / appended
[ ! -z "$metaprefix" ] && metaprefix="${metaprefix}/"
# We need to add slash to the end of metainstalldir but *only* if
# metainstalldir is not /. We do this to avoid creating an absolute path
# metainstalldir is not /. We do this to avoid creating an absolute path
# which could happen with metainstalldir=/ if we unconditionally add /.
[ ! "$metainstalldir" == "/" ] && metainstalldir="${metainstalldir}/"

View File

@ -60,7 +60,7 @@ usedepend=1 # default to looking for a depend file in $metadir
usescripts=1 # default to add pre/post scripts if available
usespace=1 # default to looking for a space file in $metadir
usecompver=1 # default to add compver if available in $metadir
ignore_unpackaged_files=0 # default to check for unpackaged files in the stage area
ignore_unpackaged_files=0 # default to check for unpackaged files in the stage area
deps_resolve_symlinks=0 # Set to 1 to resolve symlinks before computing deps (requires GNU readlink)
create_versioned_deps=1 # Set to 1 to create versioned dependencies
version_all_deps=0 # Set to 1 to add version on *all* deps, even SUNW (if enabled)
@ -92,7 +92,7 @@ configure_args='--prefix=$prefix --mandir=${prefix}/${_mandir} --infodir=${prefi
# evaluated (using _upls)
distfile='$secname-$version-$secver.tgc-$os-$arch-$pkgdirdesig'
#####################################################
#####################################################
# "external" functions
#####################################################
@ -318,7 +318,7 @@ add_dir()
local group=$3
local dir=$(_upls $4)
local secname=$5
if [ "$defperm" == "-" ]; then
permlist=$(${__ls} -ld "$dir" | ${__cut} -d " " -f 1)
perm=$(compute_octal $permlist)
@ -691,7 +691,7 @@ parse_def()
'name')
name="$(_upls ${line:$equalindex:${#line}})"
;;
'pkgcat')
'pkgcat')
pkgcat="$(_upls ${line:$equalindex:${#line}})"
;;
'pkgvendor')
@ -700,10 +700,10 @@ parse_def()
'pkgdesc'|'shortdesc')
pkgdesc="$(_upls ${line:$equalindex:${#line}})"
;;
'pkgver')
'pkgver')
pkgver="$(_upls ${line:$equalindex:${#line}})"
;;
'maxinst')
'maxinst')
maxinst="$(_upls ${line:$equalindex:${#line}})"
;;
esac
@ -927,7 +927,7 @@ do_strip_static()
${__strip} $strip_static_args $f
done
}
#####################################################
# Define generic functions for different build stages
#####################################################