sys-apps/ifplugd: revision bump
authorFelix Janda <felix.janda@posteo.de>
Wed, 12 Oct 2016 00:20:33 +0000 (20:20 -0400)
committerLars Wendler <polynomial-c@gentoo.org>
Fri, 21 Oct 2016 09:12:45 +0000 (11:12 +0200)
* EAPI=6
* add patch from Chad Joan for compilation with musl libc
* remove obsolete pkg_postinst phase

Gentoo-Bug: https://bugs.gentoo.org/592912
Gentoo-Bug: https://bugs.gentoo.org/278653
Closes: https://github.com/gentoo/gentoo/pull/2541

Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
sys-apps/ifplugd/files/ifplugd-0.28-interface.patch
sys-apps/ifplugd/files/ifplugd-0.28-musl.patch [new file with mode: 0644]
sys-apps/ifplugd/files/ifplugd-0.28-nlapi.diff
sys-apps/ifplugd/files/ifplugd-0.28-strictalias.patch
sys-apps/ifplugd/ifplugd-0.28-r10.ebuild [new file with mode: 0644]

index 9c2de464bbde375e43db516998e19de010fa3e95..f99f3a26aed766a3e402d7550456ccc3eb27adb8 100644 (file)
@@ -1,5 +1,5 @@
---- src/interface.c    2004/12/19 00:08:01     114
-+++ src/interface.c    2006/03/07 13:15:11     133
+--- a/src/interface.c
++++ b/src/interface.c
 @@ -22,9 +22,9 @@
  #include <config.h>
  #endif
diff --git a/sys-apps/ifplugd/files/ifplugd-0.28-musl.patch b/sys-apps/ifplugd/files/ifplugd-0.28-musl.patch
new file mode 100644 (file)
index 0000000..ecaaabf
--- /dev/null
@@ -0,0 +1,19 @@
+--- a/src/ethtool-local.h
++++ b/src/ethtool-local.h
+@@ -21,10 +21,12 @@
+  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+  */
+ 
+-typedef unsigned long long u64;
+-typedef __uint32_t u32;        
+-typedef __uint16_t u16;        
+-typedef __uint8_t u8;          
++#include <stdint.h>
++
++typedef uint64_t u64;
++typedef uint32_t u32;
++typedef uint16_t u16;
++typedef uint8_t u8;
+ 
+ #include "ethtool-kernel.h"
+ 
index b640543eebc9858ecaa528aaf4a8a26006e9e1f1..a3d128f20ff421ec877b2fdebb579a051814138c 100644 (file)
@@ -1,6 +1,6 @@
 diff -urN src/nlapi.c src/nlapi.c
---- src/nlapi.c        2004-12-20 08:39:14.682706517 -0500
-+++ src/nlapi.c        2004-12-20 08:39:50.185734092 -0500
+--- a/src/nlapi.c
++++ b/src/nlapi.c
 @@ -86,7 +86,7 @@
          for (; bytes > 0; p = NLMSG_NEXT(p, bytes)) {
              struct callback_info *c;
index 3c5de8a2e731c0e1f148618c8099fc8d97f8dc14..ae8292dc17ace4e2a508f46556b8eb559db42136 100644 (file)
@@ -1,5 +1,5 @@
---- src/interface.c.orig       2007-03-23 13:29:40.000000000 +0000
-+++ src/interface.c    2007-03-23 13:30:05.000000000 +0000
+--- a/src/interface.c
++++ b/src/interface.c
 @@ -89,6 +89,10 @@
  
  interface_status_t interface_detect_beat_mii(int fd, char *iface) {
diff --git a/sys-apps/ifplugd/ifplugd-0.28-r10.ebuild b/sys-apps/ifplugd/ifplugd-0.28-r10.ebuild
new file mode 100644 (file)
index 0000000..889836c
--- /dev/null
@@ -0,0 +1,49 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+DESCRIPTION="Brings up/down ethernet ports automatically with cable detection"
+HOMEPAGE="http://0pointer.de/lennart/projects/ifplugd/"
+SRC_URI="http://0pointer.de/lennart/projects/ifplugd/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~arm ~amd64 ~hppa ~ppc ~x86"
+IUSE="doc selinux"
+
+DEPEND="virtual/pkgconfig
+       doc? ( www-client/lynx )
+       >=dev-libs/libdaemon-0.5"
+RDEPEND=">=dev-libs/libdaemon-0.5
+       >=sys-apps/baselayout-1.12
+       selinux? ( sec-policy/selinux-ifplugd )"
+
+PATCHES=(
+       "${FILESDIR}/${P}-nlapi.diff"
+       "${FILESDIR}/${P}-interface.patch"
+       "${FILESDIR}/${P}-strictalias.patch"
+       "${FILESDIR}/${P}-noip.patch"
+       "${FILESDIR}/${P}-musl.patch"
+       )
+DOCS=( doc/README doc/SUPPORTED_DRIVERS )
+HTML_DOCS=( doc/README.html doc/style.css )
+
+src_configure() {
+       econf \
+               $(use_enable doc lynx) \
+               --with-initdir=/etc/init.d \
+               --disable-xmltoman \
+               --disable-subversion
+}
+
+src_install() {
+       default
+
+       # Remove init.d configuration as we no longer use it
+       rm -rf "${ED}/etc/ifplugd" "${ED}/etc/init.d/${PN}" || die
+
+       exeinto "/etc/${PN}"
+       newexe "${FILESDIR}/${PN}.action" "${PN}.action"
+}