[75268] trunk/dports/devel/libsdl

jmr at macports.org jmr at macports.org
Wed Jan 19 05:30:35 PST 2011


Revision: 75268
          http://trac.macports.org/changeset/75268
Author:   jmr at macports.org
Date:     2011-01-19 05:30:26 -0800 (Wed, 19 Jan 2011)
Log Message:
-----------
libsdl: fix incorrect reinplaces with +universal, and fix ppc endianness config (#23674)

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

Added Paths:
-----------
    trunk/dports/devel/libsdl/files/include_SDL_config.h.ed

Modified: trunk/dports/devel/libsdl/Portfile
===================================================================
--- trunk/dports/devel/libsdl/Portfile	2011-01-19 12:41:20 UTC (rev 75267)
+++ trunk/dports/devel/libsdl/Portfile	2011-01-19 13:30:26 UTC (rev 75268)
@@ -2,7 +2,6 @@
 # $Id$
 
 PortSystem 1.0
-PortGroup muniversal 1.0
 PortGroup xcodeversion 1.0
 
 conflicts       libsdl-devel
@@ -10,7 +9,7 @@
 name            libsdl
 set my_name     SDL
 version         1.2.14
-revision        8
+revision        9
 categories      devel multimedia
 platforms       macosx freebsd
 maintainers     jmr openmaintainer
@@ -25,7 +24,7 @@
 
 homepage        http://www.libsdl.org/
 master_sites    http://www.libsdl.org/release/
-dist_subdir     ${name}/${version}_${revision}
+dist_subdir     ${name}/${version}_8
 distname        ${my_name}-${version}
 
 checksums           md5     e52086d1b508fa0b76c52ee30b55bec4 \
@@ -58,31 +57,21 @@
 
 use_parallel_build  yes
 
-set docdir      ${prefix}/share/doc/${name}-${version}
-
 post-configure {
-    set sdl_config_h "${worksrcpath}/include/SDL_config.h"
-
+    # not just for universal, ppc endianness detection is also broken
+    system "cd ${worksrcpath} && ed - ./include/SDL_config.h < ${filespath}/include_SDL_config.h.ed"
+    
     if {![variant_isset no_x11]} {
-        if {[file exists "${prefix}/lib/libX11.6.dylib"]} {
-            reinplace "/libX11.6.dylib/s|\".*\"|\"${prefix}/lib/libX11.6.dylib\"|" ${sdl_config_h}
+        set sdl_config_h "${worksrcpath}/include/SDL_config.h"
+        foreach lib {libX11.6 libXext.6 libXrandr.2 libXrender.1} {
+            reinplace "/${lib}.dylib/s|\".*\"|\"${prefix}/lib/${lib}.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}
-        }
     }
 }
 
 post-destroot {
+    set docdir  ${prefix}/share/doc/${name}-${version}
+    
     xinstall -d ${destroot}${docdir}/html
 
     xinstall -m 0644 -W ${worksrcpath} BUGS COPYING CREDITS INSTALL README README-SDL.txt \

Added: trunk/dports/devel/libsdl/files/include_SDL_config.h.ed
===================================================================
--- trunk/dports/devel/libsdl/files/include_SDL_config.h.ed	                        (rev 0)
+++ trunk/dports/devel/libsdl/files/include_SDL_config.h.ed	2011-01-19 13:30:26 UTC (rev 75268)
@@ -0,0 +1,18 @@
+/SDL_BYTEORDER/c
+#ifdef __BIG_ENDIAN__
+#define SDL_BYTEORDER 4321
+#else
+#define SDL_BYTEORDER 1234
+#endif
+.
+/HAVE_ALTIVEC_H/c
+#ifdef __ALTIVEC__
+#define HAVE_ALTIVEC_H 1
+#endif
+.
+/SDL_ALTIVEC_BLITTERS/c
+#ifdef __ALTIVEC__
+#define SDL_ALTIVEC_BLITTERS 1
+#endif
+.
+w
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110119/cfd83419/attachment.html>


More information about the macports-changes mailing list