diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2003-12-17 11:58:24 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2003-12-17 11:58:24 +0000 |
commit | b903fb8023765f91d2acdf09cafd93e91fcac5ab (patch) | |
tree | 9349a30fd9ca5acb6caa650ff6e6f054e713a8cf /sys-apps | |
parent | new version upstream, major fixes, fix bug #35851, full tcsim support, block ... (diff) | |
download | gentoo-2-b903fb8023765f91d2acdf09cafd93e91fcac5ab.tar.gz gentoo-2-b903fb8023765f91d2acdf09cafd93e91fcac5ab.tar.bz2 gentoo-2-b903fb8023765f91d2acdf09cafd93e91fcac5ab.zip |
new version upstream, major fixes, fix bug #35851, full tcsim support, block old version out as it was badly badly broken
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/tcng/ChangeLog | 9 | ||||
-rw-r--r-- | sys-apps/tcng/Manifest | 11 | ||||
-rw-r--r-- | sys-apps/tcng/files/digest-tcng-9i | 4 | ||||
-rw-r--r-- | sys-apps/tcng/files/tcng-9i-fixes.patch | 90 | ||||
-rw-r--r-- | sys-apps/tcng/files/tcng-9i-gentoo.patch | 12 | ||||
-rw-r--r-- | sys-apps/tcng/tcng-9h.ebuild | 23 | ||||
-rw-r--r-- | sys-apps/tcng/tcng-9i.ebuild | 132 |
7 files changed, 265 insertions, 16 deletions
diff --git a/sys-apps/tcng/ChangeLog b/sys-apps/tcng/ChangeLog index 0100bc60cf15..18e64df2d944 100644 --- a/sys-apps/tcng/ChangeLog +++ b/sys-apps/tcng/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-apps/tcng # Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/tcng/ChangeLog,v 1.2 2003/12/09 17:52:25 lanius Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/tcng/ChangeLog,v 1.3 2003/12/17 11:58:17 robbat2 Exp $ + +*tcng-9i (17 Dec 2003) + + 17 Dec 2003; Robin H. Johnson <robbat2@gentoo.org> tcng-9h.ebuild, + tcng-9i.ebuild, files/tcng-9i-fixes.patch, files/tcng-9i-gentoo.patch: + new version upstream, major fixes, fix bug #35851, full tcsim support, block + old version out as it was badly badly broken 09 Dec 2003; Heinrich Wendel <lanius@gentoo.org> tcng-9h.ebuild: changed app-text/ghostscript to virtual/ghostscript diff --git a/sys-apps/tcng/Manifest b/sys-apps/tcng/Manifest index d48a9bbe0272..c16ec9ef14f1 100644 --- a/sys-apps/tcng/Manifest +++ b/sys-apps/tcng/Manifest @@ -1,8 +1,9 @@ -# $Header: /var/cvsroot/gentoo-x86/sys-apps/tcng/Manifest,v 1.8 2003/12/17 11:58:17 robbat2 Exp $ -MD5 a1a41d1d705111a9654eceedcaf5e890 tcng-9i.ebuild 3485 -MD5 08abcdf9eebdd85f53ebfcbe1cdc0bd2 tcng-9h.ebuild 2485 -MD5 1d6f5667fdf13eebd8da7ad446aef4d0 ChangeLog 534 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/tcng/Manifest,v 1.9 2003/12/17 11:58:24 robbat2 Exp $ +MD5 a422b33ac46edbd9e6601cf9a87121b5 tcng-9i.ebuild 4013 +MD5 f0329f3edd8b770c4f32c13edfc91ba5 tcng-9h.ebuild 2501 +MD5 361aa2d4364e471555d8114db1601477 ChangeLog 828 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 -MD5 3795dfb12261c64ebd6a428e1c9cd9b9 files/digest-tcng-9i-r2 59 +MD5 055bee9ec58b1f245bee0772dda0b807 files/tcng-9i-gentoo.patch 410 MD5 452318324f0c5e0571d8db1a63ee78d2 files/digest-tcng-9h 270 MD5 bba07d9e3d5362bf04936fd2450b2d27 files/digest-tcng-9i 276 +MD5 95bc941a647639a523cea5fc6b8ae92a files/tcng-9i-fixes.patch 2949 diff --git a/sys-apps/tcng/files/digest-tcng-9i b/sys-apps/tcng/files/digest-tcng-9i new file mode 100644 index 000000000000..cfcadd9c5459 --- /dev/null +++ b/sys-apps/tcng/files/digest-tcng-9i @@ -0,0 +1,4 @@ +MD5 50f497a7539e4c03c5783b410b132127 tcng-9i.tar.gz 514370 +MD5 b05a4e375d9468be3a1dd3f0e83daee8 iproute2-2.4.7-now-ss010824.tar.gz 140139 +MD5 ac343233aa5d745341da9e4ec22475af iproute_20010824-11.diff.gz 44736 +MD5 642af5ab5e1fc63685fde85e9ae601e4 linux-2.4.23.tar.bz2 29832609 diff --git a/sys-apps/tcng/files/tcng-9i-fixes.patch b/sys-apps/tcng/files/tcng-9i-fixes.patch new file mode 100644 index 000000000000..f5d77e17a5bb --- /dev/null +++ b/sys-apps/tcng/files/tcng-9i-fixes.patch @@ -0,0 +1,90 @@ +diff -ur tcng.orig/tcc/tcc.c tcng/tcc/tcc.c +--- tcng.orig/tcc/tcc.c 2002-10-10 09:52:41.000000000 -0700 ++++ tcng/tcc/tcc.c 2003-12-17 02:13:25.000000000 -0800 +@@ -219,7 +219,7 @@ + * + * (and we'd actually need one less, because we count argv[0] twice) + */ +- cpp_argv[cpp_argc++] = "-$"; ++ //cpp_argv[cpp_argc++] = "-$"; + tcng_topdir = getenv("TCNG_TOPDIR"); + include = alloc_sprintf("%s/" TCNG_INC_DIR, + tcng_topdir ? tcng_topdir : TOPDIR); +@@ -333,7 +333,11 @@ + if (optind < argc) usage(argv[0]); + } + if (input) cpp_argv[cpp_argc++] = input; +- cpp_argv[0] = argv[0]; ++ ++ // ARGV[0] must be the program that execvp is calling! ++ //cpp_argv[0] = argv[0]; ++ cpp_argv[0] = CPP; ++ + if (include_default) { + cpp_argv[cpp_argc++] = "-include"; + cpp_argv[cpp_argc++] = alloc_sprintf("%s/default.tc",include); +diff -ur tcng.orig/tcsim/setup.ulib tcng/tcsim/setup.ulib +--- tcng.orig/tcsim/setup.ulib 2003-01-14 07:25:05.000000000 -0800 ++++ tcng/tcsim/setup.ulib 2003-12-17 02:03:06.000000000 -0800 +@@ -199,4 +199,7 @@ + perl -pi -e 's/exit\(0\);/return 0;/;' iproute2/tc/$n + done + ++# Sometimes 'offsetof' is NOT defined, and we need to import it ++sed -i iproute2/tc/tc_qdisc.c -e '1i#include <stddef.h>' ++ + touch .ready +diff -ur tcng.orig/tcsim/tcsim.c tcng/tcsim/tcsim.c +--- tcng.orig/tcsim/tcsim.c 2002-11-14 07:49:52.000000000 -0800 ++++ tcng/tcsim/tcsim.c 2003-12-17 02:13:16.000000000 -0800 +@@ -299,7 +299,7 @@ + * +2 for -i dev + * +1 for terminating NULL + */ +- cpp_argv[cpp_argc++] = "-$"; ++ //cpp_argv[cpp_argc++] = "-$"; + tcng_topdir = getenv("TCNG_TOPDIR"); + include = alloc_sprintf("%s/lib/tcng/include", + tcng_topdir ? tcng_topdir : TOPDIR); +@@ -380,7 +380,11 @@ + if (set_printk_threshold != -1) printk_threshold = set_printk_threshold; + if (kernel_init()) errorf("oops, trouble"); + if (verbose) setup_tracing(); +- cpp_argv[0] = argv[0]; ++ ++ // ARGV[0] must be the program that execvp is calling! ++ //cpp_argv[0] = argv[0]; ++ cpp_argv[0] = CPP; ++ + if (include_default) { + cpp_argv[cpp_argc++] = "-include"; + cpp_argv[cpp_argc++] = alloc_sprintf("%s/default.tcsim",include);; +--- tcng.orig/tests/tstcond 2002-09-19 12:14:55.000000000 -0700 ++++ tcng/tests/tstcond 2003-12-17 02:55:09.000000000 -0800 +@@ -142,7 +142,7 @@ + ERROR + EOF in conditional block + # conditional tests: neither warn nor skip ------------------------------------ +-runtests | tail -1 ++runtests | tail -n 1 + |BEGIN CONDITIONAL + |true + |EOF +@@ -153,7 +153,7 @@ + EOF + Passed the test + # conditional tests: warn only ------------------------------------------------ +-runtests | tail -1 ++runtests | tail -n 1 + |BEGIN CONDITIONAL + |true + |EOF +@@ -166,7 +166,7 @@ + EOF + Passed the test (1 warning) + # conditional tests: warn and skip -------------------------------------------- +-runtests | tail -1 ++runtests | tail -n 1 + |BEGIN CONDITIONAL + |false + |EOF diff --git a/sys-apps/tcng/files/tcng-9i-gentoo.patch b/sys-apps/tcng/files/tcng-9i-gentoo.patch new file mode 100644 index 000000000000..908c83136508 --- /dev/null +++ b/sys-apps/tcng/files/tcng-9i-gentoo.patch @@ -0,0 +1,12 @@ +diff -ur tcng.orig/tcsim/Makefile.unclean tcng/tcsim/Makefile.unclean +--- tcng.orig/tcsim/Makefile.unclean 2003-11-21 19:51:01.000000000 -0800 ++++ tcng/tcsim/Makefile.unclean 2003-12-17 02:05:38.000000000 -0800 +@@ -33,7 +33,7 @@ + -I../shared + + LDFLAGS=-Wl,-E +-LIBS=-lfl -lm -ldl -L../shared -ltcngmisc $(LD_OPTS) ++LIBS=-lfl -lm -ldl -latm -L../shared -ltcngmisc $(LD_OPTS) + + .PHONY: modules depend dep + diff --git a/sys-apps/tcng/tcng-9h.ebuild b/sys-apps/tcng/tcng-9h.ebuild index b7baac16a198..ccc369de1ea7 100644 --- a/sys-apps/tcng/tcng-9h.ebuild +++ b/sys-apps/tcng/tcng-9h.ebuild @@ -1,19 +1,20 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/tcng/tcng-9h.ebuild,v 1.2 2003/12/09 17:52:25 lanius Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/tcng/tcng-9h.ebuild,v 1.3 2003/12/17 11:58:17 robbat2 Exp $ DESCRIPTION="tcng - Traffic Control Next Generation" HOMEPAGE="http://tcng.sourceforge.net/" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~x86" +# block this to phase it out very shortly +KEYWORDS="-*" IUSE="" DEPEND="doc? ( virtual/ghostscript app-text/tetex media-gfx/transfig ) dev-lang/perl virtual/os-headers sys-apps/iproute" RDEPEND="sys-devel/gcc - tcng-tcsim? ( media-gfx/gnuplot ) + tcsim? ( media-gfx/gnuplot ) dev-lang/perl sys-apps/iproute" @@ -26,7 +27,7 @@ IPROUTE_SRCFILE="iproute2-2.4.7-now-ss${IPROUTE_PV/20}.tar.gz" # note this project does NOT use the SF mirroring system SRC_URI="http://tcng.sourceforge.net/dist/${P}.tar.gz - tcng-tcsim? ( ftp://ftp.inr.ac.ru/ip-routing/${IPROUTE_SRCFILE} + tcsim? ( ftp://ftp.inr.ac.ru/ip-routing/${IPROUTE_SRCFILE} http://ftp.debian.org/debian/pool/main/i/iproute/${IPROUTE_DEBIAN_PATCH} )" S=${WORKDIR}/tcng @@ -36,7 +37,7 @@ src_unpack() { #unpack tcng unpack ${P}.tar.gz - if use tcng-tcsim; then + if use tcsim; then #unpack iproute unpack ${IPROUTE_SRCFILE} mv iproute2 iproute-20010824 @@ -50,9 +51,11 @@ src_unpack() { src_compile() { local myconf - use tcng-tcsim && myconf="${myconf} --with-tcsim" || myconf="${myconf} --no-tcsim" + use tcsim && myconf="${myconf} --with-tcsim" || myconf="${myconf} --no-tcsim" + dodir /usr/bin + # configure is NONSTANDARD ./configure \ - --install-directory /usr \ + --install-directory ${D}/usr \ --no-manual \ ${myconf} \ || die "configure failed" @@ -69,9 +72,9 @@ src_install() { dodir /usr dodir /usr/bin # fix the install location - sed 's;INSTALL_DIR=\(.*\);INSTALL_DIR=${D}\1;g' -i config - make install-tcc || die "make install-tcc failed" - if use tcng-tcsim; then + export TCNG_INSTALL_CWD="/usr" + einstall install-tcc || die "make install-tcc failed" + if use tcsim; then make install-tcsim install-tests || die "make install-tcsim install-tests failed" fi diff --git a/sys-apps/tcng/tcng-9i.ebuild b/sys-apps/tcng/tcng-9i.ebuild new file mode 100644 index 000000000000..974a06ebb3ae --- /dev/null +++ b/sys-apps/tcng/tcng-9i.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/tcng/tcng-9i.ebuild,v 1.1 2003/12/17 11:58:17 robbat2 Exp $ + +DESCRIPTION="tcng - Traffic Control Next Generation" +HOMEPAGE="http://tcng.sourceforge.net/" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="doc tcsim" + +# perl because stuff is written in it +# iproute,linux-atm as the output needs that +# os-headers as it compiles stuff with them +# gcc/binutils as it compiles stuff +DEPEND_COMMON="dev-lang/perl + sys-apps/iproute + net-dialup/linux-atm + virtual/os-headers + sys-devel/gcc + sys-devel/binutils" + +DEPEND="doc? ( virtual/ghostscript app-text/tetex media-gfx/transfig ) + sys-devel/make + dev-util/yacc + sys-devel/flex + ${DEPEND_COMMON}" +RDEPEND="sys-devel/gcc + tcsim? ( media-gfx/gnuplot ) + sys-apps/grep + sys-apps/sed + sys-apps/gawk + sys-apps/coreutils + ${DEPEND_COMMON}" + +IPROUTE_PN="iproute" +IPROUTE_PV="20010824" +IPROUTE_DEBIAN_PATCH_PV="11" +IPROUTE_P="${IPROUTE_PN}-${IPROUTE_PV}" +IPROUTE_DEBIAN_PATCH="${IPROUTE_P/-/_}-${IPROUTE_DEBIAN_PATCH_PV}.diff.gz" +IPROUTE_SRCFILE="iproute2-2.4.7-now-ss${IPROUTE_PV/20}.tar.gz" + +# we also need a vanilla kernel source to use with this +KERNEL_PN=linux +KERNEL_PV=2.4.23 +KERNEL_P=${KERNEL_PN}-${KERNEL_PV} + +# note this project does NOT use the SF mirroring system +SRC_URI="http://tcng.sourceforge.net/dist/${P}.tar.gz + tcsim? ( ftp://ftp.inr.ac.ru/ip-routing/${IPROUTE_SRCFILE} + http://ftp.debian.org/debian/pool/main/i/iproute/${IPROUTE_DEBIAN_PATCH} + mirror://kernel/linux/kernel/v2.4/${KERNEL_P}.tar.bz2 )" + +S=${WORKDIR}/tcng +IPROUTE_S=${WORKDIR}/${IPROUTE_P} +KERNEL_S=${WORKDIR}/${KERNEL_P} + +src_unpack() { + # unpack tcng + unpack ${P}.tar.gz || die "failed to unpack tcng" + epatch ${FILESDIR}/${P}-fixes.patch + epatch ${FILESDIR}/${P}-gentoo.patch + + if use tcsim; then + # unpack kernel + unpack ${KERNEL_P}.tar.bz2 || die "failed to unpack kernel" + ln -s ${KERNEL_S} ${S}/tcsim/linux || die "failed to unpack kernel" + + # unpack iproute + unpack ${IPROUTE_SRCFILE} || die "failed to unpack iproute" + mv iproute2 iproute-20010824 || die "failed to unpack iproute" + epatch ${DISTDIR}/${IPROUTE_DEBIAN_PATCH} + # this is needed for tcsim + rm ${IPROUTE_S}/include-glibc/bits/socket.h || die "failed to unpack iproute" + cp -f ${IPROUTE_S}/include-glibc/socketbits.h ${IPROUTE_S}/include-glibc/bits/socket.h || die "failed to unpack iproute" + ln -s ${IPROUTE_S} ${S}/tcsim/iproute2 || die "failed to unpack iproute" + fi +} + +src_compile() { + local myconf + if use tcsim; then + myconf="${myconf} --with-tcsim" + myconf="${myconf} --kernel ${KERNEL_S}" + myconf="${myconf} --iproute2 ${IPROUTE_S}" + fi + + # i know this is before install stage, but the build needs it + dodir /usr/bin + + # configure is NONSTANDARD + ./configure \ + --install-directory /usr \ + --no-manual \ + ${myconf} \ + || die "configure failed" + + # if we aren't debugging, an extra optimization is available + use debug || CFLAGS="${CFLAGS} -D__NO_STRING_INLINES" + # upstream package uses CFLAGS var for it's own uses + sed -i Common.make -e "s/^\(CC_OPTS=\)\(.*\)/\1${CFLAGS} #\2/" + unset CFLAGS + emake || die + cd ${S}/doc + make tcng.txt + use doc && make tcng.pdf +} + +src_install() { + dodir /usr + dodir /usr/bin + + #For localization.sh to work corectly + #TCNG INSTALL/TOPDIR has to be /usr, instead of /var/tmp/portage/tcng-xx/image/usr... + sed 's:^\(INSTALL_DIR=\)\(.*\):\1$(DESTDIR)\2:g' -i ${S}/Makefile + einstall DESTDIR=${D} TCNG_INSTALL_CWD=/usr install-tcc || die "make install-tcc failed" + if use tcsim; then + einstall DESTDIR=${D} TCNG_INSTALL_CWD=/usr install-tcsim || die "make install-tcsim failed" + fi + + # lots of doc stuff + dodoc CHANGES COPYING.GPL COPYING.LGPL README TODO VERSION tcc/PARAMETERS + dodoc doc/tcng.txt doc/README.tccext + newdoc doc/README README.doc + if use doc; then + dodoc doc/tcng.ps doc/tcng.pdf + fi + if use tcsim; then + newdoc tcsim/BUGS BUGS.tcsim + newdoc tcsim/README README.tcsim + fi +} |