mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
google-talk-plugin: Enable screen sharing
This commit is contained in:
parent
989c58eb29
commit
2d521d8404
2 changed files with 34 additions and 6 deletions
|
@ -79,13 +79,13 @@ stdenv.mkDerivation rec {
|
|||
$plugins/libnpgtpo3dautoplugin.so
|
||||
|
||||
mkdir -p $out/libexec/google/talkplugin
|
||||
cp opt/google/talkplugin/GoogleTalkPlugin $out/libexec/google/talkplugin/
|
||||
|
||||
cp -prd opt/google/talkplugin/{GoogleTalkPlugin,locale,windowpicker.glade} $out/libexec/google/talkplugin/
|
||||
|
||||
mkdir -p $out/libexec/google/talkplugin/lib
|
||||
cp opt/google/talkplugin/lib/libCg* $out/libexec/google/talkplugin/lib/
|
||||
|
||||
patchelf --set-rpath "$out/libexec/google/talkplugin/lib" \
|
||||
$out/libexec/google/talkplugin/lib/libCgGL.so
|
||||
$out/libexec/google/talkplugin/lib/libCgGL.so
|
||||
|
||||
patchelf \
|
||||
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
|
@ -102,7 +102,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
dontStrip = true;
|
||||
dontPatchELF = true;
|
||||
|
||||
|
||||
passthru.mozillaPlugin = "/lib/mozilla/plugins";
|
||||
|
||||
meta = {
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
|
||||
char origDir [] = "/opt/google/talkplugin/GoogleTalkPlugin";
|
||||
char realDir [] = OUT "/libexec/google/talkplugin/GoogleTalkPlugin";
|
||||
char origDir [] = "/opt/google/talkplugin";
|
||||
char realDir [] = OUT "/libexec/google/talkplugin";
|
||||
|
||||
const char * rewrite(const char * path, char * buf)
|
||||
{
|
||||
|
@ -29,3 +29,31 @@ int execvp(const char * path, char * const argv[])
|
|||
char buf[PATH_MAX];
|
||||
return _execvp(rewrite(path, buf), argv);
|
||||
}
|
||||
|
||||
int open(const char *path, int flags, ...)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
int (*_open) (const char *, int, mode_t) = dlsym(RTLD_NEXT, "open");
|
||||
mode_t mode = 0;
|
||||
if (flags & O_CREAT) {
|
||||
va_list ap;
|
||||
va_start(ap, flags);
|
||||
mode = va_arg(ap, mode_t);
|
||||
va_end(ap);
|
||||
}
|
||||
return _open(rewrite(path, buf), flags, mode);
|
||||
}
|
||||
|
||||
int open64(const char *path, int flags, ...)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
int (*_open64) (const char *, int, mode_t) = dlsym(RTLD_NEXT, "open64");
|
||||
mode_t mode = 0;
|
||||
if (flags & O_CREAT) {
|
||||
va_list ap;
|
||||
va_start(ap, flags);
|
||||
mode = va_arg(ap, mode_t);
|
||||
va_end(ap);
|
||||
}
|
||||
return _open64(rewrite(path, buf), flags, mode);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue