From a8c5939fbead55052eaab0e424a6c251f5debd94 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sat, 3 Oct 2009 19:05:00 -0700 Subject: Updated formula for xu4 (Ultima 4 engine) It's a lost cause trying to get 1.0beta3 compiling under Snow Leopard, and the trunk already compiles 64-bit clean, so we might as well use that. Note that the DATA patch makes a few changes that are then rewritten by inreplace. Why not patch clean and not run inreplace later? Because I'm going to submit the patch back upstream, which should hopefully allow us to drop it from the formula and only use inreplace to select our build environment (native arch and framework for either 10.5 or 10.6) --- Library/Formula/xu4.rb | 106 +++++++++++++++++++++++++++---------------------- 1 file changed, 58 insertions(+), 48 deletions(-) (limited to 'Library') diff --git a/Library/Formula/xu4.rb b/Library/Formula/xu4.rb index c8e504824..63acdaa91 100644 --- a/Library/Formula/xu4.rb +++ b/Library/Formula/xu4.rb @@ -1,15 +1,17 @@ require 'brewkit' -# See src/doc/xu4MacOSXcvs.txt in the tarball for some explanation class Xu4 = 4.1 - inreplace "imagemgr.h", - "SubImage *ImageMgr::getSubImage(const std::string &name);", - "SubImage *getSubImage(const std::string &name);" - - # Set our prefix - # I don't think this is actually used in the mac build --adamv - inreplace "Makefile", "prefix=/usr/local", "prefix=#{prefix}" - - # Use libpng from the system X11 folder - # These next 2 replaces are pointless but - # I don't want to break the syntax of the Makefile - # by leaving it with trailing \ continuations. - inreplace "Makefile.macosx", - "LIBPNGDIR=../../libpng", "LIBPNGDIR=/usr/X11/lib" - - inreplace "Makefile.macosx", - "-I$(LIBPNGDIR)", "-I/usr/X11/include" - - # Use X11 provided libpng - inreplace "Makefile.macosx", - "$(LIBPNGDIR)/libpng.a", "-lpng" - - # Too bad xu4 doesn't just do #include - # Slot in the SDL include path - inreplace "Makefile.macosx", - "-I/Library/Frameworks/SDL.framework/Headers", - "-I#{sdl_prefix}/include/SDL" - - # Use "lib" versions of SDL, not Frameworks + inreplace "Makefile.macosx", "WHICH_FRAMEWORK=10.4u", "WHICH_FRAMEWORK=#{MACOS_VERSION}" + inreplace "Makefile.macosx", "ARCHES=-arch i386 -arch ppc", "ARCHES=" inreplace "Makefile.macosx", - "-framework SDL", "-lSDL" - - inreplace "Makefile.macosx", - "-framework SDL_mixer", "-lSDL_mixer" + "BUNDLE_CONTENTS=../../xu4.app/Contents", + "BUNDLE_CONTENTS=xu4.app/Contents" - # Fix the u4 zip location inreplace "Makefile.macosx", "../../ultima4.zip", "../ultima4-1.01.zip" inreplace "Makefile.macosx", "../../u4upgrad.zip", "../u4upgrad.zip" - # Build the .app right in the source tree; we've moving it later anyway - inreplace "Makefile.macosx", - "BUNDLE_CONTENTS=../../xu4.app/Contents", - "BUNDLE_CONTENTS=xu4.app/Contents" - system "make -f Makefile.macosx" system "make -f Makefile.macosx install" @@ -85,3 +47,51 @@ class Xu4 >>>>>> eade584... Updated formula for xu4 (Ultima 4 engine) -- cgit v1.2.3