aboutsummaryrefslogtreecommitdiff
path: root/games/r1q2
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2014-07-08 08:14:51 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2014-07-08 08:14:51 +0000
commit412b0876b93ad05976a2cab2813c4c26cead3322 (patch)
tree10bf5c8cb1a84b4e594621b83148296052114061 /games/r1q2
parentc35ee1d714e59a232d8b1f1b31a87e0a4c528ef0 (diff)
Notes
Diffstat (limited to 'games/r1q2')
-rw-r--r--games/r1q2/Makefile43
-rw-r--r--games/r1q2/distinfo4
-rw-r--r--games/r1q2/files/patch-ref_gl__gl_image.c15
-rw-r--r--games/r1q2/pkg-descr2
4 files changed, 36 insertions, 28 deletions
diff --git a/games/r1q2/Makefile b/games/r1q2/Makefile
index 454bc76edf65..09d39f2a7f1c 100644
--- a/games/r1q2/Makefile
+++ b/games/r1q2/Makefile
@@ -2,16 +2,17 @@
# $FreeBSD$
PORTNAME= r1q2
-PORTVERSION= 7904
-PORTREVISION= 5
+PORTVERSION= 8012
CATEGORIES= games
-MASTER_SITES= http://www.r1ch.net/stuff/r1q2/src/
+MASTER_SITES= http://old.r1ch.net/stuff/r1q2/src/
DISTNAME= ${PORTNAME}-b${PORTVERSION}-src
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= danfe@FreeBSD.org
COMMENT= Enhanced Quake II client/server focusing on stability
-LIB_DEPENDS= execinfo:${PORTSDIR}/devel/libexecinfo
+.if !exists(/usr/include/execinfo.h)
+LIB_DEPENDS= libexecinfo.so:${PORTSDIR}/devel/libexecinfo
+.endif
ONLY_FOR_ARCHS= i386 amd64
ONLY_FOR_ARCHS_REASON= sets the FPU rounding mode and precision (not available in fenv.h)
@@ -23,19 +24,19 @@ ALL_TARGET= #
LIBDIR= ${PREFIX}/lib/${PORTNAME}
MAKE_ENV= LIBDIR="${LIBDIR}" PTHREAD_LIBS="${PTHREAD_LIBS}"
-PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}"
+PLIST_SUB= LIBDIR="${LIBDIR:S|${PREFIX}/||}"
OPTIONS_DEFINE= GAME REF_GL DOCS
OPTIONS_MULTI= FLAVOR
OPTIONS_MULTI_FLAVOR= CLIENT DEDICATED
OPTIONS_DEFAULT= CLIENT DEDICATED REF_GL
+FLAVOR_DESC= Clients and servers
CLIENT_DESC= Build client
DEDICATED_DESC= Build dedicated server
GAME_DESC= Build main game (default mod)
REF_GL_DESC= Build renderer (required for client)
-NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MCLIENT}
@@ -62,8 +63,8 @@ PLIST_SUB+= GAME="@comment "
.if ${PORT_OPTIONS:MREF_GL}
USE_GL= gl
USE_SDL= sdl
-LIB_DEPENDS+= jpeg:${PORTSDIR}/graphics/jpeg \
- png15:${PORTSDIR}/graphics/png
+LIB_DEPENDS+= libjpeg.so:${PORTSDIR}/graphics/jpeg \
+ libpng15.so:${PORTSDIR}/graphics/png
ALL_TARGET+= ref_gl
CFLAGS+= -I${LOCALBASE}/include/libpng15
PLIST_SUB+= REF_GL=""
@@ -71,10 +72,6 @@ PLIST_SUB+= REF_GL=""
PLIST_SUB+= REF_GL="@comment "
.endif
-.if ${ARCH} == "sparc64"
-BROKEN= Does not compile on sparc64
-.endif
-
post-patch:
@${REINPLACE_CMD} -e 's|game$$(ARCH)|game|g' \
${BUILD_WRKSRC}/game/Makefile
@@ -85,22 +82,24 @@ pre-build:
do-install:
.if ${PORT_OPTIONS:MCLIENT}
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/client/quake2 \
- ${PREFIX}/bin/${PORTNAME}
+ ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
.endif
.if ${PORT_OPTIONS:MDEDICATED}
- ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/r1q2ded/r1q2ded ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/r1q2ded/r1q2ded \
+ ${STAGEDIR}${PREFIX}/bin
.endif
- @${MKDIR} ${LIBDIR}/baseq2
+ @${MKDIR} ${STAGEDIR}${LIBDIR}/baseq2
.if ${PORT_OPTIONS:MGAME}
- ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/game/game.so ${LIBDIR}/baseq2
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/game/game.so \
+ ${STAGEDIR}${LIBDIR}/baseq2
.endif
.if ${PORT_OPTIONS:MREF_GL}
- ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/ref_gl/ref_gl.so ${LIBDIR}
-.endif
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/r1q2.txt ${WRKSRC}/readme.txt ${DOCSDIR}
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/ref_gl/ref_gl.so \
+ ${STAGEDIR}${LIBDIR}
.endif
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/r1q2.txt ${WRKSRC}/readme.txt \
+ ${STAGEDIR}${DOCSDIR}
.include "${.CURDIR}/../quake2-data/Makefile.include"
.include <bsd.port.mk>
diff --git a/games/r1q2/distinfo b/games/r1q2/distinfo
index 520174a673e8..f1c40121d38e 100644
--- a/games/r1q2/distinfo
+++ b/games/r1q2/distinfo
@@ -1,2 +1,2 @@
-SHA256 (r1q2-b7904-src.zip) = 2ffd2c1e84d6f4b1b32ea815458e3be17b0bbc1deae4bc64cfe389ec7a35f537
-SIZE (r1q2-b7904-src.zip) = 1137003
+SHA256 (r1q2-b8012-src.zip) = c0e6a6bda8f883e75eb0548e235a5a96bbd3ce3502a886114871650fcbc2bc78
+SIZE (r1q2-b8012-src.zip) = 1127946
diff --git a/games/r1q2/files/patch-ref_gl__gl_image.c b/games/r1q2/files/patch-ref_gl__gl_image.c
index 7ce3e30e3899..196dc0cabfc0 100644
--- a/games/r1q2/files/patch-ref_gl__gl_image.c
+++ b/games/r1q2/files/patch-ref_gl__gl_image.c
@@ -1,6 +1,6 @@
--- ref_gl/gl_image.c.orig 2012-04-29 06:56:19.000000000 +0200
+++ ref_gl/gl_image.c 2012-04-29 06:56:40.000000000 +0200
-@@ -20,6 +20,7 @@
+@@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suit
#include "gl_local.h"
#include <png.h>
@@ -8,7 +8,16 @@
#include <jpeglib.h>
image_t gltextures[MAX_GLTEXTURES];
-@@ -1520,7 +1521,7 @@
+@@ -739,7 +740,7 @@ void LoadPNG (const char *name, byte **p
+ png_set_filler(png_ptr, 0xFF, PNG_FILLER_AFTER);
+
+ if ((info_ptr->color_type == PNG_COLOR_TYPE_GRAY) && info_ptr->bit_depth < 8)
+- png_set_gray_1_2_4_to_8(png_ptr);
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
+
+ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
+ png_set_tRNS_to_alpha(png_ptr);
+@@ -1520,7 +1521,7 @@ void EXPORT jpg_skip_input_data(j_decomp
cinfo->src->bytes_in_buffer -= (size_t) num_bytes;
}
@@ -17,7 +26,7 @@
{
cinfo->src = (struct jpeg_source_mgr *)(*cinfo->mem->alloc_small)((j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof(struct jpeg_source_mgr));
cinfo->src->init_source = jpg_null;
-@@ -1561,7 +1562,7 @@
+@@ -1561,7 +1562,7 @@ void LoadJPG (const char *filename, byte
cinfo.err = jpeg_std_error(&jerr);
jpeg_create_decompress(&cinfo);
diff --git a/games/r1q2/pkg-descr b/games/r1q2/pkg-descr
index 8165793bc567..d293d01372fe 100644
--- a/games/r1q2/pkg-descr
+++ b/games/r1q2/pkg-descr
@@ -3,4 +3,4 @@ source, rather than concentrate on fancy graphics, embedded MP3 players and
other "gimmick" features, R1Q2 is focused on providing stability, security and
speed whilst remaining fully compatible with existing mods and other clients.
-WWW: http://www.r1ch.net/stuff/r1q2/
+WWW: http://old.r1ch.net/stuff/r1q2/