summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Haustein <mario.haustein@hrz.tu-chemnitz.de>2023-03-24 18:39:33 +0100
committerSam James <sam@gentoo.org>2023-03-25 04:05:51 +0000
commite46f341c307105de27df5f04c715433d25f1d3bd (patch)
tree091f3320dbe06d0ba668f13d4e888b4049d54798 /sci-astronomy
parentdev-util/codespell: drop 2.2.1 (diff)
downloadgentoo-e46f341c307105de27df5f04c715433d25f1d3bd.tar.gz
gentoo-e46f341c307105de27df5f04c715433d25f1d3bd.tar.bz2
gentoo-e46f341c307105de27df5f04c715433d25f1d3bd.zip
sci-astronomy/siril: fix build without OpenMP
Closes: https://bugs.gentoo.org/902833 Signed-off-by: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de> Closes: https://github.com/gentoo/gentoo/pull/30333 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-astronomy')
-rw-r--r--sci-astronomy/siril/files/siril-1.2-openmp.patch19
-rw-r--r--sci-astronomy/siril/siril-1.2.0_beta1.ebuild1
2 files changed, 20 insertions, 0 deletions
diff --git a/sci-astronomy/siril/files/siril-1.2-openmp.patch b/sci-astronomy/siril/files/siril-1.2-openmp.patch
new file mode 100644
index 000000000000..eba90448f422
--- /dev/null
+++ b/sci-astronomy/siril/files/siril-1.2-openmp.patch
@@ -0,0 +1,19 @@
+From: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
+Date: Fri, 24 Mar 2023 18:24:26 +0100
+Subject: [PATCH] Add ifdef around openmp function
+Bug: https://bugs.gentoo.org/902833
+Upstream: https://gitlab.com/free-astro/siril/-/merge_requests/482
+
+--- a/src/algos/quantize.c
++++ b/src/algos/quantize.c
+@@ -1396,8 +1396,10 @@ row of the image.
+ #pragma omp parallel num_threads(threads) if (threads>1)
+ #endif
+ {
++#ifdef _OPENMP
+ if (threads > 1 && omp_get_num_threads() != threads)
+ siril_debug_print("actual number of threads: %d of %d requested (level %d)\n", omp_get_num_threads(), threads, omp_get_level());
++#endif
+ float *rowpix, v1;
+ double mean, stdev;
+ float *differences;
diff --git a/sci-astronomy/siril/siril-1.2.0_beta1.ebuild b/sci-astronomy/siril/siril-1.2.0_beta1.ebuild
index 45dd80e9e5b2..e02693c80ab7 100644
--- a/sci-astronomy/siril/siril-1.2.0_beta1.ebuild
+++ b/sci-astronomy/siril/siril-1.2.0_beta1.ebuild
@@ -54,6 +54,7 @@ PATCHES=(
"${FILESDIR}/${PN}-$(ver_cut 1-2)-htmesh.patch"
"${FILESDIR}/${PN}-$(ver_cut 1-2)-execinfo.patch"
"${FILESDIR}/${PN}-$(ver_cut 1-2)-prototypes.patch"
+ "${FILESDIR}/${PN}-$(ver_cut 1-2)-openmp.patch"
)
DOCS=( README.md NEWS ChangeLog AUTHORS )