2 arch arm: "arm64", intel: "x86_64"
3 livecheck_arch = on_arch_conditional arm: "-arm64", intel: "-intel64"
6 version "4.0.0,20241203-0413,e65b2754"
7 sha256 "3168b23969ce752000277da3c42889b8e138eb8d5b69f8fb41dae758d63ad806"
9 url "https://artifacts.videolan.org/vlc/nightly-macos-#{arch}/#{version.csv.second}/vlc-#{version.csv.first}-dev-arm64-#{version.csv.third}.dmg"
12 version "4.0.0,20241203-0415,e65b2754"
13 sha256 "72b52116bd7677490a2ca863d27fc6c232ff4cac1187922d3f8401a5baf66b12"
15 url "https://artifacts.videolan.org/vlc/nightly-macos-#{arch}/#{version.csv.second}/vlc-#{version.csv.first}-dev-intel64-#{version.csv.third}.dmg"
18 name "VLC media player"
19 desc "Open-source cross-platform multimedia player"
20 homepage "https://www.videolan.org/vlc/"
23 url "https://artifacts.videolan.org/vlc/nightly-macos-#{arch}/"
24 regex(/href=.*?vlc[._-]v?(\d+(?:\.\d+)+)-dev#{livecheck_arch}-(\h+)\.dmg/i)
25 strategy :page_match do |page, regex|
26 directory = page.scan(%r{href=["']?v?(\d+(?:[.-]\d+)+)/?["' >]}i)
30 next if directory.blank?
32 # Fetch the directory listing page for newest build
33 build_response = Homebrew::Livecheck::Strategy.page_content(
34 "https://artifacts.videolan.org/vlc/nightly-macos-#{arch}/#{directory}/",
36 next if (build_page = build_response[:content]).blank?
38 match = build_page.match(regex)
41 "#{match[1]},#{directory},#{match[2]}"
45 deprecate! date: "2025-05-01", because: :unsigned
47 conflicts_with cask: "vlc"
50 # shim script (https://github.com/Homebrew/homebrew-cask/issues/18809)
51 shimscript = "#{staged_path}/vlc.wrapper.sh"
52 binary shimscript, target: "vlc"
55 File.write shimscript, <<~EOS
57 exec '#{appdir}/VLC.app/Contents/MacOS/VLC' "$@"
62 "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/org.videolan.vlc.sfl*",
63 "~/Library/Application Support/org.videolan.vlc",
64 "~/Library/Application Support/VLC",
65 "~/Library/Caches/org.videolan.vlc",
66 "~/Library/Preferences/org.videolan.vlc",
67 "~/Library/Preferences/org.videolan.vlc.plist",
68 "~/Library/Saved Application State/org.videolan.vlc.savedState",