# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="C++ version of the next generation of high performance, fully compliant XML parsers in the Apache Xerces family." HOMEPAGE="http://xml.apache.org/xerces-c" SRC_URI="http://xml.apache.org/dist/xerces-c/stable/xerces-c-src2_2_0.tar.gz" LICENSE="Apache" SLOT="0" KEYWORDS="~x86" # Why dont people use icc... it's free and it compiles WAY faster than gcc/g++ IUSE="icc" RDEPEND="virtual/glibc" DEPEND="icc ? (dev-lang/icc) \ sys-apps/sed \ sys-apps/textutils \ ${RDEPEND}" MY_PV=${PV/./_} MY_PV=${MY_PV/./_} S=${WORKDIR}/${PN}-src${MY_PV} export XERCESCROOT=${S} src_compile() { cd ${S}/src/xercesc cp runConfigure runConfigure.tmp sed -e 's/-w -O[0-9]*//' runConfigure.tmp > runConfigure if [ "`use icc`" ]; then # icc complains about htons (defined to __bswap_16 when running with -O) # sed below'll just insert an #undef htons, which makes the htons *function* # be used rather than the htons macro cd util/NetAccessors/Socket cp UnixHTTPURLInputStream.cpp UnixHTTPURLInputStream.cpp.tmp sed -e '/XERCES_CPP_NAMESPACE_BEGIN/i#ifdef htons \ #undef htons \ #endif \ ' UnixHTTPURLInputStream.cpp.tmp > UnixHTTPURLInputStream.cpp cd ../../.. ./runConfigure -p linux -c icc -x icc -r pthread -P /usr || die else ./runConfigure -p linux -c gcc -x g++ -r pthread -P /usr || die fi make || die } src_install() { cd ${S}/src/xercesc make PREFIX=${D}/usr install || die "Install failed." cd ${S} dodoc LICENSE STATUS credits.txt dohtml -r doc/html/* }