libreoffice: fix #25831

Thanks to Linus Heckemann <git@sphalerite.org> for creating the patch.
This commit is contained in:
Laverne Schrock 2017-06-16 17:14:22 -05:00
parent ba9c71b999
commit 16118fede5
3 changed files with 35 additions and 5 deletions

View File

@ -72,6 +72,8 @@ in stdenv.mkDerivation rec {
configureScript = "./autogen.sh";
dontUseCmakeConfigure = true;
patches = [ ./xdg-open.patch ];
postUnpack = ''
mkdir -v $sourceRoot/src
'' + (stdenv.lib.concatMapStrings (f: "ln -sfv ${f} $sourceRoot/src/${f.md5 or f.outputHash}-${f.name}\nln -sfv ${f} $sourceRoot/src/${f.name}\n") srcs.third_party)

View File

@ -73,11 +73,14 @@ in stdenv.mkDerivation rec {
dontUseCmakeConfigure = true;
# ICU 58, included in 5.3.x
patches = [(fetchurl {
patches = [
(fetchurl {
url = "https://gerrit.libreoffice.org/gitweb?p=core.git;a=patch;h=3e42714c76b1347babfdea0564009d8d82a83af4";
sha256 = "10bid0jdw1rpdsqwzzk3r4rp6bjs2cvi82h7anz2m1amfjdv86my";
name = "libreoffice-5.2.x-icu4c-58.patch";
})];
name = "libreoffice-5.2.x-icu4c-58.patch";}
)
./xdg-open.patch
];
postUnpack = ''
mkdir -v $sourceRoot/src

View File

@ -0,0 +1,25 @@
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -150,7 +150,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
if (std::getenv("LIBO_FLATPAK") != nullptr) {
aBuffer.append("/app/bin/xdg-open");
} else {
- aBuffer.append("/usr/bin/xdg-open");
+ aBuffer.append("xdg-open");
}
#endif
aBuffer.append(" ");
diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh
index 4519e01f26e2..8985711a2c01 100755
--- a/shell/source/unix/misc/senddoc.sh
+++ b/shell/source/unix/misc/senddoc.sh
@@ -393,6 +393,8 @@ case `basename "$MAILER" | sed 's/-.*$//'` in
MAILER=/usr/bin/kde-open
elif [ -x /usr/bin/xdg-open ] ; then
MAILER=/usr/bin/xdg-open
+ elif type -p xdg-open >/dev/null 2>&1 ; then
+ MAILER="$(type -p xdg-open)"
else
echo "Unsupported mail client: `basename $MAILER | sed 's/-.*^//'`"
exit 2