From: Wade Berrier Date: Sat, 5 May 2007 08:55:53 +0000 (-0000) Subject: 2007-05-05 Wade Berrier X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;ds=sidebyside;h=c16adb8ea455cc32fe64e0063327337952ede527;p=mono.git 2007-05-05 Wade Berrier * scripts/mono-find-provides.in: don't use 'which' anymore (never solved anything since it broke symlinks) * scripts/mono-find-requires.in: also don't use 'which' Parse .config files to look for native libs. Honor 'os' attributes for dllmaps. Query rpm db for package that provides this lib. Support 64bit rpm configurations, as well as 32bit running on 64bit. svn path=/trunk/mono/; revision=76732 --- diff --git a/ChangeLog b/ChangeLog index c9ea6033517..d5e1f1d0b47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-05-05 Wade Berrier + + * scripts/mono-find-provides.in: don't use 'which' anymore (never solved + anything since it broke symlinks) + * scripts/mono-find-requires.in: also don't use 'which' + Parse .config files to look for native libs. Honor 'os' attributes for + dllmaps. Query rpm db for package that provides this lib. Support 64bit + rpm configurations, as well as 32bit running on 64bit. + 2007-04-27 Marek Habersack * data/net_2_0/web.config: use fully qualified assembly names in diff --git a/scripts/mono-find-provides.in b/scripts/mono-find-provides.in index de468c27e68..ac9d1c83aeb 100644 --- a/scripts/mono-find-provides.in +++ b/scripts/mono-find-provides.in @@ -17,19 +17,15 @@ monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) #monolist=($(printf "%s\n" "${monolist[@]}" | egrep "/gac/")) # Disabled... see ChangeLog -a=`which "$0"` -d=`dirname "$a"` - # Set the prefix, unless it is overriden (used when building mono rpms) -: ${prefix=$d/..} +: ${prefix=@prefix@} -exec_prefix=$d/.. libdir=$prefix/@reloc_libdir@ -bindir=$d +bindir=$prefix/bin # Bail out if monodis or libmono is missing if [ ! -x $bindir/monodis ] || [ ! -f $libdir/libmono.so ] ; then - echo "monodis missing or unusable, exiting..." + echo "monodis missing or unusable, exiting..." 1>&2 exit 1 fi diff --git a/scripts/mono-find-requires.in b/scripts/mono-find-requires.in index 5c9edddf391..02deeeef7e3 100644 --- a/scripts/mono-find-requires.in +++ b/scripts/mono-find-requires.in @@ -12,22 +12,29 @@ IFS=$'\n' filelist=($(grep -Ev '/usr/doc/|/usr/share/doc/')) monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) -a=`which "$0"` -d=`dirname "$a"` +# parse .config files to find which native libraries to depend on +# (target attribute must have double quotes for this to work, ie: target="file" ) +# Add /etc/mono/config ? +configlist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.config\$")) # Set the prefix, unless it is overriden (used when building mono rpms) -: ${prefix=$d/..} +: ${prefix=@prefix@} -exec_prefix=$d/.. libdir=$prefix/@reloc_libdir@ -bindir=$d +bindir=$prefix/bin # Bail out if monodis or libmono is missing if [ ! -x $bindir/monodis ] || [ ! -f $libdir/libmono.so ] ; then - echo "monodis missing or unusable, exiting..." + echo "monodis missing or unusable, exiting..." 1>&2 exit 1 fi +# special case for 64bit archs +if test "x@reloc_libdir@" = "xlib64" ; then + libext="()(64bit)" +else + libext="" +fi # set LD_LIBRARY_PATH to ensure that libmono.so is found export LD_LIBRARY_PATH=$libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} @@ -55,6 +62,47 @@ REQUIRES=$( } ') 2> /dev/null done + # Parse the xml .config files to see what native binaries we call into + # TODO: also check monodis --moduleref + for i in "${configlist[@]}"; do + awk 'match($_, //dev/null + done ) PROVIDES=$(