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() all()
{ {
for METHOD in $METHODS for METHOD in $METHODS
do do
case $METHOD in case $METHOD in
all*|*clean|check) ;; all*|*clean|check) ;;
@ -45,7 +45,7 @@ usage() {
build_sh() { build_sh() {
# Register internal functions last # Register internal functions last
# The empty reg is trickery to get exactly 1 space at each end of the METHODS string # The empty reg is trickery to get exactly 1 space at each end of the METHODS string
reg all reg all
reg reg
# #
local OK=0 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_SVR4_NAME_OVERFLOW]="NAME field exceeds 256 char limit"
error_txt[$E_MISSING_EXE]="Executable is missing" error_txt[$E_MISSING_EXE]="Executable is missing"
##################################################### #####################################################
# Helper functions # Helper functions
##################################################### #####################################################
@ -424,7 +424,7 @@ unpack()
fi fi
} }
# clean(): Scrub build environment # clean(): Scrub build environment
# params: $1=stage|source|distclean # params: $1=stage|source|distclean
clean() clean()
{ {
@ -450,7 +450,7 @@ clean()
# during install # during install
${__rm} -f $metadir/compver.* ${__rm} -f $metadir/compver.*
;; ;;
'meta') 'meta')
if [ "$(${__uname} -s)" == "SunOS" ]; then if [ "$(${__uname} -s)" == "SunOS" ]; then
for secname in $(list_pkgs) for secname in $(list_pkgs)
do do
@ -569,7 +569,7 @@ symlink_man()
fi fi
done done
} }
# fix_man(): create compressed pre-formatted manpages from raw ones # fix_man(): create compressed pre-formatted manpages from raw ones
# params: none # params: none
# Run from 'cwd' where 'cwd' contains manX subdirs # Run from 'cwd' where 'cwd' contains manX subdirs
@ -731,7 +731,7 @@ compute_octal()
d4=$v; v=0 d4=$v; v=0
echo $d1$d2$d3$d4 echo $d1$d2$d3$d4
} }
##################################################### #####################################################
# Define generic functions for different build stages # Define generic functions for different build stages
##################################################### #####################################################
@ -746,7 +746,7 @@ generic_prep()
# needed # needed
get_files get_files
unpack 0 unpack 0
# Verify that ${patch[$pnum]} is defined # Verify that ${patch[$pnum]} is defined
local pver=${patch[0]-'x'} local pver=${patch[0]-'x'}
@ -864,7 +864,7 @@ generic_install()
local arg1=${1-'x'} local arg1=${1-'x'}
if [ "$arg1" != "x" ]; then if [ "$arg1" != "x" ]; then
destvar=$arg1 # $1 was defined destvar=$arg1 # $1 was defined
fi fi
if [ "$custom_install" -eq 0 ]; then if [ "$custom_install" -eq 0 ]; then
clean stage clean stage
if [ "$shortroot" -eq 1 ]; then if [ "$shortroot" -eq 1 ]; then
@ -898,7 +898,7 @@ generic_install_perl()
# remove special files # remove special files
${__find} ${stagedir} -name "perllocal.pod" \ ${__find} ${stagedir} -name "perllocal.pod" \
-o -name ".packlist" \ -o -name ".packlist" \
-o -name "*.bs" \ -o -name "*.bs" \
| ${__xargs} -i rm -f {} | ${__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' distfile='$topdir-$version-$pkgver.tgc-$os-$cpu-$pkgdirdesig.tardist'
##################################################### #####################################################
# Internal helper functions # Internal helper functions
##################################################### #####################################################
indent4=" " indent4=" "
@ -261,7 +261,7 @@ spec_subsys_updates()
{ {
echo "$indent12 updates $1" echo "$indent12 updates $1"
} }
# spec_subsys_footer() # spec_subsys_footer()
# param: none # param: none
spec_subsys_footer() spec_subsys_footer()
@ -296,12 +296,12 @@ fix_fname()
{ {
local name="$1" local name="$1"
local return local return
# Replace ' ' with '_' # Replace ' ' with '_'
return=$(echo $name|${__sed} -e 's/ /_/g') return=$(echo $name|${__sed} -e 's/ /_/g')
echo $return echo $return
} }
# add_files() # add_files()
# Create IDB entries for all files in a specfic product category # Create IDB entries for all files in a specfic product category
# Takes the following parameters # Takes the following parameters
@ -337,7 +337,7 @@ add_files()
IFS=$OIFS IFS=$OIFS
if [ "$defperm" == "-" ]; then if [ "$defperm" == "-" ]; then
permlist=`${__ls} -l "$i" | ${__cut} -d " " -f 1` permlist=`${__ls} -l "$i" | ${__cut} -d " " -f 1`
perm=$(compute_octal $permlist) perm=$(compute_octal $permlist)
else else
perm=$defperm perm=$defperm
fi fi
@ -398,7 +398,7 @@ add_dir()
# This is a workaround # This is a workaround
# Sometimes $topinstalldir:1 returns garbage when topinstalldir=/ # Sometimes $topinstalldir:1 returns garbage when topinstalldir=/
[ "$topinstd" = "/" ] && topinstd="" [ "$topinstd" = "/" ] && topinstd=""
# Note that dir blablah is *not* added to $metadir/files.tmp # Note that dir blablah is *not* added to $metadir/files.tmp
#local FILES=$(${__find} $fspec -type d -print) #local FILES=$(${__find} $fspec -type d -print)
local FILES=$fspec local FILES=$fspec
@ -419,7 +419,7 @@ add_dir()
done done
IFS=$OIFS IFS=$OIFS
} }
# fetch_imageconf(): Fetch a list of toplevel image entries with descriptions # fetch_imageconf(): Fetch a list of toplevel image entries with descriptions
# params: none # params: none
@ -434,7 +434,7 @@ fetch_imageconf()
do do
for ((i=0; i < $numloops; i++)) for ((i=0; i < $numloops; i++))
do do
temp="${pc[$i]%%.*}" temp="${pc[$i]%%.*}"
if [ "$image" == "$temp" ]; then if [ "$image" == "$temp" ]; then
pctop[$pctopidx]=$image pctop[$pctopidx]=$image
pdtop[$pctopidx]=$desc pdtop[$pctopidx]=$desc
@ -450,7 +450,7 @@ fetch_imageconf()
fetch_subsysdesc() fetch_subsysdesc()
{ {
local i=0 local i=0
local numloops=${#pc[@]} local numloops=${#pc[@]}
local ss local ss
local sp local sp
local desc local desc
@ -466,7 +466,7 @@ fetch_subsysdesc()
else else
ps[$i]=$sp ps[$i]=$sp
fi fi
break # Found it, skip to the next line break # Found it, skip to the next line
fi fi
done done
done < $subsysconf done < $subsysconf
@ -519,9 +519,9 @@ fetch_depends()
# from adding deps on the already installed parts. # from adding deps on the already installed parts.
# Internal deps must be handled in depends with the auto keyword # Internal deps must be handled in depends with the auto keyword
# or chaos will ensue. # 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 # package we're building
if [ ! "${reqpkg%%.*}" == "$pkgname" ]; then if [ ! "${reqpkg%%.*}" == "$pkgname" ]; then
req="$reqpkg $reqvers" req="$reqpkg $reqvers"
havedep=1 havedep=1
else else
@ -595,7 +595,7 @@ fetch_ops()
;; ;;
esac esac
opfiles[$opsidx]=$optype opfiles[$opsidx]=$optype
opscript[$opsidx]=$op opscript[$opsidx]=$op
let "opsidx = $opsidx + 1" let "opsidx = $opsidx + 1"
done < $opsfile done < $opsfile
fi fi
@ -612,7 +612,7 @@ do_strip_bin()
echo "strip_bin: $f" echo "strip_bin: $f"
${__strip} $strip_elf_args $f || : ${__strip} $strip_elf_args $f || :
done done
} }
# do_strip_shared(): Strip shared libraries # do_strip_shared(): Strip shared libraries
# params: none # params: none
@ -671,7 +671,7 @@ create_idb()
# We unconditionally assume that relnotes are installed now that we # We unconditionally assume that relnotes are installed now that we
# always use the global template as a fallback in auto_rel # always use the global template as a fallback in auto_rel
local relmetadir=${stagedir}${metainstalldir}relnotes/$topdir-$version-$pkgver local relmetadir=${stagedir}${metainstalldir}relnotes/$topdir-$version-$pkgver
${__mkdir} -p $relmetadir ${__mkdir} -p $relmetadir
echo "" > ${relmetadir}/${topdir}.txt echo "" > ${relmetadir}/${topdir}.txt
add_files "${metaprefix}relnotes" opt.relnotes - root sys "" add_files "${metaprefix}relnotes" opt.relnotes - root sys ""
pc[$pcpos]="opt.relnotes" pc[$pcpos]="opt.relnotes"
@ -766,7 +766,7 @@ create_spec()
reqidlidx=0 reqidlidx=0
for ((j=0; j < $reqsize; j++)) for ((j=0; j < $reqsize; j++))
do do
if [ "${reqs[$j]}" == "${pc[$pcidx]}" ]; then if [ "${reqs[$j]}" == "${pc[$pcidx]}" ]; then
reqidlist[$reqidlidx]=$j reqidlist[$reqidlidx]=$j
let "reqidlidx=$reqidlidx + 1" let "reqidlidx=$reqidlidx + 1"
fi fi
@ -864,7 +864,7 @@ parse_def()
'name') 'name')
name="$(_upls ${line:$equalindex:${#line}})" name="$(_upls ${line:$equalindex:${#line}})"
;; ;;
'pkgver') 'pkgver')
pkgver="$(_upls ${line:$equalindex:${#line}})" pkgver="$(_upls ${line:$equalindex:${#line}})"
;; ;;
'subsys') subsys="$(_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 # rel_conf_sub(): Put configure_args into the relnotes template
# params: none # 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 # substitute %%CONFIGURE%% in the relnotes template at the
# time of expansion. # time of expansion.
rel_conf_sub() rel_conf_sub()
@ -1004,9 +1004,9 @@ rel_conf_sub()
local rn local rn
local i local i
for i in relnotes relnotes.${_os} for i in relnotes relnotes.${_os}
do do
[ -r ${metadir}/${i} ] && rn=$i [ -r ${metadir}/${i} ] && rn=$i
done done
# Duplicated code from auto_rel :( # Duplicated code from auto_rel :(
# compute configure info for relnotes # compute configure info for relnotes
local cf="$(_upls $configure_args)" local cf="$(_upls $configure_args)"
@ -1061,7 +1061,7 @@ auto_rel()
local fullcf="${temp_fullcf%\\*}" local fullcf="${temp_fullcf%\\*}"
# end # end
if [ $mipspro -eq 0 ]; then 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##* }" local compiler="gcc ${compiler_temp##* }"
else # not gcc else # not gcc
if [ "$_os" = "irix53" ]; then if [ "$_os" = "irix53" ]; then
@ -1071,7 +1071,7 @@ auto_rel()
fi fi
if [ "$CXX" = "g++" ]; then if [ "$CXX" = "g++" ]; then
# SGI cc with gnu g++ # 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="$((echo $compiler; echo g++ ${compiler_temp##* }) | ${__awk} '{ printf "%s\\n",$0 }')"
local compiler="${compiler%\\*}" local compiler="${compiler%\\*}"
fi fi
@ -1191,7 +1191,7 @@ auto_dir()
# auto_dist(): Add idb & spec files to stagedir # auto_dist(): Add idb & spec files to stagedir
# params: none # 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 # the stagedir under ${metainstalldir}dist/$topdir-$version-$pkgver
auto_dist() auto_dist()
{ {
@ -1319,7 +1319,7 @@ run_configure()
if [ $check_ac -gt 0 ]; then if [ $check_ac -gt 0 ]; then
local out="$(check_ac warn $configlog)" local out="$(check_ac warn $configlog)"
if [ -n "$out" ]; then if [ -n "$out" ]; then
echo $out echo $out
error $E_BAD_LIBS run_configure error $E_BAD_LIBS run_configure
fi fi
fi fi
@ -1331,7 +1331,7 @@ run_configure()
# in that all paths below will be complete (ie. /usr/local/bin and not # in that all paths below will be complete (ie. /usr/local/bin and not
# just bin). # just bin).
generic_pack() generic_pack()
{ {
if [ "$1" == "shortroot" ]; then if [ "$1" == "shortroot" ]; then
error $E_ARG_OBSO generic_pack error $E_ARG_OBSO generic_pack
fi fi
@ -1366,7 +1366,7 @@ generic_pack()
# If we have a path then we'll need a / appended # If we have a path then we'll need a / appended
[ ! -z "$metaprefix" ] && metaprefix="${metaprefix}/" [ ! -z "$metaprefix" ] && metaprefix="${metaprefix}/"
# We need to add slash to the end of metainstalldir but *only* if # 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 /. # which could happen with metainstalldir=/ if we unconditionally add /.
[ ! "$metainstalldir" == "/" ] && metainstalldir="${metainstalldir}/" [ ! "$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 usescripts=1 # default to add pre/post scripts if available
usespace=1 # default to looking for a space file in $metadir usespace=1 # default to looking for a space file in $metadir
usecompver=1 # default to add compver if available 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) 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 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) 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) # evaluated (using _upls)
distfile='$secname-$version-$secver.tgc-$os-$arch-$pkgdirdesig' distfile='$secname-$version-$secver.tgc-$os-$arch-$pkgdirdesig'
##################################################### #####################################################
# "external" functions # "external" functions
##################################################### #####################################################
@ -318,7 +318,7 @@ add_dir()
local group=$3 local group=$3
local dir=$(_upls $4) local dir=$(_upls $4)
local secname=$5 local secname=$5
if [ "$defperm" == "-" ]; then if [ "$defperm" == "-" ]; then
permlist=$(${__ls} -ld "$dir" | ${__cut} -d " " -f 1) permlist=$(${__ls} -ld "$dir" | ${__cut} -d " " -f 1)
perm=$(compute_octal $permlist) perm=$(compute_octal $permlist)
@ -691,7 +691,7 @@ parse_def()
'name') 'name')
name="$(_upls ${line:$equalindex:${#line}})" name="$(_upls ${line:$equalindex:${#line}})"
;; ;;
'pkgcat') 'pkgcat')
pkgcat="$(_upls ${line:$equalindex:${#line}})" pkgcat="$(_upls ${line:$equalindex:${#line}})"
;; ;;
'pkgvendor') 'pkgvendor')
@ -700,10 +700,10 @@ parse_def()
'pkgdesc'|'shortdesc') 'pkgdesc'|'shortdesc')
pkgdesc="$(_upls ${line:$equalindex:${#line}})" pkgdesc="$(_upls ${line:$equalindex:${#line}})"
;; ;;
'pkgver') 'pkgver')
pkgver="$(_upls ${line:$equalindex:${#line}})" pkgver="$(_upls ${line:$equalindex:${#line}})"
;; ;;
'maxinst') 'maxinst')
maxinst="$(_upls ${line:$equalindex:${#line}})" maxinst="$(_upls ${line:$equalindex:${#line}})"
;; ;;
esac esac
@ -927,7 +927,7 @@ do_strip_static()
${__strip} $strip_static_args $f ${__strip} $strip_static_args $f
done done
} }
##################################################### #####################################################
# Define generic functions for different build stages # Define generic functions for different build stages
##################################################### #####################################################