1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit eutils toolchain-funcs
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:
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"
20 KEYWORDS="~amd64 ~ppc ~x86"
21 IUSE="readline server doc"
23 DEPEND="readline? ( sys-libs/readline )"
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.
32 epatch "${FILESDIR}"/0.82_beta2-parallel-make.patch
35 -e "s: -g3 : ${CFLAGS} :" \
36 -e "/^LDFLAGS/s:=:=${LDFLAGS} :" \
37 $(find -name Makefile) || die
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"
54 emake DESTDIR="${D}" install || die "emake install failed"
55 dodoc doc/{AUTHOR,CREDITS,README.FIRST} || die "dodoc failed"
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"