Skip to content

Commit

Permalink
raylib 1.9.1-dev (new formula)
Browse files Browse the repository at this point in the history
Formula depends on build system changes that aren't in master, therefore
stable points to the oldest development tag that has the changes and
--HEAD points to the develop branch.

Next stable release is slated for Summer 2018.

Closes #21041.

Signed-off-by: ilovezfs <[email protected]>
  • Loading branch information
a3f authored and ilovezfs committed Nov 26, 2017
1 parent bfff71a commit 7f7b4bc
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions Formula/raylib.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
class Raylib < Formula
desc "Simple and easy-to-use library to learn videogames programming"
homepage "http://www.raylib.com/"
url "https://github.com/raysan5/raylib/archive/1.9.1-dev.tar.gz"
version "1.9.1-dev"
sha256 "892357fb44d340eb7449c23c425d660d98b34b91434400e7610514ef02698600"
head "https://github.com/raysan5/raylib.git", :branch => "develop"

depends_on "cmake" => :build

def install
system "cmake", ".", "-DSTATIC_RAYLIB=ON",
"-DSHARED_RAYLIB=ON",
"-DMACOS_FATLIB=OFF",
"-DBUILD_EXAMPLES=OFF",
"-DBUILD_GAMES=OFF",
*std_cmake_args
system "make", "install"
end

test do
(testpath/"test.c").write <<~EOS
#include <stdlib.h>
#include <raylib.h>
int main(void)
{
int num = GetRandomValue(42, 1337);
return 42 <= num && num <= 1337 ? EXIT_SUCCESS : EXIT_FAILURE;
}
EOS
system ENV.cc, "test.c", "-L#{lib}", "-lraylib", "-o", "test"
system "./test"
end
end

0 comments on commit 7f7b4bc

Please sign in to comment.