# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ WANT_AUTOCONF="2.5" WANT_AUTOMAKE="latest" inherit autotools eutils flag-o-matic KEYWORDS="~amd64 x86" DESCRIPTION="Library of C++ classes for flexible logging to files, syslog and other destinations" HOMEPAGE="http://logging.apache.org/log4cxx/" MY_P="apache-${P}" SRC_URI="http://www.apache.org/dist/logging/${PN}/${PV}/${MY_P}.tar.gz" LICENSE="Apache-2.0" SLOT="0" IUSE="iodbc odbc smtp test" RESTRICT="nomirror" RDEPEND=">=dev-libs/apr-1 >=dev-libs/apr-util-1 odbc? ( iodbc? ( >=dev-db/libiodbc-3.52.4 ) !iodbc? ( dev-db/unixODBC ) ) smtp? ( dev-libs/libsmtp )" DEPEND="${RDEPEND} test? ( dev-libs/boost dev-util/cppunit )" S="${WORKDIR}/${MY_P}" pkg_setup() { if use iodbc && ! use odbc ; then elog "Please enable the odbc USE-flag as well if you want odbc-support through iodbc." fi } src_unpack() { unpack ${A} cd "${S}" } src_compile() { use smtp && myconf="${myconf} --with-SMTP=libsmtp" if use odbc ; then if use iodbc ; then myconf="${myconf} --with-ODBC=iODBC" else myconf="${myconf} --with-ODBC=unixODBC" fi fi use test && myconf="${myconf} --enable-cppunit" econf ${myconf} emake || die "emake failed" } src_install() { emake DESTDIR="${D}" install || die "make install failed" }