aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2014-10-12 13:40:04 -0500
committerJack Nagel2014-10-12 13:53:23 -0500
commit73b3c4d16409281f61ca7ee6703903aad822d736 (patch)
tree81917aa574253698e0b83eb375b0cceac2a6754f /Library/Formula
parent6e03c4bd3230c4446a2b8a43f0d0d88780bf3122 (diff)
downloadhomebrew-73b3c4d16409281f61ca7ee6703903aad822d736.tar.bz2
optipng: fix 10.10 build
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/optipng.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/Library/Formula/optipng.rb b/Library/Formula/optipng.rb
index 83da8a37b..3091ec7e7 100644
--- a/Library/Formula/optipng.rb
+++ b/Library/Formula/optipng.rb
@@ -6,6 +6,10 @@ class Optipng < Formula
url 'https://downloads.sourceforge.net/project/optipng/OptiPNG/optipng-0.7.5/optipng-0.7.5.tar.gz'
sha1 '30b6c333d74fc0f5dc83004aace252fa3321368b'
+ # Fix compilation on 10.10
+ # http://sourceforge.net/p/optipng/bugs/47/
+ patch :DATA
+
def install
system "./configure", "--with-system-zlib",
"--prefix=#{prefix}",
@@ -13,3 +17,18 @@ class Optipng < Formula
system "make install"
end
end
+
+__END__
+diff --git a/src/optipng/osys.c b/src/optipng/osys.c
+index d816ef7..610250b 100644
+--- a/src/optipng/osys.c
++++ b/src/optipng/osys.c
+@@ -518,7 +518,7 @@ osys_copy_attr(const char *src_path, const char *dest_path)
+ if (chmod(dest_path, sbuf.st_mode) != 0)
+ result = -1;
+
+-#ifdef AT_FDCWD
++#if defined(AT_FDCWD) && !defined(__APPLE__) && !defined(__SVR4) && !defined(__sun)
+ {
+ struct timespec times[2];
+