diff --git a/srcpkgs/ptyxis/files/no-libc-compat.patch b/srcpkgs/ptyxis/files/no-libc-compat.patch new file mode 100644 index 00000000000..53a4411b364 --- /dev/null +++ b/srcpkgs/ptyxis/files/no-libc-compat.patch @@ -0,0 +1,24 @@ +Not needed since not in a flatpak where we need to ensure glibc compat, +and we use musl anyways +--- +--- a/agent/meson.build ++++ b/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/srcpkgs/ptyxis/patches/fix-W_EXITCODE.patch b/srcpkgs/ptyxis/patches/fix-W_EXITCODE.patch new file mode 100644 index 00000000000..dba87f409b9 --- /dev/null +++ b/srcpkgs/ptyxis/patches/fix-W_EXITCODE.patch @@ -0,0 +1,15 @@ +musl doesn't define W* macros. +--- +--- a/src/ptyxis-application.c ++++ b/src/ptyxis-application.c +@@ -42,6 +42,10 @@ + #define PORTAL_OBJECT_PATH "/org/freedesktop/portal/desktop" + #define PORTAL_SETTINGS_INTERFACE "org.freedesktop.portal.Settings" + ++#ifndef W_EXITCODE ++#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) ++#endif ++ + struct _PtyxisApplication + { + AdwApplication parent_instance; diff --git a/srcpkgs/ptyxis/template b/srcpkgs/ptyxis/template new file mode 100644 index 00000000000..e5bd1601d5f --- /dev/null +++ b/srcpkgs/ptyxis/template @@ -0,0 +1,21 @@ +# Template file for 'ptyxis' +pkgname=ptyxis +version=48.4 +revision=1 +build_style=meson +hostmakedepends="desktop-file-utils gettext glib-devel gtk4-update-icon-cache + pkg-config" +makedepends="libadwaita-devel libportal-gtk4-devel vte3-gtk4-devel" +short_desc="Terminal for a container-oriented desktop" +maintainer="chrysos349 " +license="GPL-3.0-or-later" +homepage="https://gitlab.gnome.org/chergert/ptyxis" +changelog="https://gitlab.gnome.org/chergert/ptyxis/-/raw/main/NEWS" +distfiles="${GNOME_SITE}/ptyxis/${version%.*}/ptyxis-$version.tar.xz" +checksum=1435f452f27c74b0afcc073bb20322889565a049260a1b337428112b16ecc06f + +post_patch() { + if [ "${XBPS_TARGET_LIBC}" = "musl" ]; then + patch -Np1 < "${FILESDIR}/no-libc-compat.patch" + fi +}