2 arch arm: "arm64", intel: "x86_64"
3 livecheck_arch = on_arch_conditional arm: "arm64", intel: "intel64"
6 version "4.0.0,20250119-0413,656953f5"
7 sha256 "4648a73554c7857ceb215e66a1a0f2b54be3e49968fe49b35da621c0c5593c01"
10 version "4.0.0,20250119-0415,656953f5"
11 sha256 "32c2cae6252f5a9e164c680f29abfa4a0b7aff52750bc88be80455ddeeda14ba"
14 url "https://artifacts.videolan.org/vlc/nightly-macos-#{arch}/#{version.csv.second}/vlc-#{version.csv.first}-dev-#{livecheck_arch}-#{version.csv.third}.dmg"
15 name "VLC media player"
16 desc "Open-source cross-platform multimedia player"
17 homepage "https://www.videolan.org/vlc/"
20 url "https://artifacts.videolan.org/vlc/nightly-macos-#{arch}/"
21 regex(/href=.*?vlc[._-]v?(\d+(?:\.\d+)+)[._-]dev[._-]#{livecheck_arch}[._-](\h+)\.dmg/i)
22 strategy :page_match do |page, regex|
23 directory = page.scan(%r{href=["']?v?(\d+(?:[.-]\d+)+)/?["' >]}i)
27 next if directory.blank?
29 # Fetch the directory listing page for newest build
30 build_response = Homebrew::Livecheck::Strategy.page_content(
31 "https://artifacts.videolan.org/vlc/nightly-macos-#{arch}/#{directory}/",
33 next if (build_page = build_response[:content]).blank?
35 match = build_page.match(regex)
38 "#{match[1]},#{directory},#{match[2]}"
42 conflicts_with cask: "vlc"
45 # shim script (https://github.com/Homebrew/homebrew-cask/issues/18809)
46 shimscript = "#{staged_path}/vlc.wrapper.sh"
47 binary shimscript, target: "vlc"
50 File.write shimscript, <<~EOS
52 exec '#{appdir}/VLC.app/Contents/MacOS/VLC' "$@"
57 "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/org.videolan.vlc.sfl*",
58 "~/Library/Application Support/org.videolan.vlc",
59 "~/Library/Application Support/VLC",
60 "~/Library/Caches/org.videolan.vlc",
61 "~/Library/Preferences/org.videolan.vlc",
62 "~/Library/Preferences/org.videolan.vlc.plist",
63 "~/Library/Saved Application State/org.videolan.vlc.savedState",