From eee7d87f39ca4c5ff430165b78df65134e5c45bc Mon Sep 17 00:00:00 2001
From: Dominyk Tiller <dominyktiller@gmail.com>
Date: Sun, 27 May 2018 04:49:01 +0100
Subject: [PATCH] mame: fix third-party build

---
 Formula/mame.rb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Formula/mame.rb b/Formula/mame.rb
index fbcb519e4c..7f36cdbd18 100644
--- a/Formula/mame.rb
+++ b/Formula/mame.rb
@@ -36,6 +36,11 @@ class Mame < Formula
 
   def install
     inreplace "scripts/src/osd/sdl.lua", "--static", ""
+
+    # 3rdparty/sol2/sol/compatibility/version.hpp:30:10
+    # fatal error: 'lua.hpp' file not found
+    ENV.append "CPPFLAGS", "-I#{Formula["lua"].opt_include}/lua"
+
     system "make", "USE_LIBSDL=1",
                    "USE_SYSTEM_LIB_EXPAT=1",
                    "USE_SYSTEM_LIB_ZLIB=1",