You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-libs/mini-xml/mini-xml-2.8.ebuild

62 lines
1.3 KiB

# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit autotools multilib
MY_P="${P/mini-xml/mxml}"
DESCRIPTION="Small XML parsing library to read XML and XML-like data files"
HOMEPAGE="http://www.minixml.org/"
SRC_URI="http://www.msweet.org/files/project3/${MY_P}.tar.gz"
LICENSE="Mini-XML"
SLOT="0"
KEYWORDS="amd64 ~arm ~hppa ppc ~ppc64 x86"
IUSE="threads static-libs"
DEPEND="virtual/pkgconfig"
RDEPEND=""
S="${WORKDIR}/${MY_P}"
src_prepare() {
sed -e "s:755 -s:755:" \
-e "/^TARGETS/s: testmxml::" \
-e 's:$(DSO) $(DSOFLAGS) -o libmxml.so.1.5 $(LIBOBJS):$(DSO) $(DSOFLAGS) $(LDFLAGS) -o libmxml.so.1.5 $(LIBOBJS):' \
-i Makefile.in || die "sed failed"
sed -i -e 's:OPTIM="-Os -g":OPTIM="":' configure.in || die "sed failed"
rm configure
# eautoreconf
eautoconf
}
src_configure() {
econf \
--enable-shared \
--libdir="/usr/$(get_libdir)" \
--with-docdir="/usr/share/doc/${PF}/html" \
$(use_enable threads)
}
src_compile() {
emake libmxml.so.1.5 mxmldoc doc/mxml.man
}
src_install() {
emake DSTROOT="${D}" install
if ! use static-libs; then
rm "${ED}"/usr/$(get_libdir)/libmxml.a || die
fi
dodoc ANNOUNCEMENT CHANGES README
rm "${D}/usr/share/doc/${PF}/html/"{CHANGES,COPYING,README} || die
}
src_test() {
emake testmxml
}