Skip to content

Instantly share code, notes, and snippets.

@clooth
Forked from blt/sfml.rb
Last active December 23, 2015 09:28
Show Gist options
  • Save clooth/6614365 to your computer and use it in GitHub Desktop.
Save clooth/6614365 to your computer and use it in GitHub Desktop.
require 'formula'
# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class Sfml < Formula
homepage 'http://www.sfml-dev.org'
version '2.0'
url 'http://www.sfml-dev.org/download/sfml/2.1/SFML-2.1-sources.zip'
sha1 'c27bdffdc4bedb5f6a20db03ceca715d42aa5752'
depends_on 'cmake' => :build
depends_on 'freetype' => :build
depends_on 'jpeg' => :build
depends_on 'glew' => :build
depends_on 'libsndfile' => :build
# libsndfile depends on them (it is all or none)
# flac, libogg, libvorbis
def install
ENV.universal_binary if build.include? 'universal'
args = std_cmake_args
args.delete '-DCMAKE_BUILD_TYPE=None'
args.push '-DCMAKE_BUILD_TYPE=Release', '-DINSTALL_EXTERNAL_LIBS=FALSE'
args.push '-DSFML_BUILD_FRAMEWORKS=TRUE', "-DCMAKE_INSTALL_FRAMEWORK_PREFIX=#{prefix}/Frameworks"
args << '-DBUILD_SHARED_LIBS=FALSE' if build.include? 'static'
system 'cmake', '.', *args
system 'make install'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment