Ticket #54480: VLC.diff
File VLC.diff, 8.4 KB (added by RJVB (René Bertin), 7 years ago) |
---|
-
Portfile
old new 29 29 homepage http://www.videolan.org/vlc/libvlc.html 30 30 } 31 31 32 subport ffmpeg-VLC {} 33 set FFMPEG_VLC_PREFIX ${prefix}/lib/vlc/ffmpeg 32 set use_ffmpeg_VLC no 33 34 if {[tbool use_ffmpeg_VLC]} { 35 subport ffmpeg-VLC {} 36 set FFMPEG_VLC_PREFIX ${prefix}/lib/vlc/ffmpeg 37 } 34 38 35 39 if {${subport} eq ${name}} { 36 40 conflicts lib${name} libVLC-devel VLC-devel … … 44 48 ################### ports VLC and libVLC ################### 45 49 ## 46 50 if {(${subport} eq ${name}) || (${subport} eq "lib${name}")} { 47 version 2.2.4 48 revision 8 51 version 2.2.6 49 52 license GPL-2 50 53 51 54 platforms darwin … … 54 57 distname vlc-${version} 55 58 use_xz yes 56 59 57 checksums rmd160 2fe178bb9a4b2ad5ca0294d3e52ceb992b22e8ee\58 sha256 1632e91d2a0087e0ef4c3fb4c95c3c2890f7715a9d1d43ffd46329f428cf53be60 checksums rmd160 b2727834bcbbf0d274e3a0b4a3317f3b914f9ad4 \ 61 sha256 c403d3accd9a400eb2181c958f3e7bc5524fe5738425f4253d42883b425a42a8 59 62 60 63 if {[info exist ::env(MACPORTS_COMPRESS_WORKDIR)] && $::env(MACPORTS_COMPRESS_WORKDIR)} { 61 64 # Enable HFS compression. … … 67 70 68 71 depends_build port:pkgconfig 69 72 70 depends_lib port:ffmpeg-VLC \ 71 port:a52dec \ 73 if {[tbool use_ffmpeg_VLC]} { 74 depends_lib-append \ 75 port:ffmpeg-FFMPEG_VLC_PREFIX 76 } 77 depends_lib-append port:a52dec \ 72 78 port:avahi \ 73 79 port:bzip2 \ 74 80 port:faad2 \ … … 189 195 static_assert.patch \ 190 196 no-sparkle.patch \ 191 197 patch-vlc-no-O4.diff \ 192 patch-ffmpegVLC.diff \193 198 patch-soundfont-path.diff 199 if {[tbool use_ffmpeg_VLC]} { 200 patchfiles-append \ 201 patch-ffmpegVLC.diff 202 } else { 203 patchfiles-append \ 204 patch-ffmpeg3-compat.diff 205 } 194 206 195 207 post-patch { 196 208 if {[string match *clang* ${configure.cxx}] && ${configure.cxx_stdlib} == "libc++"} { … … 201 213 202 214 reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/modules/codec/fluidsynth.c 203 215 204 # patch source using ffmpeg to use the correct header file locations 205 foreach dir {libavcodec libavformat libavresample libavutil libpostproc libswresample libswscale} { 206 foreach module {access codec/avcodec demux/avformat hw/vdpau packetizer video_chroma} { 207 foreach cf [glob -nocomplain ${worksrcpath}/modules/${module}/*.c] { 208 reinplace "s|${dir}/|${dir}-VLC/|g" ${cf} 209 } 210 foreach cf [glob -nocomplain ${worksrcpath}/modules/${module}/*.h] { 211 reinplace "s|${dir}/|${dir}-VLC/|g" ${cf} 216 if {[tbool use_ffmpeg_VLC]} { 217 # patch source using ffmpeg to use the correct header file locations 218 foreach dir {libavcodec libavformat libavresample libavutil libpostproc libswresample libswscale} { 219 foreach module {access codec/avcodec demux/avformat hw/vdpau packetizer video_chroma} { 220 foreach cf [glob -nocomplain ${worksrcpath}/modules/${module}/*.c] { 221 reinplace "s|${dir}/|${dir}-VLC/|g" ${cf} 222 } 223 foreach cf [glob -nocomplain ${worksrcpath}/modules/${module}/*.h] { 224 reinplace "s|${dir}/|${dir}-VLC/|g" ${cf} 225 } 212 226 } 227 reinplace "s|${dir}/|${dir}-VLC/|g" ${worksrcpath}/configure.ac ${worksrcpath}/configure 213 228 } 214 reinplace "s|${dir}/|${dir}-VLC/|g" ${worksrcpath}/configure.ac ${worksrcpath}/configure 215 } 216 reinplace "s|postproc/|postproc-VLC/|g" ${worksrcpath}/configure.ac ${worksrcpath}/configure 217 reinplace "s|libpostproc/|libpostproc-VLC/|g" ${worksrcpath}/modules/video_filter/postproc.c 218 reinplace "s|HAVE_LIBAVUTIL_AV|HAVE_LIBAVUTIL_VLC_AV|g" \ 229 reinplace "s|postproc/|postproc-VLC/|g" ${worksrcpath}/configure.ac ${worksrcpath}/configure 230 reinplace "s|libpostproc/|libpostproc-VLC/|g" ${worksrcpath}/modules/video_filter/postproc.c 231 reinplace "s|HAVE_LIBAVUTIL_AV|HAVE_LIBAVUTIL_VLC_AV|g" \ 219 232 ${worksrcpath}/modules/codec/avcodec/avcommon.h \ 220 233 ${worksrcpath}/modules/codec/avcodec/avcommon_compat.h 221 reinplace "s|HAVE_LIBAVFORMAT_AV|HAVE_LIBAVFORMAT_VLC_AV|g" \234 reinplace "s|HAVE_LIBAVFORMAT_AV|HAVE_LIBAVFORMAT_VLC_AV|g" \ 222 235 ${worksrcpath}/modules/codec/avcodec/avcommon.h \ 223 236 ${worksrcpath}/modules/codec/avcodec/avcommon_compat.h 224 reinplace "s|HAVE_LIBAVCODEC_AV|HAVE_LIBAVCODEC_VLC_AV|g" \237 reinplace "s|HAVE_LIBAVCODEC_AV|HAVE_LIBAVCODEC_VLC_AV|g" \ 225 238 ${worksrcpath}/modules/codec/avcodec/avcommon.h \ 226 239 ${worksrcpath}/modules/codec/avcodec/avcommon_compat.h 227 reinplace "s|HAVE_LIBSWSCALE_SW|HAVE_LIBSWSCALE_VLC_SW|g" \240 reinplace "s|HAVE_LIBSWSCALE_SW|HAVE_LIBSWSCALE_VLC_SW|g" \ 228 241 ${worksrcpath}/modules/codec/avcodec/avcommon.h \ 229 242 ${worksrcpath}/modules/codec/avcodec/avcommon_compat.h 243 } 230 244 } 231 245 post-configure { 232 246 system -W ${worksrcpath} "patch -Np0 -i ${filespath}/patch-static_assert.diff" … … 240 254 241 255 configure.env-append \ 242 256 CXXCPP="${configure.cxx} -E" 243 # splice in ffmpeg-VLC's pkgconfig path, hoping that PKG_CONFIG_PATH hasn't been set by anyone else 244 configure.env-append \ 257 if {[tbool use_ffmpeg_VLC]} { 258 # splice in ffmpeg-VLC's pkgconfig path, hoping that PKG_CONFIG_PATH hasn't been set by anyone else 259 configure.env-append \ 245 260 PKG_CONFIG_PATH=${FFMPEG_VLC_PREFIX}/lib/pkgconfig 261 } 246 262 build.args-append DESTDIR=${worksrcpath}/dest_ignore V=1 247 263 248 264 # gl.c:121:3: error: Platform not recognized. … … 505 521 delete ${destroot}${applications_dir}/VLC.app/Contents/MacOS/share/lua 506 522 507 523 # http://trac.macports.org/ticket/35131 508 ln -s ${prefix}/lib ${destroot}${applications_dir}/VLC.app/Contents/MacOS/lib 524 xinstall -m 755 -d ${destroot}${applications_dir}/VLC.app/Contents/MacOS/lib 525 foreach l [glob -nocomplain ${destroot}${prefix}/lib/*] { 526 ln -s ${prefix}/lib/[file tail ${l}] ${destroot}${applications_dir}/VLC.app/Contents/MacOS/lib 527 } 509 528 ln -s ${prefix}/lib/vlc/plugins ${destroot}${applications_dir}/VLC.app/Contents/MacOS/plugins 510 529 ln -s ${prefix}/lib/vlc/lua ${destroot}${applications_dir}/VLC.app/Contents/MacOS/share/lua 511 ln -s ${prefix}/share/locale ${destroot}${applications_dir}/VLC.app/Contents/MacOS/share/locale 530 foreach d [glob -nocomplain ${destroot}${prefix}/share/locale/*] { 531 set locale [file tail ${d}] 532 set ldir ${destroot}${applications_dir}/VLC.app/Contents/MacOS/share/locale/${locale}/LC_MESSAGES 533 xinstall -m 755 -d ${ldir} 534 foreach m [glob -nocomplain ${d}/LC_MESSAGES/*] { 535 ln -s ${prefix}/share/locale/${locale}/LC_MESSAGES/[file tail ${m}] ${ldir}/ 536 } 537 } 512 538 513 539 # the vlc executable needs to be started with a full path to the app bundle executable 514 540 # or else the Mac OS X interface will hang beyond even a ^C or ^\ : … … 529 555 system "${prefix}/lib/vlc/vlc-cache-gen -f ${prefix}/lib/vlc" 530 556 } 531 557 } 532 # outcomment when the port:fluid-soundfont* ports have been made available 533 # notes-append "MIDI support requires installing one or more SoundFont files,\ 534 # in ${prefix}/share/sounds/sf2, for instance from one of the port:fluid-soundfont-* ports" 558 notes-append "MIDI support requires installing one or more SoundFont files,\ 559 in ${prefix}/share/sounds/sf2, for instance from port:generaluser-soundfont." 535 560 } 536 561 537 562 ##