commit:     3aaefaa5f0fa55ebabfd077d378698aa65f94e5e
Author:     Gerhard Bräunlich <wippbox <AT> gmx <DOT> net>
AuthorDate: Thu Sep 22 14:53:55 2016 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Sep 24 13:30:17 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3aaefaa5

sci-misc/gt-itm: EAPI bump 0 -> 6

Package-Manager: portage-2.2.28
Closes: https://github.com/gentoo/gentoo/pull/2386

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sci-misc/gt-itm/gt-itm-19961004-r2.ebuild | 80 +++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)

diff --git a/sci-misc/gt-itm/gt-itm-19961004-r2.ebuild 
b/sci-misc/gt-itm/gt-itm-19961004-r2.ebuild
new file mode 100644
index 00000000..9e41e9b
--- /dev/null
+++ b/sci-misc/gt-itm/gt-itm-19961004-r2.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Routines to generate / analyze graphs using models for 
internetwork topology"
+HOMEPAGE="http://www.cc.gatech.edu/fac/Ellen.Zegura/graphs.html
+                 http://www.isi.edu/nsnam/ns/ns-topogen.html#gt-itm";
+SRC_URI="http://www.cc.gatech.edu/fac/Ellen.Zegura/gt-itm/gt-itm.tar.gz
+                http://www.isi.edu/nsnam/dist/sgb2ns.tar.gz";
+
+LICENSE="all-rights-reserved sgb2ns"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+RESTRICT="mirror bindist"
+IUSE="doc"
+
+DEPEND="dev-util/sgb"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+S2="${WORKDIR}/sgb2ns"
+
+PATCHES=( "${FILESDIR}"/${PN}-implicits.patch )
+DOCS=( README docs/. )
+
+src_unpack() {
+       unpack sgb2ns.tar.gz
+
+       mkdir "$S" || die
+       cd "$S" || die
+       unpack gt-itm.tar.gz
+}
+src_prepare() {
+       sed -ri -e '/^[[:alnum:]]+\.o:/d' \
+               -e 's|LIBS = -lm -lgb.*|LIBS = -lm -lgb|' \
+               -e 's/\$\(CC\)/& \$\(LDFLAGS\)/g' \
+               src/Makefile || die
+       sed -ri -e '/^SYS = -DSYSV/d' \
+               -e 's|LIBS = -lm -lgb.*|LIBS = -lm -lgb|' \
+               -e 's/\$\(CC\)/& \$\(LDFLAGS\)/g' \
+               "${S2}"/Makefile  || die
+
+       rm -f lib/* || die
+
+       while IFS="" read -d $'\0' -r file; do
+               sed -i -re 's|(\.\./)+bin/||g' "$file" || die
+       done < <(find sample-graphs/ -perm /a+x -type f -name 'Run*' -print0)
+
+       sed -i -e 's|sys/types.h|sys/param.h|' src/geog.c || die
+       sed -i -e '162 s/connected $/connected \\/' src/eval.c || die
+
+       # fix implicit function declarations
+       sed -i -e '/stdio.h/ a\#include <stdlib.h>' \
+               "${S2}/sgb2comns.c" "${S2}/sgb2hierns.c" || die
+       sed -i -e "s/<strings.h>/<string.h>/g" "${S2}/sgb2hierns.c" || die
+       default
+}
+
+src_compile() {
+       emake -C src CFLAGS="${CFLAGS} -I../include" LDFLAGS="${LDFLAGS}" \
+               CC="$(tc-getCC)"
+
+       emake -C "${S2}" CFLAGS="${CFLAGS} -I\$(IDIR) -L\$(LDIR)" 
LDFLAGS="${LDFLAGS}" \
+               CC="$(tc-getCC)"
+}
+
+src_install() {
+       dobin bin/*
+       einstalldocs
+       newdoc "${S2}"/README README.sgb2ns
+       if use doc; then
+               dodoc -r sample-graphs
+               dodoc "${S2}"/*.{tcl,gb}
+               docompress -x "/usr/share/doc/${PF}/sample-graphs"
+       fi
+}

Reply via email to