diff options
| author | Patrick McLaughlin | 2012-08-08 22:27:41 -0400 |
|---|---|---|
| committer | Adam Vandenberg | 2012-08-10 07:32:51 -0700 |
| commit | 15bdbb0a8f0621e4a4c086220aae62b3ad75ec05 (patch) | |
| tree | 44ce1cd7596ad92e4ca06055cc9ef0916aaab082 /Library/Formula | |
| parent | 4fa691262c643c61e6659f9cbc346320fa678e23 (diff) | |
| download | homebrew-15bdbb0a8f0621e4a4c086220aae62b3ad75ec05.tar.bz2 | |
tiger-vnc: fix Mountain Lion build
Port patch from fltk to tiger-vnc's internal fltk.
Closes #14070.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/tiger-vnc.rb | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/Library/Formula/tiger-vnc.rb b/Library/Formula/tiger-vnc.rb index 78bfe2b82..32b6d887a 100644 --- a/Library/Formula/tiger-vnc.rb +++ b/Library/Formula/tiger-vnc.rb @@ -11,6 +11,12 @@ class TigerVnc < Formula depends_on 'gettext' depends_on :x11 + # Fix build of included fltk library on Mountain Lion + # http://www.fltk.org/str.php?L2864 + def patches + { :p0 => DATA } + end + def install gettext = Formula.factory('gettext') turbo = Formula.factory('jpeg-turbo') @@ -25,3 +31,54 @@ class TigerVnc < Formula mv (prefix+'man'), share end end + +__END__ +Index: common/fltk/src/filename_list.cxx +=================================================================== +--- common/fltk/src/filename_list.cxx (revision 9648) ++++ common/fltksrc/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: common/fltk/FL/mac.H +=================================================================== +--- common/fltk/FL/mac.H (revision 9648) ++++ common/fltk/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; |
