File: skip-if-no-config-i2c.patch

package info (click to toggle)
ddcci-driver-linux 0.4.2-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 336 kB
  • sloc: ansic: 1,790; makefile: 123; sh: 3
file content (14 lines) | stat: -rw-r--r-- 507 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Description: Skip the build if CONFIG_I2C is disabled
Author: Stephen Kitt <skitt@debian.org>

--- a/dkms.conf
+++ b/dkms.conf
@@ -14,3 +14,8 @@
   echo "BACKLIGHT_CLASS_DEVICE disabled in this kernel, not building module." >&2
   BUILD_EXCLUSIVE_ARCH="^do_not_build$"
 fi
+# Don't build module when I2C is disabled
+if ! grep -q "^CONFIG_I2C=[ym]$" "$kernel_source_dir/.config" 2>/dev/null ; then
+  echo "I2C disabled in this kernel, not building module." >&2
+  BUILD_EXCLUSIVE_ARCH="^do_not_build$"
+fi