diff options
author | 2014-03-19 02:50:34 +0000 | |
---|---|---|
committer | 2014-03-19 02:50:34 +0000 | |
commit | 4993e018e26d784d80d37443e1bfeb9b5be04266 (patch) | |
tree | 9572277bab575c1efe5bd23a1974fbaada53eca5 /dev-util | |
parent | EAPI=5 (diff) | |
download | gentoo-2-4993e018e26d784d80d37443e1bfeb9b5be04266.tar.gz gentoo-2-4993e018e26d784d80d37443e1bfeb9b5be04266.tar.bz2 gentoo-2-4993e018e26d784d80d37443e1bfeb9b5be04266.zip |
enable building with system binutils, respect cxxflags
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key DD11F94A)
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/emilpro/ChangeLog | 9 | ||||
-rw-r--r-- | dev-util/emilpro/emilpro-3-r1.ebuild | 58 | ||||
-rw-r--r-- | dev-util/emilpro/emilpro-3.ebuild | 48 | ||||
-rw-r--r-- | dev-util/emilpro/emilpro-9999.ebuild | 28 | ||||
-rw-r--r-- | dev-util/emilpro/files/respect-cflags.patch | 12 | ||||
-rw-r--r-- | dev-util/emilpro/files/use-gentoo-binutils.patch | 36 | ||||
-rw-r--r-- | dev-util/emilpro/metadata.xml | 3 |
7 files changed, 136 insertions, 58 deletions
diff --git a/dev-util/emilpro/ChangeLog b/dev-util/emilpro/ChangeLog index f36a47357932..7a8f5bc8e379 100644 --- a/dev-util/emilpro/ChangeLog +++ b/dev-util/emilpro/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-util/emilpro # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/emilpro/ChangeLog,v 1.1 2014/03/18 04:26:05 zerochaos Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/emilpro/ChangeLog,v 1.2 2014/03/19 02:50:34 zerochaos Exp $ + +*emilpro-3-r1 (19 Mar 2014) + + 19 Mar 2014; Rick Farina <zerochaos@gentoo.org> +emilpro-3-r1.ebuild, + +files/respect-cflags.patch, +files/use-gentoo-binutils.patch, + -emilpro-3.ebuild, emilpro-9999.ebuild, metadata.xml: + enable building with system binutils, respect cxxflags *emilpro-3 (18 Mar 2014) *emilpro-9999 (18 Mar 2014) diff --git a/dev-util/emilpro/emilpro-3-r1.ebuild b/dev-util/emilpro/emilpro-3-r1.ebuild new file mode 100644 index 000000000000..b54262fbdb10 --- /dev/null +++ b/dev-util/emilpro/emilpro-3-r1.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/emilpro/emilpro-3-r1.ebuild,v 1.1 2014/03/19 02:50:34 zerochaos Exp $ + +EAPI=5 + +inherit cmake-utils eutils + +DESCRIPTION="a graphical disassembler for a large number of instruction sets" +HOMEPAGE="http://www.emilpro.com/" + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/SimonKagstrom/emilpro" + inherit git-r3 + KEYWORDS="" + SRC_URI="mirror://gnu/binutils/binutils-2.23.2.tar.bz2" +else + SRC_URI="http://www.emilpro.com/${P}.tar.gz + !system-binutils? ( mirror://gnu/binutils/binutils-2.23.2.tar.bz2 )" + KEYWORDS="~amd64" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="+system-binutils" + +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] ) + net-misc/curl" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/respect-cflags.patch + if use system-binutils; then + epatch "${FILESDIR}"/use-gentoo-binutils.patch + else + sed -i "s#wget -O binutils.tar.bz2 http://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 + cmake-utils_src_prepare +} + +src_compile() { + if use system-binutils; then + cmake-utils_src_compile + else + #bundled binutils is broken, always builds with one thread + #but somehow it still fails if I don't do this + cd "${BUILD_DIR}" + emake -j1 + fi +} + +src_install() { + dobin "${BUILD_DIR}"/emilpro +} diff --git a/dev-util/emilpro/emilpro-3.ebuild b/dev-util/emilpro/emilpro-3.ebuild deleted file mode 100644 index 62d6763e7326..000000000000 --- a/dev-util/emilpro/emilpro-3.ebuild +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/emilpro/emilpro-3.ebuild,v 1.1 2014/03/18 04:26:05 zerochaos Exp $ - -EAPI=5 - -inherit cmake-utils - -DESCRIPTION="a graphical disassembler for a large number of instruction sets" -HOMEPAGE="http://www.emilpro.com/" - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="https://github.com/SimonKagstrom/emilpro" - inherit git-r3 - KEYWORDS="" - SRC_URI="mirror://gnu/binutils/binutils-2.23.2.tar.bz2" -else - SRC_URI="http://www.emilpro.com/${P}.tar.gz - mirror://gnu/binutils/binutils-2.23.2.tar.bz2" - KEYWORDS="~amd64" -fi - -LICENSE="GPL-2" -SLOT="0" -IUSE="" - -DEPEND="|| ( dev-libs/elfutils dev-libs/libelf ) - dev-cpp/gtkmm:3.0 - dev-cpp/gtksourceviewmm:3.0 - dev-cpp/libxmlpp:2.6 - net-misc/curl" -RDEPEND="${DEPEND}" - -src_prepare() { - sed -i "s#wget -O binutils.tar.bz2 http://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 - cmake-utils_src_prepare -} - -src_compile() { - #it builds with one thread no matter what, - #but somehow it still fails if I don't do this - cd "${BUILD_DIR}" - emake -j1 -} - -src_install() { - dobin "${BUILD_DIR}"/emilpro -} diff --git a/dev-util/emilpro/emilpro-9999.ebuild b/dev-util/emilpro/emilpro-9999.ebuild index 7438415c9b87..d9357d23992a 100644 --- a/dev-util/emilpro/emilpro-9999.ebuild +++ b/dev-util/emilpro/emilpro-9999.ebuild @@ -1,10 +1,10 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/emilpro/emilpro-9999.ebuild,v 1.1 2014/03/18 04:26:05 zerochaos Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/emilpro/emilpro-9999.ebuild,v 1.2 2014/03/19 02:50:34 zerochaos Exp $ EAPI=5 -inherit cmake-utils +inherit cmake-utils eutils DESCRIPTION="a graphical disassembler for a large number of instruction sets" HOMEPAGE="http://www.emilpro.com/" @@ -16,31 +16,41 @@ if [[ ${PV} == "9999" ]] ; then SRC_URI="mirror://gnu/binutils/binutils-2.23.2.tar.bz2" else SRC_URI="http://www.emilpro.com/${P}.tar.gz - mirror://gnu/binutils/binutils-2.23.2.tar.bz2" + !system-binutils? ( mirror://gnu/binutils/binutils-2.23.2.tar.bz2 )" KEYWORDS="~amd64" fi LICENSE="GPL-2" SLOT="0" -IUSE="" +IUSE="+system-binutils" 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] ) net-misc/curl" RDEPEND="${DEPEND}" src_prepare() { - sed -i "s#wget -O binutils.tar.bz2 http://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 + epatch "${FILESDIR}"/respect-cflags.patch + if use system-binutils; then + epatch "${FILESDIR}"/use-gentoo-binutils.patch + else + sed -i "s#wget -O binutils.tar.bz2 http://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 cmake-utils_src_prepare } src_compile() { - #it builds with one thread no matter what, - #but somehow it still fails if I don't do this - cd "${BUILD_DIR}" - emake -j1 + if use system-binutils; then + cmake-utils_src_compile + else + #bundled binutils is broken, always builds with one thread + #but somehow it still fails if I don't do this + cd "${BUILD_DIR}" + emake -j1 + fi } src_install() { diff --git a/dev-util/emilpro/files/respect-cflags.patch b/dev-util/emilpro/files/respect-cflags.patch new file mode 100644 index 000000000000..12d5bd52db5d --- /dev/null +++ b/dev-util/emilpro/files/respect-cflags.patch @@ -0,0 +1,12 @@ +diff -Naur emilpro-3/CMakeLists.txt emilpro-3-cflags/CMakeLists.txt +--- emilpro-3/CMakeLists.txt 2013-12-28 04:22:34.000000000 -0500 ++++ emilpro-3-cflags/CMakeLists.txt 2014-03-18 17:59:47.534542384 -0400 +@@ -29,7 +29,7 @@ + pkg_check_modules(LIBXMLPP libxml++-2.6) + pkg_check_modules(LIBCURL libcurl) + +-set (CMAKE_CXX_FLAGS "-std=c++0x -Wall -D_GLIBCXX_USE_NANOSLEEP -DPACKAGE=emilpro -DPACKAGE_VERSION=1") ++set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall -D_GLIBCXX_USE_NANOSLEEP -DPACKAGE=emilpro -DPACKAGE_VERSION=1") + LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/install-binutils/lib ${CMAKE_BINARY_DIR}/install-binutils/lib64) + + if (HAVE_BFD_MULTIARCH) diff --git a/dev-util/emilpro/files/use-gentoo-binutils.patch b/dev-util/emilpro/files/use-gentoo-binutils.patch new file mode 100644 index 000000000000..576055810710 --- /dev/null +++ b/dev-util/emilpro/files/use-gentoo-binutils.patch @@ -0,0 +1,36 @@ +diff -Naur emilpro-3/CMakeLists.txt emilpro-3-nobinutils/CMakeLists.txt +--- emilpro-3/CMakeLists.txt 2013-12-28 04:22:34.000000000 -0500 ++++ emilpro-3-nobinutils/CMakeLists.txt 2014-03-18 14:59:17.983479920 -0400 +@@ -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,7 +29,6 @@ + pkg_check_modules(LIBCURL libcurl) + + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall -D_GLIBCXX_USE_NANOSLEEP -DPACKAGE=emilpro -DPACKAGE_VERSION=1") +-LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/install-binutils/lib ${CMAKE_BINARY_DIR}/install-binutils/lib64) + + if (HAVE_BFD_MULTIARCH) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_BFD_MULTIARCH") +@@ -110,7 +108,6 @@ + src/include/ + ${CMAKE_BINARY_DIR} + ${LIBELF_INCLUDE_DIRS} +- ${CMAKE_BINARY_DIR}/install-binutils/include/ + ${GTKMM_INCLUDE_DIRS} + ${GTKSOURCEVIEWMM_INCLUDE_DIRS} + ${LIBXMLPP_INCLUDE_DIRS} +@@ -128,8 +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} diff --git a/dev-util/emilpro/metadata.xml b/dev-util/emilpro/metadata.xml index 4b6b68191d89..6151b9b64083 100644 --- a/dev-util/emilpro/metadata.xml +++ b/dev-util/emilpro/metadata.xml @@ -7,4 +7,7 @@ </maintainer> <longdescription lang="en"> </longdescription> +<use> +<flag name="system-binutils">Use the gentoo binutils instead of building against an unpatched vanilla version</flag> +</use> </pkgmetadata> |