Adding packages for Gentoo Guru Maint
This commit is contained in:
		
							
								
								
									
										2
									
								
								x11-wm/phoc/Manifest
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								x11-wm/phoc/Manifest
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
DIST phoc-v0.8.0.tar.gz 144611 BLAKE2B f5ad96a3917ccd849f73e427077e08a19ce4109b639519239fbecb7183d19579e791ecc7628b22fd8632f6f47a55279860d3c6af3eb25d42115b7343c89611cb SHA512 b2cc687852385d4010c22e01ea65870dcc71f4a6a53782a615df11641ce5cc4b29add7afefd5560b95d03fe045b6ffa7387b68dfe114828cd62bdae9424e692d
 | 
			
		||||
DIST wlroots-0.12.0.tar.gz 476936 BLAKE2B 4129c87a148085f95f4cee6973308d79ab3f8b024247287a68dadd6729da8a5f8cc1e4ada63c15477a2c8e8258032440afe4a21a26f947143d17c87b0ca8a1a4 SHA512 560eae30932b777c1f07fb44592d5601c5d10ef74b31b6b9e4166a14caadab2bfa88d39282f159785d4c7f22f78d204f9bb7fab65d58afaf14b72a8486f9b415
 | 
			
		||||
@@ -0,0 +1,27 @@
 | 
			
		||||
From 63d8f9ceb0d2336db4276e717aabe427153b76bb Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Arnaud Ferraris <arnaud.ferraris@gmail.com>
 | 
			
		||||
Date: Sat, 6 Jun 2020 02:24:37 +0200
 | 
			
		||||
Subject: [PATCH 1/2] seat: Don't notify on key release
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 src/seat.c | 3 ++-
 | 
			
		||||
 1 file changed, 2 insertions(+), 1 deletion(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/src/seat.c b/src/seat.c
 | 
			
		||||
index b04fed1..679a3f5 100644
 | 
			
		||||
--- a/src/seat.c
 | 
			
		||||
+++ b/src/seat.c
 | 
			
		||||
@@ -30,8 +30,9 @@ static void handle_keyboard_key(struct wl_listener *listener, void *data) {
 | 
			
		||||
 	PhocKeyboard *keyboard =
 | 
			
		||||
 		wl_container_of(listener, keyboard, keyboard_key);
 | 
			
		||||
 	PhocDesktop *desktop = server->desktop;
 | 
			
		||||
-	wlr_idle_notify_activity(desktop->idle, keyboard->seat->seat);
 | 
			
		||||
 	struct wlr_event_keyboard_key *event = data;
 | 
			
		||||
+	if (event->state == WLR_KEY_PRESSED)
 | 
			
		||||
+		wlr_idle_notify_activity(desktop->idle, keyboard->seat->seat);
 | 
			
		||||
 	phoc_keyboard_handle_key(keyboard, event);
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
-- 
 | 
			
		||||
2.26.2
 | 
			
		||||
 | 
			
		||||
@@ -0,0 +1,112 @@
 | 
			
		||||
From c6aeee2009a2ee4647fd74da0fc3bd87f61a70fd Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Arnaud Ferraris <arnaud.ferraris@gmail.com>
 | 
			
		||||
Date: Sat, 6 Jun 2020 02:52:10 +0200
 | 
			
		||||
Subject: [PATCH 2/2] seat: inhibit touch events when in power save mode or
 | 
			
		||||
 blank display
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 src/desktop.c | 2 ++
 | 
			
		||||
 src/output.c  | 3 +++
 | 
			
		||||
 src/seat.c    | 6 ++++++
 | 
			
		||||
 src/server.c  | 1 +
 | 
			
		||||
 src/server.h  | 1 +
 | 
			
		||||
 5 files changed, 13 insertions(+)
 | 
			
		||||
 | 
			
		||||
diff --git a/src/desktop.c b/src/desktop.c
 | 
			
		||||
index 8fbb98e..40b2492 100644
 | 
			
		||||
--- a/src/desktop.c
 | 
			
		||||
+++ b/src/desktop.c
 | 
			
		||||
@@ -703,6 +703,7 @@ phoc_desktop_new (struct roots_config *c
 | 
			
		||||
 void
 | 
			
		||||
 phoc_desktop_toggle_output_blank (PhocDesktop *self)
 | 
			
		||||
 {
 | 
			
		||||
+  PhocServer *server = phoc_server_get_default ();
 | 
			
		||||
   PhocOutput *output;
 | 
			
		||||
 
 | 
			
		||||
   wl_list_for_each(output, &self->outputs, link) {
 | 
			
		||||
@@ -710,6 +711,7 @@ phoc_desktop_toggle_output_blank (PhocDe
 | 
			
		||||
 
 | 
			
		||||
     wlr_output_enable (output->wlr_output, enable);
 | 
			
		||||
     wlr_output_commit (output->wlr_output);
 | 
			
		||||
+    server->active = enable;
 | 
			
		||||
     if (enable)
 | 
			
		||||
       phoc_output_damage_whole(output);
 | 
			
		||||
   }
 | 
			
		||||
diff --git a/src/output.c b/src/output.c
 | 
			
		||||
index c03889f..045cbc0 100644
 | 
			
		||||
--- a/src/output.c
 | 
			
		||||
+++ b/src/output.c
 | 
			
		||||
@@ -928,6 +928,7 @@ handle_output_manager_test (struct wl_li
 | 
			
		||||
 void
 | 
			
		||||
 phoc_output_handle_output_power_manager_set_mode (struct wl_listener *listener, void *data)
 | 
			
		||||
 {
 | 
			
		||||
+  PhocServer *server = phoc_server_get_default ();
 | 
			
		||||
   struct wlr_output_power_v1_set_mode_event *event = data;
 | 
			
		||||
   PhocOutput *self;
 | 
			
		||||
   bool enable = true;
 | 
			
		||||
@@ -951,6 +952,8 @@ phoc_output_handle_output_power_manager_
 | 
			
		||||
   if (enable == self->wlr_output->enabled)
 | 
			
		||||
     return;
 | 
			
		||||
 
 | 
			
		||||
+  server->active = enable;
 | 
			
		||||
+
 | 
			
		||||
   wlr_output_enable (self->wlr_output, enable);
 | 
			
		||||
   if (!wlr_output_commit (self->wlr_output)) {
 | 
			
		||||
     g_warning ("Failed to commit power mode change to %d for %p", enable, self);
 | 
			
		||||
diff --git a/src/seat.c b/src/seat.c
 | 
			
		||||
index 679a3f5..2a4c007 100644
 | 
			
		||||
--- a/src/seat.c
 | 
			
		||||
+++ b/src/seat.c
 | 
			
		||||
@@ -178,6 +178,8 @@ static void handle_touch_down(struct wl_listener *listener, void *data) {
 | 
			
		||||
 	struct roots_cursor *cursor =
 | 
			
		||||
 		wl_container_of(listener, cursor, touch_down);
 | 
			
		||||
 	PhocDesktop *desktop = server->desktop;
 | 
			
		||||
+	if (!server->active)
 | 
			
		||||
+		return;
 | 
			
		||||
 	wlr_idle_notify_activity(desktop->idle, cursor->seat->seat);
 | 
			
		||||
 	struct wlr_event_touch_down *event = data;
 | 
			
		||||
 	roots_cursor_handle_touch_down(cursor, event);
 | 
			
		||||
@@ -188,6 +190,8 @@ static void handle_touch_up(struct wl_listener *listener, void *data) {
 | 
			
		||||
 	struct roots_cursor *cursor =
 | 
			
		||||
 		wl_container_of(listener, cursor, touch_up);
 | 
			
		||||
 	PhocDesktop *desktop = server->desktop;
 | 
			
		||||
+	if (!server->active)
 | 
			
		||||
+		return;
 | 
			
		||||
 	wlr_idle_notify_activity(desktop->idle, cursor->seat->seat);
 | 
			
		||||
 	struct wlr_event_touch_up *event = data;
 | 
			
		||||
 	roots_cursor_handle_touch_up(cursor, event);
 | 
			
		||||
@@ -198,6 +202,8 @@ static void handle_touch_motion(struct wl_listener *listener, void *data) {
 | 
			
		||||
 	struct roots_cursor *cursor =
 | 
			
		||||
 		wl_container_of(listener, cursor, touch_motion);
 | 
			
		||||
 	PhocDesktop *desktop = server->desktop;
 | 
			
		||||
+	if (!server->active)
 | 
			
		||||
+		return;
 | 
			
		||||
 	wlr_idle_notify_activity(desktop->idle, cursor->seat->seat);
 | 
			
		||||
 	struct wlr_event_touch_motion *event = data;
 | 
			
		||||
 	roots_cursor_handle_touch_motion(cursor, event);
 | 
			
		||||
diff --git a/src/server.c b/src/server.c
 | 
			
		||||
index 838841b..41452cf 100644
 | 
			
		||||
--- a/src/server.c
 | 
			
		||||
+++ b/src/server.c
 | 
			
		||||
@@ -276,6 +276,7 @@ phoc_server_setup (PhocServer *self, const char *config_path,
 | 
			
		||||
     phoc_startup_session (self);
 | 
			
		||||
 
 | 
			
		||||
   self->inited = TRUE;
 | 
			
		||||
+  self->active = TRUE;
 | 
			
		||||
   return TRUE;
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
diff --git a/src/server.h b/src/server.h
 | 
			
		||||
index 9501432..532b064 100644
 | 
			
		||||
--- a/src/server.h
 | 
			
		||||
+++ b/src/server.h
 | 
			
		||||
@@ -37,6 +37,7 @@ struct _PhocServer {
 | 
			
		||||
   PhocInput *input;
 | 
			
		||||
   PhocServerDebugFlags debug_flags;
 | 
			
		||||
   gboolean inited;
 | 
			
		||||
+  gboolean active;
 | 
			
		||||
 
 | 
			
		||||
   /* The session */
 | 
			
		||||
   gchar *session;
 | 
			
		||||
-- 
 | 
			
		||||
2.26.2
 | 
			
		||||
							
								
								
									
										15
									
								
								x11-wm/phoc/metadata.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								x11-wm/phoc/metadata.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 | 
			
		||||
<pkgmetadata>
 | 
			
		||||
	<maintainer type="person">
 | 
			
		||||
		<email>gjdijkman@gjdwebserver.nl</email>
 | 
			
		||||
		<name>Gerben Jan Dijkman</name>
 | 
			
		||||
	</maintainer>
 | 
			
		||||
	<longdescription lang="en">
 | 
			
		||||
	Wayland compositor for mobile phones like the Librem 5.
 | 
			
		||||
	</longdescription>
 | 
			
		||||
	<upstream>
 | 
			
		||||
		<doc>https://source.puri.sm/Librem5/phoc</doc>
 | 
			
		||||
		<bugs-to>https://source.puri.sm/Librem5/phoc/-/issues</bugs-to>
 | 
			
		||||
	</upstream>
 | 
			
		||||
</pkgmetadata>
 | 
			
		||||
							
								
								
									
										89
									
								
								x11-wm/phoc/phoc-0.8.0.ebuild
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										89
									
								
								x11-wm/phoc/phoc-0.8.0.ebuild
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,89 @@
 | 
			
		||||
# Copyright 1999-2021 Gentoo Authors
 | 
			
		||||
# Distributed under the terms of the GNU General Public License v2
 | 
			
		||||
 | 
			
		||||
EAPI=7
 | 
			
		||||
 | 
			
		||||
inherit meson vala xdg
 | 
			
		||||
 | 
			
		||||
MY_PV="v${PV}"
 | 
			
		||||
MY_P="${PN}-${MY_PV}"
 | 
			
		||||
# 0.13.0 does not work atm
 | 
			
		||||
WL_PV="0.12.0"
 | 
			
		||||
WL_P="wlroots-${WL_PV}"
 | 
			
		||||
 | 
			
		||||
DESCRIPTION="Wlroots based Phone compositor"
 | 
			
		||||
HOMEPAGE="https://source.puri.sm/Librem5/phoc"
 | 
			
		||||
 | 
			
		||||
# we don't use the version on gentoo because it breaks
 | 
			
		||||
# the phoc installation. we follow method used in archlinuxarm
 | 
			
		||||
SRC_URI="
 | 
			
		||||
	https://source.puri.sm/Librem5/phoc/-/archive/${MY_PV}/${MY_P}.tar.gz
 | 
			
		||||
	https://github.com/swaywm/wlroots/releases/download/${WL_PV}/${WL_P}.tar.gz
 | 
			
		||||
"
 | 
			
		||||
 | 
			
		||||
LICENSE="GPL-3"
 | 
			
		||||
SLOT="0"
 | 
			
		||||
KEYWORDS="~amd64 ~arm64"
 | 
			
		||||
IUSE="+introspection +systemd test"
 | 
			
		||||
RESTRICT="!test? ( test )"
 | 
			
		||||
 | 
			
		||||
RDEPEND="
 | 
			
		||||
	dev-libs/glib
 | 
			
		||||
	dev-libs/gobject-introspection
 | 
			
		||||
	dev-libs/libinput
 | 
			
		||||
	dev-libs/wayland
 | 
			
		||||
	dev-libs/wayland-protocols
 | 
			
		||||
	gnome-base/gnome-desktop
 | 
			
		||||
	systemd? (
 | 
			
		||||
		!sys-apps/openrc
 | 
			
		||||
		sys-apps/systemd
 | 
			
		||||
	)
 | 
			
		||||
	x11-libs/libdrm
 | 
			
		||||
	x11-libs/pixman
 | 
			
		||||
	x11-libs/xcb-util
 | 
			
		||||
	x11-libs/xcb-util-wm
 | 
			
		||||
	x11-wm/mutter
 | 
			
		||||
"
 | 
			
		||||
 | 
			
		||||
BDEPEND="
 | 
			
		||||
	dev-util/ctags
 | 
			
		||||
	dev-util/meson
 | 
			
		||||
	virtual/pkgconfig
 | 
			
		||||
	x11-base/xorg-server
 | 
			
		||||
"
 | 
			
		||||
 | 
			
		||||
PATCHES=(
 | 
			
		||||
	"${FILESDIR}/0001-seat-Don-t-notify-on-key-release.patch"
 | 
			
		||||
	"${FILESDIR}/0002-seat-inhibit-touch-events-when-in-power-save-mode-or.patch"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
S="${WORKDIR}/${MY_P}"
 | 
			
		||||
 | 
			
		||||
src_prepare() {
 | 
			
		||||
	default
 | 
			
		||||
	rm -r "${S}"/subprojects/wlroots || die "Failed to remove bundled wlroots"
 | 
			
		||||
	cp -r "${WORKDIR}/${WL_P}" "${S}"/subprojects/wlroots || die "Failed to copy right version of wlroots"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
src_configure() {
 | 
			
		||||
	local emesonargs=(
 | 
			
		||||
		-Ddefault_library=shared
 | 
			
		||||
		-Dtests=false
 | 
			
		||||
		-Dwlroots:logind-provider=systemd
 | 
			
		||||
		-Dwlroots:libseat=disabled
 | 
			
		||||
	)
 | 
			
		||||
	meson_src_configure
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
src_install() {
 | 
			
		||||
	DESTDIR="${D}" meson_src_install
 | 
			
		||||
#	dobin "${S}"/helpers/scale-to-fit
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pkg_postinst() {
 | 
			
		||||
	xdg_pkg_postinst
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pkg_postrm() {
 | 
			
		||||
	xdg_pkg_postrm
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user