commit:     528ae0d10f4c2400dc82620c1c7ea866215b4325
Author:     Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  8 14:59:27 2020 +0000
Commit:     Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
CommitDate: Tue Sep  8 15:00:16 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=528ae0d1

media-radio/wsjtx: Fix compiler flags for OpenMP

Due to the mixed compiler suite - clang/clang++ for c/c++ and gfortran
for fortran files - the ebuild needs different flag settings for OpenMP.

Unfortunately the build system has no clear distinction between the
different set of compiler flags. That gets fixed here.

Closes: https://bugs.gentoo.org/740292
Package-Manager: Portage-3.0.5, Repoman-3.0.1
Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>

 media-radio/wsjtx/files/wsjtx-clang.patch | 20 ++++++++++++++++++++
 media-radio/wsjtx/wsjtx-2.2.2.ebuild      |  3 ++-
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/media-radio/wsjtx/files/wsjtx-clang.patch 
b/media-radio/wsjtx/files/wsjtx-clang.patch
new file mode 100644
index 00000000000..bb6c97a538f
--- /dev/null
+++ b/media-radio/wsjtx/files/wsjtx-clang.patch
@@ -0,0 +1,20 @@
+--- a/CMakeLists.txt   2020-09-08 10:36:55.770304108 +0200
++++ b/CMakeLists.txt   2020-09-08 10:37:28.346406308 +0200
+@@ -1193,7 +1193,7 @@
+   if (OpenMP_C_FLAGS)
+     set_target_properties (wsjt_fort_omp
+       PROPERTIES
+-      COMPILE_FLAGS "${OpenMP_C_FLAGS}"
++      COMPILE_FLAGS "${OpenMP_Fortran_FLAGS}"
+       )
+   endif ()
+   set_target_properties (wsjt_fort_omp
+@@ -1260,7 +1260,7 @@
+     if (OpenMP_C_FLAGS)
+       set_target_properties (jt9
+         PROPERTIES
+-        COMPILE_FLAGS "${OpenMP_C_FLAGS}"
++      COMPILE_FLAGS "${OpenMP_Fortran_FLAGS}"
+         LINK_FLAGS "${OpenMP_C_FLAGS}"
+         )
+     endif ()

diff --git a/media-radio/wsjtx/wsjtx-2.2.2.ebuild 
b/media-radio/wsjtx/wsjtx-2.2.2.ebuild
index 01c2452f0a8..923305c594b 100644
--- a/media-radio/wsjtx/wsjtx-2.2.2.ebuild
+++ b/media-radio/wsjtx/wsjtx-2.2.2.ebuild
@@ -41,7 +41,8 @@ PATCHES=( "${FILESDIR}/${PN}-2.0.1-hamlib.patch"
                  "${FILESDIR}/${PN}-fix-unicode.patch"
                  "${FILESDIR}/${PN}-drop-docs.patch"
                  "${FILESDIR}/${PN}-2.1.2-qt_helpers.patch"
-                 "${FILESDIR}/${PN}-2.2.0-werror.patch" )
+                 "${FILESDIR}/${PN}-2.2.0-werror.patch"
+                 "${FILESDIR}/${PN}-clang.patch" )
 
 DOCS=( AUTHORS BUGS NEWS README THANKS )
 

Reply via email to