diff --git a/x11-wm/qtile/Manifest b/x11-wm/qtile/Manifest new file mode 100644 index 0000000..25aa357 --- /dev/null +++ b/x11-wm/qtile/Manifest @@ -0,0 +1,3 @@ +AUX qtile-session-r1 1860 BLAKE2B fb9345d3acc5e0fc5694065f12e2759e02aebc765925cb0ffcb1a776ec82e959503d8a8039238e4e48a5045a3118f2e37201a88d5255fd0a0782d2f8291d8a77 SHA512 41b37ba034b5dd7f3126142d2cfc5cf8986b521fc419d47e420582fc8b516df87249bd8e14c12d77691b93205ec3cd1249bfa040ef0691e0751c669f742570ee +EBUILD qtile-9999.ebuild 2565 BLAKE2B 22d6ec5cdc17f86496706a2baba1dc4dcc4613833a903156a2978e53d91f2e1bbead238405c00be2adb38a7c875731292be429c5cb124399990104cf8175551d SHA512 be95007e4b6791cc64c5f089df3de25074f216a3cdd8bdc11ef83189a8a52fb96cc456b44c22999ea767b09ede79d3ebceeabb610d0e910edc7c475cc0fc8993 +MISC metadata.xml 520 BLAKE2B c4f950d403af7f6e2f43e9bfb0d8b7ff62ff79f882d082238556bec18178d9a74de4b4d234e8ab7bbeb87b45242f0e2a7aa0a491a8cca701abe5160c30004bad SHA512 1836daaa92c9af266f3b5531203230ccb94a704f6819d14db469adc87e8d36a187e65048ba637d957c63c8e713ea5b89d1938bb75e1425da8aa3153543268924 diff --git a/x11-wm/qtile/files/qtile-session-r1 b/x11-wm/qtile/files/qtile-session-r1 new file mode 100644 index 0000000..f16591c --- /dev/null +++ b/x11-wm/qtile/files/qtile-session-r1 @@ -0,0 +1,89 @@ +#!/bin/sh +# qtile Xsession starter, based on Xsession from x11-apps/xinit + +# redirect errors to a file in user's home directory if we can +for errfile in "$HOME/.qtile-errors" "${TMPDIR-/tmp}/qtile-$USER" "/tmp/qtile-$USER" +do + if ( cp /dev/null "$errfile" 2> /dev/null ) + then + chmod 600 "$errfile" + exec > "$errfile" 2>&1 + break + fi +done + +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +userxkbmap=$HOME/.Xkbmap + +sysresources=/etc/X11/Xresources +sysmodmap=/etc/X11/Xmodmap +sysxkbmap=/etc/X11/Xkbmap + +rh6sysresources=/etc/X11/xinit/Xresources +rh6sysmodmap=/etc/X11/xinit/Xmodmap + +# merge in defaults +if [ -f "$rh6sysresources" ]; then + xrdb -merge "$rh6sysresources" +fi + +if [ -f "$sysresources" ]; then + xrdb -merge "$sysresources" +fi + +if [ -f "$userresources" ]; then + xrdb -merge "$userresources" +fi + +# merge in keymaps +if [ -f "$sysxkbmap" ]; then + setxkbmap `cat "$sysxkbmap"` + XKB_IN_USE=yes +fi + +if [ -f "$userxkbmap" ]; then + setxkbmap `cat "$userxkbmap"` + XKB_IN_USE=yes +fi + +# +# Eeek, this seems like too much magic here +# +if [ -z "$XKB_IN_USE" -a ! -L /etc/X11/X ]; then + if grep '^exec.*/Xsun' /etc/X11/X > /dev/null 2>&1 && [ -f /etc/X11/XF86Config ]; then + xkbsymbols=`sed -n -e 's/^[ ]*XkbSymbols[ ]*"\(.*\)".*$/\1/p' /etc/X11/XF86Config /etc/X11/xorg.conf` + if [ -n "$xkbsymbols" ]; then + setxkbmap -symbols "$xkbsymbols" + XKB_IN_USE=yes + fi + fi +fi + +# xkb and xmodmap don't play nice together +if [ -z "$XKB_IN_USE" ]; then + if [ -f "$rh6sysmodmap" ]; then + xmodmap "$rh6sysmodmap" + fi + + if [ -f "$sysmodmap" ]; then + xmodmap "$sysmodmap" + fi + + if [ -f "$usermodmap" ]; then + xmodmap "$usermodmap" + fi +fi + +unset XKB_IN_USE + +# run all system xinitrc shell scripts. +if [ -d /etc/X11/xinit/xinitrc.d ]; then + for i in /etc/X11/xinit/xinitrc.d/* ; do + if [ -x "$i" ]; then + . "$i" + fi + done +fi + +exec /usr/bin/qtile start diff --git a/x11-wm/qtile/metadata.xml b/x11-wm/qtile/metadata.xml new file mode 100644 index 0000000..3bf0fe2 --- /dev/null +++ b/x11-wm/qtile/metadata.xml @@ -0,0 +1,16 @@ + + + + + martynovegorOF@yandex.ru + Egor Martynov + + + proxy-maint@gentoo.org + Proxy Maintainers + + + qtile/qtile + qtile + + diff --git a/x11-wm/qtile/qtile-9999.ebuild b/x11-wm/qtile/qtile-9999.ebuild new file mode 100644 index 0000000..b0881d7 --- /dev/null +++ b/x11-wm/qtile/qtile-9999.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..11} ) + +inherit distutils-r1 virtualx + +DESCRIPTION="A full-featured, hackable tiling window manager written in Python" +HOMEPAGE="http://www.qtile.org/" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/qtile/qtile.git" +else + inherit pypi + KEYWORDS="~amd64 ~riscv ~x86" +fi + +LICENSE="MIT" +SLOT="0" +IUSE="pulseaudio wayland" + +# See bug #895722 and https://github.com/qtile/qtile/pull/3985 regarding +# pywlroots-0.15 dep. +RDEPEND=" + >=dev-python/cairocffi-1.6.0[${PYTHON_USEDEP}] + >=dev-python/cffi-1.1.0[${PYTHON_USEDEP}] + dev-python/dbus-next[${PYTHON_USEDEP}] + dev-python/pygobject[${PYTHON_USEDEP}] + >=dev-python/six-1.4.1[${PYTHON_USEDEP}] + >=dev-python/xcffib-1.4.0[${PYTHON_USEDEP}] + x11-libs/cairo[X,xcb(+)] + x11-libs/libnotify[introspection] + x11-libs/pango + pulseaudio? ( media-libs/libpulse ) + wayland? ( dev-python/pywlroots[${PYTHON_USEDEP}] ) +" +BDEPEND=" + dev-python/setuptools-scm[${PYTHON_USEDEP}] + test? ( + media-gfx/imagemagick[X] + x11-base/xorg-server[xephyr] + ) +" + +EPYTEST_DESELECT=( + # Can't find built qtile like migrate + test/test_qtile_cmd.py::test_qtile_cmd + test/test_qtile_cmd.py::test_display_kb +) + +EPYTEST_IGNORE=( + # Tries to find binary and fails; not worth running anyway? + test/test_migrate.py +) + +distutils_enable_tests pytest + +python_prepare_all() { + # Avoid automagic dependency on libpulse + if ! use pulseaudio ; then + sed -i -e 's/call("libpulse", "--libs")/throw PkgConfigError/' setup.py || die + fi + + # Avoid automagic dependency on pywlroots + if ! use wayland ; then + sed -i -e 's/import wlroots.ffi_build/raise ImportError/' setup.py || die + fi + + distutils-r1_python_prepare_all +} + +src_test() { + virtx distutils-r1_src_test +} + +python_test() { + # Force usage of built module + rm -rf "${S}"/libqtile || die + + # TODO: remove "-p no:xdist" for next release when https://github.com/qtile/qtile/issues/1634 will be resolved. + epytest -p no:xdist --backend=x11 $(usev wayland '--backend=wayland') || die "Tests failed with ${EPYTHON}" +} + +python_compile() { + export CFFI_TMPDIR=${T} + distutils-r1_python_compile +} + +python_install_all() { + local DOCS=( CHANGELOG README.rst ) + distutils-r1_python_install_all + + insinto /usr/share/xsessions + doins resources/qtile.desktop + + insinto /usr/share/wayland-sessions + doins resources/qtile-wayland.desktop + + exeinto /etc/X11/Sessions + newexe "${FILESDIR}"/${PN}-session-r1 ${PN} +}