aboutsummaryrefslogtreecommitdiff
path: root/games/quake2max
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2013-09-05 05:46:47 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2013-09-05 05:46:47 +0000
commita05d721e9248f140dea9ef4adf2dfe170024c685 (patch)
tree2bebd1bb09575af01b9f8e4792195d1cb4f8c3f7 /games/quake2max
parent146d97ce8abb63bc9384a2dd6c30f25312d3e4ce (diff)
downloadports-a05d721e9248f140dea9ef4adf2dfe170024c685.tar.gz
ports-a05d721e9248f140dea9ef4adf2dfe170024c685.zip
- Unbreak the build against Clang (non-void function should return a value)
- Sound file loader in the engine already converts the data to host-endian, therefore the device must be open in host-endian mode, too - Convert obsolete USE_GMAKE while here Reported by: pkg-fallout
Notes
Notes: svn path=/head/; revision=326353
Diffstat (limited to 'games/quake2max')
-rw-r--r--games/quake2max/Makefile5
-rw-r--r--games/quake2max/files/patch-unix__snd_unix.c29
2 files changed, 33 insertions, 1 deletions
diff --git a/games/quake2max/Makefile b/games/quake2max/Makefile
index ab4321f923c6..171ca42c1bcc 100644
--- a/games/quake2max/Makefile
+++ b/games/quake2max/Makefile
@@ -19,8 +19,8 @@ LICENSE= GPLv2
EXTRACT_DEPENDS= unrar:${PORTSDIR}/archivers/unrar
+USES= gmake
USE_BZIP2= yes
-USE_GMAKE= yes
USE_XORG= xxf86dga
ALL_TARGET= release
WRKSRC= ${WRKDIR}/${DISTNAME:S/quake2max/Quake2maX/}
@@ -112,6 +112,9 @@ post-patch:
# Resolve name collision with jpeg-8
@${REINPLACE_CMD} -e 's|jpeg_mem_src|local_&|' \
${WRKSRC}/ref_gl/gl_image.c
+# Pacify Clang (non-void function should return a value)
+ @${REINPLACE_CMD} -e '900s|return|& false|' \
+ ${WRKSRC}/client/qmenu.c
do-install:
@${MKDIR} ${LIBDIR}/baseq2
diff --git a/games/quake2max/files/patch-unix__snd_unix.c b/games/quake2max/files/patch-unix__snd_unix.c
new file mode 100644
index 000000000000..d05e65df0785
--- /dev/null
+++ b/games/quake2max/files/patch-unix__snd_unix.c
@@ -0,0 +1,29 @@
+--- unix/snd_unix.c.orig 2006-01-01 20:46:30.000000000 +0800
++++ unix/snd_unix.c 2013-09-05 13:28:24.000000000 +0800
+@@ -59,7 +59,7 @@ qboolean SNDDMA_Init(void)
+ extern uid_t saved_euid;
+
+ if (snd_inited)
+- return;
++ return 1;
+
+ if (!snddevice) {
+ sndbits = Cvar_Get("sndbits", "16", CVAR_ARCHIVE);
+@@ -115,7 +115,7 @@ qboolean SNDDMA_Init(void)
+ if (dma.samplebits != 16 && dma.samplebits != 8)
+ {
+ ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &fmt);
+- if (fmt & AFMT_S16_LE) dma.samplebits = 16;
++ if (fmt & AFMT_S16_NE) dma.samplebits = 16;
+ else if (fmt & AFMT_U8) dma.samplebits = 8;
+ }
+
+@@ -157,7 +157,7 @@ qboolean SNDDMA_Init(void)
+
+ if (dma.samplebits == 16)
+ {
+- rc = AFMT_S16_LE;
++ rc = AFMT_S16_NE;
+ rc = ioctl(audio_fd, SNDCTL_DSP_SETFMT, &rc);
+ if (rc < 0)
+ {