diff options
author | danfe <danfe@FreeBSD.org> | 2013-09-05 13:46:47 +0800 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2013-09-05 13:46:47 +0800 |
commit | 242921a31ca5c60522f7d03fd34b705dc76ff025 (patch) | |
tree | 2bebd1bb09575af01b9f8e4792195d1cb4f8c3f7 /games | |
parent | bd9d8df0dbff6eddcefd4596d1f25e4cb52e6bb8 (diff) | |
download | freebsd-ports-gnome-242921a31ca5c60522f7d03fd34b705dc76ff025.tar.gz freebsd-ports-gnome-242921a31ca5c60522f7d03fd34b705dc76ff025.tar.zst freebsd-ports-gnome-242921a31ca5c60522f7d03fd34b705dc76ff025.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
Diffstat (limited to 'games')
-rw-r--r-- | games/quake2max/Makefile | 5 | ||||
-rw-r--r-- | games/quake2max/files/patch-unix__snd_unix.c | 29 |
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) + { |