Re: FIX: games/xboing -fno-common

2021-02-14 Thread George Koehler
On Sun, 14 Feb 2021 16:14:41 -0800
Ryan Freeman  wrote:

> > Based on various observations here, here is a diff to remove this, includes
> > unhook, quirks diff shortly
> 
> quirks bump

ok gkoehler@ to remove games/xboing

On Sat, 13 Feb 2021 13:48:34 +
Stuart Henderson  wrote:

> I wonder if it might do better on a 32-bit arch. That said,
> there are alternatives like kbreakout / lbreakout2, I'd be OK with
> just rm'ing.

I built xboing with -fcommon for 32-bit macppc and I can't play it.
The frame rate alternates between too slow and too fast, so the ball
becomes almost stuck, then teleports off the screen before I can move
my paddle.  Also, I can't hear the sound.  I played this game many years
ago (I forget where) and don't know when it became broken.

--George



Re: FIX: games/xboing -fno-common

2021-02-14 Thread Ryan Freeman
On Sun, Feb 14, 2021 at 04:08:34PM -0800, Ryan Freeman wrote:
> On Sun, Feb 14, 2021 at 05:23:17PM +0100, Christian Weisgerber wrote:
> > Klemens Nanni:
> > 
> > > OK kn to remove this, although I certainly do not object to fixing it
> > > if someone wants to do the legwork -- it just seems unreasonable to me
> > > (if done by people who only fix it "to fix the tree").
> > 
> > FWIW, the FreeBSD port is equally unplayable.
> > 
> > -- 
> > Christian "naddy" Weisgerber  na...@mips.inka.de
> > 
> 
> Based on various observations here, here is a diff to remove this, includes
> unhook, quirks diff shortly

quirks bump


Index: Makefile
===
RCS file: /cvs/ports/devel/quirks/Makefile,v
retrieving revision 1.1165
diff -u -p -r1.1165 Makefile
--- Makefile14 Feb 2021 18:06:22 -  1.1165
+++ Makefile15 Feb 2021 00:11:22 -
@@ -5,7 +5,7 @@ CATEGORIES =devel databases
 DISTFILES =
 
 # API.rev
-PKGNAME =  quirks-3.553
+PKGNAME =  quirks-3.554
 PKG_ARCH = *
 MAINTAINER =   Marc Espie 
 
Index: files/Quirks.pm
===
RCS file: /cvs/ports/devel/quirks/files/Quirks.pm,v
retrieving revision 1.1181
diff -u -p -r1.1181 Quirks.pm
--- files/Quirks.pm 14 Feb 2021 18:06:22 -  1.1181
+++ files/Quirks.pm 15 Feb 2021 00:11:23 -
@@ -2095,6 +2095,7 @@ my $obsolete_reason = {
'libquvi-scripts' => 39,
'cclive' => 6,
'viz' => 4,
+   'xboing' => 0,
 };
 
 # reasons for obsolete packages



Re: FIX: games/xboing -fno-common

2021-02-14 Thread Ryan Freeman
On Sun, Feb 14, 2021 at 05:23:17PM +0100, Christian Weisgerber wrote:
> Klemens Nanni:
> 
> > OK kn to remove this, although I certainly do not object to fixing it
> > if someone wants to do the legwork -- it just seems unreasonable to me
> > (if done by people who only fix it "to fix the tree").
> 
> FWIW, the FreeBSD port is equally unplayable.
> 
> -- 
> Christian "naddy" Weisgerber  na...@mips.inka.de
> 

Based on various observations here, here is a diff to remove this, includes
unhook, quirks diff shortly


Index: Makefile
===
RCS file: /cvs/ports/games/Makefile,v
retrieving revision 1.434
diff -u -p -r1.434 Makefile
--- Makefile8 Feb 2021 20:33:31 -   1.434
+++ Makefile15 Feb 2021 00:06:52 -
@@ -341,7 +341,6 @@
  SUBDIR += xbl
  SUBDIR += xblast
  SUBDIR += xboard
- SUBDIR += xboing
  SUBDIR += xbomber
  SUBDIR += xbreaky
  SUBDIR += xbubble
Index: xboing/Makefile
===
RCS file: xboing/Makefile
diff -N xboing/Makefile
--- xboing/Makefile 12 Jul 2019 20:46:27 -  1.31
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,30 +0,0 @@
-# $OpenBSD: Makefile,v 1.31 2019/07/12 20:46:27 sthen Exp $
-
-COMMENT=   blockout style game for X11
-
-V= 2.4
-DISTNAME=  xboing${V}
-PKGNAME=   xboing-${V}
-REVISION=  4
-
-CATEGORIES=games
-
-HOMEPAGE=  http://www.techrescue.org/xboing/
-
-# X Consortium
-PERMIT_PACKAGE=Yes
-
-WANTLIB=   X11 Xau Xdmcp Xext Xpm c m sndio
-
-MASTER_SITES=  ${MASTER_SITE_XCONTRIB:=games/}
-
-CONFIGURE_STYLE=imake
-WRKDIST=   ${WRKDIR}/xboing
-
-NO_TEST=   Yes
-
-post-install:
-   ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/xboing
-   ${INSTALL_DATA} /dev/null ${PREFIX}/share/examples/xboing/xboing.score
-
-.include 
Index: xboing/distinfo
===
RCS file: xboing/distinfo
diff -N xboing/distinfo
--- xboing/distinfo 18 Jan 2015 03:14:03 -  1.4
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,2 +0,0 @@
-SHA256 (xboing2.4.tar.gz) = ZwGcuMik2gsRd9zIvtBjr+O48YU7GDRdvB3qylHUopo=
-SIZE (xboing2.4.tar.gz) = 588811
Index: xboing/patches/patch-Imakefile
===
RCS file: xboing/patches/patch-Imakefile
diff -N xboing/patches/patch-Imakefile
--- xboing/patches/patch-Imakefile  25 Aug 2010 18:04:37 -  1.8
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,82 +0,0 @@
-$OpenBSD: patch-Imakefile,v 1.8 2010/08/25 18:04:37 jasper Exp $
 Imakefile.orig Fri Nov 22 02:28:46 1996
-+++ Imakefile  Wed Aug 25 20:02:50 2010
-@@ -24,23 +24,23 @@ XCOMM 
- XCOMM This is the directory where the highscore, level & sound data will be 
- XCOMM placed. Default will be the current directory.
- 
--XBOING_DIR = .
-+XBOING_DIR = ${PREFIX}/share/xboing
- 
- XCOMM These are some defines that must be set. Some may be overwritten in the
- XCOMM machine arch section.
- 
--XPMLIB= -L/usr/X11/lib -lXpm
--XPMINCLUDE= -I/usr/X11/include/X11
-+XPMLIB= -lXpm
-+XPMINCLUDE= -I${X11BASE}/include/X11
- XBOINGINCLUDE = -I./include
- LEVEL_INSTALL_DIR = $(XBOING_DIR)/levels
- SOUNDS_DIR= $(XBOING_DIR)/sounds
- BACKUP_DIR= $(XBOING_DIR)/../backups
--HIGH_SCORE_FILE   = $(XBOING_DIR)/.xboing.scr
--AUDIO_AVAILABLE   = False
--AUDIO_SRC = audio/NOaudio.c
-+HIGH_SCORE_DIR= /var/games
-+HIGH_SCORE_FILE   = $(HIGH_SCORE_DIR)/xboing.score
-+AUDIO_AVAILABLE   = True
-+AUDIO_SRC = audio/LINUXaudio.c
- AUDIO_INCLUDE =
--AUDIO_LIB =
--  CDEBUGFLAGS = -g
-+AUDIO_LIB = -lsndio
- 
- XCOMM Uncomment this if you want to use ANY of the AUDIO sound systems
- #define COMPILE_IN_AUDIO
-@@ -53,7 +53,7 @@ XCOMM #define USE_NETAUDIO
- 
- XCOMM Below are the special defines for different machine archs.
- 
--#if defined(HPArchitecture) && defined(COMPILE_IN_AUDIO) 
-+#if defined(HPArchitecture) && defined(COMPILE_IN_AUDIO) && 
!defined(OpenBSDArchitecture)
- AUDIO_AVAILABLE = True
- AUDIO_SRC = audio/HPaudio.c
- AUDIO_INCLUDE =
-@@ -74,14 +74,14 @@ XCOMM Below are the special defines for different mach
- AUDIO_LIB   =
- #endif /* svr4 */  
- 
--#if defined(SGIArchitecture) && defined(COMPILE_IN_AUDIO)
-+#if defined(SGIArchitecture) && defined(COMPILE_IN_AUDIO) && 
!defined(OpenBSDArchitecture)
- AUDIO_AVAILABLE = True
- AUDIO_SRC = audio/SGIaudio.c
- AUDIO_INCLUDE

Re: FIX: games/xboing -fno-common

2021-02-14 Thread Christian Weisgerber
Klemens Nanni:

> OK kn to remove this, although I certainly do not object to fixing it
> if someone wants to do the legwork -- it just seems unreasonable to me
> (if done by people who only fix it "to fix the tree").

FWIW, the FreeBSD port is equally unplayable.

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: FIX: games/xboing -fno-common

2021-02-14 Thread Klemens Nanni
On Sat, Feb 13, 2021 at 03:59:23PM +0100, Christian Weisgerber wrote:
> Ryan Freeman:
> 
> > From FreeBSD, a bit hard to follow as their commit (re)touched the
> > original patches
> > 
> > Once this builds, the game doesn't seem very playable.
> 
> I already looked at this.  If you build it with -fcommon, it already
> isn't playable.  That needs to be fixed first--or the port should
> be removed.
> 
> This is a case where the no-common fix is not obvious.  If you look
> at the code, the intent appears to have been to have local waitMode
> variables in each module.  However, they are all merged into a
> single common.
> 
> If you follow the likely intent, the different instances of waitMode
> should be declared static.  However, it's entirely possible that
> the game logic has come to rely on the accidental merging of the
> variables.  So this needs testing... for which the game needs to
> be playable in the first place.
That makes me tend towards simply removing the port (as sthen suggests).

Fixing actually used ports is one thing but spending valuable porter's
time on life support for such cruft seems more like a burden to me.

OK kn to remove this, although I certainly do not object to fixing it
if someone wants to do the legwork -- it just seems unreasonable to me
(if done by people who only fix it "to fix the tree").



Re: FIX: games/xboing -fno-common

2021-02-13 Thread Christian Weisgerber
Stuart Henderson:

> naddy had a similar diff and same problem. Looking at the compiler
> warnings it doesn't exactly seem LP64-clean (or, well, clean at all);

Speaking in general terms:  A lot of the crufty X11 code in the
ports tree has a pattern where they use callback APIs that take a
pointer argument, and if they just want to pass an int, they cast
it to a pointer and back (instead of allocating an int and passing
a pointer to it).  That works out fine, no truncation, despite scary
compiler warnings.

IIRC we mostly cleaned up the actual LP64 problems years ago.

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: FIX: games/xboing -fno-common

2021-02-13 Thread Christian Weisgerber
Ryan Freeman:

> From FreeBSD, a bit hard to follow as their commit (re)touched the
> original patches
> 
> Once this builds, the game doesn't seem very playable.

I already looked at this.  If you build it with -fcommon, it already
isn't playable.  That needs to be fixed first--or the port should
be removed.

This is a case where the no-common fix is not obvious.  If you look
at the code, the intent appears to have been to have local waitMode
variables in each module.  However, they are all merged into a
single common.

If you follow the likely intent, the different instances of waitMode
should be declared static.  However, it's entirely possible that
the game logic has come to rely on the accidental merging of the
variables.  So this needs testing... for which the game needs to
be playable in the first place.

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: FIX: games/xboing -fno-common

2021-02-13 Thread Stuart Henderson
On 2021/02/12 16:39, Ryan Freeman wrote:
> 
> From FreeBSD, a bit hard to follow as their commit (re)touched the
> original patches
> 
> https://svnweb.freebsd.org/ports?view=revision&revision=548113
> 
> Once this builds, the game doesn't seem very playable.  Seems like
> it might be running /way/ too fast on modern systems.  Tried stock
> fvwm with no fancy stuff to see if compositing was problematic, no
> improvement.
> 
> Does this work for anyone else?  Should it get booted?

naddy had a similar diff and same problem. Looking at the compiler
warnings it doesn't exactly seem LP64-clean (or, well, clean at all);
I wonder if it might do better on a 32-bit arch. That said,
there are alternatives like kbreakout / lbreakout2, I'd be OK with
just rm'ing.



FIX: games/xboing -fno-common

2021-02-12 Thread Ryan Freeman


>From FreeBSD, a bit hard to follow as their commit (re)touched the
original patches

https://svnweb.freebsd.org/ports?view=revision&revision=548113

Once this builds, the game doesn't seem very playable.  Seems like
it might be running /way/ too fast on modern systems.  Tried stock
fvwm with no fancy stuff to see if compositing was problematic, no
improvement.

Does this work for anyone else?  Should it get booted?


Index: Makefile
===
RCS file: /cvs/ports/games/xboing/Makefile,v
retrieving revision 1.31
diff -u -p -r1.31 Makefile
--- Makefile12 Jul 2019 20:46:27 -  1.31
+++ Makefile13 Feb 2021 00:30:05 -
@@ -5,7 +5,7 @@ COMMENT=blockout style game for X11
 V= 2.4
 DISTNAME=  xboing${V}
 PKGNAME=   xboing-${V}
-REVISION=  4
+REVISION=  5
 
 CATEGORIES=games
 
Index: patches/patch-bonus_c
===
RCS file: /cvs/ports/games/xboing/patches/patch-bonus_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-bonus_c
--- patches/patch-bonus_c   8 Jul 2011 11:42:09 -   1.1
+++ patches/patch-bonus_c   13 Feb 2021 00:30:05 -
@@ -1,6 +1,19 @@
 $OpenBSD: patch-bonus_c,v 1.1 2011/07/08 11:42:09 jasper Exp $
 bonus.c.orig   Fri Nov 22 02:28:46 1996
-+++ bonus.cFri Jul  8 13:37:55 2011
+
+fix -fno-common, from FreeBSD
+
+Index: bonus.c
+--- bonus.c.orig
 bonus.c
+@@ -120,7 +120,7 @@ enum BonusStates   BonusState;
+ static Pixmap titlePixmap, titlePixmapM;
+ static intypos;
+ static intwaitingFrame;
+-enum BonusStates  waitMode;
++extern enum BonusStates   waitMode;
+ static char   string[80];
+ static u_long bonusScore;
+ static intfirstTime = True;
 @@ -311,7 +311,7 @@ void DrawTitleText(display, window)
XFlush(display);
  
Index: patches/patch-demo_c
===
RCS file: /cvs/ports/games/xboing/patches/patch-demo_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-demo_c
--- patches/patch-demo_c6 Mar 2004 02:41:00 -   1.1
+++ patches/patch-demo_c13 Feb 2021 00:30:05 -
@@ -1,6 +1,19 @@
 $OpenBSD: patch-demo_c,v 1.1 2004/03/06 02:41:00 naddy Exp $
 demo.c.orig2004-03-06 01:50:10.0 +0100
-+++ demo.c 2004-03-06 01:51:28.0 +0100
+
+now includes -fno-common fix, from FreeBSD
+ 
+Index: demo.c
+--- demo.c.orig
 demo.c
+@@ -107,7 +107,7 @@ static int endFrame = 0;
+ static int startFrame = 0;
+ enum DemoStates DemoState;
+ static int waitingFrame;
+-enum DemoStates waitMode;
++extern enum DemoStates waitMode;
+ 
+ #if NeedFunctionPrototypes
+ void SetUpDemonstration(Display *display, Window window, Colormap colormap)
 @@ -154,7 +154,7 @@ static void DoBlocks(display, window)
  
  /* Construct the demo level filename */
Index: patches/patch-editor_c
===
RCS file: /cvs/ports/games/xboing/patches/patch-editor_c,v
retrieving revision 1.2
diff -u -p -r1.2 patch-editor_c
--- patches/patch-editor_c  6 Mar 2004 02:41:00 -   1.2
+++ patches/patch-editor_c  13 Feb 2021 00:30:05 -
@@ -1,6 +1,19 @@
 $OpenBSD: patch-editor_c,v 1.2 2004/03/06 02:41:00 naddy Exp $
 editor.c.orig  1996-11-22 02:28:46.0 +0100
-+++ editor.c   2004-03-06 01:55:49.0 +0100
+
+now includes -fno-common fix, from FreeBSD
+
+Index: editor.c
+--- editor.c.orig
 editor.c
+@@ -121,7 +121,7 @@ void DoEditWait();
+ enum EditStates EditState;
+ enum EditStates oldEditState;
+ static int waitingFrame;
+-enum EditStates waitMode;
++extern enum EditStates waitMode;
+ static int oldWidth, oldHeight;
+ static int curBlockType;
+ static int drawAction = ED_NOP;
 @@ -213,7 +213,7 @@ static void DoLoadLevel(display, window)
  
  /* Construct the Edit level filename */
Index: patches/patch-highscore_c
===
RCS file: /cvs/ports/games/xboing/patches/patch-highscore_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-highscore_c
--- patches/patch-highscore_c   8 Jul 2011 11:42:09 -   1.1
+++ patches/patch-highscore_c   13 Feb 2021 00:30:05 -
@@ -1,6 +1,10 @@
 $OpenBSD: patch-highscore_c,v 1.1 2011/07/08 11:42:09 jasper Exp $
 highscore.c.orig   Fri Nov 22 02:28:46 1996
-+++ highscore.cFri Jul  8 13:37:55 2011
+
+now includes -fno-common fix, from FreeBSD
+
+Index: highscore.c
+--- highscore.c.orig
 highscore.c
 @@ -55,6 +55,7 @@
  #include 
  #include 
@@ -18,6 +22,15 @@ $OpenBSD: patch-highscore_c,v 1.1 2011/0
  #else
  static int LockUnlock();
  static void DeleteScore();
+@@ -137,7 +138,7 @@ static int endFrame = 0;
+ enum HighScoreStates HighScoreState;
+ static Pixmap titlePixmap, titlePixmapM;
+ static int waitingFrame;
+-enum HighScoreStates waitMode;
++ext