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.
85 lines
1.5 KiB
85 lines
1.5 KiB
3 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
4 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=7
|
||
3 years ago
|
|
||
4 years ago
|
AT_M4DIR="config"
|
||
|
PYTHON_COMPAT=( python3_{6,7,8} )
|
||
|
DISTUTILS_OPTIONAL=1
|
||
3 years ago
|
inherit autotools distutils-r1
|
||
4 years ago
|
|
||
|
DESCRIPTION="simplified, portable interface to several low-level networking routines"
|
||
|
HOMEPAGE="https://github.com/ofalk/libdnet"
|
||
3 years ago
|
SRC_URI="https://github.com/ofalk/${PN}/archive/${P}.tar.gz"
|
||
|
S="${WORKDIR}/${PN}-${P}"
|
||
4 years ago
|
|
||
3 years ago
|
LICENSE="LGPL-2"
|
||
4 years ago
|
SLOT="0"
|
||
3 years ago
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
|
||
|
IUSE="python test"
|
||
|
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||
|
RESTRICT="!test? ( test )"
|
||
4 years ago
|
|
||
3 years ago
|
DEPEND="python? ( ${PYTHON_DEPS} )"
|
||
|
RDEPEND="${DEPEND}"
|
||
|
BDEPEND="
|
||
|
python? (
|
||
|
dev-python/cython[${PYTHON_USEDEP}]
|
||
|
)
|
||
4 years ago
|
"
|
||
3 years ago
|
|
||
|
DOCS=( README.md THANKS )
|
||
|
|
||
4 years ago
|
PATCHES=(
|
||
3 years ago
|
"${FILESDIR}/${PN}-1.14-ndisc.patch"
|
||
|
"${FILESDIR}/${PN}-1.14-strlcpy.patch"
|
||
4 years ago
|
)
|
||
4 years ago
|
|
||
|
src_prepare() {
|
||
|
default
|
||
|
|
||
|
sed -i \
|
||
|
-e 's/libcheck.a/libcheck.so/g' \
|
||
|
-e 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g' \
|
||
|
configure.ac || die
|
||
|
sed -i \
|
||
|
-e 's|-L$libdir ||g' \
|
||
|
dnet-config.in || die
|
||
|
sed -i \
|
||
|
-e '/^SUBDIRS/s|python||g' \
|
||
|
Makefile.am || die
|
||
|
|
||
|
eautoreconf
|
||
|
|
||
|
if use python; then
|
||
3 years ago
|
cd python || die
|
||
4 years ago
|
distutils-r1_src_prepare
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
src_configure() {
|
||
|
econf \
|
||
3 years ago
|
--disable-static \
|
||
|
$(use_with python)
|
||
4 years ago
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
default
|
||
|
if use python; then
|
||
3 years ago
|
cd python || die
|
||
4 years ago
|
distutils-r1_src_compile
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
default
|
||
3 years ago
|
|
||
4 years ago
|
if use python; then
|
||
3 years ago
|
cd python || die
|
||
4 years ago
|
unset DOCS
|
||
|
distutils-r1_src_install
|
||
|
fi
|
||
3 years ago
|
|
||
|
find "${ED}" -name '*.la' -delete || die
|
||
4 years ago
|
}
|