File: pkg-config.patch

package info (click to toggle)
openmpi 5.0.8-3
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 201,692 kB
  • sloc: ansic: 613,078; makefile: 42,353; sh: 11,194; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,179; python: 1,859; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (43 lines) | stat: -rw-r--r-- 1,709 bytes parent folder | download | duplicates (5)
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
41
42
43
Description: Enable non-gfortran compilation by separating Fortran libs
  Note pkg-config files shipped in arch-dep libopenmpi-dev 
  Don't put FMODDIR in wrapper-data (openmpi-common is arch-indep)
Author: Alastair McKinstry <mckinstry@debian.org>
Last-Updated: 2024-11-15
Forwarded: not-needed

Index: openmpi-5.0.5/ompi/tools/wrappers/ompi-fort.pc.in
===================================================================
--- openmpi-5.0.5.orig/ompi/tools/wrappers/ompi-fort.pc.in
+++ openmpi-5.0.5/ompi/tools/wrappers/ompi-fort.pc.in
@@ -12,8 +12,12 @@ includedir=@includedir@
 libdir=@libdir@
 pkgincludedir=@opalincludedir@
 
-Libs: @OMPI_PC_FC_LIBS@
-Libs.private: @OMPI_PC_FC_LIBS_PRIVATE@
-Cflags: @OMPI_PC_FC_CFLAGS@
+# override $fortran with --define-variable when building on non-gfortran compile
+fortran=gfortran
+flibdir=${libdir}/../../fortran/${fortran}
+Libs:  @OMPI_PC_FC_LIBS@
+Libs.private:  @OMPI_PC_FC_LIBS_PRIVATE@
+
+Cflags: -I${libdir}/../../fortran/gfortran-mod-15/openmpi @OMPI_PC_FC_CFLAGS@
 Requires: @OMPI_PC_MODULES@
 Requires.private: @OMPI_PC_MODULES_PRIVATE@
Index: openmpi-5.0.5/ompi/tools/wrappers/ompi.pc.in
===================================================================
--- openmpi-5.0.5.orig/ompi/tools/wrappers/ompi.pc.in
+++ openmpi-5.0.5/ompi/tools/wrappers/ompi.pc.in
@@ -12,8 +12,8 @@ includedir=@includedir@
 libdir=@libdir@
 pkgincludedir=@opalincludedir@
 
-Libs: @OMPI_PC_LIBS@
-Libs.private: @OMPI_PC_LIBS_PRIVATE@
-Cflags: @OMPI_PC_CFLAGS@
+Libs: @OMPI_PC_FC_LIBS@
+Libs.private: @OMPI_PC_FC_LIBS_PRIVATE@
+Cflags: -I${libdir}/../../fortran/gfortran-mod-15/openmpi @OMPI_PC_CFLAGS@
 Requires: @OMPI_PC_MODULES@
 Requires.private: @OMPI_PC_MODULES_PRIVATE@