wiiuse 0.15.4 (new formula)
Closes #43996. Signed-off-by: Thierry Moisan <thierry.moisan@gmail.com>
This commit is contained in:
parent
6201950128
commit
7af62e7fce
1 changed files with 35 additions and 0 deletions
35
Formula/wiiuse.rb
Normal file
35
Formula/wiiuse.rb
Normal 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
|
Loading…
Reference in a new issue