[45137] trunk/dports/devel/libsdl/Portfile

jeremyhu at macports.org jeremyhu at macports.org
Thu Jan 8 17:25:43 PST 2009


Revision: 45137
          http://trac.macports.org/changeset/45137
Author:   jeremyhu at macports.org
Date:     2009-01-08 17:25:42 -0800 (Thu, 08 Jan 2009)
Log Message:
-----------
libsdl: Fix endianness with universal builds.

Modified Paths:
--------------
    trunk/dports/devel/libsdl/Portfile

Modified: trunk/dports/devel/libsdl/Portfile
===================================================================
--- trunk/dports/devel/libsdl/Portfile	2009-01-08 22:52:09 UTC (rev 45136)
+++ trunk/dports/devel/libsdl/Portfile	2009-01-09 01:25:42 UTC (rev 45137)
@@ -5,7 +5,7 @@
 name            libsdl
 set my_name     SDL
 version         1.2.13
-revision        2
+revision        3
 categories      devel multimedia
 platforms       macosx freebsd
 maintainers     nox openmaintainer
@@ -26,7 +26,10 @@
                 sha1 51fcaa3e1d5c01fd813ea08688780f86b19cf539 \
                 rmd160 ed8825fc98f4b3759cf9e5cf8357d71c50df9925
 
-depends_lib     lib:libX11.6:XFree86
+depends_lib \
+	lib:libXext.6:xorg-libXext \
+	lib:libXrandr.2:xorg-libXrandr \
+	lib:libXrender.1:xrender
 
 configure.args  --enable-shared \
                 --mandir=${prefix}/share/man \
@@ -36,6 +39,29 @@
 
 set docdir      ${prefix}/share/doc/${name}-${version}
 
+post-configure {
+	set sdl_config_h "${worksrcpath}/include/SDL_config.h"
+
+	if {[file exists "${prefix}/lib/libX11.6.dylib"]} {
+		reinplace "/libX11.6.dylib/s|\".*\"|\"${prefix}/lib/libX11.6.dylib\"|" ${sdl_config_h}
+	}
+
+	if {[file exists "${prefix}/lib/libXext.6.dylib"]} {
+		reinplace "/libXext.6.dylib/s|\".*\"|\"${prefix}/lib/libXext.6.dylib\"|" ${sdl_config_h}
+	}
+
+	if {[file exists "${prefix}/lib/libXrandr.2.dylib"]} {
+		reinplace "/libXrandr.2.dylib/s|\".*\"|\"${prefix}/lib/libXrandr.2.dylib\"|" ${sdl_config_h}
+	}
+
+	if {[file exists "${prefix}/lib/libXrender.1.dylib"]} {
+		reinplace "/libXrender.1.dylib/s|\".*\"|\"${prefix}/lib/libXrender.1.dylib\"|" ${sdl_config_h}
+	}
+
+	# For universal, let SDL_endian.h figure out our endianness at compile time
+	reinplace "/SDL_BYTEORDER/d" ${sdl_config_h}
+}
+
 post-destroot {
     xinstall -d ${destroot}${docdir}/html
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090108/dbc26d4c/attachment.html>


More information about the macports-changes mailing list