Revert DOCTYPE SYSTEM https changes in metadata.xml
[gentoo.git] / dev-libs / tinyxml / tinyxml-2.6.2-r2.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=4
6 inherit flag-o-matic toolchain-funcs eutils multilib
7
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"
11
12 LICENSE="ZLIB"
13 SLOT="0"
14 KEYWORDS="amd64 ~arm ~arm64 ~ia64 ppc ~ppc64 sparc x86 ~x64-macos ~x86-macos"
15 IUSE="debug doc static-libs +stl"
16
17 RDEPEND=""
18 DEPEND="doc? ( app-doc/doxygen )"
19
20 S="${WORKDIR}/${PN}"
21
22 src_prepare() {
23         local major_v minor_v
24         major_v=$(echo ${PV} | cut -d \. -f 1)
25         minor_v=$(echo ${PV} | cut -d \. -f 2-3)
26
27         sed -e "s:@MAJOR_V@:$major_v:" \
28             -e "s:@MINOR_V@:$minor_v:" \
29                 "${FILESDIR}"/Makefile-3 > Makefile || die
30
31         epatch "${FILESDIR}"/${PN}-2.6.1-entity.patch
32
33         use debug && append-cppflags -DDEBUG
34         use stl && epatch "${FILESDIR}"/${P}-defineSTL.patch
35
36         if ! use static-libs; then
37                 sed -e "/^all:/s/\$(name).a //" -i Makefile || die
38         fi
39
40         tc-export AR CXX RANLIB
41
42         [[ ${CHOST} == *-darwin* ]] && export LIBDIR="${EPREFIX}"/usr/$(get_libdir)
43 }
44
45 src_install() {
46         dolib.so *$(get_libname)*
47
48         insinto /usr/include
49         doins *.h
50
51         dodoc {changes,readme}.txt
52
53         use doc && dohtml -r docs/*
54 }