homebrew-core/Formula/pc6001vx.rb

36 lines
1.4 KiB
Ruby

class Pc6001vx < Formula
desc "PC-6001 emulator"
homepage "https://eighttails.seesaa.net/"
url "https://eighttails.up.seesaa.net/bin/PC6001VX_3.5.2_src.tar.gz"
sha256 "0e3052a6c9f8504943b46a92f950d1d706ed4e47b9cff312306eb82ad27b553c"
license "LGPL-2.1"
head "https://github.com/eighttails/PC6001VX.git"
bottle do
cellar :any
sha256 "6710d77319faeafe8e4f3719a79827311065a3faa7f04bb30393209b6357b067" => :catalina
sha256 "c7276580bc2c742722fbe10c6a69ccddd9e68dd26682e42a560131962302fdf3" => :mojave
sha256 "f7b5e4e335a22a6962a6ff2f7844ed64672243307abe97fe6324afac2636788c" => :high_sierra
end
depends_on "pkg-config" => :build
depends_on "ffmpeg"
depends_on "qt"
depends_on "sdl2"
def install
# Need to explicitly set up include directories
ENV.append_to_cflags "-I#{Formula["sdl2"].opt_include}"
ENV.append_to_cflags "-I#{Formula["ffmpeg"].opt_include}"
# Turn off errors on C++11 build which used for properly linking standard lib
ENV.append_to_cflags "-Wno-reserved-user-defined-literal"
# Use libc++ explicitly, otherwise build fails
ENV.append_to_cflags "-stdlib=libc++" if ENV.compiler == :clang
system "qmake", "PREFIX=#{prefix}", "QMAKE_CXXFLAGS=#{ENV.cxxflags}", "CONFIG+=c++11"
system "make"
prefix.install "PC6001VX.app"
bin.write_exec_script "#{prefix}/PC6001VX.app/Contents/MacOS/PC6001VX"
end
end