1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils toolchain-funcs
9 DESCRIPTION="The ERESI Reverse Engineering Software Interface: elfsh and friends"
10 HOMEPAGE="http://www.eresi-project.org/"
11 # Steps to regenerate archive:
12 # svn export http://svn.eresi-project.org/svn/trunk@1283 eresi-0.82_beta2
13 # tar cvjf eresi-0.82_beta2{.tar.bz2,}
14 # To find the latest release and the corresponding svn revision:
16 # http://svn.eresi-project.org/svn/trunk/librevm/include/revm-io.h \
17 # | egrep 'REVM_(RELEASE|VERSION)'
18 SRC_URI="http://martin.von-gagern.net/gentoo/${P}.tar.bz2"
22 KEYWORDS="~amd64 ~ppc ~x86"
23 IUSE="readline server doc"
24 REQUIRED_USE="server? ( !readline )"
26 DEPEND="readline? ( sys-libs/readline )"
28 !<dev-util/elfsh-0.75"
29 # dev-util/elfsh-0.75 should be used as a transition package,
30 # depending on eresi but not installing any files of its own.
33 epatch "${FILESDIR}"/0.82_beta2-parallel-make.patch \
34 "${FILESDIR}"/0.82_beta2-drop-dprintf.patch \
35 "${FILESDIR}"/0.82_beta2-as-needed.patch \
36 "${FILESDIR}"/0.82_beta2-sed-in-Makefile.patch \
37 "${FILESDIR}"/0.82_beta2-direct-ld.patch \
38 "${FILESDIR}"/0.82_beta2-gentoo-autodetect.patch
42 -e "s: -g3 : ${CFLAGS} -D_GNU_SOURCE :" \
43 -e "/^LDFLAGS/s:=:=${LDFLAGS} :" \
44 $(find -name Makefile) || die
46 -e "s:/usr/local:${EPREFIX%/}/usr:" \
47 configure eresi-config libasm/tools/libasm-config.template \
52 # non-standard configure script
53 # doesn't understand --disable-*, so don't use use_enable
54 local conf="--prefix /usr"
55 conf="${conf} --enable-32-64"
56 conf="${conf} --set-compiler $(tc-getCC)"
57 use readline && conf="${conf} --enable-readline"
58 use server && conf="${conf} --enable-network"
59 echo "./configure ${conf}"
60 ./configure ${conf} || die "configure failed"
64 emake DESTDIR="${D}" install || die "emake install failed"
65 dodoc doc/{AUTHOR,CREDITS} README.FIRST || die "dodoc failed"
67 dodoc doc/{cerberus2,elfsh-network-0.3,elfsh-ref}.txt \
68 doc/{graphers,libelfsh-ref,rtld-multiarch}.txt || die "dodoc failed"
69 dodoc doc/{Changelog,ERESI.NEWHOOKS,eresirc.example} || die "dodoc failed"
70 dodoc doc/{KERNSH.bugs,libelfsh.i} || die "dodoc failed"