imagemagick: Add "--disable-openmp" option
OpenMP generates a segmentation fault when ImageMagick is called from within a thread (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42616), rendering ImageMagick unusable with popular frameworks such as Ruby on Rails. Signed-off-by: David Höppner <0xffea@gmail.com>
This commit is contained in:
parent
ba3682c101
commit
9a55eda5b4
1 changed files with 7 additions and 2 deletions
|
@ -13,6 +13,10 @@ def use_wmf?
|
|||
ARGV.include? '--use-wmf'
|
||||
end
|
||||
|
||||
def disable_openmp?
|
||||
ARGV.include? '--disable-openmp'
|
||||
end
|
||||
|
||||
def x11?
|
||||
# I used this file because old Xcode seems to lack it, and its that old
|
||||
# Xcode that loads of people seem to have installed still
|
||||
|
@ -43,7 +47,8 @@ class Imagemagick <Formula
|
|||
def options
|
||||
[
|
||||
['--with-ghostscript', 'Compile against ghostscript (not recommended.)'],
|
||||
['--use-wmf', 'Compile with libwmf support.']
|
||||
['--use-wmf', 'Compile with libwmf support.'],
|
||||
['--disable-openmp', 'Disable OpenMP.']
|
||||
]
|
||||
end
|
||||
|
||||
|
@ -60,7 +65,7 @@ class Imagemagick <Formula
|
|||
"--with-modules",
|
||||
"--without-magick-plus-plus" ]
|
||||
|
||||
args << "--disable-openmp" if MACOS_VERSION < 10.6 # libgomp unavailable
|
||||
args << "--disable-openmp" if MACOS_VERSION < 10.6 or disable_openmp?
|
||||
args << "--without-gslib" unless ghostscript_srsly?
|
||||
args << "--with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts" \
|
||||
unless ghostscript_srsly? or ghostscript_fonts?
|
||||
|
|
Loading…
Reference in a new issue