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

Commit

Permalink
Imagemagick: patch for xml2-config
Browse files Browse the repository at this point in the history
Imagemagick-6.7.x uses libxml2, but Apple changed the file
`xml2-config` starting in Mt. Lion, removing the `--prefix` flag.
That breaks Imagemagick, which uses it to find the library.
Because all versions of OSX have libxml2 in the same location,
this commit is safe for all users.

* Patch `configure` to not run `xml2-config --prefix` by placing
the value it returns, `/usr`, into the corresonding variable.

Fixes #11789.
Closes #11883.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • Loading branch information
nibbles 2bits authored and jacknagel committed May 6, 2012
1 parent 69b9823 commit a3f66cd
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Library/Formula/imagemagick.rb
Expand Up @@ -84,6 +84,13 @@ def skip_clean? path
path.extname == '.la'
end

def patches
# Fixes xml2-config that can be missing --prefix. See issue #11789
# Remove if the final Mt. Lion xml2-config supports --prefix.
# Not reporting this upstream until the final Mt. Lion is released.
DATA
end

def options
[
['--with-ghostscript', 'Compile against ghostscript (not recommended.)'],
Expand Down Expand Up @@ -148,3 +155,16 @@ def test
system "#{bin}/identify", "/Library/Application Support/Apple/iChat Icons/Flags/Argentina.gif"
end
end

__END__
--- a/configure 2012-02-25 09:03:23.000000000 -0800
+++ b/configure 2012-04-26 03:32:15.000000000 -0700
@@ -31924,7 +31924,7 @@
# Debian installs libxml headers under /usr/include/libxml2/libxml with
# the shared library installed under /usr/lib, whereas the package
# installs itself under $prefix/libxml and $prefix/lib.
- xml2_prefix=`xml2-config --prefix`
+ xml2_prefix=/usr
if test -d "${xml2_prefix}/include/libxml2"; then
CPPFLAGS="$CPPFLAGS -I${xml2_prefix}/include/libxml2"
fi

0 comments on commit a3f66cd

Please sign in to comment.