Friday, October 15, 2021

Re: [new port] games/wordsearch: Classic word search game that you can play in your terminal

Index: Makefile
===================================================================
RCS file: /cvs/ports/games/wordsearch/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- Makefile 15 Oct 2021 14:12:09 -0000 1.1.1.1
+++ Makefile 15 Oct 2021 21:10:23 -0000
@@ -3,6 +3,7 @@
V = 2.0
COMMENT = classic word search game that you can play in your terminal
DISTNAME = wordsearch-${V}
+REVISION = 0
CATEGORIES = games

HOMEPAGE = https://github.com/jensenpat/wordsearch/
Index: patches/patch-wordsearch
===================================================================
RCS file: patches/patch-wordsearch
diff -N patches/patch-wordsearch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-wordsearch 15 Oct 2021 21:10:23 -0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+
+Avoid spurious startup failure.
+
+Index: wordsearch
+--- wordsearch.orig
++++ wordsearch
+@@ -290,7 +290,10 @@ def Main(window):
+ CompletedList = []
+
+ # Initialize curses
+- curses.curs_set(2)
++ try:
++ curses.curs_set(2)
++ except:
++ pass
+
+ # Theme picker
+ if (theme == "green"):
On 10/15/2021 11:49 AM, Ian Darwin wrote:
>> > Unfortunately I can't replicate this. I tried just now with a freshly
>> > installed rxvt-unicode package. Tried both with and without tmux running in
>> > urxvt, both worked. Let me know if there's some special setup you have and
>> > I'll try to track the problem down.
>> >
>> > ~Brian
>>
>> I'm not sure what's triggering it, but looking at curs_set(3) doc
>> I think ERR should simply be ignored:
>>
>> The curs_set routine sets the cursor state is set to invisible,
>> normal,
>> or very visible for visibility equal to 0, 1, or 2
>> respectively. If
>> the terminal supports the visibility requested, the previous
>> cursor
>> state is returned; otherwise, ERR is returned.
>>
>> This works but I don't know python so there might be a nicer way
>>
>> # Initialize curses
>> try:
>> curses.curs_set(2)
>> except:
>> 1
>
> Use the keyword "pass" instead of the constant 1.

Thanks Ian. How is this diff?

~Brian

No comments:

Post a Comment