$NetBSD: patch-wscript,v 1.8 2022/05/03 07:04:27 nia Exp $ - Enable support for DRM on NetBSD. - Check for OSSv4 features that could not be on some platforms (e.g. NetBSD) --- wscript.orig 2022-01-03 19:45:08.000000000 +0000 +++ wscript @@ -272,6 +272,11 @@ iconv support use --disable-iconv.", 'func': check_statement(['sys/consio.h', 'sys/ioctl.h'], 'int m; ioctl(0, VT_GETMODE, &m)'), }, { + 'name': 'wsdisplay_usl_io.h', + 'desc': 'wsdisplay_usl_io.h', + 'func': check_statement(['sys/types.h', 'dev/wscons/wsdisplay_usl_io.h', 'sys/ioctl.h'], + 'int m; ioctl(0, VT_GETMODE, &m)'), + }, { 'name': 'gbm.h', 'desc': 'gbm.h', 'func': check_cc(header_name=['stdio.h', 'gbm.h']), @@ -432,7 +437,7 @@ audio_output_features = [ }, { 'name': '--oss-audio', 'desc': 'OSSv4 audio output', - 'func': check_statement(['sys/soundcard.h'], 'int x = SNDCTL_DSP_SETPLAYVOL'), + 'func': check_statement(['sys/soundcard.h'], 'int x = SNDCTL_DSP_SETPLAYVOL; int y = SNDCTL_DSP_HALT;'), 'deps': 'posix && gpl', }, { 'name': '--pulse', @@ -490,7 +495,7 @@ video_output_features = [ }, { 'name': '--drm', 'desc': 'DRM', - 'deps': 'vt.h || consio.h', + 'deps': 'vt.h || consio.h || wsdisplay_usl_io.h', 'func': check_pkg_config('libdrm', '>= 2.4.75'), }, { 'name': '--gbm',