void-packages/srcpkgs/xpra/patches/setup.patch

43 lines
1.8 KiB
Diff

Make sure the build script pulls the right CFLAGS and prevent -Werror. In
addition, remove a stray CUDA README that is only supposed to installed when
CUDA is actually available.
--- a/setup.py
+++ b/setup.py
@@ -750,7 +750,7 @@
#we have to add the python cflags:
if not (is_Fedora() or is_Debian() or is_CentOS() or is_RedHat() or is_AlmaLinux() or is_RockyLinux() or is_OracleLinux() or is_openSUSE()):
import sysconfig
- for cflag in shlex.split(sysconfig.get_config_var('CFLAGS') or ''):
+ for cflag in shlex.split(sysconfig.get_config_var('BUILD_CFLAGS') or ''):
add_to_keywords(kw, 'extra_compile_args', cflag)
def add_tokens(s, add_to="extra_link_args"):
@@ -809,7 +809,7 @@
#as of Cython 0.26 + clang 4.0. Other version combinations may require
#(un)commenting other switches.
if not hascflag("-Wno-error"):
- addcflags("-Werror")
+ addcflags("-Wno-error")
addcflags(
"-Wno-deprecated-register",
"-Wno-unused-command-line-argument",
@@ -823,7 +823,7 @@
)
else:
if not hascflag("-Wno-error"):
- addcflags("-Werror")
+ addcflags("-Wno-error")
if NETBSD:
#see: http://trac.cython.org/ticket/395
addcflags("-fno-strict-aliasing")
@@ -2252,8 +2252,6 @@
if nvjpeg_encoder_ENABLED or nvjpeg_decoder_ENABLED:
add_data_files("", glob.glob(f"{CUDA_BIN_DIR}/nvjpeg64*dll"))
-add_data_files(CUDA_BIN, ["fs/share/xpra/cuda/README.md"])
-
tace(nvenc_ENABLED, "xpra.codecs.nvenc.encoder", "nvenc",
extra_compile_args="-Wno-error=sign-compare" if get_gcc_version()<(8, ) else None)