Daniel Dickman <didickman@gmail.com> wrote:
>
>
> > On Apr 17, 2022, at 6:17 AM, Stuart Henderson <stu@spacehopper.org> wrote:
> >
> > On 2022/04/17 13:16, Omar Polo wrote:
> >> pygame dropped python2 support (and SDL1) after 2.0.3 but there are
> >> still pygame consumers py2-only (from a quick look audio/pykaraoke,
> >> games/angrydd, games/forcedattack, games/fretsonfire, games/mysticmine,
> >> games/pathological, games/pyganim, productivity/bruce.)
> >
> > I wouldn't object to removing these at this point. But if there are
> > objections from someone else for specific ports (as long as they are
> > already at their latest upstream version and still require py2 only)
> > we could have a py2-pygame port with the old version to support them.
> > But I do think that should be case-by-case and not "keep all the
> > things".
>
>
> I think we should update to pygame 2.0.3 and switch pygame to sdl2 before we start to remove some of these ports.
fixed my wip diff, please find it attached.
I ran `FLAVOR=python3 make update-plist' and then added MODPY_COMMENT on
the lines with MODPY_PYCACHE manually: now it packages fine with both
flavors but I'm not sure: looking at the size of the diff i probably
overdid.
> I think one of these ports needed sdl1 outside of pygame. So whatever port that was could be the first contender for the attic.
audio/pykaraoke seems to want sdl1, haven't really tried too hard to
build it tho.
I tested some of the consumers (using pkg_add for all except pykaraoke
and bruce.)
The windows pops up but doesn't work (neither did before the update
thought):
- games/angrydd
- games/pathological
works fine:
- games/forcedattack
- games/mysticmine
games/fretsonfire almost hanged the machine when I tried it before
updating pygames, so I'm refraining to try it again.
productivity/bruce builds fine but fails at runtime:
% socrates example.soc
pygame 2.0.3 (SDL 2.0.20, Python 2.7.18)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "/usr/local/bin/socrates", line 149, in <module>
main()
File "/usr/local/bin/socrates", line 142, in main
pages = genPages(args[0])
File "/usr/local/bin/socrates", line 65, in genPages
highlightCodePage(pages, codetitle, codefile, **kw)
File "/usr/local/bin/socrates", line 8, in highlightCodePage
titles = [ line for line in open(filename, 'r')
IOError: [Errno 2] No such file or directory: 'bruce/__init__.py'
upstream for this one seems to be long dead and I couldn't find any fork
on popular forges.
additional testing is appreciated :)
Index: Makefile
===================================================================
RCS file: /home/cvs/ports/devel/pygame/Makefile,v
retrieving revision 1.47
diff -u -p -r1.47 Makefile
--- Makefile 11 Mar 2022 18:53:06 -0000 1.47
+++ Makefile 17 Apr 2022 18:39:24 -0000
@@ -1,7 +1,6 @@
COMMENT= set of Python modules designed for writing games
-MODPY_EGG_VERSION = 2.0.1
-REVISION= 2
+MODPY_EGG_VERSION = 2.0.3
DISTNAME= pygame-${MODPY_EGG_VERSION}
PKGNAME = py-game-${MODPY_EGG_VERSION}
CATEGORIES= devel games
@@ -11,8 +10,8 @@ HOMEPAGE= https://www.pygame.org/
# LGPLv2.1
PERMIT_PACKAGE= Yes
-WANTLIB += SDL SDL_image SDL_mixer SDL_ttf X11 jpeg png pthread
-WANTLIB += freetype z ${MODPY_WANTLIB}
+WANTLIB += SDL2 SDL2_image SDL2_mixer SDL2_ttf X11 freetype jpeg
+WANTLIB += png pthread z
MODULES = lang/python
@@ -22,14 +21,14 @@ FLAVOR ?=
MODPY_PI = Yes
MODPY_SETUPTOOLS = Yes
-LIB_DEPENDS= devel/sdl-ttf \
- devel/sdl-image \
- devel/sdl-mixer
+LIB_DEPENDS= devel/sdl2-ttf \
+ devel/sdl2-image \
+ devel/sdl2-mixer
TEST_DEPENDS = ${BUILD_PKGPATH}
MAKE_ENV+= LOCALBASE="${LOCALBASE}" \
- SDL_CONFIG="${LOCALBASE}/bin/sdl-config"
+ SDL_CONFIG="${LOCALBASE}/bin/sdl2-config"
EXAMPLESDIR= ${PREFIX}/share/examples/${MODPY_PY_PREFIX}pygame
DOCDIR= ${PREFIX}/share/doc/${MODPY_PY_PREFIX}pygame
@@ -38,8 +37,8 @@ TEST_IS_INTERACTIVE= x11
TEST_ENV = PYTHONPATH=${WRKSRC}
do-configure:
- ${SUBST_CMD} ${WRKSRC}/buildconfig/Setup.SDL1.in
- @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MODPY_BIN} buildconfig/config.py -auto -sdl1
+ ${SUBST_CMD} ${WRKSRC}/buildconfig/Setup.SDL2.in
+ @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MODPY_BIN} buildconfig/config.py -auto -sdl2
post-install:
${INSTALL_DATA_DIR} ${EXAMPLESDIR}
@@ -49,7 +48,7 @@ post-install:
${INSTALL_SCRIPT} ${WRKSRC}/examples/data/* ${EXAMPLESDIR}/data
${INSTALL_DATA_DIR} ${DOCDIR}
${INSTALL_DATA} ${WRKSRC}/README.rst ${DOCDIR}
- ${INSTALL_DATA} ${WRKSRC}/docs/*.{gif,html} ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/docs/*.{svg,png,html} ${DOCDIR}
.for i in ref tut
${INSTALL_DATA_DIR} ${DOCDIR}/$i
${INSTALL_DATA} `find ${WRKSRC}/docs/reST/$i -maxdepth 1 -type f` \
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/devel/pygame/distinfo,v
retrieving revision 1.12
diff -u -p -r1.12 distinfo
--- distinfo 14 Jan 2021 06:37:35 -0000 1.12
+++ distinfo 17 Apr 2022 11:00:14 -0000
@@ -1,2 +1,2 @@
-SHA256 (pygame-2.0.1.tar.gz) = ix57Y/R6r83YhJkzsgZ3h0fvGAK9PVJqykXtdxQeQAE=
-SIZE (pygame-2.0.1.tar.gz) = 5536907
+SHA256 (pygame-2.0.3.tar.gz) = 0JfygCqdDX+0DEnHia8phLICuqj9MnAQglmHVfWXP1E=
+SIZE (pygame-2.0.3.tar.gz) = 5804279
Index: patches/patch-buildconfig_Setup_SDL1_in
===================================================================
RCS file: patches/patch-buildconfig_Setup_SDL1_in
diff -N patches/patch-buildconfig_Setup_SDL1_in
--- patches/patch-buildconfig_Setup_SDL1_in 11 Mar 2022 18:53:06 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-Index: buildconfig/Setup.SDL1.in
---- buildconfig/Setup.SDL1.in.orig
-+++ buildconfig/Setup.SDL1.in
-@@ -50,6 +50,7 @@ cdrom src_c/cdrom.c $(SDL) $(DEBUG)
- color src_c/color.c $(SDL) $(DEBUG)
- constants src_c/constants.c $(SDL) $(DEBUG)
- display src_c/display.c $(SDL) $(DEBUG)
-+display src_c/display.c $(SDL) $(DEBUG) -I${X11BASE}/include
- event src_c/event.c $(SDL) $(DEBUG)
- fastevent src_c/fastevent.c src_c/fastevents.c $(SDL) $(DEBUG)
- key src_c/key.c $(SDL) $(DEBUG)
Index: patches/patch-buildconfig_Setup_SDL2_in
===================================================================
RCS file: patches/patch-buildconfig_Setup_SDL2_in
diff -N patches/patch-buildconfig_Setup_SDL2_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-buildconfig_Setup_SDL2_in 17 Apr 2022 18:35:11 -0000
@@ -0,0 +1,11 @@
+Index: buildconfig/Setup.SDL2.in
+--- buildconfig/Setup.SDL2.in.orig
++++ buildconfig/Setup.SDL2.in
+@@ -56,6 +56,7 @@ base src_c/base.c $(SDL) $(DEBUG)
+ color src_c/color.c $(SDL) $(DEBUG)
+ constants src_c/constants.c $(SDL) $(DEBUG)
+ display src_c/display.c $(SDL) $(DEBUG)
++display src_c/display.c $(SDL) $(DEBUG) -I${X11BASE}/include
+ event src_c/event.c $(SDL) $(DEBUG)
+ fastevent src_c/fastevent.c src_c/fastevents.c $(SDL) $(DEBUG)
+ key src_c/key.c $(SDL) $(DEBUG)
Index: patches/patch-src_c_camera_h
===================================================================
RCS file: /home/cvs/ports/devel/pygame/patches/patch-src_c_camera_h,v
retrieving revision 1.3
diff -u -p -r1.3 patch-src_c_camera_h
--- patches/patch-src_c_camera_h 11 Mar 2022 18:53:06 -0000 1.3
+++ patches/patch-src_c_camera_h 17 Apr 2022 11:02:12 -0000
@@ -1,7 +1,7 @@
Index: src_c/camera.h
--- src_c/camera.h.orig
+++ src_c/camera.h
-@@ -41,9 +41,12 @@
+@@ -42,9 +42,12 @@
/* on freebsd there is no asm/types */
#ifdef linux
#include <asm/types.h> /* for videodev2.h */
@@ -12,10 +12,10 @@ Index: src_c/camera.h
+ #ifdef __OpenBSD__
+ #include <sys/videoio.h>
+
No comments:
Post a Comment