diff options
Diffstat (limited to 'app-misc/g15daemon/g15daemon-9999.ebuild')
-rw-r--r-- | app-misc/g15daemon/g15daemon-9999.ebuild | 120 |
1 files changed, 52 insertions, 68 deletions
diff --git a/app-misc/g15daemon/g15daemon-9999.ebuild b/app-misc/g15daemon/g15daemon-9999.ebuild index 5e6baded32a9..e063bae8d4ca 100644 --- a/app-misc/g15daemon/g15daemon-9999.ebuild +++ b/app-misc/g15daemon/g15daemon-9999.ebuild @@ -1,49 +1,46 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=8 -PYTHON_COMPAT=( python2_7 ) -GENTOO_DEPEND_ON_PERL="no" -ESVN_PROJECT=${PN}/trunk -ESVN_REPO_URI="https://svn.code.sf.net/p/${PN}/code/trunk/${PN}-wip" - -inherit eutils linux-info perl-module python-r1 base subversion autotools +inherit autotools flag-o-matic linux-info perl-module systemd toolchain-funcs udev DESCRIPTION="Takes control of the G15 keyboard, through the linux kernel uinput device driver" -HOMEPAGE="https://sourceforge.net/projects/g15daemon/" -[[ ${PV} = *9999* ]] || SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +HOMEPAGE="https://gitlab.com/menelkir/g15daemon" +if [[ ${PV} == *9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://gitlab.com/menelkir/g15daemon.git" +else + SRC_URI="https://gitlab.com/menelkir/${PN}/-/archive/${PV}/${P}.tar.bz2" + KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +fi LICENSE="GPL-2" -SLOT="0" -KEYWORDS="" -IUSE="perl python static-libs" +# Subslot = libg15daemon_client.so major version +SLOT="0/3" +IUSE="perl static-libs" + +# Has no "test" target in Makefile +RESTRICT="test" DEPEND="virtual/libusb:0 - >=dev-libs/libg15-9999 - >=dev-libs/libg15render-9999 + >=dev-libs/libg15-3.0 + >=dev-libs/libg15render-3.0 perl? ( dev-lang/perl dev-perl/GDGraph >=dev-perl/Inline-0.4 - ) - python? ( ${PYTHON_DEPS} )" + )" RDEPEND="${DEPEND}" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -PATCHES=( - "${FILESDIR}/${PN}-1.9.5.3-g510-keys.patch" -) -# "${FILESDIR}/${PN}-1.9.5.3-forgotten-open-mode.patch" -# "${FILESDIR}/${PN}-1.9.5.3-overflow-fix.patch" uinput_check() { ebegin "Checking for uinput support" local rc=1 linux_config_exists && linux_chkconfig_present INPUT_UINPUT rc=$? + eend ${rc} - if [[ $rc -ne 0 ]] ; then + if [[ ${rc} -ne 0 ]] ; then eerror "To use g15daemon, you need to compile your kernel with uinput support." eerror "Please enable uinput support in your kernel config, found at:" eerror @@ -55,49 +52,44 @@ uinput_check() { } pkg_setup() { + export CC="$(tc-getCC)" #729294 + linux-info_pkg_setup uinput_check } src_unpack() { - if [[ ${PV} = *9999* ]]; then - subversion_src_unpack + if [[ ${PV} == *9999* ]] ; then + git-r3_src_unpack else - unpack ${A} + default fi - if use perl; then - unpack "./${P}/lang-bindings/perl-G15Daemon-0.2.tar.gz" - fi - if use python; then - unpack "./${P}/lang-bindings/pyg15daemon-0.0.tar.bz2" + + if use perl ; then + unpack "${S}"/contrib/lang-bindings/perl-G15Daemon-0.2.tar.gz fi } src_prepare() { - if [[ ${PV} = *9999* ]]; then - subversion_wc_info - fi - if use perl; then + if use perl ; then perl-module_src_prepare sed -i \ -e '1i#!/usr/bin/perl' \ - "${S}"/contrib/testbindings.pl + "${S}"/contrib/testbindings.pl || die else # perl-module_src_prepare always calls base_src_prepare - base_src_prepare - fi - if [[ ${PV} = *9999* ]]; then - eautoreconf + default fi + eautoreconf } src_configure() { - econf \ - --docdir="${EPREFIX}/usr/share/doc/${PF}" \ - $(use_enable static-libs static) + append-cflags -fcommon #706712 + + econf $(use_enable static-libs static) - if use perl; then - cd "${WORKDIR}/G15Daemon-0.2" + if use perl ; then + cd "${WORKDIR}/G15Daemon-0.2" || die perl-module_src_configure fi } @@ -105,8 +97,8 @@ src_configure() { src_compile() { default - if use perl; then - cd "${WORKDIR}/G15Daemon-0.2" + if use perl ; then + cd "${WORKDIR}/G15Daemon-0.2" || die perl-module_src_compile fi } @@ -114,23 +106,23 @@ src_compile() { src_install() { default - find "${ED}" -name '*.la' -exec rm -f {} + + find "${ED}" -type f -name '*.la' -delete || die # remove odd docs installed my make - rm "${ED}/usr/share/doc/${PF}/"{LICENSE,README.usage} + rm "${ED}"/usr/share/doc/${PF}/README.usage || die insinto /usr/share/${PN}/contrib - doins contrib/xmodmaprc + doins contrib/Xmodmap{,-alternative} doins contrib/xmodmap.sh - if use perl; then + if use perl ; then doins contrib/testbindings.pl fi newconfd "${FILESDIR}/${PN}-1.2.7.confd" ${PN} newinitd "${FILESDIR}/${PN}-1.9.5.3.initd" ${PN} + systemd_dounit "${FILESDIR}/${PN}.service" dobin "${FILESDIR}/g15daemon-hotplug" - insinto /lib/udev/rules.d - doins "${FILESDIR}/99-g15daemon.rules" + udev_dorules "${FILESDIR}/99-g15daemon.rules" insinto /etc doins "${FILESDIR}"/g15daemon.conf @@ -139,25 +131,17 @@ src_install() { exeinto /usr/lib/pm-utils/sleep.d doexe "${FILESDIR}"/20g15daemon - if use perl; then - ebegin "Installing Perl Bindings (G15Daemon.pm)" - cd "${WORKDIR}/G15Daemon-0.2" + if use perl ; then + einfo "Installing Perl Bindings (G15Daemon.pm)" + cd "${WORKDIR}/G15Daemon-0.2" || die docinto perl perl-module_src_install fi - - if use python; then - ebegin "Installing Python Bindings (g15daemon.py)" - cd "${WORKDIR}/pyg15daemon" - - python_foreach_impl python_domodule g15daemon.py - - docinto python - dodoc AUTHORS - fi } pkg_postinst() { + udev_reload + elog "To use g15daemon, you need to add g15daemon to the default runlevel." elog "This can be done with:" elog "# /sbin/rc-update add g15daemon default" |