| 1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/dev-libs/cdk/cdk-5.0.20120323.ebuild,v 1.1 2012/03/25 23:40:22 radhermit Exp $ |
| 4 |
|
| 5 |
EAPI=4 |
| 6 |
|
| 7 |
inherit eutils versionator |
| 8 |
|
| 9 |
MY_P="${PN}-$(replace_version_separator 2 -)" |
| 10 |
DESCRIPTION="A library of curses widgets" |
| 11 |
HOMEPAGE="http://dickey.his.com/cdk/cdk.html" |
| 12 |
SRC_URI="ftp://invisible-island.net/cdk/${MY_P}.tgz" |
| 13 |
|
| 14 |
LICENSE="BSD" |
| 15 |
SLOT="0" |
| 16 |
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris" |
| 17 |
IUSE="examples static-libs unicode" |
| 18 |
|
| 19 |
DEPEND=">=sys-libs/ncurses-5.2[unicode?]" |
| 20 |
RDEPEND="${DEPEND}" |
| 21 |
|
| 22 |
S="${WORKDIR}/${MY_P}" |
| 23 |
|
| 24 |
src_prepare() { |
| 25 |
epatch "${FILESDIR}"/${P}-ldflags.patch \ |
| 26 |
"${FILESDIR}"/${PN}-5.0.20110517-makefile.patch \ |
| 27 |
"${FILESDIR}"/${P}-parallel-make.patch |
| 28 |
} |
| 29 |
|
| 30 |
src_configure() { |
| 31 |
local ncursesw |
| 32 |
use unicode && ncursesw="w" |
| 33 |
|
| 34 |
econf --with-ncurses${ncursesw} --with-libtool |
| 35 |
} |
| 36 |
|
| 37 |
src_install() { |
| 38 |
emake \ |
| 39 |
DESTDIR="${ED}" \ |
| 40 |
DOCUMENT_DIR="${ED}/usr/share/doc/${P}" install |
| 41 |
|
| 42 |
if use examples ; then |
| 43 |
for x in include c++ demos examples cli cli/utils cli/samples; do |
| 44 |
docinto $x |
| 45 |
find $x -maxdepth 1 -mindepth 1 -type f -print0 | xargs -0 dodoc |
| 46 |
done |
| 47 |
fi |
| 48 |
|
| 49 |
use static-libs || find "${ED}" \( -name '*.a' -or -name '*.la' \) -delete |
| 50 |
} |