dev-libs/libinput-1.11.3: fix build with USE=test, other tweaks
authorMart Raudsepp <leio@gentoo.org>
Thu, 16 Aug 2018 23:00:14 +0000 (02:00 +0300)
committerMart Raudsepp <leio@gentoo.org>
Thu, 16 Aug 2018 23:00:41 +0000 (02:00 +0300)
New portage allows USE=test independent of FEATURES=test, so handle
that case - for now by just always telling meson to disable the build
as well, as the deps wouldn't be there.

Make use of meson_use function from meson.eclass.

Remove .la and .a file removing, as meson does not use libtool, nor
does it build static libraries without asking.

Closes: https://bugs.gentoo.org/663342
Package-Manager: Portage-2.3.46, Repoman-2.3.10

dev-libs/libinput/libinput-1.11.3.ebuild

index 0635ed1b8fafd3527ebda92d5c402cc7c8522271..e26ac3c3c0ff232f603724c896c59755561e374c 100644 (file)
@@ -11,7 +11,7 @@ SRC_URI="https://www.freedesktop.org/software/${PN}/${P}.tar.xz"
 LICENSE="MIT"
 SLOT="0/10"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="doc input_devices_wacom test"
+IUSE="doc input_devices_wacom"
 # Tests require write access to udev rules directory which is a no-no for live system.
 # Other tests are just about logs, exported symbols and autotest of the test library.
 RESTRICT="test"
@@ -39,9 +39,9 @@ src_configure() {
        # gui can be built but will not be installed
        local emesonargs=(
                -Ddebug-gui=false
-               -Ddocumentation="$(usex doc true false)"
-               -Dlibwacom="$(usex input_devices_wacom true false)"
-               -Dtests="$(usex test true false)"
+               $(meson_use doc documentation)
+               $(meson_use input_devices_wacom libwacom)
+               -Dtests=false # tests are restricted
                -Dudev-dir="$(get_udevdir)"
        )
        meson_src_configure
@@ -53,7 +53,6 @@ src_install() {
                docinto html
                dodoc -r "${BUILD_DIR}"/html/.
        fi
-       find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die
 }
 
 pkg_postinst() {