[PATCH] [dunecontrol] Module without CMakeLists.txt next to dune.module is installed
authorMarkus Blatt <markus@dr-blatt.de>
Wed, 20 Nov 2024 11:10:33 +0000 (12:10 +0100)
committerMarkus Blatt <markus@dr-blatt.de>
Fri, 22 Nov 2024 14:28:16 +0000 (15:28 +0100)
The decision whether a module is installed is usually based on whether
pkgconfig was able to find it. If the DUNE module does not ship  a
pkgconf file or pkgconf is missing, then dunecontrol tries to build
this installed modules, too. That fails miserably.

With this commit we add a check at the end that checks whether
there is a CMakeLists.txt file in the source directory of the
module. This directory is where the dune.module file was found. If
there is none we also assume that the module is installed and do not
try to build it.

Gbp-Pq: Name dunecontrol-Module-without-CMakeLists.txt-next-to-du.patch

lib/dunemodules.lib

index 0d11ffeb57d3bc928d44c7ecb5055e6cb8a547db..7ac4383aa70aecae3fb8148f39f368d73e1c3104 100644 (file)
@@ -99,6 +99,12 @@ parse_control() {
       module_inst="yes"
     fi
   fi
+  # Mark modules as installed if there is no CMakeLists.txt in path
+  # Not that path is where the dune.module file is located.
+  if test "$module_inst" = "no" && ! test -e "$path/CMakeLists.txt"; then
+    module_inst="yes"
+  fi
+
   # avoid multiple definition of the same module
   if eval test "x\$HAVE_$module" != "x"; then
     # make sure we don't stumble over the same module twice