Merge pull request #26670 from lverns/libreoffice-fix-xdg

libreoffice: fix #25831

authored by Michael Raskin and committed by GitHub fd92d817 4e8d44c2

+35 -5
+2
pkgs/applications/office/libreoffice/default.nix
··· 72 72 configureScript = "./autogen.sh"; 73 73 dontUseCmakeConfigure = true; 74 74 75 + patches = [ ./xdg-open.patch ]; 76 + 75 77 postUnpack = '' 76 78 mkdir -v $sourceRoot/src 77 79 '' + (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)
+8 -5
pkgs/applications/office/libreoffice/still.nix
··· 73 73 dontUseCmakeConfigure = true; 74 74 75 75 # ICU 58, included in 5.3.x 76 - patches = [(fetchurl { 77 - url = "https://gerrit.libreoffice.org/gitweb?p=core.git;a=patch;h=3e42714c76b1347babfdea0564009d8d82a83af4"; 78 - sha256 = "10bid0jdw1rpdsqwzzk3r4rp6bjs2cvi82h7anz2m1amfjdv86my"; 79 - name = "libreoffice-5.2.x-icu4c-58.patch"; 80 - })]; 76 + patches = [ 77 + (fetchurl { 78 + url = "https://gerrit.libreoffice.org/gitweb?p=core.git;a=patch;h=3e42714c76b1347babfdea0564009d8d82a83af4"; 79 + sha256 = "10bid0jdw1rpdsqwzzk3r4rp6bjs2cvi82h7anz2m1amfjdv86my"; 80 + name = "libreoffice-5.2.x-icu4c-58.patch";} 81 + ) 82 + ./xdg-open.patch 83 + ]; 81 84 82 85 postUnpack = '' 83 86 mkdir -v $sourceRoot/src
+25
pkgs/applications/office/libreoffice/xdg-open.patch
··· 1 + diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx 2 + --- a/shell/source/unix/exec/shellexec.cxx 3 + +++ b/shell/source/unix/exec/shellexec.cxx 4 + @@ -150,7 +150,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar 5 + if (std::getenv("LIBO_FLATPAK") != nullptr) { 6 + aBuffer.append("/app/bin/xdg-open"); 7 + } else { 8 + - aBuffer.append("/usr/bin/xdg-open"); 9 + + aBuffer.append("xdg-open"); 10 + } 11 + #endif 12 + aBuffer.append(" "); 13 + diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh 14 + index 4519e01f26e2..8985711a2c01 100755 15 + --- a/shell/source/unix/misc/senddoc.sh 16 + +++ b/shell/source/unix/misc/senddoc.sh 17 + @@ -393,6 +393,8 @@ case `basename "$MAILER" | sed 's/-.*$//'` in 18 + MAILER=/usr/bin/kde-open 19 + elif [ -x /usr/bin/xdg-open ] ; then 20 + MAILER=/usr/bin/xdg-open 21 + + elif type -p xdg-open >/dev/null 2>&1 ; then 22 + + MAILER="$(type -p xdg-open)" 23 + else 24 + echo "Unsupported mail client: `basename $MAILER | sed 's/-.*^//'`" 25 + exit 2