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

43 lines
1.7 KiB
Diff
Raw Normal View History

2022-12-05 05:28:40 +01:00
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.
--- ./setup.py
+++ ./setup.py
@@ -710,7 +710,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"):
@@ -769,7 +769,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",
@@ -783,7 +783,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")
@@ -2213,8 +2213,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")
toggle_packages(argb_ENABLED, "xpra.codecs.argb")