Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
graphicsmagick: fix options.
Browse files Browse the repository at this point in the history
Closes #22919.
Closes #22929.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
  • Loading branch information
chdiza authored and MikeMcQuaid committed Oct 1, 2013
1 parent 529ef27 commit 3ab3c10
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions Library/Formula/graphicsmagick.rb
Expand Up @@ -10,6 +10,7 @@ class Graphicsmagick < Formula
option 'with-quantum-depth-16', 'Compile with a quantum depth of 16 bit'
option 'with-quantum-depth-32', 'Compile with a quantum depth of 32 bit'
option 'without-magick-plus-plus', 'disable build/install of Magick++'
option 'with-svg', 'Compile with svg support'

depends_on :libltdl

Expand All @@ -25,11 +26,7 @@ class Graphicsmagick < Formula
depends_on 'little-cms2' => :optional
depends_on 'jasper' => :optional
depends_on 'libwmf' => :optional
depends_on 'librsvg' => :optional
depends_on 'liblqr' => :optional
depends_on 'openexr' => :optional
depends_on 'ghostscript' => :optional
depends_on 'webp' => :optional

opoo '--with-ghostscript is not recommended' if build.with? 'ghostscript'
if build.with? 'openmp' and (MacOS.version == 10.5 or ENV.compiler == :clang)
Expand All @@ -54,11 +51,9 @@ def install
"--with-modules"]

args << "--disable-openmp" unless build.include? 'enable-openmp'
args << "--disable-opencl" if build.include? 'disable-opencl'
args << "--without-gslib" unless build.with? 'ghostscript'
args << "--with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts" unless build.with? 'ghostscript'
args << "--without-magick-plus-plus" if build.without? 'magick-plus-plus'
args << "--enable-hdri=yes" if build.include? 'enable-hdri'

if build.with? 'quantum-depth-32'
quantum_depth = 32
Expand All @@ -69,10 +64,11 @@ def install
end

args << "--with-quantum-depth=#{quantum_depth}" if quantum_depth
args << "--with-rsvg" if build.with? 'librsvg'
args << "--without-x" unless build.with? 'x11'
args << "--with-freetype=yes" if build.with? 'freetype'
args << "--with-webp=yes" if build.include? 'webp'
args << "--without-ttf" if build.without? 'freetype'
args << "--without-xml" unless build.with? 'svg'
args << "--without-lcms" unless build.with? 'little-cms'
args << "--without-lcms2" unless build.with? 'little-cms2'

# versioned stuff in main tree is pointless for us
inreplace 'configure', '${PACKAGE_NAME}-${PACKAGE_VERSION}', '${PACKAGE_NAME}'
Expand Down

2 comments on commit 3ab3c10

@chdiza
Copy link
Contributor Author

@chdiza chdiza commented on 3ab3c10 Oct 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You know, on second thought I'm wondering if maybe the svg stuff should be ON by default, and maybe just unconditionally on. It does, after all, merely link with the system libxml2. Had librsvg been needed, then it would have been good to make it off by default.

@MikeMcQuaid
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeh, sounds like it should be. Will change.

Please sign in to comment.