pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/games



Module Name:    pkgsrc
Committed By:   nia
Date:           Thu May  2 07:33:20 UTC 2024

Modified Files:
        pkgsrc/games: Makefile
Added Files:
        pkgsrc/games/classicube: DESCR Makefile PLIST distinfo
        pkgsrc/games/classicube/files: classicube.desktop classicube.sh
        pkgsrc/games/classicube/patches: patch-Makefile patch-src_Audio.c
            patch-src_Http__Worker.c patch-src_Platform__Posix.c

Log Message:
Import games/classicube

ClassiCube is a custom Minecraft Classic compatible client written in C from
scratch.

ClassiCube aims to replicate the 2009 Minecraft Classic client while offering
optional enhancements to improve gameplay.

ClassiCube is not trying to replicate modern Minecraft versions. It will
never support survival, logging in with Minecraft accounts or connecting to
Minecraft servers.  It is not affiliated with (or supported by) Mojang AB,
Minecraft, or Microsoft in any way.


To generate a diff of this commit:
cvs rdiff -u -r1.543 -r1.544 pkgsrc/games/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/games/classicube/DESCR \
    pkgsrc/games/classicube/Makefile pkgsrc/games/classicube/PLIST \
    pkgsrc/games/classicube/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/games/classicube/files/classicube.desktop \
    pkgsrc/games/classicube/files/classicube.sh
cvs rdiff -u -r0 -r1.1 pkgsrc/games/classicube/patches/patch-Makefile \
    pkgsrc/games/classicube/patches/patch-src_Audio.c \
    pkgsrc/games/classicube/patches/patch-src_Http__Worker.c \
    pkgsrc/games/classicube/patches/patch-src_Platform__Posix.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/games/Makefile
diff -u pkgsrc/games/Makefile:1.543 pkgsrc/games/Makefile:1.544
--- pkgsrc/games/Makefile:1.543 Wed Feb 14 19:47:36 2024
+++ pkgsrc/games/Makefile       Thu May  2 07:33:19 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.543 2024/02/14 19:47:36 charlotte Exp $
+# $NetBSD: Makefile,v 1.544 2024/05/02 07:33:19 nia Exp $
 #
 
 COMMENT=       Games
@@ -73,6 +73,7 @@ SUBDIR+=      chocolate-doom
 SUBDIR+=       chromium-bsu
 SUBDIR+=       circuslinux
 SUBDIR+=       civctp-demo
+SUBDIR+=       classicube
 SUBDIR+=       cmatrix
 SUBDIR+=       colchess
 SUBDIR+=       colchess-book-colchess

Added files:

Index: pkgsrc/games/classicube/DESCR
diff -u /dev/null pkgsrc/games/classicube/DESCR:1.1
--- /dev/null   Thu May  2 07:33:20 2024
+++ pkgsrc/games/classicube/DESCR       Thu May  2 07:33:19 2024
@@ -0,0 +1,10 @@
+ClassiCube is a custom Minecraft Classic compatible client written in C from
+scratch.
+
+ClassiCube aims to replicate the 2009 Minecraft Classic client while offering
+optional enhancements to improve gameplay.
+
+ClassiCube is not trying to replicate modern Minecraft versions. It will
+never support survival, logging in with Minecraft accounts or connecting to
+Minecraft servers.  It is not affiliated with (or supported by) Mojang AB,
+Minecraft, or Microsoft in any way.
Index: pkgsrc/games/classicube/Makefile
diff -u /dev/null pkgsrc/games/classicube/Makefile:1.1
--- /dev/null   Thu May  2 07:33:20 2024
+++ pkgsrc/games/classicube/Makefile    Thu May  2 07:33:19 2024
@@ -0,0 +1,57 @@
+# $NetBSD: Makefile,v 1.1 2024/05/02 07:33:19 nia Exp $
+
+DISTNAME=      ClassiCube-1.3.6
+PKGNAME=       ${DISTNAME:tl}
+CATEGORIES=    games
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=ClassiCube/}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/ClassiCube/ClassiCube
+COMMENT=       Custom Minecraft Classic client
+LICENSE=       modified-bsd
+
+USE_TOOLS+=    gmake
+
+TOOL_DEPENDS+= dos2unix-[0-9]*:../../converters/dos2unix
+
+BUILD_TARGET=  default
+
+SUBST_CLASSES+=                paths
+SUBST_STAGE.paths=     pre-configure
+SUBST_FILES.paths=     src/*.c
+SUBST_MESSAGE.paths=   Fixing absolute paths.
+SUBST_VARS.paths=      PREFIX X11BASE
+
+INSTALLATION_DIRS+=    bin
+INSTALLATION_DIRS+=    libexec
+INSTALLATION_DIRS+=    share/applications
+INSTALLATION_DIRS+=    share/pixmaps
+
+post-extract:
+       dos2unix ${WRKSRC}/src/*.c
+
+post-configure:
+       ${SED} -e "s,@PREFIX@,${PREFIX},g" ${FILESDIR}/classicube.sh > \
+               ${WRKDIR}/classicube.sh
+
+do-install:
+       ${INSTALL_SCRIPT} ${WRKDIR}/classicube.sh \
+               ${DESTDIR}${PREFIX}/bin/classicube
+       ${INSTALL_DATA} ${FILESDIR}/classicube.desktop \
+               ${DESTDIR}${PREFIX}/share/applications/classicube.desktop
+       ${INSTALL_PROGRAM} ${WRKSRC}/ClassiCube \
+               ${DESTDIR}${PREFIX}/libexec/ClassiCube
+       ${INSTALL_DATA} ${WRKSRC}/misc/CCicon.png \
+               ${DESTDIR}${PREFIX}/share/pixmaps/classicube.png
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+.if ${OPSYS} != "Darwin"
+.  include "../../audio/openal-soft/buildlink3.mk"
+.  include "../../graphics/MesaLib/buildlink3.mk"
+.  include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.  include "../../www/curl/buildlink3.mk"
+.  include "../../x11/libX11/buildlink3.mk"
+.  include "../../x11/libXi/buildlink3.mk"
+.endif
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/games/classicube/PLIST
diff -u /dev/null pkgsrc/games/classicube/PLIST:1.1
--- /dev/null   Thu May  2 07:33:20 2024
+++ pkgsrc/games/classicube/PLIST       Thu May  2 07:33:19 2024
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.1 2024/05/02 07:33:19 nia Exp $
+bin/classicube
+libexec/ClassiCube
+share/applications/classicube.desktop
+share/pixmaps/classicube.png
Index: pkgsrc/games/classicube/distinfo
diff -u /dev/null pkgsrc/games/classicube/distinfo:1.1
--- /dev/null   Thu May  2 07:33:20 2024
+++ pkgsrc/games/classicube/distinfo    Thu May  2 07:33:19 2024
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1 2024/05/02 07:33:19 nia Exp $
+
+BLAKE2s (ClassiCube-1.3.6.tar.gz) = 395c64236e47abbb255b80e66ff4966b8e336d9ff46fbd522aac1c361ca9e3b6
+SHA512 (ClassiCube-1.3.6.tar.gz) = cc5b7aca6536d2521e48bd75bc5efe0e262bf62c5bc97f5028a28a1236891a9d68678a3bf8c24492742a228f216e5492347d651b98eb63ef9cf389d3f5dcf87d
+Size (ClassiCube-1.3.6.tar.gz) = 2490780 bytes
+SHA1 (patch-Makefile) = ee307475f22df60845d4658cc11f5323631aa823
+SHA1 (patch-src_Audio.c) = 94fceb5c5302115bf92212e703c68b631a6a531f
+SHA1 (patch-src_Http__Worker.c) = 73154e84f95bbfa3f302632f3bb0c4174c7ae0ed
+SHA1 (patch-src_Platform__Posix.c) = 1c20474180aaedbf94d74449711566f158ec8d25

Index: pkgsrc/games/classicube/files/classicube.desktop
diff -u /dev/null pkgsrc/games/classicube/files/classicube.desktop:1.1
--- /dev/null   Thu May  2 07:33:20 2024
+++ pkgsrc/games/classicube/files/classicube.desktop    Thu May  2 07:33:19 2024
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=ClassiCube
+GenericName=Minecraft Classic client
+Comment=Minecraft Classic client
+Icon=classicube
+Exec=classicube
+Terminal=false
+Categories=Game;
Index: pkgsrc/games/classicube/files/classicube.sh
diff -u /dev/null pkgsrc/games/classicube/files/classicube.sh:1.1
--- /dev/null   Thu May  2 07:33:20 2024
+++ pkgsrc/games/classicube/files/classicube.sh Thu May  2 07:33:19 2024
@@ -0,0 +1,7 @@
+#!/bin/sh
+if [ -z "${XDG_DATA_HOME}" ]; then
+       XDG_DATA_HOME="$HOME/.local/share"
+fi
+mkdir -p ${XDG_DATA_HOME}/classicube
+cd ${XDG_DATA_HOME}/classicube && \
+       exec @PREFIX@/libexec/ClassiCube

Index: pkgsrc/games/classicube/patches/patch-Makefile
diff -u /dev/null pkgsrc/games/classicube/patches/patch-Makefile:1.1
--- /dev/null   Thu May  2 07:33:20 2024
+++ pkgsrc/games/classicube/patches/patch-Makefile      Thu May  2 07:33:19 2024
@@ -0,0 +1,94 @@
+$NetBSD: patch-Makefile,v 1.1 2024/05/02 07:33:19 nia Exp $
+
+Honour CFLAGS/LDFLAGS from pkgsrc.
+
+--- Makefile.orig      2024-05-02 07:03:19.920418789 +0000
++++ Makefile
+@@ -3,8 +3,7 @@ C_OBJECTS:=$(patsubst %.c, %.o, $(C_SOUR
+ OBJECTS:=$(C_OBJECTS)
+ ENAME=ClassiCube
+ DEL=rm
+-CFLAGS=-g -pipe -fno-math-errno
+-LDFLAGS=-g -rdynamic
++CFLAGS+= -fno-math-errno
+ 
+ ifndef $(PLAT)
+       ifeq ($(OS),Windows_NT)
+@@ -42,59 +41,43 @@ LIBS=-lX11 -lXi -lpthread -lGL -lm -ldl
+ endif
+ 
+ ifeq ($(PLAT),sunos)
+-CFLAGS=-g -pipe -fno-math-errno
+ LIBS=-lm -lsocket -lX11 -lXi -lGL
+ endif
+ 
+ ifeq ($(PLAT),mac_x32)
+-CFLAGS=-g -m32 -pipe -fno-math-errno
+-LIBS=
+-LDFLAGS=-rdynamic -framework Carbon -framework AGL -framework OpenGL -framework IOKit
++LDFLAGS+=-rdynamic -framework Carbon -framework AGL -framework OpenGL -framework IOKit
+ endif
+ 
+ ifeq ($(PLAT),mac_x64)
+ OBJECTS+=src/interop_cocoa.o
+-CFLAGS=-g -m64 -pipe -fno-math-errno
+ LIBS=
+-LDFLAGS=-rdynamic -framework Cocoa -framework OpenGL -framework IOKit -lobjc
++LDFLAGS+=-rdynamic -framework Cocoa -framework OpenGL -framework IOKit -lobjc
+ endif
+ 
+ ifeq ($(PLAT),freebsd)
+-CFLAGS=-g -pipe -I /usr/local/include -fno-math-errno
+-LDFLAGS=-L /usr/local/lib -rdynamic
+-LIBS=-lexecinfo -lGL -lX11 -lXi -lm -lpthread
++LIBS+=-lexecinfo -lGL -lX11 -lXi -lm -lpthread
+ endif
+ 
+ ifeq ($(PLAT),openbsd)
+-CFLAGS=-g -pipe -I /usr/X11R6/include -I /usr/local/include -fno-math-errno
+-LDFLAGS=-L /usr/X11R6/lib -L /usr/local/lib -rdynamic
+-LIBS=-lexecinfo -lGL -lX11 -lXi -lm -lpthread
++LIBS+=-lexecinfo -lGL -lX11 -lXi -lm -lpthread
+ endif
+ 
+ ifeq ($(PLAT),netbsd)
+-CFLAGS=-g -pipe -I /usr/X11R7/include -I /usr/pkg/include -fno-math-errno
+-LDFLAGS=-L /usr/X11R7/lib -L /usr/pkg/lib -rdynamic
+-LIBS=-lexecinfo -lGL -lX11 -lXi -lpthread
++LIBS+=-lexecinfo -lGL -lX11 -lXi -lpthread
+ endif
+ 
+ ifeq ($(PLAT),dragonfly)
+-CFLAGS=-g -pipe -I /usr/local/include -fno-math-errno
+-LDFLAGS=-L /usr/local/lib -rdynamic
+-LIBS=-lexecinfo -lGL -lX11 -lXi -lm -lpthread
++LIBS+=-lexecinfo -lGL -lX11 -lXi -lm -lpthread
+ endif
+ 
+ ifeq ($(PLAT),haiku)
+ OBJECTS+=src/interop_BeOS.o
+-CFLAGS=-g -pipe -fno-math-errno
+-LDFLAGS=-g
+-LIBS=-lm -lGL -lnetwork -lstdc++ -lbe -lgame -ltracker
++LIBS+=-lm -lGL -lnetwork -lstdc++ -lbe -lgame -ltracker
+ endif
+ 
+ ifeq ($(PLAT),beos)
+ OBJECTS+=src/interop_BeOS.o
+-CFLAGS=-g -pipe
+-LDFLAGS=-g
+-LIBS=-lGL -lnetwork -lstdc++ -lbe -lgame -ltracker
++LIBS+=-lGL -lnetwork -lstdc++ -lbe -lgame -ltracker
+ endif
+ 
+ ifeq ($(PLAT),serenityos)
+@@ -102,8 +85,7 @@ LIBS=-lgl -lSDL2
+ endif
+ 
+ ifeq ($(PLAT),irix)
+-CC=gcc
+-LIBS=-lGL -lX11 -lXi -lm -lpthread -ldl
++LIBS+=-lGL -lX11 -lXi -lm -lpthread -ldl
+ endif
+ 
+ ifeq ($(OS),Windows_NT)
Index: pkgsrc/games/classicube/patches/patch-src_Audio.c
diff -u /dev/null pkgsrc/games/classicube/patches/patch-src_Audio.c:1.1
--- /dev/null   Thu May  2 07:33:20 2024
+++ pkgsrc/games/classicube/patches/patch-src_Audio.c   Thu May  2 07:33:19 2024
@@ -0,0 +1,27 @@
+$NetBSD: patch-src_Audio.c,v 1.1 2024/05/02 07:33:19 nia Exp $
+
+Get rid of hardcoded paths and shlib versions.
+
+--- src/Audio.c.orig   2024-05-02 07:24:35.354685882 +0000
++++ src/Audio.c
+@@ -124,12 +124,8 @@ static const cc_string alLib = String_Fr
+ static const cc_string alLib = String_FromConst("/System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL");
+ #elif defined CC_BUILD_IOS
+ static const cc_string alLib = String_FromConst("/System/Library/Frameworks/OpenAL.framework/OpenAL");
+-#elif defined CC_BUILD_NETBSD
+-static const cc_string alLib = String_FromConst("/usr/pkg/lib/libopenal.so");
+-#elif defined CC_BUILD_BSD
+-static const cc_string alLib = String_FromConst("libopenal.so");
+ #else
+-static const cc_string alLib = String_FromConst("libopenal.so.1");
++static const cc_string alLib = String_FromConst("libopenal.so");
+ #endif
+ 
+ static cc_bool LoadALFuncs(void) {
+@@ -1523,4 +1519,4 @@ static void OnFree(void) {
+ struct IGameComponent Audio_Component = {
+       OnInit, /* Init  */
+       OnFree  /* Free  */
+-};
+\ No newline at end of file
++};
Index: pkgsrc/games/classicube/patches/patch-src_Http__Worker.c
diff -u /dev/null pkgsrc/games/classicube/patches/patch-src_Http__Worker.c:1.1
--- /dev/null   Thu May  2 07:33:20 2024
+++ pkgsrc/games/classicube/patches/patch-src_Http__Worker.c    Thu May  2 07:33:19 2024
@@ -0,0 +1,33 @@
+$NetBSD: patch-src_Http__Worker.c,v 1.1 2024/05/02 07:33:19 nia Exp $
+
+Get rid of hardcoded paths and shlib versions.
+
+--- src/Http_Worker.c.orig     2024-05-02 07:25:05.547759016 +0000
++++ src/Http_Worker.c
+@@ -259,18 +259,9 @@ static const cc_string curlAlt = String_
+ #elif defined CC_BUILD_DARWIN
+ static const cc_string curlLib = String_FromConst("libcurl.4.dylib");
+ static const cc_string curlAlt = String_FromConst("libcurl.dylib");
+-#elif defined CC_BUILD_NETBSD
+-static const cc_string curlLib = String_FromConst("libcurl.so");
+-static const cc_string curlAlt = String_FromConst("/usr/pkg/lib/libcurl.so");
+-#elif defined CC_BUILD_BSD
++#else
+ static const cc_string curlLib = String_FromConst("libcurl.so");
+ static const cc_string curlAlt = String_FromConst("libcurl.so");
+-#elif defined CC_BUILD_SERENITY
+-static const cc_string curlLib = String_FromConst("/usr/local/lib/libcurl.so");
+-static const cc_string curlAlt = String_FromConst("/usr/local/lib/libcurl.so");
+-#else
+-static const cc_string curlLib = String_FromConst("libcurl.so.4");
+-static const cc_string curlAlt = String_FromConst("libcurl.so.3");
+ #endif
+ 
+ static cc_bool LoadCurlFuncs(void) {
+@@ -1525,4 +1516,4 @@ static void Http_Init(void) {
+ 
+       Thread_Start2(workerThread, WorkerLoop);
+ }
+-#endif
+\ No newline at end of file
++#endif
Index: pkgsrc/games/classicube/patches/patch-src_Platform__Posix.c
diff -u /dev/null pkgsrc/games/classicube/patches/patch-src_Platform__Posix.c:1.1
--- /dev/null   Thu May  2 07:33:20 2024
+++ pkgsrc/games/classicube/patches/patch-src_Platform__Posix.c Thu May  2 07:33:20 2024
@@ -0,0 +1,37 @@
+$NetBSD: patch-src_Platform__Posix.c,v 1.1 2024/05/02 07:33:20 nia Exp $
+
+Get rid of hardcoded paths.
+
+--- src/Platform_Posix.c.orig  2024-05-02 07:23:04.808912388 +0000
++++ src/Platform_Posix.c
+@@ -478,15 +478,13 @@ void Platform_LoadSysFonts(void) { 
+       };
+ #elif defined CC_BUILD_NETBSD
+       static const cc_string dirs[] = {
+-              String_FromConst("/usr/X11R7/lib/X11/fonts"),
+-              String_FromConst("/usr/pkg/lib/X11/fonts"),
+-              String_FromConst("/usr/pkg/share/fonts")
++              String_FromConst("@X11BASE@/lib/X11/fonts"),
++              String_FromConst("@PREFIX@/share/fonts")
+       };
+ #elif defined CC_BUILD_OPENBSD
+       static const cc_string dirs[] = {
+-              String_FromConst("/usr/X11R6/lib/X11/fonts"),
+-              String_FromConst("/usr/share/fonts"),
+-              String_FromConst("/usr/local/share/fonts")
++              String_FromConst("@X11BASE@/lib/X11/fonts"),
++              String_FromConst("@PREFIX@/share/fonts"),
+       };
+ #elif defined CC_BUILD_HAIKU
+       static const cc_string dirs[] = {
+@@ -507,8 +505,8 @@ void Platform_LoadSysFonts(void) { 
+       };
+ #else
+       static const cc_string dirs[] = {
+-              String_FromConst("/usr/share/fonts"),
+-              String_FromConst("/usr/local/share/fonts")
++              String_FromConst("@X11BASE@/lib/X11/fonts"),
++              String_FromConst("@PREFIX@/share/fonts"),
+       };
+ #endif
+       for (i = 0; i < Array_Elems(dirs); i++) {



Home | Main Index | Thread Index | Old Index