From 1a2299624cb659e1c59d59ac94edaead12321c7b Mon Sep 17 00:00:00 2001
From: Cédric Krier <cedk@gentoo.org>
Date: Sat, 14 Jul 2007 10:49:29 +0000
Subject: Add patch to fix hashing (Portage version: 2.1.2.9)

---
 net-misc/olsrd/ChangeLog                           |  9 +++-
 net-misc/olsrd/files/digest-olsrd-0.5.1            |  3 --
 net-misc/olsrd/files/digest-olsrd-0.5.1-r1         |  3 ++
 net-misc/olsrd/files/olsrd-0.5.1-fix-hashing.patch | 12 +++++
 net-misc/olsrd/olsrd-0.5.1-r1.ebuild               | 55 ++++++++++++++++++++++
 net-misc/olsrd/olsrd-0.5.1.ebuild                  | 49 -------------------
 6 files changed, 78 insertions(+), 53 deletions(-)
 delete mode 100644 net-misc/olsrd/files/digest-olsrd-0.5.1
 create mode 100644 net-misc/olsrd/files/digest-olsrd-0.5.1-r1
 create mode 100644 net-misc/olsrd/files/olsrd-0.5.1-fix-hashing.patch
 create mode 100644 net-misc/olsrd/olsrd-0.5.1-r1.ebuild
 delete mode 100644 net-misc/olsrd/olsrd-0.5.1.ebuild

(limited to 'net-misc')

diff --git a/net-misc/olsrd/ChangeLog b/net-misc/olsrd/ChangeLog
index b25f698de43f..4e7ff09232f6 100644
--- a/net-misc/olsrd/ChangeLog
+++ b/net-misc/olsrd/ChangeLog
@@ -1,6 +1,13 @@
 # ChangeLog for net-misc/olsrd
 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/olsrd/ChangeLog,v 1.7 2007/07/06 11:46:31 cedk Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/olsrd/ChangeLog,v 1.8 2007/07/14 10:49:29 cedk Exp $
+
+*olsrd-0.5.1-r1 (14 Jul 2007)
+
+  14 Jul 2007; Cédric Krier <cedk@gentoo.org>
+  +files/olsrd-0.5.1-fix-hashing.patch, -olsrd-0.5.1.ebuild,
+  +olsrd-0.5.1-r1.ebuild:
+  Add patch to fix hashing
 
 *olsrd-0.5.1 (06 Jul 2007)
 
diff --git a/net-misc/olsrd/files/digest-olsrd-0.5.1 b/net-misc/olsrd/files/digest-olsrd-0.5.1
deleted file mode 100644
index 76deb451c028..000000000000
--- a/net-misc/olsrd/files/digest-olsrd-0.5.1
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 5f8a4220836e03265a50378500f399af olsrd-0.5.1.tar.bz2 529916
-RMD160 d83282a5ebecdb7599c84e3e4f1175eb78fed2a6 olsrd-0.5.1.tar.bz2 529916
-SHA256 42fda56ebd5a876346fc6efb8fff751c9ac28b485da545299d0513a594cfebeb olsrd-0.5.1.tar.bz2 529916
diff --git a/net-misc/olsrd/files/digest-olsrd-0.5.1-r1 b/net-misc/olsrd/files/digest-olsrd-0.5.1-r1
new file mode 100644
index 000000000000..76deb451c028
--- /dev/null
+++ b/net-misc/olsrd/files/digest-olsrd-0.5.1-r1
@@ -0,0 +1,3 @@
+MD5 5f8a4220836e03265a50378500f399af olsrd-0.5.1.tar.bz2 529916
+RMD160 d83282a5ebecdb7599c84e3e4f1175eb78fed2a6 olsrd-0.5.1.tar.bz2 529916
+SHA256 42fda56ebd5a876346fc6efb8fff751c9ac28b485da545299d0513a594cfebeb olsrd-0.5.1.tar.bz2 529916
diff --git a/net-misc/olsrd/files/olsrd-0.5.1-fix-hashing.patch b/net-misc/olsrd/files/olsrd-0.5.1-fix-hashing.patch
new file mode 100644
index 000000000000..40dd61db90fe
--- /dev/null
+++ b/net-misc/olsrd/files/olsrd-0.5.1-fix-hashing.patch
@@ -0,0 +1,12 @@
+diff -Nur olsrd-0.5.1.orig/src/hashing.c olsrd-0.5.1/src/hashing.c
+--- olsrd-0.5.1.orig/src/hashing.c	2007-07-03 17:31:40.000000000 +0200
++++ olsrd-0.5.1/src/hashing.c	2007-07-07 21:19:38.000000000 +0200
+@@ -54,7 +54,7 @@
+     olsr_u32_t hash;
+     if(olsr_cnf->ip_version == AF_INET) {
+         /* IPv4 */  
+-        const olsr_u8_t * const v4x = (const char *)&address;
++        const olsr_u8_t * const v4x = (const olsr_u8_t *)&address->v4;
+         hash = v4x[0] ^ v4x[1] ^ v4x[2] ^ v4x[3];
+     } else {
+         /* IPv6 */
diff --git a/net-misc/olsrd/olsrd-0.5.1-r1.ebuild b/net-misc/olsrd/olsrd-0.5.1-r1.ebuild
new file mode 100644
index 000000000000..0e31c8a5d5a8
--- /dev/null
+++ b/net-misc/olsrd/olsrd-0.5.1-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/olsrd/olsrd-0.5.1-r1.ebuild,v 1.1 2007/07/14 10:49:29 cedk Exp $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="An implementation of the Optimized Link State Routing protocol"
+HOMEPAGE="http://www.olsr.org/"
+SRC_URI="http://www.olsr.org/releases/${PV%.*}/${P}.tar.bz2"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="~x86"
+IUSE="gtk"
+
+DEPEND="gtk? ( =x11-libs/gtk+-2* )"
+
+src_unpack() {
+	unpack ${A}
+	cd "${S}"
+	epatch "${FILESDIR}/${P}-fix-hashing.patch"
+}
+
+src_compile() {
+	cd "${S}"
+	emake OS=linux CC=$(tc-getCC) build_all || die "emake failed"
+
+	if use gtk ; then
+		cd "${S}/gui/linux-gtk"
+		einfo "Building GUI ..."
+		emake CC=$(tc-getCC) || die "emake failed"
+	fi
+}
+
+src_install() {
+	emake OS=linux DESTDIR="${D}" STRIP=true install_all || die "emake install_all failed"
+
+	if use gtk; then
+		cd "${S}/gui/linux-gtk"
+		emake DESTDIR="${D}" install || die "emake install failed"
+	fi
+
+	doinitd "${FILESDIR}/olsrd"
+
+	cd "${S}"
+	dodoc CHANGELOG features.txt README README-Olsr-Switch.html \
+		README-FreeBSD-libnet README-Link-Quality-Fish-Eye.txt \
+		README-Link-Quality.html files/olsrd.conf.default.rfc \
+		files/olsrd.conf.default.lq lib/bmf/README_BMF.txt \
+		lib/dyn_gw/README_DYN_GW lib/dyn_gw_plain/README_DYN_GW_PLAIN \
+		lib/dot_draw/README_DOT_DRAW lib/httpinfo/README_HTTPINFO \
+		lib/mini/README_MINI lib/nameservice/README_NAMESERVICE \
+		lib/pgraph/README_PGRAPH lib/quagga/README_QUAGGA \
+		lib/secure/README_SECURE lib/txtinfo/README_TXTINFO
+}
diff --git a/net-misc/olsrd/olsrd-0.5.1.ebuild b/net-misc/olsrd/olsrd-0.5.1.ebuild
deleted file mode 100644
index 41c7a8fc5c04..000000000000
--- a/net-misc/olsrd/olsrd-0.5.1.ebuild
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/olsrd/olsrd-0.5.1.ebuild,v 1.1 2007/07/06 11:46:31 cedk Exp $
-
-inherit eutils toolchain-funcs
-
-DESCRIPTION="An implementation of the Optimized Link State Routing protocol"
-HOMEPAGE="http://www.olsr.org/"
-SRC_URI="http://www.olsr.org/releases/${PV%.*}/${P}.tar.bz2"
-
-SLOT="0"
-LICENSE="BSD"
-KEYWORDS="~x86"
-IUSE="gtk"
-
-DEPEND="gtk? ( =x11-libs/gtk+-2* )"
-
-src_compile() {
-	cd "${S}"
-	emake OS=linux CC=$(tc-getCC) build_all || die "emake failed"
-
-	if use gtk ; then
-		cd "${S}/gui/linux-gtk"
-		einfo "Building GUI ..."
-		emake CC=$(tc-getCC) || die "emake failed"
-	fi
-}
-
-src_install() {
-	emake OS=linux DESTDIR="${D}" STRIP=true install_all || die "emake install_all failed"
-
-	if use gtk; then
-		cd "${S}/gui/linux-gtk"
-		emake DESTDIR="${D}" install || die "emake install failed"
-	fi
-
-	doinitd "${FILESDIR}/olsrd"
-
-	cd "${S}"
-	dodoc CHANGELOG features.txt README README-Olsr-Switch.html \
-		README-FreeBSD-libnet README-Link-Quality-Fish-Eye.txt \
-		README-Link-Quality.html files/olsrd.conf.default.rfc \
-		files/olsrd.conf.default.lq lib/bmf/README_BMF.txt \
-		lib/dyn_gw/README_DYN_GW lib/dyn_gw_plain/README_DYN_GW_PLAIN \
-		lib/dot_draw/README_DOT_DRAW lib/httpinfo/README_HTTPINFO \
-		lib/mini/README_MINI lib/nameservice/README_NAMESERVICE \
-		lib/pgraph/README_PGRAPH lib/quagga/README_QUAGGA \
-		lib/secure/README_SECURE lib/txtinfo/README_TXTINFO
-}
-- 
cgit v1.2.3-65-gdbad