Gentoo Archives: gentoo-dev

From: Krzysiek Pawlik <nelchael@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: cmake.eclass
Date: Sun, 04 Nov 2007 12:37:20
Message-Id: 472DBC53.6080507@gentoo.org
In Reply to: Re: [gentoo-dev] RFC: cmake.eclass by Donnie Berkholz
1 Donnie Berkholz wrote:
2 >> I've wrote an eclass that makes writing ebuilds for such packages a little
3 >> easier - it provides an ecmake function that takes care of few needed variables,
4 >> prefix and such.
5 >
6 > Great! When's the scons one coming? =)
7
8 I don't know scons ;)
9
10 >> #
11 >> # Original Author: nelchael
12 >> # Purpose: Automate src_install and src_compile for packages using cmake
13 >> #
14 >
15 > This would be a great opportunity to start using real eclass
16 > documentation (e.g. that found in eutils.eclass) so we can autogenerate
17 > a useful manpage on how to use it.
18
19 Done.
20
21 >> # If you want to build in source tree set CMAKE_IN_SOURCE_BUILD to anything:
22 >> [[ -n "${CMAKE_IN_SOURCE_BUILD}" ]] && CMAKE_BUILD_DIR="${S}"
23 >
24 > Why would I want to do that? Some documentation would help.
25
26 Added: some packages refuse to build out of source, so it may be needed in some
27 cases.
28
29 >> function ecmake() {
30 >
31 > Why are some functions declared with 'function' and others not?
32
33 Fixed: added '^function '
34
35 >> -DCMAKE_CXX_COMPILER="$(type -P $(tc-getCXX))" \
36 >
37 > Why the 'type -P' bit?
38
39 To get the full path to $CC and $CXX
40
41 >> make DESTDIR="${D}" install || die "make install failed"
42 >
43 > Does emake work?
44
45 It should -> fixed.
46
47 Attached is new version and a diff to previous.
48
49 --
50 Krzysiek Pawlik <nelchael at gentoo.org> key id: 0xBC555551
51 desktop-misc, desktop-dock, x86, java, apache, ppc...

Attachments

File name MIME type
cmake.eclass text/plain
cmake.eclass.diff text/plain
signature.asc application/pgp-signature