x11-wm/xpra: Fix bug 702310 with a sledgehammer
authorAndreas K. Hüttel <dilfridge@gentoo.org>
Thu, 16 Jan 2020 11:30:15 +0000 (12:30 +0100)
committerAndreas K. Hüttel <dilfridge@gentoo.org>
Thu, 16 Jan 2020 11:30:46 +0000 (12:30 +0100)
We don't have the library that it's looking for packaged anyway, so
it doesnt matter whether finding it fails. Make the ldconfig call
go away.

Closes: https://bugs.gentoo.org/702310
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
x11-wm/xpra/files/xpra-3.0.2-ldconfig.patch [new file with mode: 0644]
x11-wm/xpra/xpra-3.0.2.ebuild

diff --git a/x11-wm/xpra/files/xpra-3.0.2-ldconfig.patch b/x11-wm/xpra/files/xpra-3.0.2-ldconfig.patch
new file mode 100644 (file)
index 0000000..8475d47
--- /dev/null
@@ -0,0 +1,33 @@
+diff -ruN xpra-3.0.2.orig/xpra/x11/fakeXinerama.py xpra-3.0.2/xpra/x11/fakeXinerama.py
+--- xpra-3.0.2.orig/xpra/x11/fakeXinerama.py   2019-09-24 15:54:02.000000000 +0200
++++ xpra-3.0.2/xpra/x11/fakeXinerama.py        2020-01-16 12:20:22.620519078 +0100
+@@ -23,29 +23,6 @@
+ def find_libfakeXinerama():
+     libname = "fakeXinerama"
+-    try:
+-        from ctypes.util import find_library
+-        flibname = find_library("fakeXinerama")
+-        if flibname:
+-            libname = flibname
+-    except Exception:
+-        pass
+-    if POSIX:
+-        for lib_dir in os.environ.get("LD_LIBRARY_PATH", "/usr/lib").split(os.pathsep):
+-            lib_path = os.path.join(lib_dir, libname)
+-            if not os.path.exists(lib_dir):
+-                continue
+-            if os.path.exists(lib_path) and os.path.isfile(lib_path):
+-                return lib_path
+-    if LINUX:
+-        try:
+-            libpath = find_lib_ldconfig("fakeXinerama")
+-            if libpath:
+-                return libpath
+-        except Exception as e:
+-            log("find_libfakeXinerama()", exc_info=True)
+-            log.error("Error: cannot launch ldconfig -p to locate libfakeXinerama:")
+-            log.error(" %s", e)
+     return find_lib(libname)
+ current_xinerama_config = None
index 97a0b1489c04ce7bbd22df6a01e47c2388afc097..2d11aede8cae5383dfe934c42b06a7b398872dda 100644 (file)
@@ -86,8 +86,11 @@ DEPEND="${COMMON_DEPEND}
 
 RESTRICT="!test? ( test )"
 
-PATCHES=( "${FILESDIR}"/${PN}-3.0.2_ignore-gentoo-no-compile.patch
-       "${FILESDIR}"/${PN}-2.0-suid-warning.patch )
+PATCHES=(
+       "${FILESDIR}"/${PN}-3.0.2_ignore-gentoo-no-compile.patch
+       "${FILESDIR}"/${PN}-2.0-suid-warning.patch
+       "${FILESDIR}"/${PN}-3.0.2-ldconfig.patch
+)
 
 pkg_postinst() {
        enewgroup ${PN}
@@ -151,9 +154,3 @@ python_configure_all() {
 
        export XPRA_SOCKET_DIRS="${EPREFIX}/run/xpra"
 }
-
-src_compile() {
-       # xpra calls `ldconfig -p` during compile to locate libraries.
-       addpredict /etc
-       distutils-r1_src_compile
-}