From bd0047474093b422bb638576d8b5415d565df007 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sun, 8 Apr 2018 23:45:06 +0200 Subject: [PATCH] asciinema: Update from 1.4.0 to 2.0.1 --- .../asciinema/asciinema-asciicast-v2.py.patch | 23 +++++++++++++++++++ packages/asciinema/build.sh | 8 +++---- 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 packages/asciinema/asciinema-asciicast-v2.py.patch diff --git a/packages/asciinema/asciinema-asciicast-v2.py.patch b/packages/asciinema/asciinema-asciicast-v2.py.patch new file mode 100644 index 000000000..7ac0b7cd5 --- /dev/null +++ b/packages/asciinema/asciinema-asciicast-v2.py.patch @@ -0,0 +1,23 @@ +See https://github.com/asciinema/asciinema/issues/271 + +diff -u -r ../asciinema-2.0.1/asciinema/asciicast/v2.py ./asciinema/asciicast/v2.py +--- ../asciinema-2.0.1/asciinema/asciicast/v2.py 2018-04-04 09:05:41.000000000 +0200 ++++ ./asciinema/asciicast/v2.py 2018-04-06 23:24:44.432657505 +0200 +@@ -4,7 +4,16 @@ + import json.decoder + import time + import codecs +-from multiprocessing import Process, Queue ++ ++try: ++ # Importing synchronize is to detect platforms where ++ # multiprocessing does not work (python issue 3770) ++ # and cause an ImportError. Otherwise it will happen ++ # later when trying to use Queue(). ++ from multiprocessing import synchronize, Process, Queue ++except ImportError: ++ from threading import Thread as Process ++ from queue import Queue + + from asciinema.pty_recorder import PtyRecorder + diff --git a/packages/asciinema/build.sh b/packages/asciinema/build.sh index 76d115ced..29b9735e2 100644 --- a/packages/asciinema/build.sh +++ b/packages/asciinema/build.sh @@ -1,12 +1,12 @@ TERMUX_PKG_HOMEPAGE=https://asciinema.org/ TERMUX_PKG_DESCRIPTION="Record and share your terminal sessions, the right way" -TERMUX_PKG_VERSION=1.4.0 -# ncurses-utils for tput which asciinema uses: -TERMUX_PKG_DEPENDS="python, ncurses-utils" +TERMUX_PKG_VERSION=2.0.1 +TERMUX_PKG_SHA256=7087b247dae36d04821197bc14ebd4248049592b299c9878d8953c025ac802e4 TERMUX_PKG_SRCURL=https://github.com/asciinema/asciinema/archive/v${TERMUX_PKG_VERSION}.tar.gz -TERMUX_PKG_SHA256=841a55b0f51988d5e155e99badbd6ce5cf3b43cca2ba15cd20c971a19719dc9a TERMUX_PKG_BUILD_IN_SRC=yes TERMUX_PKG_PLATFORM_INDEPENDENT=yes +# ncurses-utils for tput which asciinema uses: +TERMUX_PKG_DEPENDS="python, ncurses-utils" termux_step_make () { return