You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
1.4 KiB
74 lines
1.4 KiB
6 years ago
|
# Copyright 1999-2019 Gentoo Authors
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
6 years ago
|
EAPI=7
|
||
13 years ago
|
|
||
6 years ago
|
inherit toolchain-funcs
|
||
13 years ago
|
|
||
|
DESCRIPTION="Brings up/down ethernet ports automatically with cable detection"
|
||
7 years ago
|
HOMEPAGE="https://www.red-bean.com/~bos/"
|
||
|
SRC_URI="https://www.red-bean.com/~bos/netplug/${P}.tar.bz2"
|
||
13 years ago
|
|
||
|
LICENSE="GPL-2"
|
||
|
SLOT="0"
|
||
6 years ago
|
KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
|
||
13 years ago
|
IUSE="debug doc"
|
||
|
|
||
|
DEPEND="doc? ( app-text/ghostscript-gpl
|
||
|
media-gfx/graphviz )"
|
||
|
RDEPEND=""
|
||
|
|
||
6 years ago
|
PATCHES=(
|
||
|
# Remove nested functions, #116140
|
||
|
"${FILESDIR}/${PN}-1.2.9-remove-nest.patch"
|
||
|
|
||
|
# Ignore wireless events
|
||
|
"${FILESDIR}/${PN}-1.2.9-ignore-wireless.patch"
|
||
|
|
||
|
# Fix DOWNANDOUT problem #599400
|
||
|
"${FILESDIR}/${P}-downandout.patch"
|
||
|
|
||
|
# Wait for multiple children in SIGCHLD handler #631316
|
||
|
"${FILESDIR}/${P}-multi-waitpid-sigchld.patch"
|
||
|
)
|
||
|
|
||
13 years ago
|
src_prepare() {
|
||
|
# Remove debug flags from CFLAGS
|
||
6 years ago
|
if ! use debug ; then
|
||
11 years ago
|
sed -i -e "s/ -ggdb3//" Makefile || die
|
||
13 years ago
|
fi
|
||
|
|
||
|
# Remove -O3 and -Werror from CFLAGS
|
||
11 years ago
|
sed -i -e "s/ -O3//" -e "s/ -Werror//" Makefile || die
|
||
13 years ago
|
|
||
6 years ago
|
default
|
||
13 years ago
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
tc-export CC
|
||
11 years ago
|
emake CC="${CC}"
|
||
13 years ago
|
|
||
6 years ago
|
if use doc ; then
|
||
11 years ago
|
emake -C docs/
|
||
13 years ago
|
fi
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
into /
|
||
|
dosbin netplugd
|
||
|
doman man/man8/netplugd.8
|
||
|
|
||
|
dodir /etc/netplug.d
|
||
|
exeinto /etc/netplug.d
|
||
|
newexe "${FILESDIR}/netplug-2" netplug
|
||
|
|
||
|
dodir /etc/netplug
|
||
6 years ago
|
echo "eth*" > "${ED}"/etc/netplug/netplugd.conf || die
|
||
13 years ago
|
|
||
11 years ago
|
dodoc ChangeLog NEWS README TODO
|
||
13 years ago
|
|
||
|
if use doc; then
|
||
11 years ago
|
dodoc docs/state-machine.ps
|
||
13 years ago
|
fi
|
||
|
}
|