Hi,
I've a need for the new video playing feature of impress!ve 0.12, and
even found a new 0.13.1 version that supports python3.
Unfortunatly there's a small bug in the mplayer control code with
python3, so I've added a patch to fix it (and I also reported it
upstreams).
But I'm not sure if my patch below is the proper way to handle a port
that is now python3 only (the FLAVOR handling looks suspicious to me)
but I'm not experienced enough with python ports to figure it out.
Comments, suggestions, oks ?
Index: Makefile
===================================================================
RCS file: /cvs/OpenBSD/ports/productivity/impressive/Makefile,v
retrieving revision 1.22
diff -u -p -u -r1.22 Makefile
--- Makefile 11 Mar 2022 19:51:42 -0000 1.22
+++ Makefile 26 Mar 2022 10:47:32 -0000
@@ -1,9 +1,8 @@
COMMENT = stylish PDF presentation generator
-MODPY_EGG_VERSION = 0.11.1
+MODPY_EGG_VERSION = 0.13.1
DISTNAME = Impressive-${MODPY_EGG_VERSION}
PKGNAME = impressive-${MODPY_EGG_VERSION}
-REVISION = 1
CATEGORIES = productivity
HOMEPAGE = http://impressive.sourceforge.net/
@@ -13,16 +12,19 @@ MASTER_SITES = ${MASTER_SITE_SOURCEFORG
PERMIT_PACKAGE = Yes
MODULES = lang/python
-MODPY_VERSION = ${MODPY_DEFAULT_VERSION_2}
NO_BUILD = Yes
NO_TEST = Yes
-RUN_DEPENDS = devel/pygame \
+FLAVORS= python3
+FLAVOR= python3
+
+RUN_DEPENDS = devel/pygame,python3 \
devel/xdg-utils \
- graphics/py2-Pillow \
- graphics/py-opengl \
+ graphics/py-Pillow \
+ graphics/py-opengl,python3 \
print/poppler,-utils \
- textproc/pdftk
+ textproc/pdftk \
+ x11/mplayer
MODPY_ADJ_FILES = impressive.py
Index: distinfo
===================================================================
RCS file: /cvs/OpenBSD/ports/productivity/impressive/distinfo,v
retrieving revision 1.3
diff -u -p -u -r1.3 distinfo
--- distinfo 8 Apr 2016 09:23:13 -0000 1.3
+++ distinfo 26 Mar 2022 10:47:32 -0000
@@ -1,2 +1,2 @@
-SHA256 (Impressive-0.11.1.tar.gz) =
WT9hbrcqGKgmvHaHyZUqKuXd7VSD0miLq1tcpoyveSw=
-SIZE (Impressive-0.11.1.tar.gz) = 195743
+SHA256 (Impressive-0.13.1.tar.gz) =
JIkXO7+KsStEmQfYEQMPqXPSOjDmN8Y18XUn6roULTQ=
+SIZE (Impressive-0.13.1.tar.gz) = 215989
Index: patches/patch-impressive_py
===================================================================
RCS file: patches/patch-impressive_py
diff -N patches/patch-impressive_py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-impressive_py 26 Mar 2022 10:47:32 -0000
@@ -0,0 +1,23 @@
+--- impressive.py.orig Sat Mar 26 11:10:53 2022
++++ impressive.py Sat Mar 26 11:34:40 2022
+@@ -1059,9 +1059,9 @@
+ # first, ask politely
+ try:
+ if Platform.use_omxplayer and VideoPlaying:
+- MPlayerProcess.stdin.write('q')
++ MPlayerProcess.stdin.write('q'.encode())
+ else:
+- MPlayerProcess.stdin.write('quit\n')
++ MPlayerProcess.stdin.write('quit\n'.encode())
+ MPlayerProcess.stdin.flush()
+ for i in range(10):
+ if MPlayerProcess.poll() is None:
+@@ -5571,7 +5571,7 @@
+ cmd = omxplayer_cmd if Platform.use_omxplayer else (mplayer_cmd +
'\n')
+ if not cmd: return
+ try:
+- MPlayerProcess.stdin.write(cmd)
++ MPlayerProcess.stdin.write(cmd.encode())
+ MPlayerProcess.stdin.flush()
+ except:
+ StopMPlayer()
--
Matthieu Herrb