From 10588c32d1d659dc138d6d4a8dd5480c29dde229 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Krier?= Date: Thu, 16 Nov 2006 21:27:01 +0000 Subject: [PATCH] New Ebuild for bug #76646 Package-Manager: portage-2.1.1-r1 --- net-misc/olsrd/ChangeLog | 14 ++ net-misc/olsrd/Manifest | 28 +++ net-misc/olsrd/files/digest-olsrd-0.4.10 | 3 + net-misc/olsrd/files/olsrd | 26 +++ .../olsrd/files/olsrd-0.4.10-makefile.patch | 175 ++++++++++++++++++ ...mleak_in_olsr_remove_scheduler_event.patch | 10 + net-misc/olsrd/metadata.xml | 9 + net-misc/olsrd/olsrd-0.4.10.ebuild | 56 ++++++ 8 files changed, 321 insertions(+) create mode 100644 net-misc/olsrd/ChangeLog create mode 100644 net-misc/olsrd/Manifest create mode 100644 net-misc/olsrd/files/digest-olsrd-0.4.10 create mode 100644 net-misc/olsrd/files/olsrd create mode 100644 net-misc/olsrd/files/olsrd-0.4.10-makefile.patch create mode 100644 net-misc/olsrd/files/olsrd-0.4.10-memleak_in_olsr_remove_scheduler_event.patch create mode 100644 net-misc/olsrd/metadata.xml create mode 100644 net-misc/olsrd/olsrd-0.4.10.ebuild diff --git a/net-misc/olsrd/ChangeLog b/net-misc/olsrd/ChangeLog new file mode 100644 index 000000000000..a11736a2b9ec --- /dev/null +++ b/net-misc/olsrd/ChangeLog @@ -0,0 +1,14 @@ +# ChangeLog for net-misc/olsrd +# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/olsrd/ChangeLog,v 1.1 2006/11/16 21:27:01 cedk Exp $ + +*olsrd-0.4.10 (16 Nov 2006) + + 16 Nov 2006; Cedric Krier + +files/olsrd-0.4.10-makefile.patch, + +files/olsrd-0.4.10-memleak_in_olsr_remove_scheduler_event.patch, + +files/olsrd, +metadata.xml, +olsrd-0.4.10.ebuild: + New Ebuild for bug #76646 thanks to Daniel Webert, Maximilian Bauer, Stefan + Schweizer, Andre Kloth, Petteri Räty, phaidros, Dirk-Lüder Kreie, + Christian Ludwig + diff --git a/net-misc/olsrd/Manifest b/net-misc/olsrd/Manifest new file mode 100644 index 000000000000..1a3a5269e87a --- /dev/null +++ b/net-misc/olsrd/Manifest @@ -0,0 +1,28 @@ +AUX olsrd 478 RMD160 7de06122dcde158e14e453bfde0bf5a9e7da1d47 SHA1 b225c82ea8b78a0ec42d46397d22df61a0ddf5ea SHA256 24b7132e606e40c2d529a5b3bd2b61390925099db81687341464c20bfc597676 +MD5 1391c12461ad1c5de5ddc622c9ab5ae1 files/olsrd 478 +RMD160 7de06122dcde158e14e453bfde0bf5a9e7da1d47 files/olsrd 478 +SHA256 24b7132e606e40c2d529a5b3bd2b61390925099db81687341464c20bfc597676 files/olsrd 478 +AUX olsrd-0.4.10-makefile.patch 5565 RMD160 6c6ba682e1263eaf1fc3fb72b74333374305b1dd SHA1 f4cd1be23129712ca39400c002b6314c32164828 SHA256 93706579549fe6e69af188a833435ba31fe2b74a97b2698f44e06d3d4a9e9c38 +MD5 267c7bedc012698ac836c13e0b56aacb files/olsrd-0.4.10-makefile.patch 5565 +RMD160 6c6ba682e1263eaf1fc3fb72b74333374305b1dd files/olsrd-0.4.10-makefile.patch 5565 +SHA256 93706579549fe6e69af188a833435ba31fe2b74a97b2698f44e06d3d4a9e9c38 files/olsrd-0.4.10-makefile.patch 5565 +AUX olsrd-0.4.10-memleak_in_olsr_remove_scheduler_event.patch 246 RMD160 2f0414c22e559fe03ab5968fa21b8c2c4a437ff6 SHA1 b042b511094020813a6fd0e43c99e03bb3e77117 SHA256 a9a5e96a138c65b32b62a73556a62feb529e95de34bb1b450652d81825459124 +MD5 2e80f148d7b40546d50cdecb4ea0ae4d files/olsrd-0.4.10-memleak_in_olsr_remove_scheduler_event.patch 246 +RMD160 2f0414c22e559fe03ab5968fa21b8c2c4a437ff6 files/olsrd-0.4.10-memleak_in_olsr_remove_scheduler_event.patch 246 +SHA256 a9a5e96a138c65b32b62a73556a62feb529e95de34bb1b450652d81825459124 files/olsrd-0.4.10-memleak_in_olsr_remove_scheduler_event.patch 246 +DIST olsrd-0.4.10.tar.bz2 490519 RMD160 a0432cb885efdf93ce36e7367a1346b6744c9f90 SHA1 78325658657c6b1aeebe106d02cabcc6eed2571c SHA256 af04bdd8abd85bb4715fd6011566054847c75fcbac5e5e9cdee80858ac2957d3 +EBUILD olsrd-0.4.10.ebuild 1542 RMD160 2676acd2d140e4d21429bd7f36a8bde2d4e83a93 SHA1 89d97ba1c3dda2378460337bee0bf0b00643f4c4 SHA256 086134727af54d8f80c02665ad1fd4e77e908713cd70d988d84c64f8971bdb46 +MD5 bbe035dc82c6d3ebe1b9760d9445983c olsrd-0.4.10.ebuild 1542 +RMD160 2676acd2d140e4d21429bd7f36a8bde2d4e83a93 olsrd-0.4.10.ebuild 1542 +SHA256 086134727af54d8f80c02665ad1fd4e77e908713cd70d988d84c64f8971bdb46 olsrd-0.4.10.ebuild 1542 +MISC ChangeLog 600 RMD160 19136a39d1775e31bb31a6f6ff118b535842c9d4 SHA1 c594f236f64a9dc4ce2d37bc97379dd4e0a5b09a SHA256 998aa6416ae1bf3e88fd5a556aa5904f786db9ece29ac7d16abba72e8bde9f3d +MD5 b968a6dfc92f1fd0a92a1f63035ef3de ChangeLog 600 +RMD160 19136a39d1775e31bb31a6f6ff118b535842c9d4 ChangeLog 600 +SHA256 998aa6416ae1bf3e88fd5a556aa5904f786db9ece29ac7d16abba72e8bde9f3d ChangeLog 600 +MISC metadata.xml 318 RMD160 50ee639035e7ddcdcf6c2a3e22e66443fcd30de5 SHA1 88b2535f03b3c5813cefde5695118f3deae79b1a SHA256 07b3287dfd5e9ca43a84158f0e93297e8ccad36fa7ea4c707c446ce6c62070b3 +MD5 b5ecb6bd430598cb6e660c05f895e6bc metadata.xml 318 +RMD160 50ee639035e7ddcdcf6c2a3e22e66443fcd30de5 metadata.xml 318 +SHA256 07b3287dfd5e9ca43a84158f0e93297e8ccad36fa7ea4c707c446ce6c62070b3 metadata.xml 318 +MD5 5345fd4a90de689f6dcf97ac8c888df2 files/digest-olsrd-0.4.10 241 +RMD160 442033d9195771d3cbd9fc258bc19cb0744a1160 files/digest-olsrd-0.4.10 241 +SHA256 f8956f7ea714b788baaa10e8064ea8e101e988c9fd363623fce72122a42632c8 files/digest-olsrd-0.4.10 241 diff --git a/net-misc/olsrd/files/digest-olsrd-0.4.10 b/net-misc/olsrd/files/digest-olsrd-0.4.10 new file mode 100644 index 000000000000..a44320376853 --- /dev/null +++ b/net-misc/olsrd/files/digest-olsrd-0.4.10 @@ -0,0 +1,3 @@ +MD5 9807d4451e65cb4ec385155eef7bf3cf olsrd-0.4.10.tar.bz2 490519 +RMD160 a0432cb885efdf93ce36e7367a1346b6744c9f90 olsrd-0.4.10.tar.bz2 490519 +SHA256 af04bdd8abd85bb4715fd6011566054847c75fcbac5e5e9cdee80858ac2957d3 olsrd-0.4.10.tar.bz2 490519 diff --git a/net-misc/olsrd/files/olsrd b/net-misc/olsrd/files/olsrd new file mode 100644 index 000000000000..5b0a68a8d9ac --- /dev/null +++ b/net-misc/olsrd/files/olsrd @@ -0,0 +1,26 @@ +#!/sbin/runscript + +depend() { + need net +} + +checkconfig() { + if [ ! -e /etc/olsrd.conf ]; then + eerror "You need a /etc/olsrd.conf file to run olsrd" + eerror "There is sample file in /usr/share/doc/olsrd-version/" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting olsrd" + start-stop-daemon --start --quiet --background --exec /usr/sbin/olsrd + eend $? +} + +stop() { + ebegin "Stopping olsrd" + start-stop-daemon --stop --quiet --exec /usr/sbin/olsrd + eend $? +} diff --git a/net-misc/olsrd/files/olsrd-0.4.10-makefile.patch b/net-misc/olsrd/files/olsrd-0.4.10-makefile.patch new file mode 100644 index 000000000000..941d6d723920 --- /dev/null +++ b/net-misc/olsrd/files/olsrd-0.4.10-makefile.patch @@ -0,0 +1,175 @@ +diff -ru olsrd-0.4.10~/gui/linux-gtk/Makefile olsrd-0.4.10/gui/linux-gtk/Makefile +--- olsrd-0.4.10~/gui/linux-gtk/Makefile 2006-11-01 17:50:34.000000000 +0100 ++++ olsrd-0.4.10/gui/linux-gtk/Makefile 2006-11-01 17:51:27.000000000 +0100 +@@ -1,7 +1,7 @@ +-CC= gcc ++CC?= gcc + #CC= arm-linux-gcc + +-CFLAGS= -Wall `pkg-config --cflags gtk+-2.0` #-g #to use GDB ++CFLAGS+= -Wall `pkg-config --cflags gtk+-2.0` #-g #to use GDB + LFLAGS= `pkg-config --libs gtk+-2.0` + + SRCS= src/main.c src/interface.c src/callbacks.c src/ipc.c \ +@@ -23,4 +23,5 @@ + rm -f $(OBJS) + + install: +- cp ./olsrd-gui /usr/bin/ ++ mkdir -p ${DESTDIR}/usr/bin ++ cp ./olsrd-gui ${DESTDIR}/usr/bin/ +diff -ru olsrd-0.4.10~/make/Makefile.fbsd olsrd-0.4.10/make/Makefile.fbsd +--- olsrd-0.4.10~/make/Makefile.fbsd 2006-11-01 17:50:34.000000000 +0100 ++++ olsrd-0.4.10/make/Makefile.fbsd 2006-11-01 17:51:05.000000000 +0100 +@@ -2,12 +2,12 @@ + # FREEBSD SPECIFIC CONFIGURATION + # + +-INSTALL_PREFIX ?= /usr/local +-SBINDIR = $(INSTALL_PREFIX)/sbin +-ETCDIR = $(INSTALL_PREFIX)/etc +-LIBDIR = $(INSTALL_PREFIX)/lib +-DOCDIR = $(INSTALL_PREFIX)/share/doc +-MANDIR = $(INSTALL_PREFIX)/man ++DESTDIR ?= /usr/local ++SBINDIR = $(DESTDIR)/sbin ++ETCDIR = $(DESTDIR)/etc ++LIBDIR = $(DESTDIR)/lib ++DOCDIR = $(DESTDIR)/share/doc ++MANDIR = $(DESTDIR)/man + + SRCS += $(wildcard src/bsd/*.c) $(wildcard src/unix/*.c) + HDRS += $(wildcard src/bsd/*.h) $(wildcard src/unix/*.h) +@@ -22,8 +22,8 @@ + + ifdef LIBNET + +-CFLAGS += -DSPOOF -I$(INSTALL_PREFIX)/include +-LIBS += -L$(INSTALL_PREFIX)/lib -lnet ++CFLAGS += -DSPOOF -I$(DESTDIR)/include ++LIBS += -L$(DESTDIR)/lib -lnet + + endif + +diff -ru olsrd-0.4.10~/make/Makefile.linux olsrd-0.4.10/make/Makefile.linux +--- olsrd-0.4.10~/make/Makefile.linux 2006-11-01 17:50:34.000000000 +0100 ++++ olsrd-0.4.10/make/Makefile.linux 2006-11-01 17:51:05.000000000 +0100 +@@ -2,8 +2,8 @@ + # LINUX SPECIFIC CONFIGURATION + # + +-INSTALL_PREFIX ?= +-LIBDIR = $(INSTALL_PREFIX)/usr/lib ++DESTDIR ?= ++LIBDIR = $(DESTDIR)/usr/lib + + SRCS += $(wildcard src/linux/*.c) $(wildcard src/unix/*.c) + HDRS += $(wildcard src/linux/*.h) $(wildcard src/unix/*.h) +diff -ru olsrd-0.4.10~/make/Makefile.nbsd olsrd-0.4.10/make/Makefile.nbsd +--- olsrd-0.4.10~/make/Makefile.nbsd 2006-11-01 17:50:34.000000000 +0100 ++++ olsrd-0.4.10/make/Makefile.nbsd 2006-11-01 17:51:05.000000000 +0100 +@@ -2,8 +2,8 @@ + # NETBSD SPECIFIC CONFIGURATION + # + +-INSTALL_PREFIX ?= +-LIBDIR = $(INSTALL_PREFIX)/usr/lib ++DESTDIR ?= ++LIBDIR = $(DESTDIR)/usr/lib + + SRCS += $(wildcard src/bsd/*.c) $(wildcard src/unix/*.c) + HDRS += $(wildcard src/bsd/*.h) $(wildcard src/unix/*.h) +diff -ru olsrd-0.4.10~/make/Makefile.obsd olsrd-0.4.10/make/Makefile.obsd +--- olsrd-0.4.10~/make/Makefile.obsd 2006-11-01 17:50:34.000000000 +0100 ++++ olsrd-0.4.10/make/Makefile.obsd 2006-11-01 17:51:05.000000000 +0100 +@@ -2,8 +2,8 @@ + # OPENBSD SPECIFIC CONFIGURATION + # + +-INSTALL_PREFIX ?= +-LIBDIR = $(INSTALL_PREFIX)/usr/lib ++DESTDIR ?= ++LIBDIR = $(DESTDIR)/usr/lib + + SRCS += $(wildcard src/bsd/*.c) $(wildcard src/unix/*.c) + HDRS += $(wildcard src/bsd/*.h) $(wildcard src/unix/*.h) +diff -ru olsrd-0.4.10~/make/Makefile.osx olsrd-0.4.10/make/Makefile.osx +--- olsrd-0.4.10~/make/Makefile.osx 2006-11-01 17:50:34.000000000 +0100 ++++ olsrd-0.4.10/make/Makefile.osx 2006-11-01 17:51:05.000000000 +0100 +@@ -2,8 +2,8 @@ + # MAC OSX SPECIFIC CONFIGURATION + # + +-INSTALL_PREFIX ?= +-LIBDIR = $(INSTALL_PREFIX)/usr/lib ++DESTDIR ?= ++LIBDIR = $(DESTDIR)/usr/lib + + SRCS += $(wildcard src/bsd/*.c) $(wildcard src/unix/*.c) + HDRS += $(wildcard src/bsd/*.h) $(wildcard src/unix/*.h) +diff -ru olsrd-0.4.10~/make/Makefile.win32 olsrd-0.4.10/make/Makefile.win32 +--- olsrd-0.4.10~/make/Makefile.win32 2006-11-01 17:50:34.000000000 +0100 ++++ olsrd-0.4.10/make/Makefile.win32 2006-11-01 17:51:05.000000000 +0100 +@@ -2,7 +2,7 @@ + # WINDOWS32 SPECIFIC CONFIGURATION + # + +-INSTALL_PREFIX ?= ++DESTDIR ?= + EXENAME = olsrd.exe + + SRCS += $(wildcard src/win32/*.c) +diff -ru olsrd-0.4.10~/make/Makefile.wince olsrd-0.4.10/make/Makefile.wince +--- olsrd-0.4.10~/make/Makefile.wince 2006-11-01 17:50:34.000000000 +0100 ++++ olsrd-0.4.10/make/Makefile.wince 2006-11-01 17:51:05.000000000 +0100 +@@ -2,8 +2,8 @@ + # WINDOWS CE SPECIFIC CONFIGURATION + # + +-INSTALL_PREFIX ?= +-LIBDIR = $(INSTALL_PREFIX)/usr/lib ++DESTDIR ?= ++LIBDIR = $(DESTDIR)/usr/lib + + SRCS += $(wildcard src/win32/*.c) + HDRS += $(wildcard src/win32/*.h) +diff -ru olsrd-0.4.10~/Makefile.inc olsrd-0.4.10/Makefile.inc +--- olsrd-0.4.10~/Makefile.inc 2006-11-01 17:50:34.000000000 +0100 ++++ olsrd-0.4.10/Makefile.inc 2006-11-01 18:02:31.000000000 +0100 +@@ -1,17 +1,17 @@ + # programs + CC ?= gcc +-STRIP ?= strip ++STRIP ?= true + BISON ?= bison + FLEX ?= flex + TAGCMD ?= etags + + # target directories and names +-#INSTALL_PREFIX = +-SBINDIR = $(INSTALL_PREFIX)/usr/sbin +-ETCDIR = $(INSTALL_PREFIX)/etc +-LIBDIR = $(INSTALL_PREFIX)/usr/lib +-DOCDIR = $(INSTALL_PREFIX)/usr/share/doc +-MANDIR = $(INSTALL_PREFIX)/usr/share/man ++# DESTDIR = ++SBINDIR = $(DESTDIR)/usr/sbin ++ETCDIR = $(DESTDIR)/etc ++LIBDIR = $(DESTDIR)/usr/lib ++DOCDIR = $(DESTDIR)/usr/share/doc ++MANDIR = $(DESTDIR)/usr/share/man + CFGFILE = $(ETCDIR)/olsrd.conf + EXENAME = olsrd + +diff -ru olsrd-0.4.10~/src/cfgparser/Makefile olsrd-0.4.10/src/cfgparser/Makefile +--- olsrd-0.4.10~/src/cfgparser/Makefile 2006-11-01 17:50:34.000000000 +0100 ++++ olsrd-0.4.10/src/cfgparser/Makefile 2006-11-01 18:17:04.000000000 +0100 +@@ -74,7 +74,7 @@ + LDFLAGS += -shared -Wl,-soname,$(LIBNAME) + endif + +-CFLAGS += -DMAKELIB ++CFLAGS += -DMAKELIB -fPIC + NAME = $(LIBNAME) + + endif diff --git a/net-misc/olsrd/files/olsrd-0.4.10-memleak_in_olsr_remove_scheduler_event.patch b/net-misc/olsrd/files/olsrd-0.4.10-memleak_in_olsr_remove_scheduler_event.patch new file mode 100644 index 000000000000..7d0574d20204 --- /dev/null +++ b/net-misc/olsrd/files/olsrd-0.4.10-memleak_in_olsr_remove_scheduler_event.patch @@ -0,0 +1,10 @@ +--- olsrd-0.4.10~/src/scheduler.c 2006-07-28 16:09:26.000000000 +0200 ++++ olsrd-0.4.10/src/scheduler.c 2006-07-28 16:10:42.000000000 +0200 +@@ -329,6 +329,7 @@ + { + prev->next = entry->next; + } ++ free(entry); + return 1; + } + diff --git a/net-misc/olsrd/metadata.xml b/net-misc/olsrd/metadata.xml new file mode 100644 index 000000000000..d60a5de3948a --- /dev/null +++ b/net-misc/olsrd/metadata.xml @@ -0,0 +1,9 @@ + + + +no-herd + + cedk@gentoo.org + +An implementation of the Optimized Link State Routing protocol + diff --git a/net-misc/olsrd/olsrd-0.4.10.ebuild b/net-misc/olsrd/olsrd-0.4.10.ebuild new file mode 100644 index 000000000000..274d0bc8f642 --- /dev/null +++ b/net-misc/olsrd/olsrd-0.4.10.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/olsrd/olsrd-0.4.10.ebuild,v 1.1 2006/11/16 21:27:01 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="as-is" +KEYWORDS="~x86" +IUSE="gtk" + +DEPEND="gtk? ( =x11-libs/gtk+-2* )" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${P}-makefile.patch" + epatch "${FILESDIR}/${P}-memleak_in_olsr_remove_scheduler_event.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 DESTDIR="${D}" 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/dyn_gw/README_DYN_GW \ + lib/dot_draw/README_DOT_DRAW lib/httpinfo/README_HTTPINFO \ + lib/powerinfo/README_POWER + newdoc lib/nameservice/README README-NAMESERVICE + newdoc lib/secure/SOLSR-README README-SECURE +} -- 2.26.2