cask "semeru-jdk-open@8" do version "8u432-b06,openj9-0.48.0" sha256 "27cf7c00a24343c36a32cf74bab4f62b7412b2b686ce12e5b9a9891252d1a483" url "https://github.com/ibmruntimes/semeru8-binaries/releases/download/jdk#{version.csv.first}_#{version.csv.second}/ibm-semeru-open-jdk_x64_mac_#{version.csv.first.tr("-", "")}_#{version.csv.second}.pkg", verified: "github.com/ibmruntimes/semeru8-binaries/" name "IBM Semeru Runtime (JDK 8) Open Edition" desc "Production-ready JDK with the OpenJDK class libraries and the Eclipse OpenJ9 JVM" homepage "https://developer.ibm.com/languages/java/semeru-runtimes" livecheck do url :url regex(/^(?:jdk)?(\d+u\d+)[._-](b\d+)[._-](.+?)$/i) strategy :github_latest do |json, regex| json["tag_name"]&.scan(regex)&.map { |match| "#{match[0]}-#{match[1]},#{match[2]}" } end end pkg "ibm-semeru-open-jdk_x64_mac_#{version.csv.first.tr("-", "")}_#{version.csv.second}.pkg" uninstall pkgutil: "net.ibm-semeru-open.8.jdk" # No zap stanza required caveats do requires_rosetta end end