Index: scripts/mono-find-provides.in =================================================================== --- scripts/mono-find-provides.in (revision 76729) +++ scripts/mono-find-provides.in (working copy) @@ -17,19 +17,15 @@ #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 Index: scripts/mono-find-requires.in =================================================================== --- scripts/mono-find-requires.in (revision 76729) +++ scripts/mono-find-requires.in (working copy) @@ -12,22 +12,29 @@ 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,46 @@ } ') 2> /dev/null done + # Parse the xml .config files to see what native binaries we call into + for i in "${configlist[@]}"; do + awk 'match($_, //dev/null + done ) PROVIDES=$(