From 4d92051031b93307d8ea90f255ebab3947649654 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Fri, 4 Jan 2019 15:56:34 +0100 Subject: [PATCH] tilix: update to 1.8.7. closes #6585 --- srcpkgs/tilix/files/musl-hacks.patch | 81 ++++++++++++++++++++++++++++ srcpkgs/tilix/template | 14 +++-- 2 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/tilix/files/musl-hacks.patch diff --git a/srcpkgs/tilix/files/musl-hacks.patch b/srcpkgs/tilix/files/musl-hacks.patch new file mode 100644 index 00000000000..1d9f5ac4058 --- /dev/null +++ b/srcpkgs/tilix/files/musl-hacks.patch @@ -0,0 +1,81 @@ +Upstream: No +Reason: Reverts/Breaks flatpak integration to fix musl build. +--- source/gx/tilix/terminal/terminal.d 2019-01-04 01:03:40.000000000 +0100 ++++ source/gx/tilix/terminal/terminal.d 2019-01-04 23:38:51.915350033 +0100 +@@ -2834,31 +2834,8 @@ + if (isFlatpak()) { + Pty pty = vte.ptyNewSync(VtePtyFlags.DEFAULT, null); + +- int pty_master = pty.getFd(); +- +- import core.sys.posix.stdlib: grantpt, unlockpt, ptsname; +- import core.sys.posix.fcntl: open, O_RDWR; +- +- if (grantpt(pty_master) != 0) { +- warning("Failed granting access to slave pseudoterminal device"); +- return false; +- } +- +- if (unlockpt(pty_master) != 0) { +- warning("Failed unlocking slave pseudoterminal device"); +- return false; +- } +- +- int[] pty_slaves; +- pty_slaves ~= open(ptsname(pty_master), O_RDWR | O_CLOEXEC); +- if (pty_slaves[0] < 0) { +- warning("Failed opening slave pseudoterminal device"); +- return false; +- } +- +- foreach(i; 0 .. 2) { +- pty_slaves ~= core.sys.posix.unistd.dup(pty_slaves[0]); +- } ++ import vtec.vte: vte_pty_child_setup; ++ vte_pty_child_setup(pty.getPtyStruct()); + + import VteVersion = vte.Version; + +@@ -2892,7 +2869,7 @@ + onTerminalChildExited(status, vte); + } + +- bool result = sendHostCommand(workingDir, args, envv, pty_slaves, gpid, &exitedCallback); ++ bool result = sendHostCommand(workingDir, args, envv, gpid, &exitedCallback); + + vte.setPty(pty); + +@@ -2971,15 +2948,20 @@ + } + } + +- bool sendHostCommand(string workingDir, string[] args, string[] envv, int[] stdio_fds, out int gpid, HostCommandExitedCallback exitedCallback) { ++ bool sendHostCommand(string workingDir, string[] args, string[] envv, out int gpid, HostCommandExitedCallback exitedCallback) { + import gio.DBusConnection; + import gio.UnixFDList; + + uint[] handles; ++ int[] fdList; ++ ++ fdList ~= std.stdio.stdin.fileno; ++ fdList ~= std.stdio.stdout.fileno; ++ fdList ~= std.stdio.stderr.fileno; + + UnixFDList outFdList; + UnixFDList inFdList = new UnixFDList(); +- foreach(i, fd; stdio_fds) { ++ foreach(i, fd; fdList) { + handles ~= inFdList.append(fd); + if (handles[i] == -1) { + warning("Error creating fd list handles"); +@@ -3071,9 +3053,7 @@ + status = command_status; + } + +- int[] stdio_fds = [0, output.writeEnd.fileno, 2] ~ extra_fds; +- +- if (!sendHostCommand("/", args, [], stdio_fds, gpid, &commandExited)) { ++ if (!sendHostCommand("/", args, [], gpid, &commandExited)) { + return null; + } + diff --git a/srcpkgs/tilix/template b/srcpkgs/tilix/template index aae813aa1fe..ebcffdd6904 100644 --- a/srcpkgs/tilix/template +++ b/srcpkgs/tilix/template @@ -1,18 +1,26 @@ # Template file for 'tilix' pkgname=tilix -version=1.8.5 -revision=3 +version=1.8.7 +revision=1 build_style=gnu-configure hostmakedepends="automake gettext-devel gdk-pixbuf glib-devel ldc po4a pkg-config librsvg" makedepends="dconf-devel gtkd-devel libglib-devel libvted-devel libX11-devel" +depends="gsettings-desktop-schemas" short_desc="Tiling terminal emulator for Linux" maintainer="Rasmus Thomsen " license="MPL-2.0" homepage="https://gnunn1.github.io/tilix-web/" distfiles="https://github.com/gnunn1/${pkgname}/archive/${version}.tar.gz" -checksum=b4fd4624a39b19c612199ffb56b5d617afbbab8995a4c0da66ef80ed193c616f +checksum=ad09434a7f2b62b0016e31f8a298c7a26ecda159835cf80d0d2af3173e098d0e pre_configure() { + case "$XBPS_TARGET_MACHINE" in + *musl) + patch -Np0 -i ${FILESDIR}/musl-hacks.patch + export DCFLAGS="-linker=bfd" + ;; + esac + autoreconf -fi }