Index | Thread | Search

From:
Thomas Frohwein <tfrohwein@fastmail.com>
Subject:
Re: UPDATE: games/classicube to 1.3.7
To:
izzy Meyer <izder456@disroot.org>
Cc:
ports@openbsd.org, bentley@openbsd.org
Date:
Sat, 30 Aug 2025 12:16:03 -0400

Download raw body.

Thread
On Tue, 12 Aug 2025 13:44:51 -0500
izzy Meyer <izder456@disroot.org> wrote:

> On Fri, 18 Jul 2025 10:25:17 -0500
> izzy Meyer <izder456@disroot.org> wrote:
> 
> > Hello ports@, 
> > 
> > This diff updates games/classicube to 1.3.7
> > 
> > Changelog:
> > https://github.com/ClassiCube/ClassiCube/releases/tag/1.3.7
> > 
> > It also changes the BUILD_DEPENDS to LIB_DEPENDS as libcurl is
> > dlopen'd when downloading the assets, and openal is dlopen'd for
> > game audio support. IMHO they should be around at runtime too for
> > these reasons. It *does* complain about LIB_DEPENDS not being
> > needed, but they are. IDK how to fix this.
> > 
> > There was a earlier thread on this, but it never got imported.
> > https://marc.info/?t=172884810500002&r=1&w=2
> > 
> > Works well on amd64 and macppc, though I don't have 3d accel on my
> > powerbook so it runs a bit like crap there. 
> > 
> > Thanks.
> >   
> 
> Ping! (CC bentley@) 
> 
> (attached the diff again)
> 

Attached an updated diff, addressing the following things:

- patch for Logger.c didn't apply, needs FIX_CRLF_FILES
- openal and curl are dlopen'd; per policy should be in LIB_DEPENDS
  *and* WANTLIB
- added NO_TEST=Yes because the lack of valid test target exits != 0
- patch Makefile to honor CFLAGS

ok thfr@ with this if this looks okay to another committer.
Index: Makefile
===================================================================
RCS file: /cvs/ports/games/classicube/Makefile,v
diff -u -p -r1.4 Makefile
--- Makefile	28 Jan 2025 11:22:02 -0000	1.4
+++ Makefile	30 Aug 2025 16:12:03 -0000
@@ -3,11 +3,10 @@ BROKEN-sparc64 =	...error "Unknown CPU a
 
 COMMENT =		classic Minecraft client written in C
 
-V =			1.3.6
+V =			1.3.7
 PKGNAME =		classicube-${V}
-REVISION =		0
 
-DIST_TUPLE +=		github ClassiCube ClassiCube 1.3.6 .
+DIST_TUPLE +=		github ClassiCube ClassiCube ${V} .
 
 CATEGORIES =		games
 
@@ -16,16 +15,24 @@ MAINTAINER =		izzy Meyer <izder456@disro
 # BSD
 PERMIT_PACKAGE =	Yes
 
-WANTLIB +=		GL X11 Xi c execinfo m pthread
+WANTLIB +=		GL X11 Xi c execinfo pthread
+
+# dlopen'd
+WANTLIB +=		openal curl
+
+FIX_CRLF_FILES =	src/Logger.c
 
 COMPILER =		base-clang ports-gcc base-gcc
 COMPILER_LANGS =	c
 
-BUILD_DEPENDS =		net/curl \
+# Needed for downloading assets and sound support at runtime
+LIB_DEPENDS =		net/curl \
 			audio/openal
 RUN_DEPENDS =		devel/desktop-file-utils
 
 USE_GMAKE =		Yes
+
+NO_TEST =		Yes
 
 ALL_TARGET =		ClassiCube
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/games/classicube/distinfo,v
diff -u -p -r1.1.1.1 distinfo
--- distinfo	9 Jul 2024 16:14:11 -0000	1.1.1.1
+++ distinfo	30 Aug 2025 16:12:03 -0000
@@ -1,2 +1,2 @@
-SHA256 (ClassiCube-ClassiCube-1.3.6.tar.gz) = +reA9NzwZpoPlGg8m2WW9Ay4PglyejuRqq5ek0qXQLA=
-SIZE (ClassiCube-ClassiCube-1.3.6.tar.gz) = 2490780
+SHA256 (ClassiCube-ClassiCube-1.3.7.tar.gz) = BPlusswzi4GjaoQ7fR8j3lTvU5qA0reTu+9pqpBDWF8=
+SIZE (ClassiCube-ClassiCube-1.3.7.tar.gz) = 3717504
Index: patches/patch-Makefile
===================================================================
RCS file: patches/patch-Makefile
diff -N patches/patch-Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-Makefile	30 Aug 2025 16:12:03 -0000
@@ -0,0 +1,14 @@
+honor CFLAGS
+
+Index: Makefile
+--- Makefile.orig
++++ Makefile
+@@ -5,7 +5,7 @@ C_OBJECTS   = $(patsubst $(SOURCE_DIR)/%.c, $(BUILD_DI
+ 
+ OBJECTS = $(C_OBJECTS)
+ # Flags passed to the C compiler
+-CFLAGS  = -pipe -fno-math-errno -Werror -Wno-error=missing-braces -Wno-error=strict-aliasing
++CFLAGS  += -fno-math-errno -Werror -Wno-error=missing-braces -Wno-error=strict-aliasing
+ # Flags passed to the linker
+ LDFLAGS = -g -rdynamic
+ # Name of the main executable
Index: patches/patch-src_Logger_c
===================================================================
RCS file: patches/patch-src_Logger_c
diff -N patches/patch-src_Logger_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_Logger_c	30 Aug 2025 16:12:03 -0000
@@ -0,0 +1,12 @@
+Index: src/Logger.c
+--- src/Logger.c.orig
++++ src/Logger.c
+@@ -403,7 +403,7 @@ void Logger_Backtrace(cc_string* trace, void* ctx) {
+ }
+ #elif defined CC_BACKTRACE_BUILTIN
+ /* Implemented later at end of the file */
+-#elif defined CC_BUILD_POSIX && defined _GLIBC_
++#elif defined CC_BUILD_POSIX && (defined _GLIBC_ || defined CC_BUILD_OPENBSD)
+ #include <execinfo.h>
+ 
+ void Logger_Backtrace(cc_string* trace, void* ctx) {