]> Pileus Git - ~andy/sunrise/blob - dev-cpp/libcutl/libcutl-1.1.1.ebuild
38e8bb8d0591b1cf71ce6b6737b45fb1b1346947
[~andy/sunrise] / dev-cpp / libcutl / libcutl-1.1.1.ebuild
1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=2
6
7 inherit multilib toolchain-funcs versionator
8
9 MY_PV="$(get_version_component_range 1-2)"
10 DESCRIPTION="Library of C++ utilities with evil buildsystem"
11 HOMEPAGE="http://codesynthesis.com/projects/libcutl/"
12 SRC_URI="http://codesynthesis.com/download/${PN}/${MY_PV}/${P}.tar.bz2"
13
14 LICENSE="as-is"
15 SLOT="0"
16 KEYWORDS="~amd64"
17 IUSE=""
18
19 # dev-zero's overlay has an old, incompatible version of build-0.3.3
20 DEPEND=">=dev-util/build-0.3.5:0.3"
21 RDEPEND=""
22
23 src_prepare() {
24         mkdir -p build/cxx/gnu || die
25         echo "cxx_id := gnu" >> build/cxx/configuration-dynamic.make || die
26
27         echo "cxx_gnu := $(tc-getCXX)" >> build/cxx/gnu/configuration-dynamic.make || die
28         echo "cxx_gnu_optimization_options := ${CXXFLAGS}" >> build/cxx/gnu/configuration-dynamic.make || die
29
30         mkdir -p build/ld || die
31         echo "ld_lib_type := shared" >> build/ld/configuration-lib-dynamic.make || die
32
33         # remove documentation installation target because it's just dirty
34         sed -i -e '/LICENSE)$/,/README)$/d' makefile || die "failed to fix bad documentation installation target"
35 }
36
37 src_install() {
38         # install_lib_dir requires a terminating slash because of a bug in libcutl's makefiles
39         emake verbose=1 install_prefix="${D}/usr" install_lib_dir="${D}/usr/$(get_libdir)/" \
40                 install || die
41
42         dodoc README NEWS TODO || die
43 }
44
45 src_test() {
46         # dev-util/build doesn't use libtool, so we have to specify the -rpath
47         # for tests with LD_LIBRARY_PATH to avoid polluting the installed
48         # libcutl.so with extraneous -rpaths (I think...)
49         LD_LIBRARY_PATH="${S}/cutl:${LD_LIBRARY_PATH}" emake test || die
50 }