diff options
| author | Mike McQuaid | 2012-08-04 09:19:02 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2012-08-04 09:19:29 +0100 |
| commit | 0df5da031a1735bf18c895f4113ba7af3fb695e7 (patch) | |
| tree | 71000cfee6cd4991256b49ab0f6550d35f06ca5f /Library/Formula/fltk.rb | |
| parent | 2c4f73056edb5a4f6414db25bb16c0beea1c7ac0 (diff) | |
| download | homebrew-0df5da031a1735bf18c895f4113ba7af3fb695e7.tar.bz2 | |
fltk: fix Mountain Lion build.
Fixes #13649, fixes #13887.
Diffstat (limited to 'Library/Formula/fltk.rb')
| -rw-r--r-- | Library/Formula/fltk.rb | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/Library/Formula/fltk.rb b/Library/Formula/fltk.rb index 809515192..3e89883c3 100644 --- a/Library/Formula/fltk.rb +++ b/Library/Formula/fltk.rb @@ -19,8 +19,66 @@ class Fltk < Formula cause "http://llvm.org/bugs/show_bug.cgi?id=10338" end + # Fix Mountain Lion build. + # http://www.fltk.org/str.php?L2864 + # Committed upstream as r9649 + def patches + { :p0 => DATA } + end + def install system "./configure", "--prefix=#{prefix}", "--enable-threads" system "make install" end end + +__END__ +Index: src/filename_list.cxx +=================================================================== +--- src/filename_list.cxx (revision 9648) ++++ src/filename_list.cxx (revision 9649) +@@ -22,7 +22,9 @@ + #include <FL/fl_utf8.h> + #include "flstring.h" + #include <stdlib.h> +- ++#ifdef __APPLE__ ++#include <FL/x.H> ++#endif + + extern "C" { + #ifndef HAVE_SCANDIR +@@ -95,7 +97,7 @@ + #ifndef HAVE_SCANDIR + // This version is when we define our own scandir + int n = fl_scandir(dirloc, list, 0, sort); +-#elif defined(HAVE_SCANDIR_POSIX) && !defined(__APPLE__) ++#elif defined(HAVE_SCANDIR_POSIX) + // POSIX (2008) defines the comparison function like this: + int n = scandir(dirloc, list, 0, (int(*)(const dirent **, const dirent **))sort); + #elif defined(__osf__) +Index: FL/mac.H +=================================================================== +--- FL/mac.H (revision 9648) ++++ FL/mac.H (revision 9649) +@@ -149,6 +149,21 @@ + #ifndef MAC_OS_X_VERSION_10_6 + #define MAC_OS_X_VERSION_10_6 1060 + #endif ++#ifndef MAC_OS_X_VERSION_10_7 ++#define MAC_OS_X_VERSION_10_7 1070 ++#endif ++#ifndef MAC_OS_X_VERSION_10_8 ++#define MAC_OS_X_VERSION_10_8 1080 ++#endif ++ ++#if defined(FL_LIBRARY) || defined(FL_INTERNALS) ++#ifdef HAVE_SCANDIR_POSIX ++#undef HAVE_SCANDIR_POSIX ++#endif ++#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8 ++#define HAVE_SCANDIR_POSIX 1 ++#endif ++#endif // FL_LIBRARY || FL_INTERNALS + + typedef CGImageRef Fl_Bitmask; |
