wiiuse 0.15.4 (new formula)

Closes #43996.

Signed-off-by: Thierry Moisan <thierry.moisan@gmail.com>
This commit is contained in:
Nathan Whetsell 2019-09-07 06:33:33 -04:00 committed by Thierry Moisan
parent 6201950128
commit 7af62e7fce
No known key found for this signature in database
GPG key ID: A9A4CB593D38CDD0

35
Formula/wiiuse.rb Normal file
View file

@ -0,0 +1,35 @@
class Wiiuse < Formula
desc "Connect Nintendo Wii Remotes"
homepage "https://github.com/wiiuse/wiiuse"
url "https://github.com/wiiuse/wiiuse/archive/0.15.4.tar.gz"
sha256 "45be974acc418b8c8e248d960f3c0da143a513f6404a9c5cc5aa0072934b0cc4"
depends_on "cmake" => :build
def install
args = std_cmake_args + %w[
-DBUILD_EXAMPLE=NO
-DBUILD_EXAMPLE_SDL=NO
]
mkdir "build" do
system "cmake", "..", *args
system "make", "install"
end
end
test do
(testpath/"test.cpp").write <<~EOS
#include <wiiuse.h>
int main()
{
int wiimoteCount = 1;
wiimote** wiimotes = wiiuse_init(wiimoteCount);
wiiuse_cleanup(wiimotes, wiimoteCount);
return 0;
}
EOS
system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-l", "wiiuse", "-o", "test"
system "./test"
end
end