]> Pileus Git - ~andy/sunrise/blob - dev-util/eresi/eresi-0.82_beta2.ebuild
cba8f858ecccc1075cf46a50d817aee1eb9d7a5d
[~andy/sunrise] / dev-util / eresi / eresi-0.82_beta2.ebuild
1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils toolchain-funcs
6
7 DESCRIPTION="The ERESI Reverse Engineering Software Interface: elfsh and friends"
8 HOMEPAGE="http://www.eresi-project.org/"
9 # Steps to regenerate archive:
10 #   svn export http://svn.eresi-project.org/svn/trunk@1283 eresi-0.82_beta2
11 #   tar cvjf eresi-0.82_beta2{.tar.bz2,}
12 # To find the latest release and the corresponding svn revision:
13 #   svn annotate \
14 #   http://svn.eresi-project.org/svn/trunk/librevm/include/revm-io.h \
15 #   | egrep 'REVM_(RELEASE|VERSION)'
16 SRC_URI="http://martin.von-gagern.net/gentoo/${P}.tar.bz2"
17
18 LICENSE="GPL-2"
19 SLOT="0"
20 KEYWORDS="~amd64 ~ppc ~x86"
21 IUSE="readline server doc"
22
23 DEPEND="readline? ( sys-libs/readline )"
24 RDEPEND="${DEPEND}
25         !<dev-util/elfsh-0.75"
26 # dev-util/elfsh-0.75 should be used as a transition package,
27 # depending on eresi but not installing any files of its own.
28
29 src_unpack() {
30         unpack ${A}
31         cd "${S}"
32         epatch "${FILESDIR}"/0.82_beta2-parallel-make.patch
33         sed -i \
34                 -e 's: -O2 : :g' \
35                 -e "s: -g3 : ${CFLAGS} :" \
36                 -e "/^LDFLAGS/s:=:=${LDFLAGS} :" \
37                 $(find -name Makefile) || die
38 }
39
40 src_compile() {
41         # non-standard configure script
42         # doesn't understand --disable-*, so don't use use_enable
43         local conf="--prefix /usr"
44         conf="${conf} --enable-32-64"
45         conf="${conf} --set-compiler $(tc-getCC)"
46         use readline && conf="${conf} --enable-readline"
47         use server && conf="${conf} --enable-network"
48         echo "./configure ${conf}"
49         ./configure  ${conf} || die "configure failed"
50         emake || die "make failed"
51 }
52
53 src_install() {
54         emake DESTDIR="${D}" install || die "emake install failed"
55         dodoc doc/{AUTHOR,CREDITS,README.FIRST} || die "dodoc failed"
56         if use doc; then
57                 dodoc doc/{cerberus2,elfsh-network-0.3,elfsh-ref}.txt \
58                         doc/{graphers,libelfsh-ref,rtld-multiarch}.txt || die "dodoc failed"
59                 dodoc doc/{Changelog,ERESI.NEWHOOKS,eresirc.example} || die "dodoc failed"
60                 dodoc doc/{KERNSH.bugs,libelfsh.i} || die "dodoc failed"
61         fi
62 }