Ticket #25266: patch-MPlayer-1.0rc4.diff

File patch-MPlayer-1.0rc4.diff, 11.7 KB (added by raimue (Rainer Müller), 14 years ago)

proposed patch

  • files/configure.x11.patch

     
    1 --- configure.orig      2009-04-22 21:48:59.000000000 -0700
    2 +++ configure   2009-04-22 21:58:17.000000000 -0700
    3 @@ -3859,22 +3859,27 @@ echocheck "X11 headers presence"
    4    for I in `echo $_inc_extra | sed s/-I//g` /usr/include ; do
    5      if test -f "$I/X11/Xlib.h" ; then
    6        _x11_headers="yes"
    7 -      _res_comment=""
    8 -      break
    9 -    fi
    10 -  done
    11 -  for I in /usr/X11/include /usr/X11R6/include /usr/include/X11R6 /usr/openwin/include ; do
    12 -    if test -f "$I/X11/Xlib.h" ; then
    13 -      _inc_extra="$_inc_extra -I$I"
    14 -      _x11_headers="yes"
    15        _res_comment="using $I"
    16        break
    17      fi
    18    done
    19 +  if test $_x11_headers = "no" ; then
    20 +    for I in /usr/X11/include /usr/X11R6/include /usr/include/X11R6 /usr/openwin/include ; do
    21 +      if test -f "$I/X11/Xlib.h" ; then
    22 +        _inc_extra="$_inc_extra -I$I"
    23 +        _x11_headers="yes"
    24 +        _res_comment="using $I"
    25 +        break
    26 +      fi
    27 +    done
    28 +  fi
    29  echores "$_x11_headers"
     1--- configure.orig      2010-07-29 02:31:57.000000000 +0200
     2+++ configure   2011-01-31 23:29:54.000000000 +0100
     3@@ -4373,6 +4373,9 @@
    304 
    315 
    326 echocheck "X11"
    337+if test "$_x11" = yes ; then
    34 _libs_mplayer="$_libs_mplayer -lXext -lX11"
     8libs_mplayer="$libs_mplayer -lXext -lX11"
    359+fi
    3610 if test "$_x11" = auto && test "$_x11_headers" = yes ; then
    3711   cat > $TMPC <<EOF
    3812 #include <X11/Xlib.h>
    39 @@ -6232,6 +6237,7 @@ fi
     13@@ -7104,6 +7107,7 @@
    4014 if test "$_qtx" = yes ; then
    41      _def_qtx='#define USE_QTX_CODECS 1'
    42      _codecmodules="qtx $_codecmodules"
    43 +    _ld_extra="$_ld_extra -framework QuickTime -framework Carbon"
     15     def_qtx='#define CONFIG_QTX_CODECS 1'
     16     win32 && _qtx_codecs_win32=yes && def_qtx_win32='#define CONFIG_QTX_CODECS_WIN32 1'
     17+    darwin && extra_ldflags="$extra_ldflags -framework Carbon -framework QuickTime" && def_quicktime='#define CONFIG_QUICKTIME 1'
     18     codecmodules="qtx $codecmodules"
     19     darwin || win32 || _qtx_emulation=yes
    4420 else
    45      _def_qtx='#undef USE_QTX_CODECS'
    46      _nocodecmodules="qtx $_nocodecmodules"
  • files/gl_dlsym.patch

     
    1 --- libvo/gl_common.c.bak       2009-04-23 02:09:43.000000000 -0700
    2 +++ libvo/gl_common.c   2009-04-23 02:10:18.000000000 -0700
    3 @@ -1547,7 +1547,7 @@ static void *getdladdr(const char *s) {
    4      handle = dlopen(NULL, RTLD_LAZY);
    5    return dlsym(handle, s);
    6  #else
    7 -  return dlsym(0, s);
    8 +  return dlsym(RTLD_DEFAULT, s);
    9  #endif
    10  #else
    11    return NULL;
  • files/qt.x11.patch

     
    1 --- libmpcodecs/ad_qtaudio.c.orig       2009-04-22 22:21:46.000000000 -0700
    2 +++ libmpcodecs/ad_qtaudio.c    2009-04-22 22:21:53.000000000 -0700
    3 @@ -5,6 +5,12 @@
    4  
    5  #include "config.h"
    6  
    7 +#ifndef MACOSX
    8 +#ifdef __APPLE__
    9 +#define MACOSX
    10 +#endif
    11 +#endif
    12 +
    13  #ifdef MACOSX
    14  #include <QuickTime/QuickTimeComponents.h>
    15  #endif
    16 --- libmpcodecs/vd_qtvideo.c.orig       2009-04-22 22:20:34.000000000 -0700
    17 +++ libmpcodecs/vd_qtvideo.c    2009-04-22 22:21:15.000000000 -0700
    18 @@ -4,6 +4,12 @@
    19  
    20  #include "config.h"
    21  
    22 +#ifndef MACOSX
    23 +#ifdef __APPLE__
    24 +#define MACOSX
    25 +#endif
    26 +#endif
    27 +
    28  #ifdef MACOSX
    29  #include <QuickTime/ImageCodec.h>
    30  #define dump_ImageDescription(x)
  • Portfile

     
    55PortSystem          1.0
    66
    77name                MPlayer
    8 version             1.0rc2
    9 revision            10
     8version             1.0rc4
    109categories          multimedia
    1110maintainers         ecronin \
    1211                    openmaintainer
     
    3231                http://www1.mplayerhq.hu/MPlayer/releases/codecs/:codecs \
    3332                http://www2.mplayerhq.hu/MPlayer/releases/codecs/:codecs
    3433patch_sites     http://www.mplayerhq.hu/MPlayer/patches/
    35 patchfiles      stream_cddb_fix_20080120.diff \
    36                 url_fix_20080120.diff \
    37                 demux_mov_fix_20080129.diff \
    38                 demux_audio_fix_20080129.diff \
    39                 configure.x11.patch \
    40                 qt.x11.patch \
    41                 gl_dlsym.patch
     34patchfiles      configure.x11.patch
    4235use_bzip2       yes
    4336checksums       ${distname}${extract.suffix} \
    44                     md5 7e27e535c2d267637df34898f1b91707 \
    45                     sha1 e9b496f3527c552004ec6d01d6b43f196b43ce2d \
    46                     rmd160 3b5cba1529856a177a5191e22f8dcc00b5a83c52 \
    47                 stream_cddb_fix_20080120.diff \
    48                     md5 c7d1bcdd61fcceb7598d61fe2213c587 \
    49                     sha1 8d901c7a88fa120ed26492e741e1ae0fbe57e12d \
    50                     rmd160 92999593ff6dfbb8c05f5c9f15efa992193030df \
    51                 url_fix_20080120.diff \
    52                     md5 6a2c124586e1e6c44ae4ca1b4be9b6e4 \
    53                     sha1 1e92ded6f27bf07601fa318e24ec468fe225ffe5 \
    54                     rmd160 82b0ed4f4213767474c8ea7b011237caa24fc604 \
    55                 demux_mov_fix_20080129.diff \
    56                     md5 ce999929155f509a3e6bee41d9d613ed \
    57                     sha1 a17d82baff58e8cc569365341503273956fd26c8 \
    58                     rmd160 69a71376ee817983d400fffde8e5c689156de50f \
    59                 demux_audio_fix_20080129.diff \
    60                     md5 320af7daa1b248ee8e8c15d34d7923e3 \
    61                     sha1 e25ba7d8d696d9c6365f105134ba723404adb4e1 \
    62                     rmd160 68a98b6110b22c4f590f48a2464ba21af7f7faa0
    63 
     37                    sha1    36dfaeda726896b6831d66b0fe179623e0385fbe \
     38                    rmd160  f112c53e43143d6f02850ee3d8326e25e7396cff \
    6439livecheck.type      regex
    6540#livecheck.url       http://www1.mplayerhq.hu/MPlayer/releases/
    6641livecheck.url       http://www1.mplayerhq.hu/design7/dload.html
     
    6843
    6944
    7045depends_lib     port:jpeg port:lame port:libiconv port:libmad \
    71                 port:libogg port:libpng path:include/gif_lib.h:giflib \
    72                 port:libtheora port:libvorbis port:lzo2 port:ncurses \
    73                 port:zlib
    74 depends_build   port:pkgconfig
     46                port:libogg port:libpng port:libtheora port:libvorbis \
     47                port:lzo2 port:ncurses port:zlib port:bzip2
     48depends_build   port:pkgconfig port:yasm
    7549
    7650# MPlayer's ./configure REALLY does not want you to use ENV for this
    7751configure.cflags    {}
     
    8862universal_variant no
    8963
    9064configure.args \
    91         --with-extraincdir=${prefix}/include/lzo:${prefix}/include \
    92         --with-extralibdir=${prefix}/lib:${prefix}/lib/samba3 \
    93         --datadir=${prefix}/share/${name} \
    94         --confdir=${prefix}/etc/${name} \
    95         --mandir=${prefix}/share/man \
    96         --enable-gif --enable-png --enable-jpeg --enable-liblzo \
    97         --enable-theora --enable-libvorbis --enable-mad \
    98         --disable-faad-external --enable-largefiles
     65    --extra-cflags="-I${prefix}/include/lzo -I${prefix}/include" \
     66    --extra-ldflags="-L${prefix}/lib -L${prefix}/lib/samba3" \
     67    --datadir=${prefix}/share/${name} \
     68    --confdir=${prefix}/etc/${name} \
     69    --mandir=${prefix}/share/man \
     70    --enable-png --enable-jpeg --enable-liblzo \
     71    --enable-theora --enable-libvorbis --enable-mad \
     72    --enable-largefiles
    9973
    10074# MPlayer autodetects many support libs.  To prevent undeclared
    10175# dependencies, explicitly disable everything optional first.
    10276# Later, let autodetect do its magic not explicit --enable
    10377configure.args-append \
    104         --disable-smb --disable-live --disable-dvdnav \
    105         --disable-dvdread --disable-cdparanoia --disable-freetype \
    106         --disable-fontconfig --disable-unrarlib --disable-fribidi \
    107         --disable-enca --disable-libcdio --disable-xvid \
    108         --disable-x264 --disable-speex \
    109         --disable-faac --disable-ladspa --disable-libdv \
    110         --disable-toolame --disable-twolame --disable-xmms \
    111         --disable-musepack --disable-sdl --disable-aa \
    112         --disable-caca --disable-x11 --disable-gl --disable-arts \
    113         --disable-esd --disable-lirc
     78    --disable-smb --disable-live --disable-dvdnav \
     79    --disable-dvdread --disable-cdparanoia --disable-freetype \
     80    --disable-fontconfig --disable-fribidi \
     81    --disable-enca --disable-libcdio --disable-xvid \
     82    --disable-x264 --disable-speex \
     83    --disable-faac --disable-libdv \
     84    --disable-toolame --disable-twolame --disable-xmms \
     85    --disable-musepack --disable-sdl --disable-aa \
     86    --disable-caca --disable-x11 --disable-gl --disable-arts \
     87    --disable-esd --disable-lirc --disable-mng --disable-libdirac-lavc \
     88    --disable-libschroedinger-lavc --disable-liba52 \
     89    --disable-gif
    11490
    11591post-destroot {
    11692    xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
     
    12298        xinstall -m 0644 ${worksrcpath}/etc/${etcfile} \
    12399            ${destroot}${prefix}/etc/${name}/${etcfile}
    124100    }
     101    xinstall -d -m 0755 ${destroot}${prefix}/share/man/man1
     102    xinstall -m 0644 ${worksrcpath}/DOCS/man/en/mplayer.1 \
     103        ${destroot}${prefix}/share/man/man1/
     104    xinstall -m 0755 ${worksrcpath}/TOOLS/midentify.sh ${destroot}${prefix}/bin/midentify
    125105}
    126106
    127107##### Mplayer features
     
    236216    configure.args-delete   --disable-caca
    237217}
    238218
    239 variant x11 {
     219variant x11 description {Enable x11 support} {
    240220    depends_lib-append \
    241         port:xorg-libXinerama \
    242         port:xorg-libXv \
    243         port:xorg-libXxf86vm
     221        port:xorg-libXinerama \
     222        port:xorg-libXv \
     223        port:xorg-libXxf86vm
    244224
    245225    configure.args-delete   --disable-x11
    246226    configure.args-append   --enable-x11 --enable-xv --enable-xinerama --enable-xshape
     
    254234
    255235
    256236platform macosx {
    257     configure.args-append   --enable-macosx
    258     if {([variant_isset universal] && ![string match *64* $universal_archs]) || (![variant_isset universal] && ![string match *64* $build_arch])} {
    259         configure.args-append --enable-qtx --enable-macosx-finder-support
     237    if { ${configure.build_arch} == "x86_64" } {
     238        configure.args-append   --disable-qtx
    260239    } else {
    261         configure.args-append --disable-qtx
     240        configure.args-append   --enable-qtx
    262241    }
    263242}
    264243
    265244variant glx requires x11 description {Enable glx output support.  Due to a bug in Mplayer's build system, this disables Mac OS X-specific features} {
    266     depends_lib-append port:mesa
     245    depends_lib-append      port:mesa
    267246    configure.args-delete   --disable-gl --enable-macosx --enable-macosx-finder-support --enable-macosx-bundle --enable-qtx
    268247    configure.args-append   --enable-gl --disable-macosx
    269248}
    270249
    271250platform darwin {
    272     post-patch {
    273         reinplace "s|\$\(CC\) \$\(CFLAGS\) -o|\$\(LD\) \$\(CFLAGS\) -o|g" \
    274             ${worksrcpath}/Makefile
    275         reinplace "s|-isysroot /Developer/SDKs/MacOSX10.4u.sdk||g" \
    276             ${worksrcpath}/configure
    277     }
    278     build.env           LD=${configure.cc}
    279251    if { ${configure.build_arch} == "x86_64" } {
    280         configure.args-append --target=${build_arch}-Darwin
     252        configure.args-append --target=${configure.build_arch}-Darwin
    281253    }
     254    build.env           LD=${configure.cc}
    282255}
    283256
    284257platform darwin 8 {
     
    287260    build.env           LD=${configure.cxx}
    288261}
    289262
    290 platform darwin 10 {
    291     # Broken because 1.0rc2 is super old
    292     pre-fetch {
    293         return -code error "MPlayer does not compile on Snow Leopard.  Please use multimedia/mplayer-devel instead"
    294     }
     263platform darwin 9 {
     264    configure.args-delete   --extra-cflags="-I${prefix}/include/lzo -I${prefix}/include"
     265    configure.args-append   --extra-cflags="-fomit-frame-pointer -I${prefix}/include/lzo -I${prefix}/include"
    295266}