2013-08-24 00:27:20 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Tinyxml < Formula
|
|
|
|
homepage 'http://www.grinninglizard.com/tinyxml/'
|
2014-02-27 14:19:55 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/tinyxml/tinyxml/2.6.2/tinyxml_2_6_2.tar.gz'
|
2013-08-24 00:27:20 +00:00
|
|
|
sha1 'cba3f50dd657cb1434674a03b21394df9913d764'
|
|
|
|
|
|
|
|
option :universal
|
|
|
|
|
|
|
|
depends_on 'cmake' => :build
|
|
|
|
|
2014-03-14 15:03:26 +00:00
|
|
|
# The first two patches are taken from the debian packaging of tinyxml.
|
|
|
|
# The first patch enforces use of stl strings, rather than a custom string type.
|
|
|
|
# The second patch is a fix for incorrect encoding of elements with special characters
|
|
|
|
# originally posted at http://sourceforge.net/p/tinyxml/patches/51/
|
|
|
|
# The third patch adds a CMakeLists.txt file to build a shared library and provide an install target
|
|
|
|
# submitted upstream as https://sourceforge.net/p/tinyxml/patches/66/
|
|
|
|
patch do
|
|
|
|
url "http://patch-tracker.debian.org/patch/series/dl/tinyxml/2.6.2-2/enforce-use-stl.patch"
|
|
|
|
sha1 "a1e243c0fb2fe3ba0f1138861d781284409116e2"
|
|
|
|
end
|
|
|
|
|
|
|
|
patch do
|
|
|
|
url "http://patch-tracker.debian.org/patch/series/dl/tinyxml/2.6.2-2/entity-encoding.patch"
|
|
|
|
sha1 "a64b7ace370419d36d95452befd82935ef8b0221"
|
|
|
|
end
|
|
|
|
|
|
|
|
patch do
|
|
|
|
url "https://gist.github.com/scpeters/6325123/raw/cfb079be67997cb19a1aee60449714a1dedefed5/tinyxml_CMakeLists.patch"
|
|
|
|
sha1 "90c69322296a4144795aa66a94233a9409ff7ea5"
|
2013-08-24 00:27:20 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV.universal_binary if build.universal?
|
2013-09-06 06:22:01 +00:00
|
|
|
system "cmake", ".", *std_cmake_args
|
2013-08-24 00:27:20 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
end
|