1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit flag-o-matic toolchain-funcs eutils multilib
8 DESCRIPTION="a simple, small, C++ XML parser that can be easily integrating into other programs"
9 HOMEPAGE="http://www.grinninglizard.com/tinyxml/index.html"
10 SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV//./_}.tar.gz"
14 KEYWORDS="amd64 ~arm ~arm64 ~ia64 ppc ~ppc64 sparc x86 ~x64-macos ~x86-macos"
15 IUSE="debug doc static-libs +stl"
18 DEPEND="doc? ( app-doc/doxygen )"
24 major_v=$(echo ${PV} | cut -d \. -f 1)
25 minor_v=$(echo ${PV} | cut -d \. -f 2-3)
27 sed -e "s:@MAJOR_V@:$major_v:" \
28 -e "s:@MINOR_V@:$minor_v:" \
29 "${FILESDIR}"/Makefile-3 > Makefile || die
31 epatch "${FILESDIR}"/${PN}-2.6.1-entity.patch
33 use debug && append-cppflags -DDEBUG
34 use stl && epatch "${FILESDIR}"/${P}-defineSTL.patch
36 if ! use static-libs; then
37 sed -e "/^all:/s/\$(name).a //" -i Makefile || die
40 tc-export AR CXX RANLIB
42 [[ ${CHOST} == *-darwin* ]] && export LIBDIR="${EPREFIX}"/usr/$(get_libdir)
46 dolib.so *$(get_libname)*
51 dodoc {changes,readme}.txt
53 use doc && dohtml -r docs/*