Commit 2d24b9da authored by Rasmus Thomsen's avatar Rasmus Thomsen

testing/tilix: new aport

https://gnunn1.github.io/tilix-web/
Tiling terminal emulator for Linux
parent 6a27d028
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=tilix
pkgver=1.9.3
pkgrel=0
pkgdesc="Tiling terminal emulator for Linux"
url="https://gnunn1.github.io/tilix-web/"
arch="x86_64" # ldc
license="MPL-2.0"
depends="gsettings-desktop-schemas libsecret libunwind"
makedepends="dconf-dev gtkd-dev glib-dev libx11-dev meson ldc ldc-runtime
ldc-static po4a gdk-pixbuf libunwind-dev"
options="!check" # no tests
source="https://github.com/gnunn1/tilix/archive/$pkgver/tilix-$pkgver.tar.gz
musl-hacks.patch
ce11b0bd936fe8fee9c5ac7025ea5864b99ed7d3.patch
dont-use-dub.patch
fix-meson.patch"
export LDFLAGS='-linker=bfd -link-defaultlib-shared'
build() {
meson \
--prefix=/usr \
--libdir=/usr/lib \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
--buildtype=release \
. output
ninja -C output
}
package() {
DESTDIR="$pkgdir" ninja -C output install
}
sha512sums="59165d24404c3fb9beb40070005131c6262abe98626c164552c0d90d0d74b3fc1d0532430b56027497674934a7fbfd2fdf4195b01915cb6d03a284f468c7adca tilix-1.9.3.tar.gz
3347bfebb0e4d011d9b17f31ed15ec79e503de76185757165c7c13daa6e8b566eb0ad3a7cf32775ee4bc6102da1fa593d3dd0ff57767748c911ec46ad53d4bc3 musl-hacks.patch
36d45c82abd9bf33e5ef9518103794b1da727204540deaa624cf7f6417541893f8391d1f8b9311a32479c58e98d3e85ca292aa2c009179cc8f69e41f23d8ed00 ce11b0bd936fe8fee9c5ac7025ea5864b99ed7d3.patch
2d4d3ca80249abe49af5823d3541de00afdc41a3b37cb9b897a1cdef7c4c2c41d03812e85132fbc56e83d43b15e463dbae260e7cfca164ae5ec5d04f36a50573 dont-use-dub.patch
8b2356d3c708e5b02185e4c140faffe51a1963478d51f7e91261246f9c37958a4c168f57883322c3567169279174cdff06d4b9999aade3c61f083f8ed5f34a24 fix-meson.patch"
From ce11b0bd936fe8fee9c5ac7025ea5864b99ed7d3 Mon Sep 17 00:00:00 2001
From: LuK1337 <priv.luk@gmail.com>
Date: Mon, 15 Jul 2019 20:42:21 +0200
Subject: [PATCH] Avoid calling `values()` on a shared object
* This fixes a compilation on dmd v2.087.0+ ( I think? )
/usr/include/dmd/druntime/import/object.d(3453,36): Error: cannot implicitly convert expression aa of type shared(ProcessStatus[int]) to const(shared(ProcessStatus)[int])
source/gx/tilix/terminal/monitor.d(46,46): Error: template instance `object.values!(shared(ProcessStatus[int]), shared(ProcessStatus), int)` error instantiating
---
source/gx/tilix/terminal/monitor.d | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source/gx/tilix/terminal/monitor.d b/source/gx/tilix/terminal/monitor.d
index 2b130efe..affc4b86 100644
--- a/source/gx/tilix/terminal/monitor.d
+++ b/source/gx/tilix/terminal/monitor.d
@@ -43,7 +43,7 @@ private:
bool fireEvents() {
synchronized {
- foreach(process; processes.values()) {
+ foreach(process; processes) {
if (process.eventType != MonitorEventType.NONE) {
onChildProcess.emit(process.eventType, process.gpid, process.activePid, process.activeName);
process.eventType = MonitorEventType.NONE;
@@ -138,7 +138,7 @@ void monitorProcesses(int sleep, Tid tid) {
// all open terminals. We need to get these using shell
// PID and will store them to raise events for each terminal.
auto activeProcesses = getActiveProcessList();
- foreach(process; processes.values()) {
+ foreach(process; processes) {
auto activeProcess = activeProcesses.get(process.gpid, null);
// No need to raise event for same process.
if (activeProcess !is null && activeProcess.pid != process.activePid) {
--- a/meson.build
+++ b/meson.build
@@ -93,12 +93,8 @@ source_root = meson.source_root()
sources_dir = include_directories('source/')
# Dependencies
-# Note relying on dub to fetch and build dependencies before running meson build is temporary due to a bug in Meson 0.48
-# gtkd_dep = dependency('gtkd-3', version: '>= 3.8.5')
-# vted_dep = dependency('vted-3', version: '>= 3.8.5')
-
-gtkd_dep = dependency('gtk-d:gtkd', version: '>=3.8.5', method: 'dub')
-vted_dep = dependency('gtk-d:vte', version: '>=3.8.5', method: 'dub')
+gtkd_dep = dependency('gtkd-3', version: '>= 3.8.5')
+vted_dep = dependency('vted-3', version: '>= 3.8.5')
xlib_dep = dependency('x11')
libunwind_dep = dependency('libunwind')
msgfmt = find_program('msgfmt')
--- a/data/meson.build
+++ b/data/meson.build
@@ -98,7 +98,7 @@ conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
configure_file(
input: 'dbus/@0@.service.in'.format(meson.project_name()),
- output: 'dbus/@0@.service'.format(meson.project_name()),
+ output: '@0@.service'.format(meson.project_name()),
configuration: conf,
install_dir: join_paths(get_option('datadir'), 'dbus-1/services')
)
Upstream: No
Reason: Reverts/Breaks flatpak integration to fix musl build.
--- a/source/gx/tilix/terminal/terminal.d 2019-01-04 01:03:40.000000000 +0100
+++ b/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;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment