diff options
author | Rasmus Thomsen <oss@cogitri.dev> | 2019-11-29 09:44:08 +0100 |
---|---|---|
committer | Rasmus Thomsen <oss@cogitri.dev> | 2019-11-29 18:13:38 +0100 |
commit | 2d24b9da4e6bfe1431328bfa52085982766f4213 (patch) | |
tree | 916233e77affdd964842e53171540cde83d210d1 /testing/tilix | |
parent | 6a27d02823ea35595a6fad80dac09f8f2fb14e64 (diff) | |
download | aports-2d24b9da4e6bfe1431328bfa52085982766f4213.tar.bz2 aports-2d24b9da4e6bfe1431328bfa52085982766f4213.tar.xz |
testing/tilix: new aport
https://gnunn1.github.io/tilix-web/
Tiling terminal emulator for Linux
Diffstat (limited to 'testing/tilix')
-rw-r--r-- | testing/tilix/APKBUILD | 42 | ||||
-rw-r--r-- | testing/tilix/ce11b0bd936fe8fee9c5ac7025ea5864b99ed7d3.patch | 34 | ||||
-rw-r--r-- | testing/tilix/dont-use-dub.patch | 17 | ||||
-rw-r--r-- | testing/tilix/fix-meson.patch | 11 | ||||
-rw-r--r-- | testing/tilix/musl-hacks.patch | 81 |
5 files changed, 185 insertions, 0 deletions
diff --git a/testing/tilix/APKBUILD b/testing/tilix/APKBUILD new file mode 100644 index 0000000000..560e0c8189 --- /dev/null +++ b/testing/tilix/APKBUILD @@ -0,0 +1,42 @@ +# 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" diff --git a/testing/tilix/ce11b0bd936fe8fee9c5ac7025ea5864b99ed7d3.patch b/testing/tilix/ce11b0bd936fe8fee9c5ac7025ea5864b99ed7d3.patch new file mode 100644 index 0000000000..b0952df26f --- /dev/null +++ b/testing/tilix/ce11b0bd936fe8fee9c5ac7025ea5864b99ed7d3.patch @@ -0,0 +1,34 @@ +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) { diff --git a/testing/tilix/dont-use-dub.patch b/testing/tilix/dont-use-dub.patch new file mode 100644 index 0000000000..38a425863b --- /dev/null +++ b/testing/tilix/dont-use-dub.patch @@ -0,0 +1,17 @@ +--- 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') diff --git a/testing/tilix/fix-meson.patch b/testing/tilix/fix-meson.patch new file mode 100644 index 0000000000..a48992192a --- /dev/null +++ b/testing/tilix/fix-meson.patch @@ -0,0 +1,11 @@ +--- 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') + ) diff --git a/testing/tilix/musl-hacks.patch b/testing/tilix/musl-hacks.patch new file mode 100644 index 0000000000..d706c8354a --- /dev/null +++ b/testing/tilix/musl-hacks.patch @@ -0,0 +1,81 @@ +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; + } + |