Bug 185518 - emulators/generator-cbiere: Fix build with clang
Summary: emulators/generator-cbiere: Fix build with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Wilke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-05 18:10 UTC by tkato432
Modified: 2014-02-07 16:00 UTC (History)
0 users

See Also:


Attachments
file.diff (2.47 KB, patch)
2014-01-05 18:10 UTC, tkato432
no flags Details | Diff
emulators_generator-cbiere.diff (3.81 KB, patch)
2014-01-20 17:58 UTC, tkato432
no flags Details | Diff
emulators_generator-cbiere.diff (3.94 KB, patch)
2014-01-26 17:57 UTC, tkato432
no flags Details | Diff
emulators_generator-cbiere.diff (3.82 KB, patch)
2014-02-02 18:18 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2014-01-05 18:10:07 UTC
- Fix build with clang

New file:
files/patch-hdr__registers.h
Comment 1 Martin Wilke freebsd_committer freebsd_triage 2014-01-19 09:55:40 UTC
State Changed
From-To: open->feedback

build fails, 
http://pkgdev.miwibox.org/latest-per-pkg/generator-cbiere/0.35.r4_4,1/
Comment 2 tkato432 2014-01-20 17:58:07 UTC
Here is the corrected patch.
Comment 3 Martin Wilke freebsd_committer freebsd_triage 2014-01-23 15:48:30 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

I'll take it.
Comment 4 tkato432 2014-01-26 17:57:09 UTC
Remake of the patch against current tree.
Comment 5 tkato432 2014-02-02 18:18:04 UTC
Remake of the patch against current tree.
Comment 6 Martin Wilke freebsd_committer freebsd_triage 2014-02-07 15:55:44 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!
Comment 7 dfilter service freebsd_committer freebsd_triage 2014-02-07 15:55:53 UTC
Author: miwi
Date: Fri Feb  7 15:55:44 2014
New Revision: 343272
URL: http://svnweb.freebsd.org/changeset/ports/343272
QAT: https://qat.redports.org/buildarchive/r343272/

Log:
  - Stage support
  - Fix build
  
  PR:		185518
  Submitted by:	Ports Fury

Added:
  head/emulators/generator-cbiere/files/patch-hdr__registers.h   (contents, props changed)
  head/emulators/generator-cbiere/files/patch-main__reg68k.c   (contents, props changed)
Modified:
  head/emulators/generator-cbiere/Makefile

Modified: head/emulators/generator-cbiere/Makefile
==============================================================================
--- head/emulators/generator-cbiere/Makefile	Fri Feb  7 15:54:38 2014	(r343271)
+++ head/emulators/generator-cbiere/Makefile	Fri Feb  7 15:55:44 2014	(r343272)
@@ -15,48 +15,40 @@ COMMENT=	SEGA Genesis emulator
 
 LICENSE=	GPLv2
 
-LIB_DEPENDS=	jpeg:${PORTSDIR}/graphics/jpeg
-
-OPTIONS_DEFINE=	OPTIMIZED_CFLAGS SDL
-OPTIONS_DEFINE_i386=	RAZE
-RAZE_DESC=	Use RAZE z80 emulation (only for i386)
-SDL_DESC=	Use SDL for audio
+LIB_DEPENDS=	libjpeg.so:${PORTSDIR}/graphics/jpeg
 
 USE_BZIP2=	yes
+USES=		gmake
 USE_GNOME=	gtk12
 USE_SDL=	sdl
-USES=		gmake
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS=	--program-transform-name=s/${PORTNAME}/${PORTNAME}${PKGNAMESUFFIX}/
-CONFIGURE_ARGS+=--with-gtk
+CONFIGURE_ARGS=	--program-transform-name=s/${PORTNAME}/${UNIQUENAME}/ \
+		--with-gtk
 MAKE_JOBS_UNSAFE=	yes
 
 CPPFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 
-PLIST_FILES=	bin/${PORTNAME}${PKGNAMESUFFIX}-gtk
+PLIST_FILES=	bin/${UNIQUENAME}-gtk
+
+OPTIONS_DEFINE=		OPTIMIZED_CFLAGS SDL
+OPTIONS_DEFINE_i386=	RAZE
 
-LATEST_LINK=	${PORTNAME}${PKGNAMESUFFIX}
+OPTIMIZED_CFLAGS_CONFIGURE_OFF=	--without-gcc
+RAZE_DESC=		Use RAZE z80 emulation
+RAZE_BUILD_DEPENDS=	nasm:${PORTSDIR}/devel/nasm
+RAZE_CONFIGURE_ON=	--with-raze
+SDL_DESC=		Use SDL for audio
+SDL_CONFIGURE_ON=	--with-sdl-audio
 
 .include <bsd.port.options.mk>
 
-.if empty(PORT_OPTIONS:MOPTIMIZED_CFLAGS)
-CONFIGURE_ARGS+=	--without-gcc
-.endif
-
-.if ${PORT_OPTIONS:MRAZE}
-BUILD_DEPENDS+=	nasm:${PORTSDIR}/devel/nasm
-CONFIGURE_ARGS+=--with-raze
-.else
+.if empty(PORT_OPTIONS:MRAZE)
 CONFIGURE_ARGS+=--with-cmz80
 .endif
 
-.if ${PORT_OPTIONS:MSDL}
-CONFIGURE_ARGS+=--with-sdl-audio
-.endif
-
 post-patch:
-	@${REINPLACE_CMD} -e '/%define %1 @UNDERSCORE@%1 /d' \
-		${WRKSRC}/raze/raze.asm.in
+	@${REINPLACE_CMD} -e \
+		'/%define %1 @UNDERSCORE@%1 /d' ${WRKSRC}/raze/raze.asm.in
 
 .include <bsd.port.mk>

Added: head/emulators/generator-cbiere/files/patch-hdr__registers.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/generator-cbiere/files/patch-hdr__registers.h	Fri Feb  7 15:55:44 2014	(r343272)
@@ -0,0 +1,23 @@
+--- hdr/registers.h.orig
++++ hdr/registers.h
+@@ -6,17 +6,17 @@
+    call a C function, then when that C function returns these registers are
+    still what they were before we made the call. */
+ 
+-#ifdef PROCESSOR_ARM
++#if defined(PROCESSOR_ARM) && !defined(__clang__)
+      register uint32 reg68k_pc asm ("r7");
+      register uint32 *reg68k_regs asm ("r8");
+      register t_sr reg68k_sr asm ("r9");
+ #else
+-#  ifdef PROCESSOR_SPARC
++#  if defined(PROCESSOR_SPARC) && !defined(__clang__)
+        register uint32 reg68k_pc asm ("5");
+        register uint32 *reg68k_regs asm ("6");
+        register t_sr reg68k_sr asm ("7");
+ #  else
+-#    ifdef PROCESSOR_INTEL
++#    if defined(PROCESSOR_INTEL) && !defined(__clang__)
+          register uint32 reg68k_pc asm ("%ebx");
+          register uint32 *reg68k_regs asm ("%edi");
+          register t_sr reg68k_sr asm ("%esi");

Added: head/emulators/generator-cbiere/files/patch-main__reg68k.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/generator-cbiere/files/patch-main__reg68k.c	Fri Feb  7 15:55:44 2014	(r343272)
@@ -0,0 +1,13 @@
+--- main/reg68k.c.orig
++++ main/reg68k.c
+@@ -18,8 +18,8 @@
+ 
+ /*** global variables ***/
+ 
+-#if (!(defined(PROCESSOR_ARM) || defined(PROCESSOR_SPARC) \
+-       || defined(PROCESSOR_INTEL)))
++#if ((!(defined(PROCESSOR_ARM) || defined(PROCESSOR_SPARC) \
++       || defined(PROCESSOR_INTEL))) || defined(__clang__))
+ uint32 reg68k_pc;
+ uint32 *reg68k_regs;
+ t_sr reg68k_sr;
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"