dev-libs/ell: move config check to pkg_setup & require dbus for tests
authorBen Kohler <bkohler@gentoo.org>
Sun, 29 Mar 2020 11:55:29 +0000 (06:55 -0500)
committerBen Kohler <bkohler@gentoo.org>
Sun, 29 Mar 2020 11:59:06 +0000 (06:59 -0500)
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Ben Kohler <bkohler@gentoo.org>
dev-libs/ell/ell-0.30-r1.ebuild [new file with mode: 0644]
dev-libs/ell/ell-9999.ebuild

diff --git a/dev-libs/ell/ell-0.30-r1.ebuild b/dev-libs/ell/ell-0.30-r1.ebuild
new file mode 100644 (file)
index 0000000..6c1b043
--- /dev/null
@@ -0,0 +1,60 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic linux-info multilib-minimal
+
+DESCRIPTION="Embedded Linux Library provides core, low-level functionality for system daemons"
+HOMEPAGE="https://01.org/ell"
+if [[ "${PV}" == *9999 ]] ; then
+       inherit autotools git-r3
+       EGIT_REPO_URI="https://git.kernel.org/pub/scm/libs/ell/ell.git"
+else
+       SRC_URI="https://mirrors.edge.kernel.org/pub/linux/libs/${PN}/${P}.tar.xz"
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+fi
+LICENSE="LGPL-2.1"
+SLOT="0"
+
+IUSE="glib pie test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       glib? ( dev-libs/glib:2[${MULTILIB_USEDEP}] )
+"
+DEPEND="
+       ${RDEPEND}
+       test? ( sys-apps/dbus )
+"
+
+CONFIG_CHECK="
+       ~TIMERFD
+       ~EVENTFD
+       ~CRYPTO_USER_API
+       ~CRYPTO_USER_API_HASH
+       ~CRYPTO_MD5
+       ~CRYPTO_SHA1
+       ~KEY_DH_OPERATIONS
+"
+
+src_prepare() {
+       default
+       [[ "${PV}" == *9999 ]] && eautoreconf
+}
+
+multilib_src_configure() {
+       append-cflags "-fsigned-char" #662694
+       local myeconfargs=(
+               $(use_enable glib)
+               $(use_enable pie)
+       )
+       ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install_all() {
+       local DOCS=( ChangeLog README )
+       einstalldocs
+
+       find "${ED}" -name "*.la" -delete || die
+}
index a16ad16548b375bdf45486193e59cd04eb499306..6c1b043397728f36c75dceaf0e06b811ab7464b4 100644 (file)
@@ -17,25 +17,26 @@ fi
 LICENSE="LGPL-2.1"
 SLOT="0"
 
-IUSE="glib pie"
+IUSE="glib pie test"
+RESTRICT="!test? ( test )"
 
 RDEPEND="
        glib? ( dev-libs/glib:2[${MULTILIB_USEDEP}] )
 "
-DEPEND="${RDEPEND}"
-
-pkg_pretend() {
-       CONFIG_CHECK="
-               ~TIMERFD
-               ~EVENTFD
-               ~CRYPTO_USER_API
-               ~CRYPTO_USER_API_HASH
-               ~CRYPTO_MD5
-               ~CRYPTO_SHA1
-               ~KEY_DH_OPERATIONS
-       "
-       check_extra_config
-}
+DEPEND="
+       ${RDEPEND}
+       test? ( sys-apps/dbus )
+"
+
+CONFIG_CHECK="
+       ~TIMERFD
+       ~EVENTFD
+       ~CRYPTO_USER_API
+       ~CRYPTO_USER_API_HASH
+       ~CRYPTO_MD5
+       ~CRYPTO_SHA1
+       ~KEY_DH_OPERATIONS
+"
 
 src_prepare() {
        default