dev-util/emilpro: fix for new binutils and fix bug #553254
authorZero_Chaos <zerochaos@gentoo.org>
Mon, 21 Sep 2015 19:52:10 +0000 (15:52 -0400)
committerZero_Chaos <zerochaos@gentoo.org>
Mon, 21 Sep 2015 19:52:31 +0000 (15:52 -0400)
dev-util/emilpro/emilpro-3-r2.ebuild [moved from dev-util/emilpro/emilpro-3-r1.ebuild with 83% similarity]
dev-util/emilpro/emilpro-9999.ebuild
dev-util/emilpro/files/emilpro-9999-use-gentoo-binutils.patch [new file with mode: 0644]
dev-util/emilpro/files/or1k-2.patch [new file with mode: 0644]
dev-util/emilpro/files/or1k.patch [new file with mode: 0644]

similarity index 83%
rename from dev-util/emilpro/emilpro-3-r1.ebuild
rename to dev-util/emilpro/emilpro-3-r2.ebuild
index b5c741bf4e317e9e2cffd0f800387585fa9b5b38..fb559469a4b5734c66f9808debab543ddea3e76c 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -28,7 +28,12 @@ DEPEND="|| ( dev-libs/elfutils dev-libs/libelf )
        dev-cpp/gtkmm:3.0
        dev-cpp/gtksourceviewmm:3.0
        dev-cpp/libxmlpp:2.6
-       system-binutils? ( sys-devel/binutils[multitarget] )
+       dev-cpp/glibmm
+       dev-cpp/pangomm
+       dev-cpp/cairomm
+       dev-libs/libsigc++:2
+       dev-libs/glib:2
+       system-binutils? ( >=sys-devel/binutils-2.25.1-r1:*[multitarget] )
        net-misc/curl"
 RDEPEND="${DEPEND}"
 
@@ -39,6 +44,8 @@ src_prepare() {
        else
                sed -i "s#wget -O binutils.tar.bz2 https://ftp.gnu.org/gnu/binutils/binutils-2.23.2.tar.bz2#cp \"${DISTDIR}/binutils-2.23.2.tar.bz2\" ./binutils.tar.bz2#" cmake/BuildBinutils.cmake
        fi
+       epatch "${FILESDIR}"/or1k.patch
+       epatch "${FILESDIR}"/or1k-2.patch
        cmake-utils_src_prepare
 }
 
index cba20f0484c9446290a191aaf35929aa589f7ab1..f91969cc2e86899b8d14af0270abd7fd606c7a19 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -28,13 +28,20 @@ DEPEND="|| ( dev-libs/elfutils dev-libs/libelf )
        dev-cpp/gtkmm:3.0
        dev-cpp/gtksourceviewmm:3.0
        dev-cpp/libxmlpp:2.6
-       system-binutils? ( sys-devel/binutils[multitarget] )
+       dev-cpp/glibmm
+       dev-cpp/pangomm
+       dev-cpp/cairomm
+       dev-libs/libsigc++:2
+       dev-libs/glib:2
+       system-binutils? ( >=sys-devel/binutils-2.25.1-r1:*[multitarget] )
        net-misc/curl"
+# automagic dep
+# dev-util/capstone
 RDEPEND="${DEPEND}"
 
 src_prepare() {
        if use system-binutils; then
-               epatch "${FILESDIR}"/use-gentoo-binutils.patch
+               epatch "${FILESDIR}"/${P}-use-gentoo-binutils.patch
        else
                sed -i "s#wget -O binutils.tar.bz2 https://ftp.gnu.org/gnu/binutils/binutils-2.23.2.tar.bz2#cp \"${DISTDIR}/binutils-2.23.2.tar.bz2\" ./binutils.tar.bz2#" cmake/BuildBinutils.cmake
        fi
diff --git a/dev-util/emilpro/files/emilpro-9999-use-gentoo-binutils.patch b/dev-util/emilpro/files/emilpro-9999-use-gentoo-binutils.patch
new file mode 100644 (file)
index 0000000..8cfa9f5
--- /dev/null
@@ -0,0 +1,39 @@
+--- CMakeLists.txt.orig        2015-06-25 22:02:55.041406946 +0200
++++ CMakeLists.txt     2015-06-25 22:03:51.841696845 +0200
+@@ -11,7 +11,6 @@
+ set (BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+ # Dependencies
+-include (${CMAKE_CURRENT_SOURCE_DIR}/cmake/BuildBinutils.cmake)
+ find_package (LibElf REQUIRED)
+ find_package (PkgConfig REQUIRED)
+@@ -30,10 +29,6 @@
+ pkg_check_modules(LIBCURL REQUIRED libcurl)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall -D_GLIBCXX_USE_NANOSLEEP -DPACKAGE=emilpro -DPACKAGE_VERSION=1 -pthread")
+-LINK_DIRECTORIES(
+-      ${CMAKE_BINARY_DIR}/install-binutils/lib ${CMAKE_BINARY_DIR}/install-binutils/lib64
+-      ${CMAKE_BINARY_DIR}/binutils/libiberty
+-      )
+ if (HAVE_BFD_MULTIARCH)
+       set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_BFD_MULTIARCH")
+@@ -109,7 +104,6 @@
+ set_property(SOURCE src/emilpro.cc APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/built_in_instruction_models.hh)
+ include_directories(
+-      ${CMAKE_BINARY_DIR}/install-binutils/include/
+       src/gtk/include/
+       src/include/
+       ${CMAKE_BINARY_DIR}
+@@ -131,9 +125,6 @@
+       tools/squash-instruction-models.cc
+       )
+-set_property(TARGET emilpro APPEND PROPERTY OBJECT_DEPENDS binutils)
+-set_property(TARGET tools/squash-instruction-models APPEND PROPERTY OBJECT_DEPENDS binutils)
+-
+ set (BASE_LIBS
+       ${LIBELF_LIBRARIES}
+       opcodes
diff --git a/dev-util/emilpro/files/or1k-2.patch b/dev-util/emilpro/files/or1k-2.patch
new file mode 100644 (file)
index 0000000..9dd4e19
--- /dev/null
@@ -0,0 +1,22 @@
+From 5b41e51bfb9fdeac7c6a2441badf8c3b92463fef Mon Sep 17 00:00:00 2001
+From: Alex Chernetz <andy80586@gmail.com>
+Date: Fri, 1 May 2015 14:34:31 -0700
+Subject: [PATCH] Function is print_insn_or1k, not print_insn_little_or1k
+
+---
+ src/bfd-disassembly.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/bfd-disassembly.cc b/src/bfd-disassembly.cc
+index bf3e768..eeecbe4 100644
+--- a/src/bfd-disassembly.cc
++++ b/src/bfd-disassembly.cc
+@@ -38,7 +38,7 @@ class Disassembly : public IDisassembly,
+           m_arch[bfd_arch_m68k] = BfdArch(bfd_arch_m68k, bfd_mach_m68040, print_insn_m68k);      /* Motorola 68xxx */
+           m_arch[bfd_arch_vax] = BfdArch(bfd_arch_vax, 0, print_insn_vax);       /* DEC Vax */
+           m_arch[bfd_arch_i960] = BfdArch(bfd_arch_i960, 0, print_insn_i960);      /* Intel 960 */
+-          m_arch[bfd_arch_or1k] = BfdArch(bfd_arch_or1k, 0, print_insn_little_or1k);      /* OpenRISC 32 */
++          m_arch[bfd_arch_or1k] = BfdArch(bfd_arch_or1k, 0, print_insn_or1k);      /* OpenRISC 32 */
+           m_arch[bfd_arch_sparc] = BfdArch(bfd_arch_sparc, 0, print_insn_sparc);     /* SPARC */
+           m_arch[bfd_arch_spu] = BfdArch(bfd_arch_spu, 0, print_insn_spu);       /* PowerPC SPU */
+           m_arch[bfd_arch_i860] = BfdArch(bfd_arch_i860, 0, print_insn_i860);      /* Intel 860 */
diff --git a/dev-util/emilpro/files/or1k.patch b/dev-util/emilpro/files/or1k.patch
new file mode 100644 (file)
index 0000000..e7a4392
--- /dev/null
@@ -0,0 +1,70 @@
+From f59c5f424a268313c1fcc009fd1e40c00bf6c4f2 Mon Sep 17 00:00:00 2001
+From: Alex Chernetz <andy80586@gmail.com>
+Date: Fri, 1 May 2015 13:32:27 -0700
+Subject: [PATCH] or32 and openrisc architectures are replaced by or1k in
+ current binutils
+
+---
+ src/architecturefactory.cc | 6 ++----
+ src/bfd-disassembly.cc     | 3 +--
+ 2 files changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/src/architecturefactory.cc b/src/architecturefactory.cc
+index 709b770..25ccf80 100644
+--- a/src/architecturefactory.cc
++++ b/src/architecturefactory.cc
+@@ -10,7 +10,7 @@ ArchitectureFactory::ArchitectureFactory() :
+       m_architectureNameMap[(unsigned)bfd_arch_m68k] = "m68k";
+       m_architectureNameMap[(unsigned)bfd_arch_vax] = "vax";
+       m_architectureNameMap[(unsigned)bfd_arch_i960] = "i960";
+-      m_architectureNameMap[(unsigned)bfd_arch_or32] = "or32";
++      m_architectureNameMap[(unsigned)bfd_arch_or1k] = "or1k";
+       m_architectureNameMap[(unsigned)bfd_arch_sparc] = "sparc";
+       m_architectureNameMap[(unsigned)bfd_arch_mips] = "mips";
+       m_architectureNameMap[(unsigned)bfd_arch_i386] = "i386";
+@@ -68,7 +68,6 @@ ArchitectureFactory::ArchitectureFactory() :
+       m_architectureNameMap[(unsigned)bfd_arch_cris] = "cris";
+       m_architectureNameMap[(unsigned)bfd_arch_s390] = "s390";
+       m_architectureNameMap[(unsigned)bfd_arch_score] = "score";
+-      m_architectureNameMap[(unsigned)bfd_arch_openrisc] = "openrisc";
+       m_architectureNameMap[(unsigned)bfd_arch_mmix] = "mmix";
+       m_architectureNameMap[(unsigned)bfd_arch_xstormy16] =  "xstormy16";
+       m_architectureNameMap[(unsigned)bfd_arch_xc16x] = "xc16x";
+@@ -81,7 +80,7 @@ ArchitectureFactory::ArchitectureFactory() :
+       m_nameArchitectureMap["m68k"] = (unsigned)bfd_arch_m68k;
+       m_nameArchitectureMap["vax"] = (unsigned)bfd_arch_vax;
+       m_nameArchitectureMap["i960"] = (unsigned)bfd_arch_i960;
+-      m_nameArchitectureMap["or32"] = (unsigned)bfd_arch_or32;
++      m_nameArchitectureMap["or1k"] = (unsigned)bfd_arch_or1k;
+       m_nameArchitectureMap["sparc"] = (unsigned)bfd_arch_sparc;
+       m_nameArchitectureMap["mips"] = (unsigned)bfd_arch_mips;
+       m_nameArchitectureMap["i386"] = (unsigned)bfd_arch_i386;
+@@ -139,7 +138,6 @@ ArchitectureFactory::ArchitectureFactory() :
+       m_nameArchitectureMap["cris"] = (unsigned)bfd_arch_cris;
+       m_nameArchitectureMap["s390"] = (unsigned)bfd_arch_s390;
+       m_nameArchitectureMap["score"] = (unsigned)bfd_arch_score;
+-      m_nameArchitectureMap["openrisc"] = (unsigned)bfd_arch_openrisc;
+       m_nameArchitectureMap["mmix"] = (unsigned)bfd_arch_mmix;
+       m_nameArchitectureMap["xstormy16"] =  (unsigned)bfd_arch_xstormy16;
+       m_nameArchitectureMap["xc16x"] = (unsigned)bfd_arch_xc16x;
+diff --git a/src/bfd-disassembly.cc b/src/bfd-disassembly.cc
+index 5cda9e2..bf3e768 100644
+--- a/src/bfd-disassembly.cc
++++ b/src/bfd-disassembly.cc
+@@ -38,7 +38,7 @@ class Disassembly : public IDisassembly,
+           m_arch[bfd_arch_m68k] = BfdArch(bfd_arch_m68k, bfd_mach_m68040, print_insn_m68k);      /* Motorola 68xxx */
+           m_arch[bfd_arch_vax] = BfdArch(bfd_arch_vax, 0, print_insn_vax);       /* DEC Vax */
+           m_arch[bfd_arch_i960] = BfdArch(bfd_arch_i960, 0, print_insn_i960);      /* Intel 960 */
+-          m_arch[bfd_arch_or32] = BfdArch(bfd_arch_or32, 0, print_insn_little_or32);      /* OpenRISC 32 */
++          m_arch[bfd_arch_or1k] = BfdArch(bfd_arch_or1k, 0, print_insn_little_or1k);      /* OpenRISC 32 */
+           m_arch[bfd_arch_sparc] = BfdArch(bfd_arch_sparc, 0, print_insn_sparc);     /* SPARC */
+           m_arch[bfd_arch_spu] = BfdArch(bfd_arch_spu, 0, print_insn_spu);       /* PowerPC SPU */
+           m_arch[bfd_arch_i860] = BfdArch(bfd_arch_i860, 0, print_insn_i860);      /* Intel 860 */
+@@ -89,7 +89,6 @@ class Disassembly : public IDisassembly,
+           m_arch[bfd_arch_rl78] = BfdArch(bfd_arch_rl78, 0, print_insn_rl78);
+           m_arch[bfd_arch_rx] = BfdArch(bfd_arch_rx, 0, print_insn_rx);        /* Renesas RX.  */
+           m_arch[bfd_arch_s390] = BfdArch(bfd_arch_s390, bfd_mach_s390_64, print_insn_s390);      /* IBM s390 */
+-          m_arch[bfd_arch_openrisc] = BfdArch(bfd_arch_openrisc, 0, print_insn_openrisc);  /* OpenRISC */
+           m_arch[bfd_arch_mmix] = BfdArch(bfd_arch_mmix, 0, print_insn_mmix);      /* Donald Knuth's educational processor.  */
+           m_arch[bfd_arch_xstormy16] = BfdArch(bfd_arch_xstormy16, 0, print_insn_xstormy16);
+           m_arch[bfd_arch_msp430] = BfdArch(bfd_arch_msp430, 0, print_insn_msp430);    /* Texas Instruments MSP430 architecture.  */