Ignore:
Timestamp:
Jan 9, 2009, 1:25:42 AM (10 years ago)
Author:
jeremyhu@…
Message:

libsdl: Fix endianness with universal builds.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/devel/libsdl/Portfile

    r36732 r45137  
    66set my_name     SDL
    77version         1.2.13
    8 revision        2
     8revision        3
    99categories      devel multimedia
    1010platforms       macosx freebsd
     
    2727                rmd160 ed8825fc98f4b3759cf9e5cf8357d71c50df9925
    2828
    29 depends_lib     lib:libX11.6:XFree86
     29depends_lib \
     30        lib:libXext.6:xorg-libXext \
     31        lib:libXrandr.2:xorg-libXrandr \
     32        lib:libXrender.1:xrender
    3033
    3134configure.args  --enable-shared \
     
    3639
    3740set docdir      ${prefix}/share/doc/${name}-${version}
     41
     42post-configure {
     43        set sdl_config_h "${worksrcpath}/include/SDL_config.h"
     44
     45        if {[file exists "${prefix}/lib/libX11.6.dylib"]} {
     46                reinplace "/libX11.6.dylib/s|\".*\"|\"${prefix}/lib/libX11.6.dylib\"|" ${sdl_config_h}
     47        }
     48
     49        if {[file exists "${prefix}/lib/libXext.6.dylib"]} {
     50                reinplace "/libXext.6.dylib/s|\".*\"|\"${prefix}/lib/libXext.6.dylib\"|" ${sdl_config_h}
     51        }
     52
     53        if {[file exists "${prefix}/lib/libXrandr.2.dylib"]} {
     54                reinplace "/libXrandr.2.dylib/s|\".*\"|\"${prefix}/lib/libXrandr.2.dylib\"|" ${sdl_config_h}
     55        }
     56
     57        if {[file exists "${prefix}/lib/libXrender.1.dylib"]} {
     58                reinplace "/libXrender.1.dylib/s|\".*\"|\"${prefix}/lib/libXrender.1.dylib\"|" ${sdl_config_h}
     59        }
     60
     61        # For universal, let SDL_endian.h figure out our endianness at compile time
     62        reinplace "/SDL_BYTEORDER/d" ${sdl_config_h}
     63}
    3864
    3965post-destroot {
Note: See TracChangeset for help on using the changeset viewer.