Add rubix port.

Rubix is another X11-based incarnation of the world-famous
"Rubik's Cube" game. It has the capability of saving games,
which, according to the author, can't be found in any other
Rubik's Cube games.

PR:		15807
Submitted by:	Will Andrews <andrews@technologist.com>
This commit is contained in:
Chris Piazza 2000-01-03 20:17:40 +00:00
parent f7097243b5
commit deeae26872
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=24394
10 changed files with 163 additions and 0 deletions

View file

@ -107,6 +107,7 @@
SUBDIR += quakeserver
SUBDIR += rocksndiamonds
SUBDIR += rollemup
SUBDIR += rubix
SUBDIR += seabattle
SUBDIR += seahaven
SUBDIR += sl

32
games/rubix/Makefile Normal file
View file

@ -0,0 +1,32 @@
# New ports collection makefile for: rubix
# Version required: 1.0.1
# Date created: 19 Nov 1999
# Whom: Will Andrews <andrews@technologist.com>
#
# $FreeBSD$
#
DISTNAME= rubix-1.0.1
CATEGORIES= games
MASTER_SITES= http://sed.free.fr/rubix/
MAINTAINER= andrews@technologist.com
USE_GMAKE= yes
MAKE_ENV= GMAKE=${GMAKE}
USE_X_PREFIX= yes
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/rubix ${PREFIX}/bin
@${MKDIR} ${PREFIX}/share/rubix
@${INSTALL_DATA} ${WRKSRC}/module.xm ${PREFIX}/share/rubix
.if !defined(NOPORTDOCS)
.for DOC in AUTHORS BUGS INSTALL NOISE README TODO
@${INSTALL_DATA} ${WRKSRC}/${DOC} ${PREFIX}/share/rubix
.endfor
@${ECHO}
@${ECHO} "Docs are installed in ${PREFIX}/share/rubix."
@${ECHO}
.endif
.include <bsd.port.mk>

1
games/rubix/distinfo Normal file
View file

@ -0,0 +1 @@
MD5 (rubix-1.0.1.tar.gz) = 665aec4bfaddbc98732c2963dc4d4a56

View file

@ -0,0 +1,49 @@
--- Makefile.orig Mon Dec 6 07:19:16 1999
+++ Makefile Sun Jan 2 13:07:30 2000
@@ -11,35 +11,38 @@
#
#customize to fit your needs (it does not work for now).
-architecture=-DPC_ARCHI
+#architecture=-DPC_ARCHI
+module_file=-DMODULE_FILE_PREFIX=\"$(PREFIX)/share/rubix/\"
#SOLARIS=-lsocket
-CC=gcc
-CFLAGS=-Wall -O3 -fomit-frame-pointer -ffast-math -Iplayer \
- $(architecture)
+CC?=gcc
+CFLAGS+=-Wall -fomit-frame-pointer -ffast-math -Iplayer \
+ $(architecture) $(module_file)
#CFLAGS=-Wall -g -ffast-math -Iplayer \
# $(architecture)
-XINC=-I/usr/X11R6/include
-XLIB=-L/usr/X11R6/lib -lX11
+XINC=-I$(PREFIX)/include
+XLIB=-L$(PREFIX)/lib -lX11
#the following should not be changed.
OBJ=cube.o event.o fillpoly.o line.o main.o screen.o sound.o player/player.a
+all: rubix
+
rubix : $(OBJ)
$(CC) $(CFLAGS) -o $@ $^ -lm $(XLIB) $(SOLARIS)
# strip rubix
clean :
rm -f *.o *~ core *.bak *.dat gmon.out
- (cd player; make clean)
+ (cd player; $(GMAKE) clean)
dep :
makedepend -Y *.c -s"#I like the GNU tools" -Iplayer
player/player.a : player/*.c player/*.h
- (cd player; make)
+ (cd player; $(GMAKE))
%.o : %.c
$(CC) $(CFLAGS) $(XINC) -c -o $@ $<

View file

@ -0,0 +1,10 @@
--- event.c Thu Dec 2 12:50:06 1999
+++ event.c.new Mon Dec 6 16:44:01 1999
@@ -18,6 +18,7 @@
#include <errno.h>
#include <stdio.h>
#include <X11/Xlib.h>
+#include <string.h>
#include "sound.h"
#include "screen.h"

View file

@ -0,0 +1,17 @@
--- player/Makefile.orig Thu Dec 2 09:35:44 1999
+++ player/Makefile Sun Jan 2 13:08:58 2000
@@ -4,10 +4,11 @@
# * This is total free software.
# */
-WITH_ASM=1
+#WITH_ASM=1
-CC=gcc
-CFLAGS=-Wall -O3 -fomit-frame-pointer -ffast-math
+CC?=gcc
+INCS=-I$(PREFIX)/include
+CFLAGS+=-Wall -fomit-frame-pointer -ffast-math $(INCS)
OBJ=card.o mixer.o xm.o live_player.o wav.o

View file

@ -0,0 +1,33 @@
--- main.c Thu Dec 2 19:00:49 1999
+++ main.c.new Wed Dec 22 21:13:11 1999
@@ -22,6 +22,10 @@
#include "event.h"
#include "device.h"
+#ifndef MODULE_FILE_PREFIX
+#define MODULE_FILE_PREFIX "\"/usr/X11R6/share/rubix/\""
+#endif
+
char *the_screen;
device d;
@@ -32,6 +36,10 @@
CUBE cube;
int i;
int rand=1;
+ char full_module_file[4096];
+ char *module_file = "module.xm";
+ strcpy(full_module_file, MODULE_FILE_PREFIX);
+ strcat(full_module_file, module_file);
the_screen=&screen.buffer[0];
d.buffer=screen.buffer;
@@ -68,7 +76,7 @@
return -1;
}
- if (rubick_init_sound(&sound, "module.xm")==-1) {
+ if (rubick_init_sound(&sound, full_module_file)==1) {
fprintf(stderr, "Error with initing the sound, sorry pal, no sound no game.\n(I fucked my head with"
" an xm player, this is not for nothing !)\n");
return 0;

1
games/rubix/pkg-comment Normal file
View file

@ -0,0 +1 @@
Another rubik's cube game with a rather interesting interface

10
games/rubix/pkg-descr Normal file
View file

@ -0,0 +1,10 @@
Rubix is another X11-based incarnation of the world-famous
"Rubik's Cube" game. It has the capability of saving games,
which, according to the author, can't be found in any other
Rubik's Cube games.
WWW: http://sed.free.fr/rubix/
Author: sed <sed_sed@my-dejanews.com>
--Will <andrews@technologist.com>

9
games/rubix/pkg-plist Normal file
View file

@ -0,0 +1,9 @@
bin/rubix
share/rubix/module.xm
share/rubix/AUTHORS
share/rubix/BUGS
share/rubix/INSTALL
share/rubix/NOISE
share/rubix/README
share/rubix/TODO
@dirrm share/rubix