- Unbreak build with clang

PR:		180511
Submitted by:	ports fury
This commit is contained in:
Martin Wilke 2013-07-15 15:03:09 +00:00
parent 68790047e5
commit e8d901f873
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=323057
5 changed files with 98 additions and 11 deletions

View file

@ -13,23 +13,24 @@ DISTNAME= ${PORTNAME}-0.35${PKGNAMESUFFIX}-r4
MAINTAINER= ports@FreeBSD.org
COMMENT= SEGA Genesis emulator
LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg
LICENSE= GPLv2
USE_BZIP2= yes
USE_SDL= sdl
USE_GMAKE= yes
USE_GNOME= gtk12
MAKE_JOBS_UNSAFE= yes
LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg
OPTIONS_DEFINE= OPTIMIZED_CFLAGS RAZE SDL
OPTIONS_DEFINE= OPTIMIZED_CFLAGS SDL
OPTIONS_DEFINE_i386= RAZE
RAZE_DESC= Use RAZE z80 emulation (only for i386)
SDL_DESC= Use SDL for audio
USE_BZIP2= yes
USE_GNOME= gtk12
USE_SDL= sdl
USE_GMAKE= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --program-transform-name=s/${PORTNAME}/${PORTNAME}${PKGNAMESUFFIX}/
CONFIGURE_ARGS+=--with-gtk
MAKE_JOBS_UNSAFE= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
@ -37,13 +38,13 @@ PLIST_FILES= bin/${PORTNAME}${PKGNAMESUFFIX}-gtk
LATEST_LINK= ${PORTNAME}${PKGNAMESUFFIX}
.include <bsd.port.pre.mk>
.include <bsd.port.options.mk>
.if empty(PORT_OPTIONS:MOPTIMIZED_CFLAGS)
CONFIGURE_ARGS+= --without-gcc
.endif
.if ${PORT_OPTIONS:MRAZE} && ${ARCH} == "i386"
.if ${PORT_OPTIONS:MRAZE}
BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm
CONFIGURE_ARGS+=--with-raze
.else
@ -63,4 +64,4 @@ post-install:
@${CAT} ${PKGMESSAGE}
@${ECHO_CMD}
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View file

@ -0,0 +1,44 @@
--- configure.orig
+++ configure
@@ -3968,10 +3968,6 @@
#endif
#endif
-int
-main ()
-{
-
int main(int argc, char *argv[])
{
int fd = 0;
@@ -3979,9 +3975,6 @@
ioctl(fd, SNDCTL_DSP_SETFRAGMENT, (char *)0);
return 0;
}
- ;
- return 0;
-}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -4026,10 +4019,6 @@
#endif
#endif
-int
-main ()
-{
-
int main(int argc, char *argv[])
{
int fd = 0;
@@ -4037,9 +4026,6 @@
ioctl(fd, SNDCTL_DSP_SETFRAGMENT, (char *)0);
return 0;
}
- ;
- return 0;
-}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5

View file

@ -0,0 +1,11 @@
--- main/event.c.orig
+++ main/event.c
@@ -15,7 +15,7 @@
/* time for next event - update vdp_event - return when to call again */
-inline void event_nextevent(void)
+static inline void event_nextevent(void)
{
/* call this when it *is* time for the next event as dictated by vdp_event,
so we switch on it and update vdp_event at the same time */

View file

@ -0,0 +1,20 @@
--- main/vdp.c.orig
+++ main/vdp.c
@@ -87,7 +87,7 @@ void vdp_describe(void);
void vdp_eventinit(void);
void vdp_layer_simple(unsigned int layer, unsigned int priority,
uint8 *fielddata, unsigned int lineoffset);
-inline void vdp_plotcell(uint8 *patloc, uint8 palette, uint8 flags,
+static inline void vdp_plotcell(uint8 *patloc, uint8 palette, uint8 flags,
uint8 *cellloc, unsigned int lineoffset);
void vdp_sprites(unsigned int line, uint8 *pridata, uint8 *outdata);
int vdp_sprite_simple(unsigned int priority, uint8 *framedata,
@@ -1733,7 +1733,7 @@ void vdp_endfield(void)
vdp_event_endline); */
}
-inline void vdp_plotcell(uint8 *patloc, uint8 palette, uint8 flags,
+static inline void vdp_plotcell(uint8 *patloc, uint8 palette, uint8 flags,
uint8 *cellloc, unsigned int lineoffset)
{
int y, x;

View file

@ -0,0 +1,11 @@
--- ym2612/support.h.orig
+++ ym2612/support.h
@@ -3,7 +3,7 @@
#include "config.h"
#define errorlog 0
-#define INLINE inline
+#define INLINE static inline
#define HAS_YM2612 1
#define YM2612UpdateRequest(x)
#define AY8910_set_clock(chip,clock)