# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 WX_GTK_VER="3.0" inherit linux-info udev wxwidgets if [[ ${PV} == "9999" ]]; then EGIT_REPO_URI="https://github.com/matlo/GIMX.git" inherit git-r3 else SRC_URI="https://github.com/matlo/GIMX/releases/download/v${PV}/${PN}_${PV}-1.tar.gz" KEYWORDS="~amd64 ~x86" fi DESCRIPTION="Control a video game console with a mouse, keyboard, or joystick" HOMEPAGE="https://blog.gimx.fr/" LICENSE="GPL-3" SLOT="0" IUSE="" DEPEND="app-crypt/mhash dev-libs/libxml2 net-misc/curl[ssl,curl_ssl_gnutls] net-wireless/bluez sys-devel/gettext sys-libs/ncurses:0/6 virtual/libusb:1 x11-libs/libX11 x11-libs/libXi x11-libs/wxGTK:${WX_GTK_VER}[X] " RDEPEND="${DEPEND} x11-misc/xdg-utils x11-terms/xterm " # only gimx links against the gimx libraries QA_SONAME="/usr/lib.*/libgimx.*.so" CONFIG_CHECK="~UHID" DOCS=( README.md ) src_prepare() { default # install libraries in the correct lib directory sed -i -e "s:\$(exec_prefix)/lib:\$(exec_prefix)/$(get_libdir):" \ shared/Makedefs \ shared/gimxhid/Makedefs \ shared/gimxinput/Makedefs \ shared/gimxlog/Makedefs \ shared/gimxpoll/Makedefs \ shared/gimxprio/Makedefs \ shared/gimxserial/Makedefs \ shared/gimxtimer/Makedefs \ shared/gimxuhid/Makedefs \ shared/gimxusb/Makedefs \ || die 'sed failed!' # append '-git' to version number sed -i 's:\(INFO_VERSION ".*\)":\1-git":' info.h || die 'sed failed!' } src_install() { default fowners root:input /usr/bin/gimx-{config,fpsconfig,launcher} fperms g+s /usr/bin/gimx-{config,fpsconfig,launcher} udev_dorules "${FILESDIR}"/99-gimx.rules } pkg_postinst() { udev_reload && udevadm trigger --sysname-match=uhid elog "To use GIMX you must be in the input group." }