# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortGroup clang_dependency 1.0
# Please keep the version of the libxml2 and py-libxml2 ports the same.
description GNOME XML C parser and toolkit
long_description Libxml is the XML C library developed for the GNOMEproject. \
XML itself is a metalanguage to design markup languages. \
Though the library is written in C, a variety of language bindings make it \
available in other environments.
homepage http://xmlsoft.org/
depends_build port:pkgconfig
depends_lib port:libiconv \
master_sites ${homepage}sources/ \
ftp://xmlsoft.org/${name}/
checksums rmd160 a7d5f9ca4a24db329108f4bfb6bd4eed0f61ab21 \
sha256 94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871 \
# This port is used by clang-3.4 to bootstrap libcxx
subport ${name}-bootstrap {
set my_prefix ${prefix}/libexec/libcxx-bootstrap
configure.pre_args --prefix=${my_prefix}
configure.cppflags-prepend -I${my_prefix}/include
configure.ldflags-prepend -L${my_prefix}/lib
configure.env-append PATH=${my_prefix}/bin:$::env(PATH)
depends_build-replace port:pkgconfig port:pkgconfig-bootstrap
depends_lib-replace port:libiconv port:libiconv-bootstrap \
port:icu port:icu-bootstrap \
port:xz port:xz-bootstrap
compiler.whitelist clang llvm-gcc-4.2 gcc-4.2 apple-gcc-4.2
# Also needed by later clangs.
if {${os.platform} eq "darwin" && ${os.major} < 11 && ${cxx_stdlib} eq "libc++"} {
clang_dependency.extra_versions 3.7
patchfiles-append include.patch
reinplace "s|@PREFIX@|${my_prefix}|g" ${worksrcpath}/include/libxml/encoding.h
reinplace -locale C "s|/etc|${my_prefix}/etc|g" \
${worksrcpath}/catalog.c \