Merge pull request #9785 from khumba/jitsi-rpath-fix
jitsi: patch RPATHs for missing libraries
This commit is contained in:
commit
c6cadd11db
@ -1,4 +1,7 @@
|
||||
{ stdenv, fetchurl, makeDesktopItem, unzip, ant, jdk }:
|
||||
{ stdenv, lib, fetchurl, makeDesktopItem, unzip, ant, jdk
|
||||
# Optional, Jitsi still runs without, but you may pass null:
|
||||
, alsaLib, dbus_libs, gtk2, libpulseaudio, openssl, xlibs
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
@ -22,6 +25,21 @@ stdenv.mkDerivation rec {
|
||||
categories = "Application;Internet;";
|
||||
};
|
||||
|
||||
libPath = lib.makeLibraryPath ([
|
||||
stdenv.cc.cc # For libstdc++.
|
||||
] ++ lib.filter (x: x != null) [
|
||||
alsaLib
|
||||
dbus_libs
|
||||
gtk2
|
||||
libpulseaudio
|
||||
openssl
|
||||
] ++ lib.optionals (xlibs != null) [
|
||||
xlibs.libX11
|
||||
xlibs.libXext
|
||||
xlibs.libXScrnSaver
|
||||
xlibs.libXv
|
||||
]);
|
||||
|
||||
buildInputs = [unzip ant jdk];
|
||||
|
||||
buildPhase = ''ant make'';
|
||||
@ -33,8 +51,14 @@ stdenv.mkDerivation rec {
|
||||
mkdir $out/bin
|
||||
cp resources/install/generic/run.sh $out/bin/jitsi
|
||||
chmod +x $out/bin/jitsi
|
||||
sed -i 's| java | ${jdk}/bin/java |' $out/bin/jitsi
|
||||
substituteInPlace $out/bin/jitsi --replace '@JAVA@' '${jdk}/bin/java'
|
||||
patchShebangs $out
|
||||
|
||||
libPath="$libPath:${jdk.jre.home}/lib/${jdk.architecture}"
|
||||
find $out/ -type f -name '*.so' | while read file; do
|
||||
patchelf --set-rpath "$libPath" "$file" && \
|
||||
patchelf --shrink-rpath "$file"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
@ -42,6 +66,7 @@ stdenv.mkDerivation rec {
|
||||
description = "Open Source Video Calls and Chat";
|
||||
license = stdenv.lib.licenses.lgpl21Plus.shortName;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = [ stdenv.lib.maintainers.khumba ];
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -24,4 +24,4 @@
|
||||
|
||||
export PATH=$PATH:native
|
||||
-java $CLIENTARGS -classpath "lib/felix.jar:sc-bundles/sc-launcher.jar:sc-bundles/util.jar:lib/" -Djava.library.path=native -Dfelix.config.properties=file:./lib/felix.client.run.properties -Djava.util.logging.config.file=lib/logging.properties net.java.sip.communicator.launcher.SIPCommunicator
|
||||
+exec java $CLIENTARGS -classpath "lib/felix.jar:sc-bundles/sc-launcher.jar:sc-bundles/util.jar:lib/" -Djava.library.path=$NATIVELIBS -Dfelix.config.properties=file:lib/felix.client.run.properties -Djava.util.logging.config.file=lib/logging.properties net.java.sip.communicator.launcher.SIPCommunicator
|
||||
+exec @JAVA@ $CLIENTARGS -classpath "lib/felix.jar:sc-bundles/sc-launcher.jar:sc-bundles/util.jar:lib/" -Djava.library.path=$NATIVELIBS -Dfelix.config.properties=file:lib/felix.client.run.properties -Djava.util.logging.config.file=lib/logging.properties net.java.sip.communicator.launcher.SIPCommunicator
|
||||
|
@ -5,6 +5,18 @@
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
/**
|
||||
* The JRE libraries are in directories that depend on the CPU.
|
||||
*/
|
||||
architecture =
|
||||
if stdenv.system == "i686-linux" then
|
||||
"i386"
|
||||
else if stdenv.system == "x86_64-linux" then
|
||||
"amd64"
|
||||
else
|
||||
throw "openjdk requires i686-linux or x86_64 linux";
|
||||
|
||||
update = "60";
|
||||
build = "24";
|
||||
baseurl = "http://hg.openjdk.java.net/jdk8u/jdk8u";
|
||||
@ -204,6 +216,9 @@ let
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
||||
passthru.home = "${openjdk8}/lib/openjdk";
|
||||
passthru = {
|
||||
inherit architecture;
|
||||
home = "${openjdk8}/lib/openjdk";
|
||||
};
|
||||
};
|
||||
in openjdk8
|
||||
|
Loading…
Reference in New Issue
Block a user