Added option for C++ interface

Default behaviour is not to build C++ interface. Option
'--with-magick-plus-plus' added which enables this.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
master
Robbie Shade 2010-12-20 17:11:43 +00:00 committed by Adam Vandenberg
parent 0e71d91e79
commit 1b6654ef87
1 changed files with 8 additions and 3 deletions

View File

@ -23,6 +23,10 @@ def disable_openmp?
ARGV.include? '--disable-openmp'
end
def magick_plus_plus?
ARGV.include? '--with-magick-plus-plus'
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
@ -57,7 +61,8 @@ class Imagemagick <Formula
[
['--with-ghostscript', 'Compile against ghostscript (not recommended.)'],
['--use-wmf', 'Compile with libwmf support.'],
['--disable-openmp', 'Disable OpenMP.']
['--disable-openmp', 'Disable OpenMP.'],
['--with-magick-plus-plus', 'Compile with C++ interface.']
]
end
@ -71,13 +76,13 @@ class Imagemagick <Formula
"--disable-dependency-tracking",
"--enable-shared",
"--disable-static",
"--with-modules",
"--without-magick-plus-plus" ]
"--with-modules"]
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?
args << "--without-magic-plus-plus" unless magick_plus_plus?
# versioned stuff in main tree is pointless for us
inreplace 'configure', '${PACKAGE_NAME}-${PACKAGE_VERSION}', '${PACKAGE_NAME}'