File: dunecontrol-Module-without-CMakeLists.txt-next-to-du.patch

package info (click to toggle)
dune-common 2.10.0-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,824 kB
  • sloc: cpp: 52,256; python: 3,979; sh: 1,658; makefile: 17
file content (40 lines) | stat: -rw-r--r-- 1,474 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From afbd393c513b964315ab16219d8fd261fae6d0be Mon Sep 17 00:00:00 2001
From: Markus Blatt <markus@dr-blatt.de>
Date: Wed, 20 Nov 2024 12:10:33 +0100
Subject: [PATCH] [dunecontrol] Module without CMakeLists.txt next to
 dune.module is installed

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.
---
 lib/dunemodules.lib | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/dunemodules.lib b/lib/dunemodules.lib
index 0d11ffeb5..7ac4383aa 100644
--- a/lib/dunemodules.lib
+++ b/lib/dunemodules.lib
@@ -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
-- 
2.39.5