diff options
author | Petr Mladek <pmladek@suse.cz> | 2012-05-03 14:49:36 +0200 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-10-13 12:24:31 +0200 |
commit | 83cef532a748bd9306f961d9cbf9322fd96f34a2 (patch) | |
tree | 91878480285018ab740489031e176ce742631277 /bin | |
parent | a300017101d66971d83065d4e95f6b1a47fe99fb (diff) |
[mono] mono-installation.diff: add mono support
also move mono_loader.*.uno.so into the mono subpackage where it belongs to
Conflicts:
bin/distro-install-file-lists
solenv/gbuild/extensions/post_AuxTargets.mk
Change-Id: I681543edb6a27e16c66badc7e9e11743833f2fe3
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/distro-install-file-lists | 3 | ||||
-rwxr-xr-x | bin/distro-install-mono | 96 |
2 files changed, 98 insertions, 1 deletions
diff --git a/bin/distro-install-file-lists b/bin/distro-install-file-lists index 8bae44286b7b..7fc5fa55f9bf 100755 --- a/bin/distro-install-file-lists +++ b/bin/distro-install-file-lists @@ -254,9 +254,10 @@ if test "z$OOO_VENDOR" != "zDebian" ; then mv_file_between_flists mono_list.txt common_list.txt $INSTALLDIR/ure/lib/cli_.*.dll.config mv_file_between_flists mono_list.txt common_list.txt $INSTALLDIR/ure/lib/policy.*.cli_.*.dll mv_file_between_flists mono_list.txt common_list.txt $INSTALLDIR/ure/lib/libcli_.*.so + mv_file_between_flists mono_list.txt common_list.txt $INSTALLDIR/ure/lib/mono_loader.*.uno.so add_used_directories mono_list.txt common_list.txt # add the files from GAC if it was installed - test -f mono_gac && cat mono_gac >>mono_list.txt + test -f $SRC_ROOT/mono_extra_list.txt && cat $SRC_ROOT/mono_extra_list.txt >>mono_list.txt # postgresql subpackage test -f $DESTDIR/gid_Module_Optional_PostgresqlSdbc && cp $DESTDIR/gid_Module_Optional_PostgresqlSdbc postgresql_list.txt || : diff --git a/bin/distro-install-mono b/bin/distro-install-mono new file mode 100755 index 000000000000..eeaf6634a5f4 --- /dev/null +++ b/bin/distro-install-mono @@ -0,0 +1,96 @@ +#!/bin/sh + +if test -z "${SRC_ROOT}"; then + source ./config_host.mk.source +fi +if test -z "${SOLARENV}"; then + echo "distro-install-mono: No environment set!" + exit 1 +fi + +# continue only when mono has been built +test -f $DESTDIR$INSTALLDIR/program/cli_oootypes.dll || exit 0; + +echo "Finishing the mono installation..." + +if ! test -w "$DESTDIR/" ; then + echo "Warning: You do not have rights to finish the mono installation" + echo " => skipping it" + exit 0; +fi + +# filelist for the GAC stuff +MONOEXTRAFILELIST=mono_extra_list.txt +rm -f $MONOEXTRAFILELIST + +# install the pkgconfig file +# GAC is in /usr/lib even on 64-bit architectures, so the .pc file points to +# the /usr/lib paths; the .pc file itself must be in the arch dependant path +# to be found in PKG_CONFIG_PATH, though +mkdir -p $DESTDIR$LIBDIR/pkgconfig/ +cat >$DESTDIR$LIBDIR/pkgconfig/mono-$INSTALLDIRNAME.pc <<EOT +Name: LibreOffice Mono +Description: LibreOffice bindings for Mono +Version: 1.0 +Libs: -r:/usr/lib/mono/$INSTALLDIRNAME/cli_basetypes.dll -r:/usr/lib/mono/$INSTALLDIRNAME/cli_cppuhelper.dll -r:/usr/lib/mono/$INSTALLDIRNAME/cli_uretypes.dll -r:/usr/lib/mono/$INSTALLDIRNAME/cli_oootypes.dll -r:/usr/lib/mono/$INSTALLDIRNAME/cli_uno_bridge.dll -r:/usr/lib/mono/$INSTALLDIRNAME/cli_ure.dll +EOT +test -n "$DESTDIR" && echo $LIBDIR/pkgconfig/mono-$INSTALLDIRNAME.pc >>$MONOEXTRAFILELIST + +# extra dlls config files +dll=cli_uno_bridge.dll +cat >$DESTDIR$INSTALLDIR/ure/lib/cli_uno_bridge.dll.config <<EOT +<configuration> + <dllmap dll="cli_uno" target="$INSTALLDIR/ure/lib/libcli_uno.so"/> + <dllmap dll="sal" target="$INSTALLDIR/ure/lib/libuno_sal.so.3"/> + <dllmap dll="uno_cppu" target="$INSTALLDIR/ure/lib/libuno_cppu.so.3"/> +</configuration> +EOT +if test -n "$DESTDIR" ; then + file_list=`grep "^$INSTALLDIR/ure/lib/cli_uno_bridge.dll$" $DESTDIR/gid* | head -n 1 | cut -d: -f1` + echo "$INSTALLDIR/ure/lib/cli_uno_bridge.dll.config" >>$file_list +fi +perl -pi -e "s,</configuration>, <dllmap dll=\"cli_uno_glue\" target=\"$INSTALLDIR/ure/lib/libcli_uno_glue.so\"/>\n</configuration>," \ + $DESTDIR$INSTALLDIR/ure/lib/cli_cppuhelper.config + +# install versioned assemblies into the system Global Assembly Cache (GAC) +# to become part of the assemblies that are available for all applications +# at runtime. +if test -z "$DESTDIR" -o -n "$MONO_GAC_ROOT" ; then + test -n "$MONO_GAC_ROOT" && gacutil_root="-root $DESTDIR$MONO_GAC_ROOT" || gacutil_root= + for dll_name in ure/lib/cli_basetypes \ + ure/lib/cli_cppuhelper \ + ure/lib/cli_uretypes \ + program/cli_oootypes \ + ure/lib/cli_uno_bridge \ + ure/lib/cli_ure ; do + # create .config files with correct names + test -f $DESTDIR$INSTALLDIR/$dll_name.config && mv $DESTDIR$INSTALLDIR/$dll_name.config $DESTDIR$INSTALLDIR/$dll_name.dll.config + gacutil $gacutil_root -i $DESTDIR$INSTALLDIR/$dll_name.dll -package $INSTALLDIRNAME || exit 0 + + # the original fixes are not longer needed + rm -f $DESTDIR$INSTALLDIR/$dll_name.dll + rm -f $DESTDIR$INSTALLDIR/$dll_name.dll.config + rm -f $DESTDIR$INSTALLDIR/$dll_name.config + + # remove the deleted fixes from the filelist + if test -n "$DESTDIR" ; then + file_list=`grep "^$INSTALLDIR/$dll_name.dll$" $DESTDIR/gid* | head -n 1 | cut -d: -f1` + test -z "$file_list" && echo "Error: \"$INSTALLDIR/$dll_name.dll\" has not found in any filelist" && exit 1; + sed -e "s|^$INSTALLDIR/$dll_name.dll$||" \ + -e "s|^$INSTALLDIR/$dll_name.dll.config$||" \ + -e "s|^$INSTALLDIR/$dll_name.config$||" \ + $file_list >$file_list.mono + mv $file_list.mono $file_list + fi + done + + # filelist for the GAC + if test -n "$DESTDIR" ; then + for dir in `find $DESTDIR$MONO_GAC_ROOT/mono -type d -regex ".*/cli_[_a-z]*" -o -regex ".*/$INSTALLDIRNAME"` ; do + find $dir -type d | sed "s|^$DESTDIR\(.*\)|%dir \1|" >>$MONOEXTRAFILELIST + find $dir -type f -o -type l | sed "s|^$DESTDIR\(.*\)|\1|" >>$MONOEXTRAFILELIST + done + sort $MONOEXTRAFILELIST >$MONOEXTRAFILELIST.mono + mv $MONOEXTRAFILELIST.mono $MONOEXTRAFILELIST + fi +fi |