Ticket #50697: VLC-ffmpeg-revised.diff
File VLC-ffmpeg-revised.diff, 46.3 KB (added by dbevans (David B. Evans), 8 years ago) |
---|
-
Portfile
1 1 # -*- coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 2 2 # $Id$ 3 3 4 PortSystem 1.0 5 PortGroup compiler_blacklist_versions 1.0 6 PortGroup active_variants 1.1 4 PortSystem 1.0 5 PortGroup xcodeversion 1.0 6 PortGroup compiler_blacklist_versions 1.0 7 PortGroup active_variants 1.1 8 PortGroup conflicts_build 1.0 7 9 8 # TODO 9 # if {[file exists ${prefix}/etc/macports/locales.tcl]} { 10 # # experimental feature to cut down the NLS/locale files, which take up over 50% of 11 # # the install footprint for VLC. This feature loads the locale_select PortGroup 12 # # if its configuration file exist; a variant is then added which prunes all translations from 13 # # ${destroot}${prefix}/share/locale except those whitelisted in etc/macports/locales.tcl . 14 # PortGroup locale_select 1.0 15 # } 10 if {[file exists ${prefix}/etc/macports/locales.tcl]} { 11 # experimental feature to cut down the NLS/locale files, which take up over 50% of 12 # the install footprint for VLC. This feature loads the locale_select PortGroup 13 # if its configuration file exist; a variant is then added which prunes all translations from 14 # ${destroot}${prefix}/share/locale except those whitelisted in etc/macports/locales.tcl . 15 PortGroup locale_select 1.0 16 } 16 17 17 name VLC 18 version 2.2.2 19 revision 4 18 name VLC 20 19 21 categories multimedia devel22 maintainers nomaintainer20 categories multimedia devel 21 maintainers gmail.com:rjvbertin openmaintainer 23 22 24 description VLC is a cross-platform media player and streaming server25 long_description VLC media player is a highly portable multimedia player for \26 various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, \27 mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols. \28 It can also be used as a server to stream in unicast or multicast \29 in IPv4 or IPv6 on a high-bandwidth network.23 description VLC is a cross-platform media player and streaming server 24 long_description VLC media player is a highly portable multimedia player for \ 25 various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, \ 26 mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols. \ 27 It can also be used as a server to stream in unicast or multicast \ 28 in IPv4 or IPv6 on a high-bandwidth network. 30 29 31 homepage http://www.videolan.org30 homepage http://www.videolan.org 32 31 33 subport 32 subport lib${name} { 34 33 maintainers gmail.com:rjvbertin openmaintainer 35 34 description the core engine and interface to VLC's multimedia framework 36 35 long_description libVLC is the core engine and the interface to the multimedia \ … … 40 39 homepage http://www.videolan.org/vlc/libvlc.html 41 40 } 42 41 42 subport ffmpeg-VLC {} 43 set FFMPEG_VLC_PREFIX ${prefix}/lib/vlc/ffmpeg 44 43 45 if {${subport} eq ${name}} { 44 46 conflicts lib${name} libVLC-devel VLC-devel 45 47 } 46 48 47 license GPL-2 49 # VLC-2.1 and later are x86_64-only: https://trac.videolan.org/vlc/ticket/8161 50 universal_variant no 51 supported_archs x86_64 48 52 49 platforms darwin 53 ## 54 ################### ports VLC and libVLC ################### 55 ## 56 if {(${subport} eq ${name}) || (${subport} eq "lib${name}")} { 57 version 2.2.3 58 license GPL-2 50 59 51 master_sites http://download.videolan.org/pub/videolan/vlc/${version}/ 52 distname vlc-${version} 53 use_xz yes 60 platforms darwin 54 61 55 checksums rmd160 ff302536334622427e06250457c74f061d4329f8 \ 56 sha256 9ad23128be16f9b40ed772961272cb0748ed8e4aa1bc79c129e589feebea5fb5 62 master_sites http://download.videolan.org/pub/videolan/vlc/${version}/ 63 distname vlc-${version} 64 use_xz yes 57 65 58 # Enable HFS compression. 59 depends_extract-append port:libarchive 60 extract.post_args "| bsdtar -x --hfsCompression" 66 checksums rmd160 8c6d4194da37210fe409c965f430898fbe7f2416 \ 67 sha256 b9d7587d35f13c3c981964c8cc8b03f1c7c8edf528be476b3ca1d2efedd5bf5b 61 68 62 depends_build port:pkgconfig 69 # Enable HFS compression. 70 if {[file exists ${prefix}/bin/bsdtar]} { 71 # depends_extract-append port:libarchive 72 extract.post_args \ 73 "| ${prefix}/bin/bsdtar -x --hfsCompression" 74 } 63 75 64 depends_lib port:a52dec \ 65 port:avahi \ 66 port:bzip2 \ 67 port:faad2 \ 68 path:lib/libavcodec.dylib:ffmpeg \ 69 port:flac \ 70 port:fluidsynth \ 71 port:fontconfig \ 72 port:freetype \ 73 port:fribidi \ 74 port:gettext \ 75 path:lib/pkgconfig/glib-2.0.pc:glib2 \ 76 port:gmp \ 77 port:gnutls \ 78 port:jpeg \ 79 port:lame \ 80 port:libass \ 81 port:libbluray \ 82 port:libcddb \ 83 port:libcdio \ 84 port:libdc1394 \ 85 port:libdca \ 86 port:libdvbpsi \ 87 port:libdvdnav \ 88 port:libdvdread \ 89 port:libebml \ 90 port:libgcrypt \ 91 port:libgpg-error \ 92 port:libiconv \ 93 port:libid3tag \ 94 port:libidn \ 95 port:libmad \ 96 port:libmatroska \ 97 port:libmodplug \ 98 port:libmpcdec \ 99 port:libmpeg2 \ 100 port:libmtp \ 101 port:libogg \ 102 port:libopus \ 103 port:libpng \ 104 port:libproxy \ 105 port:libsamplerate \ 106 port:libsdl \ 107 port:libsdl_image \ 108 port:libsndfile \ 109 port:libssh2 \ 110 port:libtheora \ 111 port:libupnp \ 112 port:libusb \ 113 port:libvorbis \ 114 port:libvpx \ 115 port:libxml2 \ 116 port:live555 \ 117 port:ncurses \ 118 port:nettle \ 119 port:opencv \ 120 port:openjpeg15 \ 121 path:lib/libssl.dylib:openssl \ 122 port:orc \ 123 port:p11-kit \ 124 port:readline \ 125 port:schroedinger \ 126 port:speex \ 127 port:taglib \ 128 port:tiff \ 129 port:twolame \ 130 port:vcdimager \ 131 port:x264 \ 132 port:x265 76 depends_build port:pkgconfig 133 77 134 # the +qt5 and/or +qt4 variants of port:opencv currently lead to build errors 135 pre-configure { 136 if {![active_variants opencv "" {qt4 qt5}]} { 137 ui_error "${subport} cannot currently be built against port:opencv with the qt4 or qt5 variant.\ 138 Install port:opencv without either qt variant and try again. This is only a build conflict; \ 139 after building you can reactivate your preferred opencv variant" 140 return -code error "Install or activate port:opencv without a qt variant before building ${subport}" 78 depends_lib path:${FFMPEG_VLC_PREFIX}/lib/libavcodec.dylib:ffmpeg-VLC \ 79 port:a52dec \ 80 port:avahi \ 81 port:bzip2 \ 82 port:faad2 \ 83 port:flac \ 84 port:fluidsynth \ 85 port:fontconfig \ 86 port:freetype \ 87 port:fribidi \ 88 port:gettext \ 89 path:lib/pkgconfig/glib-2.0.pc:glib2 \ 90 port:gmp \ 91 port:gnutls \ 92 port:jpeg \ 93 port:lame \ 94 port:libass \ 95 port:libbluray \ 96 port:libcddb \ 97 port:libcdio \ 98 port:libdc1394 \ 99 port:libdca \ 100 port:libdvbpsi \ 101 port:libdvdnav \ 102 port:libdvdread \ 103 port:libebml \ 104 port:libgcrypt \ 105 port:libgpg-error \ 106 port:libiconv \ 107 port:libid3tag \ 108 port:libidn \ 109 port:libmad \ 110 port:libmatroska \ 111 port:libmodplug \ 112 port:libmpcdec \ 113 port:libmpeg2 \ 114 port:libmtp \ 115 port:libogg \ 116 port:libopus \ 117 port:libpng \ 118 port:libproxy \ 119 port:libsamplerate \ 120 port:libsdl \ 121 port:libsdl_image \ 122 port:libsndfile \ 123 port:libssh2 \ 124 port:libtheora \ 125 port:libupnp \ 126 port:libusb \ 127 port:libvorbis \ 128 port:libvpx \ 129 port:libxml2 \ 130 port:live555 \ 131 port:ncurses \ 132 port:nettle \ 133 port:openjpeg15 \ 134 path:lib/libssl.dylib:openssl \ 135 port:orc \ 136 port:p11-kit \ 137 port:readline \ 138 port:schroedinger \ 139 port:speex \ 140 port:taglib \ 141 port:tiff \ 142 port:twolame \ 143 port:vcdimager \ 144 port:x264 \ 145 port:x265 146 147 pre-fetch { 148 if {${os.platform} eq "darwin" && ${os.major} < 10} { 149 ui_error "${name} ${version} requires Mac OS X 10.6 or greater." 150 return -code error "incompatible Mac OS X version" 151 } 141 152 } 142 }143 153 144 # VLC 2.2.2 should have full Lua 5.3 compatibility, for now, depend on port:lua52 145 # That requires the patch-for-lua52.diff which is appended to patchfiles below. 146 # update 2.2.2 : lua 5.3 gives compiler syntax errors so we stick with 5.2 for now. 147 depends_lib-append port:lua52 148 # depends_lib-append port:lua 154 # port:opencv depends on port:ffmpeg and thus enters in conflict with us depending on our own ffmpeg build 155 # 1 viable solution as long as this is the case: drop the opencv filter. 156 # depends_lib-append port:opencv 157 # # the +qt5 and/or +qt4 variants of port:opencv currently lead to build errors. A patch has 158 # # been submitted (but not included) that resolves the issue for qt4, not yet for qt5. 159 # # https://trac.macports.org/ticket/50709 160 # # For regular users a single check in the pre-fetch would suffice, but this maintainer 161 # # needs the check at other opportune moments too. 162 # proc check_opencv {} { 163 # global subport 164 # if {![active_variants opencv "" {qt4 qt5}]} { 165 # ui_error "${subport} cannot currently be built against port:opencv with the qt5 variant.\ 166 # Install port:opencv without that variant and try again. This is only a build conflict; \ 167 # after building you can reactivate your preferred opencv variant" 168 # return -code error "Install or activate port:opencv without the qt5 variant before building ${subport}" 169 # } 170 # } 171 # pre-fetch { 172 # check_opencv 173 # } 174 # pre-configure { 175 # check_opencv 176 # } 177 # pre-build { 178 # check_opencv 179 # } 180 # patchfiles-append patch-opencv_includes.diff 181 # # The opencv example apparently builds on 10.11 but I'm having issues with it on 10.9 182 # # it doesn't appear to be indispensable, so simply skip it. 183 # patchfiles-append patch-no-opencv_example.diff 149 184 150 # VLC-2.1 and later are x86_64-only: https://trac.videolan.org/vlc/ticket/8161 151 universal_variant no 152 supported_archs x86_64 185 # VLC 2.2.2 should have full Lua 5.3 compatibility, for now, depend on port:lua52 186 # That requires the patch-for-lua52.diff which is appended to patchfiles below. 187 # update 2.2.2 : lua 5.3 gives compiler syntax errors so we stick with 5.2 for now. 188 depends_lib-append port:lua52 189 # depends_lib-append port:lua 153 190 154 compiler.blacklist gcc-4.2 llvm-gcc-4.2 {clang < 300} 191 # VLC doesn't currently build for me using port:clang-3.8 192 compiler.blacklist-append \ 193 gcc-4.2 llvm-gcc-4.2 macports-clang-3.8 {clang < 300} 155 194 156 pre-fetch { 157 if {${os.platform} eq "darwin" && ${os.major} < 10} {158 ui_error "${name} ${version} requires Mac OS X 10.6 or greater."159 return -code error "incompatible Mac OS X version"160 }161 } 195 patchfiles buildfix-package.mak.patch \ 196 configure.ac-no-arch.patch \ 197 PR-34741-no__clang_version__.patch \ 198 static_assert.patch \ 199 no-sparkle.patch \ 200 patch-vlc-no-O4.diff 162 201 163 patchfiles buildfix-package.mak.patch \ 164 configure.ac-no-arch.patch \ 165 PR-34741-no__clang_version__.patch \ 166 static_assert.patch \ 167 no-sparkle.patch \ 168 patch-vlc-no-O4.diff \ 169 patch-opencv_includes.diff 202 post-patch { 203 reinplace "s:librsvg-2/librsvg:librsvg:" \ 204 ${worksrcpath}/modules/text_renderer/svg.c 170 205 171 # The opencv example apparently builds on 10.11 but I'm having issues with it on 10.9 172 # it doesn't appear to be indispensable, so simply skip it. 173 patchfiles-append patch-no-opencv_example.diff 206 if {[string match *clang* ${configure.cxx}] && ${configure.cxx_stdlib} == "libc++"} { 207 reinplace "s:-lstdc\+\+:-lc++:" \ 208 ${worksrcpath}/configure.ac \ 209 ${worksrcpath}/modules/access/Makefile.am 210 } 211 } 212 post-configure { 213 system -W ${worksrcpath} "patch -Np0 -i ${filespath}/patch-static_assert.diff" 214 } 174 215 175 post-patch { 176 reinplace "s:librsvg-2/librsvg:librsvg:" \ 177 ${worksrcpath}/modules/text_renderer/svg.c 216 use_autoreconf yes 217 autoreconf.cmd ./bootstrap 218 autoreconf.pre_args 219 autoreconf.args 220 depends_build-append port:libtool port:autoconf port:automake 178 221 179 if {[string match *clang* ${configure.cxx}] && ${configure.cxx_stdlib} == "libc++"} {180 reinplace "s:-lstdc\+\+:-lc++:" \181 ${worksrcpath}/configure.ac \182 ${worksrcpath}/modules/access/Makefile.am183 }184 } 222 configure.env-append \ 223 CXXCPP="${configure.cxx} -E" 224 # splice in ffmpeg-VLC's pkgconfig path, hoping that PKG_CONFIG_PATH hasn't been set by anyone else 225 configure.env-append \ 226 PKG_CONFIG_PATH=${FFMPEG_VLC_PREFIX}/lib/pkgconfig 227 build.args-append DESTDIR=${worksrcpath}/dest_ignore V=1 185 228 186 use_autoreconf yes 187 autoreconf.cmd ./bootstrap 188 autoreconf.pre_args 189 autoreconf.args 190 depends_build-append port:libtool port:autoconf port:automake 229 # gl.c:121:3: error: Platform not recognized. 230 configure.cppflags-append -D__unix__=1 191 231 192 configure.env-append CXXCPP="${configure.cxx} -E" 193 build.args-append DESTDIR=${worksrcpath}/dest_ignore V=1 232 # live555 is installed to a weird location 233 configure.cppflags-append -I${prefix}/lib/live/liveMedia/include 194 234 195 # gl.c:121:3: error: Platform not recognized. 196 configure.cppflags-append -D__unix__=1 235 build.target all 236 destroot.target install 197 237 198 # live555 is installed to a weird location 199 configure.cppflags-append -I${prefix}/lib/live/liveMedia/include 238 livecheck.url http://download.videolan.org/pub/videolan/vlc/ 239 livecheck.regex <a href=\"(\\d\[\\d|\.|\\w\]+).*/\"> 200 240 201 build.target all 202 destroot.target install 241 # Other 242 configure.args-append \ 243 --with-contrib=${worksrcpath}/contrib \ 244 --disable-debug --disable-update-check --enable-gnutls \ 245 --disable-notify --disable-dbus --enable-lua \ 246 --disable-gnomevfs --disable-growl --disable-macosx-vlc-app 203 247 204 livecheck.url http://download.videolan.org/pub/videolan/vlc/ 205 livecheck.regex <a href=\"(\\d\[\\d|\.|\\w\]+).*/\"> 248 # Input Plugins 249 configure.args-append \ 250 --enable-dvdnav --enable-dvdread --disable-smbclient --enable-vcdx \ 251 --disable-macosx-qtkit --disable-macosx-eyetv --disable-realrtsp \ 252 --disable-freerdp --disable-opencv --enable-sftp 206 253 207 # Other 208 configure.args-append \ 209 --with-contrib=${worksrcpath}/contrib \ 210 --disable-debug --disable-update-check --enable-gnutls \ 211 --disable-notify --disable-dbus --enable-lua \ 212 --disable-gnomevfs --disable-growl --disable-macosx-vlc-app 254 # Mux/Demux Plugins 255 configure.args-append \ 256 --enable-dvbpsi --enable-ogg --enable-mux_ogg \ 257 --enable-mkv --enable-mod --enable-mpc --disable-shout 213 258 214 # Input Plugins 215 configure.args-append \ 216 --enable-dvdnav --enable-dvdread --disable-smbclient --enable-vcdx \ 217 --disable-macosx-qtkit --disable-macosx-eyetv --disable-realrtsp \ 218 --disable-freerdp --enable-opencv --enable-sftp 259 # Codec Plugins 260 configure.args-append \ 261 --enable-a52 --enable-faad --enable-flac --enable-live555 \ 262 --enable-opus --enable-vorbis --enable-ogg --enable-mad --enable-libass \ 263 --enable-dca --enable-png --disable-quicktime --enable-twolame \ 264 --enable-speex --enable-theora --enable-x264 --enable-x265 --enable-postproc \ 265 --disable-gst-decode --enable-avcodec --enable-avformat --enable-swscale \ 266 --disable-fluidsynth --enable-schroedinger --enable-vpx 219 267 220 # Mux/Demux Plugins 221 configure.args-append \ 222 --enable-dvbpsi --enable-ogg --enable-mux_ogg \ 223 --enable-mkv --enable-mod --enable-mpc --disable-shout 268 # Video Plugins. We do our best to deactivate X11 and disable its auto-detection by 269 # claiming the headers and libs are somewhere they're not. 270 configure.args-append \ 271 --disable-caca --enable-sdl --enable-sdl-image \ 272 --without-x --disable-xcb --disable-xvideo \ 273 --x-includes=${destroot} --x-libraries=${destroot} \ 274 --enable-freetype --enable-fontconfig --enable-fribidi \ 275 --disable-svg --disable-svgdec 224 276 225 # Codec Plugins 226 configure.args-append \ 227 --enable-a52 --enable-faad --enable-flac --enable-live555 \ 228 --enable-opus --enable-vorbis --enable-ogg --enable-mad --enable-libass \ 229 --enable-dca --enable-png --disable-quicktime --enable-twolame \ 230 --enable-speex --enable-theora --enable-x264 --enable-x265 --enable-postproc \ 231 --disable-gst-decode --enable-avcodec --enable-avformat --enable-swscale \ 232 --disable-fluidsynth --enable-schroedinger --enable-vpx 277 # Audio Plugins 278 configure.args-append \ 279 --disable-jack \ 280 --enable-samplerate \ 281 --disable-pulse \ 282 --disable-chromaprint 233 283 234 # Video Plugins. We do our best to deactivate X11 and disable its auto-detection by 235 # claiming the headers and libs are somewhere they're not. 236 configure.args-append\237 --disable-caca --enable-sdl --enable-sdl-image\238 --without-x --disable-xcb --disable-xvideo\239 --x-includes=${destroot} --x-libraries=${destroot}\240 --enable-freetype --enable-fontconfig --enable-fribidi\241 --disable-svg --disable-svgdec284 # Interface Plugins 285 configure.args-append \ 286 --disable-macosx \ 287 --disable-macosx-dialog-provider \ 288 --disable-qt \ 289 --enable-ncurses \ 290 --disable-skins2 \ 291 --disable-vnc 242 292 243 # Audio Plugins 244 configure.args-append \ 245 --disable-jack \ 246 --enable-samplerate \ 247 --disable-pulse \ 248 --disable-chromaprint 293 # Visualisations and Video Filter Plugins 294 configure.args-append \ 295 --disable-goom 249 296 250 # Interface Plugins 251 configure.args-append \ 252 --disable-macosx \ 253 --disable-macosx-dialog-provider \ 254 --disable-qt \ 255 --enable-ncurses \ 256 --disable-skins2 \ 257 --disable-vnc 297 # Service Discovery Plugins 298 configure.args-append \ 299 --enable-bonjour \ 300 --enable-upnp 258 301 259 # Visualisations and Video Filter Plugins 260 configure.args-append \ 261 --disable-goom 302 # 20150209: Jack really would require a newer variant than what's currently in MacPorts 303 variant jack description {Enable jack and fluidsynth plugins for audio output} { 304 depends_lib-append port:jack port:fluidsynth port:portaudio 305 configure.args-delete --disable-jack --disable-fluidsynth 306 configure.args-append --enable-jack --enable-fluidsynth 307 } 262 308 263 # Service Discovery Plugins 264 configure.args-append \ 265 --enable-bonjour \266 --enable-upnp309 variant dbus description {Enable DBus support} { 310 depends_lib-append port:dbus 311 configure.args-replace --disable-dbus --enable-dbus 312 } 267 313 268 # 20150209: Jack really would require a newer variant than what's currently in MacPorts 269 variant jack description {Enable jack and fluidsynth plugins for audio output} { 270 depends_lib-append port:jack port:fluidsynth port:portaudio 271 configure.args-delete --disable-jack --disable-fluidsynth 272 configure.args-append --enable-jack --enable-fluidsynth 273 } 314 variant qtkit description {Enable qtcapture and qtaudio} { 315 configure.args-replace --disable-macosx-qtkit --enable-macosx-qtkit 316 } 274 317 275 variant dbus description {Enable DBus support} { 276 depends_lib-append port:dbus 277 configure.args-replace --disable-dbus --enable-dbus 278 } 318 variant svg description {Enable SVG rendering and decoding support} { 319 depends_lib-append port:librsvg 320 configure.args-replace --disable-svg --enable-svg 321 configure.args-replace --disable-svgdec --enable-svgdec 322 } 279 323 280 variant qtkit description {Enable qtcapture and qtaudio} { 281 configure.args-replace --disable-macosx-qtkit --enable-macosx-qtkit 282 } 324 variant shout description {Enable Shoutcast/Icecast streaming output support} { 325 depends_lib-append port:libshout2 326 configure.args-replace --disable-shout --enable-shout 327 } 283 328 284 variant svg description {Enable SVG rendering and decodingsupport} {285 depends_lib-append port:librsvg286 configure.args-replace --disable-svg --enable-svg287 configure.args-replace --disable-svgdec --enable-svgdec288 }329 variant smb description {Enable Samba 3 input support} { 330 depends_lib-append port:samba3 331 configure.args-replace --disable-smbclient --enable-smbclient 332 configure.ldflags-append -L${prefix}/lib/samba3 333 } 289 334 290 variant shout description {Enable Shoutcast/Icecast streaming outputsupport} {291 depends_lib-append port:libshout2292 configure.args-replace --disable-shout --enable-shout293 }335 variant pulse description {Enable PulseAudio support} { 336 depends_lib-append port:pulseaudio 337 configure.args-replace --disable-pulse --enable-pulse 338 } 294 339 295 variant smb description {Enable Samba 3 input support} { 296 depends_lib-append port:samba3 297 configure.args-replace --disable-smbclient --enable-smbclient 298 configure.ldflags-append -L${prefix}/lib/samba3 299 } 340 variant x11 { 341 depends_lib-append \ 342 port:xorg-libX11 \ 343 port:xorg-libXau \ 344 port:xorg-libXdmcp \ 345 port:xorg-libXext \ 346 port:xorg-libXrandr \ 347 port:xorg-libxcb \ 348 port:xrender \ 349 port:XviD \ 350 port:mesa \ 351 port:xorg-libXinerama \ 352 port:xorg-libXv \ 353 port:xorg-libXxf86vm \ 354 port:xorg-xcb-util \ 355 port:xorg-xcb-util-keysyms 300 356 301 variant pulse description {Enable PulseAudio support} { 302 depends_lib-append port:pulseaudio303 configure.args-replace --disable-pulse --enable-pulse304 }357 configure.args-delete --without-x --disable-xvideo --disable-xcb \ 358 --x-includes=${destroot} --x-libraries=${destroot} 359 configure.args-append --with-x --enable-xvideo --enable-xcb 360 } 305 361 306 variant x11 { 307 depends_lib-append \ 308 port:xorg-libX11 \ 309 port:xorg-libXau \ 310 port:xorg-libXdmcp \ 311 port:xorg-libXext \ 312 port:xorg-libXrandr \ 313 port:xorg-libxcb \ 314 port:xrender \ 315 port:XviD \ 316 port:mesa \ 317 port:xorg-libXinerama \ 318 port:xorg-libXv \ 319 port:xorg-libXxf86vm \ 320 port:xorg-xcb-util \ 321 port:xorg-xcb-util-keysyms 362 if {${subport} ne "lib${name}"} { 363 variant qt4 conflicts qt5 description {Build using Qt4 UI. This will use qt4-mac. Experimental and probably dysfunctional} { 364 patchfiles-append patch-vlc-no-qt5.diff \ 365 patch-vlc-qt-configureac.diff \ 366 patch-simplepreferences.diff 322 367 323 configure.args-delete --without-x --disable-xvideo --disable-xcb \ 324 --x-includes=${destroot} --x-libraries=${destroot} 325 configure.args-append --with-x --enable-xvideo --enable-xcb 326 } 368 configure.args-replace --disable-qt --enable-qt 327 369 328 if {${subport} ne "lib${name}"} { 329 variant qt4 conflicts qt5 description {Build using Qt4 UI. This will use qt4-mac. Experimental and probably dysfunctional} {330 patchfiles-append patch-vlc-no-qt5.diff \331 332 patch-simplepreferences.diff370 PortGroup qt4 1.0 371 } 372 variant qt5 conflicts qt4 description {Build using Qt5 UI. This will use qt5-mac. Experimental and probably dysfunctional} { 373 patchfiles-append patch-vlc-qt-configureac.diff \ 374 patch-simplepreferences.diff 333 375 334 configure.args-replace --disable-qt --enable-qt376 configure.args-replace --disable-qt --enable-qt 335 377 336 PortGroup qt4 1.0 378 PortGroup qt5 1.0 379 } 337 380 } 338 variant qt5 conflicts qt4 description {Build using Qt5 UI. This will use qt5-mac. Experimental and probably dysfunctional} {339 patchfiles-append patch-vlc-qt-configureac.diff \340 patch-simplepreferences.diff341 381 342 configure.args-replace --disable-qt --enable-qt 382 variant quartz { 383 depends_lib-delete port:libsamplerate 384 depends_lib-append port:BGHUDAppKit 343 385 344 PortGroup qt5 1.0 386 patchfiles-append patch-vlc-for-macports.diff 387 388 configure.args-delete --disable-macosx \ 389 --enable-samplerate \ 390 --disable-realrtsp 391 configure.args-append --enable-macosx 392 # taken from VLC's own configure.sh script for OS X: 393 configure.args-append --disable-samplerate \ 394 --enable-merge-ffmpeg \ 395 --enable-realrtsp 345 396 } 346 }347 397 348 variant quartz { 349 depends_lib-delete port:libsamplerate 350 depends_lib-append port:BGHUDAppKit 398 # FreeRDP currently doesn't build with CMake >= 3.1 (#47389) 399 variant freerdp description {Build the FreeRDP support; currently dysfunctional} { 400 depends_lib-append port:FreeRDP 401 # access/rdp.c:45:11: fatal error: 'freerdp/version.h' file not found 402 configure.cppflags-append -DFREERDP_INTERFACE_VERSION \ 403 -DFREERDP_VERSION_MAJOR=1 \ 404 -DFREERDP_VERSION_MINOR=1 405 configure.args-replace --disable-freerdp --enable-freerdp 406 } 351 407 352 patchfiles-append patch-vlc-for-macports.diff 408 variant huge \ 409 requires jack shout svg \ 410 description {Enable all variants except quartz, smb, freerdp and x11} {} 353 411 354 configure.args-delete --disable-macosx \355 --enable-samplerate\356 --disable-realrtsp357 configure.args-append --enable-macosx358 # taken from VLC's own configure.sh script for OS X:359 configure.args-append --disable-samplerate\360 --enable-merge-ffmpeg\361 --enable-realrtsp362 }412 if {${subport} ne "lib${name}"} { 413 variant full \ 414 requires huge quartz smb x11 \ 415 description {Enable all variants except x11 (and except freerdp, currently)} {} 416 } else { 417 variant full \ 418 requires huge quartz smb \ 419 description {Enable all variants (except freerdp, currently)} {} 420 } 363 421 364 # FreeRDP currently doesn't build with CMake >= 3.1 (#47389) 365 variant freerdp description {Build the FreeRDP support; currently dysfunctional} { 366 depends_lib-append port:FreeRDP 367 # access/rdp.c:45:11: fatal error: 'freerdp/version.h' file not found 368 configure.cppflags-append -DFREERDP_INTERFACE_VERSION \ 369 -DFREERDP_VERSION_MAJOR=1 \ 370 -DFREERDP_VERSION_MINOR=1 371 configure.args-replace --disable-freerdp --enable-freerdp 372 } 422 # this patchfile can probably go with VLC 2.2.2, or should be reviewed then. 423 # update 2.2.2 : lua 5.3 gives compiler syntax errors so we stick with 5.2 for now. 424 patchfiles-append patch-for-lua52.diff 373 425 374 variant huge \ 375 requires jack shout svg \ 376 description {Enable all variants except quartz, smb, freerdp and x11} {} 426 platform macosx { 427 default_variants-append +quartz +qtkit 377 428 378 if {${subport} ne "lib${name}"} { 379 variant full \ 380 requires huge quartz smb x11 \ 381 description {Enable all variants except x11 (and except freerdp, currently)} {} 382 } else { 383 variant full \ 384 requires huge quartz smb \ 385 description {Enable all variants (except freerdp, currently)} {} 386 } 429 configure.args-replace --disable-macosx-eyetv --enable-macosx-eyetv 387 430 388 # this patchfile can probably go with VLC 2.2.2, or should be reviewed then. 389 # update 2.2.2 : lua 5.3 gives compiler syntax errors so we stick with 5.2 for now. 390 patchfiles-append patch-for-lua52.diff 431 if {${subport} ne "lib${name}"} { 432 configure.args-replace --disable-macosx-vlc-app --enable-macosx-vlc-app 433 } 391 434 392 platform macosx { 393 default_variants-append +quartz +qtkit 435 post-patch { 436 reinplace "s/Appkit/AppKit/" ${worksrcpath}/configure.ac 437 reinplace "/Sparkle.framework/d" \ 438 ${worksrcpath}/extras/package/macosx/vlc.xcodeproj/project.pbxproj 439 reinplace "/SDKROOT/d" \ 440 ${worksrcpath}/extras/package/macosx/vlc.xcodeproj/project.pbxproj 441 reinplace "/Growl.framework/d" \ 442 ${worksrcpath}/extras/package/macosx/package.mak 394 443 395 configure.args-replace --disable-macosx-eyetv --enable-macosx-eyetv 444 reinplace "s:LD_LIBRARY_PATH:DYLD_LIBRARY_PATH:g" \ 445 ${worksrcpath}/Makefile.am 396 446 397 if {${subport} ne "lib${name}"} {398 configure.args-replace --disable-macosx-vlc-app --enable-macosx-vlc-app399 }447 reinplace "/argv/s/environ/*_NSGetEnviron()/" \ 448 ${worksrcpath}/modules/misc/inhibit/xdg.c \ 449 ${worksrcpath}/modules/stream_filter/decomp.c 400 450 401 post-patch { 402 reinplace "s/Appkit/AppKit/" ${worksrcpath}/configure.ac 403 reinplace "/Sparkle.framework/d" \ 404 ${worksrcpath}/extras/package/macosx/vlc.xcodeproj/project.pbxproj 405 reinplace "/SDKROOT/d" \ 406 ${worksrcpath}/extras/package/macosx/vlc.xcodeproj/project.pbxproj 407 reinplace "/Growl.framework/d" \ 408 ${worksrcpath}/extras/package/macosx/package.mak 451 reinplace "s/extern char \\*\\*environ;/#include <crt_externs.h>/" \ 452 ${worksrcpath}/modules/misc/inhibit/xdg.c \ 453 ${worksrcpath}/modules/stream_filter/decomp.c 409 454 410 reinplace "s:LD_LIBRARY_PATH:DYLD_LIBRARY_PATH:g" \ 411 ${worksrcpath}/Makefile.am 455 if {![file exists ${worksrcpath}/contrib/BGHUDAppKit.framework]} { 456 ln -s ${frameworks_dir}/BGHUDAppKit.framework ${worksrcpath}/contrib/BGHUDAppKit.framework 457 } 412 458 413 reinplace "/argv/s/environ/*_NSGetEnviron()/" \ 414 ${worksrcpath}/modules/misc/inhibit/xdg.c \ 415 ${worksrcpath}/modules/stream_filter/decomp.c 416 417 reinplace "s/extern char \\*\\*environ;/#include <crt_externs.h>/" \ 418 ${worksrcpath}/modules/misc/inhibit/xdg.c \ 419 ${worksrcpath}/modules/stream_filter/decomp.c 420 421 if {![file exists ${worksrcpath}/contrib/BGHUDAppKit.framework]} { 422 ln -s ${frameworks_dir}/BGHUDAppKit.framework ${worksrcpath}/contrib/BGHUDAppKit.framework 459 # To trick configure 460 file mkdir "${worksrcpath}/contrib/lib" 423 461 } 424 462 425 # To trick configure 426 file mkdir "${worksrcpath}/contrib/lib" 427 } 463 post-destroot { 464 eval file delete [glob ${destroot}${prefix}/lib/vlc/plugins/*/*.la] 428 465 429 post-destroot { 430 eval file delete [glob ${destroot}${prefix}/lib/vlc/plugins/*/*.la] 466 if {[variant_isset qt4] || [variant_isset qt5] || [variant_isset quartz]} { 467 if {${subport} ne "lib${name}"} { 468 copy ${worksrcpath}/VLC.app ${destroot}${applications_dir}/VLC.app 431 469 432 if {[variant_isset qt4] || [variant_isset qt5] || [variant_isset quartz]} {433 if {${subport} ne "lib${name}"} {434 copy ${worksrcpath}/VLC.app ${destroot}${applications_dir}/VLC.app470 # These are already in ${prefix}, so we don't need to bundle them as well 471 delete ${destroot}${applications_dir}/VLC.app/Contents/Frameworks 472 delete ${destroot}${applications_dir}/VLC.app/Contents/lib 435 473 436 # These are already in ${prefix}, so we don't need to bundle them as well 437 delete ${destroot}${applications_dir}/VLC.app/Contents/Frameworks 438 delete ${destroot}${applications_dir}/VLC.app/Contents/lib 474 # There's no need to install these into the bundle and the prefix 475 delete ${destroot}${applications_dir}/VLC.app/Contents/MacOS/include 476 delete ${destroot}${applications_dir}/VLC.app/Contents/MacOS/lib 477 delete ${destroot}${applications_dir}/VLC.app/Contents/MacOS/plugins 478 delete ${destroot}${applications_dir}/VLC.app/Contents/MacOS/share/locale 479 delete ${destroot}${applications_dir}/VLC.app/Contents/MacOS/share/lua 439 480 440 # There's no need to install these into the bundle and the prefix 441 delete ${destroot}${applications_dir}/VLC.app/Contents/MacOS/include 442 delete ${destroot}${applications_dir}/VLC.app/Contents/MacOS/lib 443 delete ${destroot}${applications_dir}/VLC.app/Contents/MacOS/plugins 444 delete ${destroot}${applications_dir}/VLC.app/Contents/MacOS/share/locale 445 delete ${destroot}${applications_dir}/VLC.app/Contents/MacOS/share/lua 481 # http://trac.macports.org/ticket/35131 482 ln -s ${prefix}/lib ${destroot}${applications_dir}/VLC.app/Contents/MacOS/lib 483 ln -s ${prefix}/lib/vlc/plugins ${destroot}${applications_dir}/VLC.app/Contents/MacOS/plugins 484 ln -s ${prefix}/lib/vlc/lua ${destroot}${applications_dir}/VLC.app/Contents/MacOS/share/lua 485 ln -s ${prefix}/share/locale ${destroot}${applications_dir}/VLC.app/Contents/MacOS/share/locale 446 486 447 # http://trac.macports.org/ticket/35131 448 ln -s ${prefix}/lib ${destroot}${applications_dir}/VLC.app/Contents/MacOS/lib 449 ln -s ${prefix}/lib/vlc/plugins ${destroot}${applications_dir}/VLC.app/Contents/MacOS/plugins 450 ln -s ${prefix}/lib/vlc/lua ${destroot}${applications_dir}/VLC.app/Contents/MacOS/share/lua 451 ln -s ${prefix}/share/locale ${destroot}${applications_dir}/VLC.app/Contents/MacOS/share/locale 452 453 # the vlc executable needs to be started with a full path to the app bundle executable 454 # or else the Mac OS X interface will hang beyond even a ^C or ^\ : 455 move ${destroot}${prefix}/bin/vlc ${destroot}${prefix}/bin/vlc.exe 456 system "echo \"#!/bin/sh\nexec \\\"${applications_dir}/VLC.app/Contents/MacOS/VLC\\\" \\\"\\\$\@\\\"\" > ${destroot}${prefix}/bin/vlc" 457 system "chmod 755 ${destroot}${prefix}/bin/vlc" 458 } else { 459 delete ${destroot}${prefix}/bin 460 delete ${destroot}${prefix}/share/applications 461 delete ${destroot}${prefix}/share/man 487 # the vlc executable needs to be started with a full path to the app bundle executable 488 # or else the Mac OS X interface will hang beyond even a ^C or ^\ : 489 move ${destroot}${prefix}/bin/vlc ${destroot}${prefix}/bin/vlc.exe 490 system "echo \"#!/bin/sh\nexec \\\"${applications_dir}/VLC.app/Contents/MacOS/VLC\\\" \\\"\\\$\@\\\"\" > ${destroot}${prefix}/bin/vlc" 491 system "chmod 755 ${destroot}${prefix}/bin/vlc" 492 } else { 493 delete ${destroot}${prefix}/bin 494 delete ${destroot}${prefix}/share/applications 495 delete ${destroot}${prefix}/share/man 496 } 462 497 } 463 498 } 464 } 465 post-activate { 466 if {[variant_isset qt4] || [variant_isset qt5]} { 467 notes-append "The Qt interface modules for VLC are currently dysfunctional. If you encounter bugs with them, please file them with VLC and not MacPorts." 499 post-activate { 500 if {[variant_isset qt4] || [variant_isset qt5]} { 501 notes-append "The Qt interface modules for VLC are currently dysfunctional. If you encounter bugs with them, please file them with VLC and not MacPorts." 502 } 503 system "${prefix}/lib/vlc/vlc-cache-gen -f ${prefix}/lib/vlc" 468 504 } 469 system "${prefix}/lib/vlc/vlc-cache-gen -f ${prefix}/lib/vlc"470 505 } 471 506 } 472 507 508 ## 509 ################# support port ffmpeg-VLC ################## 510 ## 511 if {${subport} eq "ffmpeg-VLC"} { 512 version 2.8.6 513 revision 1 514 license LGPL-2.1+ 515 categories multimedia 516 maintainers gmail.com:rjvbertin openmaintainer 517 518 description Custom FFMpeg build for port:VLC and port:libVLC. 519 long_description Custom FFMpeg build for port:VLC and port:libVLC. 520 521 platforms darwin 522 homepage http://www.ffmpeg.org/ 523 master_sites http://www.ffmpeg.org/releases/ 524 525 use_bzip2 yes 526 distname ffmpeg-${version} 527 528 checksums rmd160 5b61b6b0521d39ca31dcfb7fff1dfa26d9e7667a \ 529 sha256 40611e329bc354592c6f8f1deb033c31b91f80e91f5707ca4f9afceca78d8e62 530 531 depends_build port:pkgconfig \ 532 port:gmake 533 534 # libvpx is static only so can be considered a build dependency (#47934) 535 536 depends_build-append \ 537 port:libvpx 538 539 depends_lib port:lame \ 540 port:libiconv \ 541 port:openjpeg15 \ 542 port:xz \ 543 port:zlib 544 545 # depends_lib-append port:libvorbis \ 546 # port:libopus \ 547 # port:libogg \ 548 # port:libtheora \ 549 # port:libass \ 550 # port:gnutls \ 551 # port:fontconfig \ 552 # port:freetype \ 553 # port:bzip2 554 555 build.cmd ${prefix}/bin/gmake 556 build.env-append V=1 557 558 # 559 # enable auto configure of asm optimizations 560 # requires Xcode 3.1 or better on Leopard 561 # 562 minimum_xcodeversions {9 3.1} 563 564 if {[lsearch [get_canonical_archs] i386] != -1} { 565 # clang-3.1 hits https://trac.macports.org/ticket/30137 (<rdar://problem/11542429>) 566 # clang-139 hits https://trac.macports.org/ticket/38141 567 compiler.blacklist-append {clang < 422.1.7} 568 } 569 570 configure.cflags-append -DHAVE_LRINTF ${configure.cppflags} 571 configure.args --prefix=${FFMPEG_VLC_PREFIX} \ 572 --progs-suffix=-VLC \ 573 --build-suffix=-VLC \ 574 --disable-doc \ 575 --disable-encoder=vorbis \ 576 --enable-libopenjpeg \ 577 --disable-debug \ 578 --disable-avdevice \ 579 --disable-devices \ 580 --disable-avfilter \ 581 --disable-filters \ 582 --disable-protocol=concat \ 583 --disable-bsfs \ 584 --disable-bzlib \ 585 --enable-avresample \ 586 --enable-libmp3lame \ 587 --enable-libvpx \ 588 --disable-libbluray \ 589 --disable-sdl \ 590 --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --disable-libxcb-shape \ 591 --enable-shared --disable-static --enable-pthreads \ 592 --cc=${configure.cc} 593 594 # this is the old gpl2 variant. VLC is GPL2'ed, so we can just as well build ffmpeg 595 # with these components. 596 configure.args-append \ 597 --enable-gpl \ 598 --enable-postproc 599 # configure.args-append \ 600 # --enable-libx264 \ 601 # --enable-libxvid 602 # depends_lib-append port:XviD \ 603 # port:x264 604 605 configure.args-append \ 606 --arch=${configure.build_arch} 607 configure.env-append \ 608 ASFLAGS='[get_canonical_archflags]' 609 if {${build_arch} eq "x86_64"} { 610 depends_build-append \ 611 port:yasm 612 configure.args-append \ 613 --enable-yasm 614 } 615 616 license GPL-2+ 617 618 platform darwin { 619 if {${os.major} < 9} { 620 configure.args-append --disable-asm 621 } 622 623 # VDA (video hardware acceleration, mostly H264) is only supported on 10.6.3+ up to (excluding) 10.11. 624 #if {(${os.major} > 10 || (${os.major} == 10 && ${os.minor} >= 3)) && (${os.major} < 15)} 625 # Due to a bug in ffmpeg(?), we have to enable VDA on 10.11 as well, even though it shouldn't be supported. 626 # More information: https://github.com/mpv-player/mpv/issues/2299 627 if {${os.major} > 10 || (${os.major} == 10 && ${os.minor} >= 3)} { 628 configure.args-delete --disable-vda 629 configure.args-append --enable-vda 630 } 631 632 # VideotoolBox, a new hardware acceleration framework, is supported on 10.8+ and "here to stay". 633 # It provides support for H264, H263, MPEG1, MPEG2 and MPEG4. 634 if {${os.major} > 11} { 635 configure.args-delete --disable-videotoolbox 636 configure.args-append --enable-videotoolbox 637 } 638 639 # Apple GCC has problems with SIMD intrinsics and -Werror=no-missing-prototypes. 640 if {${os.major} < 11} { 641 patchfiles-append patch-configure-no-error-on-missing-prototypes.diff 642 } 643 644 # kCVPixelFormatType_OneComponent8 used in avfoundation indev is only available on 10.8+ 645 if {${os.major} < 12} { 646 configure.args-append --disable-indev=avfoundation 647 } 648 } 649 650 # 651 # configure isn't autoconf and they do use a dep cache 652 # 653 654 platform darwin 8 { 655 post-patch { 656 reinplace "s:,-compatibility_version,$\(LIBMAJOR\)::" ${worksrcpath}/configure 657 } 658 } 659 660 destroot.target install-libs install-headers 661 662 post-destroot { 663 file delete -force ${destroot}${prefix}/share/examples 664 # We need to make sure that the linker will use our libraries and not one 665 # from a location like ${prefix}/lib . That's why we use --build-suffix, but 666 # that still requires us to provide pkg-config files with the standard names: 667 foreach pc [glob ${destroot}${FFMPEG_VLC_PREFIX}/lib/pkgconfig/*.pc] { 668 set standardname [strsed ${pc} "s/-VLC.pc/.pc/"] 669 ln -s [file tail ${pc}] ${standardname} 670 } 671 } 672 673 livecheck.type regex 674 livecheck.url ${master_sites} 675 livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}" 676 } 677 473 678 # kate: backspace-indents true; indent-pasted-text true; indent-width 4; keep-extra-spaces true; remove-trailing-spaces modified; replace-tabs true; replace-tabs-save true; syntax Tcl/Tk; tab-indents true; tab-width 4; -
files/patch-static_assert.diff
1 --- config.h.orig 2016-03-22 15:34:33.000000000 +0000 2 +++ config.h 2016-03-22 15:34:57.000000000 +0000 3 @@ -793,6 +793,7 @@ 4 /* Define to `int' if <stddef.h> does not define. */ 5 /* #undef ssize_t */ 6 7 +#define static_assert _Static_assert 8 #include <vlc_fixups.h> 9 10 11