mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-27 10:03:20 +00:00
Update port:
- Fixes build on 5.x with XMMS support enabled; - Fixes path where to look for XMMS binary; - Allows fuhquake to be run from any directory per kris' suggestion; - Adds WITH_SHAREWARE_DATA knob. Coupled with previous, this makes fuhquake playable right after install, yet allows it to be distributed on CDROM (since shareware data cannot be included, one must explicitly define this knob); - Properly utilizes EXTRACT_ONLY in Makefile and DOCSDIR in pkg-plist; - Removes EXTRACT_BEFORE_ARGS from Makefile since it's no longer needed; - Tells user about WITHOUT_XMMS knob, when XMMS bits are found; - Fixes palette problems on 24-bit depth with x11-renderer; - Fixes DGA mouse behavior on higher mouse rates when GLX-rendered. Submitted by: Alexey Dokuchaev <danfe@regency.nsu.ru> PR: 56085
This commit is contained in:
parent
05d67c5d60
commit
aaba25b6be
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=88267
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= fuhquake
|
||||
PORTVERSION= 0.28
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= games
|
||||
MASTER_SITES= http://www.fuhquake.net/files/source/:src \
|
||||
http://www.fuhquake.net/files/releases/:dat \
|
||||
@ -14,7 +15,16 @@ MASTER_SITES= http://www.fuhquake.net/files/source/:src \
|
||||
DISTNAME= ${PORTNAME}-source-v${PORTVERSION}
|
||||
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:src \
|
||||
${PORTNAME}-linux-v${PORTVERSION}${EXTRACT_SUFX}:dat \
|
||||
pak0.pak${EXTRACT_SUFX}:pak
|
||||
pak0.pak:pak
|
||||
.if defined(WITH_SHAREWARE_DATA)
|
||||
DISTFILES+= q1-shareware-pak0.pak:pak
|
||||
PLIST_SUB+= SHAREWARE=""
|
||||
.else
|
||||
PLIST_SUB+= SHAREWARE="@comment "
|
||||
.endif
|
||||
|
||||
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} \
|
||||
${PORTNAME}-linux-v${PORTVERSION}${EXTRACT_SUFX}
|
||||
|
||||
MAINTAINER= danfe@regency.nsu.ru
|
||||
COMMENT= An excellent QuakeWorld client
|
||||
@ -72,6 +82,12 @@ pre-everything::
|
||||
.if !defined(WITHOUT_GLX)
|
||||
@${ECHO_MSG} "Define WITHOUT_GLX to disable building of GLX client"
|
||||
.endif
|
||||
.if defined(WITH_SHAREWARE_DATA)
|
||||
@${ECHO_MSG} "Define WITH_SHAREWARE_DATA to install demo version game data"
|
||||
.endif
|
||||
.if !defined(WITHOUT_XMMS) && exists(${X11BASE}/lib/libxmms.so.3)
|
||||
@${ECHO_MSG} "Define WITHOUT_XMMS to build without \`\`MP3 Player'' feature"
|
||||
.endif
|
||||
.if !defined(WITH_OPTIMIZED_CFLAGS)
|
||||
@${ECHO_MSG} "Define WITH_OPTIMIZED_CFLAGS to enable extra optimization options"
|
||||
.endif
|
||||
@ -80,14 +96,17 @@ pre-everything::
|
||||
.endif
|
||||
|
||||
MAKEFILE= ${FILESDIR}/Makefile
|
||||
USE_REINPLACE= yes
|
||||
USE_ZIP= yes
|
||||
EXTRACT_BEFORE_ARGS+= -qo
|
||||
WRKSRC= ${WRKDIR}/source
|
||||
|
||||
post-extract:
|
||||
@${FIND} -E ${WRKDIR} -type f -iregex ".*\.(c|h|s|txt)" -exec ${FILESDIR}/fix^m.sh '{}' \;
|
||||
@${CP} ${FILESDIR}/*.c ${WRKSRC}
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|%%%%BASEDIR%%%%|${DATADIR}|' ${WRKSRC}/common.c
|
||||
|
||||
do-build:
|
||||
.if !defined(WITHOUT_X11)
|
||||
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} clean x11)
|
||||
@ -105,11 +124,15 @@ do-install:
|
||||
.for tgt in ${END_TARGETS}
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/${tgt} ${PREFIX}/bin
|
||||
.endfor
|
||||
@${MKDIR} ${DATADIR}/qw
|
||||
@${MKDIR} ${DATADIR}/${PORTNAME}
|
||||
@${MKDIR} ${DATADIR}/qw ${DATADIR}/${PORTNAME}
|
||||
${INSTALL_DATA} ${WRKDIR}/qw/qwprogs.dat ${DATADIR}/qw
|
||||
${INSTALL_DATA} ${WRKDIR}/qw/spprogs.dat ${DATADIR}/qw
|
||||
${INSTALL_DATA} ${WRKDIR}/pak0.pak ${DATADIR}/${PORTNAME}
|
||||
${INSTALL_DATA} ${DISTDIR}/pak0.pak ${DATADIR}/${PORTNAME}
|
||||
.if defined(WITH_SHAREWARE_DATA)
|
||||
@${MKDIR} ${DATADIR}/id1
|
||||
${INSTALL_DATA} ${DISTDIR}/q1-shareware-pak0.pak \
|
||||
${DATADIR}/id1/pak0.pak
|
||||
.endif
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
. for txt in benchmark config_manager crosshairs linux logitech mp3 \
|
||||
@ -120,6 +143,6 @@ do-install:
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
@${SED} -e 's#$${PREFIX}#${PREFIX}#g' ${PKGMESSAGE}
|
||||
@${SED} -e 's|$${PREFIX}|${PREFIX}|g' ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,3 +1,4 @@
|
||||
MD5 (fuhquake-source-v0.28.zip) = 7e77a97a1e1524b289ffa6978ce5377e
|
||||
MD5 (fuhquake-linux-v0.28.zip) = 72e99f8df1baab11e0492b7cee93fdd3
|
||||
MD5 (pak0.pak.zip) = eaedb54f2f0fabb1b621afb831185748
|
||||
MD5 (pak0.pak) = 2fa37c49cb1d3902d97cb82a1c96115a
|
||||
MD5 (q1-shareware-pak0.pak) = 5906e5998fc3d896ddaf5e6a62e03abb
|
||||
|
11
games/fuhquake/files/patch-common.c
Normal file
11
games/fuhquake/files/patch-common.c
Normal file
@ -0,0 +1,11 @@
|
||||
--- common.c.orig Thu Aug 28 18:15:40 2003
|
||||
+++ common.c Thu Aug 28 18:16:04 2003
|
||||
@@ -1512,7 +1512,7 @@
|
||||
if ((i = COM_CheckParm ("-basedir")) && i < com_argc - 1)
|
||||
Q_strncpyz (com_basedir, com_argv[i + 1], sizeof(com_basedir));
|
||||
else
|
||||
- strcpy (com_basedir, ".");
|
||||
+ strcpy (com_basedir, "%%%%BASEDIR%%%%");
|
||||
|
||||
for (i = 0; i < strlen(com_basedir); i++)
|
||||
if (com_basedir[i] == '\\')
|
@ -1,13 +1,26 @@
|
||||
--- mp3_player.c.orig Wed May 21 17:18:36 2003
|
||||
+++ mp3_player.c Wed May 21 17:21:23 2003
|
||||
@@ -48,6 +48,7 @@
|
||||
--- mp3_player.c.orig Mon Sep 1 18:18:40 2003
|
||||
+++ mp3_player.c Mon Sep 1 18:20:09 2003
|
||||
@@ -48,9 +48,10 @@
|
||||
|
||||
#ifdef __XMMS__
|
||||
|
||||
+#include <sys/signal.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
cvar_t mp3_dir = {"mp3_xmms_dir", "/usr/local/bin"};
|
||||
-cvar_t mp3_dir = {"mp3_xmms_dir", "/usr/local/bin"};
|
||||
+cvar_t mp3_dir = {"mp3_xmms_dir", "/usr/X11R6/bin"};
|
||||
cvar_t mp3_xmms_session = {"mp3_xmms_session", "0"};
|
||||
|
||||
#endif
|
||||
@@ -288,7 +289,7 @@
|
||||
#define XMMS_COMMAND(Name, Param) \
|
||||
void MP3_##Name##_f(void) { \
|
||||
if (MP3_IsPlayerRunning()) { \
|
||||
- xmms_remote_##Param##(XMMS_SESSION); \
|
||||
+ xmms_remote_##Param(XMMS_SESSION); \
|
||||
} else { \
|
||||
Com_Printf("%s\n", mp3_notrunning_msg); \
|
||||
} \
|
||||
@@ -769,7 +770,7 @@
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- vid_glx.c.orig Wed May 21 17:18:37 2003
|
||||
+++ vid_glx.c Mon Jun 2 20:04:34 2003
|
||||
--- vid_glx.c.orig Thu Aug 28 18:08:22 2003
|
||||
+++ vid_glx.c Thu Aug 28 18:08:03 2003
|
||||
@@ -20,7 +20,9 @@
|
||||
#include <termios.h>
|
||||
#include <sys/ioctl.h>
|
||||
@ -10,6 +10,17 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
@@ -284,8 +286,8 @@
|
||||
case MotionNotify:
|
||||
#ifdef WITH_DGA
|
||||
if (dgamouse && _windowed_mouse.value) {
|
||||
- mouse_x = event.xmotion.x_root;
|
||||
- mouse_y = event.xmotion.y_root;
|
||||
+ mouse_x += event.xmotion.x_root;
|
||||
+ mouse_y += event.xmotion.y_root;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
@@ -601,8 +603,9 @@
|
||||
#ifdef WITH_VMODE
|
||||
// fullscreen
|
||||
|
131
games/fuhquake/files/patch-vid_x11.c
Normal file
131
games/fuhquake/files/patch-vid_x11.c
Normal file
@ -0,0 +1,131 @@
|
||||
--- vid_x11.c.orig Mon Aug 25 21:01:40 2003
|
||||
+++ vid_x11.c Mon Aug 25 21:10:09 2003
|
||||
@@ -21,7 +21,8 @@
|
||||
|
||||
#define _BSD
|
||||
|
||||
-typedef unsigned short PIXEL;
|
||||
+typedef unsigned short PIXEL16;
|
||||
+typedef unsigned PIXEL24;
|
||||
|
||||
#include <ctype.h>
|
||||
#include <sys/time.h>
|
||||
@@ -111,7 +112,8 @@
|
||||
void (*vid_menukeyfn)(int key);
|
||||
void VID_MenuKey (int key);
|
||||
|
||||
-static PIXEL st2d_8to16table[256];
|
||||
+static PIXEL16 st2d_8to16table[256];
|
||||
+static PIXEL24 st2d_8to24table[256];
|
||||
static int shiftmask_fl=0;
|
||||
static long r_shift,g_shift,b_shift;
|
||||
static unsigned long r_mask,g_mask,b_mask;
|
||||
@@ -132,8 +134,42 @@
|
||||
shiftmask_fl = 1;
|
||||
}
|
||||
|
||||
-PIXEL xlib_rgb(int r,int g,int b) {
|
||||
- PIXEL p;
|
||||
+PIXEL16 xlib_rgb16(int r,int g,int b) {
|
||||
+ PIXEL16 p;
|
||||
+
|
||||
+ if (shiftmask_fl == 0)
|
||||
+ shiftmask_init();
|
||||
+ p = 0;
|
||||
+
|
||||
+ if (r_shift > 0) {
|
||||
+ p = (r << (r_shift)) &r_mask;
|
||||
+ } else if(r_shift<0) {
|
||||
+ p = (r >> (-r_shift)) &r_mask;
|
||||
+ } else {
|
||||
+ p |= (r & r_mask);
|
||||
+ }
|
||||
+
|
||||
+ if(g_shift>0) {
|
||||
+ p |= (g << (g_shift)) &g_mask;
|
||||
+ } else if(g_shift<0) {
|
||||
+ p |= (g >> (-g_shift)) &g_mask;
|
||||
+ } else {
|
||||
+ p|=(g & g_mask);
|
||||
+ }
|
||||
+
|
||||
+ if(b_shift > 0) {
|
||||
+ p |= (b << (b_shift)) &b_mask;
|
||||
+ } else if (b_shift < 0) {
|
||||
+ p |= (b >> (-b_shift)) &b_mask;
|
||||
+ } else {
|
||||
+ p|=(b & b_mask);
|
||||
+ }
|
||||
+
|
||||
+ return p;
|
||||
+}
|
||||
+
|
||||
+PIXEL24 xlib_rgb24(int r,int g,int b) {
|
||||
+ PIXEL24 p;
|
||||
|
||||
if (shiftmask_fl == 0)
|
||||
shiftmask_init();
|
||||
@@ -169,20 +205,37 @@
|
||||
void st2_fixup( XImage *framebuf, int x, int y, int width, int height) {
|
||||
int xi,yi;
|
||||
unsigned char *src;
|
||||
- PIXEL *dest;
|
||||
+ PIXEL16 *dest;
|
||||
|
||||
if(x < 0 || y < 0)
|
||||
return;
|
||||
|
||||
for (yi = y; yi < y + height; yi++) {
|
||||
src = &framebuf->data [yi * framebuf->bytes_per_line];
|
||||
- dest = (PIXEL*)src;
|
||||
+ dest = (PIXEL16 *)src;
|
||||
for(xi = (x + width - 1); xi >= x; xi--) {
|
||||
dest[xi] = st2d_8to16table[src[xi]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+void st3_fixup( XImage *framebuf, int x, int y, int width, int height) {
|
||||
+ int xi,yi;
|
||||
+ unsigned char *src;
|
||||
+ PIXEL24 *dest;
|
||||
+
|
||||
+ if(x < 0 || y < 0)
|
||||
+ return;
|
||||
+
|
||||
+ for (yi = y; yi < y + height; yi++) {
|
||||
+ src = &framebuf->data [yi * framebuf->bytes_per_line];
|
||||
+ dest = (PIXEL24 *)src;
|
||||
+ for(xi = (x + width - 1); xi >= x; xi--) {
|
||||
+ dest[xi] = st2d_8to24table[src[xi]];
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
// ========================================================================
|
||||
// Tragic death handler
|
||||
// ========================================================================
|
||||
@@ -564,8 +617,10 @@
|
||||
int i;
|
||||
XColor colors[256];
|
||||
|
||||
- for (i = 0; i < 256; i++)
|
||||
- st2d_8to16table[i]= xlib_rgb(palette[i * 3], palette[i * 3 + 1], palette[i * 3 + 2]);
|
||||
+ for (i = 0; i < 256; i++) {
|
||||
+ st2d_8to24table[i]= xlib_rgb24(palette[i * 3], palette[i * 3 + 1], palette[i * 3 + 2]);
|
||||
+ st2d_8to16table[i]= xlib_rgb16(palette[i * 3], palette[i * 3 + 1], palette[i * 3 + 2]);
|
||||
+ }
|
||||
|
||||
if (x_visinfo->class == PseudoColor && x_visinfo->depth == 8) {
|
||||
if (palette != current_palette)
|
||||
@@ -821,7 +876,9 @@
|
||||
|
||||
if (doShm) {
|
||||
while (rects){
|
||||
- if (x_visinfo->depth != 8)
|
||||
+ if (x_visinfo->depth == 24)
|
||||
+ st3_fixup( x_framebuffer[current_framebuffer], rects->x, rects->y, rects->width, rects->height);
|
||||
+ else if (x_visinfo->depth == 16)
|
||||
st2_fixup( x_framebuffer[current_framebuffer], rects->x, rects->y, rects->width, rects->height);
|
||||
if (!XShmPutImage(x_disp, x_win, x_gc,
|
||||
x_framebuffer[current_framebuffer], rects->x, rects->y, rects->x, rects->y, rects->width, rects->height, True))
|
@ -1,6 +1,15 @@
|
||||
================================================
|
||||
|
||||
Install models, skins, maps, and mods in
|
||||
${PREFIX}/share/fuhquake/
|
||||
${DATADIR}/ directory.
|
||||
|
||||
You must also have registered version of
|
||||
Quake per to be able to legally copy the
|
||||
PAK files (pak*.pak) from id1/ directory
|
||||
to ${DATADIR}/id1/ from CDROM or Windows
|
||||
installation. In case it is not an opt-
|
||||
ion, you can rebuild the port with "make
|
||||
-DWITH_SHAREWARE_DATA", and thus install
|
||||
demo version (shareware) data files.
|
||||
|
||||
================================================
|
||||
|
@ -1,21 +1,23 @@
|
||||
%%X11%%bin/fuhquake-x11
|
||||
%%GLX%%bin/fuhquake-glx
|
||||
%%SVGA%%bin/fuhquake-svga
|
||||
%%PORTDOCS%%share/doc/fuhquake/benchmark.txt
|
||||
%%PORTDOCS%%share/doc/fuhquake/config_manager.txt
|
||||
%%PORTDOCS%%share/doc/fuhquake/crosshairs.txt
|
||||
%%PORTDOCS%%share/doc/fuhquake/fuhquake.txt
|
||||
%%PORTDOCS%%share/doc/fuhquake/linux.txt
|
||||
%%PORTDOCS%%share/doc/fuhquake/logitech.txt
|
||||
%%PORTDOCS%%share/doc/fuhquake/mp3.txt
|
||||
%%PORTDOCS%%share/doc/fuhquake/particles.txt
|
||||
%%PORTDOCS%%share/doc/fuhquake/pointing.txt
|
||||
%%PORTDOCS%%share/doc/fuhquake/rulesets.txt
|
||||
%%PORTDOCS%%share/doc/fuhquake/track.txt
|
||||
%%PORTDOCS%%@dirrm share/doc/fuhquake
|
||||
%%PORTDOCS%%%%DOCSDIR%%/benchmark.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/config_manager.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/crosshairs.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/fuhquake.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/linux.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/logitech.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/mp3.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/particles.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/pointing.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/rulesets.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/track.txt
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
share/fuhquake/fuhquake/pak0.pak
|
||||
%%SHAREWARE%%share/fuhquake/id1/pak0.pak
|
||||
share/fuhquake/qw/qwprogs.dat
|
||||
share/fuhquake/qw/spprogs.dat
|
||||
@dirrm share/fuhquake/qw
|
||||
%%SHAREWARE%%@dirrm share/fuhquake/id1
|
||||
@dirrm share/fuhquake/fuhquake
|
||||
@dirrm share/fuhquake
|
||||
|
Loading…
Reference in New Issue
Block a user