Skip to content

Commit

Permalink
graphics/art: Add workaround for OpenMP-related crash when OPENMP=yes
Browse files Browse the repository at this point in the history
  • Loading branch information
yurivict committed Jan 21, 2022
1 parent d602137 commit 1ce05fa
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graphics/art/Makefile
@@ -1,5 +1,6 @@
PORTNAME= art
DISTVERSION= 1.12
PORTREVISION= 1
CATEGORIES= graphics
MASTER_SITES= https://bitbucket.org/agriggio/art/downloads/
PKGNAMESUFFIX= -raw-image-editor
Expand Down Expand Up @@ -33,10 +34,9 @@ USE_XORG= x11
EXTRACT_CMD= gtar

OPTIONS_DEFINE= OPENMP
OPTIONS_DEFAULT= # OPENMP
OPTIONS_DEFAULT= OPENMP

OPENMP_CMAKE_BOOL= OPTION_OMP
OPENMP_BROKEN= OpenMP multithreading is broken, see https://bitbucket.org/agriggio/art/issues/227

post-install:
${RM} -r ${STAGEDIR}${PREFIX}/share/doc/ART
Expand Down
13 changes: 13 additions & 0 deletions graphics/art/files/patch-rtgui_main-cli.cc
@@ -0,0 +1,13 @@
- workaround for https://bitbucket.org/agriggio/art/issues/227 caused by https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261360

--- rtgui/main-cli.cc.orig 2022-01-20 17:13:45 UTC
+++ rtgui/main-cli.cc
@@ -121,6 +121,8 @@ std::pair<bool, bool> dontLoadCache(int argc, char **a

int main (int argc, char **argv)
{
+ setenv("LIBOMP_NUM_HIDDEN_HELPER_THREADS", "0", 1);
+
#ifdef WITH_MIMALLOC
mi_version();
#endif
13 changes: 13 additions & 0 deletions graphics/art/files/patch-rtgui_main.cc
@@ -0,0 +1,13 @@
- workaround for https://bitbucket.org/agriggio/art/issues/227 caused by https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261360

--- rtgui/main.cc.orig 2022-01-20 17:14:43 UTC
+++ rtgui/main.cc
@@ -370,6 +370,8 @@ void show_gimp_plugin_info_dialog(Gtk::Window *parent)

int main (int argc, char **argv)
{
+ setenv("LIBOMP_NUM_HIDDEN_HELPER_THREADS", "0", 1);
+
#ifdef WITH_MIMALLOC
mi_version();
#endif

0 comments on commit 1ce05fa

Please sign in to comment.