aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/generator-cbiere
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2013-07-15 23:03:09 +0800
committermiwi <miwi@FreeBSD.org>2013-07-15 23:03:09 +0800
commit4decb5a3855e4a20f615b27711acf9d1b0244796 (patch)
tree50a347021dc71f8e7e2039ca63b4b3329bfadb03 /emulators/generator-cbiere
parent8b9fd557b93a068b9df3bb77624588a7c8f99097 (diff)
downloadfreebsd-ports-gnome-4decb5a3855e4a20f615b27711acf9d1b0244796.tar.gz
freebsd-ports-gnome-4decb5a3855e4a20f615b27711acf9d1b0244796.tar.zst
freebsd-ports-gnome-4decb5a3855e4a20f615b27711acf9d1b0244796.zip
- Unbreak build with clang
PR: 180511 Submitted by: ports fury
Diffstat (limited to 'emulators/generator-cbiere')
-rw-r--r--emulators/generator-cbiere/Makefile23
-rw-r--r--emulators/generator-cbiere/files/patch-configure44
-rw-r--r--emulators/generator-cbiere/files/patch-main__event.c11
-rw-r--r--emulators/generator-cbiere/files/patch-main__vdp.c20
-rw-r--r--emulators/generator-cbiere/files/patch-ym2612__support.h11
5 files changed, 98 insertions, 11 deletions
diff --git a/emulators/generator-cbiere/Makefile b/emulators/generator-cbiere/Makefile
index d9f1edbd9653..c1bb116cfb5e 100644
--- a/emulators/generator-cbiere/Makefile
+++ b/emulators/generator-cbiere/Makefile
@@ -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>
diff --git a/emulators/generator-cbiere/files/patch-configure b/emulators/generator-cbiere/files/patch-configure
new file mode 100644
index 000000000000..c635966e3786
--- /dev/null
+++ b/emulators/generator-cbiere/files/patch-configure
@@ -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
diff --git a/emulators/generator-cbiere/files/patch-main__event.c b/emulators/generator-cbiere/files/patch-main__event.c
new file mode 100644
index 000000000000..c3d3e212881f
--- /dev/null
+++ b/emulators/generator-cbiere/files/patch-main__event.c
@@ -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 */
diff --git a/emulators/generator-cbiere/files/patch-main__vdp.c b/emulators/generator-cbiere/files/patch-main__vdp.c
new file mode 100644
index 000000000000..65ed79308ed2
--- /dev/null
+++ b/emulators/generator-cbiere/files/patch-main__vdp.c
@@ -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;
diff --git a/emulators/generator-cbiere/files/patch-ym2612__support.h b/emulators/generator-cbiere/files/patch-ym2612__support.h
new file mode 100644
index 000000000000..c3668973d9a5
--- /dev/null
+++ b/emulators/generator-cbiere/files/patch-ym2612__support.h
@@ -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)