[net-irc/znc] sync with tree

This commit is contained in:
Robert Förster 2020-06-12 18:03:21 +02:00
parent 976092a0d4
commit 409e5f2aaa

View File

@ -1,11 +1,11 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{5,6,7} )
PYTHON_COMPAT=( python3_{6,7,8,9} )
inherit cmake-utils python-single-r1 readme.gentoo-r1 systemd user
inherit cmake python-single-r1
GTEST_VER="1.8.1"
GTEST_URL="https://github.com/google/googletest/archive/${GTEST_VER}.tar.gz -> gtest-${GTEST_VER}.tar.gz"
@ -22,7 +22,7 @@ else
https://znc.in/releases/archive/${MY_P}.tar.gz
test? ( ${GTEST_URL} )
"
KEYWORDS="~amd64 ~arm ~x86"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
S=${WORKDIR}/${MY_P}
fi
@ -30,10 +30,11 @@ HOMEPAGE="https://znc.in"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="+ipv6 +icu libressl nls perl python +ssl sasl tcl test +zlib"
RESTRICT="!test? ( test )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} icu )"
RDEPEND="
DEPEND="
icu? ( dev-libs/icu:= )
nls? ( dev-libs/boost:=[nls] )
perl? ( >=dev-lang/perl-5.10:= )
@ -46,13 +47,22 @@ RDEPEND="
tcl? ( dev-lang/tcl:0= )
zlib? ( sys-libs/zlib:0= )
"
DEPEND="
${RDEPEND}
BDEPEND="
virtual/pkgconfig
nls? ( sys-devel/gettext )
perl? ( >=dev-lang/swig-3.0.0 )
python? ( >=dev-lang/swig-3.0.0 )
test? ( dev-qt/qtnetwork:5 )
perl? (
>=dev-lang/swig-3.0.0
>=dev-lang/perl-5.10
)
python? (
>=dev-lang/swig-3.0.0
>=dev-lang/perl-5.10
)
test? (
${PYTHON_DEPS}
dev-qt/qtnetwork:5
)
"
PATCHES=( "${FILESDIR}"/${PN}-1.7.1-inttest-dir.patch )
@ -73,7 +83,7 @@ src_prepare() {
sed -i -e "s|DZNC_BIN_DIR:path=|DZNC_BIN_DIR:path=${T}/inttest|" \
test/CMakeLists.txt || die
cmake-utils_src_prepare
cmake_src_prepare
}
src_configure() {
@ -94,13 +104,12 @@ src_configure() {
export GMOCK_ROOT="${WORKDIR}/googletest-release-${GTEST_VER}/googlemock"
fi
cmake-utils_src_configure
cmake_src_configure
}
src_test() {
cmake-utils_src_make unittest
if has network-sandbox ${FEATURES}; then
DESTDIR="${T}/inttest" cmake-utils_src_make install
cmake_build unittest
DESTDIR="${T}/inttest" cmake_build install
local filter='-'
if ! use perl; then
filter="${filter}:ZNCTest.Modperl*"
@ -113,17 +122,11 @@ src_test() {
GTEST_FILTER="${filter}" ZNC_UNUSUAL_ROOT="${T}/inttest" \
CMAKE_PREFIX_PATH="${T}/inttest/usr/share/znc/cmake" \
CXXFLAGS="${CXXFLAGS} -isystem ${T}/inttest/usr/include" \
cmake-utils_src_make inttest
else
# TODO: don't require sandbox after
# https://github.com/znc/znc/pull/1363 is implemented
ewarn "FEATURES=-network-sandbox; skipping integration tests which"
ewarn "temporary open local ports."
fi
cmake_build inttest
}
src_install() {
cmake-utils_src_install
cmake_src_install
dodoc NOTICE
}