49 lines
1.8 KiB
Ruby
49 lines
1.8 KiB
Ruby
class C10t < Formula
|
|
desc "Minecraft cartography tool"
|
|
homepage "https://github.com/udoprog/c10t"
|
|
url "https://github.com/udoprog/c10t/archive/1.7.tar.gz"
|
|
sha256 "0e5779d517105bfdd14944c849a395e1a8670bedba5bdab281a0165c3eb077dc"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "ee486643c14a847b7cc83549ab65049d4ce86dfa92caa31b985cd6751060d16c" => :el_capitan
|
|
sha256 "f92f8344c43c7c02351d1e4d6868949c31c97e6a71decac044a7d5b104a67329" => :yosemite
|
|
sha256 "77e6d3767099897ef8dab8587a73a19f460c158647cfc67fe82230ecf234c90e" => :mavericks
|
|
end
|
|
|
|
depends_on "cmake" => :build
|
|
depends_on "boost"
|
|
depends_on "freetype"
|
|
|
|
# Needed to compile against newer boost
|
|
# Can be removed for the next version of c10t after 1.7
|
|
# See: https://github.com/udoprog/c10t/pull/153
|
|
patch do
|
|
url "https://github.com/udoprog/c10t/commit/4a392b9f06d08c70290f4c7591e84ecdbc73d902.diff"
|
|
sha256 "f2d7b1772672f7769adab0eaf081887399de772e72ad1fa53caa0856d50b9a8a"
|
|
end
|
|
|
|
# Fix freetype detection; adapted from this upstream commit:
|
|
# https://github.com/udoprog/c10t/commit/2a2b8e49d7ed4e51421cc71463c1c2404adc6ab1
|
|
patch do
|
|
url "https://gist.githubusercontent.com/mistydemeo/f7ab02089c43dd557ef4/raw/a0ae7974e635b8ebfd02e314cfca9aa8dc95029d/c10t-freetype.diff"
|
|
sha256 "9fbb7ccc643589ac1d648e105369e63c9220c26d22f7078a1f40b27080d05db4"
|
|
end
|
|
|
|
# Ensure zlib header is included for libpng; fixed upstream
|
|
patch do
|
|
url "https://github.com/udoprog/c10t/commit/800977bb23e6b4f9da3ac850ac15dd216ece0cda.diff"
|
|
sha256 "4c8953bdc46b1b2063abe0d1768e7116b9092d49f16161732e39e4abb5622ec1"
|
|
end
|
|
|
|
def install
|
|
inreplace "test/CMakeLists.txt", "boost_unit_test_framework", "boost_unit_test_framework-mt"
|
|
system "cmake", ".", *std_cmake_args
|
|
system "make"
|
|
bin.install "c10t"
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/c10t", "--list-colors"
|
|
end
|
|
end
|