From eb207afd12061da6d1d832131cd0a020efd31585 Mon Sep 17 00:00:00 2001 From: Sergey Popov Date: Thu, 17 Oct 2013 15:06:59 +0400 Subject: [PATCH] Add ebuild for recent version of Dynamips --- app-emulation/dynamips/Manifest | 4 ++ app-emulation/dynamips/dynamips-0.2.10.ebuild | 55 +++++++++++++++++++ .../files/dynamips-0.2.10-makefile.patch | 43 +++++++++++++++ app-emulation/dynamips/metadata.xml | 12 ++++ 4 files changed, 114 insertions(+) create mode 100644 app-emulation/dynamips/Manifest create mode 100644 app-emulation/dynamips/dynamips-0.2.10.ebuild create mode 100644 app-emulation/dynamips/files/dynamips-0.2.10-makefile.patch create mode 100644 app-emulation/dynamips/metadata.xml diff --git a/app-emulation/dynamips/Manifest b/app-emulation/dynamips/Manifest new file mode 100644 index 0000000..8421b4a --- /dev/null +++ b/app-emulation/dynamips/Manifest @@ -0,0 +1,4 @@ +AUX dynamips-0.2.10-makefile.patch 1417 SHA256 115cbfa21f5ea089dc494374f50390a6b4cd7864a267376f54efc9b33d43c2c7 SHA512 e38af3908cf61c6fbbd5adf7d40b990c75fd1feefdaa0a942e65875a6bccb13f92a37f4d4b371fda6dcd40f600b8c31fbf257b5a0482060aa3680176377f81be WHIRLPOOL cc3cd0619dd225c90ebdc31220a7754bcd86b4f233490172889de49bad7c4466850579aa9a32df149abdcfe60052a756646247af50b1ca3588fbab5b19381e94 +DIST dynamips-0.2.10-source.zip 966018 SHA256 d62f739547134aeb0ee5a6b28a52772ae79a93cb6426b712cbddc72cb0b7ba44 SHA512 41b1d5c22036e21ce9a518f117a64634a71deb0632777f813221ade14bafe6d84182224e28e67a676e87da677c83262a8ebe37fa6dee0290626c24e676341e35 WHIRLPOOL 0904214700b0f2e349a283189f65fcc21475b00690aa4a42aa17cbb837132b3a46f628dfd9dbb95e66a02078079baa372cc3baabbd3b3cbb582a4536e95895c8 +EBUILD dynamips-0.2.10.ebuild 1166 SHA256 976480495c1b0bdaf177c0b587275a1f8e0d0b8887ab2352bd39282117e3e950 SHA512 1769e646711a1972312da3e0596966cc0a363a51cabc4f3cedb8955c8c05165832defe7ec97bc65b3affd0902f514a7dd392ce0a8a66826ee41853f3a68765da WHIRLPOOL 99f1463f5eab7b808a5971526fa8c07450813f7bbf3671071c149315c76c60bdfb0f12c44d6bf85cb8353dcc6784892bde5c0dbfb5ce65c1282398e02588571a +MISC metadata.xml 317 SHA256 8746edc9aae0113798d2e985befb7ea5e99b5822e660ff059b75784c727163a7 SHA512 11077591e3616bcafd58ca67976ba3c5b00748ff341ec3d04e473ec43666cbbaf90500814066b9d9cc15ea547b25c1d5038de1512bf403df927a7bca1cbc845d WHIRLPOOL fd726e4129625d250e4c03f1c3f7171a27f1e2fc1ac4b8534cc95ee1e80f51c2c0faf0afe61e2b6127100b63fa680afb6a0ad822bf026273dc5f9f756452a5cb diff --git a/app-emulation/dynamips/dynamips-0.2.10.ebuild b/app-emulation/dynamips/dynamips-0.2.10.ebuild new file mode 100644 index 0000000..29da37d --- /dev/null +++ b/app-emulation/dynamips/dynamips-0.2.10.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/dynamips/dynamips-0.2.8-r1.ebuild,v 1.1 2013/08/25 14:51:00 pinkbyte Exp $ + +EAPI=5 + +MY_P="${P}-source" + +inherit eutils toolchain-funcs + +DESCRIPTION="Cisco 7200/3600 Simulator" +HOMEPAGE="http://www.gns3.net/dynamips/" +SRC_URI="mirror://sourceforge/project/gns-3/Dynamips/${PV}/${MY_P}.zip" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="app-arch/unzip + dev-libs/elfutils + net-libs/libpcap" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}/${P}-makefile.patch" + + # enable verbose build + # do not link to libelf statically + sed -i \ + -e 's/@$(CC)/$(CC)/g' \ + -e 's:/usr/$(DYNAMIPS_LIB)/libelf.a:-lelf:' \ + stable/Makefile || die 'sed on Makefile failed' + sed -i -e + # respect compiler + tc-export CC + + epatch_user +} + +src_compile() { + if use amd64 || use x86; then + emake DYNAMIPS_ARCH="${ARCH}" + else + emake DYNAMIS_ARCH="nojit" + fi +} + +src_install () { + newbin dynamips.stable dynamips + dobin stable/nvram_export + doman man/* + dodoc TODO README README.hypervisor +} diff --git a/app-emulation/dynamips/files/dynamips-0.2.10-makefile.patch b/app-emulation/dynamips/files/dynamips-0.2.10-makefile.patch new file mode 100644 index 0000000..706de97 --- /dev/null +++ b/app-emulation/dynamips/files/dynamips-0.2.10-makefile.patch @@ -0,0 +1,43 @@ +--- stable/Makefile.orig 2013-10-17 15:01:34.468068963 +0400 ++++ stable/Makefile 2013-10-17 15:04:22.972077076 +0400 +@@ -3,12 +3,7 @@ + + # Replace x86 by amd64 for a build on x86_64. + # Use "nojit" for architectures that are not x86 or x86_64. +-DYNAMIPS_ARCH?=x86 +-#DYNAMIPS_ARCH?=amd64 +- +-ifeq ($(DYNAMIPS_ARCH),ppc32) +-DYNAMIPS_ARCH=x86 +-endif ++DYNAMIPS_ARCH?=nojit + + # Get include files from the current directory and from the common directory + INCLUDE+=-I. -I../common +@@ -47,7 +42,7 @@ + PPC32_ARCH_INC_FILE=\"ppc32_$(DYNAMIPS_ARCH)_trans.h\" + OSNAME=unknown + +-CFLAGS+= $(INCLUDE) -Wall -O2 -fomit-frame-pointer \ ++CFLAGS+= $(INCLUDE) -Wall \ + -DJIT_ARCH=\"$(DYNAMIPS_ARCH)\" -DJIT_CPU=CPU_$(DYNAMIPS_ARCH) \ + -DMIPS64_ARCH_INC_FILE=$(MIPS64_ARCH_INC_FILE) \ + -DPPC32_ARCH_INC_FILE=$(PPC32_ARCH_INC_FILE) \ +@@ -274,7 +269,7 @@ + + asmdefs$(BIN_EXT): asmdefs.c mips64.h + @echo "Linking $@" +- @$(CC) -Wall $(CFLAGS) -o $@ asmdefs.c ++ @$(CC) -Wall $(CFLAGS) $(LDFLAGS) -o $@ asmdefs.c + + asmdefs.h: asmdefs$(BIN_EXT) + @echo "Building assembly definitions header file" +@@ -282,7 +277,7 @@ + + nvram_export$(BIN_EXT): nvram_export.o fs_nvram.o + @echo "Linking $@" +- @$(CC) -Wall $(CFLAGS) $(INCLUDE) -o $@ nvram_export.o fs_nvram.o ++ @$(CC) -Wall $(CFLAGS) $(LDFLAGS) $(INCLUDE) -o $@ nvram_export.o fs_nvram.o + + install: $(PROG) nvram_export$(BIN_EXT) + @echo "Installing" diff --git a/app-emulation/dynamips/metadata.xml b/app-emulation/dynamips/metadata.xml new file mode 100644 index 0000000..7d1a889 --- /dev/null +++ b/app-emulation/dynamips/metadata.xml @@ -0,0 +1,12 @@ + + + + + pinkbyte@gentoo.org + Sergey Popov + + + chainsaw@gentoo.org + Tony Vroon + +