From bogorodskiy@inbox.ru  Fri Oct  8 11:03:44 2004
Return-Path: <bogorodskiy@inbox.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0401416A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  8 Oct 2004 11:03:44 +0000 (GMT)
Received: from mx2.mail.ru (mx2.mail.ru [194.67.23.122])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2DE5043D41
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  8 Oct 2004 11:03:43 +0000 (GMT)
	(envelope-from bogorodskiy@inbox.ru)
Received: from [194.186.150.53] (port=59832 helo=inbox.ru)
	by mx2.mail.ru with esmtp 
	id 1CFsXE-000FI3-00
	for FreeBSD-gnats-submit@freebsd.org; Fri, 08 Oct 2004 15:03:41 +0400
Message-Id: <E1CFsXE-000FI3-00.bogorodskiy-inbox-ru@mx2.mail.ru>
Date: Fri, 08 Oct 2004 15:03:41 +0400
From: Roman Bogorodskiy <bogorodskiy@inbox.ru>
Reply-To: Roman Bogorodskiy <bogorodskiy@inbox.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [ maintainer ] emulators/pearpc: fix SDL build via update, fix build with JITC
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         72442
>Category:       ports
>Synopsis:       [ maintainer ] emulators/pearpc: fix SDL build via update, fix build with JITC
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 08 11:10:27 GMT 2004
>Closed-Date:    Wed Oct 13 00:09:15 GMT 2004
>Last-Modified:  Wed Oct 13 00:09:15 GMT 2004
>Originator:     Roman Bogorodskiy
>Release:        FreeBSD 5.3-BETA7 i386
>Organization:
>Environment:
System: FreeBSD lame.novel.ru 5.3-BETA7 FreeBSD 5.3-BETA7 #10: Sun Oct 3 17:45:47 MSD 2004 root@lame.novel.ru:/usr/obj/usr/home/novel/current/src/sys/NOVEL i386


>Description:
	- PearPC 0.3.1 includes my patch for configure.in which makes SDL usable
	and fixes stdint.h/inttypes.h trouble. 
	- Fix build with JITC cpu for gcc34

	New files: patch-gcc34 

>How-To-Repeat:
	cd emulators/pearpc
	make -DWITH_JITC
>Fix:

diff -ruN pearpc.orig/Makefile pearpc/Makefile
--- pearpc.orig/Makefile	Tue Oct  5 15:45:35 2004
+++ pearpc/Makefile	Fri Oct  8 14:51:30 2004
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	pearpc
-PORTVERSION=	0.3.0
+PORTVERSION=	0.3.1
 CATEGORIES=	emulators
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -42,6 +42,13 @@
 #CONFIGURE_ARGS+=	--enable-ui=nogui
 #.endif
 
+.if defined(WITH_SDL)
+CONFIGURE_ARGS+=	--enable-ui=sdl
+USE_SDL=	sdl
+.else
+CONFIGURE_ARGS+=	--enable-ui=x11
+.endif
+
 .include <bsd.port.pre.mk>
 
 # jitc_x86 is avaible only on x86
@@ -66,11 +73,6 @@
 	@${ECHO_MSG} ""
 	@${ECHO_MSG} "You can do optimized build defining WITH_OPTIMIZED_CFLAGS=yes."
 	@${ECHO_MSG} ""
-.endif
-
-post-patch:
-.if ${OSVERSION} < 500000
-	@${REINPLACE_CMD} -e 's|stdint.h|inttypes.h|' ${WRKSRC}/src/system/osapi/posix/types.h
 .endif
 
 post-configure:
diff -ruN pearpc.orig/distinfo pearpc/distinfo
--- pearpc.orig/distinfo	Tue Oct  5 15:45:35 2004
+++ pearpc/distinfo	Tue Oct  5 15:45:46 2004
@@ -1,2 +1,2 @@
-MD5 (pearpc-0.3.0.tar.gz) = 6d68187c78cae674a5efa6662c4cdb22
-SIZE (pearpc-0.3.0.tar.gz) = 814686
+MD5 (pearpc-0.3.1.tar.gz) = d7ac0566f6ab884029e374ac68842932
+SIZE (pearpc-0.3.1.tar.gz) = 834258
diff -ruN pearpc.orig/files/patch-gcc34 pearpc/files/patch-gcc34
--- pearpc.orig/files/patch-gcc34	Thu Jan  1 03:00:00 1970
+++ pearpc/files/patch-gcc34	Tue Oct  5 17:05:58 2004
@@ -0,0 +1,41 @@
+--- src/cpu/cpu_jitc_x86/ppc_cpu.h.orig	Tue Oct  5 15:48:01 2004
++++ src/cpu/cpu_jitc_x86/ppc_cpu.h	Tue Oct  5 17:03:40 2004
+@@ -112,7 +112,8 @@
+ 	uint32 current_code_base;
+ } PACKED;
+ 
+-enum PPC_Register {
++
++/*enum PPC_Register {
+ 	PPC_REG_NO = 0,
+ 	PPC_GPR0 = offsetof(PPC_CPU_State, gpr),
+ 	PPC_FPR1 = offsetof(PPC_CPU_State, fpr),
+@@ -132,7 +133,27 @@
+ 	PPC_PVR = offsetof(PPC_CPU_State, pvr),
+ 	PPC_HID0 = offsetof(PPC_CPU_State, hid),
+ 	PPC_HID1 = offsetof(PPC_CPU_State, hid)+sizeof (uint32),
+-};
++};*/
++#define PPC_Register size_t
++#define PPC_REG_NO 0
++#define PPC_GPR0  offsetof(PPC_CPU_State, gpr)
++#define PPC_FPR1  offsetof(PPC_CPU_State, fpr)
++#define PPC_CR  offsetof(PPC_CPU_State, cr)
++#define PPC_FPSCR  offsetof(PPC_CPU_State, fpscr)
++#define PPC_XER  offsetof(PPC_CPU_State, xer)
++#define PPC_LR  offsetof(PPC_CPU_State, lr)
++#define PPC_CTR  offsetof(PPC_CPU_State, ctr)
++#define PPC_MSR  offsetof(PPC_CPU_State, msr)
++#define PPC_SRR0  offsetof(PPC_CPU_State, srr)
++#define PPC_SRR1  offsetof(PPC_CPU_State, srr)+sizeof (uint32)
++#define PPC_DSISR  offsetof(PPC_CPU_State, dsisr)
++#define PPC_DAR  offsetof(PPC_CPU_State, dar)
++#define PPC_DEC  offsetof(PPC_CPU_State, dec)
++#define PPC_SDR1  offsetof(PPC_CPU_State, sdr1) 
++#define PPC_EAR  offsetof(PPC_CPU_State, ear)
++#define PPC_PVR  offsetof(PPC_CPU_State, pvr)
++#define PPC_HID0  offsetof(PPC_CPU_State, hid)
++#define PPC_HID1  offsetof(PPC_CPU_State, hid)+sizeof (uint32)
+ 
+ enum PPC_CRx {
+ 	PPC_CR0=0,
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: edwin 
State-Changed-When: Wed Oct 13 00:09:13 GMT 2004 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72442 
>Unformatted:
