| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/net-mail/libpst/libpst-0.6.54-r1.ebuild,v 1.7 2012/06/28 10:40:11 ago Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
PYTHON_DEPEND="python? 2"
|
| 7 |
|
| 8 |
inherit autotools eutils python
|
| 9 |
|
| 10 |
DESCRIPTION="Tools and library for reading Outlook files (.pst format)"
|
| 11 |
HOMEPAGE="http://www.five-ten-sg.com/libpst/"
|
| 12 |
SRC_URI="http://www.five-ten-sg.com/${PN}/packages/${P}.tar.gz"
|
| 13 |
|
| 14 |
LICENSE="GPL-2"
|
| 15 |
SLOT="0"
|
| 16 |
KEYWORDS="~alpha amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc x86"
|
| 17 |
IUSE="debug dii doc python static-libs"
|
| 18 |
|
| 19 |
RDEPEND="dii? ( media-gfx/imagemagick[png] )"
|
| 20 |
DEPEND="${RDEPEND}
|
| 21 |
virtual/libiconv
|
| 22 |
virtual/pkgconfig
|
| 23 |
dii? ( media-libs/gd[png] )
|
| 24 |
python? ( >=dev-libs/boost-1.48[python] )"
|
| 25 |
|
| 26 |
pkg_setup() {
|
| 27 |
if use python; then
|
| 28 |
python_set_active_version 2
|
| 29 |
python_pkg_setup
|
| 30 |
fi
|
| 31 |
}
|
| 32 |
|
| 33 |
src_prepare() {
|
| 34 |
# don't build the static python library
|
| 35 |
epatch "${FILESDIR}"/${PN}-0.6.52-no-static-python-lib.patch
|
| 36 |
|
| 37 |
# fix pkgconfig file for static linking
|
| 38 |
epatch "${FILESDIR}"/${PN}-0.6.53-pkgconfig-static.patch
|
| 39 |
|
| 40 |
# conditionally install the extra documentation
|
| 41 |
use doc || { sed -i -e "/SUBDIRS/s: html::" Makefile.am || die; }
|
| 42 |
|
| 43 |
# don't install duplicate docs
|
| 44 |
sed -i -e "/^html_DATA =/d" Makefile.am || die
|
| 45 |
|
| 46 |
eautoreconf
|
| 47 |
}
|
| 48 |
|
| 49 |
src_configure() {
|
| 50 |
econf \
|
| 51 |
--enable-libpst-shared \
|
| 52 |
$(use_enable debug pst-debug) \
|
| 53 |
$(use_enable dii) \
|
| 54 |
$(use_enable python) \
|
| 55 |
$(use_enable static-libs static) \
|
| 56 |
$(use python && echo --with-boost-python=boost_python-${PYTHON_ABI})
|
| 57 |
}
|
| 58 |
|
| 59 |
src_install() {
|
| 60 |
default
|
| 61 |
prune_libtool_files --all
|
| 62 |
}
|