diff options
| author | Nibbles 2bits | 2011-12-01 21:35:24 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2011-12-03 07:57:13 -0800 |
| commit | a86caabf5bc5c85bb06ff7d83dac376869f2e4e0 (patch) | |
| tree | aaf484dc34c4b941e37077bedb7673ee483e65b9 | |
| parent | 40d45f04b623c5c410f1adb1be82e602293866b9 (diff) | |
| download | homebrew-a86caabf5bc5c85bb06ff7d83dac376869f2e4e0.tar.bz2 | |
xmoto 0.5.9
This patches tim_png.cpp to include zlib.h on Lion. This
builds and runs well on Lion and Snow Lep with all compilers.
Reported upstream as:
http://todo.xmoto.tuxfamily.org/index.php?do=details&task_id=783
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
| -rw-r--r-- | Library/Formula/xmoto.rb | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/Library/Formula/xmoto.rb b/Library/Formula/xmoto.rb index e07eebc1f..eb412758d 100644 --- a/Library/Formula/xmoto.rb +++ b/Library/Formula/xmoto.rb @@ -1,10 +1,11 @@ require 'formula' class Xmoto < Formula - url 'http://download.tuxfamily.org/xmoto/xmoto/0.5.7/xmoto-0.5.7-src.tar.gz' + url 'http://download.tuxfamily.org/xmoto/xmoto/0.5.9/xmoto-0.5.9-src.tar.gz' homepage 'http://xmoto.tuxfamily.org/' - md5 'c4b8477412445e114843b3b6163937f3' + sha1 '07757accce78151dc8873bef8270df0e56196772' + depends_on 'libxml2' depends_on 'gettext' depends_on 'jpeg' depends_on 'sdl' @@ -14,10 +15,29 @@ class Xmoto < Formula depends_on 'lua' depends_on 'ode' + # Fixes compiling against libpng on Lion. See: + # http://todo.xmoto.tuxfamily.org/index.php?do=details&task_id=783 + def patches + DATA + end + def install - ENV.append "CPPFLAGS", "-I#{include} -I/usr/X11/include" - ENV.append "LDFLAGS", "-framework OpenGL -framework Cocoa -L#{lib} -L/usr/X11/lib -lstdc++ -lSDLmain -lSDL -lSDL_mixer -lpng" - system "./configure", "--prefix=#{prefix}", "--with-internal-xdg=1" + # The ENV.x11 picks up libpng and sets CFLAGS and LDFLAGS + ENV.x11 + system "./configure", "--prefix=#{prefix}", "--with-internal-xdg=1", "--with-apple-opengl-framework" system "make install" end end + +__END__ +diff --git a/src/image/tim_png.cpp b/src/image/tim_png.cpp +index 75fd545..a1d1cf6 100644 +--- a/src/image/tim_png.cpp ++++ b/src/image/tim_png.cpp +@@ -24,6 +24,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + #include <stdio.h> + #include <string.h> ++#include <zlib.h> + #include "tim.h" + #include "png.h"
\ No newline at end of file |
