require 'buildsystems/cmake' class Libxml2 < CMake description 'Libxml2 is the XML C parser and toolkit developed for the Gnome project.' homepage 'http://xmlsoft.org/' version "2.15.2-#{CREW_ICU_VER}" license 'MIT' compatibility 'all' source_url 'https://gitlab.gnome.org/GNOME/libxml2.git' git_hashtag "v#{version.split('-').first}" binary_compression 'tar.zst' binary_sha256({ aarch64: '8c06b4d9590415a94815a9ba5ddac463baf7ef1bbc0813fecc2aafef0cd31231', armv7l: '8c06b4d9590415a94815a9ba5ddac463baf7ef1bbc0813fecc2aafef0cd31231', i686: '34596e54287111391d5f35d3bba8aa0da93732c8c45bfe9e8f9f6bd767a92dc4', x86_64: 'df0e15e774775cde7f92dc91237c190f18639014857910e6db623c75696c1032' }) depends_on 'gcc_lib' # R depends_on 'glibc' # R depends_on 'icu4c' # R conflicts_ok gnome def self.patch # Fix encoding.c:1961:31: error: ‘TRUE’ undeclared (first use in this function) system "for f in $(grep -rl 'TRUE)'); do sed -i 's,TRUE),true),g' $f; done" # Remove EBCDIC test since it fails. # Check https://mail.gnome.org/archives/xml/2010-April/msg00010.html for details. FileUtils.rm 'test/ebcdic_566012.xml' end cmake_options '-DLIBXML2_WITH_PYTHON=OFF \ -DLIBXML2_WITH_LZMA=OFF \ -DLIBXML2_WITH_ICU=ON' end