git: 21fec1628110 - main - x11/ptyxis: Add a new port

From: Loïc Bartoletti <lbartoletti_at_FreeBSD.org>
Date: Mon, 17 Mar 2025 05:52:59 UTC
The branch main has been updated by lbartoletti:

URL: https://cgit.FreeBSD.org/ports/commit/?id=21fec162811099b71184ba52dceee4673f050cf4

commit 21fec162811099b71184ba52dceee4673f050cf4
Author:     Loïc Bartoletti <lbartoletti@FreeBSD.org>
AuthorDate: 2025-03-17 05:52:50 +0000
Commit:     Loïc Bartoletti <lbartoletti@FreeBSD.org>
CommitDate: 2025-03-17 05:52:50 +0000

    x11/ptyxis: Add a new port
    
    Ptyxis is a terminal for GNOME with first-class support for containers.
---
 x11/Makefile                             |  1 +
 x11/ptyxis/Makefile                      | 24 ++++++++++++++++++++++++
 x11/ptyxis/distinfo                      |  3 +++
 x11/ptyxis/files/patch-agent_meson.build | 21 +++++++++++++++++++++
 x11/ptyxis/files/patch-src_meson.build   | 13 +++++++++++++
 x11/ptyxis/files/patch-src_ptyxis-tab.c  | 15 +++++++++++++++
 x11/ptyxis/pkg-descr                     |  1 +
 x11/ptyxis/pkg-plist                     | 31 +++++++++++++++++++++++++++++++
 8 files changed, 109 insertions(+)

diff --git a/x11/Makefile b/x11/Makefile
index a7c43055af6e..7541778336aa 100644
--- a/x11/Makefile
+++ b/x11/Makefile
@@ -335,6 +335,7 @@
     SUBDIR += pmenu
     SUBDIR += polybar
     SUBDIR += printscreen
+    SUBDIR += ptyxis
     SUBDIR += py-autotiling
     SUBDIR += py-caffeine-ng
     SUBDIR += py-i3-quickterm
diff --git a/x11/ptyxis/Makefile b/x11/ptyxis/Makefile
new file mode 100644
index 000000000000..f9f9f7cd02a4
--- /dev/null
+++ b/x11/ptyxis/Makefile
@@ -0,0 +1,24 @@
+PORTNAME=	ptyxis
+DISTVERSION=	47.10 # 48 still as a rc
+CATEGORIES=	x11 gnome
+MASTER_SITES=	GNOME
+DIST_SUBDIR=	gnome
+
+MAINTAINER=	gnome@FreeBSD.org
+COMMENT=	Terminal for GNOME with first-class support for containers
+WWW=		https://gitlab.gnome.org/chergert/ptyxis
+
+LICENSE=	GPLv3+
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+BUILD_DEPENDS=	gsettings-desktop-schemas>=0:devel/gsettings-desktop-schemas
+LIB_DEPENDS=	libportal-gtk4.so:deskutils/libportal-gtk4 \
+							libjson-glib-1.0.so:devel/json-glib
+RUN_DEPENDS=	gsettings-desktop-schemas>=0:devel/gsettings-desktop-schemas
+
+USES=		cpe desktop-file-utils gettext gnome localbase:ldflags meson pkgconfig
+USE_GNOME=	dconf gdkpixbuf2 glib20 gtk40 intltool libadwaita pango vte3
+
+GLIB_SCHEMAS=	org.gnome.Ptyxis.gschema.xml
+
+.include <bsd.port.mk>
diff --git a/x11/ptyxis/distinfo b/x11/ptyxis/distinfo
new file mode 100644
index 000000000000..76c0ac04aadb
--- /dev/null
+++ b/x11/ptyxis/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1742055179
+SHA256 (gnome/ptyxis-47.10.tar.gz) = 35ba18c3c34b1abb751dd02413e957988abde0757d9a232057b4e8ab8a230a0d
+SIZE (gnome/ptyxis-47.10.tar.gz) = 2606884
diff --git a/x11/ptyxis/files/patch-agent_meson.build b/x11/ptyxis/files/patch-agent_meson.build
new file mode 100644
index 000000000000..ad7f2386a148
--- /dev/null
+++ b/x11/ptyxis/files/patch-agent_meson.build
@@ -0,0 +1,21 @@
+--- agent/meson.build.orig	2025-03-15 17:01:56 UTC
++++ agent/meson.build
+@@ -42,18 +42,6 @@ ptyxis_agent_c_args = [
+   '-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_@0@_@1@'.format(PTYXIS_AGENT_MIN_GLIB_MAJOR, PTYXIS_AGENT_MIN_GLIB_MINOR),
+ ]
+ 
+-libc_compat = true
+-if target_machine.cpu_family() == 'x86_64'
+-  ptyxis_agent_c_args += ['-include', 'x86_64/force_link_glibc_2.17.h']
+-else
+-  libc_compat = false
+-endif
+-
+-if libc_compat
+-  config_h.set10('LIBC_COMPAT', libc_compat)
+-  ptyxis_agent_link_args += ['-Wl,--wrap=__libc_start_main']
+-endif
+-
+ executable('ptyxis-agent', ptyxis_agent_sources + ptyxis_agent_ipc,
+          dependencies: ptyxis_agent_deps,
+               install: true,
diff --git a/x11/ptyxis/files/patch-src_meson.build b/x11/ptyxis/files/patch-src_meson.build
new file mode 100644
index 000000000000..6f861d9ceac8
--- /dev/null
+++ b/x11/ptyxis/files/patch-src_meson.build
@@ -0,0 +1,13 @@
+--- src/meson.build.orig	2025-03-15 17:04:59 UTC
++++ src/meson.build
+@@ -83,9 +83,7 @@ ptyxis_deps = [
+   cc.find_library('m', required: false),
+ ]
+ 
+-if host_machine.system() == 'linux'
+-  ptyxis_deps += [dependency('libportal-gtk4')]
+-endif
++ptyxis_deps += [dependency('libportal-gtk4')]
+ 
+ ptyxis_c_args = [
+   release_link_args,
diff --git a/x11/ptyxis/files/patch-src_ptyxis-tab.c b/x11/ptyxis/files/patch-src_ptyxis-tab.c
new file mode 100644
index 000000000000..ffe9a4bf6831
--- /dev/null
+++ b/x11/ptyxis/files/patch-src_ptyxis-tab.c
@@ -0,0 +1,15 @@
+--- src/ptyxis-tab.c.orig	2025-03-15 16:56:42 UTC
++++ src/ptyxis-tab.c
+@@ -22,11 +22,9 @@
+ #include "config.h"
+ 
+ #include <glib/gi18n.h>
+-
+-#ifdef __linux__
++#include <sys/wait.h>
+ # include <libportal/portal.h>
+ # include <libportal-gtk4/portal-gtk4.h>
+-#endif
+ 
+ #include "ptyxis-agent-ipc.h"
+ #include "ptyxis-application.h"
diff --git a/x11/ptyxis/pkg-descr b/x11/ptyxis/pkg-descr
new file mode 100644
index 000000000000..cb75df3dd4bf
--- /dev/null
+++ b/x11/ptyxis/pkg-descr
@@ -0,0 +1 @@
+Ptyxis is a terminal for GNOME with first-class support for containers.
diff --git a/x11/ptyxis/pkg-plist b/x11/ptyxis/pkg-plist
new file mode 100644
index 000000000000..4cafd98cc05b
--- /dev/null
+++ b/x11/ptyxis/pkg-plist
@@ -0,0 +1,31 @@
+bin/ptyxis
+libexec/ptyxis-agent
+share/applications/org.gnome.Ptyxis.desktop
+share/dbus-1/services/org.gnome.Ptyxis.service
+share/icons/hicolor/scalable/apps/org.gnome.Ptyxis.svg
+share/icons/hicolor/symbolic/apps/org.gnome.Ptyxis-symbolic.svg
+share/locale/be/LC_MESSAGES/ptyxis.mo
+share/locale/cs/LC_MESSAGES/ptyxis.mo
+share/locale/de/LC_MESSAGES/ptyxis.mo
+share/locale/en_GB/LC_MESSAGES/ptyxis.mo
+share/locale/es/LC_MESSAGES/ptyxis.mo
+share/locale/eu/LC_MESSAGES/ptyxis.mo
+share/locale/fa/LC_MESSAGES/ptyxis.mo
+share/locale/fi/LC_MESSAGES/ptyxis.mo
+share/locale/he/LC_MESSAGES/ptyxis.mo
+share/locale/hi/LC_MESSAGES/ptyxis.mo
+share/locale/id/LC_MESSAGES/ptyxis.mo
+share/locale/it/LC_MESSAGES/ptyxis.mo
+share/locale/ja/LC_MESSAGES/ptyxis.mo
+share/locale/ka/LC_MESSAGES/ptyxis.mo
+share/locale/nb/LC_MESSAGES/ptyxis.mo
+share/locale/nl/LC_MESSAGES/ptyxis.mo
+share/locale/pt_BR/LC_MESSAGES/ptyxis.mo
+share/locale/ru/LC_MESSAGES/ptyxis.mo
+share/locale/sl/LC_MESSAGES/ptyxis.mo
+share/locale/sv/LC_MESSAGES/ptyxis.mo
+share/locale/tr/LC_MESSAGES/ptyxis.mo
+share/locale/uk/LC_MESSAGES/ptyxis.mo
+share/locale/zh_CN/LC_MESSAGES/ptyxis.mo
+share/man/man1/ptyxis.1.gz
+share/metainfo/org.gnome.Ptyxis.metainfo.xml