diff options
author | Patrick Lauer <patrick@gentoo.org> | 2009-03-01 19:58:56 +0000 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2009-03-01 19:58:56 +0000 |
commit | cda26e407a4a1be2556e83b36b0efead9ea75c91 (patch) | |
tree | 8fed15af010b64dc3ff4407fb0e1f2daf74ca404 /sys-apps | |
parent | Fix description of rtorrent.rc location to take into account compression of d... (diff) | |
download | gentoo-2-cda26e407a4a1be2556e83b36b0efead9ea75c91.tar.gz gentoo-2-cda26e407a4a1be2556e83b36b0efead9ea75c91.tar.bz2 gentoo-2-cda26e407a4a1be2556e83b36b0efead9ea75c91.zip |
Fix for gcc 4.3.3 / fortify_sources, remove -Werror from Makefile. Patches by Romain Perier and Magnus Granberg.
(Portage version: 2.2_rc23/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/netplug/ChangeLog | 13 | ||||
-rw-r--r-- | sys-apps/netplug/files/netplug-1.2.9-remove-werror.patch | 11 | ||||
-rw-r--r-- | sys-apps/netplug/files/netplug-1.2.9-warn_unused_result_write_call.patch | 26 | ||||
-rw-r--r-- | sys-apps/netplug/netplug-1.2.9-r5.ebuild | 67 |
4 files changed, 115 insertions, 2 deletions
diff --git a/sys-apps/netplug/ChangeLog b/sys-apps/netplug/ChangeLog index c9834eb35b6e..aeff98675a12 100644 --- a/sys-apps/netplug/ChangeLog +++ b/sys-apps/netplug/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for sys-apps/netplug -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/netplug/ChangeLog,v 1.16 2008/11/27 22:13:28 armin76 Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/netplug/ChangeLog,v 1.17 2009/03/01 19:58:55 patrick Exp $ + +*netplug-1.2.9-r5 (01 Mar 2009) + + 01 Mar 2009; Patrick Lauer <patrick@gentoo.org> + +files/netplug-1.2.9-remove-werror.patch, + +files/netplug-1.2.9-warn_unused_result_write_call.patch, + +netplug-1.2.9-r5.ebuild: + Fix for gcc 4.3.3 / fortify_sources, remove -Werror from Makefile. Patches + by Romain Perier and Magnus Granberg. 27 Nov 2008; Raúl Porcel <armin76@gentoo.org> netplug-1.2.9-r4.ebuild: sparc/x86 stable diff --git a/sys-apps/netplug/files/netplug-1.2.9-remove-werror.patch b/sys-apps/netplug/files/netplug-1.2.9-remove-werror.patch new file mode 100644 index 000000000000..a15fdd269d9e --- /dev/null +++ b/sys-apps/netplug/files/netplug-1.2.9-remove-werror.patch @@ -0,0 +1,11 @@ +--- Makefile 2009-02-25 23:31:40.000000000 +0000 ++++ Makefile 2009-02-25 23:30:52.000000000 +0000 +@@ -9,7 +9,7 @@ + + install_opts := + +-CFLAGS += -Wall -Werror -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \ ++CFLAGS += -Wall -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \ + -DNP_SCRIPT_DIR='"$(scriptdir)"' -DNP_VERSION='"$(version)"' + + netplugd: config.o netlink.o lib.o if_info.o main.o diff --git a/sys-apps/netplug/files/netplug-1.2.9-warn_unused_result_write_call.patch b/sys-apps/netplug/files/netplug-1.2.9-warn_unused_result_write_call.patch new file mode 100644 index 000000000000..3c817b3571a8 --- /dev/null +++ b/sys-apps/netplug/files/netplug-1.2.9-warn_unused_result_write_call.patch @@ -0,0 +1,26 @@ +--- ../netplug-1.2.9_orig/main.c 2005-01-08 06:57:09.000000000 +0100 ++++ main.c 2009-02-07 11:30:37.017300663 +0100 +@@ -155,13 +155,22 @@ + { + struct child_exit ce; + int ret; ++ ssize_t s = 0; + + assert(sig == SIGCHLD); + + ce.pid = info->si_pid; + ret = waitpid(info->si_pid, &ce.status, 0); + if (ret == info->si_pid) +- write(child_handler_pipe[1], &ce, sizeof(ce)); ++ { ++ s = write(child_handler_pipe[1], &ce, sizeof(ce)); ++ ++ if (s == -1) ++ { ++ do_log(LOG_ERR, "can't write into pipe"); ++ exit(1); ++ } ++ } + } + + /* Poll the existing interface state, so we can catch any state diff --git a/sys-apps/netplug/netplug-1.2.9-r5.ebuild b/sys-apps/netplug/netplug-1.2.9-r5.ebuild new file mode 100644 index 000000000000..360c472c49e4 --- /dev/null +++ b/sys-apps/netplug/netplug-1.2.9-r5.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/netplug/netplug-1.2.9-r5.ebuild,v 1.1 2009/03/01 19:58:55 patrick Exp $ + +inherit eutils toolchain-funcs +DESCRIPTION="Brings up/down ethernet ports automatically with cable detection" +HOMEPAGE="http://www.red-bean.com/~bos/" +SRC_URI="http://www.red-bean.com/~bos/netplug/${P}.tar.bz2" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86" +IUSE="" + +hax_bitkeeper() { + # the makefiles have support for bk ... + # basically we have to do this or bk will try to write + # to files in /opt/bitkeeper causing sandbox violations ;( + mkdir "${T}/fakebin" + echo "#!/bin/sh"$'\n'"exit 1" > "${T}/fakebin/bk" + chmod a+x "${T}/fakebin/bk" + export PATH="${T}/fakebin:${PATH}" +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # Remove debugging from Makefile + # Remove -O3 if we have -O[0-9,s] in our CFLAGS + local remove=" -ggdb3 " + [[ " ${CFLAGS} " == *" -O"[0-9,s]" "* ]] && remove="${remove}-O3 " + sed -i -e "s/${remove}/ /" Makefile + + # Use correct structure for getsockname arg 3 + epatch "${FILESDIR}/${P}-gcc4.patch" + + # Remove nested functions, #116140 + epatch "${FILESDIR}/${P}-remove-nest.patch" + + # Ignore wireless events + epatch "${FILESDIR}/${P}-ignore-wireless.patch" + + # warn_unused_result of write POSIX function (which can fails) + epatch "${FILESDIR}/${P}-warn_unused_result_write_call.patch" + + # remove -Werror from makefile + epatch "${FILESDIR}/${P}-remove-werror.patch" +} + +src_compile() { + tc-export CC + hax_bitkeeper + make CC="${CC}" || die "emake failed" +} + +src_install() { + into / + dosbin netplugd + doman man/man8/netplugd.8 + + dodir /etc/netplug.d + exeinto /etc/netplug.d + doexe "${FILESDIR}/netplug" + + dodir /etc/netplug + echo "eth*" > "${D}"/etc/netplug/netplugd.conf +} |