summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin von Gagern (MvG) <Martin.vGagern@gmx.net>2011-05-23 20:42:25 +0000
committerMartin von Gagern (MvG) <Martin.vGagern@gmx.net>2011-05-23 20:42:25 +0000
commit8d18c848108de39180fdc55072bd42f04fe97362 (patch)
treec03c9114271454a5a1ae9fd569cf3a664e486e90 /dev-util
parentdev-python/deform: New ebuild for bug 368051 (diff)
downloadsunrise-reviewed-8d18c848108de39180fdc55072bd42f04fe97362.tar.gz
sunrise-reviewed-8d18c848108de39180fdc55072bd42f04fe97362.tar.bz2
sunrise-reviewed-8d18c848108de39180fdc55072bd42f04fe97362.zip
dev-util/eresi: Fix a number of build issues discussed in bug #253436.
svn path=/sunrise/; revision=12083
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/eresi/ChangeLog11
-rw-r--r--dev-util/eresi/Manifest7
-rw-r--r--dev-util/eresi/eresi-0.82_beta2.ebuild31
-rw-r--r--dev-util/eresi/files/0.82_beta2-direct-ld.patch32
-rw-r--r--dev-util/eresi/files/0.82_beta2-gentoo-autodetect.patch17
-rw-r--r--dev-util/eresi/files/0.82_beta2-sed-in-Makefile.patch22
6 files changed, 107 insertions, 13 deletions
diff --git a/dev-util/eresi/ChangeLog b/dev-util/eresi/ChangeLog
index 0b465dabd..a1daa1b14 100644
--- a/dev-util/eresi/ChangeLog
+++ b/dev-util/eresi/ChangeLog
@@ -1,7 +1,16 @@
# ChangeLog for dev-util/eresi
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 23 May 2011; Martin von Gagern (MvG) <Martin.vGagern@gmx.net>
+ +files/0.82_beta2-direct-ld.patch, +files/0.82_beta2-gentoo-autodetect.patch,
+ +files/0.82_beta2-sed-in-Makefile.patch, eresi-0.82_beta2.ebuild:
+ * Change to EAPI=4. Prevent readline and server USE flags
+ from being enabled at the same time.
+ * Remove sed call at the top level of the Makefile.
+ * Prevent direct call to ld, call gcc instead.
+ * Avoid automatic autodetection of gentoo via uname.
+
05 Oct 2010; Martin von Gagern (MvG) <Martin.vGagern@gmx.net>
eresi-0.82_beta2.ebuild:
Fix build issues with glibc 2.12 where __USE_GNU gets unset unless
diff --git a/dev-util/eresi/Manifest b/dev-util/eresi/Manifest
index 020999fb8..b82d9ddc4 100644
--- a/dev-util/eresi/Manifest
+++ b/dev-util/eresi/Manifest
@@ -1,7 +1,10 @@
AUX 0.82_beta2-as-needed.patch 1508 RMD160 7f452532bd231fb6bd1a2aed574c50fd3969442c SHA1 053f33cc40e600185fd779e751f1f447359a9a3e SHA256 0c0fc1ba336d9d2bfd22d53a7856fe1ec79e94bb7f86785e4b8b8cca66bd665d
+AUX 0.82_beta2-direct-ld.patch 1158 RMD160 00dce5560d4727acdba4a65260dffa40b6d4f18e SHA1 333dd65f712c27016bf18c07c0a8707278d3fe9d SHA256 5d749601907ed594418688bd42ab40e21cb8f841b61e26c84dc2d58377c92df8
AUX 0.82_beta2-drop-dprintf.patch 1113 RMD160 f4f42ef7559704dd82c2700d105bc675fc805d9e SHA1 a43671d5dd40df6997c70761775f58318362340f SHA256 2d1c9b56ac33217242c50000388114e178ea359a328e33f6557cbac4332b81ea
+AUX 0.82_beta2-gentoo-autodetect.patch 465 RMD160 9de927f0b6d7ebb6ff21cef8cd2ee8a521417ee1 SHA1 1d9353b8bbccfd8592b02b341a33862879bd747c SHA256 0cc9f3e71db33ff8aa7b35a806059cc894cc3914fe68fef3ccdf59676f8180c1
AUX 0.82_beta2-parallel-make.patch 1970 RMD160 6b7bd0515188264a8ad8c799c6873d15b43f4332 SHA1 6e67edb49670c3c67e9df46abf5d89229ef41459 SHA256 564b6e46e10797b096d75f50691f9bf2244271fe04e4234a908dcd4f7dfade13
+AUX 0.82_beta2-sed-in-Makefile.patch 653 RMD160 ecfb98ce7ac3a2e42b0948d88e71794c3ff5fef0 SHA1 a267524a5908b767e86ceb87f58821df2cdbf760 SHA256 5b6e9b72a887afaf213b5dcf8984a3355f95eb974457f6305bc2ba0b42a5ce16
DIST eresi-0.82_beta2.tar.bz2 1132566 RMD160 a52cb8ae6da30dc9f2dd024e064a8da3c3666d02 SHA1 41d28e4bfc486c8f48cf15fb57e4b3f35f21a3aa SHA256 93daa8e392d33897d2fe3a9b27b198671941a53803fdb9bc08dea8a3f9b13a44
-EBUILD eresi-0.82_beta2.ebuild 2149 RMD160 2857986ac17c0db5e5c56e3b5837a32f0df99626 SHA1 363dfd953f29daa784728e3b5079c11d9cf24145 SHA256 c8f6feb73d3485ce65735732833b26f415122b2527076d942249955fc868bfa0
-MISC ChangeLog 1030 RMD160 b788dfb906ad09d43dfbfadfee9661826dc4d50c SHA1 752dc9be9e2cb84bf9979b52180ce05124957f93 SHA256 ec49edae45b512557a24edd72f252db488fd74176d2a328681648ac83819c526
+EBUILD eresi-0.82_beta2.ebuild 2436 RMD160 a394cdcf05347f99db73739a0299fa4c94df30dd SHA1 2e9efe98a10cc32703e35659aac59e56f2feb86d SHA256 226a9579c8f21f5c5a76739aab27a8e5693a2b6ccea84e84d0c85079642837e4
+MISC ChangeLog 1260 RMD160 eebe04db1ebc9ef8f7635cab30414c6e4e5367d2 SHA1 f7fe1b6b525ccebd55245e2093d61a1c85a1e77d SHA256 cb1d382194059eae118b2ba6d7af18fc6fdc0120ed6b11387dee75f07eaaf7b0
MISC metadata.xml 299 RMD160 c421ce3f432ded8e42ed44e567107616be910947 SHA1 d1621e3de10856ea4aa3d9a6caf1f98626a4dd5c SHA256 f2df47e8793acbc859ce7ad3775bd21be711850f3d5bde3910347b195dc46f5a
diff --git a/dev-util/eresi/eresi-0.82_beta2.ebuild b/dev-util/eresi/eresi-0.82_beta2.ebuild
index 54844a28c..e4f1ac66e 100644
--- a/dev-util/eresi/eresi-0.82_beta2.ebuild
+++ b/dev-util/eresi/eresi-0.82_beta2.ebuild
@@ -1,8 +1,10 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-inherit eutils toolchain-funcs
+EAPI=4
+
+inherit base eutils toolchain-funcs
DESCRIPTION="The ERESI Reverse Engineering Software Interface: elfsh and friends"
HOMEPAGE="http://www.eresi-project.org/"
@@ -19,6 +21,7 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="readline server doc"
+REQUIRED_USE="server? ( !readline )"
DEPEND="readline? ( sys-libs/readline )"
RDEPEND="${DEPEND}
@@ -26,20 +29,29 @@ RDEPEND="${DEPEND}
# dev-util/elfsh-0.75 should be used as a transition package,
# depending on eresi but not installing any files of its own.
-src_unpack() {
- unpack ${A}
- cd "${S}"
- epatch "${FILESDIR}"/0.82_beta2-parallel-make.patch
- epatch "${FILESDIR}"/0.82_beta2-drop-dprintf.patch
- epatch "${FILESDIR}"/0.82_beta2-as-needed.patch
+PATCHES=(
+ "${FILESDIR}"/0.82_beta2-parallel-make.patch
+ "${FILESDIR}"/0.82_beta2-drop-dprintf.patch
+ "${FILESDIR}"/0.82_beta2-as-needed.patch
+ "${FILESDIR}"/0.82_beta2-sed-in-Makefile.patch
+ "${FILESDIR}"/0.82_beta2-direct-ld.patch
+ "${FILESDIR}"/0.82_beta2-gentoo-autodetect.patch
+)
+
+src_prepare() {
+ base_src_prepare
sed -i \
-e 's: -O2 : :g' \
-e "s: -g3 : ${CFLAGS} -D_GNU_SOURCE :" \
-e "/^LDFLAGS/s:=:=${LDFLAGS} :" \
$(find -name Makefile) || die
+ sed -i \
+ -e "s:/usr/local:${EPREFIX%/}/usr:" \
+ configure eresi-config libasm/tools/libasm-config.template \
+ $(find -name \*.esh)
}
-src_compile() {
+src_configure() {
# non-standard configure script
# doesn't understand --disable-*, so don't use use_enable
local conf="--prefix /usr"
@@ -49,7 +61,6 @@ src_compile() {
use server && conf="${conf} --enable-network"
echo "./configure ${conf}"
./configure ${conf} || die "configure failed"
- emake || die "make failed"
}
src_install() {
diff --git a/dev-util/eresi/files/0.82_beta2-direct-ld.patch b/dev-util/eresi/files/0.82_beta2-direct-ld.patch
new file mode 100644
index 000000000..f3bb19c74
--- /dev/null
+++ b/dev-util/eresi/files/0.82_beta2-direct-ld.patch
@@ -0,0 +1,32 @@
+From: Nathan Phillip Brink <binki@gentoo.org>
+Subject: Don't call LD when linking, use CC instead.
+
+--- a/libdump/Makefile
++++ b/libdump/Makefile
+@@ -26,12 +26,12 @@
+ all32: $(OBJ32)
+ $(AR) $(NAME32).a $(OBJ32)
+ $(RANLIB) $(NAME32).a
+- $(LD) -r $(OBJ32) -o $(NAME32).o $(LDFLAGS32)
++ $(CC) -Wl,-r -nostdlib $(OBJ32) -o $(NAME32).o $(LDFLAGS32)
+
+ all64: $(OBJ64)
+ $(AR) $(NAME64).a $(OBJ64)
+ $(RANLIB) $(NAME64).a
+- $(LD) -r $(OBJ64) -o $(NAME64).o $(LDFLAGS64)
++ $(CC) -Wl,-r -nostdlib $(OBJ64) -o $(NAME64).o $(LDFLAGS64)
+
+ clean :
+ @rm -f $(OBJ32) $(OBJ64) *~ *\# \#* .\#* dump_main.o
+
+--- a/elfsh/Makefile
++++ b/elfsh/Makefile
+@@ -36,7 +36,7 @@
+ -I../libedfmt/include/ $(STATOPT2) \
+ $(ASMOPT) -DERESI64 $(NCURSESLNOPT) $(READLNOPT)
+
+-LDFLAGS32 += -L../libedfmt/ -ledfmt32 -L../libelfsh/ -lelfsh32 \
++LDFLAGS32 += -L../libedfmt/ -ledfmt32 -L../libdump/ -L../libelfsh/ -lelfsh32 \
+ -L../libetrace/ -letrace32 -L../libstderesi/ -lstderesi32 \
+ -L/usr/pkg/lib/ -L../libmjollnir/ -lmjollnir32 \
+ -L../libetrace -letrace32 $(LPTHREAD) -L../libasm/ -lasm32 \
diff --git a/dev-util/eresi/files/0.82_beta2-gentoo-autodetect.patch b/dev-util/eresi/files/0.82_beta2-gentoo-autodetect.patch
new file mode 100644
index 000000000..d90fccdad
--- /dev/null
+++ b/dev-util/eresi/files/0.82_beta2-gentoo-autodetect.patch
@@ -0,0 +1,17 @@
+Avoid autodetecting Gentoo using any kind of black magic.
+
+2011-05-23 Martin von Gagern
+
+Index: eresi-0.82_beta2/configure
+===================================================================
+--- eresi-0.82_beta2.orig/configure
++++ eresi-0.82_beta2/configure
+@@ -20,7 +20,7 @@ VARSFILE="librevm/include/revm-vars.h"
+ LIBVARSFILE="libelfsh/include/libvars.h"
+ LPTHREAD="-lpthread"
+ SHELL=`which bash`
+-GENTOO=` uname -a | grep gentoo`
++GENTOO=yes
+
+ printHelp()
+ {
diff --git a/dev-util/eresi/files/0.82_beta2-sed-in-Makefile.patch b/dev-util/eresi/files/0.82_beta2-sed-in-Makefile.patch
new file mode 100644
index 000000000..321e710cb
--- /dev/null
+++ b/dev-util/eresi/files/0.82_beta2-sed-in-Makefile.patch
@@ -0,0 +1,22 @@
+Having a sed command at the top of the Makefile will break with
+current (3.82) GNU make.
+
+2011-05-23 Martin von Gagern
+
+Index: eresi-0.82_beta2/configure
+===================================================================
+--- eresi-0.82_beta2.orig/configure
++++ eresi-0.82_beta2/configure
+@@ -618,10 +618,10 @@ echo "RM = rm -f "
+ echo "" >> Makefile
+ echo "all : world modules testsuite tags" >> Makefile
+
++sed -ie "s%TESTING_ROOT=.*%TESTING_ROOT=`pwd`/%" eresi-config
++
+ cat >> Makefile <<EOF
+
+-sed -ie "s%TESTING_ROOT=.*%TESTING_ROOT=`pwd`/%" eresi-config
+-
+ ifdef NAME
+ include build/defs/dep-rules.def
+ component: dep-\$(NAME)