]> Pileus Git - ~andy/sunrise/blob - dev-util/eresi/eresi-0.82_beta2.ebuild
dev-util/eresi: New ebuild for ERESI, to replace dev-util/elfsh. Bug #253436
[~andy/sunrise] / dev-util / eresi / eresi-0.82_beta2.ebuild
1 # Copyright 1999-2009 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://dev.gentooexperimental.org/~mvg/${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) \
38                 || die
39 }
40
41 src_compile() {
42         # non-standard configure script
43         # doesn't understand --disable-*, so don't use use_enable
44         local conf="--prefix /usr"
45         conf="${conf} --enable-32-64"
46         conf="${conf} --set-compiler $(tc-getCC)"
47         use readline && conf="${conf} --enable-readline"
48         use server && conf="${conf} --enable-network"
49         echo "./configure ${conf}"
50         ./configure  ${conf} || die "configure failed"
51         emake || die "make failed"
52 }
53
54 src_install() {
55         emake DESTDIR="${D}" install || die "emake install failed"
56         dodoc doc/AUTHOR || die "dodoc failed"
57         dodoc doc/CREDITS || die "dodoc failed"
58         dodoc README.FIRST || die "dodoc failed"
59         if use doc; then
60                 dodoc doc/cerberus2.txt || die "dodoc failed"
61                 dodoc doc/Changelog || die "dodoc failed"
62                 dodoc doc/elfsh-network-0.3.txt || die "dodoc failed"
63                 dodoc doc/elfsh-ref.txt || die "dodoc failed"
64                 dodoc doc/ERESI.NEWHOOKS || die "dodoc failed"
65                 dodoc doc/eresirc.example || die "dodoc failed"
66                 dodoc doc/graphers.txt || die "dodoc failed"
67                 dodoc doc/KERNSH.bugs || die "dodoc failed"
68                 dodoc doc/libelfsh.i || die "dodoc failed"
69                 dodoc doc/libelfsh-ref.txt || die "dodoc failed"
70                 dodoc doc/rtld-multiarch.txt || die "dodoc failed"
71         fi
72 }